From http://www.jwz.org/xscreensaver/xscreensaver-5.27.tar.gz
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18   emulate sh
19   NULLCMD=:
20   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23   setopt NO_GLOB_SUBST
24 else
25   case `(set -o) 2>/dev/null` in #(
26   *posix*) :
27     set -o posix ;; #(
28   *) :
29      ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45   as_echo='print -r --'
46   as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48   as_echo='printf %s\n'
49   as_echo_n='printf %s'
50 else
51   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53     as_echo_n='/usr/ucb/echo -n'
54   else
55     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56     as_echo_n_body='eval
57       arg=$1;
58       case $arg in #(
59       *"$as_nl"*)
60         expr "X$arg" : "X\\(.*\\)$as_nl";
61         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62       esac;
63       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64     '
65     export as_echo_n_body
66     as_echo_n='sh -c $as_echo_n_body as_echo'
67   fi
68   export as_echo_body
69   as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74   PATH_SEPARATOR=:
75   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77       PATH_SEPARATOR=';'
78   }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order.  Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" ""        $as_nl"
88
89 # Find who we are.  Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92   *[\\/]* ) as_myself=$0 ;;
93   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96   IFS=$as_save_IFS
97   test -z "$as_dir" && as_dir=.
98     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99   done
100 IFS=$as_save_IFS
101
102      ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107   as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111   exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there.  '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136   # into an infinite loop, continuously re-executing ourselves.
137   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138     _as_can_reexec=no; export _as_can_reexec;
139     # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147   *v*x* | *x*v* ) as_opts=-vx ;;
148   *v* ) as_opts=-v ;;
149   *x* ) as_opts=-x ;;
150   * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157   fi
158   # We don't want this to propagate to other subprocesses.
159           { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162   emulate sh
163   NULLCMD=:
164   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165   # is contrary to our usage.  Disable this feature.
166   alias -g '\${1+\"\$@\"}'='\"\$@\"'
167   setopt NO_GLOB_SUBST
168 else
169   case \`(set -o) 2>/dev/null\` in #(
170   *posix*) :
171     set -o posix ;; #(
172   *) :
173      ;;
174 esac
175 fi
176 "
177   as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191   exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200   if (eval "$as_required") 2>/dev/null; then :
201   as_have_required=yes
202 else
203   as_have_required=no
204 fi
205   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212   IFS=$as_save_IFS
213   test -z "$as_dir" && as_dir=.
214   as_found=:
215   case $as_dir in #(
216          /*)
217            for as_base in sh bash ksh sh5; do
218              # Try only shells that exist, to save several forks.
219              as_shell=$as_dir/$as_base
220              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222   CONFIG_SHELL=$as_shell as_have_required=yes
223                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224   break 2
225 fi
226 fi
227            done;;
228        esac
229   as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233   CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238       if test "x$CONFIG_SHELL" != x; then :
239   export CONFIG_SHELL
240              # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248   *v*x* | *x*v* ) as_opts=-vx ;;
249   *v* ) as_opts=-v ;;
250   *x* ) as_opts=-x ;;
251   * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260     if test x$as_have_required = xno; then :
261   $as_echo "$0: This script requires a shell more modern than all"
262   $as_echo "$0: the shells that I found on your system."
263   if test x${ZSH_VERSION+set} = xset ; then
264     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266   else
267     $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271   fi
272   exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290   { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299   return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307   set +e
308   as_fn_set_status $1
309   exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318   case $as_dir in #(
319   -*) as_dir=./$as_dir;;
320   esac
321   test -d "$as_dir" || eval $as_mkdir_p || {
322     as_dirs=
323     while :; do
324       case $as_dir in #(
325       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326       *) as_qdir=$as_dir;;
327       esac
328       as_dirs="'$as_qdir' $as_dirs"
329       as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331          X"$as_dir" : 'X\(//\)[^/]' \| \
332          X"$as_dir" : 'X\(//\)$' \| \
333          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336             s//\1/
337             q
338           }
339           /^X\(\/\/\)[^/].*/{
340             s//\1/
341             q
342           }
343           /^X\(\/\/\)$/{
344             s//\1/
345             q
346           }
347           /^X\(\/\).*/{
348             s//\1/
349             q
350           }
351           s/.*/./; q'`
352       test -d "$as_dir" && break
353     done
354     test -z "$as_dirs" || eval "mkdir $as_dirs"
355   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365   test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374   eval 'as_fn_append ()
375   {
376     eval $1+=\$2
377   }'
378 else
379   as_fn_append ()
380   {
381     eval $1=\$$1\$2
382   }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391   eval 'as_fn_arith ()
392   {
393     as_val=$(( $* ))
394   }'
395 else
396   as_fn_arith ()
397   {
398     as_val=`expr "$@" || test $? -eq 1`
399   }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410   as_status=$1; test $as_status -eq 0 && as_status=1
411   if test "$4"; then
412     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414   fi
415   $as_echo "$as_me: error: $2" >&2
416   as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420    test "X`expr 00001 : '.*\(...\)'`" = X001; then
421   as_expr=expr
422 else
423   as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427   as_basename=basename
428 else
429   as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433   as_dirname=dirname
434 else
435   as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440          X"$0" : 'X\(//\)$' \| \
441          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443     sed '/^.*\/\([^/][^/]*\)\/*$/{
444             s//\1/
445             q
446           }
447           /^X\/\(\/\/\)$/{
448             s//\1/
449             q
450           }
451           /^X\/\(\/\).*/{
452             s//\1/
453             q
454           }
455           s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465   as_lineno_1=$LINENO as_lineno_1a=$LINENO
466   as_lineno_2=$LINENO as_lineno_2a=$LINENO
467   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470   sed -n '
471     p
472     /[$]LINENO/=
473   ' <$as_myself |
474     sed '
475       s/[$]LINENO.*/&-/
476       t lineno
477       b
478       :lineno
479       N
480       :loop
481       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482       t loop
483       s/-\n.*//
484     ' >$as_me.lineno &&
485   chmod +x "$as_me.lineno" ||
486     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489   # already done that, so ensure we don't try to do so again and fall
490   # in an infinite loop.  This has already happened in practice.
491   _as_can_reexec=no; export _as_can_reexec
492   # Don't try to exec as it changes $[0], causing all sort of problems
493   # (the dirname of $[0] is not the place where we might find the
494   # original and so on.  Autoconf is especially sensitive to this).
495   . "./$as_me.lineno"
496   # Exit status is that of the last command.
497   exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503   case `echo 'xy\c'` in
504   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
505   xy)  ECHO_C='\c';;
506   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507        ECHO_T=' ';;
508   esac;;
509 *)
510   ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515   rm -f conf$$.dir/conf$$.file
516 else
517   rm -f conf$$.dir
518   mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521   if ln -s conf$$.file conf$$ 2>/dev/null; then
522     as_ln_s='ln -s'
523     # ... but there are two gotchas:
524     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526     # In both cases, we have to default to `cp -pR'.
527     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528       as_ln_s='cp -pR'
529   elif ln conf$$.file conf$$ 2>/dev/null; then
530     as_ln_s=ln
531   else
532     as_ln_s='cp -pR'
533   fi
534 else
535   as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541   as_mkdir_p='mkdir -p "$as_dir"'
542 else
543   test -d ./-p && rmdir ./-p
544   as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="driver/subprocs.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 #  include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 #  include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 ac_header_list=
623 ac_subst_vars='LTLIBOBJS
624 LIBOBJS
625 DEPEND_DEFINES
626 DEPEND_FLAGS
627 DEPEND
628 APPDEFAULTS
629 GTK_EXTRA_OBJS
630 HACK_CONF_DIR
631 PO_DATADIR
632 GTK_DATADIR
633 HACKDIR_FULL
634 HACKDIR
635 NOGNOME
636 GNOME22
637 GNOME24
638 GLFONT_OBJS
639 GLFPS_OBJS
640 JWZGLES_OBJS
641 GLE_KLUDGE
642 GLE_EXES
643 GL_KLUDGE
644 GL_MEN
645 GL_UTIL_EXES
646 SUID_EXES
647 RETIRED_GL_EXES
648 GL_EXES
649 JPEG_EXES
650 LOCK_OBJS
651 LOCK_SRCS
652 SAVER_GL_LIBS
653 SAVER_GL_OBJS
654 SAVER_GL_SRCS
655 XMU_LIBS
656 XMU_OBJS
657 XMU_SRCS
658 PASSWD_OBJS
659 PASSWD_SRCS
660 MEN_OSX
661 SCRIPTS_OSX
662 EXES_OSX
663 OBJCC
664 WITH_BROWSER
665 DEFAULT_TEXT_FILE
666 DEFAULT_IMAGE_DIRECTORY
667 DEFAULT_IMAGES_P
668 NEW_LOGIN_COMMAND_P
669 NEW_LOGIN_COMMAND
670 COMMENT_PAM_CHECK_ACCOUNT
671 HAVE_PAM_FAIL_DELAY
672 INSTALL_PAM
673 NEED_SETUID
674 INSTALL_DIRS
675 SETUID_HACKS
676 INSTALL_SETUID
677 PASSWD_LIBS
678 XINERAMA_LIBS
679 XDPMS_LIBS
680 GLE_LIBS
681 GL_LIBS
682 PTY_LIBS
683 XPM_LIBS
684 HACK_LIBS
685 JPEG_LIBS
686 XML_LIBS
687 GTK_LIBS
688 MOTIF_LIBS
689 SAVER_LIBS
690 ALL_DEMO_PROGRAMS
691 PREFERRED_DEMO_PROGRAM
692 INCLUDES
693 gnome_url_show_program
694 gnome_open_program
695 pkg_config
696 login_manager_tmp
697 MKINSTALLDIRS
698 POSUB
699 POFILES
700 INTLOBJS
701 INTLLIBS
702 INTLDEPS
703 INSTOBJEXT
704 GMOFILES
705 DATADIRNAME
706 CATOBJEXT
707 CATALOGS
708 XGETTEXT
709 GMSGFMT
710 MSGFMT
711 USE_NLS
712 ALLOCA
713 RANLIB
714 GETTEXT_PACKAGE
715 X_EXTRA_LIBS
716 X_LIBS
717 X_PRE_LIBS
718 X_CFLAGS
719 XMKMF
720 PERL
721 EGREP
722 GREP
723 SET_MAKE
724 INSTALL_DATA
725 INSTALL_SCRIPT
726 INSTALL_PROGRAM
727 CPP
728 PTHREAD_CFLAGS
729 PTHREAD_LIBS
730 PTHREAD_CC
731 ax_pthread_config
732 OBJEXT
733 EXEEXT
734 ac_ct_CC
735 CPPFLAGS
736 LDFLAGS
737 CFLAGS
738 CC
739 host_os
740 host_vendor
741 host_cpu
742 host
743 build_os
744 build_vendor
745 build_cpu
746 build
747 target_alias
748 host_alias
749 build_alias
750 LIBS
751 ECHO_T
752 ECHO_N
753 ECHO_C
754 DEFS
755 mandir
756 localedir
757 libdir
758 psdir
759 pdfdir
760 dvidir
761 htmldir
762 infodir
763 docdir
764 oldincludedir
765 includedir
766 localstatedir
767 sharedstatedir
768 sysconfdir
769 datadir
770 datarootdir
771 libexecdir
772 sbindir
773 bindir
774 program_transform_name
775 prefix
776 exec_prefix
777 PACKAGE_URL
778 PACKAGE_BUGREPORT
779 PACKAGE_STRING
780 PACKAGE_VERSION
781 PACKAGE_TARNAME
782 PACKAGE_NAME
783 PATH_SEPARATOR
784 SHELL'
785 ac_subst_files=''
786 ac_user_opts='
787 enable_option_checking
788 with_x_app_defaults
789 with_pthread
790 enable_largefile
791 with_x
792 with_hackdir
793 enable_subdir
794 with_configdir
795 with_dpms_ext
796 with_xinerama_ext
797 with_xinput_ext
798 with_xf86vmode_ext
799 with_xf86gamma_ext
800 with_randr_ext
801 with_proc_interrupts
802 enable_locking
803 enable_root_passwd
804 with_pam
805 with_pam_service_name
806 enable_pam_check_account_type
807 with_kerberos
808 with_shadow
809 with_passwd_helper
810 with_login_manager
811 with_gtk
812 with_motif
813 with_gl
814 with_gle
815 with_gles
816 with_pixbuf
817 with_xpm
818 with_jpeg
819 with_xshm_ext
820 with_xdbe_ext
821 with_readdisplay
822 with_image_directory
823 with_text_file
824 with_browser
825 with_setuid_hacks
826 '
827       ac_precious_vars='build_alias
828 host_alias
829 target_alias
830 CC
831 CFLAGS
832 LDFLAGS
833 LIBS
834 CPPFLAGS
835 CPP
836 XMKMF'
837
838
839 # Initialize some variables set by options.
840 ac_init_help=
841 ac_init_version=false
842 ac_unrecognized_opts=
843 ac_unrecognized_sep=
844 # The variables have the same names as the options, with
845 # dashes changed to underlines.
846 cache_file=/dev/null
847 exec_prefix=NONE
848 no_create=
849 no_recursion=
850 prefix=NONE
851 program_prefix=NONE
852 program_suffix=NONE
853 program_transform_name=s,x,x,
854 silent=
855 site=
856 srcdir=
857 verbose=
858 x_includes=NONE
859 x_libraries=NONE
860
861 # Installation directory options.
862 # These are left unexpanded so users can "make install exec_prefix=/foo"
863 # and all the variables that are supposed to be based on exec_prefix
864 # by default will actually change.
865 # Use braces instead of parens because sh, perl, etc. also accept them.
866 # (The list follows the same order as the GNU Coding Standards.)
867 bindir='${exec_prefix}/bin'
868 sbindir='${exec_prefix}/sbin'
869 libexecdir='${exec_prefix}/libexec'
870 datarootdir='${prefix}/share'
871 datadir='${datarootdir}'
872 sysconfdir='${prefix}/etc'
873 sharedstatedir='${prefix}/com'
874 localstatedir='${prefix}/var'
875 includedir='${prefix}/include'
876 oldincludedir='/usr/include'
877 docdir='${datarootdir}/doc/${PACKAGE}'
878 infodir='${datarootdir}/info'
879 htmldir='${docdir}'
880 dvidir='${docdir}'
881 pdfdir='${docdir}'
882 psdir='${docdir}'
883 libdir='${exec_prefix}/lib'
884 localedir='${datarootdir}/locale'
885 mandir='${datarootdir}/man'
886
887 ac_prev=
888 ac_dashdash=
889 for ac_option
890 do
891   # If the previous option needs an argument, assign it.
892   if test -n "$ac_prev"; then
893     eval $ac_prev=\$ac_option
894     ac_prev=
895     continue
896   fi
897
898   case $ac_option in
899   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
900   *=)   ac_optarg= ;;
901   *)    ac_optarg=yes ;;
902   esac
903
904   # Accept the important Cygnus configure options, so we can diagnose typos.
905
906   case $ac_dashdash$ac_option in
907   --)
908     ac_dashdash=yes ;;
909
910   -bindir | --bindir | --bindi | --bind | --bin | --bi)
911     ac_prev=bindir ;;
912   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
913     bindir=$ac_optarg ;;
914
915   -build | --build | --buil | --bui | --bu)
916     ac_prev=build_alias ;;
917   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
918     build_alias=$ac_optarg ;;
919
920   -cache-file | --cache-file | --cache-fil | --cache-fi \
921   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
922     ac_prev=cache_file ;;
923   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
924   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
925     cache_file=$ac_optarg ;;
926
927   --config-cache | -C)
928     cache_file=config.cache ;;
929
930   -datadir | --datadir | --datadi | --datad)
931     ac_prev=datadir ;;
932   -datadir=* | --datadir=* | --datadi=* | --datad=*)
933     datadir=$ac_optarg ;;
934
935   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
936   | --dataroo | --dataro | --datar)
937     ac_prev=datarootdir ;;
938   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
939   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
940     datarootdir=$ac_optarg ;;
941
942   -disable-* | --disable-*)
943     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
944     # Reject names that are not valid shell variable names.
945     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
946       as_fn_error $? "invalid feature name: $ac_useropt"
947     ac_useropt_orig=$ac_useropt
948     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
949     case $ac_user_opts in
950       *"
951 "enable_$ac_useropt"
952 "*) ;;
953       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
954          ac_unrecognized_sep=', ';;
955     esac
956     eval enable_$ac_useropt=no ;;
957
958   -docdir | --docdir | --docdi | --doc | --do)
959     ac_prev=docdir ;;
960   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
961     docdir=$ac_optarg ;;
962
963   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
964     ac_prev=dvidir ;;
965   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
966     dvidir=$ac_optarg ;;
967
968   -enable-* | --enable-*)
969     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
970     # Reject names that are not valid shell variable names.
971     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
972       as_fn_error $? "invalid feature name: $ac_useropt"
973     ac_useropt_orig=$ac_useropt
974     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
975     case $ac_user_opts in
976       *"
977 "enable_$ac_useropt"
978 "*) ;;
979       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
980          ac_unrecognized_sep=', ';;
981     esac
982     eval enable_$ac_useropt=\$ac_optarg ;;
983
984   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
985   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
986   | --exec | --exe | --ex)
987     ac_prev=exec_prefix ;;
988   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
989   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
990   | --exec=* | --exe=* | --ex=*)
991     exec_prefix=$ac_optarg ;;
992
993   -gas | --gas | --ga | --g)
994     # Obsolete; use --with-gas.
995     with_gas=yes ;;
996
997   -help | --help | --hel | --he | -h)
998     ac_init_help=long ;;
999   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1000     ac_init_help=recursive ;;
1001   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1002     ac_init_help=short ;;
1003
1004   -host | --host | --hos | --ho)
1005     ac_prev=host_alias ;;
1006   -host=* | --host=* | --hos=* | --ho=*)
1007     host_alias=$ac_optarg ;;
1008
1009   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1010     ac_prev=htmldir ;;
1011   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1012   | --ht=*)
1013     htmldir=$ac_optarg ;;
1014
1015   -includedir | --includedir | --includedi | --included | --include \
1016   | --includ | --inclu | --incl | --inc)
1017     ac_prev=includedir ;;
1018   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1019   | --includ=* | --inclu=* | --incl=* | --inc=*)
1020     includedir=$ac_optarg ;;
1021
1022   -infodir | --infodir | --infodi | --infod | --info | --inf)
1023     ac_prev=infodir ;;
1024   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1025     infodir=$ac_optarg ;;
1026
1027   -libdir | --libdir | --libdi | --libd)
1028     ac_prev=libdir ;;
1029   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1030     libdir=$ac_optarg ;;
1031
1032   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1033   | --libexe | --libex | --libe)
1034     ac_prev=libexecdir ;;
1035   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1036   | --libexe=* | --libex=* | --libe=*)
1037     libexecdir=$ac_optarg ;;
1038
1039   -localedir | --localedir | --localedi | --localed | --locale)
1040     ac_prev=localedir ;;
1041   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1042     localedir=$ac_optarg ;;
1043
1044   -localstatedir | --localstatedir | --localstatedi | --localstated \
1045   | --localstate | --localstat | --localsta | --localst | --locals)
1046     ac_prev=localstatedir ;;
1047   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1048   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1049     localstatedir=$ac_optarg ;;
1050
1051   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1052     ac_prev=mandir ;;
1053   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1054     mandir=$ac_optarg ;;
1055
1056   -nfp | --nfp | --nf)
1057     # Obsolete; use --without-fp.
1058     with_fp=no ;;
1059
1060   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1061   | --no-cr | --no-c | -n)
1062     no_create=yes ;;
1063
1064   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1065   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1066     no_recursion=yes ;;
1067
1068   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1069   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1070   | --oldin | --oldi | --old | --ol | --o)
1071     ac_prev=oldincludedir ;;
1072   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1073   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1074   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1075     oldincludedir=$ac_optarg ;;
1076
1077   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1078     ac_prev=prefix ;;
1079   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1080     prefix=$ac_optarg ;;
1081
1082   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1083   | --program-pre | --program-pr | --program-p)
1084     ac_prev=program_prefix ;;
1085   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1086   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1087     program_prefix=$ac_optarg ;;
1088
1089   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1090   | --program-suf | --program-su | --program-s)
1091     ac_prev=program_suffix ;;
1092   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1093   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1094     program_suffix=$ac_optarg ;;
1095
1096   -program-transform-name | --program-transform-name \
1097   | --program-transform-nam | --program-transform-na \
1098   | --program-transform-n | --program-transform- \
1099   | --program-transform | --program-transfor \
1100   | --program-transfo | --program-transf \
1101   | --program-trans | --program-tran \
1102   | --progr-tra | --program-tr | --program-t)
1103     ac_prev=program_transform_name ;;
1104   -program-transform-name=* | --program-transform-name=* \
1105   | --program-transform-nam=* | --program-transform-na=* \
1106   | --program-transform-n=* | --program-transform-=* \
1107   | --program-transform=* | --program-transfor=* \
1108   | --program-transfo=* | --program-transf=* \
1109   | --program-trans=* | --program-tran=* \
1110   | --progr-tra=* | --program-tr=* | --program-t=*)
1111     program_transform_name=$ac_optarg ;;
1112
1113   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1114     ac_prev=pdfdir ;;
1115   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1116     pdfdir=$ac_optarg ;;
1117
1118   -psdir | --psdir | --psdi | --psd | --ps)
1119     ac_prev=psdir ;;
1120   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1121     psdir=$ac_optarg ;;
1122
1123   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1124   | -silent | --silent | --silen | --sile | --sil)
1125     silent=yes ;;
1126
1127   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1128     ac_prev=sbindir ;;
1129   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1130   | --sbi=* | --sb=*)
1131     sbindir=$ac_optarg ;;
1132
1133   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1134   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1135   | --sharedst | --shareds | --shared | --share | --shar \
1136   | --sha | --sh)
1137     ac_prev=sharedstatedir ;;
1138   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1139   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1140   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1141   | --sha=* | --sh=*)
1142     sharedstatedir=$ac_optarg ;;
1143
1144   -site | --site | --sit)
1145     ac_prev=site ;;
1146   -site=* | --site=* | --sit=*)
1147     site=$ac_optarg ;;
1148
1149   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1150     ac_prev=srcdir ;;
1151   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1152     srcdir=$ac_optarg ;;
1153
1154   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1155   | --syscon | --sysco | --sysc | --sys | --sy)
1156     ac_prev=sysconfdir ;;
1157   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1158   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1159     sysconfdir=$ac_optarg ;;
1160
1161   -target | --target | --targe | --targ | --tar | --ta | --t)
1162     ac_prev=target_alias ;;
1163   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1164     target_alias=$ac_optarg ;;
1165
1166   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1167     verbose=yes ;;
1168
1169   -version | --version | --versio | --versi | --vers | -V)
1170     ac_init_version=: ;;
1171
1172   -with-* | --with-*)
1173     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1174     # Reject names that are not valid shell variable names.
1175     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1176       as_fn_error $? "invalid package name: $ac_useropt"
1177     ac_useropt_orig=$ac_useropt
1178     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1179     case $ac_user_opts in
1180       *"
1181 "with_$ac_useropt"
1182 "*) ;;
1183       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1184          ac_unrecognized_sep=', ';;
1185     esac
1186     eval with_$ac_useropt=\$ac_optarg ;;
1187
1188   -without-* | --without-*)
1189     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1190     # Reject names that are not valid shell variable names.
1191     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1192       as_fn_error $? "invalid package name: $ac_useropt"
1193     ac_useropt_orig=$ac_useropt
1194     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1195     case $ac_user_opts in
1196       *"
1197 "with_$ac_useropt"
1198 "*) ;;
1199       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1200          ac_unrecognized_sep=', ';;
1201     esac
1202     eval with_$ac_useropt=no ;;
1203
1204   --x)
1205     # Obsolete; use --with-x.
1206     with_x=yes ;;
1207
1208   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1209   | --x-incl | --x-inc | --x-in | --x-i)
1210     ac_prev=x_includes ;;
1211   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1212   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1213     x_includes=$ac_optarg ;;
1214
1215   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1216   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1217     ac_prev=x_libraries ;;
1218   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1219   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1220     x_libraries=$ac_optarg ;;
1221
1222   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1223 Try \`$0 --help' for more information"
1224     ;;
1225
1226   *=*)
1227     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1228     # Reject names that are not valid shell variable names.
1229     case $ac_envvar in #(
1230       '' | [0-9]* | *[!_$as_cr_alnum]* )
1231       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1232     esac
1233     eval $ac_envvar=\$ac_optarg
1234     export $ac_envvar ;;
1235
1236   *)
1237     # FIXME: should be removed in autoconf 3.0.
1238     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1239     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1240       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1241     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1242     ;;
1243
1244   esac
1245 done
1246
1247 if test -n "$ac_prev"; then
1248   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1249   as_fn_error $? "missing argument to $ac_option"
1250 fi
1251
1252 if test -n "$ac_unrecognized_opts"; then
1253   case $enable_option_checking in
1254     no) ;;
1255     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1256     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1257   esac
1258 fi
1259
1260 # Check all directory arguments for consistency.
1261 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1262                 datadir sysconfdir sharedstatedir localstatedir includedir \
1263                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1264                 libdir localedir mandir
1265 do
1266   eval ac_val=\$$ac_var
1267   # Remove trailing slashes.
1268   case $ac_val in
1269     */ )
1270       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1271       eval $ac_var=\$ac_val;;
1272   esac
1273   # Be sure to have absolute directory names.
1274   case $ac_val in
1275     [\\/$]* | ?:[\\/]* )  continue;;
1276     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1277   esac
1278   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1279 done
1280
1281 # There might be people who depend on the old broken behavior: `$host'
1282 # used to hold the argument of --host etc.
1283 # FIXME: To remove some day.
1284 build=$build_alias
1285 host=$host_alias
1286 target=$target_alias
1287
1288 # FIXME: To remove some day.
1289 if test "x$host_alias" != x; then
1290   if test "x$build_alias" = x; then
1291     cross_compiling=maybe
1292   elif test "x$build_alias" != "x$host_alias"; then
1293     cross_compiling=yes
1294   fi
1295 fi
1296
1297 ac_tool_prefix=
1298 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1299
1300 test "$silent" = yes && exec 6>/dev/null
1301
1302
1303 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1304 ac_ls_di=`ls -di .` &&
1305 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1306   as_fn_error $? "working directory cannot be determined"
1307 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1308   as_fn_error $? "pwd does not report name of working directory"
1309
1310
1311 # Find the source files, if location was not specified.
1312 if test -z "$srcdir"; then
1313   ac_srcdir_defaulted=yes
1314   # Try the directory containing this script, then the parent directory.
1315   ac_confdir=`$as_dirname -- "$as_myself" ||
1316 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1317          X"$as_myself" : 'X\(//\)[^/]' \| \
1318          X"$as_myself" : 'X\(//\)$' \| \
1319          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1320 $as_echo X"$as_myself" |
1321     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1322             s//\1/
1323             q
1324           }
1325           /^X\(\/\/\)[^/].*/{
1326             s//\1/
1327             q
1328           }
1329           /^X\(\/\/\)$/{
1330             s//\1/
1331             q
1332           }
1333           /^X\(\/\).*/{
1334             s//\1/
1335             q
1336           }
1337           s/.*/./; q'`
1338   srcdir=$ac_confdir
1339   if test ! -r "$srcdir/$ac_unique_file"; then
1340     srcdir=..
1341   fi
1342 else
1343   ac_srcdir_defaulted=no
1344 fi
1345 if test ! -r "$srcdir/$ac_unique_file"; then
1346   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1347   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1348 fi
1349 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1350 ac_abs_confdir=`(
1351         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1352         pwd)`
1353 # When building in place, set srcdir=.
1354 if test "$ac_abs_confdir" = "$ac_pwd"; then
1355   srcdir=.
1356 fi
1357 # Remove unnecessary trailing slashes from srcdir.
1358 # Double slashes in file names in object file debugging info
1359 # mess up M-x gdb in Emacs.
1360 case $srcdir in
1361 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1362 esac
1363 for ac_var in $ac_precious_vars; do
1364   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1365   eval ac_env_${ac_var}_value=\$${ac_var}
1366   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1367   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1368 done
1369
1370 #
1371 # Report the --help message.
1372 #
1373 if test "$ac_init_help" = "long"; then
1374   # Omit some internal or obsolete options to make the list less imposing.
1375   # This message is too long to be a string in the A/UX 3.1 sh.
1376   cat <<_ACEOF
1377 \`configure' configures this package to adapt to many kinds of systems.
1378
1379 Usage: $0 [OPTION]... [VAR=VALUE]...
1380
1381 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1382 VAR=VALUE.  See below for descriptions of some of the useful variables.
1383
1384 Defaults for the options are specified in brackets.
1385
1386
1387 Configuration:
1388
1389   -h, --help              display this help and exit
1390       --help=short        display options specific to this package
1391       --help=recursive    display the short help of all the included packages
1392   -V, --version           display version information and exit
1393   -q, --quiet, --silent   do not print \`checking ...' messages
1394       --cache-file=FILE   cache test results in FILE [disabled]
1395   -C, --config-cache      alias for \`--cache-file=config.cache'
1396   -n, --no-create         do not create output files
1397       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1398
1399 Installation directories:
1400   --prefix=PREFIX         install architecture-independent files in PREFIX
1401                           [$ac_default_prefix]
1402   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1403                           [PREFIX]
1404
1405 By default, \`make install' will install all the files in
1406 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1407 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1408 for instance \`--prefix=\$HOME'.
1409
1410 For better control, use the options below.
1411
1412 Fine tuning of the installation directories:
1413   --bindir=DIR            user executables [EPREFIX/bin]
1414   --libexecdir=DIR        program executables [EPREFIX/libexec]
1415   --libdir=DIR            object code libraries [EPREFIX/lib]
1416   --includedir=DIR        C header files [PREFIX/include]
1417   --x-includes=DIR        X include files are in DIR
1418   --x-libraries=DIR       X library files are in DIR
1419   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1420   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1421   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1422   --mandir=DIR            man documentation [DATAROOTDIR/man]
1423   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1424   --htmldir=DIR           html documentation [DOCDIR]
1425   --dvidir=DIR            dvi documentation [DOCDIR]
1426   --pdfdir=DIR            pdf documentation [DOCDIR]
1427   --psdir=DIR             ps documentation [DOCDIR]
1428 _ACEOF
1429
1430   cat <<\_ACEOF
1431
1432 X features:
1433   --x-includes=DIR    X include files are in DIR
1434   --x-libraries=DIR   X library files are in DIR
1435
1436 System types:
1437   --build=BUILD     configure for building on BUILD [guessed]
1438   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1439 _ACEOF
1440 fi
1441
1442 if test -n "$ac_init_help"; then
1443
1444   cat <<\_ACEOF
1445
1446 Optional Features:
1447   --disable-option-checking  ignore unrecognized --enable/--with options
1448   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1449   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1450   --disable-largefile     omit support for large files
1451
1452 Screen locking options:
1453   --enable-locking        Compile in support for locking the display.
1454   --disable-locking       Do not allow locking at all.
1455
1456   --enable-root-passwd        Allow root passwd to unlock screen.
1457   --disable-root-passwd       Do not allow that.
1458   --enable-pam-check-account-type
1459                           Whether PAM should check the result of account
1460                           modules when authenticating. Only do this if you
1461                           have account configured properly on your system.
1462
1463 Optional Packages:
1464   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1465   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1466
1467   --with-pthread          Enables POSIX threads, for SMP support.
1468
1469 Installation options:
1470   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1471                           Default: `PREFIX/libexec/xscreensaver/'
1472   --with-configdir=DIR    Where to install the data files that describe each
1473                           of the display modes to the GUI.
1474                           Default: `PREFIX/share/xscreensaver/config/'
1475   --with-x-app-defaults=DIR
1476                            Where to install xscreensaver configuration file.
1477
1478   --with-dpms-ext         Include support for the DPMS extension.
1479   --with-xinerama-ext     Include support for the XINERAMA extension.
1480   --with-xinput-ext       Include support for the XInput extension.
1481   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1482   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1483   --with-randr-ext        Include support for the X Resize+Rotate extension.
1484   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1485                           file to notice keyboard activity.
1486   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1487   --with-pam-service-name NAME arg is the name of the PAM service that
1488                           xscreensaver will authenticate as.
1489   --with-kerberos         Include support for Kerberos authentication.
1490   --with-shadow           Include support for shadow password authentication.
1491   --with-passwd-helper    Include support for an external password
1492                           verification helper program.
1493   --with-login-manager    Put a "New Login" button on the unlock dialog that
1494                           runs a login manager like gdmflexiserver or kdmctl.
1495
1496 User interface options:
1497
1498   --with-gtk              Use the Gtk toolkit for the user interface.
1499   --with-motif            Use the Motif toolkit for the user interface
1500                           (no longer supported.)
1501
1502 Graphics options:
1503
1504   --with-gl               Build those demos which depend on OpenGL.
1505   --with-gle              Build those demos which depend on GLE
1506                           (the OpenGL "extrusion" library.)
1507   --with-gles             Target OpenGL ES 1.x API instead of OpenGL 1.3.
1508   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1509                           demos, which will make it possible for them to read
1510                           GIF, JPEG, and PNG files as well.
1511   --with-xpm              Include support for XPM files in some demos.
1512                           (Not needed if Pixbuf is used.)
1513   --with-jpeg             Include support for the JPEG library.
1514   --with-xshm-ext         Include support for the Shared Memory extension.
1515   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1516   --with-readdisplay      Include support for the XReadDisplay extension.
1517   --with-image-directory  Arg is the default directory from which some demos
1518                           will choose random images to display.
1519   --with-text-file=FILE   By default, some demos may display this file.
1520   --with-browser=BROWSER  Specify the web browser used to show the help URL.
1521   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1522                           (which is needed in order to ping other hosts.)
1523
1524
1525 Some influential environment variables:
1526   CC          C compiler command
1527   CFLAGS      C compiler flags
1528   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1529               nonstandard directory <lib dir>
1530   LIBS        libraries to pass to the linker, e.g. -l<library>
1531   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1532               you have headers in a nonstandard directory <include dir>
1533   CPP         C preprocessor
1534   XMKMF       Path to xmkmf, Makefile generator for X Window System
1535
1536 Use these variables to override the choices made by `configure' or to help
1537 it to find libraries and programs with nonstandard names/locations.
1538
1539 Report bugs to the package provider.
1540 _ACEOF
1541 ac_status=$?
1542 fi
1543
1544 if test "$ac_init_help" = "recursive"; then
1545   # If there are subdirs, report their specific --help.
1546   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1547     test -d "$ac_dir" ||
1548       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1549       continue
1550     ac_builddir=.
1551
1552 case "$ac_dir" in
1553 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1554 *)
1555   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1556   # A ".." for each directory in $ac_dir_suffix.
1557   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1558   case $ac_top_builddir_sub in
1559   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1560   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1561   esac ;;
1562 esac
1563 ac_abs_top_builddir=$ac_pwd
1564 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1565 # for backward compatibility:
1566 ac_top_builddir=$ac_top_build_prefix
1567
1568 case $srcdir in
1569   .)  # We are building in place.
1570     ac_srcdir=.
1571     ac_top_srcdir=$ac_top_builddir_sub
1572     ac_abs_top_srcdir=$ac_pwd ;;
1573   [\\/]* | ?:[\\/]* )  # Absolute name.
1574     ac_srcdir=$srcdir$ac_dir_suffix;
1575     ac_top_srcdir=$srcdir
1576     ac_abs_top_srcdir=$srcdir ;;
1577   *) # Relative name.
1578     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1579     ac_top_srcdir=$ac_top_build_prefix$srcdir
1580     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1581 esac
1582 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1583
1584     cd "$ac_dir" || { ac_status=$?; continue; }
1585     # Check for guested configure.
1586     if test -f "$ac_srcdir/configure.gnu"; then
1587       echo &&
1588       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1589     elif test -f "$ac_srcdir/configure"; then
1590       echo &&
1591       $SHELL "$ac_srcdir/configure" --help=recursive
1592     else
1593       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1594     fi || ac_status=$?
1595     cd "$ac_pwd" || { ac_status=$?; break; }
1596   done
1597 fi
1598
1599 test -n "$ac_init_help" && exit $ac_status
1600 if $ac_init_version; then
1601   cat <<\_ACEOF
1602 configure
1603 generated by GNU Autoconf 2.69
1604
1605 Copyright (C) 2012 Free Software Foundation, Inc.
1606 This configure script is free software; the Free Software Foundation
1607 gives unlimited permission to copy, distribute and modify it.
1608 _ACEOF
1609   exit
1610 fi
1611
1612 ## ------------------------ ##
1613 ## Autoconf initialization. ##
1614 ## ------------------------ ##
1615
1616 # ac_fn_c_try_compile LINENO
1617 # --------------------------
1618 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1619 ac_fn_c_try_compile ()
1620 {
1621   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1622   rm -rf conftest.$ac_objext
1623   if { { ac_try="$ac_compile"
1624 case "(($ac_try" in
1625   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1626   *) ac_try_echo=$ac_try;;
1627 esac
1628 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1629 $as_echo "$ac_try_echo"; } >&5
1630   (eval "$ac_compile") 2>conftest.err
1631   ac_status=$?
1632   if test -s conftest.err; then
1633     grep -v '^ *+' conftest.err >conftest.er1
1634     cat conftest.er1 >&5
1635     mv -f conftest.er1 conftest.err
1636   fi
1637   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1638   test $ac_status = 0; } && {
1639          test -z "$ac_c_werror_flag" ||
1640          test ! -s conftest.err
1641        } && test -s conftest.$ac_objext; then :
1642   ac_retval=0
1643 else
1644   $as_echo "$as_me: failed program was:" >&5
1645 sed 's/^/| /' conftest.$ac_ext >&5
1646
1647         ac_retval=1
1648 fi
1649   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1650   as_fn_set_status $ac_retval
1651
1652 } # ac_fn_c_try_compile
1653
1654 # ac_fn_c_try_link LINENO
1655 # -----------------------
1656 # Try to link conftest.$ac_ext, and return whether this succeeded.
1657 ac_fn_c_try_link ()
1658 {
1659   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1660   rm -rf conftest.$ac_objext conftest$ac_exeext
1661   if { { ac_try="$ac_link"
1662 case "(($ac_try" in
1663   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1664   *) ac_try_echo=$ac_try;;
1665 esac
1666 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1667 $as_echo "$ac_try_echo"; } >&5
1668   (eval "$ac_link") 2>conftest.err
1669   ac_status=$?
1670   if test -s conftest.err; then
1671     grep -v '^ *+' conftest.err >conftest.er1
1672     cat conftest.er1 >&5
1673     mv -f conftest.er1 conftest.err
1674   fi
1675   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1676   test $ac_status = 0; } && {
1677          test -z "$ac_c_werror_flag" ||
1678          test ! -s conftest.err
1679        } && test -s conftest$ac_exeext && {
1680          test "$cross_compiling" = yes ||
1681          test -x conftest$ac_exeext
1682        }; then :
1683   ac_retval=0
1684 else
1685   $as_echo "$as_me: failed program was:" >&5
1686 sed 's/^/| /' conftest.$ac_ext >&5
1687
1688         ac_retval=1
1689 fi
1690   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1691   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1692   # interfere with the next link command; also delete a directory that is
1693   # left behind by Apple's compiler.  We do this before executing the actions.
1694   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1695   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1696   as_fn_set_status $ac_retval
1697
1698 } # ac_fn_c_try_link
1699
1700 # ac_fn_c_try_run LINENO
1701 # ----------------------
1702 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1703 # that executables *can* be run.
1704 ac_fn_c_try_run ()
1705 {
1706   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1707   if { { ac_try="$ac_link"
1708 case "(($ac_try" in
1709   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1710   *) ac_try_echo=$ac_try;;
1711 esac
1712 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1713 $as_echo "$ac_try_echo"; } >&5
1714   (eval "$ac_link") 2>&5
1715   ac_status=$?
1716   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1717   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1718   { { case "(($ac_try" in
1719   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1720   *) ac_try_echo=$ac_try;;
1721 esac
1722 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1723 $as_echo "$ac_try_echo"; } >&5
1724   (eval "$ac_try") 2>&5
1725   ac_status=$?
1726   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1727   test $ac_status = 0; }; }; then :
1728   ac_retval=0
1729 else
1730   $as_echo "$as_me: program exited with status $ac_status" >&5
1731        $as_echo "$as_me: failed program was:" >&5
1732 sed 's/^/| /' conftest.$ac_ext >&5
1733
1734        ac_retval=$ac_status
1735 fi
1736   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1737   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1738   as_fn_set_status $ac_retval
1739
1740 } # ac_fn_c_try_run
1741
1742 # ac_fn_c_try_cpp LINENO
1743 # ----------------------
1744 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1745 ac_fn_c_try_cpp ()
1746 {
1747   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1748   if { { ac_try="$ac_cpp conftest.$ac_ext"
1749 case "(($ac_try" in
1750   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1751   *) ac_try_echo=$ac_try;;
1752 esac
1753 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1754 $as_echo "$ac_try_echo"; } >&5
1755   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1756   ac_status=$?
1757   if test -s conftest.err; then
1758     grep -v '^ *+' conftest.err >conftest.er1
1759     cat conftest.er1 >&5
1760     mv -f conftest.er1 conftest.err
1761   fi
1762   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1763   test $ac_status = 0; } > conftest.i && {
1764          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1765          test ! -s conftest.err
1766        }; then :
1767   ac_retval=0
1768 else
1769   $as_echo "$as_me: failed program was:" >&5
1770 sed 's/^/| /' conftest.$ac_ext >&5
1771
1772     ac_retval=1
1773 fi
1774   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1775   as_fn_set_status $ac_retval
1776
1777 } # ac_fn_c_try_cpp
1778
1779 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1780 # -------------------------------------------------------
1781 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1782 # the include files in INCLUDES and setting the cache variable VAR
1783 # accordingly.
1784 ac_fn_c_check_header_mongrel ()
1785 {
1786   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1787   if eval \${$3+:} false; then :
1788   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1789 $as_echo_n "checking for $2... " >&6; }
1790 if eval \${$3+:} false; then :
1791   $as_echo_n "(cached) " >&6
1792 fi
1793 eval ac_res=\$$3
1794                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1795 $as_echo "$ac_res" >&6; }
1796 else
1797   # Is the header compilable?
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1799 $as_echo_n "checking $2 usability... " >&6; }
1800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1801 /* end confdefs.h.  */
1802 $4
1803 #include <$2>
1804 _ACEOF
1805 if ac_fn_c_try_compile "$LINENO"; then :
1806   ac_header_compiler=yes
1807 else
1808   ac_header_compiler=no
1809 fi
1810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1812 $as_echo "$ac_header_compiler" >&6; }
1813
1814 # Is the header present?
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1816 $as_echo_n "checking $2 presence... " >&6; }
1817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1818 /* end confdefs.h.  */
1819 #include <$2>
1820 _ACEOF
1821 if ac_fn_c_try_cpp "$LINENO"; then :
1822   ac_header_preproc=yes
1823 else
1824   ac_header_preproc=no
1825 fi
1826 rm -rf conftest.err conftest.i conftest.$ac_ext
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1828 $as_echo "$ac_header_preproc" >&6; }
1829
1830 # So?  What about this header?
1831 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1832   yes:no: )
1833     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1834 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1835     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1836 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1837     ;;
1838   no:yes:* )
1839     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1840 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1841     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1842 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1843     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1844 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1845     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1846 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1847     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1848 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1849     ;;
1850 esac
1851   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1852 $as_echo_n "checking for $2... " >&6; }
1853 if eval \${$3+:} false; then :
1854   $as_echo_n "(cached) " >&6
1855 else
1856   eval "$3=\$ac_header_compiler"
1857 fi
1858 eval ac_res=\$$3
1859                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860 $as_echo "$ac_res" >&6; }
1861 fi
1862   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1863
1864 } # ac_fn_c_check_header_mongrel
1865
1866 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1867 # -------------------------------------------------------
1868 # Tests whether HEADER exists and can be compiled using the include files in
1869 # INCLUDES, setting the cache variable VAR accordingly.
1870 ac_fn_c_check_header_compile ()
1871 {
1872   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1874 $as_echo_n "checking for $2... " >&6; }
1875 if eval \${$3+:} false; then :
1876   $as_echo_n "(cached) " >&6
1877 else
1878   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879 /* end confdefs.h.  */
1880 $4
1881 #include <$2>
1882 _ACEOF
1883 if ac_fn_c_try_compile "$LINENO"; then :
1884   eval "$3=yes"
1885 else
1886   eval "$3=no"
1887 fi
1888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1889 fi
1890 eval ac_res=\$$3
1891                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1892 $as_echo "$ac_res" >&6; }
1893   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1894
1895 } # ac_fn_c_check_header_compile
1896
1897 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1898 # -------------------------------------------
1899 # Tests whether TYPE exists after having included INCLUDES, setting cache
1900 # variable VAR accordingly.
1901 ac_fn_c_check_type ()
1902 {
1903   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1905 $as_echo_n "checking for $2... " >&6; }
1906 if eval \${$3+:} false; then :
1907   $as_echo_n "(cached) " >&6
1908 else
1909   eval "$3=no"
1910   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1911 /* end confdefs.h.  */
1912 $4
1913 int
1914 main ()
1915 {
1916 if (sizeof ($2))
1917          return 0;
1918   ;
1919   return 0;
1920 }
1921 _ACEOF
1922 if ac_fn_c_try_compile "$LINENO"; then :
1923   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924 /* end confdefs.h.  */
1925 $4
1926 int
1927 main ()
1928 {
1929 if (sizeof (($2)))
1930             return 0;
1931   ;
1932   return 0;
1933 }
1934 _ACEOF
1935 if ac_fn_c_try_compile "$LINENO"; then :
1936
1937 else
1938   eval "$3=yes"
1939 fi
1940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1941 fi
1942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1943 fi
1944 eval ac_res=\$$3
1945                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1946 $as_echo "$ac_res" >&6; }
1947   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1948
1949 } # ac_fn_c_check_type
1950
1951 # ac_fn_c_check_func LINENO FUNC VAR
1952 # ----------------------------------
1953 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1954 ac_fn_c_check_func ()
1955 {
1956   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1957   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1958 $as_echo_n "checking for $2... " >&6; }
1959 if eval \${$3+:} false; then :
1960   $as_echo_n "(cached) " >&6
1961 else
1962   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1963 /* end confdefs.h.  */
1964 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1965    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1966 #define $2 innocuous_$2
1967
1968 /* System header to define __stub macros and hopefully few prototypes,
1969     which can conflict with char $2 (); below.
1970     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1971     <limits.h> exists even on freestanding compilers.  */
1972
1973 #ifdef __STDC__
1974 # include <limits.h>
1975 #else
1976 # include <assert.h>
1977 #endif
1978
1979 #undef $2
1980
1981 /* Override any GCC internal prototype to avoid an error.
1982    Use char because int might match the return type of a GCC
1983    builtin and then its argument prototype would still apply.  */
1984 #ifdef __cplusplus
1985 extern "C"
1986 #endif
1987 char $2 ();
1988 /* The GNU C library defines this for functions which it implements
1989     to always fail with ENOSYS.  Some functions are actually named
1990     something starting with __ and the normal name is an alias.  */
1991 #if defined __stub_$2 || defined __stub___$2
1992 choke me
1993 #endif
1994
1995 int
1996 main ()
1997 {
1998 return $2 ();
1999   ;
2000   return 0;
2001 }
2002 _ACEOF
2003 if ac_fn_c_try_link "$LINENO"; then :
2004   eval "$3=yes"
2005 else
2006   eval "$3=no"
2007 fi
2008 rm -f core conftest.err conftest.$ac_objext \
2009     conftest$ac_exeext conftest.$ac_ext
2010 fi
2011 eval ac_res=\$$3
2012                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2013 $as_echo "$ac_res" >&6; }
2014   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2015
2016 } # ac_fn_c_check_func
2017 cat >config.log <<_ACEOF
2018 This file contains any messages produced by compilers while
2019 running configure, to aid debugging if configure makes a mistake.
2020
2021 It was created by $as_me, which was
2022 generated by GNU Autoconf 2.69.  Invocation command line was
2023
2024   $ $0 $@
2025
2026 _ACEOF
2027 exec 5>>config.log
2028 {
2029 cat <<_ASUNAME
2030 ## --------- ##
2031 ## Platform. ##
2032 ## --------- ##
2033
2034 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2035 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2036 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2037 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2038 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2039
2040 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2041 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2042
2043 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2044 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2045 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2046 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2047 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2048 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2049 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2050
2051 _ASUNAME
2052
2053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2054 for as_dir in $PATH
2055 do
2056   IFS=$as_save_IFS
2057   test -z "$as_dir" && as_dir=.
2058     $as_echo "PATH: $as_dir"
2059   done
2060 IFS=$as_save_IFS
2061
2062 } >&5
2063
2064 cat >&5 <<_ACEOF
2065
2066
2067 ## ----------- ##
2068 ## Core tests. ##
2069 ## ----------- ##
2070
2071 _ACEOF
2072
2073
2074 # Keep a trace of the command line.
2075 # Strip out --no-create and --no-recursion so they do not pile up.
2076 # Strip out --silent because we don't want to record it for future runs.
2077 # Also quote any args containing shell meta-characters.
2078 # Make two passes to allow for proper duplicate-argument suppression.
2079 ac_configure_args=
2080 ac_configure_args0=
2081 ac_configure_args1=
2082 ac_must_keep_next=false
2083 for ac_pass in 1 2
2084 do
2085   for ac_arg
2086   do
2087     case $ac_arg in
2088     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2089     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2090     | -silent | --silent | --silen | --sile | --sil)
2091       continue ;;
2092     *\'*)
2093       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2094     esac
2095     case $ac_pass in
2096     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2097     2)
2098       as_fn_append ac_configure_args1 " '$ac_arg'"
2099       if test $ac_must_keep_next = true; then
2100         ac_must_keep_next=false # Got value, back to normal.
2101       else
2102         case $ac_arg in
2103           *=* | --config-cache | -C | -disable-* | --disable-* \
2104           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2105           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2106           | -with-* | --with-* | -without-* | --without-* | --x)
2107             case "$ac_configure_args0 " in
2108               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2109             esac
2110             ;;
2111           -* ) ac_must_keep_next=true ;;
2112         esac
2113       fi
2114       as_fn_append ac_configure_args " '$ac_arg'"
2115       ;;
2116     esac
2117   done
2118 done
2119 { ac_configure_args0=; unset ac_configure_args0;}
2120 { ac_configure_args1=; unset ac_configure_args1;}
2121
2122 # When interrupted or exit'd, cleanup temporary files, and complete
2123 # config.log.  We remove comments because anyway the quotes in there
2124 # would cause problems or look ugly.
2125 # WARNING: Use '\'' to represent an apostrophe within the trap.
2126 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2127 trap 'exit_status=$?
2128   # Save into config.log some information that might help in debugging.
2129   {
2130     echo
2131
2132     $as_echo "## ---------------- ##
2133 ## Cache variables. ##
2134 ## ---------------- ##"
2135     echo
2136     # The following way of writing the cache mishandles newlines in values,
2137 (
2138   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2139     eval ac_val=\$$ac_var
2140     case $ac_val in #(
2141     *${as_nl}*)
2142       case $ac_var in #(
2143       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2144 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2145       esac
2146       case $ac_var in #(
2147       _ | IFS | as_nl) ;; #(
2148       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2149       *) { eval $ac_var=; unset $ac_var;} ;;
2150       esac ;;
2151     esac
2152   done
2153   (set) 2>&1 |
2154     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2155     *${as_nl}ac_space=\ *)
2156       sed -n \
2157         "s/'\''/'\''\\\\'\'''\''/g;
2158           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2159       ;; #(
2160     *)
2161       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2162       ;;
2163     esac |
2164     sort
2165 )
2166     echo
2167
2168     $as_echo "## ----------------- ##
2169 ## Output variables. ##
2170 ## ----------------- ##"
2171     echo
2172     for ac_var in $ac_subst_vars
2173     do
2174       eval ac_val=\$$ac_var
2175       case $ac_val in
2176       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2177       esac
2178       $as_echo "$ac_var='\''$ac_val'\''"
2179     done | sort
2180     echo
2181
2182     if test -n "$ac_subst_files"; then
2183       $as_echo "## ------------------- ##
2184 ## File substitutions. ##
2185 ## ------------------- ##"
2186       echo
2187       for ac_var in $ac_subst_files
2188       do
2189         eval ac_val=\$$ac_var
2190         case $ac_val in
2191         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2192         esac
2193         $as_echo "$ac_var='\''$ac_val'\''"
2194       done | sort
2195       echo
2196     fi
2197
2198     if test -s confdefs.h; then
2199       $as_echo "## ----------- ##
2200 ## confdefs.h. ##
2201 ## ----------- ##"
2202       echo
2203       cat confdefs.h
2204       echo
2205     fi
2206     test "$ac_signal" != 0 &&
2207       $as_echo "$as_me: caught signal $ac_signal"
2208     $as_echo "$as_me: exit $exit_status"
2209   } >&5
2210   rm -f core *.core core.conftest.* &&
2211     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2212     exit $exit_status
2213 ' 0
2214 for ac_signal in 1 2 13 15; do
2215   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2216 done
2217 ac_signal=0
2218
2219 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2220 rm -f -r conftest* confdefs.h
2221
2222 $as_echo "/* confdefs.h */" > confdefs.h
2223
2224 # Predefined preprocessor variables.
2225
2226 cat >>confdefs.h <<_ACEOF
2227 #define PACKAGE_NAME "$PACKAGE_NAME"
2228 _ACEOF
2229
2230 cat >>confdefs.h <<_ACEOF
2231 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2232 _ACEOF
2233
2234 cat >>confdefs.h <<_ACEOF
2235 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2236 _ACEOF
2237
2238 cat >>confdefs.h <<_ACEOF
2239 #define PACKAGE_STRING "$PACKAGE_STRING"
2240 _ACEOF
2241
2242 cat >>confdefs.h <<_ACEOF
2243 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2244 _ACEOF
2245
2246 cat >>confdefs.h <<_ACEOF
2247 #define PACKAGE_URL "$PACKAGE_URL"
2248 _ACEOF
2249
2250
2251 # Let the site file select an alternate cache file if it wants to.
2252 # Prefer an explicitly selected file to automatically selected ones.
2253 ac_site_file1=NONE
2254 ac_site_file2=NONE
2255 if test -n "$CONFIG_SITE"; then
2256   # We do not want a PATH search for config.site.
2257   case $CONFIG_SITE in #((
2258     -*)  ac_site_file1=./$CONFIG_SITE;;
2259     */*) ac_site_file1=$CONFIG_SITE;;
2260     *)   ac_site_file1=./$CONFIG_SITE;;
2261   esac
2262 elif test "x$prefix" != xNONE; then
2263   ac_site_file1=$prefix/share/config.site
2264   ac_site_file2=$prefix/etc/config.site
2265 else
2266   ac_site_file1=$ac_default_prefix/share/config.site
2267   ac_site_file2=$ac_default_prefix/etc/config.site
2268 fi
2269 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2270 do
2271   test "x$ac_site_file" = xNONE && continue
2272   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2273     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2274 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2275     sed 's/^/| /' "$ac_site_file" >&5
2276     . "$ac_site_file" \
2277       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2278 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2279 as_fn_error $? "failed to load site script $ac_site_file
2280 See \`config.log' for more details" "$LINENO" 5; }
2281   fi
2282 done
2283
2284 if test -r "$cache_file"; then
2285   # Some versions of bash will fail to source /dev/null (special files
2286   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2287   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2288     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2289 $as_echo "$as_me: loading cache $cache_file" >&6;}
2290     case $cache_file in
2291       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2292       *)                      . "./$cache_file";;
2293     esac
2294   fi
2295 else
2296   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2297 $as_echo "$as_me: creating cache $cache_file" >&6;}
2298   >$cache_file
2299 fi
2300
2301 as_fn_append ac_header_list " stdlib.h"
2302 as_fn_append ac_header_list " unistd.h"
2303 as_fn_append ac_header_list " sys/param.h"
2304 # Check that the precious variables saved in the cache have kept the same
2305 # value.
2306 ac_cache_corrupted=false
2307 for ac_var in $ac_precious_vars; do
2308   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2309   eval ac_new_set=\$ac_env_${ac_var}_set
2310   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2311   eval ac_new_val=\$ac_env_${ac_var}_value
2312   case $ac_old_set,$ac_new_set in
2313     set,)
2314       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2315 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2316       ac_cache_corrupted=: ;;
2317     ,set)
2318       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2319 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2320       ac_cache_corrupted=: ;;
2321     ,);;
2322     *)
2323       if test "x$ac_old_val" != "x$ac_new_val"; then
2324         # differences in whitespace do not lead to failure.
2325         ac_old_val_w=`echo x $ac_old_val`
2326         ac_new_val_w=`echo x $ac_new_val`
2327         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2328           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2329 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2330           ac_cache_corrupted=:
2331         else
2332           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2333 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2334           eval $ac_var=\$ac_old_val
2335         fi
2336         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2337 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2338         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2339 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2340       fi;;
2341   esac
2342   # Pass precious variables to config.status.
2343   if test "$ac_new_set" = set; then
2344     case $ac_new_val in
2345     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2346     *) ac_arg=$ac_var=$ac_new_val ;;
2347     esac
2348     case " $ac_configure_args " in
2349       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2350       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2351     esac
2352   fi
2353 done
2354 if $ac_cache_corrupted; then
2355   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2356 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2357   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2358 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2359   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2360 fi
2361 ## -------------------- ##
2362 ## Main body of script. ##
2363 ## -------------------- ##
2364
2365 ac_ext=c
2366 ac_cpp='$CPP $CPPFLAGS'
2367 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2368 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2369 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2370
2371
2372 ac_config_headers="$ac_config_headers config.h"
2373
2374
2375 echo "current directory: `pwd`"
2376 echo "command line was: $0 $@"
2377
2378 ###############################################################################
2379 #
2380 #       Autoheader stuff
2381 #
2382 ###############################################################################
2383
2384
2385
2386
2387
2388
2389
2390 # This only ever existed in X11R4 and X11R5.
2391 #AH_TEMPLATE([HAVE_XIDLE_EXTENSION],
2392 #           [Define this if you have the XIDLE extension installed. If you
2393 #           have the XIDLE extension, this is recommended.  (You have this
2394 #           extension if the file /usr/include/X11/extensions/xidle.h
2395 #           exists.) Turning on this flag lets XScreenSaver work better with
2396 #           servers which support this extension; but it will still work
2397 #           with servers which do not suport it, so it's a good idea to
2398 #           compile in support for it if you can.])
2399
2400 # Using this extension will crash your X server and make fading not work.
2401 #AH_TEMPLATE([HAVE_MIT_SAVER_EXTENSION],
2402 #           [Define this if you have the MIT-SCREEN-SAVER extension
2403 #            installed.  See the caveats about this extension, above.
2404 #            (It's available if /usr/include/X11/extensions/scrnsaver.h
2405 #            exists.)])
2406
2407 # This only ever existed on SGI hardware.
2408 #AH_TEMPLATE([HAVE_SGI_SAVER_EXTENSION],
2409 #           [Define this if you have the SGI SCREEN_SAVER extension.  This is
2410 #           standard on Irix systems, and not available elsewhere.])
2411
2412 # This only ever existed on SGI hardware.
2413 #AH_TEMPLATE([HAVE_SGI_VC_EXTENSION],
2414 #           [Define this if you have the SGI-VIDEO-CONTROL extension.  This
2415 #           is standard on Irix systems, and not available elsewhere.])
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530 # After checking to see that --srcdir is correct (which AC_INIT does)
2531 # check for some random other files that come later in the tar file,
2532 # to make sure everything is here.
2533 #
2534 for d in driver utils hacks hacks/glx ; do
2535   f=$srcdir/$d/Makefile.in
2536   if test \! -r $f ; then
2537     echo ""
2538     echo "ERROR: The package is incomplete: $f does not exist."
2539     echo "       This probably means that your download was truncated."
2540     echo ""
2541     exit 1
2542   fi
2543 done
2544
2545 ###############################################################################
2546 #
2547 #       Query AX_PTHREAD, and figure out which compiler gets used.
2548 #
2549 ###############################################################################
2550
2551
2552
2553
2554 ###############################################################################
2555 #
2556 #       Function to figure out how to run the compiler.
2557 #
2558 ###############################################################################
2559
2560
2561
2562
2563 ###############################################################################
2564 #
2565 #       Check for availability of various gcc command-line options.
2566 #
2567 ###############################################################################
2568
2569
2570
2571
2572
2573
2574
2575 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2576 # around an Apple-specific gcc bug.
2577 #
2578
2579
2580 ###############################################################################
2581 #
2582 #       Function to figure out how to disable // comments in ANSI C code.
2583 #
2584 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2585 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2586 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2587 #       so much for compatibility!)
2588 #
2589 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2590 #       declarations preceed statements, without resorting to "-pedantic".
2591 #       This means that there is no way to get gcc3 to issue warnings that
2592 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2593 #       also drowning in totally useless warnings.  Thank you master may I
2594 #       have another.
2595 #
2596 #       So, I give up, let's just use -pedantic.
2597 #
2598 ###############################################################################
2599
2600
2601
2602
2603
2604
2605 ###############################################################################
2606 #
2607 #       Function to figure out how to create directory trees.
2608 #
2609 ###############################################################################
2610
2611
2612
2613
2614 ###############################################################################
2615 #
2616 #       Function to check whether gettimeofday() exists, and how to call it.
2617 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2618 #
2619 ###############################################################################
2620
2621
2622
2623
2624 ###############################################################################
2625 #
2626 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2627 #
2628 ###############################################################################
2629
2630 # M4 sucks!!  perl sucks too!!
2631
2632 perl_version_cmd='print $]'
2633
2634
2635
2636
2637
2638 ###############################################################################
2639 #
2640 #       Function to demand "bc".  Losers.
2641 #
2642 ###############################################################################
2643
2644
2645
2646 ###############################################################################
2647 #
2648 #       Functions to check how to do ICMP PING requests.
2649 #
2650 ###############################################################################
2651
2652
2653
2654
2655
2656
2657 ###############################################################################
2658 #
2659 #       Functions to check for various X11 crap.
2660 #
2661 ###############################################################################
2662
2663 # Try and find the app-defaults directory.
2664 # It sucks that autoconf doesn't do this already...
2665 #
2666
2667
2668 ###############################################################################
2669 #
2670 #       Handle the --with-x-app-defaults option HERE
2671 #
2672 ###############################################################################
2673
2674
2675 # Check whether --with-x-app-defaults was given.
2676 if test "${with_x_app_defaults+set}" = set; then :
2677   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2678 else
2679   eval ac_x_app_defaults="$withval"
2680 fi
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692 # Random special-cases for X on certain pathological OSes.
2693 # You know who you are.
2694 #
2695
2696
2697
2698
2699
2700 ###############################################################################
2701 #
2702 #       Some utility functions to make checking for X things easier.
2703 #
2704 ###############################################################################
2705
2706 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2707 #
2708
2709
2710 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2711 #
2712
2713
2714 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2715 #
2716
2717
2718
2719 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2720 # Use this sparingly; it probably doesn't work very well on X programs.
2721 #
2722
2723
2724 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2725 # (But not the -L directories!)
2726 #
2727
2728
2729
2730
2731 # Usage: HANDLE_X_PATH_ARG([variable_name],
2732 #                          [--command-line-option],
2733 #                          [descriptive string])
2734 #
2735 # All of the --with options take three forms:
2736 #
2737 #   --with-foo (or --with-foo=yes)
2738 #   --without-foo (or --with-foo=no)
2739 #   --with-foo=/DIR
2740 #
2741 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2742 # a directory (string beginning with a slash) it checks to see whether
2743 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2744 # as appropriate.
2745 #
2746
2747
2748
2749
2750 ###############################################################################
2751 ###############################################################################
2752 #
2753 #       End of function definitions.  Now start actually executing stuff.
2754 #
2755 ###############################################################################
2756 ###############################################################################
2757
2758 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2759 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2760 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2761
2762
2763 # random compiler setup
2764 ac_aux_dir=
2765 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2766   if test -f "$ac_dir/install-sh"; then
2767     ac_aux_dir=$ac_dir
2768     ac_install_sh="$ac_aux_dir/install-sh -c"
2769     break
2770   elif test -f "$ac_dir/install.sh"; then
2771     ac_aux_dir=$ac_dir
2772     ac_install_sh="$ac_aux_dir/install.sh -c"
2773     break
2774   elif test -f "$ac_dir/shtool"; then
2775     ac_aux_dir=$ac_dir
2776     ac_install_sh="$ac_aux_dir/shtool install -c"
2777     break
2778   fi
2779 done
2780 if test -z "$ac_aux_dir"; then
2781   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2782 fi
2783
2784 # These three variables are undocumented and unsupported,
2785 # and are intended to be withdrawn in a future Autoconf release.
2786 # They can cause serious problems if a builder's source tree is in a directory
2787 # whose full name contains unusual characters.
2788 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2789 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2790 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2791
2792
2793 # Make sure we can run config.sub.
2794 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2795   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2796
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2798 $as_echo_n "checking build system type... " >&6; }
2799 if ${ac_cv_build+:} false; then :
2800   $as_echo_n "(cached) " >&6
2801 else
2802   ac_build_alias=$build_alias
2803 test "x$ac_build_alias" = x &&
2804   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2805 test "x$ac_build_alias" = x &&
2806   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2807 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2808   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2809
2810 fi
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2812 $as_echo "$ac_cv_build" >&6; }
2813 case $ac_cv_build in
2814 *-*-*) ;;
2815 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2816 esac
2817 build=$ac_cv_build
2818 ac_save_IFS=$IFS; IFS='-'
2819 set x $ac_cv_build
2820 shift
2821 build_cpu=$1
2822 build_vendor=$2
2823 shift; shift
2824 # Remember, the first character of IFS is used to create $*,
2825 # except with old shells:
2826 build_os=$*
2827 IFS=$ac_save_IFS
2828 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2829
2830
2831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2832 $as_echo_n "checking host system type... " >&6; }
2833 if ${ac_cv_host+:} false; then :
2834   $as_echo_n "(cached) " >&6
2835 else
2836   if test "x$host_alias" = x; then
2837   ac_cv_host=$ac_cv_build
2838 else
2839   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2840     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2841 fi
2842
2843 fi
2844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2845 $as_echo "$ac_cv_host" >&6; }
2846 case $ac_cv_host in
2847 *-*-*) ;;
2848 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2849 esac
2850 host=$ac_cv_host
2851 ac_save_IFS=$IFS; IFS='-'
2852 set x $ac_cv_host
2853 shift
2854 host_cpu=$1
2855 host_vendor=$2
2856 shift; shift
2857 # Remember, the first character of IFS is used to create $*,
2858 # except with old shells:
2859 host_os=$*
2860 IFS=$ac_save_IFS
2861 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2862
2863
2864
2865 ac_original_cc=$CC
2866 ac_ext=c
2867 ac_cpp='$CPP $CPPFLAGS'
2868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2871 if test -n "$ac_tool_prefix"; then
2872   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2873 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2875 $as_echo_n "checking for $ac_word... " >&6; }
2876 if ${ac_cv_prog_CC+:} false; then :
2877   $as_echo_n "(cached) " >&6
2878 else
2879   if test -n "$CC"; then
2880   ac_cv_prog_CC="$CC" # Let the user override the test.
2881 else
2882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2883 for as_dir in $PATH
2884 do
2885   IFS=$as_save_IFS
2886   test -z "$as_dir" && as_dir=.
2887     for ac_exec_ext in '' $ac_executable_extensions; do
2888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2889     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2891     break 2
2892   fi
2893 done
2894   done
2895 IFS=$as_save_IFS
2896
2897 fi
2898 fi
2899 CC=$ac_cv_prog_CC
2900 if test -n "$CC"; then
2901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2902 $as_echo "$CC" >&6; }
2903 else
2904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2905 $as_echo "no" >&6; }
2906 fi
2907
2908
2909 fi
2910 if test -z "$ac_cv_prog_CC"; then
2911   ac_ct_CC=$CC
2912   # Extract the first word of "gcc", so it can be a program name with args.
2913 set dummy gcc; ac_word=$2
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2915 $as_echo_n "checking for $ac_word... " >&6; }
2916 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2917   $as_echo_n "(cached) " >&6
2918 else
2919   if test -n "$ac_ct_CC"; then
2920   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2921 else
2922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2923 for as_dir in $PATH
2924 do
2925   IFS=$as_save_IFS
2926   test -z "$as_dir" && as_dir=.
2927     for ac_exec_ext in '' $ac_executable_extensions; do
2928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2929     ac_cv_prog_ac_ct_CC="gcc"
2930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2931     break 2
2932   fi
2933 done
2934   done
2935 IFS=$as_save_IFS
2936
2937 fi
2938 fi
2939 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2940 if test -n "$ac_ct_CC"; then
2941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2942 $as_echo "$ac_ct_CC" >&6; }
2943 else
2944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2945 $as_echo "no" >&6; }
2946 fi
2947
2948   if test "x$ac_ct_CC" = x; then
2949     CC=""
2950   else
2951     case $cross_compiling:$ac_tool_warned in
2952 yes:)
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2954 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2955 ac_tool_warned=yes ;;
2956 esac
2957     CC=$ac_ct_CC
2958   fi
2959 else
2960   CC="$ac_cv_prog_CC"
2961 fi
2962
2963 if test -z "$CC"; then
2964           if test -n "$ac_tool_prefix"; then
2965     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2966 set dummy ${ac_tool_prefix}cc; ac_word=$2
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2968 $as_echo_n "checking for $ac_word... " >&6; }
2969 if ${ac_cv_prog_CC+:} false; then :
2970   $as_echo_n "(cached) " >&6
2971 else
2972   if test -n "$CC"; then
2973   ac_cv_prog_CC="$CC" # Let the user override the test.
2974 else
2975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2976 for as_dir in $PATH
2977 do
2978   IFS=$as_save_IFS
2979   test -z "$as_dir" && as_dir=.
2980     for ac_exec_ext in '' $ac_executable_extensions; do
2981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2982     ac_cv_prog_CC="${ac_tool_prefix}cc"
2983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2984     break 2
2985   fi
2986 done
2987   done
2988 IFS=$as_save_IFS
2989
2990 fi
2991 fi
2992 CC=$ac_cv_prog_CC
2993 if test -n "$CC"; then
2994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2995 $as_echo "$CC" >&6; }
2996 else
2997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2998 $as_echo "no" >&6; }
2999 fi
3000
3001
3002   fi
3003 fi
3004 if test -z "$CC"; then
3005   # Extract the first word of "cc", so it can be a program name with args.
3006 set dummy cc; ac_word=$2
3007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3008 $as_echo_n "checking for $ac_word... " >&6; }
3009 if ${ac_cv_prog_CC+:} false; then :
3010   $as_echo_n "(cached) " >&6
3011 else
3012   if test -n "$CC"; then
3013   ac_cv_prog_CC="$CC" # Let the user override the test.
3014 else
3015   ac_prog_rejected=no
3016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3017 for as_dir in $PATH
3018 do
3019   IFS=$as_save_IFS
3020   test -z "$as_dir" && as_dir=.
3021     for ac_exec_ext in '' $ac_executable_extensions; do
3022   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3023     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3024        ac_prog_rejected=yes
3025        continue
3026      fi
3027     ac_cv_prog_CC="cc"
3028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3029     break 2
3030   fi
3031 done
3032   done
3033 IFS=$as_save_IFS
3034
3035 if test $ac_prog_rejected = yes; then
3036   # We found a bogon in the path, so make sure we never use it.
3037   set dummy $ac_cv_prog_CC
3038   shift
3039   if test $# != 0; then
3040     # We chose a different compiler from the bogus one.
3041     # However, it has the same basename, so the bogon will be chosen
3042     # first if we set CC to just the basename; use the full file name.
3043     shift
3044     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3045   fi
3046 fi
3047 fi
3048 fi
3049 CC=$ac_cv_prog_CC
3050 if test -n "$CC"; then
3051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3052 $as_echo "$CC" >&6; }
3053 else
3054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3055 $as_echo "no" >&6; }
3056 fi
3057
3058
3059 fi
3060 if test -z "$CC"; then
3061   if test -n "$ac_tool_prefix"; then
3062   for ac_prog in cl.exe
3063   do
3064     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3065 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3067 $as_echo_n "checking for $ac_word... " >&6; }
3068 if ${ac_cv_prog_CC+:} false; then :
3069   $as_echo_n "(cached) " >&6
3070 else
3071   if test -n "$CC"; then
3072   ac_cv_prog_CC="$CC" # Let the user override the test.
3073 else
3074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3075 for as_dir in $PATH
3076 do
3077   IFS=$as_save_IFS
3078   test -z "$as_dir" && as_dir=.
3079     for ac_exec_ext in '' $ac_executable_extensions; do
3080   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3081     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3082     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3083     break 2
3084   fi
3085 done
3086   done
3087 IFS=$as_save_IFS
3088
3089 fi
3090 fi
3091 CC=$ac_cv_prog_CC
3092 if test -n "$CC"; then
3093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3094 $as_echo "$CC" >&6; }
3095 else
3096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3097 $as_echo "no" >&6; }
3098 fi
3099
3100
3101     test -n "$CC" && break
3102   done
3103 fi
3104 if test -z "$CC"; then
3105   ac_ct_CC=$CC
3106   for ac_prog in cl.exe
3107 do
3108   # Extract the first word of "$ac_prog", so it can be a program name with args.
3109 set dummy $ac_prog; ac_word=$2
3110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3111 $as_echo_n "checking for $ac_word... " >&6; }
3112 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3113   $as_echo_n "(cached) " >&6
3114 else
3115   if test -n "$ac_ct_CC"; then
3116   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3117 else
3118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3119 for as_dir in $PATH
3120 do
3121   IFS=$as_save_IFS
3122   test -z "$as_dir" && as_dir=.
3123     for ac_exec_ext in '' $ac_executable_extensions; do
3124   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3125     ac_cv_prog_ac_ct_CC="$ac_prog"
3126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3127     break 2
3128   fi
3129 done
3130   done
3131 IFS=$as_save_IFS
3132
3133 fi
3134 fi
3135 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3136 if test -n "$ac_ct_CC"; then
3137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3138 $as_echo "$ac_ct_CC" >&6; }
3139 else
3140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3141 $as_echo "no" >&6; }
3142 fi
3143
3144
3145   test -n "$ac_ct_CC" && break
3146 done
3147
3148   if test "x$ac_ct_CC" = x; then
3149     CC=""
3150   else
3151     case $cross_compiling:$ac_tool_warned in
3152 yes:)
3153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3154 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3155 ac_tool_warned=yes ;;
3156 esac
3157     CC=$ac_ct_CC
3158   fi
3159 fi
3160
3161 fi
3162
3163
3164 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3165 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3166 as_fn_error $? "no acceptable C compiler found in \$PATH
3167 See \`config.log' for more details" "$LINENO" 5; }
3168
3169 # Provide some information about the compiler.
3170 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3171 set X $ac_compile
3172 ac_compiler=$2
3173 for ac_option in --version -v -V -qversion; do
3174   { { ac_try="$ac_compiler $ac_option >&5"
3175 case "(($ac_try" in
3176   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3177   *) ac_try_echo=$ac_try;;
3178 esac
3179 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3180 $as_echo "$ac_try_echo"; } >&5
3181   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3182   ac_status=$?
3183   if test -s conftest.err; then
3184     sed '10a\
3185 ... rest of stderr output deleted ...
3186          10q' conftest.err >conftest.er1
3187     cat conftest.er1 >&5
3188   fi
3189   rm -rf conftest.er1 conftest.err
3190   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3191   test $ac_status = 0; }
3192 done
3193
3194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3195 /* end confdefs.h.  */
3196
3197 int
3198 main ()
3199 {
3200
3201   ;
3202   return 0;
3203 }
3204 _ACEOF
3205 ac_clean_files_save=$ac_clean_files
3206 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3207 # Try to create an executable without -o first, disregard a.out.
3208 # It will help us diagnose broken compilers, and finding out an intuition
3209 # of exeext.
3210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3211 $as_echo_n "checking whether the C compiler works... " >&6; }
3212 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3213
3214 # The possible output files:
3215 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3216
3217 ac_rmfiles=
3218 for ac_file in $ac_files
3219 do
3220   case $ac_file in
3221     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3222     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3223   esac
3224 done
3225 rm -f $ac_rmfiles
3226
3227 if { { ac_try="$ac_link_default"
3228 case "(($ac_try" in
3229   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3230   *) ac_try_echo=$ac_try;;
3231 esac
3232 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3233 $as_echo "$ac_try_echo"; } >&5
3234   (eval "$ac_link_default") 2>&5
3235   ac_status=$?
3236   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3237   test $ac_status = 0; }; then :
3238   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3239 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3240 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3241 # so that the user can short-circuit this test for compilers unknown to
3242 # Autoconf.
3243 for ac_file in $ac_files ''
3244 do
3245   test -f "$ac_file" || continue
3246   case $ac_file in
3247     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3248         ;;
3249     [ab].out )
3250         # We found the default executable, but exeext='' is most
3251         # certainly right.
3252         break;;
3253     *.* )
3254         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3255         then :; else
3256            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3257         fi
3258         # We set ac_cv_exeext here because the later test for it is not
3259         # safe: cross compilers may not add the suffix if given an `-o'
3260         # argument, so we may need to know it at that point already.
3261         # Even if this section looks crufty: it has the advantage of
3262         # actually working.
3263         break;;
3264     * )
3265         break;;
3266   esac
3267 done
3268 test "$ac_cv_exeext" = no && ac_cv_exeext=
3269
3270 else
3271   ac_file=''
3272 fi
3273 if test -z "$ac_file"; then :
3274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3275 $as_echo "no" >&6; }
3276 $as_echo "$as_me: failed program was:" >&5
3277 sed 's/^/| /' conftest.$ac_ext >&5
3278
3279 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3280 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3281 as_fn_error 77 "C compiler cannot create executables
3282 See \`config.log' for more details" "$LINENO" 5; }
3283 else
3284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3285 $as_echo "yes" >&6; }
3286 fi
3287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3288 $as_echo_n "checking for C compiler default output file name... " >&6; }
3289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3290 $as_echo "$ac_file" >&6; }
3291 ac_exeext=$ac_cv_exeext
3292
3293 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3294 ac_clean_files=$ac_clean_files_save
3295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3296 $as_echo_n "checking for suffix of executables... " >&6; }
3297 if { { ac_try="$ac_link"
3298 case "(($ac_try" in
3299   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3300   *) ac_try_echo=$ac_try;;
3301 esac
3302 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3303 $as_echo "$ac_try_echo"; } >&5
3304   (eval "$ac_link") 2>&5
3305   ac_status=$?
3306   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3307   test $ac_status = 0; }; then :
3308   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3309 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3310 # work properly (i.e., refer to `conftest.exe'), while it won't with
3311 # `rm'.
3312 for ac_file in conftest.exe conftest conftest.*; do
3313   test -f "$ac_file" || continue
3314   case $ac_file in
3315     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3316     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3317           break;;
3318     * ) break;;
3319   esac
3320 done
3321 else
3322   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3323 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3324 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3325 See \`config.log' for more details" "$LINENO" 5; }
3326 fi
3327 rm -rf conftest conftest$ac_cv_exeext
3328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3329 $as_echo "$ac_cv_exeext" >&6; }
3330
3331 rm -rf conftest.$ac_ext
3332 EXEEXT=$ac_cv_exeext
3333 ac_exeext=$EXEEXT
3334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3335 /* end confdefs.h.  */
3336 #include <stdio.h>
3337 int
3338 main ()
3339 {
3340 FILE *f = fopen ("conftest.out", "w");
3341  return ferror (f) || fclose (f) != 0;
3342
3343   ;
3344   return 0;
3345 }
3346 _ACEOF
3347 ac_clean_files="$ac_clean_files conftest.out"
3348 # Check that the compiler produces executables we can run.  If not, either
3349 # the compiler is broken, or we cross compile.
3350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3351 $as_echo_n "checking whether we are cross compiling... " >&6; }
3352 if test "$cross_compiling" != yes; then
3353   { { ac_try="$ac_link"
3354 case "(($ac_try" in
3355   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3356   *) ac_try_echo=$ac_try;;
3357 esac
3358 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3359 $as_echo "$ac_try_echo"; } >&5
3360   (eval "$ac_link") 2>&5
3361   ac_status=$?
3362   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3363   test $ac_status = 0; }
3364   if { ac_try='./conftest$ac_cv_exeext'
3365   { { case "(($ac_try" in
3366   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3367   *) ac_try_echo=$ac_try;;
3368 esac
3369 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3370 $as_echo "$ac_try_echo"; } >&5
3371   (eval "$ac_try") 2>&5
3372   ac_status=$?
3373   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3374   test $ac_status = 0; }; }; then
3375     cross_compiling=no
3376   else
3377     if test "$cross_compiling" = maybe; then
3378         cross_compiling=yes
3379     else
3380         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3381 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3382 as_fn_error $? "cannot run C compiled programs.
3383 If you meant to cross compile, use \`--host'.
3384 See \`config.log' for more details" "$LINENO" 5; }
3385     fi
3386   fi
3387 fi
3388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3389 $as_echo "$cross_compiling" >&6; }
3390
3391 rm -rf conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3392 ac_clean_files=$ac_clean_files_save
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3394 $as_echo_n "checking for suffix of object files... " >&6; }
3395 if ${ac_cv_objext+:} false; then :
3396   $as_echo_n "(cached) " >&6
3397 else
3398   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3399 /* end confdefs.h.  */
3400
3401 int
3402 main ()
3403 {
3404
3405   ;
3406   return 0;
3407 }
3408 _ACEOF
3409 rm -rf conftest.o conftest.obj
3410 if { { ac_try="$ac_compile"
3411 case "(($ac_try" in
3412   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3413   *) ac_try_echo=$ac_try;;
3414 esac
3415 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3416 $as_echo "$ac_try_echo"; } >&5
3417   (eval "$ac_compile") 2>&5
3418   ac_status=$?
3419   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3420   test $ac_status = 0; }; then :
3421   for ac_file in conftest.o conftest.obj conftest.*; do
3422   test -f "$ac_file" || continue;
3423   case $ac_file in
3424     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3425     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3426        break;;
3427   esac
3428 done
3429 else
3430   $as_echo "$as_me: failed program was:" >&5
3431 sed 's/^/| /' conftest.$ac_ext >&5
3432
3433 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3434 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3435 as_fn_error $? "cannot compute suffix of object files: cannot compile
3436 See \`config.log' for more details" "$LINENO" 5; }
3437 fi
3438 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
3439 fi
3440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3441 $as_echo "$ac_cv_objext" >&6; }
3442 OBJEXT=$ac_cv_objext
3443 ac_objext=$OBJEXT
3444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3445 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3446 if ${ac_cv_c_compiler_gnu+:} false; then :
3447   $as_echo_n "(cached) " >&6
3448 else
3449   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3450 /* end confdefs.h.  */
3451
3452 int
3453 main ()
3454 {
3455 #ifndef __GNUC__
3456        choke me
3457 #endif
3458
3459   ;
3460   return 0;
3461 }
3462 _ACEOF
3463 if ac_fn_c_try_compile "$LINENO"; then :
3464   ac_compiler_gnu=yes
3465 else
3466   ac_compiler_gnu=no
3467 fi
3468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3469 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3470
3471 fi
3472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3473 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3474 if test $ac_compiler_gnu = yes; then
3475   GCC=yes
3476 else
3477   GCC=
3478 fi
3479 ac_test_CFLAGS=${CFLAGS+set}
3480 ac_save_CFLAGS=$CFLAGS
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3482 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3483 if ${ac_cv_prog_cc_g+:} false; then :
3484   $as_echo_n "(cached) " >&6
3485 else
3486   ac_save_c_werror_flag=$ac_c_werror_flag
3487    ac_c_werror_flag=yes
3488    ac_cv_prog_cc_g=no
3489    CFLAGS="-g"
3490    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3491 /* end confdefs.h.  */
3492
3493 int
3494 main ()
3495 {
3496
3497   ;
3498   return 0;
3499 }
3500 _ACEOF
3501 if ac_fn_c_try_compile "$LINENO"; then :
3502   ac_cv_prog_cc_g=yes
3503 else
3504   CFLAGS=""
3505       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3506 /* end confdefs.h.  */
3507
3508 int
3509 main ()
3510 {
3511
3512   ;
3513   return 0;
3514 }
3515 _ACEOF
3516 if ac_fn_c_try_compile "$LINENO"; then :
3517
3518 else
3519   ac_c_werror_flag=$ac_save_c_werror_flag
3520          CFLAGS="-g"
3521          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3522 /* end confdefs.h.  */
3523
3524 int
3525 main ()
3526 {
3527
3528   ;
3529   return 0;
3530 }
3531 _ACEOF
3532 if ac_fn_c_try_compile "$LINENO"; then :
3533   ac_cv_prog_cc_g=yes
3534 fi
3535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3536 fi
3537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3538 fi
3539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3540    ac_c_werror_flag=$ac_save_c_werror_flag
3541 fi
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3543 $as_echo "$ac_cv_prog_cc_g" >&6; }
3544 if test "$ac_test_CFLAGS" = set; then
3545   CFLAGS=$ac_save_CFLAGS
3546 elif test $ac_cv_prog_cc_g = yes; then
3547   if test "$GCC" = yes; then
3548     CFLAGS="-g -O2"
3549   else
3550     CFLAGS="-g"
3551   fi
3552 else
3553   if test "$GCC" = yes; then
3554     CFLAGS="-O2"
3555   else
3556     CFLAGS=
3557   fi
3558 fi
3559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3560 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3561 if ${ac_cv_prog_cc_c89+:} false; then :
3562   $as_echo_n "(cached) " >&6
3563 else
3564   ac_cv_prog_cc_c89=no
3565 ac_save_CC=$CC
3566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3567 /* end confdefs.h.  */
3568 #include <stdarg.h>
3569 #include <stdio.h>
3570 struct stat;
3571 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3572 struct buf { int x; };
3573 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3574 static char *e (p, i)
3575      char **p;
3576      int i;
3577 {
3578   return p[i];
3579 }
3580 static char *f (char * (*g) (char **, int), char **p, ...)
3581 {
3582   char *s;
3583   va_list v;
3584   va_start (v,p);
3585   s = g (p, va_arg (v,int));
3586   va_end (v);
3587   return s;
3588 }
3589
3590 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3591    function prototypes and stuff, but not '\xHH' hex character constants.
3592    These don't provoke an error unfortunately, instead are silently treated
3593    as 'x'.  The following induces an error, until -std is added to get
3594    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3595    array size at least.  It's necessary to write '\x00'==0 to get something
3596    that's true only with -std.  */
3597 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3598
3599 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3600    inside strings and character constants.  */
3601 #define FOO(x) 'x'
3602 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3603
3604 int test (int i, double x);
3605 struct s1 {int (*f) (int a);};
3606 struct s2 {int (*f) (double a);};
3607 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3608 int argc;
3609 char **argv;
3610 int
3611 main ()
3612 {
3613 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3614   ;
3615   return 0;
3616 }
3617 _ACEOF
3618 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3619         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3620 do
3621   CC="$ac_save_CC $ac_arg"
3622   if ac_fn_c_try_compile "$LINENO"; then :
3623   ac_cv_prog_cc_c89=$ac_arg
3624 fi
3625 rm -f core conftest.err conftest.$ac_objext
3626   test "x$ac_cv_prog_cc_c89" != "xno" && break
3627 done
3628 rm -rf conftest.$ac_ext
3629 CC=$ac_save_CC
3630
3631 fi
3632 # AC_CACHE_VAL
3633 case "x$ac_cv_prog_cc_c89" in
3634   x)
3635     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3636 $as_echo "none needed" >&6; } ;;
3637   xno)
3638     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3639 $as_echo "unsupported" >&6; } ;;
3640   *)
3641     CC="$CC $ac_cv_prog_cc_c89"
3642     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3643 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3644 esac
3645 if test "x$ac_cv_prog_cc_c89" != xno; then :
3646
3647 fi
3648
3649 ac_ext=c
3650 ac_cpp='$CPP $CPPFLAGS'
3651 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3652 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3653 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3654
3655
3656 have_pthread=no
3657   with_pthread_req=unspecified
3658
3659   # AX_PTHREAD is from the GNU Autoconf Archive.
3660   # https://savannah.gnu.org/projects/autoconf-archive/
3661   # ===========================================================================
3662 #        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
3663 # ===========================================================================
3664 #
3665 # SYNOPSIS
3666 #
3667 #   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
3668 #
3669 # DESCRIPTION
3670 #
3671 #   This macro figures out how to build C programs using POSIX threads. It
3672 #   sets the PTHREAD_LIBS output variable to the threads library and linker
3673 #   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
3674 #   flags that are needed. (The user can also force certain compiler
3675 #   flags/libs to be tested by setting these environment variables.)
3676 #
3677 #   Also sets PTHREAD_CC to any special C compiler that is needed for
3678 #   multi-threaded programs (defaults to the value of CC otherwise). (This
3679 #   is necessary on AIX to use the special cc_r compiler alias.)
3680 #
3681 #   NOTE: You are assumed to not only compile your program with these flags,
3682 #   but also link it with them as well. e.g. you should link with
3683 #   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
3684 #
3685 #   If you are only building threads programs, you may wish to use these
3686 #   variables in your default LIBS, CFLAGS, and CC:
3687 #
3688 #     LIBS="$PTHREAD_LIBS $LIBS"
3689 #     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
3690 #     CC="$PTHREAD_CC"
3691 #
3692 #   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
3693 #   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
3694 #   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
3695 #
3696 #   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
3697 #   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
3698 #   PTHREAD_CFLAGS.
3699 #
3700 #   ACTION-IF-FOUND is a list of shell commands to run if a threads library
3701 #   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
3702 #   is not found. If ACTION-IF-FOUND is not specified, the default action
3703 #   will define HAVE_PTHREAD.
3704 #
3705 #   Please let the authors know if this macro fails on any platform, or if
3706 #   you have any other suggestions or comments. This macro was based on work
3707 #   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
3708 #   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
3709 #   Alejandro Forero Cuervo to the autoconf macro repository. We are also
3710 #   grateful for the helpful feedback of numerous users.
3711 #
3712 #   Updated for Autoconf 2.68 by Daniel Richard G.
3713 #
3714 # LICENSE
3715 #
3716 #   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
3717 #   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
3718 #
3719 #   This program is free software: you can redistribute it and/or modify it
3720 #   under the terms of the GNU General Public License as published by the
3721 #   Free Software Foundation, either version 3 of the License, or (at your
3722 #   option) any later version.
3723 #
3724 #   This program is distributed in the hope that it will be useful, but
3725 #   WITHOUT ANY WARRANTY; without even the implied warranty of
3726 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
3727 #   Public License for more details.
3728 #
3729 #   You should have received a copy of the GNU General Public License along
3730 #   with this program. If not, see <http://www.gnu.org/licenses/>.
3731 #
3732 #   As a special exception, the respective Autoconf Macro's copyright owner
3733 #   gives unlimited permission to copy, distribute and modify the configure
3734 #   scripts that are the output of Autoconf when processing the Macro. You
3735 #   need not follow the terms of the GNU General Public License when using
3736 #   or distributing such scripts, even though portions of the text of the
3737 #   Macro appear in them. The GNU General Public License (GPL) does govern
3738 #   all other use of the material that constitutes the Autoconf Macro.
3739 #
3740 #   This special exception to the GPL applies to versions of the Autoconf
3741 #   Macro released by the Autoconf Archive. When you make and distribute a
3742 #   modified version of the Autoconf Macro, you may extend this special
3743 #   exception to the GPL to apply to your modified version as well.
3744
3745 #serial 21
3746
3747 # This is what autoupdate's m4 run will expand.  It fires
3748 # the warning (with _au_warn_XXX), outputs it into the
3749 # updated configure.ac (with AC_DIAGNOSE), and then outputs
3750 # the replacement expansion.
3751
3752
3753 # This is an auxiliary macro that is also run when
3754 # autoupdate runs m4.  It simply calls m4_warning, but
3755 # we need a wrapper so that each warning is emitted only
3756 # once.  We break the quoting in m4_warning's argument in
3757 # order to expand this macro's arguments, not AU_DEFUN's.
3758
3759
3760 # Finally, this is the expansion that is picked up by
3761 # autoconf.  It tells the user to run autoupdate, and
3762 # then outputs the replacement expansion.  We do not care
3763 # about autoupdate's warning because that contains
3764 # information on what to do *after* running autoupdate.
3765
3766
3767
3768   # This affects CC, LIBS, and CFLAGS, instead of defining new variables.
3769
3770
3771 # Check whether --with-pthread was given.
3772 if test "${with_pthread+set}" = set; then :
3773   withval=$with_pthread; with_pthread="$withval"; with_pthread_req="$withval"
3774 else
3775   with_pthread=yes
3776 fi
3777
3778
3779   if test "$with_pthread" = yes; then
3780     # AX_PTHREAD might want a different compiler.
3781
3782
3783 ac_ext=c
3784 ac_cpp='$CPP $CPPFLAGS'
3785 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3786 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3787 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3788
3789 ax_pthread_ok=no
3790
3791 # We used to check for pthread.h first, but this fails if pthread.h
3792 # requires special compiler flags (e.g. on True64 or Sequent).
3793 # It gets checked for in the link test anyway.
3794
3795 # First of all, check if the user has set any of the PTHREAD_LIBS,
3796 # etcetera environment variables, and if threads linking works using
3797 # them:
3798 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
3799         save_CFLAGS="$CFLAGS"
3800         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
3801         save_LIBS="$LIBS"
3802         LIBS="$PTHREAD_LIBS $LIBS"
3803         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
3804 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
3805         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3806 /* end confdefs.h.  */
3807
3808 /* Override any GCC internal prototype to avoid an error.
3809    Use char because int might match the return type of a GCC
3810    builtin and then its argument prototype would still apply.  */
3811 #ifdef __cplusplus
3812 extern "C"
3813 #endif
3814 char pthread_join ();
3815 int
3816 main ()
3817 {
3818 return pthread_join ();
3819   ;
3820   return 0;
3821 }
3822 _ACEOF
3823 if ac_fn_c_try_link "$LINENO"; then :
3824   ax_pthread_ok=yes
3825 fi
3826 rm -f core conftest.err conftest.$ac_objext \
3827     conftest$ac_exeext conftest.$ac_ext
3828         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
3829 $as_echo "$ax_pthread_ok" >&6; }
3830         if test x"$ax_pthread_ok" = xno; then
3831                 PTHREAD_LIBS=""
3832                 PTHREAD_CFLAGS=""
3833         fi
3834         LIBS="$save_LIBS"
3835         CFLAGS="$save_CFLAGS"
3836 fi
3837
3838 # We must check for the threads library under a number of different
3839 # names; the ordering is very important because some systems
3840 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
3841 # libraries is broken (non-POSIX).
3842
3843 # Create a list of thread flags to try.  Items starting with a "-" are
3844 # C compiler flags, and other items are library names, except for "none"
3845 # which indicates that we try without any flags at all, and "pthread-config"
3846 # which is a program returning the flags for the Pth emulation library.
3847
3848 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3849
3850 # The ordering *is* (sometimes) important.  Some notes on the
3851 # individual items follow:
3852
3853 # pthreads: AIX (must check this before -lpthread)
3854 # none: in case threads are in libc; should be tried before -Kthread and
3855 #       other compiler flags to prevent continual compiler warnings
3856 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
3857 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
3858 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3859 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
3860 # -pthreads: Solaris/gcc
3861 # -mthreads: Mingw32/gcc, Lynx/gcc
3862 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
3863 #      doesn't hurt to check since this sometimes defines pthreads too;
3864 #      also defines -D_REENTRANT)
3865 #      ... -mt is also the pthreads flag for HP/aCC
3866 # pthread: Linux, etcetera
3867 # --thread-safe: KAI C++
3868 # pthread-config: use pthread-config program (for GNU Pth library)
3869
3870 case ${host_os} in
3871         solaris*)
3872
3873         # On Solaris (at least, for some versions), libc contains stubbed
3874         # (non-functional) versions of the pthreads routines, so link-based
3875         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
3876         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
3877         # a function called by this macro, so we could check for that, but
3878         # who knows whether they'll stub that too in a future libc.)  So,
3879         # we'll just look for -pthreads and -lpthread first:
3880
3881         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
3882         ;;
3883
3884         darwin*)
3885         ax_pthread_flags="-pthread $ax_pthread_flags"
3886         ;;
3887 esac
3888
3889 # Clang doesn't consider unrecognized options an error unless we specify
3890 # -Werror. We throw in some extra Clang-specific options to ensure that
3891 # this doesn't happen for GCC, which also accepts -Werror.
3892
3893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
3894 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
3895 save_CFLAGS="$CFLAGS"
3896 ax_pthread_extra_flags="-Werror"
3897 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
3898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3899 /* end confdefs.h.  */
3900 int foo(void);
3901 int
3902 main ()
3903 {
3904 foo()
3905   ;
3906   return 0;
3907 }
3908 _ACEOF
3909 if ac_fn_c_try_compile "$LINENO"; then :
3910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3911 $as_echo "yes" >&6; }
3912 else
3913   ax_pthread_extra_flags=
3914                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3915 $as_echo "no" >&6; }
3916 fi
3917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3918 CFLAGS="$save_CFLAGS"
3919
3920 if test x"$ax_pthread_ok" = xno; then
3921 for flag in $ax_pthread_flags; do
3922
3923         case $flag in
3924                 none)
3925                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
3926 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
3927                 ;;
3928
3929                 -*)
3930                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
3931 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
3932                 PTHREAD_CFLAGS="$flag"
3933                 ;;
3934
3935                 pthread-config)
3936                 # Extract the first word of "pthread-config", so it can be a program name with args.
3937 set dummy pthread-config; ac_word=$2
3938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3939 $as_echo_n "checking for $ac_word... " >&6; }
3940 if ${ac_cv_prog_ax_pthread_config+:} false; then :
3941   $as_echo_n "(cached) " >&6
3942 else
3943   if test -n "$ax_pthread_config"; then
3944   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
3945 else
3946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3947 for as_dir in $PATH
3948 do
3949   IFS=$as_save_IFS
3950   test -z "$as_dir" && as_dir=.
3951     for ac_exec_ext in '' $ac_executable_extensions; do
3952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3953     ac_cv_prog_ax_pthread_config="yes"
3954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3955     break 2
3956   fi
3957 done
3958   done
3959 IFS=$as_save_IFS
3960
3961   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
3962 fi
3963 fi
3964 ax_pthread_config=$ac_cv_prog_ax_pthread_config
3965 if test -n "$ax_pthread_config"; then
3966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
3967 $as_echo "$ax_pthread_config" >&6; }
3968 else
3969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3970 $as_echo "no" >&6; }
3971 fi
3972
3973
3974                 if test x"$ax_pthread_config" = xno; then continue; fi
3975                 PTHREAD_CFLAGS="`pthread-config --cflags`"
3976                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
3977                 ;;
3978
3979                 *)
3980                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
3981 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
3982                 PTHREAD_LIBS="-l$flag"
3983                 ;;
3984         esac
3985
3986         save_LIBS="$LIBS"
3987         save_CFLAGS="$CFLAGS"
3988         LIBS="$PTHREAD_LIBS $LIBS"
3989         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
3990
3991         # Check for various functions.  We must include pthread.h,
3992         # since some functions may be macros.  (On the Sequent, we
3993         # need a special flag -Kthread to make this header compile.)
3994         # We check for pthread_join because it is in -lpthread on IRIX
3995         # while pthread_create is in libc.  We check for pthread_attr_init
3996         # due to DEC craziness with -lpthreads.  We check for
3997         # pthread_cleanup_push because it is one of the few pthread
3998         # functions on Solaris that doesn't have a non-functional libc stub.
3999         # We try pthread_create on general principles.
4000         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4001 /* end confdefs.h.  */
4002 #include <pthread.h>
4003                         static void routine(void *a) { a = 0; }
4004                         static void *start_routine(void *a) { return a; }
4005 int
4006 main ()
4007 {
4008 pthread_t th; pthread_attr_t attr;
4009                         pthread_create(&th, 0, start_routine, 0);
4010                         pthread_join(th, 0);
4011                         pthread_attr_init(&attr);
4012                         pthread_cleanup_push(routine, 0);
4013                         pthread_cleanup_pop(0) /* ; */
4014   ;
4015   return 0;
4016 }
4017 _ACEOF
4018 if ac_fn_c_try_link "$LINENO"; then :
4019   ax_pthread_ok=yes
4020 fi
4021 rm -f core conftest.err conftest.$ac_objext \
4022     conftest$ac_exeext conftest.$ac_ext
4023
4024         LIBS="$save_LIBS"
4025         CFLAGS="$save_CFLAGS"
4026
4027         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
4028 $as_echo "$ax_pthread_ok" >&6; }
4029         if test "x$ax_pthread_ok" = xyes; then
4030                 break;
4031         fi
4032
4033         PTHREAD_LIBS=""
4034         PTHREAD_CFLAGS=""
4035 done
4036 fi
4037
4038 # Various other checks:
4039 if test "x$ax_pthread_ok" = xyes; then
4040         save_LIBS="$LIBS"
4041         LIBS="$PTHREAD_LIBS $LIBS"
4042         save_CFLAGS="$CFLAGS"
4043         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
4044
4045         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
4046         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
4047 $as_echo_n "checking for joinable pthread attribute... " >&6; }
4048         attr_name=unknown
4049         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
4050             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4051 /* end confdefs.h.  */
4052 #include <pthread.h>
4053 int
4054 main ()
4055 {
4056 int attr = $attr; return attr /* ; */
4057   ;
4058   return 0;
4059 }
4060 _ACEOF
4061 if ac_fn_c_try_link "$LINENO"; then :
4062   attr_name=$attr; break
4063 fi
4064 rm -f core conftest.err conftest.$ac_objext \
4065     conftest$ac_exeext conftest.$ac_ext
4066         done
4067         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
4068 $as_echo "$attr_name" >&6; }
4069         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
4070
4071 cat >>confdefs.h <<_ACEOF
4072 #define PTHREAD_CREATE_JOINABLE $attr_name
4073 _ACEOF
4074
4075         fi
4076
4077         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
4078 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
4079         flag=no
4080         case ${host_os} in
4081             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
4082             osf* | hpux*) flag="-D_REENTRANT";;
4083             solaris*)
4084             if test "$GCC" = "yes"; then
4085                 flag="-D_REENTRANT"
4086             else
4087                 # TODO: What about Clang on Solaris?
4088                 flag="-mt -D_REENTRANT"
4089             fi
4090             ;;
4091         esac
4092         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
4093 $as_echo "$flag" >&6; }
4094         if test "x$flag" != xno; then
4095             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
4096         fi
4097
4098         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
4099 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
4100 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
4101   $as_echo_n "(cached) " >&6
4102 else
4103
4104                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4105 /* end confdefs.h.  */
4106 #include <pthread.h>
4107 int
4108 main ()
4109 {
4110 int i = PTHREAD_PRIO_INHERIT;
4111   ;
4112   return 0;
4113 }
4114 _ACEOF
4115 if ac_fn_c_try_link "$LINENO"; then :
4116   ax_cv_PTHREAD_PRIO_INHERIT=yes
4117 else
4118   ax_cv_PTHREAD_PRIO_INHERIT=no
4119 fi
4120 rm -f core conftest.err conftest.$ac_objext \
4121     conftest$ac_exeext conftest.$ac_ext
4122
4123 fi
4124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
4125 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
4126         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
4127
4128 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
4129
4130 fi
4131
4132         LIBS="$save_LIBS"
4133         CFLAGS="$save_CFLAGS"
4134
4135         # More AIX lossage: compile with *_r variant
4136         if test "x$GCC" != xyes; then
4137             case $host_os in
4138                 aix*)
4139                 case "x/$CC" in #(
4140   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
4141     #handle absolute path differently from PATH based program lookup
4142                    case "x$CC" in #(
4143   x/*) :
4144     if as_fn_executable_p ${CC}_r; then :
4145   PTHREAD_CC="${CC}_r"
4146 fi ;; #(
4147   *) :
4148     for ac_prog in ${CC}_r
4149 do
4150   # Extract the first word of "$ac_prog", so it can be a program name with args.
4151 set dummy $ac_prog; ac_word=$2
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4153 $as_echo_n "checking for $ac_word... " >&6; }
4154 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
4155   $as_echo_n "(cached) " >&6
4156 else
4157   if test -n "$PTHREAD_CC"; then
4158   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
4159 else
4160 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4161 for as_dir in $PATH
4162 do
4163   IFS=$as_save_IFS
4164   test -z "$as_dir" && as_dir=.
4165     for ac_exec_ext in '' $ac_executable_extensions; do
4166   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4167     ac_cv_prog_PTHREAD_CC="$ac_prog"
4168     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4169     break 2
4170   fi
4171 done
4172   done
4173 IFS=$as_save_IFS
4174
4175 fi
4176 fi
4177 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
4178 if test -n "$PTHREAD_CC"; then
4179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
4180 $as_echo "$PTHREAD_CC" >&6; }
4181 else
4182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4183 $as_echo "no" >&6; }
4184 fi
4185
4186
4187   test -n "$PTHREAD_CC" && break
4188 done
4189 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
4190  ;;
4191 esac ;; #(
4192   *) :
4193      ;;
4194 esac
4195                 ;;
4196             esac
4197         fi
4198 fi
4199
4200 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
4201
4202
4203
4204
4205
4206 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
4207 if test x"$ax_pthread_ok" = xyes; then
4208         if test "$CC" = "$PTHREAD_CC" -o -z "$ac_original_cc"; then
4209         have_pthread=yes
4210       else
4211         ac_prog_cc_no_pthread=yes
4212       fi
4213
4214         :
4215 else
4216         ax_pthread_ok=no
4217
4218 fi
4219 ac_ext=c
4220 ac_cpp='$CPP $CPPFLAGS'
4221 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4222 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4223 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4224
4225
4226
4227     if test "$have_pthread" = yes; then
4228       $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
4229
4230       CC=$PTHREAD_CC
4231
4232       # AX_PTHREAD documentation specifically suggests this...
4233       LIBS="$PTHREAD_LIBS $LIBS"
4234       CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
4235     fi
4236   fi
4237  # Needs ac_original_cc.
4238
4239
4240
4241   if test -z "$GCC"; then
4242     # not using GCC
4243     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to request ANSI compilation" >&5
4244 $as_echo_n "checking how to request ANSI compilation... " >&6; }
4245     case "$host" in
4246       *-hpux* )
4247         { $as_echo "$as_me:${as_lineno-$LINENO}: result: HPUX: adding -Ae" >&5
4248 $as_echo "HPUX: adding -Ae" >&6; }
4249         CC="$CC -Ae"
4250       ;;
4251       *-aix* )
4252         { $as_echo "$as_me:${as_lineno-$LINENO}: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
4253 $as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
4254         CC="$CC -qlanglvl=ansi -qhalt=e"
4255       ;;
4256       *-dec-* )
4257         { $as_echo "$as_me:${as_lineno-$LINENO}: result: DEC: adding -std1 -ieee" >&5
4258 $as_echo "DEC: adding -std1 -ieee" >&6; }
4259         CC="$CC -std1"
4260       ;;
4261       *)
4262         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no idea" >&5
4263 $as_echo "no idea" >&6; }
4264       ;;
4265     esac
4266   else
4267     # using GCC
4268     case "$host" in
4269       *-solaris*)
4270         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris: adding -D__EXTENSIONS__" >&5
4271 $as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
4272         CC="$CC -D__EXTENSIONS__"
4273       ;;
4274     esac
4275   fi
4276
4277   OBJCC="$CC"
4278
4279   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler works on ANSI C" >&5
4280 $as_echo_n "checking whether the compiler works on ANSI C... " >&6; }
4281   if test "$cross_compiling" = yes; then :
4282   as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
4283 else
4284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4285 /* end confdefs.h.  */
4286  main(int ac, char **av) { return 0; }
4287 _ACEOF
4288 if ac_fn_c_try_run "$LINENO"; then :
4289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4290 $as_echo "yes" >&6; }
4291 else
4292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4293 $as_echo "no" >&6; }
4294      as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
4295 fi
4296 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4297   conftest.$ac_objext conftest.beam conftest.$ac_ext
4298 fi
4299
4300
4301   if test -n "$GCC"; then
4302     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on gcc compiler warnings." >&5
4303 $as_echo "Turning on gcc compiler warnings." >&6; }
4304     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
4305     OBJCC="$OBJCC -Wall"
4306     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
4307     # and so perhaps now we can do without -pedantic?
4308   else
4309     case "$host" in
4310       *-irix5* |*-irix6.0-3* )
4311         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on SGI compiler warnings." >&5
4312 $as_echo "Turning on SGI compiler warnings." >&6; }
4313         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
4314       ;;
4315 #     *-dec-osf* )
4316 #       if test -z "$GCC"; then
4317 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
4318 #         CC="$CC -migrate -w0 -verbose -warnprotos"
4319 #       fi
4320 #     ;;
4321     esac
4322   fi
4323
4324 if test -n "$GCC"; then
4325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wno-overlength-strings" >&5
4326 $as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
4327 if ${ac_cv_gcc_accepts_no_overlength+:} false; then :
4328   $as_echo_n "(cached) " >&6
4329 else
4330   rm -rf conftest.$ac_ext
4331      touch conftest.$ac_ext
4332      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4333           grep unrecognized >/dev/null ); then
4334        ac_cv_gcc_accepts_no_overlength=no
4335      else
4336        ac_cv_gcc_accepts_no_overlength=yes
4337        CC="$CC -Wno-overlength-strings"
4338      fi
4339 fi
4340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_overlength" >&5
4341 $as_echo "$ac_cv_gcc_accepts_no_overlength" >&6; }
4342    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
4343   fi
4344
4345 if test -n "$GCC"; then
4346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wdeclaration-after-statement" >&5
4347 $as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
4348 if ${ac_cv_gcc_accepts_no_decl_after+:} false; then :
4349   $as_echo_n "(cached) " >&6
4350 else
4351   rm -rf conftest.$ac_ext
4352      touch conftest.$ac_ext
4353      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4354           grep unrecognized >/dev/null ); then
4355        ac_cv_gcc_accepts_no_decl_after=no
4356      else
4357        ac_cv_gcc_accepts_no_decl_after=yes
4358        CC="$CC -Wdeclaration-after-statement"
4359      fi
4360 fi
4361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_decl_after" >&5
4362 $as_echo "$ac_cv_gcc_accepts_no_decl_after" >&6; }
4363    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
4364   fi
4365
4366 if test -n "$GCC"; then
4367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -no-cpp-precomp" >&5
4368 $as_echo_n "checking whether gcc accepts -no-cpp-precomp... " >&6; }
4369 if ${ac_cv_gcc_accepts_no_cpp_precomp+:} false; then :
4370   $as_echo_n "(cached) " >&6
4371 else
4372   rm -rf conftest.$ac_ext
4373      touch conftest.$ac_ext
4374      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4375           grep unrecognized >/dev/null ); then
4376        ac_cv_gcc_accepts_no_cpp_precomp=no
4377      else
4378        ac_cv_gcc_accepts_no_cpp_precomp=yes
4379        CC="$CC -no-cpp-precomp"
4380      fi
4381 fi
4382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
4383 $as_echo "$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
4384    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
4385   fi
4386
4387 if test -n "$GCC"; then
4388
4389   case "$host" in
4390     *-darwin* )
4391       # Fucking Apple let // comments sneak into OpenGL headers, so
4392       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
4393     ;;
4394    *)
4395      if test -n "$GCC"; then
4396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -std=c89" >&5
4397 $as_echo_n "checking whether gcc accepts -std=c89... " >&6; }
4398 if ${ac_cv_gcc_accepts_std+:} false; then :
4399   $as_echo_n "(cached) " >&6
4400 else
4401   rm -rf conftest.$ac_ext
4402      touch conftest.$ac_ext
4403      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4404           grep unrecognized >/dev/null ); then
4405        ac_cv_gcc_accepts_std=no
4406      else
4407        ac_cv_gcc_accepts_std=yes
4408        CC="$CC -std=c89"
4409      fi
4410 fi
4411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_std" >&5
4412 $as_echo "$ac_cv_gcc_accepts_std" >&6; }
4413    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
4414   fi
4415
4416    ;;
4417   esac
4418
4419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling C++ comments in ANSI C code." >&5
4420 $as_echo "Disabling C++ comments in ANSI C code." >&6; }
4421    #
4422    # The reason that // comments are banned from xscreensaver is that gcc is
4423    # basically the only compiler in the world that supports them in C code.
4424    # All other vendors support them only in their C++ compilers, not in their
4425    # ANSI C compilers.  This means that it's a portability problem: every time
4426    # these comments have snuck into the xscreensaver source code, I've gotten
4427    # complaints about it the next day.  So we turn off support for them in gcc
4428    # as well to prevent them from accidentially slipping in.
4429    #
4430    if test "$ac_gcc_accepts_std" = yes ; then
4431      #
4432      # -std=c89 defines __STRICT_ANSI__, which we don't want.
4433      # (That appears to be the only additional preprocessor symbol
4434      # it defines, in addition to the syntax changes it makes.)
4435      #
4436      # -std=gnu89 is no good, because // comments were a GNU extension
4437      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
4438      # with -std=gnu89 but not with -std=c89.)
4439      #
4440      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
4441      CC="$CC -U__STRICT_ANSI__"
4442 #   else
4443 #     # The old way:
4444 #     CC="$CC -Wp,-lang-c89"
4445    fi
4446   fi
4447
4448 ac_ext=c
4449 ac_cpp='$CPP $CPPFLAGS'
4450 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4451 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4452 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4454 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4455 # On Suns, sometimes $CPP names a directory.
4456 if test -n "$CPP" && test -d "$CPP"; then
4457   CPP=
4458 fi
4459 if test -z "$CPP"; then
4460   if ${ac_cv_prog_CPP+:} false; then :
4461   $as_echo_n "(cached) " >&6
4462 else
4463       # Double quotes because CPP needs to be expanded
4464     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4465     do
4466       ac_preproc_ok=false
4467 for ac_c_preproc_warn_flag in '' yes
4468 do
4469   # Use a header file that comes with gcc, so configuring glibc
4470   # with a fresh cross-compiler works.
4471   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4472   # <limits.h> exists even on freestanding compilers.
4473   # On the NeXT, cc -E runs the code through the compiler's parser,
4474   # not just through cpp. "Syntax error" is here to catch this case.
4475   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4476 /* end confdefs.h.  */
4477 #ifdef __STDC__
4478 # include <limits.h>
4479 #else
4480 # include <assert.h>
4481 #endif
4482                      Syntax error
4483 _ACEOF
4484 if ac_fn_c_try_cpp "$LINENO"; then :
4485
4486 else
4487   # Broken: fails on valid input.
4488 continue
4489 fi
4490 rm -rf conftest.err conftest.i conftest.$ac_ext
4491
4492   # OK, works on sane cases.  Now check whether nonexistent headers
4493   # can be detected and how.
4494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4495 /* end confdefs.h.  */
4496 #include <ac_nonexistent.h>
4497 _ACEOF
4498 if ac_fn_c_try_cpp "$LINENO"; then :
4499   # Broken: success on invalid input.
4500 continue
4501 else
4502   # Passes both tests.
4503 ac_preproc_ok=:
4504 break
4505 fi
4506 rm -rf conftest.err conftest.i conftest.$ac_ext
4507
4508 done
4509 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4510 rm -rf conftest.i conftest.err conftest.$ac_ext
4511 if $ac_preproc_ok; then :
4512   break
4513 fi
4514
4515     done
4516     ac_cv_prog_CPP=$CPP
4517
4518 fi
4519   CPP=$ac_cv_prog_CPP
4520 else
4521   ac_cv_prog_CPP=$CPP
4522 fi
4523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4524 $as_echo "$CPP" >&6; }
4525 ac_preproc_ok=false
4526 for ac_c_preproc_warn_flag in '' yes
4527 do
4528   # Use a header file that comes with gcc, so configuring glibc
4529   # with a fresh cross-compiler works.
4530   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4531   # <limits.h> exists even on freestanding compilers.
4532   # On the NeXT, cc -E runs the code through the compiler's parser,
4533   # not just through cpp. "Syntax error" is here to catch this case.
4534   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4535 /* end confdefs.h.  */
4536 #ifdef __STDC__
4537 # include <limits.h>
4538 #else
4539 # include <assert.h>
4540 #endif
4541                      Syntax error
4542 _ACEOF
4543 if ac_fn_c_try_cpp "$LINENO"; then :
4544
4545 else
4546   # Broken: fails on valid input.
4547 continue
4548 fi
4549 rm -rf conftest.err conftest.i conftest.$ac_ext
4550
4551   # OK, works on sane cases.  Now check whether nonexistent headers
4552   # can be detected and how.
4553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4554 /* end confdefs.h.  */
4555 #include <ac_nonexistent.h>
4556 _ACEOF
4557 if ac_fn_c_try_cpp "$LINENO"; then :
4558   # Broken: success on invalid input.
4559 continue
4560 else
4561   # Passes both tests.
4562 ac_preproc_ok=:
4563 break
4564 fi
4565 rm -rf conftest.err conftest.i conftest.$ac_ext
4566
4567 done
4568 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4569 rm -rf conftest.i conftest.err conftest.$ac_ext
4570 if $ac_preproc_ok; then :
4571
4572 else
4573   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4574 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4575 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4576 See \`config.log' for more details" "$LINENO" 5; }
4577 fi
4578
4579 ac_ext=c
4580 ac_cpp='$CPP $CPPFLAGS'
4581 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4582 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4583 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4584
4585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4586 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4587 if ${ac_cv_c_const+:} false; then :
4588   $as_echo_n "(cached) " >&6
4589 else
4590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4591 /* end confdefs.h.  */
4592
4593 int
4594 main ()
4595 {
4596
4597 #ifndef __cplusplus
4598   /* Ultrix mips cc rejects this sort of thing.  */
4599   typedef int charset[2];
4600   const charset cs = { 0, 0 };
4601   /* SunOS 4.1.1 cc rejects this.  */
4602   char const *const *pcpcc;
4603   char **ppc;
4604   /* NEC SVR4.0.2 mips cc rejects this.  */
4605   struct point {int x, y;};
4606   static struct point const zero = {0,0};
4607   /* AIX XL C 1.02.0.0 rejects this.
4608      It does not let you subtract one const X* pointer from another in
4609      an arm of an if-expression whose if-part is not a constant
4610      expression */
4611   const char *g = "string";
4612   pcpcc = &g + (g ? g-g : 0);
4613   /* HPUX 7.0 cc rejects these. */
4614   ++pcpcc;
4615   ppc = (char**) pcpcc;
4616   pcpcc = (char const *const *) ppc;
4617   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4618     char tx;
4619     char *t = &tx;
4620     char const *s = 0 ? (char *) 0 : (char const *) 0;
4621
4622     *t++ = 0;
4623     if (s) return 0;
4624   }
4625   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4626     int x[] = {25, 17};
4627     const int *foo = &x[0];
4628     ++foo;
4629   }
4630   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4631     typedef const int *iptr;
4632     iptr p = 0;
4633     ++p;
4634   }
4635   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4636        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4637     struct s { int j; const int *ap[3]; } bx;
4638     struct s *b = &bx; b->j = 5;
4639   }
4640   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4641     const int foo = 10;
4642     if (!foo) return 0;
4643   }
4644   return !cs[0] && !zero.x;
4645 #endif
4646
4647   ;
4648   return 0;
4649 }
4650 _ACEOF
4651 if ac_fn_c_try_compile "$LINENO"; then :
4652   ac_cv_c_const=yes
4653 else
4654   ac_cv_c_const=no
4655 fi
4656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4657 fi
4658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4659 $as_echo "$ac_cv_c_const" >&6; }
4660 if test $ac_cv_c_const = no; then
4661
4662 $as_echo "#define const /**/" >>confdefs.h
4663
4664 fi
4665
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4667 $as_echo_n "checking for inline... " >&6; }
4668 if ${ac_cv_c_inline+:} false; then :
4669   $as_echo_n "(cached) " >&6
4670 else
4671   ac_cv_c_inline=no
4672 for ac_kw in inline __inline__ __inline; do
4673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4674 /* end confdefs.h.  */
4675 #ifndef __cplusplus
4676 typedef int foo_t;
4677 static $ac_kw foo_t static_foo () {return 0; }
4678 $ac_kw foo_t foo () {return 0; }
4679 #endif
4680
4681 _ACEOF
4682 if ac_fn_c_try_compile "$LINENO"; then :
4683   ac_cv_c_inline=$ac_kw
4684 fi
4685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4686   test "$ac_cv_c_inline" != no && break
4687 done
4688
4689 fi
4690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4691 $as_echo "$ac_cv_c_inline" >&6; }
4692
4693 case $ac_cv_c_inline in
4694   inline | yes) ;;
4695   *)
4696     case $ac_cv_c_inline in
4697       no) ac_val=;;
4698       *) ac_val=$ac_cv_c_inline;;
4699     esac
4700     cat >>confdefs.h <<_ACEOF
4701 #ifndef __cplusplus
4702 #define inline $ac_val
4703 #endif
4704 _ACEOF
4705     ;;
4706 esac
4707
4708
4709 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4710   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bc" >&5
4711 $as_echo_n "checking for bc... " >&6; }
4712   if test "$ac_bc_result" = "15" ; then
4713     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4714 $as_echo "yes" >&6; }
4715   else
4716     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717 $as_echo "no" >&6; }
4718     echo ''
4719     as_fn_error $? "Your system doesn't have \"bc\", which has been a standard
4720                   part of Unix since the 1970s.  Come back when your vendor
4721                   has grown a clue." "$LINENO" 5
4722   fi
4723
4724
4725 # stuff for Makefiles
4726 # Find a good install program.  We prefer a C program (faster),
4727 # so one script is as good as another.  But avoid the broken or
4728 # incompatible versions:
4729 # SysV /etc/install, /usr/sbin/install
4730 # SunOS /usr/etc/install
4731 # IRIX /sbin/install
4732 # AIX /bin/install
4733 # AmigaOS /C/install, which installs bootblocks on floppy discs
4734 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4735 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4736 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4737 # OS/2's system install, which has a completely different semantic
4738 # ./install, which can be erroneously created by make from ./install.sh.
4739 # Reject install programs that cannot install multiple files.
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4741 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4742 if test -z "$INSTALL"; then
4743 if ${ac_cv_path_install+:} false; then :
4744   $as_echo_n "(cached) " >&6
4745 else
4746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747 for as_dir in $PATH
4748 do
4749   IFS=$as_save_IFS
4750   test -z "$as_dir" && as_dir=.
4751     # Account for people who put trailing slashes in PATH elements.
4752 case $as_dir/ in #((
4753   ./ | .// | /[cC]/* | \
4754   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4755   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4756   /usr/ucb/* ) ;;
4757   *)
4758     # OSF1 and SCO ODT 3.0 have their own names for install.
4759     # Don't use installbsd from OSF since it installs stuff as root
4760     # by default.
4761     for ac_prog in ginstall scoinst install; do
4762       for ac_exec_ext in '' $ac_executable_extensions; do
4763         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4764           if test $ac_prog = install &&
4765             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4766             # AIX install.  It has an incompatible calling convention.
4767             :
4768           elif test $ac_prog = install &&
4769             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4770             # program-specific install script used by HP pwplus--don't use.
4771             :
4772           else
4773             rm -rf conftest.one conftest.two conftest.dir
4774             echo one > conftest.one
4775             echo two > conftest.two
4776             mkdir conftest.dir
4777             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4778               test -s conftest.one && test -s conftest.two &&
4779               test -s conftest.dir/conftest.one &&
4780               test -s conftest.dir/conftest.two
4781             then
4782               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4783               break 3
4784             fi
4785           fi
4786         fi
4787       done
4788     done
4789     ;;
4790 esac
4791
4792   done
4793 IFS=$as_save_IFS
4794
4795 rm -rf conftest.one conftest.two conftest.dir
4796
4797 fi
4798   if test "${ac_cv_path_install+set}" = set; then
4799     INSTALL=$ac_cv_path_install
4800   else
4801     # As a last resort, use the slow shell script.  Don't cache a
4802     # value for INSTALL within a source directory, because that will
4803     # break other packages using the cache if that directory is
4804     # removed, or if the value is a relative name.
4805     INSTALL=$ac_install_sh
4806   fi
4807 fi
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4809 $as_echo "$INSTALL" >&6; }
4810
4811 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4812 # It thinks the first close brace ends the variable substitution.
4813 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4814
4815 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4816
4817 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4818
4819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4820 $as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4821 if ${ac_cv_install_d_creates_dirs+:} false; then :
4822   $as_echo_n "(cached) " >&6
4823 else
4824   ac_cv_install_d_creates_dirs=no
4825      rm -rf conftestdir
4826      if mkdir conftestdir; then
4827        cd conftestdir 2>/dev/null
4828        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4829        if test -d dir1/dir2/. ; then
4830          ac_cv_install_d_creates_dirs=yes
4831        fi
4832        cd .. 2>/dev/null
4833        rm -rf conftestdir
4834      fi
4835
4836 fi
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_install_d_creates_dirs" >&5
4838 $as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4839
4840   if test "$ac_cv_install_d_creates_dirs" = no ; then
4841     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"mkdir -p\" creates intermediate directories" >&5
4842 $as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4843 if ${ac_cv_mkdir_p_creates_dirs+:} false; then :
4844   $as_echo_n "(cached) " >&6
4845 else
4846   ac_cv_mkdir_p_creates_dirs=no
4847        rm -rf conftestdir
4848        if mkdir conftestdir; then
4849          cd conftestdir 2>/dev/null
4850          mkdir -p dir1/dir2 >/dev/null 2>&1
4851          if test -d dir1/dir2/. ; then
4852            ac_cv_mkdir_p_creates_dirs=yes
4853          fi
4854          cd .. 2>/dev/null
4855          rm -rf conftestdir
4856        fi
4857
4858 fi
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_p_creates_dirs" >&5
4860 $as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4861   fi
4862
4863   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4864     INSTALL_DIRS='${INSTALL} -d'
4865   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4866     INSTALL_DIRS='mkdir -p'
4867   else
4868     # any other ideas?
4869     INSTALL_DIRS='${INSTALL} -d'
4870   fi
4871
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4873 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4874 set x ${MAKE-make}
4875 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4876 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4877   $as_echo_n "(cached) " >&6
4878 else
4879   cat >conftest.make <<\_ACEOF
4880 SHELL = /bin/sh
4881 all:
4882         @echo '@@@%%%=$(MAKE)=@@@%%%'
4883 _ACEOF
4884 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4885 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4886   *@@@%%%=?*=@@@%%%*)
4887     eval ac_cv_prog_make_${ac_make}_set=yes;;
4888   *)
4889     eval ac_cv_prog_make_${ac_make}_set=no;;
4890 esac
4891 rm -rf conftest.make
4892 fi
4893 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4895 $as_echo "yes" >&6; }
4896   SET_MAKE=
4897 else
4898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4899 $as_echo "no" >&6; }
4900   SET_MAKE="MAKE=${MAKE-make}"
4901 fi
4902
4903
4904 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4905 # That's wrong: it should be set to '${INSTALL}', so that one can
4906 # implement the "install-strip" target properly (strip executables,
4907 # but do not try to strip scripts.)
4908 #
4909 INSTALL_SCRIPT='${INSTALL}'
4910
4911 # random libc stuff
4912
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4914 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4915 if ${ac_cv_path_GREP+:} false; then :
4916   $as_echo_n "(cached) " >&6
4917 else
4918   if test -z "$GREP"; then
4919   ac_path_GREP_found=false
4920   # Loop through the user's path and test for each of PROGNAME-LIST
4921   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4922 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4923 do
4924   IFS=$as_save_IFS
4925   test -z "$as_dir" && as_dir=.
4926     for ac_prog in grep ggrep; do
4927     for ac_exec_ext in '' $ac_executable_extensions; do
4928       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4929       as_fn_executable_p "$ac_path_GREP" || continue
4930 # Check for GNU ac_path_GREP and select it if it is found.
4931   # Check for GNU $ac_path_GREP
4932 case `"$ac_path_GREP" --version 2>&1` in
4933 *GNU*)
4934   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4935 *)
4936   ac_count=0
4937   $as_echo_n 0123456789 >"conftest.in"
4938   while :
4939   do
4940     cat "conftest.in" "conftest.in" >"conftest.tmp"
4941     mv "conftest.tmp" "conftest.in"
4942     cp "conftest.in" "conftest.nl"
4943     $as_echo 'GREP' >> "conftest.nl"
4944     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4945     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4946     as_fn_arith $ac_count + 1 && ac_count=$as_val
4947     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4948       # Best one so far, save it but keep looking for a better one
4949       ac_cv_path_GREP="$ac_path_GREP"
4950       ac_path_GREP_max=$ac_count
4951     fi
4952     # 10*(2^10) chars as input seems more than enough
4953     test $ac_count -gt 10 && break
4954   done
4955   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4956 esac
4957
4958       $ac_path_GREP_found && break 3
4959     done
4960   done
4961   done
4962 IFS=$as_save_IFS
4963   if test -z "$ac_cv_path_GREP"; then
4964     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4965   fi
4966 else
4967   ac_cv_path_GREP=$GREP
4968 fi
4969
4970 fi
4971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4972 $as_echo "$ac_cv_path_GREP" >&6; }
4973  GREP="$ac_cv_path_GREP"
4974
4975
4976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4977 $as_echo_n "checking for egrep... " >&6; }
4978 if ${ac_cv_path_EGREP+:} false; then :
4979   $as_echo_n "(cached) " >&6
4980 else
4981   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4982    then ac_cv_path_EGREP="$GREP -E"
4983    else
4984      if test -z "$EGREP"; then
4985   ac_path_EGREP_found=false
4986   # Loop through the user's path and test for each of PROGNAME-LIST
4987   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4988 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4989 do
4990   IFS=$as_save_IFS
4991   test -z "$as_dir" && as_dir=.
4992     for ac_prog in egrep; do
4993     for ac_exec_ext in '' $ac_executable_extensions; do
4994       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4995       as_fn_executable_p "$ac_path_EGREP" || continue
4996 # Check for GNU ac_path_EGREP and select it if it is found.
4997   # Check for GNU $ac_path_EGREP
4998 case `"$ac_path_EGREP" --version 2>&1` in
4999 *GNU*)
5000   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5001 *)
5002   ac_count=0
5003   $as_echo_n 0123456789 >"conftest.in"
5004   while :
5005   do
5006     cat "conftest.in" "conftest.in" >"conftest.tmp"
5007     mv "conftest.tmp" "conftest.in"
5008     cp "conftest.in" "conftest.nl"
5009     $as_echo 'EGREP' >> "conftest.nl"
5010     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5011     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5012     as_fn_arith $ac_count + 1 && ac_count=$as_val
5013     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5014       # Best one so far, save it but keep looking for a better one
5015       ac_cv_path_EGREP="$ac_path_EGREP"
5016       ac_path_EGREP_max=$ac_count
5017     fi
5018     # 10*(2^10) chars as input seems more than enough
5019     test $ac_count -gt 10 && break
5020   done
5021   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
5022 esac
5023
5024       $ac_path_EGREP_found && break 3
5025     done
5026   done
5027   done
5028 IFS=$as_save_IFS
5029   if test -z "$ac_cv_path_EGREP"; then
5030     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5031   fi
5032 else
5033   ac_cv_path_EGREP=$EGREP
5034 fi
5035
5036    fi
5037 fi
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5039 $as_echo "$ac_cv_path_EGREP" >&6; }
5040  EGREP="$ac_cv_path_EGREP"
5041
5042
5043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5044 $as_echo_n "checking for ANSI C header files... " >&6; }
5045 if ${ac_cv_header_stdc+:} false; then :
5046   $as_echo_n "(cached) " >&6
5047 else
5048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5049 /* end confdefs.h.  */
5050 #include <stdlib.h>
5051 #include <stdarg.h>
5052 #include <string.h>
5053 #include <float.h>
5054
5055 int
5056 main ()
5057 {
5058
5059   ;
5060   return 0;
5061 }
5062 _ACEOF
5063 if ac_fn_c_try_compile "$LINENO"; then :
5064   ac_cv_header_stdc=yes
5065 else
5066   ac_cv_header_stdc=no
5067 fi
5068 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5069
5070 if test $ac_cv_header_stdc = yes; then
5071   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5073 /* end confdefs.h.  */
5074 #include <string.h>
5075
5076 _ACEOF
5077 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5078   $EGREP "memchr" >/dev/null 2>&1; then :
5079
5080 else
5081   ac_cv_header_stdc=no
5082 fi
5083 rm -rf conftest*
5084
5085 fi
5086
5087 if test $ac_cv_header_stdc = yes; then
5088   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5090 /* end confdefs.h.  */
5091 #include <stdlib.h>
5092
5093 _ACEOF
5094 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5095   $EGREP "free" >/dev/null 2>&1; then :
5096
5097 else
5098   ac_cv_header_stdc=no
5099 fi
5100 rm -rf conftest*
5101
5102 fi
5103
5104 if test $ac_cv_header_stdc = yes; then
5105   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5106   if test "$cross_compiling" = yes; then :
5107   :
5108 else
5109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5110 /* end confdefs.h.  */
5111 #include <ctype.h>
5112 #include <stdlib.h>
5113 #if ((' ' & 0x0FF) == 0x020)
5114 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5115 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5116 #else
5117 # define ISLOWER(c) \
5118                    (('a' <= (c) && (c) <= 'i') \
5119                      || ('j' <= (c) && (c) <= 'r') \
5120                      || ('s' <= (c) && (c) <= 'z'))
5121 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5122 #endif
5123
5124 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5125 int
5126 main ()
5127 {
5128   int i;
5129   for (i = 0; i < 256; i++)
5130     if (XOR (islower (i), ISLOWER (i))
5131         || toupper (i) != TOUPPER (i))
5132       return 2;
5133   return 0;
5134 }
5135 _ACEOF
5136 if ac_fn_c_try_run "$LINENO"; then :
5137
5138 else
5139   ac_cv_header_stdc=no
5140 fi
5141 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5142   conftest.$ac_objext conftest.beam conftest.$ac_ext
5143 fi
5144
5145 fi
5146 fi
5147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5148 $as_echo "$ac_cv_header_stdc" >&6; }
5149 if test $ac_cv_header_stdc = yes; then
5150
5151 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5152
5153 fi
5154
5155 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5156 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5157                   inttypes.h stdint.h unistd.h
5158 do :
5159   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5160 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5161 "
5162 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5163   cat >>confdefs.h <<_ACEOF
5164 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5165 _ACEOF
5166
5167 fi
5168
5169 done
5170
5171
5172 for ac_header in unistd.h
5173 do :
5174   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
5175 if test "x$ac_cv_header_unistd_h" = xyes; then :
5176   cat >>confdefs.h <<_ACEOF
5177 #define HAVE_UNISTD_H 1
5178 _ACEOF
5179
5180 fi
5181
5182 done
5183
5184 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
5185 if test "x$ac_cv_type_mode_t" = xyes; then :
5186
5187 else
5188
5189 cat >>confdefs.h <<_ACEOF
5190 #define mode_t int
5191 _ACEOF
5192
5193 fi
5194
5195 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
5196 if test "x$ac_cv_type_pid_t" = xyes; then :
5197
5198 else
5199
5200 cat >>confdefs.h <<_ACEOF
5201 #define pid_t int
5202 _ACEOF
5203
5204 fi
5205
5206 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
5207 if test "x$ac_cv_type_size_t" = xyes; then :
5208
5209 else
5210
5211 cat >>confdefs.h <<_ACEOF
5212 #define size_t unsigned int
5213 _ACEOF
5214
5215 fi
5216
5217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
5218 $as_echo_n "checking return type of signal handlers... " >&6; }
5219 if ${ac_cv_type_signal+:} false; then :
5220   $as_echo_n "(cached) " >&6
5221 else
5222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5223 /* end confdefs.h.  */
5224 #include <sys/types.h>
5225 #include <signal.h>
5226
5227 int
5228 main ()
5229 {
5230 return *(signal (0, 0)) (0) == 1;
5231   ;
5232   return 0;
5233 }
5234 _ACEOF
5235 if ac_fn_c_try_compile "$LINENO"; then :
5236   ac_cv_type_signal=int
5237 else
5238   ac_cv_type_signal=void
5239 fi
5240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5241 fi
5242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
5243 $as_echo "$ac_cv_type_signal" >&6; }
5244
5245 cat >>confdefs.h <<_ACEOF
5246 #define RETSIGTYPE $ac_cv_type_signal
5247 _ACEOF
5248
5249
5250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
5251 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5252 if ${ac_cv_header_time+:} false; then :
5253   $as_echo_n "(cached) " >&6
5254 else
5255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5256 /* end confdefs.h.  */
5257 #include <sys/types.h>
5258 #include <sys/time.h>
5259 #include <time.h>
5260
5261 int
5262 main ()
5263 {
5264 if ((struct tm *) 0)
5265 return 0;
5266   ;
5267   return 0;
5268 }
5269 _ACEOF
5270 if ac_fn_c_try_compile "$LINENO"; then :
5271   ac_cv_header_time=yes
5272 else
5273   ac_cv_header_time=no
5274 fi
5275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5276 fi
5277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
5278 $as_echo "$ac_cv_header_time" >&6; }
5279 if test $ac_cv_header_time = yes; then
5280
5281 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
5282
5283 fi
5284
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
5286 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5287 if ${ac_cv_header_sys_wait_h+:} false; then :
5288   $as_echo_n "(cached) " >&6
5289 else
5290   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5291 /* end confdefs.h.  */
5292 #include <sys/types.h>
5293 #include <sys/wait.h>
5294 #ifndef WEXITSTATUS
5295 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5296 #endif
5297 #ifndef WIFEXITED
5298 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5299 #endif
5300
5301 int
5302 main ()
5303 {
5304   int s;
5305   wait (&s);
5306   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5307   ;
5308   return 0;
5309 }
5310 _ACEOF
5311 if ac_fn_c_try_compile "$LINENO"; then :
5312   ac_cv_header_sys_wait_h=yes
5313 else
5314   ac_cv_header_sys_wait_h=no
5315 fi
5316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5317 fi
5318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
5319 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
5320 if test $ac_cv_header_sys_wait_h = yes; then
5321
5322 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
5323
5324 fi
5325
5326 ac_header_dirent=no
5327 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5328   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
5330 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5331 if eval \${$as_ac_Header+:} false; then :
5332   $as_echo_n "(cached) " >&6
5333 else
5334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5335 /* end confdefs.h.  */
5336 #include <sys/types.h>
5337 #include <$ac_hdr>
5338
5339 int
5340 main ()
5341 {
5342 if ((DIR *) 0)
5343 return 0;
5344   ;
5345   return 0;
5346 }
5347 _ACEOF
5348 if ac_fn_c_try_compile "$LINENO"; then :
5349   eval "$as_ac_Header=yes"
5350 else
5351   eval "$as_ac_Header=no"
5352 fi
5353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5354 fi
5355 eval ac_res=\$$as_ac_Header
5356                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5357 $as_echo "$ac_res" >&6; }
5358 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5359   cat >>confdefs.h <<_ACEOF
5360 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5361 _ACEOF
5362
5363 ac_header_dirent=$ac_hdr; break
5364 fi
5365
5366 done
5367 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5368 if test $ac_header_dirent = dirent.h; then
5369   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
5370 $as_echo_n "checking for library containing opendir... " >&6; }
5371 if ${ac_cv_search_opendir+:} false; then :
5372   $as_echo_n "(cached) " >&6
5373 else
5374   ac_func_search_save_LIBS=$LIBS
5375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5376 /* end confdefs.h.  */
5377
5378 /* Override any GCC internal prototype to avoid an error.
5379    Use char because int might match the return type of a GCC
5380    builtin and then its argument prototype would still apply.  */
5381 #ifdef __cplusplus
5382 extern "C"
5383 #endif
5384 char opendir ();
5385 int
5386 main ()
5387 {
5388 return opendir ();
5389   ;
5390   return 0;
5391 }
5392 _ACEOF
5393 for ac_lib in '' dir; do
5394   if test -z "$ac_lib"; then
5395     ac_res="none required"
5396   else
5397     ac_res=-l$ac_lib
5398     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5399   fi
5400   if ac_fn_c_try_link "$LINENO"; then :
5401   ac_cv_search_opendir=$ac_res
5402 fi
5403 rm -f core conftest.err conftest.$ac_objext \
5404     conftest$ac_exeext
5405   if ${ac_cv_search_opendir+:} false; then :
5406   break
5407 fi
5408 done
5409 if ${ac_cv_search_opendir+:} false; then :
5410
5411 else
5412   ac_cv_search_opendir=no
5413 fi
5414 rm conftest.$ac_ext
5415 LIBS=$ac_func_search_save_LIBS
5416 fi
5417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
5418 $as_echo "$ac_cv_search_opendir" >&6; }
5419 ac_res=$ac_cv_search_opendir
5420 if test "$ac_res" != no; then :
5421   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5422
5423 fi
5424
5425 else
5426   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
5427 $as_echo_n "checking for library containing opendir... " >&6; }
5428 if ${ac_cv_search_opendir+:} false; then :
5429   $as_echo_n "(cached) " >&6
5430 else
5431   ac_func_search_save_LIBS=$LIBS
5432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5433 /* end confdefs.h.  */
5434
5435 /* Override any GCC internal prototype to avoid an error.
5436    Use char because int might match the return type of a GCC
5437    builtin and then its argument prototype would still apply.  */
5438 #ifdef __cplusplus
5439 extern "C"
5440 #endif
5441 char opendir ();
5442 int
5443 main ()
5444 {
5445 return opendir ();
5446   ;
5447   return 0;
5448 }
5449 _ACEOF
5450 for ac_lib in '' x; do
5451   if test -z "$ac_lib"; then
5452     ac_res="none required"
5453   else
5454     ac_res=-l$ac_lib
5455     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5456   fi
5457   if ac_fn_c_try_link "$LINENO"; then :
5458   ac_cv_search_opendir=$ac_res
5459 fi
5460 rm -f core conftest.err conftest.$ac_objext \
5461     conftest$ac_exeext
5462   if ${ac_cv_search_opendir+:} false; then :
5463   break
5464 fi
5465 done
5466 if ${ac_cv_search_opendir+:} false; then :
5467
5468 else
5469   ac_cv_search_opendir=no
5470 fi
5471 rm conftest.$ac_ext
5472 LIBS=$ac_func_search_save_LIBS
5473 fi
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
5475 $as_echo "$ac_cv_search_opendir" >&6; }
5476 ac_res=$ac_cv_search_opendir
5477 if test "$ac_res" != no; then :
5478   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5479
5480 fi
5481
5482 fi
5483
5484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call gettimeofday" >&5
5485 $as_echo_n "checking how to call gettimeofday... " >&6; }
5486   if ${ac_cv_gettimeofday_args+:} false; then :
5487   $as_echo_n "(cached) " >&6
5488 else
5489   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5490 /* end confdefs.h.  */
5491 #include <stdlib.h>
5492                     #include <sys/time.h>
5493 int
5494 main ()
5495 {
5496 struct timeval tv; struct timezone tzp;
5497                     gettimeofday(&tv, &tzp);
5498   ;
5499   return 0;
5500 }
5501 _ACEOF
5502 if ac_fn_c_try_compile "$LINENO"; then :
5503   ac_gettimeofday_args=2
5504 else
5505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5506 /* end confdefs.h.  */
5507 #include <stdlib.h>
5508                                     #include <sys/time.h>
5509 int
5510 main ()
5511 {
5512 struct timeval tv; gettimeofday(&tv);
5513   ;
5514   return 0;
5515 }
5516 _ACEOF
5517 if ac_fn_c_try_compile "$LINENO"; then :
5518   ac_gettimeofday_args=1
5519 else
5520   ac_gettimeofday_args=0
5521 fi
5522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5523 fi
5524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5525     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5526 fi
5527
5528   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5529   if test "$ac_gettimeofday_args" = 1 ; then
5530     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5531
5532     { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
5533 $as_echo "one argument" >&6; }
5534   elif test "$ac_gettimeofday_args" = 2 ; then
5535     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5536
5537     $as_echo "#define GETTIMEOFDAY_TWO_ARGS 1" >>confdefs.h
5538
5539     { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
5540 $as_echo "two arguments" >&6; }
5541   else
5542     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
5543 $as_echo "unknown" >&6; }
5544   fi
5545
5546 # Check whether --enable-largefile was given.
5547 if test "${enable_largefile+set}" = set; then :
5548   enableval=$enable_largefile;
5549 fi
5550
5551 if test "$enable_largefile" != no; then
5552
5553   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5554 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5555 if ${ac_cv_sys_largefile_CC+:} false; then :
5556   $as_echo_n "(cached) " >&6
5557 else
5558   ac_cv_sys_largefile_CC=no
5559      if test "$GCC" != yes; then
5560        ac_save_CC=$CC
5561        while :; do
5562          # IRIX 6.2 and later do not support large files by default,
5563          # so use the C compiler's -n32 option if that helps.
5564          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5565 /* end confdefs.h.  */
5566 #include <sys/types.h>
5567  /* Check that off_t can represent 2**63 - 1 correctly.
5568     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5569     since some C++ compilers masquerading as C compilers
5570     incorrectly reject 9223372036854775807.  */
5571 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5572   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5573                        && LARGE_OFF_T % 2147483647 == 1)
5574                       ? 1 : -1];
5575 int
5576 main ()
5577 {
5578
5579   ;
5580   return 0;
5581 }
5582 _ACEOF
5583          if ac_fn_c_try_compile "$LINENO"; then :
5584   break
5585 fi
5586 rm -f core conftest.err conftest.$ac_objext
5587          CC="$CC -n32"
5588          if ac_fn_c_try_compile "$LINENO"; then :
5589   ac_cv_sys_largefile_CC=' -n32'; break
5590 fi
5591 rm -f core conftest.err conftest.$ac_objext
5592          break
5593        done
5594        CC=$ac_save_CC
5595        rm -rf conftest.$ac_ext
5596     fi
5597 fi
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5599 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5600   if test "$ac_cv_sys_largefile_CC" != no; then
5601     CC=$CC$ac_cv_sys_largefile_CC
5602   fi
5603
5604   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5605 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5606 if ${ac_cv_sys_file_offset_bits+:} false; then :
5607   $as_echo_n "(cached) " >&6
5608 else
5609   while :; do
5610   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5611 /* end confdefs.h.  */
5612 #include <sys/types.h>
5613  /* Check that off_t can represent 2**63 - 1 correctly.
5614     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5615     since some C++ compilers masquerading as C compilers
5616     incorrectly reject 9223372036854775807.  */
5617 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5618   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5619                        && LARGE_OFF_T % 2147483647 == 1)
5620                       ? 1 : -1];
5621 int
5622 main ()
5623 {
5624
5625   ;
5626   return 0;
5627 }
5628 _ACEOF
5629 if ac_fn_c_try_compile "$LINENO"; then :
5630   ac_cv_sys_file_offset_bits=no; break
5631 fi
5632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5633   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5634 /* end confdefs.h.  */
5635 #define _FILE_OFFSET_BITS 64
5636 #include <sys/types.h>
5637  /* Check that off_t can represent 2**63 - 1 correctly.
5638     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5639     since some C++ compilers masquerading as C compilers
5640     incorrectly reject 9223372036854775807.  */
5641 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5642   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5643                        && LARGE_OFF_T % 2147483647 == 1)
5644                       ? 1 : -1];
5645 int
5646 main ()
5647 {
5648
5649   ;
5650   return 0;
5651 }
5652 _ACEOF
5653 if ac_fn_c_try_compile "$LINENO"; then :
5654   ac_cv_sys_file_offset_bits=64; break
5655 fi
5656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5657   ac_cv_sys_file_offset_bits=unknown
5658   break
5659 done
5660 fi
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5662 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5663 case $ac_cv_sys_file_offset_bits in #(
5664   no | unknown) ;;
5665   *)
5666 cat >>confdefs.h <<_ACEOF
5667 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5668 _ACEOF
5669 ;;
5670 esac
5671 rm -rf conftest*
5672   if test $ac_cv_sys_file_offset_bits = unknown; then
5673     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5674 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5675 if ${ac_cv_sys_large_files+:} false; then :
5676   $as_echo_n "(cached) " >&6
5677 else
5678   while :; do
5679   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5680 /* end confdefs.h.  */
5681 #include <sys/types.h>
5682  /* Check that off_t can represent 2**63 - 1 correctly.
5683     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5684     since some C++ compilers masquerading as C compilers
5685     incorrectly reject 9223372036854775807.  */
5686 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5687   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5688                        && LARGE_OFF_T % 2147483647 == 1)
5689                       ? 1 : -1];
5690 int
5691 main ()
5692 {
5693
5694   ;
5695   return 0;
5696 }
5697 _ACEOF
5698 if ac_fn_c_try_compile "$LINENO"; then :
5699   ac_cv_sys_large_files=no; break
5700 fi
5701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5703 /* end confdefs.h.  */
5704 #define _LARGE_FILES 1
5705 #include <sys/types.h>
5706  /* Check that off_t can represent 2**63 - 1 correctly.
5707     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5708     since some C++ compilers masquerading as C compilers
5709     incorrectly reject 9223372036854775807.  */
5710 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5711   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5712                        && LARGE_OFF_T % 2147483647 == 1)
5713                       ? 1 : -1];
5714 int
5715 main ()
5716 {
5717
5718   ;
5719   return 0;
5720 }
5721 _ACEOF
5722 if ac_fn_c_try_compile "$LINENO"; then :
5723   ac_cv_sys_large_files=1; break
5724 fi
5725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5726   ac_cv_sys_large_files=unknown
5727   break
5728 done
5729 fi
5730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5731 $as_echo "$ac_cv_sys_large_files" >&6; }
5732 case $ac_cv_sys_large_files in #(
5733   no | unknown) ;;
5734   *)
5735 cat >>confdefs.h <<_ACEOF
5736 #define _LARGE_FILES $ac_cv_sys_large_files
5737 _ACEOF
5738 ;;
5739 esac
5740 rm -rf conftest*
5741   fi
5742
5743
5744 fi
5745
5746 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5747 do :
5748   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5749 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5750 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5751   cat >>confdefs.h <<_ACEOF
5752 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5753 _ACEOF
5754
5755 fi
5756 done
5757
5758 for ac_func in sigaction syslog realpath setrlimit
5759 do :
5760   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5761 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5762 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5763   cat >>confdefs.h <<_ACEOF
5764 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5765 _ACEOF
5766
5767 fi
5768 done
5769
5770 for ac_func in setlocale
5771 do :
5772   ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
5773 if test "x$ac_cv_func_setlocale" = xyes; then :
5774   cat >>confdefs.h <<_ACEOF
5775 #define HAVE_SETLOCALE 1
5776 _ACEOF
5777
5778 fi
5779 done
5780
5781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmp" >&5
5782 $as_echo_n "checking for struct icmp... " >&6; }
5783 if ${ac_cv_have_icmp+:} false; then :
5784   $as_echo_n "(cached) " >&6
5785 else
5786   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5787 /* end confdefs.h.  */
5788 #include <stdlib.h>
5789                    #include <stdio.h>
5790                    #include <math.h>
5791                    #include <unistd.h>
5792                    #include <limits.h>
5793                    #include <signal.h>
5794                    #include <fcntl.h>
5795                    #include <sys/types.h>
5796                    #include <sys/time.h>
5797                    #include <sys/ipc.h>
5798                    #include <sys/shm.h>
5799                    #include <sys/socket.h>
5800                    #include <netinet/in_systm.h>
5801                    #include <netinet/in.h>
5802                    #include <netinet/ip.h>
5803                    #include <netinet/ip_icmp.h>
5804                    #include <netinet/udp.h>
5805                    #include <arpa/inet.h>
5806                    #include <netdb.h>
5807 int
5808 main ()
5809 {
5810 struct icmp i;
5811                    struct sockaddr s;
5812                    struct sockaddr_in si;
5813                    struct ip ip;
5814                    i.icmp_type = ICMP_ECHO;
5815                    i.icmp_code = 0;
5816                    i.icmp_cksum = 0;
5817                    i.icmp_id = 0;
5818                    i.icmp_seq = 0;
5819                    si.sin_family = AF_INET;
5820                    #if defined(__DECC) || defined(_IP_VHL)
5821                    ip.ip_vhl = 0;
5822                    #else
5823                    ip.ip_hl = 0;
5824                    #endif
5825
5826   ;
5827   return 0;
5828 }
5829 _ACEOF
5830 if ac_fn_c_try_compile "$LINENO"; then :
5831   ac_cv_have_icmp=yes
5832 else
5833   ac_cv_have_icmp=no
5834 fi
5835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5836 fi
5837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmp" >&5
5838 $as_echo "$ac_cv_have_icmp" >&6; }
5839  if test "$ac_cv_have_icmp" = yes ; then
5840    $as_echo "#define HAVE_ICMP 1" >>confdefs.h
5841
5842  fi
5843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmphdr" >&5
5844 $as_echo_n "checking for struct icmphdr... " >&6; }
5845 if ${ac_cv_have_icmphdr+:} false; then :
5846   $as_echo_n "(cached) " >&6
5847 else
5848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5849 /* end confdefs.h.  */
5850 #include <stdlib.h>
5851                    #include <stdio.h>
5852                    #include <math.h>
5853                    #include <unistd.h>
5854                    #include <limits.h>
5855                    #include <signal.h>
5856                    #include <fcntl.h>
5857                    #include <sys/types.h>
5858                    #include <sys/time.h>
5859                    #include <sys/ipc.h>
5860                    #include <sys/shm.h>
5861                    #include <sys/socket.h>
5862                    #include <netinet/in_systm.h>
5863                    #include <netinet/in.h>
5864                    #include <netinet/ip.h>
5865                    #include <netinet/ip_icmp.h>
5866                    #include <netinet/udp.h>
5867                    #include <arpa/inet.h>
5868                    #include <netdb.h>
5869 int
5870 main ()
5871 {
5872 struct icmphdr i;
5873                    struct sockaddr s;
5874                    struct sockaddr_in si;
5875                    struct ip ip;
5876                    i.type = ICMP_ECHO;
5877                    i.code = 0;
5878                    i.checksum = 0;
5879                    i.un.echo.id = 0;
5880                    i.un.echo.sequence = 0;
5881                    si.sin_family = AF_INET;
5882                    ip.ip_hl = 0;
5883   ;
5884   return 0;
5885 }
5886 _ACEOF
5887 if ac_fn_c_try_compile "$LINENO"; then :
5888   ac_cv_have_icmphdr=yes
5889 else
5890   ac_cv_have_icmphdr=no
5891 fi
5892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5893 fi
5894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmphdr" >&5
5895 $as_echo "$ac_cv_have_icmphdr" >&6; }
5896  if test "$ac_cv_have_icmphdr" = yes ; then
5897    $as_echo "#define HAVE_ICMPHDR 1" >>confdefs.h
5898
5899  fi
5900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs" >&5
5901 $as_echo_n "checking for getifaddrs... " >&6; }
5902 if ${ac_cv_have_getifaddrs+:} false; then :
5903   $as_echo_n "(cached) " >&6
5904 else
5905   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5906 /* end confdefs.h.  */
5907 #include <stdlib.h>
5908                    #include <unistd.h>
5909                    #include <arpa/inet.h>
5910                    #include <ifaddrs.h>
5911 int
5912 main ()
5913 {
5914 struct ifaddrs *ifa;
5915                    getifaddrs (&ifa);
5916                    ifa->ifa_next = 0;
5917                    ifa->ifa_addr->sa_family = 0;
5918   ;
5919   return 0;
5920 }
5921 _ACEOF
5922 if ac_fn_c_try_compile "$LINENO"; then :
5923   ac_cv_have_getifaddrs=yes
5924 else
5925   ac_cv_have_getifaddrs=no
5926 fi
5927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5928 fi
5929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getifaddrs" >&5
5930 $as_echo "$ac_cv_have_getifaddrs" >&6; }
5931  if test "$ac_cv_have_getifaddrs" = yes ; then
5932    $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
5933
5934  fi
5935 for ac_header in crypt.h sys/select.h
5936 do :
5937   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5938 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5939 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5940   cat >>confdefs.h <<_ACEOF
5941 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5942 _ACEOF
5943
5944 fi
5945
5946 done
5947
5948 for ac_prog in perl5 perl
5949 do
5950   # Extract the first word of "$ac_prog", so it can be a program name with args.
5951 set dummy $ac_prog; ac_word=$2
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5953 $as_echo_n "checking for $ac_word... " >&6; }
5954 if ${ac_cv_path_PERL+:} false; then :
5955   $as_echo_n "(cached) " >&6
5956 else
5957   case $PERL in
5958   [\\/]* | ?:[\\/]*)
5959   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5960   ;;
5961   *)
5962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963 for as_dir in $PATH
5964 do
5965   IFS=$as_save_IFS
5966   test -z "$as_dir" && as_dir=.
5967     for ac_exec_ext in '' $ac_executable_extensions; do
5968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5969     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5971     break 2
5972   fi
5973 done
5974   done
5975 IFS=$as_save_IFS
5976
5977   ;;
5978 esac
5979 fi
5980 PERL=$ac_cv_path_PERL
5981 if test -n "$PERL"; then
5982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
5983 $as_echo "$PERL" >&6; }
5984 else
5985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986 $as_echo "no" >&6; }
5987 fi
5988
5989
5990   test -n "$PERL" && break
5991 done
5992
5993   if test -z "$PERL" ; then
5994     PERL_VERSION=0
5995   else
5996     { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5
5997 $as_echo_n "checking perl version... " >&6; }
5998 if ${ac_cv_perl_version+:} false; then :
5999   $as_echo_n "(cached) " >&6
6000 else
6001   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6002 fi
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_perl_version" >&5
6004 $as_echo "$ac_cv_perl_version" >&6; }
6005     PERL_VERSION=$ac_cv_perl_version
6006   fi
6007
6008
6009 if test -z "$PERL" ; then
6010   # don't let it be blank...
6011   PERL=/usr/bin/perl
6012 fi
6013
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
6015 $as_echo_n "checking for X... " >&6; }
6016
6017
6018 # Check whether --with-x was given.
6019 if test "${with_x+set}" = set; then :
6020   withval=$with_x;
6021 fi
6022
6023 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6024 if test "x$with_x" = xno; then
6025   # The user explicitly disabled X.
6026   have_x=disabled
6027 else
6028   case $x_includes,$x_libraries in #(
6029     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
6030     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
6031   $as_echo_n "(cached) " >&6
6032 else
6033   # One or both of the vars are not set, and there is no cached value.
6034 ac_x_includes=no ac_x_libraries=no
6035 rm -f -r conftest.dir
6036 if mkdir conftest.dir; then
6037   cd conftest.dir
6038   cat >Imakefile <<'_ACEOF'
6039 incroot:
6040         @echo incroot='${INCROOT}'
6041 usrlibdir:
6042         @echo usrlibdir='${USRLIBDIR}'
6043 libdir:
6044         @echo libdir='${LIBDIR}'
6045 _ACEOF
6046   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6047     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6048     for ac_var in incroot usrlibdir libdir; do
6049       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6050     done
6051     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6052     for ac_extension in a so sl dylib la dll; do
6053       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6054          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6055         ac_im_usrlibdir=$ac_im_libdir; break
6056       fi
6057     done
6058     # Screen out bogus values from the imake configuration.  They are
6059     # bogus both because they are the default anyway, and because
6060     # using them would break gcc on systems where it needs fixed includes.
6061     case $ac_im_incroot in
6062         /usr/include) ac_x_includes= ;;
6063         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6064     esac
6065     case $ac_im_usrlibdir in
6066         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6067         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6068     esac
6069   fi
6070   cd ..
6071   rm -f -r conftest.dir
6072 fi
6073
6074 # Standard set of common directories for X headers.
6075 # Check X11 before X11Rn because it is often a symlink to the current release.
6076 ac_x_header_dirs='
6077 /usr/X11/include
6078 /usr/X11R7/include
6079 /usr/X11R6/include
6080 /usr/X11R5/include
6081 /usr/X11R4/include
6082
6083 /usr/include/X11
6084 /usr/include/X11R7
6085 /usr/include/X11R6
6086 /usr/include/X11R5
6087 /usr/include/X11R4
6088
6089 /usr/local/X11/include
6090 /usr/local/X11R7/include
6091 /usr/local/X11R6/include
6092 /usr/local/X11R5/include
6093 /usr/local/X11R4/include
6094
6095 /usr/local/include/X11
6096 /usr/local/include/X11R7
6097 /usr/local/include/X11R6
6098 /usr/local/include/X11R5
6099 /usr/local/include/X11R4
6100
6101 /usr/X386/include
6102 /usr/x386/include
6103 /usr/XFree86/include/X11
6104
6105 /usr/include
6106 /usr/local/include
6107 /usr/unsupported/include
6108 /usr/athena/include
6109 /usr/local/x11r5/include
6110 /usr/lpp/Xamples/include
6111
6112 /usr/openwin/include
6113 /usr/openwin/share/include'
6114
6115 if test "$ac_x_includes" = no; then
6116   # Guess where to find include files, by looking for Xlib.h.
6117   # First, try using that file with no special directory specified.
6118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6119 /* end confdefs.h.  */
6120 #include <X11/Xlib.h>
6121 _ACEOF
6122 if ac_fn_c_try_cpp "$LINENO"; then :
6123   # We can compile using X headers with no special include directory.
6124 ac_x_includes=
6125 else
6126   for ac_dir in $ac_x_header_dirs; do
6127   if test -r "$ac_dir/X11/Xlib.h"; then
6128     ac_x_includes=$ac_dir
6129     break
6130   fi
6131 done
6132 fi
6133 rm -rf conftest.err conftest.i conftest.$ac_ext
6134 fi # $ac_x_includes = no
6135
6136 if test "$ac_x_libraries" = no; then
6137   # Check for the libraries.
6138   # See if we find them without any special options.
6139   # Don't add to $LIBS permanently.
6140   ac_save_LIBS=$LIBS
6141   LIBS="-lX11 $LIBS"
6142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6143 /* end confdefs.h.  */
6144 #include <X11/Xlib.h>
6145 int
6146 main ()
6147 {
6148 XrmInitialize ()
6149   ;
6150   return 0;
6151 }
6152 _ACEOF
6153 if ac_fn_c_try_link "$LINENO"; then :
6154   LIBS=$ac_save_LIBS
6155 # We can link X programs with no special library path.
6156 ac_x_libraries=
6157 else
6158   LIBS=$ac_save_LIBS
6159 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6160 do
6161   # Don't even attempt the hair of trying to link an X program!
6162   for ac_extension in a so sl dylib la dll; do
6163     if test -r "$ac_dir/libX11.$ac_extension"; then
6164       ac_x_libraries=$ac_dir
6165       break 2
6166     fi
6167   done
6168 done
6169 fi
6170 rm -f core conftest.err conftest.$ac_objext \
6171     conftest$ac_exeext conftest.$ac_ext
6172 fi # $ac_x_libraries = no
6173
6174 case $ac_x_includes,$ac_x_libraries in #(
6175   no,* | *,no | *\'*)
6176     # Didn't find X, or a directory has "'" in its name.
6177     ac_cv_have_x="have_x=no";; #(
6178   *)
6179     # Record where we found X for the cache.
6180     ac_cv_have_x="have_x=yes\
6181         ac_x_includes='$ac_x_includes'\
6182         ac_x_libraries='$ac_x_libraries'"
6183 esac
6184 fi
6185 ;; #(
6186     *) have_x=yes;;
6187   esac
6188   eval "$ac_cv_have_x"
6189 fi # $with_x != no
6190
6191 if test "$have_x" != yes; then
6192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
6193 $as_echo "$have_x" >&6; }
6194   no_x=yes
6195 else
6196   # If each of the values was on the command line, it overrides each guess.
6197   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6198   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6199   # Update the cache value to reflect the command line values.
6200   ac_cv_have_x="have_x=yes\
6201         ac_x_includes='$x_includes'\
6202         ac_x_libraries='$x_libraries'"
6203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
6204 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
6205 fi
6206
6207 if test "$no_x" = yes; then
6208   # Not all programs may use this symbol, but it does not hurt to define it.
6209
6210 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
6211
6212   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6213 else
6214   if test -n "$x_includes"; then
6215     X_CFLAGS="$X_CFLAGS -I$x_includes"
6216   fi
6217
6218   # It would also be nice to do this for all -L options, not just this one.
6219   if test -n "$x_libraries"; then
6220     X_LIBS="$X_LIBS -L$x_libraries"
6221     # For Solaris; some versions of Sun CC require a space after -R and
6222     # others require no space.  Words are not sufficient . . . .
6223     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
6224 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
6225     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6226     ac_xsave_c_werror_flag=$ac_c_werror_flag
6227     ac_c_werror_flag=yes
6228     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6229 /* end confdefs.h.  */
6230
6231 int
6232 main ()
6233 {
6234
6235   ;
6236   return 0;
6237 }
6238 _ACEOF
6239 if ac_fn_c_try_link "$LINENO"; then :
6240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6241 $as_echo "no" >&6; }
6242        X_LIBS="$X_LIBS -R$x_libraries"
6243 else
6244   LIBS="$ac_xsave_LIBS -R $x_libraries"
6245        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6246 /* end confdefs.h.  */
6247
6248 int
6249 main ()
6250 {
6251
6252   ;
6253   return 0;
6254 }
6255 _ACEOF
6256 if ac_fn_c_try_link "$LINENO"; then :
6257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6258 $as_echo "yes" >&6; }
6259           X_LIBS="$X_LIBS -R $x_libraries"
6260 else
6261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
6262 $as_echo "neither works" >&6; }
6263 fi
6264 rm -f core conftest.err conftest.$ac_objext \
6265     conftest$ac_exeext conftest.$ac_ext
6266 fi
6267 rm -f core conftest.err conftest.$ac_objext \
6268     conftest$ac_exeext conftest.$ac_ext
6269     ac_c_werror_flag=$ac_xsave_c_werror_flag
6270     LIBS=$ac_xsave_LIBS
6271   fi
6272
6273   # Check for system-dependent libraries X programs must link with.
6274   # Do this before checking for the system-independent R6 libraries
6275   # (-lICE), since we may need -lsocket or whatever for X linking.
6276
6277   if test "$ISC" = yes; then
6278     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6279   else
6280     # Martyn Johnson says this is needed for Ultrix, if the X
6281     # libraries were built with DECnet support.  And Karl Berry says
6282     # the Alpha needs dnet_stub (dnet does not exist).
6283     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6284     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6285 /* end confdefs.h.  */
6286
6287 /* Override any GCC internal prototype to avoid an error.
6288    Use char because int might match the return type of a GCC
6289    builtin and then its argument prototype would still apply.  */
6290 #ifdef __cplusplus
6291 extern "C"
6292 #endif
6293 char XOpenDisplay ();
6294 int
6295 main ()
6296 {
6297 return XOpenDisplay ();
6298   ;
6299   return 0;
6300 }
6301 _ACEOF
6302 if ac_fn_c_try_link "$LINENO"; then :
6303
6304 else
6305   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
6306 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
6307 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
6308   $as_echo_n "(cached) " >&6
6309 else
6310   ac_check_lib_save_LIBS=$LIBS
6311 LIBS="-ldnet  $LIBS"
6312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6313 /* end confdefs.h.  */
6314
6315 /* Override any GCC internal prototype to avoid an error.
6316    Use char because int might match the return type of a GCC
6317    builtin and then its argument prototype would still apply.  */
6318 #ifdef __cplusplus
6319 extern "C"
6320 #endif
6321 char dnet_ntoa ();
6322 int
6323 main ()
6324 {
6325 return dnet_ntoa ();
6326   ;
6327   return 0;
6328 }
6329 _ACEOF
6330 if ac_fn_c_try_link "$LINENO"; then :
6331   ac_cv_lib_dnet_dnet_ntoa=yes
6332 else
6333   ac_cv_lib_dnet_dnet_ntoa=no
6334 fi
6335 rm -f core conftest.err conftest.$ac_objext \
6336     conftest$ac_exeext conftest.$ac_ext
6337 LIBS=$ac_check_lib_save_LIBS
6338 fi
6339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6340 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6341 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
6342   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6343 fi
6344
6345     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6346       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
6347 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
6348 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
6349   $as_echo_n "(cached) " >&6
6350 else
6351   ac_check_lib_save_LIBS=$LIBS
6352 LIBS="-ldnet_stub  $LIBS"
6353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6354 /* end confdefs.h.  */
6355
6356 /* Override any GCC internal prototype to avoid an error.
6357    Use char because int might match the return type of a GCC
6358    builtin and then its argument prototype would still apply.  */
6359 #ifdef __cplusplus
6360 extern "C"
6361 #endif
6362 char dnet_ntoa ();
6363 int
6364 main ()
6365 {
6366 return dnet_ntoa ();
6367   ;
6368   return 0;
6369 }
6370 _ACEOF
6371 if ac_fn_c_try_link "$LINENO"; then :
6372   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6373 else
6374   ac_cv_lib_dnet_stub_dnet_ntoa=no
6375 fi
6376 rm -f core conftest.err conftest.$ac_objext \
6377     conftest$ac_exeext conftest.$ac_ext
6378 LIBS=$ac_check_lib_save_LIBS
6379 fi
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6381 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6382 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
6383   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6384 fi
6385
6386     fi
6387 fi
6388 rm -f core conftest.err conftest.$ac_objext \
6389     conftest$ac_exeext conftest.$ac_ext
6390     LIBS="$ac_xsave_LIBS"
6391
6392     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6393     # to get the SysV transport functions.
6394     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6395     # needs -lnsl.
6396     # The nsl library prevents programs from opening the X display
6397     # on Irix 5.2, according to T.E. Dickey.
6398     # The functions gethostbyname, getservbyname, and inet_addr are
6399     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6400     ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
6401 if test "x$ac_cv_func_gethostbyname" = xyes; then :
6402
6403 fi
6404
6405     if test $ac_cv_func_gethostbyname = no; then
6406       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
6407 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
6408 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
6409   $as_echo_n "(cached) " >&6
6410 else
6411   ac_check_lib_save_LIBS=$LIBS
6412 LIBS="-lnsl  $LIBS"
6413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6414 /* end confdefs.h.  */
6415
6416 /* Override any GCC internal prototype to avoid an error.
6417    Use char because int might match the return type of a GCC
6418    builtin and then its argument prototype would still apply.  */
6419 #ifdef __cplusplus
6420 extern "C"
6421 #endif
6422 char gethostbyname ();
6423 int
6424 main ()
6425 {
6426 return gethostbyname ();
6427   ;
6428   return 0;
6429 }
6430 _ACEOF
6431 if ac_fn_c_try_link "$LINENO"; then :
6432   ac_cv_lib_nsl_gethostbyname=yes
6433 else
6434   ac_cv_lib_nsl_gethostbyname=no
6435 fi
6436 rm -f core conftest.err conftest.$ac_objext \
6437     conftest$ac_exeext conftest.$ac_ext
6438 LIBS=$ac_check_lib_save_LIBS
6439 fi
6440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
6441 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
6442 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
6443   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6444 fi
6445
6446       if test $ac_cv_lib_nsl_gethostbyname = no; then
6447         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
6448 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
6449 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
6450   $as_echo_n "(cached) " >&6
6451 else
6452   ac_check_lib_save_LIBS=$LIBS
6453 LIBS="-lbsd  $LIBS"
6454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6455 /* end confdefs.h.  */
6456
6457 /* Override any GCC internal prototype to avoid an error.
6458    Use char because int might match the return type of a GCC
6459    builtin and then its argument prototype would still apply.  */
6460 #ifdef __cplusplus
6461 extern "C"
6462 #endif
6463 char gethostbyname ();
6464 int
6465 main ()
6466 {
6467 return gethostbyname ();
6468   ;
6469   return 0;
6470 }
6471 _ACEOF
6472 if ac_fn_c_try_link "$LINENO"; then :
6473   ac_cv_lib_bsd_gethostbyname=yes
6474 else
6475   ac_cv_lib_bsd_gethostbyname=no
6476 fi
6477 rm -f core conftest.err conftest.$ac_objext \
6478     conftest$ac_exeext conftest.$ac_ext
6479 LIBS=$ac_check_lib_save_LIBS
6480 fi
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
6482 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
6483 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
6484   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6485 fi
6486
6487       fi
6488     fi
6489
6490     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6491     # socket/setsockopt and other routines are undefined under SCO ODT
6492     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6493     # on later versions), says Simon Leinen: it contains gethostby*
6494     # variants that don't use the name server (or something).  -lsocket
6495     # must be given before -lnsl if both are needed.  We assume that
6496     # if connect needs -lnsl, so does gethostbyname.
6497     ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
6498 if test "x$ac_cv_func_connect" = xyes; then :
6499
6500 fi
6501
6502     if test $ac_cv_func_connect = no; then
6503       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
6504 $as_echo_n "checking for connect in -lsocket... " >&6; }
6505 if ${ac_cv_lib_socket_connect+:} false; then :
6506   $as_echo_n "(cached) " >&6
6507 else
6508   ac_check_lib_save_LIBS=$LIBS
6509 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6511 /* end confdefs.h.  */
6512
6513 /* Override any GCC internal prototype to avoid an error.
6514    Use char because int might match the return type of a GCC
6515    builtin and then its argument prototype would still apply.  */
6516 #ifdef __cplusplus
6517 extern "C"
6518 #endif
6519 char connect ();
6520 int
6521 main ()
6522 {
6523 return connect ();
6524   ;
6525   return 0;
6526 }
6527 _ACEOF
6528 if ac_fn_c_try_link "$LINENO"; then :
6529   ac_cv_lib_socket_connect=yes
6530 else
6531   ac_cv_lib_socket_connect=no
6532 fi
6533 rm -f core conftest.err conftest.$ac_objext \
6534     conftest$ac_exeext conftest.$ac_ext
6535 LIBS=$ac_check_lib_save_LIBS
6536 fi
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
6538 $as_echo "$ac_cv_lib_socket_connect" >&6; }
6539 if test "x$ac_cv_lib_socket_connect" = xyes; then :
6540   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6541 fi
6542
6543     fi
6544
6545     # Guillermo Gomez says -lposix is necessary on A/UX.
6546     ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
6547 if test "x$ac_cv_func_remove" = xyes; then :
6548
6549 fi
6550
6551     if test $ac_cv_func_remove = no; then
6552       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
6553 $as_echo_n "checking for remove in -lposix... " >&6; }
6554 if ${ac_cv_lib_posix_remove+:} false; then :
6555   $as_echo_n "(cached) " >&6
6556 else
6557   ac_check_lib_save_LIBS=$LIBS
6558 LIBS="-lposix  $LIBS"
6559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6560 /* end confdefs.h.  */
6561
6562 /* Override any GCC internal prototype to avoid an error.
6563    Use char because int might match the return type of a GCC
6564    builtin and then its argument prototype would still apply.  */
6565 #ifdef __cplusplus
6566 extern "C"
6567 #endif
6568 char remove ();
6569 int
6570 main ()
6571 {
6572 return remove ();
6573   ;
6574   return 0;
6575 }
6576 _ACEOF
6577 if ac_fn_c_try_link "$LINENO"; then :
6578   ac_cv_lib_posix_remove=yes
6579 else
6580   ac_cv_lib_posix_remove=no
6581 fi
6582 rm -f core conftest.err conftest.$ac_objext \
6583     conftest$ac_exeext conftest.$ac_ext
6584 LIBS=$ac_check_lib_save_LIBS
6585 fi
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
6587 $as_echo "$ac_cv_lib_posix_remove" >&6; }
6588 if test "x$ac_cv_lib_posix_remove" = xyes; then :
6589   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6590 fi
6591
6592     fi
6593
6594     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6595     ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
6596 if test "x$ac_cv_func_shmat" = xyes; then :
6597
6598 fi
6599
6600     if test $ac_cv_func_shmat = no; then
6601       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
6602 $as_echo_n "checking for shmat in -lipc... " >&6; }
6603 if ${ac_cv_lib_ipc_shmat+:} false; then :
6604   $as_echo_n "(cached) " >&6
6605 else
6606   ac_check_lib_save_LIBS=$LIBS
6607 LIBS="-lipc  $LIBS"
6608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6609 /* end confdefs.h.  */
6610
6611 /* Override any GCC internal prototype to avoid an error.
6612    Use char because int might match the return type of a GCC
6613    builtin and then its argument prototype would still apply.  */
6614 #ifdef __cplusplus
6615 extern "C"
6616 #endif
6617 char shmat ();
6618 int
6619 main ()
6620 {
6621 return shmat ();
6622   ;
6623   return 0;
6624 }
6625 _ACEOF
6626 if ac_fn_c_try_link "$LINENO"; then :
6627   ac_cv_lib_ipc_shmat=yes
6628 else
6629   ac_cv_lib_ipc_shmat=no
6630 fi
6631 rm -f core conftest.err conftest.$ac_objext \
6632     conftest$ac_exeext conftest.$ac_ext
6633 LIBS=$ac_check_lib_save_LIBS
6634 fi
6635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
6636 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
6637 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
6638   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6639 fi
6640
6641     fi
6642   fi
6643
6644   # Check for libraries that X11R6 Xt/Xaw programs need.
6645   ac_save_LDFLAGS=$LDFLAGS
6646   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6647   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6648   # check for ICE first), but we must link in the order -lSM -lICE or
6649   # we get undefined symbols.  So assume we have SM if we have ICE.
6650   # These have to be linked with before -lX11, unlike the other
6651   # libraries we check for below, so use a different variable.
6652   # John Interrante, Karl Berry
6653   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
6654 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
6655 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
6656   $as_echo_n "(cached) " >&6
6657 else
6658   ac_check_lib_save_LIBS=$LIBS
6659 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6661 /* end confdefs.h.  */
6662
6663 /* Override any GCC internal prototype to avoid an error.
6664    Use char because int might match the return type of a GCC
6665    builtin and then its argument prototype would still apply.  */
6666 #ifdef __cplusplus
6667 extern "C"
6668 #endif
6669 char IceConnectionNumber ();
6670 int
6671 main ()
6672 {
6673 return IceConnectionNumber ();
6674   ;
6675   return 0;
6676 }
6677 _ACEOF
6678 if ac_fn_c_try_link "$LINENO"; then :
6679   ac_cv_lib_ICE_IceConnectionNumber=yes
6680 else
6681   ac_cv_lib_ICE_IceConnectionNumber=no
6682 fi
6683 rm -f core conftest.err conftest.$ac_objext \
6684     conftest$ac_exeext conftest.$ac_ext
6685 LIBS=$ac_check_lib_save_LIBS
6686 fi
6687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6688 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
6689 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
6690   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6691 fi
6692
6693   LDFLAGS=$ac_save_LDFLAGS
6694
6695 fi
6696
6697
6698 if test "$have_x" != yes; then
6699   as_fn_error $? "Couldn't find X11 headers/libs.  Try \`$0 --help'." "$LINENO" 5
6700 fi
6701
6702
6703     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X app-defaults directory" >&5
6704 $as_echo_n "checking for X app-defaults directory... " >&6; }
6705 if ${ac_cv_x_app_defaults+:} false; then :
6706   $as_echo_n "(cached) " >&6
6707 else
6708
6709   rm -fr conftestdir
6710   if mkdir conftestdir; then
6711     cd conftestdir 2>/dev/null
6712     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6713     cat > Imakefile <<'EOF'
6714 acfindx:
6715         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6716 EOF
6717     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6718       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6719       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6720     fi
6721     cd .. 2>/dev/null
6722     rm -fr conftestdir
6723   fi
6724       if test x"$ac_x_app_defaults" = x; then
6725
6726   # Look for the directory under a standard set of common directories.
6727   # Check X11 before X11Rn because it's often a symlink to the current release.
6728   for ac_dir in                                 \
6729     /usr/X11/lib/app-defaults                   \
6730     /usr/X11R6/lib/app-defaults                 \
6731     /usr/X11R6/lib/X11/app-defaults             \
6732     /usr/X11R5/lib/app-defaults                 \
6733     /usr/X11R5/lib/X11/app-defaults             \
6734     /usr/X11R4/lib/app-defaults                 \
6735     /usr/X11R4/lib/X11/app-defaults             \
6736                                                 \
6737     /usr/lib/X11/app-defaults                   \
6738     /usr/lib/X11R6/app-defaults                 \
6739     /usr/lib/X11R5/app-defaults                 \
6740     /usr/lib/X11R4/app-defaults                 \
6741                                                 \
6742     /usr/local/X11/lib/app-defaults             \
6743     /usr/local/X11R6/lib/app-defaults           \
6744     /usr/local/X11R5/lib/app-defaults           \
6745     /usr/local/X11R4/lib/app-defaults           \
6746                                                 \
6747     /usr/local/lib/X11/app-defaults             \
6748     /usr/local/lib/X11R6/app-defaults           \
6749     /usr/local/lib/X11R6/X11/app-defaults       \
6750     /usr/local/lib/X11R5/app-defaults           \
6751     /usr/local/lib/X11R5/X11/app-defaults       \
6752     /usr/local/lib/X11R4/app-defaults           \
6753     /usr/local/lib/X11R4/X11/app-defaults       \
6754                                                 \
6755     /usr/X386/lib/X11/app-defaults              \
6756     /usr/x386/lib/X11/app-defaults              \
6757     /usr/XFree86/lib/X11/app-defaults           \
6758                                                 \
6759     /usr/lib/X11/app-defaults                   \
6760     /usr/local/lib/X11/app-defaults             \
6761     /usr/unsupported/lib/X11/app-defaults       \
6762     /usr/athena/lib/X11/app-defaults            \
6763     /usr/local/x11r5/lib/X11/app-defaults       \
6764     /usr/lpp/Xamples/lib/X11/app-defaults       \
6765     /lib/usr/lib/X11/app-defaults               \
6766                                                 \
6767     /usr/openwin/lib/app-defaults               \
6768     /usr/openwin/lib/X11/app-defaults           \
6769     /usr/openwin/share/lib/app-defaults         \
6770     /usr/openwin/share/lib/X11/app-defaults     \
6771                                                 \
6772     /X11R6/lib/app-defaults                     \
6773     /X11R5/lib/app-defaults                     \
6774     /X11R4/lib/app-defaults                     \
6775     ; \
6776   do
6777     if test -d "$ac_dir"; then
6778       ac_x_app_defaults=$ac_dir
6779       break
6780     fi
6781   done
6782
6783       fi
6784       if test x"$ac_x_app_defaults" = x; then
6785         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6786       else
6787         # Record where we found app-defaults for the cache.
6788         ac_cv_x_app_defaults="$ac_x_app_defaults"
6789       fi
6790 fi
6791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x_app_defaults" >&5
6792 $as_echo "$ac_cv_x_app_defaults" >&6; }
6793     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6794 case "$host" in
6795     *-hpux*)
6796
6797       # The following arcana was gleaned from conversations with
6798       # Eric Schwartz <erics@col.hp.com>:
6799       #
6800       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6801       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6802       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6803       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6804       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6805       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6806       # you don't need any -I or -L arguments.
6807       #
6808       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6809       # are the same division as 10.x.  However, there are no symlinks to
6810       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6811       # arguments are always necessary.
6812       #
6813       # However, X11R6 was available on HPUX 9.x as a patch: if that
6814       # patch was installed, then all of X11R6 went in to
6815       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6816       #
6817       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6818       # whether R5 was available as a patch; R6 undoubtedly was not.)
6819       #
6820       # So.  We try and use the highest numbered pair of
6821       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6822       # that are available.  We do not mix and match different versions
6823       # of X.
6824       #
6825       # Question I still don't know the answer to: (do you?)
6826       #
6827       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6828       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6829       #     that contrib directory?  Did it contain so-called "standard"
6830       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6831       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6832       #     be a situation where one had to reach into the R5 headers and
6833       #     libs to find Xmu?  That is, must both R6 and R5 directories
6834       #     be on the -I and -L lists in that case?
6835       #
6836       for version in X11R6 X11R5 X11R4 ; do
6837         # if either pair of directories exists...
6838         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6839         then
6840            # if contrib exists, use it...
6841            if test -d /usr/contrib/$version/include ; then
6842              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6843              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6844            fi
6845            # if the "standard" one exists, use it.
6846            if test -d /usr/include/$version ; then
6847              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6848              X_LIBS="$X_LIBS -L/usr/lib/$version"
6849            fi
6850            # since at least one of the pair exists, go no farther.
6851            break
6852         fi
6853       done
6854
6855       # Now find Motif.  Thanks for not making xmkmf find this by
6856       # default, you losers.
6857       #
6858       if test -d /usr/include/Motif2.1 ; then
6859         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6860         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6861       elif test -d /usr/include/Motif1.2 ; then
6862         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6863         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6864       elif test -d /usr/include/Motif1.1 ; then
6865         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6866         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6867       fi
6868
6869       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6870       #
6871       if test -d /opt/graphics/OpenGL/include ; then
6872         # HP-UX 10.20 puts it here
6873         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6874         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6875       elif test -d /opt/Mesa/lib ; then
6876         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6877         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6878       fi
6879
6880
6881       if test -d /opt/xpm/lib/X11 ; then
6882         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6883         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6884       fi
6885
6886       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6887       # in /usr/local/, unless there is already an xscreensaver in
6888       # /usr/local/bin/.  This can be overridden with the --prefix arg
6889       # to configure.  I'm not sure this is the right thing to do, but
6890       # Richard Lloyd says so...
6891       #
6892       if test \! -x /usr/local/bin/xscreensaver ; then
6893         ac_default_prefix=/opt/xscreensaver
6894       fi
6895
6896     ;;
6897     *-solaris*)
6898
6899       # Thanks for not making xmkmf find this by default, pinheads.
6900       # And thanks for moving things around again, too.  Is this
6901       # really the standard location now?  What happened to the
6902       # joke that this kind of thing went in /opt?
6903       # cthomp says "answer: CDE (Common Disorganized Environment)"
6904       #
6905       if test -f /usr/dt/include/Xm/Xm.h ; then
6906         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6907         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6908
6909         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6910         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcmp in -lgen" >&5
6911 $as_echo_n "checking for regcmp in -lgen... " >&6; }
6912 if ${ac_cv_lib_gen_regcmp+:} false; then :
6913   $as_echo_n "(cached) " >&6
6914 else
6915   ac_check_lib_save_LIBS=$LIBS
6916 LIBS="-lgen  $LIBS"
6917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6918 /* end confdefs.h.  */
6919
6920 /* Override any GCC internal prototype to avoid an error.
6921    Use char because int might match the return type of a GCC
6922    builtin and then its argument prototype would still apply.  */
6923 #ifdef __cplusplus
6924 extern "C"
6925 #endif
6926 char regcmp ();
6927 int
6928 main ()
6929 {
6930 return regcmp ();
6931   ;
6932   return 0;
6933 }
6934 _ACEOF
6935 if ac_fn_c_try_link "$LINENO"; then :
6936   ac_cv_lib_gen_regcmp=yes
6937 else
6938   ac_cv_lib_gen_regcmp=no
6939 fi
6940 rm -f core conftest.err conftest.$ac_objext \
6941     conftest$ac_exeext conftest.$ac_ext
6942 LIBS=$ac_check_lib_save_LIBS
6943 fi
6944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_regcmp" >&5
6945 $as_echo "$ac_cv_lib_gen_regcmp" >&6; }
6946 if test "x$ac_cv_lib_gen_regcmp" = xyes; then :
6947   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6948 fi
6949
6950       fi
6951
6952     ;;
6953     *-darwin*)
6954
6955       # On MacOS X (10.x with "fink"), many things are under /sw/.
6956       #
6957       if test -d /sw/include ; then
6958         X_CFLAGS="-I/sw/include $X_CFLAGS"
6959         X_LIBS="-L/sw/lib $X_LIBS"
6960       fi
6961     ;;
6962   esac
6963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPointer" >&5
6964 $as_echo_n "checking for XPointer... " >&6; }
6965 if ${ac_cv_xpointer+:} false; then :
6966   $as_echo_n "(cached) " >&6
6967 else
6968
6969   ac_save_CPPFLAGS="$CPPFLAGS"
6970   if test \! -z "$includedir" ; then
6971     CPPFLAGS="$CPPFLAGS -I$includedir"
6972   fi
6973   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6974   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
6975   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6976 /* end confdefs.h.  */
6977 #include <X11/Xlib.h>
6978 int
6979 main ()
6980 {
6981 XPointer foo = (XPointer) 0;
6982   ;
6983   return 0;
6984 }
6985 _ACEOF
6986 if ac_fn_c_try_compile "$LINENO"; then :
6987   ac_cv_xpointer=yes
6988 else
6989   ac_cv_xpointer=no
6990 fi
6991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6992   CPPFLAGS="$ac_save_CPPFLAGS"
6993 fi
6994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xpointer" >&5
6995 $as_echo "$ac_cv_xpointer" >&6; }
6996   if test "$ac_cv_xpointer" != yes; then
6997    $as_echo "#define XPointer char*" >>confdefs.h
6998
6999   fi
7000
7001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is MacOS X" >&5
7002 $as_echo_n "checking whether this is MacOS X... " >&6; }
7003   ac_macosx=no
7004   case "$host" in
7005     *-apple-darwin* )
7006       ac_macosx=yes
7007     ;;
7008   esac
7009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_macosx" >&5
7010 $as_echo "$ac_macosx" >&6; }
7011
7012
7013 ###############################################################################
7014 #
7015 #       Gettext support
7016 #
7017 ###############################################################################
7018
7019 IT_PROG_INTLTOOL
7020 GETTEXT_PACKAGE=xscreensaver
7021
7022 cat >>confdefs.h <<_ACEOF
7023 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7024 _ACEOF
7025
7026
7027 cat >>confdefs.h <<_ACEOF
7028 #define PACKAGE "$GETTEXT_PACKAGE"
7029 _ACEOF
7030
7031
7032
7033 ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
7034 if test -n "$ac_tool_prefix"; then
7035   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7036 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7038 $as_echo_n "checking for $ac_word... " >&6; }
7039 if ${ac_cv_prog_RANLIB+:} false; then :
7040   $as_echo_n "(cached) " >&6
7041 else
7042   if test -n "$RANLIB"; then
7043   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7044 else
7045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7046 for as_dir in $PATH
7047 do
7048   IFS=$as_save_IFS
7049   test -z "$as_dir" && as_dir=.
7050     for ac_exec_ext in '' $ac_executable_extensions; do
7051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7052     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7054     break 2
7055   fi
7056 done
7057   done
7058 IFS=$as_save_IFS
7059
7060 fi
7061 fi
7062 RANLIB=$ac_cv_prog_RANLIB
7063 if test -n "$RANLIB"; then
7064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7065 $as_echo "$RANLIB" >&6; }
7066 else
7067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7068 $as_echo "no" >&6; }
7069 fi
7070
7071
7072 fi
7073 if test -z "$ac_cv_prog_RANLIB"; then
7074   ac_ct_RANLIB=$RANLIB
7075   # Extract the first word of "ranlib", so it can be a program name with args.
7076 set dummy ranlib; ac_word=$2
7077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7078 $as_echo_n "checking for $ac_word... " >&6; }
7079 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7080   $as_echo_n "(cached) " >&6
7081 else
7082   if test -n "$ac_ct_RANLIB"; then
7083   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7084 else
7085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7086 for as_dir in $PATH
7087 do
7088   IFS=$as_save_IFS
7089   test -z "$as_dir" && as_dir=.
7090     for ac_exec_ext in '' $ac_executable_extensions; do
7091   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7092     ac_cv_prog_ac_ct_RANLIB="ranlib"
7093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7094     break 2
7095   fi
7096 done
7097   done
7098 IFS=$as_save_IFS
7099
7100 fi
7101 fi
7102 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7103 if test -n "$ac_ct_RANLIB"; then
7104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7105 $as_echo "$ac_ct_RANLIB" >&6; }
7106 else
7107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7108 $as_echo "no" >&6; }
7109 fi
7110
7111   if test "x$ac_ct_RANLIB" = x; then
7112     RANLIB=":"
7113   else
7114     case $cross_compiling:$ac_tool_warned in
7115 yes:)
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7117 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7118 ac_tool_warned=yes ;;
7119 esac
7120     RANLIB=$ac_ct_RANLIB
7121   fi
7122 else
7123   RANLIB="$ac_cv_prog_RANLIB"
7124 fi
7125
7126 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
7127 if test "x$ac_cv_type_off_t" = xyes; then :
7128
7129 else
7130
7131 cat >>confdefs.h <<_ACEOF
7132 #define off_t long int
7133 _ACEOF
7134
7135 fi
7136
7137 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7138 # for constant arguments.  Useless!
7139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7140 $as_echo_n "checking for working alloca.h... " >&6; }
7141 if ${ac_cv_working_alloca_h+:} false; then :
7142   $as_echo_n "(cached) " >&6
7143 else
7144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7145 /* end confdefs.h.  */
7146 #include <alloca.h>
7147 int
7148 main ()
7149 {
7150 char *p = (char *) alloca (2 * sizeof (int));
7151                           if (p) return 0;
7152   ;
7153   return 0;
7154 }
7155 _ACEOF
7156 if ac_fn_c_try_link "$LINENO"; then :
7157   ac_cv_working_alloca_h=yes
7158 else
7159   ac_cv_working_alloca_h=no
7160 fi
7161 rm -f core conftest.err conftest.$ac_objext \
7162     conftest$ac_exeext conftest.$ac_ext
7163 fi
7164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7165 $as_echo "$ac_cv_working_alloca_h" >&6; }
7166 if test $ac_cv_working_alloca_h = yes; then
7167
7168 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7169
7170 fi
7171
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7173 $as_echo_n "checking for alloca... " >&6; }
7174 if ${ac_cv_func_alloca_works+:} false; then :
7175   $as_echo_n "(cached) " >&6
7176 else
7177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7178 /* end confdefs.h.  */
7179 #ifdef __GNUC__
7180 # define alloca __builtin_alloca
7181 #else
7182 # ifdef _MSC_VER
7183 #  include <malloc.h>
7184 #  define alloca _alloca
7185 # else
7186 #  ifdef HAVE_ALLOCA_H
7187 #   include <alloca.h>
7188 #  else
7189 #   ifdef _AIX
7190  #pragma alloca
7191 #   else
7192 #    ifndef alloca /* predefined by HP cc +Olibcalls */
7193 void *alloca (size_t);
7194 #    endif
7195 #   endif
7196 #  endif
7197 # endif
7198 #endif
7199
7200 int
7201 main ()
7202 {
7203 char *p = (char *) alloca (1);
7204                                     if (p) return 0;
7205   ;
7206   return 0;
7207 }
7208 _ACEOF
7209 if ac_fn_c_try_link "$LINENO"; then :
7210   ac_cv_func_alloca_works=yes
7211 else
7212   ac_cv_func_alloca_works=no
7213 fi
7214 rm -f core conftest.err conftest.$ac_objext \
7215     conftest$ac_exeext conftest.$ac_ext
7216 fi
7217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7218 $as_echo "$ac_cv_func_alloca_works" >&6; }
7219
7220 if test $ac_cv_func_alloca_works = yes; then
7221
7222 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7223
7224 else
7225   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7226 # that cause trouble.  Some versions do not even contain alloca or
7227 # contain a buggy version.  If you still want to use their alloca,
7228 # use ar to extract alloca.o from them instead of compiling alloca.c.
7229
7230 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7231
7232 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7233
7234
7235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7236 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7237 if ${ac_cv_os_cray+:} false; then :
7238   $as_echo_n "(cached) " >&6
7239 else
7240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7241 /* end confdefs.h.  */
7242 #if defined CRAY && ! defined CRAY2
7243 webecray
7244 #else
7245 wenotbecray
7246 #endif
7247
7248 _ACEOF
7249 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7250   $EGREP "webecray" >/dev/null 2>&1; then :
7251   ac_cv_os_cray=yes
7252 else
7253   ac_cv_os_cray=no
7254 fi
7255 rm -rf conftest*
7256
7257 fi
7258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7259 $as_echo "$ac_cv_os_cray" >&6; }
7260 if test $ac_cv_os_cray = yes; then
7261   for ac_func in _getb67 GETB67 getb67; do
7262     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7263 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7264 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7265
7266 cat >>confdefs.h <<_ACEOF
7267 #define CRAY_STACKSEG_END $ac_func
7268 _ACEOF
7269
7270     break
7271 fi
7272
7273   done
7274 fi
7275
7276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7277 $as_echo_n "checking stack direction for C alloca... " >&6; }
7278 if ${ac_cv_c_stack_direction+:} false; then :
7279   $as_echo_n "(cached) " >&6
7280 else
7281   if test "$cross_compiling" = yes; then :
7282   ac_cv_c_stack_direction=0
7283 else
7284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7285 /* end confdefs.h.  */
7286 $ac_includes_default
7287 int
7288 find_stack_direction (int *addr, int depth)
7289 {
7290   int dir, dummy = 0;
7291   if (! addr)
7292     addr = &dummy;
7293   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7294   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7295   return dir + dummy;
7296 }
7297
7298 int
7299 main (int argc, char **argv)
7300 {
7301   return find_stack_direction (0, argc + !argv + 20) < 0;
7302 }
7303 _ACEOF
7304 if ac_fn_c_try_run "$LINENO"; then :
7305   ac_cv_c_stack_direction=1
7306 else
7307   ac_cv_c_stack_direction=-1
7308 fi
7309 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7310   conftest.$ac_objext conftest.beam conftest.$ac_ext
7311 fi
7312
7313 fi
7314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7315 $as_echo "$ac_cv_c_stack_direction" >&6; }
7316 cat >>confdefs.h <<_ACEOF
7317 #define STACK_DIRECTION $ac_cv_c_stack_direction
7318 _ACEOF
7319
7320
7321 fi
7322
7323
7324
7325
7326   for ac_header in $ac_header_list
7327 do :
7328   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7329 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7330 "
7331 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7332   cat >>confdefs.h <<_ACEOF
7333 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7334 _ACEOF
7335
7336 fi
7337
7338 done
7339
7340
7341
7342
7343
7344
7345
7346
7347 for ac_func in getpagesize
7348 do :
7349   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7350 if test "x$ac_cv_func_getpagesize" = xyes; then :
7351   cat >>confdefs.h <<_ACEOF
7352 #define HAVE_GETPAGESIZE 1
7353 _ACEOF
7354
7355 fi
7356 done
7357
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7359 $as_echo_n "checking for working mmap... " >&6; }
7360 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
7361   $as_echo_n "(cached) " >&6
7362 else
7363   if test "$cross_compiling" = yes; then :
7364   ac_cv_func_mmap_fixed_mapped=no
7365 else
7366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7367 /* end confdefs.h.  */
7368 $ac_includes_default
7369 /* malloc might have been renamed as rpl_malloc. */
7370 #undef malloc
7371
7372 /* Thanks to Mike Haertel and Jim Avera for this test.
7373    Here is a matrix of mmap possibilities:
7374         mmap private not fixed
7375         mmap private fixed at somewhere currently unmapped
7376         mmap private fixed at somewhere already mapped
7377         mmap shared not fixed
7378         mmap shared fixed at somewhere currently unmapped
7379         mmap shared fixed at somewhere already mapped
7380    For private mappings, we should verify that changes cannot be read()
7381    back from the file, nor mmap's back from the file at a different
7382    address.  (There have been systems where private was not correctly
7383    implemented like the infamous i386 svr4.0, and systems where the
7384    VM page cache was not coherent with the file system buffer cache
7385    like early versions of FreeBSD and possibly contemporary NetBSD.)
7386    For shared mappings, we should conversely verify that changes get
7387    propagated back to all the places they're supposed to be.
7388
7389    Grep wants private fixed already mapped.
7390    The main things grep needs to know about mmap are:
7391    * does it exist and is it safe to write into the mmap'd area
7392    * how to use it (BSD variants)  */
7393
7394 #include <fcntl.h>
7395 #include <sys/mman.h>
7396
7397 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
7398 char *malloc ();
7399 #endif
7400
7401 /* This mess was copied from the GNU getpagesize.h.  */
7402 #ifndef HAVE_GETPAGESIZE
7403 # ifdef _SC_PAGESIZE
7404 #  define getpagesize() sysconf(_SC_PAGESIZE)
7405 # else /* no _SC_PAGESIZE */
7406 #  ifdef HAVE_SYS_PARAM_H
7407 #   include <sys/param.h>
7408 #   ifdef EXEC_PAGESIZE
7409 #    define getpagesize() EXEC_PAGESIZE
7410 #   else /* no EXEC_PAGESIZE */
7411 #    ifdef NBPG
7412 #     define getpagesize() NBPG * CLSIZE
7413 #     ifndef CLSIZE
7414 #      define CLSIZE 1
7415 #     endif /* no CLSIZE */
7416 #    else /* no NBPG */
7417 #     ifdef NBPC
7418 #      define getpagesize() NBPC
7419 #     else /* no NBPC */
7420 #      ifdef PAGESIZE
7421 #       define getpagesize() PAGESIZE
7422 #      endif /* PAGESIZE */
7423 #     endif /* no NBPC */
7424 #    endif /* no NBPG */
7425 #   endif /* no EXEC_PAGESIZE */
7426 #  else /* no HAVE_SYS_PARAM_H */
7427 #   define getpagesize() 8192   /* punt totally */
7428 #  endif /* no HAVE_SYS_PARAM_H */
7429 # endif /* no _SC_PAGESIZE */
7430
7431 #endif /* no HAVE_GETPAGESIZE */
7432
7433 int
7434 main ()
7435 {
7436   char *data, *data2, *data3;
7437   const char *cdata2;
7438   int i, pagesize;
7439   int fd, fd2;
7440
7441   pagesize = getpagesize ();
7442
7443   /* First, make a file with some known garbage in it. */
7444   data = (char *) malloc (pagesize);
7445   if (!data)
7446     return 1;
7447   for (i = 0; i < pagesize; ++i)
7448     *(data + i) = rand ();
7449   umask (0);
7450   fd = creat ("conftest.mmap", 0600);
7451   if (fd < 0)
7452     return 2;
7453   if (write (fd, data, pagesize) != pagesize)
7454     return 3;
7455   close (fd);
7456
7457   /* Next, check that the tail of a page is zero-filled.  File must have
7458      non-zero length, otherwise we risk SIGBUS for entire page.  */
7459   fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7460   if (fd2 < 0)
7461     return 4;
7462   cdata2 = "";
7463   if (write (fd2, cdata2, 1) != 1)
7464     return 5;
7465   data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
7466   if (data2 == MAP_FAILED)
7467     return 6;
7468   for (i = 0; i < pagesize; ++i)
7469     if (*(data2 + i))
7470       return 7;
7471   close (fd2);
7472   if (munmap (data2, pagesize))
7473     return 8;
7474
7475   /* Next, try to mmap the file at a fixed address which already has
7476      something else allocated at it.  If we can, also make sure that
7477      we see the same garbage.  */
7478   fd = open ("conftest.mmap", O_RDWR);
7479   if (fd < 0)
7480     return 9;
7481   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7482                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7483     return 10;
7484   for (i = 0; i < pagesize; ++i)
7485     if (*(data + i) != *(data2 + i))
7486       return 11;
7487
7488   /* Finally, make sure that changes to the mapped area do not
7489      percolate back to the file as seen by read().  (This is a bug on
7490      some variants of i386 svr4.0.)  */
7491   for (i = 0; i < pagesize; ++i)
7492     *(data2 + i) = *(data2 + i) + 1;
7493   data3 = (char *) malloc (pagesize);
7494   if (!data3)
7495     return 12;
7496   if (read (fd, data3, pagesize) != pagesize)
7497     return 13;
7498   for (i = 0; i < pagesize; ++i)
7499     if (*(data + i) != *(data3 + i))
7500       return 14;
7501   close (fd);
7502   return 0;
7503 }
7504 _ACEOF
7505 if ac_fn_c_try_run "$LINENO"; then :
7506   ac_cv_func_mmap_fixed_mapped=yes
7507 else
7508   ac_cv_func_mmap_fixed_mapped=no
7509 fi
7510 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7511   conftest.$ac_objext conftest.beam conftest.$ac_ext
7512 fi
7513
7514 fi
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7516 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
7517 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7518
7519 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
7520
7521 fi
7522 rm -rf conftest.mmap conftest.txt
7523
7524
7525    for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7526 unistd.h sys/param.h
7527 do :
7528   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7529 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7530 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7531   cat >>confdefs.h <<_ACEOF
7532 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7533 _ACEOF
7534
7535 fi
7536
7537 done
7538
7539    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7540 strdup __argz_count __argz_stringify __argz_next
7541 do :
7542   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7543 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7544 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7545   cat >>confdefs.h <<_ACEOF
7546 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7547 _ACEOF
7548
7549 fi
7550 done
7551
7552
7553    if test $ac_cv_header_locale_h = yes; then
7554     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
7555 $as_echo_n "checking for LC_MESSAGES... " >&6; }
7556 if ${am_cv_val_LC_MESSAGES+:} false; then :
7557   $as_echo_n "(cached) " >&6
7558 else
7559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7560 /* end confdefs.h.  */
7561 #include <locale.h>
7562 int
7563 main ()
7564 {
7565 return LC_MESSAGES
7566   ;
7567   return 0;
7568 }
7569 _ACEOF
7570 if ac_fn_c_try_link "$LINENO"; then :
7571   am_cv_val_LC_MESSAGES=yes
7572 else
7573   am_cv_val_LC_MESSAGES=no
7574 fi
7575 rm -f core conftest.err conftest.$ac_objext \
7576     conftest$ac_exeext conftest.$ac_ext
7577 fi
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
7579 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
7580     if test $am_cv_val_LC_MESSAGES = yes; then
7581
7582 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
7583
7584     fi
7585   fi
7586      USE_NLS=yes
7587
7588
7589         nls_cv_force_use_gnu_gettext="no"
7590
7591     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7592     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7593                               nls_cv_header_intl=
7594       nls_cv_header_libgt=
7595       CATOBJEXT=NONE
7596
7597       ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
7598 if test "x$ac_cv_header_libintl_h" = xyes; then :
7599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
7600 $as_echo_n "checking for dgettext in libc... " >&6; }
7601 if ${gt_cv_func_dgettext_libc+:} false; then :
7602   $as_echo_n "(cached) " >&6
7603 else
7604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7605 /* end confdefs.h.  */
7606 #include <libintl.h>
7607 int
7608 main ()
7609 {
7610 return (int) dgettext ("","")
7611   ;
7612   return 0;
7613 }
7614 _ACEOF
7615 if ac_fn_c_try_link "$LINENO"; then :
7616   gt_cv_func_dgettext_libc=yes
7617 else
7618   gt_cv_func_dgettext_libc=no
7619 fi
7620 rm -f core conftest.err conftest.$ac_objext \
7621     conftest$ac_exeext conftest.$ac_ext
7622 fi
7623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
7624 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
7625
7626           if test "$gt_cv_func_dgettext_libc" != "yes"; then
7627             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
7628 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
7629 if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
7630   $as_echo_n "(cached) " >&6
7631 else
7632   ac_check_lib_save_LIBS=$LIBS
7633 LIBS="-lintl  $LIBS"
7634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7635 /* end confdefs.h.  */
7636
7637 /* Override any GCC internal prototype to avoid an error.
7638    Use char because int might match the return type of a GCC
7639    builtin and then its argument prototype would still apply.  */
7640 #ifdef __cplusplus
7641 extern "C"
7642 #endif
7643 char bindtextdomain ();
7644 int
7645 main ()
7646 {
7647 return bindtextdomain ();
7648   ;
7649   return 0;
7650 }
7651 _ACEOF
7652 if ac_fn_c_try_link "$LINENO"; then :
7653   ac_cv_lib_intl_bindtextdomain=yes
7654 else
7655   ac_cv_lib_intl_bindtextdomain=no
7656 fi
7657 rm -f core conftest.err conftest.$ac_objext \
7658     conftest$ac_exeext conftest.$ac_ext
7659 LIBS=$ac_check_lib_save_LIBS
7660 fi
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
7662 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
7663 if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
7664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libintl" >&5
7665 $as_echo_n "checking for dgettext in libintl... " >&6; }
7666 if ${gt_cv_func_dgettext_libintl+:} false; then :
7667   $as_echo_n "(cached) " >&6
7668 else
7669   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
7670 $as_echo_n "checking for dgettext in -lintl... " >&6; }
7671 if ${ac_cv_lib_intl_dgettext+:} false; then :
7672   $as_echo_n "(cached) " >&6
7673 else
7674   ac_check_lib_save_LIBS=$LIBS
7675 LIBS="-lintl  $LIBS"
7676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7677 /* end confdefs.h.  */
7678
7679 /* Override any GCC internal prototype to avoid an error.
7680    Use char because int might match the return type of a GCC
7681    builtin and then its argument prototype would still apply.  */
7682 #ifdef __cplusplus
7683 extern "C"
7684 #endif
7685 char dgettext ();
7686 int
7687 main ()
7688 {
7689 return dgettext ();
7690   ;
7691   return 0;
7692 }
7693 _ACEOF
7694 if ac_fn_c_try_link "$LINENO"; then :
7695   ac_cv_lib_intl_dgettext=yes
7696 else
7697   ac_cv_lib_intl_dgettext=no
7698 fi
7699 rm -f core conftest.err conftest.$ac_objext \
7700     conftest$ac_exeext conftest.$ac_ext
7701 LIBS=$ac_check_lib_save_LIBS
7702 fi
7703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
7704 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
7705 if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
7706   gt_cv_func_dgettext_libintl=yes
7707 else
7708   gt_cv_func_dgettext_libintl=no
7709 fi
7710
7711 fi
7712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libintl" >&5
7713 $as_echo "$gt_cv_func_dgettext_libintl" >&6; }
7714 fi
7715
7716           fi
7717
7718           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7719             LIBS="$LIBS -lintl";
7720           fi
7721
7722           if test "$gt_cv_func_dgettext_libc" = "yes" \
7723             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7724
7725 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
7726
7727             # Extract the first word of "msgfmt", so it can be a program name with args.
7728 set dummy msgfmt; ac_word=$2
7729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7730 $as_echo_n "checking for $ac_word... " >&6; }
7731 if ${ac_cv_path_MSGFMT+:} false; then :
7732   $as_echo_n "(cached) " >&6
7733 else
7734   case "$MSGFMT" in
7735   /*)
7736   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7737   ;;
7738   *)
7739   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7740   for ac_dir in $PATH; do
7741     test -z "$ac_dir" && ac_dir=.
7742     if test -f $ac_dir/$ac_word; then
7743       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7744         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7745         break
7746       fi
7747     fi
7748   done
7749   IFS="$ac_save_ifs"
7750   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7751   ;;
7752 esac
7753 fi
7754 MSGFMT="$ac_cv_path_MSGFMT"
7755 if test -n "$MSGFMT"; then
7756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
7757 $as_echo "$MSGFMT" >&6; }
7758 else
7759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7760 $as_echo "no" >&6; }
7761 fi
7762             if test "$MSGFMT" != "no"; then
7763               for ac_func in dcgettext
7764 do :
7765   ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
7766 if test "x$ac_cv_func_dcgettext" = xyes; then :
7767   cat >>confdefs.h <<_ACEOF
7768 #define HAVE_DCGETTEXT 1
7769 _ACEOF
7770
7771 fi
7772 done
7773
7774               # Extract the first word of "gmsgfmt", so it can be a program name with args.
7775 set dummy gmsgfmt; ac_word=$2
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7777 $as_echo_n "checking for $ac_word... " >&6; }
7778 if ${ac_cv_path_GMSGFMT+:} false; then :
7779   $as_echo_n "(cached) " >&6
7780 else
7781   case $GMSGFMT in
7782   [\\/]* | ?:[\\/]*)
7783   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7784   ;;
7785   *)
7786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7787 for as_dir in $PATH
7788 do
7789   IFS=$as_save_IFS
7790   test -z "$as_dir" && as_dir=.
7791     for ac_exec_ext in '' $ac_executable_extensions; do
7792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7793     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7795     break 2
7796   fi
7797 done
7798   done
7799 IFS=$as_save_IFS
7800
7801   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7802   ;;
7803 esac
7804 fi
7805 GMSGFMT=$ac_cv_path_GMSGFMT
7806 if test -n "$GMSGFMT"; then
7807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
7808 $as_echo "$GMSGFMT" >&6; }
7809 else
7810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7811 $as_echo "no" >&6; }
7812 fi
7813
7814
7815               # Extract the first word of "xgettext", so it can be a program name with args.
7816 set dummy xgettext; ac_word=$2
7817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7818 $as_echo_n "checking for $ac_word... " >&6; }
7819 if ${ac_cv_path_XGETTEXT+:} false; then :
7820   $as_echo_n "(cached) " >&6
7821 else
7822   case "$XGETTEXT" in
7823   /*)
7824   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7825   ;;
7826   *)
7827   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7828   for ac_dir in $PATH; do
7829     test -z "$ac_dir" && ac_dir=.
7830     if test -f $ac_dir/$ac_word; then
7831       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7832         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7833         break
7834       fi
7835     fi
7836   done
7837   IFS="$ac_save_ifs"
7838   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7839   ;;
7840 esac
7841 fi
7842 XGETTEXT="$ac_cv_path_XGETTEXT"
7843 if test -n "$XGETTEXT"; then
7844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
7845 $as_echo "$XGETTEXT" >&6; }
7846 else
7847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7848 $as_echo "no" >&6; }
7849 fi
7850
7851               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7852 /* end confdefs.h.  */
7853
7854 int
7855 main ()
7856 {
7857 extern int _nl_msg_cat_cntr;
7858                              return _nl_msg_cat_cntr
7859   ;
7860   return 0;
7861 }
7862 _ACEOF
7863 if ac_fn_c_try_link "$LINENO"; then :
7864   CATOBJEXT=.gmo
7865                  DATADIRNAME=share
7866 else
7867   CATOBJEXT=.mo
7868                  DATADIRNAME=lib
7869 fi
7870 rm -f core conftest.err conftest.$ac_objext \
7871     conftest$ac_exeext conftest.$ac_ext
7872               INSTOBJEXT=.mo
7873             fi
7874           fi
7875
7876           # Added by Martin Baulig 12/15/98 for libc5 systems
7877           if test "$gt_cv_func_dgettext_libc" != "yes" \
7878             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
7879             INTLLIBS=-lintl
7880             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
7881           fi
7882
7883 fi
7884
7885
7886
7887       if test "$CATOBJEXT" = "NONE"; then
7888                         nls_cv_use_gnu_gettext=yes
7889       fi
7890     fi
7891
7892     if test "$nls_cv_use_gnu_gettext" != "yes"; then
7893
7894 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
7895
7896     else
7897             CATOBJEXT=
7898     fi
7899
7900         if test "$XGETTEXT" != ":"; then
7901                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7902         : ;
7903       else
7904         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
7905 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
7906         XGETTEXT=":"
7907       fi
7908     fi
7909
7910     # We need to process the po/ directory.
7911     POSUB=po
7912
7913     ac_config_commands="$ac_config_commands default-1"
7914
7915
7916                 for lang in $ALL_LINGUAS; do
7917       GMOFILES="$GMOFILES $lang.gmo"
7918       POFILES="$POFILES $lang.po"
7919     done
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933    if test "x$CATOBJEXT" != "x"; then
7934      if test "x$ALL_LINGUAS" = "x"; then
7935        LINGUAS=
7936      else
7937        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
7938 $as_echo_n "checking for catalogs to be installed... " >&6; }
7939        NEW_LINGUAS=
7940        for lang in ${LINGUAS=$ALL_LINGUAS}; do
7941          case "$ALL_LINGUAS" in
7942           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
7943          esac
7944        done
7945        LINGUAS=$NEW_LINGUAS
7946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
7947 $as_echo "$LINGUAS" >&6; }
7948      fi
7949
7950           if test -n "$LINGUAS"; then
7951        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7952      fi
7953    fi
7954
7955             test -d po || mkdir po
7956    if test "$CATOBJEXT" = ".cat"; then
7957      ac_fn_c_check_header_mongrel "$LINENO" "linux/version.h" "ac_cv_header_linux_version_h" "$ac_includes_default"
7958 if test "x$ac_cv_header_linux_version_h" = xyes; then :
7959   msgformat=linux
7960 else
7961   msgformat=xopen
7962 fi
7963
7964
7965
7966                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
7967    fi
7968
7969             MKINSTALLDIRS=
7970 #
7971 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
7972 #
7973 #   if test -n "$ac_aux_dir"; then
7974 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7975 #   fi
7976    if test -z "$MKINSTALLDIRS"; then
7977      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7978    fi
7979
7980    # jwz: you know what, screw it.  Let's just use the version that I
7981    # already computed in configure.in, instead of this version that came
7982    # with the i18n crud, ok?
7983    MKINSTALLDIRS="$INSTALL_DIRS"
7984
7985
7986
7987
7988          test -d po || mkdir po
7989    if test "x$srcdir" != "x."; then
7990      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
7991        posrcprefix="$srcdir/"
7992      else
7993        posrcprefix="../$srcdir/"
7994      fi
7995    else
7996      posrcprefix="../"
7997    fi
7998    rm -f po/POTFILES
7999    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8000         < $srcdir/po/POTFILES.in > po/POTFILES
8001
8002 MKINSTALLDIRS="$INSTALL_DIRS"
8003
8004
8005 ###############################################################################
8006 #
8007 #       Check for -lXmu (some fucked up vendors don't ship it...)
8008 #
8009 ###############################################################################
8010
8011 have_xmu=no
8012
8013   ac_save_CPPFLAGS="$CPPFLAGS"
8014   if test \! -z "$includedir" ; then
8015     CPPFLAGS="$CPPFLAGS -I$includedir"
8016   fi
8017   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8018   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8019   ac_fn_c_check_header_compile "$LINENO" "X11/Xmu/Error.h" "ac_cv_header_X11_Xmu_Error_h" "#include <stdlib.h>
8020                    #include <stdio.h>
8021                    #include <X11/Intrinsic.h>
8022 "
8023 if test "x$ac_cv_header_X11_Xmu_Error_h" = xyes; then :
8024   have_xmu=yes
8025 fi
8026
8027
8028   CPPFLAGS="$ac_save_CPPFLAGS"
8029 if test "$have_xmu" = no ; then
8030   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8031   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8032   XMU_LIBS=''
8033 else
8034   XMU_SRCS=''
8035   XMU_OBJS=''
8036   XMU_LIBS='-lXmu'
8037   $as_echo "#define HAVE_XMU 1" >>confdefs.h
8038
8039 fi
8040
8041
8042 ###############################################################################
8043 #
8044 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8045 #       See comp.windows.x FAQ question 124.  The right fix is to
8046 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8047 #
8048 ###############################################################################
8049
8050 if test "$have_xmu" = yes ; then
8051   case "$host" in
8052     *-sunos4*)
8053     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8054 $as_echo_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... " >&6; }
8055 if ${ac_cv_sunos_xmu_bug+:} false; then :
8056   $as_echo_n "(cached) " >&6
8057 else
8058   ac_save_LDFLAGS="$LDFLAGS"
8059                     if test \! -z "$x_libraries" ; then
8060                       LDFLAGS="$LDFLAGS -L$x_libraries"
8061                     fi
8062                     # Note: this trick never works!  (Generally.)
8063                     # We're only getting away with using AC_TRY_LINK
8064                     # with X libraries because we know it's SunOS.
8065                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8066                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8067 /* end confdefs.h.  */
8068
8069 int
8070 main ()
8071 {
8072
8073   ;
8074   return 0;
8075 }
8076 _ACEOF
8077 if ac_fn_c_try_link "$LINENO"; then :
8078   ac_cv_sunos_xmu_bug=no
8079 else
8080   ac_cv_sunos_xmu_bug=yes
8081 fi
8082 rm -f core conftest.err conftest.$ac_objext \
8083     conftest$ac_exeext conftest.$ac_ext
8084                     LDFLAGS="$ac_save_LDFLAGS"
8085 fi
8086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sunos_xmu_bug" >&5
8087 $as_echo "$ac_cv_sunos_xmu_bug" >&6; }
8088     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8089       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler understands -static" >&5
8090 $as_echo_n "checking whether the compiler understands -static... " >&6; }
8091 if ${ac_cv_ld_static+:} false; then :
8092   $as_echo_n "(cached) " >&6
8093 else
8094   ac_save_LDFLAGS="$LDFLAGS"
8095                       LDFLAGS="$LDFLAGS -static"
8096                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8097 /* end confdefs.h.  */
8098
8099 int
8100 main ()
8101 {
8102
8103   ;
8104   return 0;
8105 }
8106 _ACEOF
8107 if ac_fn_c_try_link "$LINENO"; then :
8108   ac_cv_ld_static=yes
8109 else
8110   ac_cv_ld_static=no
8111 fi
8112 rm -f core conftest.err conftest.$ac_objext \
8113     conftest$ac_exeext conftest.$ac_ext
8114                     LDFLAGS="$ac_save_LDFLAGS"
8115 fi
8116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ld_static" >&5
8117 $as_echo "$ac_cv_ld_static" >&6; }
8118       if test "$ac_cv_ld_static" = yes ; then
8119         LDFLAGS="$LDFLAGS -static"
8120       else
8121         LDFLAGS="$LDFLAGS -Bstatic"
8122       fi
8123     fi
8124     ;;
8125   esac
8126 fi
8127
8128
8129 ###############################################################################
8130 #
8131 #       Handle the --with-hackdir option
8132 #
8133 ###############################################################################
8134
8135 have_hackdir=yes
8136 with_hackdir_req=unspecified
8137
8138 # Check whether --with-hackdir was given.
8139 if test "${with_hackdir+set}" = set; then :
8140   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
8141 else
8142   with_hackdir=yes
8143 fi
8144
8145
8146 if test x"$with_hackdir" = xyes; then
8147   HACKDIR='${libexecdir}/xscreensaver'
8148 elif test x"$with_hackdir" = xno; then
8149   HACKDIR='${bindir}'
8150 else
8151   HACKDIR=$with_hackdir
8152 fi
8153
8154 # canonicalize slashes.
8155 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8156
8157 # Expand HACKDIR as HACKDIR_FULL
8158 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
8159
8160 # This option used to be called --enable-subdir; make sure that is no longer
8161 # used, since configure brain-damagedly ignores unknown --enable options.
8162
8163 obsolete_enable=
8164 # Check whether --enable-subdir was given.
8165 if test "${enable_subdir+set}" = set; then :
8166   enableval=$enable_subdir; obsolete_enable=yes
8167 fi
8168
8169 if test -n "$obsolete_enable"; then
8170   echo "error: the --enable-subdir option has been replaced with"
8171   echo "       the new --with-hackdir option; see \`configure --help'"
8172   echo "       for more information."
8173   exit 1
8174 fi
8175
8176
8177 ###############################################################################
8178 #
8179 #       Handle the --with-configdir option
8180 #       Help for --with-x-app-defaults option added.
8181 #
8182 ###############################################################################
8183
8184 have_configdir=yes
8185 with_configdir_req=unspecified
8186
8187 # Check whether --with-configdir was given.
8188 if test "${with_configdir+set}" = set; then :
8189   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
8190 else
8191   with_configdir=yes
8192 fi
8193
8194
8195 if test x"$with_configdir" = xyes; then
8196   HACK_CONF_DIR='${datadir}/xscreensaver/config'
8197 elif test x"$with_configdir" = xno; then
8198   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8199   exit 1
8200 else
8201   # there must be a better way than this...
8202   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8203     # absolute path
8204     HACK_CONF_DIR=$with_configdir
8205   else
8206     # relative path
8207     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8208   fi
8209 fi
8210
8211
8212
8213
8214 ###############################################################################
8215 #
8216 #       Check for the SGI SCREEN_SAVER server extension.
8217 #
8218 ###############################################################################
8219
8220 #have_sgi=no
8221 #with_sgi_req=unspecified
8222 #AC_ARG_WITH(sgi-ext,
8223 #[Except where noted, all of the --with options below can also take a
8224 #directory argument: for example, `--with-motif=/opt/Motif'.  That would
8225 #cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
8226 #to be added to the -L list, assuming those directories exist.
8227 #
8228 #By default, support for each of these options will be built in, if the
8229 #relevant library routines exist.  At run time, they will then be used
8230 #only if the X server being used supports them.  Each --with option has
8231 #a corresponding --without option, to override building support for them
8232 #at all.
8233 #
8234 #Screen blanking and idle-detection options:
8235 #
8236 #  --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.],
8237 #  [with_sgi="$withval"; with_sgi_req="$withval"],[with_sgi=yes])
8238 #
8239 #HANDLE_X_PATH_ARG(with_sgi, --with-sgi-ext, SGI SCREEN_SAVER)
8240 #
8241 #if test "$with_sgi" = yes; then
8242 #  AC_CHECK_X_HEADER(X11/extensions/XScreenSaver.h,
8243 #                    [have_sgi=yes
8244 #                     AC_DEFINE(HAVE_SGI_SAVER_EXTENSION)],,
8245 #                    [#include <X11/Xlib.h>])
8246 #
8247 #elif test "$with_sgi" != no; then
8248 #  echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8249 #  exit 1
8250 #fi
8251
8252
8253 ###############################################################################
8254 #
8255 #       Check for the XIDLE server extension.
8256 #
8257 ###############################################################################
8258
8259 #have_xidle=no
8260 #with_xidle_req=unspecified
8261 #AC_ARG_WITH(xidle-ext,
8262 #[  --with-xidle-ext        Include support for the XIDLE extension.],
8263 #  [with_xidle="$withval"; with_xidle_req="$withval"],[with_xidle=yes])
8264 #
8265 #HANDLE_X_PATH_ARG(with_xidle, --with-xidle-ext, XIDLE)
8266 #
8267 #if test "$with_xidle" = yes; then
8268 #  AC_CHECK_X_HEADER(X11/extensions/xidle.h,
8269 #                    [have_xidle=yes
8270 #                     AC_DEFINE(HAVE_XIDLE_EXTENSION)],,
8271 #                    [#include <X11/Xlib.h>])
8272 #elif test "$with_xidle" != no; then
8273 #  echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
8274 #  exit 1
8275 #fi
8276
8277
8278 ###############################################################################
8279 #
8280 #       Check for the SGI-VIDEO-CONTROL server extension.
8281 #
8282 ###############################################################################
8283
8284 #have_sgivc=no
8285 #with_sgivc_req=unspecified
8286 #AC_ARG_WITH(sgivc-ext,
8287 #[  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.],
8288 #  [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
8289 #
8290 #HANDLE_X_PATH_ARG(with_sgivc, --with-sgivc-ext, SGI-VIDEO-CONTROL)
8291 #
8292 #if test "$with_sgivc" = yes; then
8293 #
8294 #  # first check for XSGIvc.h
8295 #  AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes],,
8296 #                    [#include <X11/Xlib.h>])
8297 #
8298 #  # if that succeeded, then check for the -lXsgivc
8299 #  if test "$have_sgivc" = yes; then
8300 #    have_sgivc=no
8301 #    AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
8302 #                  [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [true],
8303 #                  -lXext -lX11)
8304 #  fi
8305 #
8306 #  # if that succeeded, then we've really got it.
8307 #  if test "$have_sgivc" = yes; then
8308 #    AC_DEFINE(HAVE_SGI_VC_EXTENSION)
8309 #  fi
8310 #
8311 #elif test "$with_sgivc" != no; then
8312 #  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
8313 #  exit 1
8314 #fi
8315
8316
8317 ###############################################################################
8318 #
8319 #       Check for the DPMS server extension.
8320 #
8321 ###############################################################################
8322
8323 have_dpms=no
8324 with_dpms_req=unspecified
8325
8326 # Check whether --with-dpms-ext was given.
8327 if test "${with_dpms_ext+set}" = set; then :
8328   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
8329 else
8330   with_dpms=yes
8331 fi
8332
8333
8334
8335    case "$with_dpms" in
8336     yes) ;;
8337     no)  ;;
8338
8339     /*)
8340      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS headers" >&5
8341 $as_echo_n "checking for DPMS headers... " >&6; }
8342      d=$with_dpms/include
8343      if test -d $d; then
8344        X_CFLAGS="-I$d $X_CFLAGS"
8345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8346 $as_echo "$d" >&6; }
8347      else
8348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8349 $as_echo "not found ($d: no such directory)" >&6; }
8350      fi
8351
8352      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS libs" >&5
8353 $as_echo_n "checking for DPMS libs... " >&6; }
8354      d=$with_dpms/lib
8355      if test -d $d; then
8356        X_LIBS="-L$d $X_LIBS"
8357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8358 $as_echo "$d" >&6; }
8359      else
8360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8361 $as_echo "not found ($d: no such directory)" >&6; }
8362      fi
8363
8364      # replace the directory string with "yes".
8365      with_dpms_req="yes"
8366      with_dpms=$with_dpms_req
8367      ;;
8368
8369     *)
8370      echo ""
8371      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
8372      echo "       If it is a directory, then \`DIR/include' will be added to"
8373      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8374      exit 1
8375      ;;
8376    esac
8377
8378
8379 if test "$with_dpms" = yes; then
8380
8381   # first check for dpms.h
8382
8383   ac_save_CPPFLAGS="$CPPFLAGS"
8384   if test \! -z "$includedir" ; then
8385     CPPFLAGS="$CPPFLAGS -I$includedir"
8386   fi
8387   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8388   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8389   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/dpms.h" "ac_cv_header_X11_extensions_dpms_h" "#include <X11/Xlib.h>
8390                      #include <X11/Xmd.h>
8391 "
8392 if test "x$ac_cv_header_X11_extensions_dpms_h" = xyes; then :
8393   have_dpms=yes
8394 fi
8395
8396
8397   CPPFLAGS="$ac_save_CPPFLAGS"
8398
8399   # if that succeeded, then check for the DPMS code in the libraries
8400   if test "$have_dpms" = yes; then
8401
8402     # first look in -lXext (this is where it is with XFree86 4.0)
8403     have_dpms=no
8404
8405   ac_save_CPPFLAGS="$CPPFLAGS"
8406   ac_save_LDFLAGS="$LDFLAGS"
8407 #  ac_save_LIBS="$LIBS"
8408
8409   if test \! -z "$includedir" ; then
8410     CPPFLAGS="$CPPFLAGS -I$includedir"
8411   fi
8412   # note: $X_CFLAGS includes $x_includes
8413   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8414
8415   if test \! -z "$libdir" ; then
8416     LDFLAGS="$LDFLAGS -L$libdir"
8417   fi
8418   # note: $X_LIBS includes $x_libraries
8419   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8420
8421   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8422   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8423   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXext" >&5
8424 $as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
8425 if ${ac_cv_lib_Xext_DPMSInfo+:} false; then :
8426   $as_echo_n "(cached) " >&6
8427 else
8428   ac_check_lib_save_LIBS=$LIBS
8429 LIBS="-lXext -lXext -lX11 $LIBS"
8430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8431 /* end confdefs.h.  */
8432
8433 /* Override any GCC internal prototype to avoid an error.
8434    Use char because int might match the return type of a GCC
8435    builtin and then its argument prototype would still apply.  */
8436 #ifdef __cplusplus
8437 extern "C"
8438 #endif
8439 char DPMSInfo ();
8440 int
8441 main ()
8442 {
8443 return DPMSInfo ();
8444   ;
8445   return 0;
8446 }
8447 _ACEOF
8448 if ac_fn_c_try_link "$LINENO"; then :
8449   ac_cv_lib_Xext_DPMSInfo=yes
8450 else
8451   ac_cv_lib_Xext_DPMSInfo=no
8452 fi
8453 rm -f core conftest.err conftest.$ac_objext \
8454     conftest$ac_exeext conftest.$ac_ext
8455 LIBS=$ac_check_lib_save_LIBS
8456 fi
8457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_DPMSInfo" >&5
8458 $as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
8459 if test "x$ac_cv_lib_Xext_DPMSInfo" = xyes; then :
8460   have_dpms=yes
8461 else
8462   true
8463 fi
8464
8465   CPPFLAGS="$ac_save_CPPFLAGS"
8466   LDFLAGS="$ac_save_LDFLAGS"
8467 #  LIBS="$ac_save_LIBS"
8468
8469
8470     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
8471     if test "$have_dpms" = no; then
8472
8473   ac_save_CPPFLAGS="$CPPFLAGS"
8474   ac_save_LDFLAGS="$LDFLAGS"
8475 #  ac_save_LIBS="$LIBS"
8476
8477   if test \! -z "$includedir" ; then
8478     CPPFLAGS="$CPPFLAGS -I$includedir"
8479   fi
8480   # note: $X_CFLAGS includes $x_includes
8481   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8482
8483   if test \! -z "$libdir" ; then
8484     LDFLAGS="$LDFLAGS -L$libdir"
8485   fi
8486   # note: $X_LIBS includes $x_libraries
8487   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8488
8489   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8490   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXdpms" >&5
8492 $as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
8493 if ${ac_cv_lib_Xdpms_DPMSInfo+:} false; then :
8494   $as_echo_n "(cached) " >&6
8495 else
8496   ac_check_lib_save_LIBS=$LIBS
8497 LIBS="-lXdpms -lXext -lX11 $LIBS"
8498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8499 /* end confdefs.h.  */
8500
8501 /* Override any GCC internal prototype to avoid an error.
8502    Use char because int might match the return type of a GCC
8503    builtin and then its argument prototype would still apply.  */
8504 #ifdef __cplusplus
8505 extern "C"
8506 #endif
8507 char DPMSInfo ();
8508 int
8509 main ()
8510 {
8511 return DPMSInfo ();
8512   ;
8513   return 0;
8514 }
8515 _ACEOF
8516 if ac_fn_c_try_link "$LINENO"; then :
8517   ac_cv_lib_Xdpms_DPMSInfo=yes
8518 else
8519   ac_cv_lib_Xdpms_DPMSInfo=no
8520 fi
8521 rm -f core conftest.err conftest.$ac_objext \
8522     conftest$ac_exeext conftest.$ac_ext
8523 LIBS=$ac_check_lib_save_LIBS
8524 fi
8525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
8526 $as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
8527 if test "x$ac_cv_lib_Xdpms_DPMSInfo" = xyes; then :
8528   have_dpms=yes; XDPMS_LIBS="-lXdpms"
8529 else
8530   true
8531 fi
8532
8533   CPPFLAGS="$ac_save_CPPFLAGS"
8534   LDFLAGS="$ac_save_LDFLAGS"
8535 #  LIBS="$ac_save_LIBS"
8536
8537     fi
8538   fi
8539
8540
8541   # if that succeeded, then we've really got it.
8542   if test "$have_dpms" = yes; then
8543     $as_echo "#define HAVE_DPMS_EXTENSION 1" >>confdefs.h
8544
8545   fi
8546
8547 elif test "$with_dpms" != no; then
8548   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
8549   exit 1
8550 fi
8551
8552
8553 ###############################################################################
8554 #
8555 #       Check for the XINERAMA server extension.
8556 #
8557 ###############################################################################
8558
8559 have_xinerama=no
8560 with_xinerama_req=unspecified
8561
8562 # Check whether --with-xinerama-ext was given.
8563 if test "${with_xinerama_ext+set}" = set; then :
8564   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
8565 else
8566   with_xinerama=yes
8567 fi
8568
8569
8570
8571    case "$with_xinerama" in
8572     yes) ;;
8573     no)  ;;
8574
8575     /*)
8576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA headers" >&5
8577 $as_echo_n "checking for XINERAMA headers... " >&6; }
8578      d=$with_xinerama/include
8579      if test -d $d; then
8580        X_CFLAGS="-I$d $X_CFLAGS"
8581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8582 $as_echo "$d" >&6; }
8583      else
8584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8585 $as_echo "not found ($d: no such directory)" >&6; }
8586      fi
8587
8588      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA libs" >&5
8589 $as_echo_n "checking for XINERAMA libs... " >&6; }
8590      d=$with_xinerama/lib
8591      if test -d $d; then
8592        X_LIBS="-L$d $X_LIBS"
8593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8594 $as_echo "$d" >&6; }
8595      else
8596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8597 $as_echo "not found ($d: no such directory)" >&6; }
8598      fi
8599
8600      # replace the directory string with "yes".
8601      with_xinerama_req="yes"
8602      with_xinerama=$with_xinerama_req
8603      ;;
8604
8605     *)
8606      echo ""
8607      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
8608      echo "       If it is a directory, then \`DIR/include' will be added to"
8609      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8610      exit 1
8611      ;;
8612    esac
8613
8614
8615 if test "$with_xinerama" = yes; then
8616
8617   # first check for Xinerama.h
8618
8619   ac_save_CPPFLAGS="$CPPFLAGS"
8620   if test \! -z "$includedir" ; then
8621     CPPFLAGS="$CPPFLAGS -I$includedir"
8622   fi
8623   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8624   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8625   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "#include <X11/Xlib.h>
8626 "
8627 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = xyes; then :
8628   have_xinerama=yes
8629 fi
8630
8631
8632   CPPFLAGS="$ac_save_CPPFLAGS"
8633
8634   # if that succeeded, then check for the XINERAMA code in the libraries
8635   if test "$have_xinerama" = yes; then
8636
8637     # first look in -lXext
8638     have_xinerama=no
8639
8640   ac_save_CPPFLAGS="$CPPFLAGS"
8641   ac_save_LDFLAGS="$LDFLAGS"
8642 #  ac_save_LIBS="$LIBS"
8643
8644   if test \! -z "$includedir" ; then
8645     CPPFLAGS="$CPPFLAGS -I$includedir"
8646   fi
8647   # note: $X_CFLAGS includes $x_includes
8648   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8649
8650   if test \! -z "$libdir" ; then
8651     LDFLAGS="$LDFLAGS -L$libdir"
8652   fi
8653   # note: $X_LIBS includes $x_libraries
8654   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8655
8656   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8657   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8658   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXext" >&5
8659 $as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
8660 if ${ac_cv_lib_Xext_XineramaQueryScreens+:} false; then :
8661   $as_echo_n "(cached) " >&6
8662 else
8663   ac_check_lib_save_LIBS=$LIBS
8664 LIBS="-lXext -lXext -lX11 $LIBS"
8665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8666 /* end confdefs.h.  */
8667
8668 /* Override any GCC internal prototype to avoid an error.
8669    Use char because int might match the return type of a GCC
8670    builtin and then its argument prototype would still apply.  */
8671 #ifdef __cplusplus
8672 extern "C"
8673 #endif
8674 char XineramaQueryScreens ();
8675 int
8676 main ()
8677 {
8678 return XineramaQueryScreens ();
8679   ;
8680   return 0;
8681 }
8682 _ACEOF
8683 if ac_fn_c_try_link "$LINENO"; then :
8684   ac_cv_lib_Xext_XineramaQueryScreens=yes
8685 else
8686   ac_cv_lib_Xext_XineramaQueryScreens=no
8687 fi
8688 rm -f core conftest.err conftest.$ac_objext \
8689     conftest$ac_exeext conftest.$ac_ext
8690 LIBS=$ac_check_lib_save_LIBS
8691 fi
8692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
8693 $as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
8694 if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = xyes; then :
8695   have_xinerama=yes
8696 else
8697   true
8698 fi
8699
8700   CPPFLAGS="$ac_save_CPPFLAGS"
8701   LDFLAGS="$ac_save_LDFLAGS"
8702 #  LIBS="$ac_save_LIBS"
8703
8704
8705     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
8706     if test "$have_xinerama" = no; then
8707
8708   ac_save_CPPFLAGS="$CPPFLAGS"
8709   ac_save_LDFLAGS="$LDFLAGS"
8710 #  ac_save_LIBS="$LIBS"
8711
8712   if test \! -z "$includedir" ; then
8713     CPPFLAGS="$CPPFLAGS -I$includedir"
8714   fi
8715   # note: $X_CFLAGS includes $x_includes
8716   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8717
8718   if test \! -z "$libdir" ; then
8719     LDFLAGS="$LDFLAGS -L$libdir"
8720   fi
8721   # note: $X_LIBS includes $x_libraries
8722   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8723
8724   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8725   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8726   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXinerama" >&5
8727 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
8728 if ${ac_cv_lib_Xinerama_XineramaQueryScreens+:} false; then :
8729   $as_echo_n "(cached) " >&6
8730 else
8731   ac_check_lib_save_LIBS=$LIBS
8732 LIBS="-lXinerama -lXext -lX11 $LIBS"
8733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8734 /* end confdefs.h.  */
8735
8736 /* Override any GCC internal prototype to avoid an error.
8737    Use char because int might match the return type of a GCC
8738    builtin and then its argument prototype would still apply.  */
8739 #ifdef __cplusplus
8740 extern "C"
8741 #endif
8742 char XineramaQueryScreens ();
8743 int
8744 main ()
8745 {
8746 return XineramaQueryScreens ();
8747   ;
8748   return 0;
8749 }
8750 _ACEOF
8751 if ac_fn_c_try_link "$LINENO"; then :
8752   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
8753 else
8754   ac_cv_lib_Xinerama_XineramaQueryScreens=no
8755 fi
8756 rm -f core conftest.err conftest.$ac_objext \
8757     conftest$ac_exeext conftest.$ac_ext
8758 LIBS=$ac_check_lib_save_LIBS
8759 fi
8760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
8761 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
8762 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = xyes; then :
8763   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
8764 else
8765   true
8766 fi
8767
8768   CPPFLAGS="$ac_save_CPPFLAGS"
8769   LDFLAGS="$ac_save_LDFLAGS"
8770 #  LIBS="$ac_save_LIBS"
8771
8772     fi
8773   fi
8774
8775   # if that succeeded, then we've really got it.
8776   if test "$have_xinerama" = yes; then
8777     $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
8778
8779   fi
8780
8781 elif test "$with_xinerama" != no; then
8782   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
8783   exit 1
8784 fi
8785
8786
8787 ###############################################################################
8788 #
8789 #       Check for the XINPUT server extension.
8790 #
8791 ###############################################################################
8792
8793 have_xinput=no
8794 with_xinput_req=unspecified
8795
8796 # Check whether --with-xinput-ext was given.
8797 if test "${with_xinput_ext+set}" = set; then :
8798   withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
8799 else
8800   with_xinput=yes
8801 fi
8802
8803
8804
8805    case "$with_xinput" in
8806     yes) ;;
8807     no)  ;;
8808
8809     /*)
8810      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT headers" >&5
8811 $as_echo_n "checking for XINPUT headers... " >&6; }
8812      d=$with_xinput/include
8813      if test -d $d; then
8814        X_CFLAGS="-I$d $X_CFLAGS"
8815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8816 $as_echo "$d" >&6; }
8817      else
8818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8819 $as_echo "not found ($d: no such directory)" >&6; }
8820      fi
8821
8822      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT libs" >&5
8823 $as_echo_n "checking for XINPUT libs... " >&6; }
8824      d=$with_xinput/lib
8825      if test -d $d; then
8826        X_LIBS="-L$d $X_LIBS"
8827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8828 $as_echo "$d" >&6; }
8829      else
8830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8831 $as_echo "not found ($d: no such directory)" >&6; }
8832      fi
8833
8834      # replace the directory string with "yes".
8835      with_xinput_req="yes"
8836      with_xinput=$with_xinput_req
8837      ;;
8838
8839     *)
8840      echo ""
8841      echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
8842      echo "       If it is a directory, then \`DIR/include' will be added to"
8843      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8844      exit 1
8845      ;;
8846    esac
8847
8848
8849 if test "$with_xinput" = yes; then
8850
8851   # first check for Xinput.h
8852
8853   ac_save_CPPFLAGS="$CPPFLAGS"
8854   if test \! -z "$includedir" ; then
8855     CPPFLAGS="$CPPFLAGS -I$includedir"
8856   fi
8857   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8858   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8859   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XInput.h" "ac_cv_header_X11_extensions_XInput_h" "#include <X11/Xlib.h>
8860 "
8861 if test "x$ac_cv_header_X11_extensions_XInput_h" = xyes; then :
8862   have_xinput=yes
8863 fi
8864
8865
8866   CPPFLAGS="$ac_save_CPPFLAGS"
8867
8868   # if that succeeded, then check for libXi
8869   if test "$have_xinput" = yes; then
8870     have_xinput=no
8871
8872   ac_save_CPPFLAGS="$CPPFLAGS"
8873   ac_save_LDFLAGS="$LDFLAGS"
8874 #  ac_save_LIBS="$LIBS"
8875
8876   if test \! -z "$includedir" ; then
8877     CPPFLAGS="$CPPFLAGS -I$includedir"
8878   fi
8879   # note: $X_CFLAGS includes $x_includes
8880   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8881
8882   if test \! -z "$libdir" ; then
8883     LDFLAGS="$LDFLAGS -L$libdir"
8884   fi
8885   # note: $X_LIBS includes $x_libraries
8886   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8887
8888   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8889   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8890   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XListInputDevices in -lXi" >&5
8891 $as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
8892 if ${ac_cv_lib_Xi_XListInputDevices+:} false; then :
8893   $as_echo_n "(cached) " >&6
8894 else
8895   ac_check_lib_save_LIBS=$LIBS
8896 LIBS="-lXi -lXext -lX11 $LIBS"
8897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8898 /* end confdefs.h.  */
8899
8900 /* Override any GCC internal prototype to avoid an error.
8901    Use char because int might match the return type of a GCC
8902    builtin and then its argument prototype would still apply.  */
8903 #ifdef __cplusplus
8904 extern "C"
8905 #endif
8906 char XListInputDevices ();
8907 int
8908 main ()
8909 {
8910 return XListInputDevices ();
8911   ;
8912   return 0;
8913 }
8914 _ACEOF
8915 if ac_fn_c_try_link "$LINENO"; then :
8916   ac_cv_lib_Xi_XListInputDevices=yes
8917 else
8918   ac_cv_lib_Xi_XListInputDevices=no
8919 fi
8920 rm -f core conftest.err conftest.$ac_objext \
8921     conftest$ac_exeext conftest.$ac_ext
8922 LIBS=$ac_check_lib_save_LIBS
8923 fi
8924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xi_XListInputDevices" >&5
8925 $as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
8926 if test "x$ac_cv_lib_Xi_XListInputDevices" = xyes; then :
8927   have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
8928 else
8929   true
8930 fi
8931
8932   CPPFLAGS="$ac_save_CPPFLAGS"
8933   LDFLAGS="$ac_save_LDFLAGS"
8934 #  LIBS="$ac_save_LIBS"
8935
8936   fi
8937
8938   # if that succeeded, then we've really got it.
8939   if test "$have_xinput" = yes; then
8940     $as_echo "#define HAVE_XINPUT 1" >>confdefs.h
8941
8942   fi
8943
8944 elif test "$with_xinput" != no; then
8945   echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
8946   exit 1
8947 fi
8948
8949
8950 ###############################################################################
8951 #
8952 #       Check for the XF86VMODE server extension (for virtual screens.)
8953 #
8954 ###############################################################################
8955
8956 have_xf86vmode=no
8957 with_xf86vmode_req=unspecified
8958
8959 # Check whether --with-xf86vmode-ext was given.
8960 if test "${with_xf86vmode_ext+set}" = set; then :
8961   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
8962 else
8963   with_xf86vmode=yes
8964 fi
8965
8966
8967
8968    case "$with_xf86vmode" in
8969     yes) ;;
8970     no)  ;;
8971
8972     /*)
8973      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode headers" >&5
8974 $as_echo_n "checking for xf86vmode headers... " >&6; }
8975      d=$with_xf86vmode/include
8976      if test -d $d; then
8977        X_CFLAGS="-I$d $X_CFLAGS"
8978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8979 $as_echo "$d" >&6; }
8980      else
8981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8982 $as_echo "not found ($d: no such directory)" >&6; }
8983      fi
8984
8985      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode libs" >&5
8986 $as_echo_n "checking for xf86vmode libs... " >&6; }
8987      d=$with_xf86vmode/lib
8988      if test -d $d; then
8989        X_LIBS="-L$d $X_LIBS"
8990        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8991 $as_echo "$d" >&6; }
8992      else
8993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8994 $as_echo "not found ($d: no such directory)" >&6; }
8995      fi
8996
8997      # replace the directory string with "yes".
8998      with_xf86vmode_req="yes"
8999      with_xf86vmode=$with_xf86vmode_req
9000      ;;
9001
9002     *)
9003      echo ""
9004      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
9005      echo "       If it is a directory, then \`DIR/include' will be added to"
9006      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9007      exit 1
9008      ;;
9009    esac
9010
9011
9012 VIDMODE_LIBS=""
9013
9014 if test "$with_xf86vmode" = yes; then
9015
9016   # first check for xf86vmode.h
9017
9018   ac_save_CPPFLAGS="$CPPFLAGS"
9019   if test \! -z "$includedir" ; then
9020     CPPFLAGS="$CPPFLAGS -I$includedir"
9021   fi
9022   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9023   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9024   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9025 "
9026 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9027   have_xf86vmode=yes
9028 fi
9029
9030
9031   CPPFLAGS="$ac_save_CPPFLAGS"
9032
9033   # if that succeeded, then check for the -lXxf86vm
9034   if test "$have_xf86vmode" = yes; then
9035     have_xf86vmode=no
9036
9037   ac_save_CPPFLAGS="$CPPFLAGS"
9038   ac_save_LDFLAGS="$LDFLAGS"
9039 #  ac_save_LIBS="$LIBS"
9040
9041   if test \! -z "$includedir" ; then
9042     CPPFLAGS="$CPPFLAGS -I$includedir"
9043   fi
9044   # note: $X_CFLAGS includes $x_includes
9045   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9046
9047   if test \! -z "$libdir" ; then
9048     LDFLAGS="$LDFLAGS -L$libdir"
9049   fi
9050   # note: $X_LIBS includes $x_libraries
9051   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9052
9053   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9054   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9055   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
9056 $as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
9057 if ${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+:} false; then :
9058   $as_echo_n "(cached) " >&6
9059 else
9060   ac_check_lib_save_LIBS=$LIBS
9061 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9063 /* end confdefs.h.  */
9064
9065 /* Override any GCC internal prototype to avoid an error.
9066    Use char because int might match the return type of a GCC
9067    builtin and then its argument prototype would still apply.  */
9068 #ifdef __cplusplus
9069 extern "C"
9070 #endif
9071 char XF86VidModeGetViewPort ();
9072 int
9073 main ()
9074 {
9075 return XF86VidModeGetViewPort ();
9076   ;
9077   return 0;
9078 }
9079 _ACEOF
9080 if ac_fn_c_try_link "$LINENO"; then :
9081   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
9082 else
9083   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
9084 fi
9085 rm -f core conftest.err conftest.$ac_objext \
9086     conftest$ac_exeext conftest.$ac_ext
9087 LIBS=$ac_check_lib_save_LIBS
9088 fi
9089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
9090 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
9091 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = xyes; then :
9092   have_xf86vmode=yes;
9093                    VIDMODE_LIBS="-lXxf86vm";
9094                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
9095 else
9096   true
9097 fi
9098
9099   CPPFLAGS="$ac_save_CPPFLAGS"
9100   LDFLAGS="$ac_save_LDFLAGS"
9101 #  LIBS="$ac_save_LIBS"
9102
9103   fi
9104
9105   # if that succeeded, then we've really got it.
9106   if test "$have_xf86vmode" = yes; then
9107     $as_echo "#define HAVE_XF86VMODE 1" >>confdefs.h
9108
9109   fi
9110
9111 elif test "$with_xf86vmode" != no; then
9112   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
9113   exit 1
9114 fi
9115
9116
9117 ###############################################################################
9118 #
9119 #       Check for the XF86VMODE server extension (for gamma fading.)
9120 #
9121 ###############################################################################
9122
9123 have_xf86gamma=no
9124 have_xf86gamma_ramp=no
9125 with_xf86gamma_req=unspecified
9126
9127 # Check whether --with-xf86gamma-ext was given.
9128 if test "${with_xf86gamma_ext+set}" = set; then :
9129   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
9130 else
9131   with_xf86gamma=yes
9132 fi
9133
9134
9135
9136    case "$with_xf86gamma" in
9137     yes) ;;
9138     no)  ;;
9139
9140     /*)
9141      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma headers" >&5
9142 $as_echo_n "checking for xf86gamma headers... " >&6; }
9143      d=$with_xf86gamma/include
9144      if test -d $d; then
9145        X_CFLAGS="-I$d $X_CFLAGS"
9146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9147 $as_echo "$d" >&6; }
9148      else
9149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9150 $as_echo "not found ($d: no such directory)" >&6; }
9151      fi
9152
9153      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma libs" >&5
9154 $as_echo_n "checking for xf86gamma libs... " >&6; }
9155      d=$with_xf86gamma/lib
9156      if test -d $d; then
9157        X_LIBS="-L$d $X_LIBS"
9158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9159 $as_echo "$d" >&6; }
9160      else
9161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9162 $as_echo "not found ($d: no such directory)" >&6; }
9163      fi
9164
9165      # replace the directory string with "yes".
9166      with_xf86gamma_req="yes"
9167      with_xf86gamma=$with_xf86gamma_req
9168      ;;
9169
9170     *)
9171      echo ""
9172      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
9173      echo "       If it is a directory, then \`DIR/include' will be added to"
9174      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9175      exit 1
9176      ;;
9177    esac
9178
9179
9180 if test "$with_xf86gamma" = yes; then
9181
9182   # first check for xf86vmode.h, if we haven't already
9183   if test "$have_xf86vmode" = yes; then
9184     have_xf86gamma=yes
9185   else
9186
9187   ac_save_CPPFLAGS="$CPPFLAGS"
9188   if test \! -z "$includedir" ; then
9189     CPPFLAGS="$CPPFLAGS -I$includedir"
9190   fi
9191   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9192   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9193   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9194 "
9195 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9196   have_xf86gamma=yes
9197 fi
9198
9199
9200   CPPFLAGS="$ac_save_CPPFLAGS"
9201   fi
9202
9203   # if that succeeded, then check for the -lXxf86vm
9204   if test "$have_xf86gamma" = yes; then
9205     have_xf86gamma=no
9206
9207   ac_save_CPPFLAGS="$CPPFLAGS"
9208   ac_save_LDFLAGS="$LDFLAGS"
9209 #  ac_save_LIBS="$LIBS"
9210
9211   if test \! -z "$includedir" ; then
9212     CPPFLAGS="$CPPFLAGS -I$includedir"
9213   fi
9214   # note: $X_CFLAGS includes $x_includes
9215   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9216
9217   if test \! -z "$libdir" ; then
9218     LDFLAGS="$LDFLAGS -L$libdir"
9219   fi
9220   # note: $X_LIBS includes $x_libraries
9221   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9222
9223   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9224   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9225   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
9226 $as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
9227 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+:} false; then :
9228   $as_echo_n "(cached) " >&6
9229 else
9230   ac_check_lib_save_LIBS=$LIBS
9231 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9233 /* end confdefs.h.  */
9234
9235 /* Override any GCC internal prototype to avoid an error.
9236    Use char because int might match the return type of a GCC
9237    builtin and then its argument prototype would still apply.  */
9238 #ifdef __cplusplus
9239 extern "C"
9240 #endif
9241 char XF86VidModeSetGamma ();
9242 int
9243 main ()
9244 {
9245 return XF86VidModeSetGamma ();
9246   ;
9247   return 0;
9248 }
9249 _ACEOF
9250 if ac_fn_c_try_link "$LINENO"; then :
9251   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
9252 else
9253   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
9254 fi
9255 rm -f core conftest.err conftest.$ac_objext \
9256     conftest$ac_exeext conftest.$ac_ext
9257 LIBS=$ac_check_lib_save_LIBS
9258 fi
9259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
9260 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
9261 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = xyes; then :
9262   have_xf86gamma=yes
9263 else
9264   true
9265 fi
9266
9267   CPPFLAGS="$ac_save_CPPFLAGS"
9268   LDFLAGS="$ac_save_LDFLAGS"
9269 #  LIBS="$ac_save_LIBS"
9270
9271   fi
9272
9273   # check for the Ramp versions of the functions too.
9274   if test "$have_xf86gamma" = yes; then
9275     have_xf86gamma_ramp=no
9276
9277   ac_save_CPPFLAGS="$CPPFLAGS"
9278   ac_save_LDFLAGS="$LDFLAGS"
9279 #  ac_save_LIBS="$LIBS"
9280
9281   if test \! -z "$includedir" ; then
9282     CPPFLAGS="$CPPFLAGS -I$includedir"
9283   fi
9284   # note: $X_CFLAGS includes $x_includes
9285   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9286
9287   if test \! -z "$libdir" ; then
9288     LDFLAGS="$LDFLAGS -L$libdir"
9289   fi
9290   # note: $X_LIBS includes $x_libraries
9291   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9292
9293   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9294   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9295   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
9296 $as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
9297 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+:} false; then :
9298   $as_echo_n "(cached) " >&6
9299 else
9300   ac_check_lib_save_LIBS=$LIBS
9301 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9303 /* end confdefs.h.  */
9304
9305 /* Override any GCC internal prototype to avoid an error.
9306    Use char because int might match the return type of a GCC
9307    builtin and then its argument prototype would still apply.  */
9308 #ifdef __cplusplus
9309 extern "C"
9310 #endif
9311 char XF86VidModeSetGammaRamp ();
9312 int
9313 main ()
9314 {
9315 return XF86VidModeSetGammaRamp ();
9316   ;
9317   return 0;
9318 }
9319 _ACEOF
9320 if ac_fn_c_try_link "$LINENO"; then :
9321   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
9322 else
9323   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
9324 fi
9325 rm -f core conftest.err conftest.$ac_objext \
9326     conftest$ac_exeext conftest.$ac_ext
9327 LIBS=$ac_check_lib_save_LIBS
9328 fi
9329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
9330 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
9331 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = xyes; then :
9332   have_xf86gamma_ramp=yes
9333 else
9334   true
9335 fi
9336
9337   CPPFLAGS="$ac_save_CPPFLAGS"
9338   LDFLAGS="$ac_save_LDFLAGS"
9339 #  LIBS="$ac_save_LIBS"
9340
9341   fi
9342
9343   # if those tests succeeded, then we've really got the functions.
9344   if test "$have_xf86gamma" = yes; then
9345     $as_echo "#define HAVE_XF86VMODE_GAMMA 1" >>confdefs.h
9346
9347   fi
9348
9349   if test "$have_xf86gamma_ramp" = yes; then
9350     $as_echo "#define HAVE_XF86VMODE_GAMMA_RAMP 1" >>confdefs.h
9351
9352   fi
9353
9354   # pull in the lib, if we haven't already
9355   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
9356     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
9357   fi
9358
9359 elif test "$with_xf86gamma" != no; then
9360   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
9361   exit 1
9362 fi
9363
9364
9365 ###############################################################################
9366 #
9367 #       Check for the RANDR (Resize and Rotate) server extension.
9368 #
9369 #       We need this to detect when the resolution of the desktop
9370 #       has changed out from under us (this is a newer, different
9371 #       mechanism than the XF86VMODE virtual viewports.)
9372 #
9373 ###############################################################################
9374
9375 have_randr=no
9376 with_randr_req=unspecified
9377
9378 # Check whether --with-randr-ext was given.
9379 if test "${with_randr_ext+set}" = set; then :
9380   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
9381 else
9382   with_randr=yes
9383 fi
9384
9385
9386
9387    case "$with_randr" in
9388     yes) ;;
9389     no)  ;;
9390
9391     /*)
9392      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR headers" >&5
9393 $as_echo_n "checking for RANDR headers... " >&6; }
9394      d=$with_randr/include
9395      if test -d $d; then
9396        X_CFLAGS="-I$d $X_CFLAGS"
9397        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9398 $as_echo "$d" >&6; }
9399      else
9400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9401 $as_echo "not found ($d: no such directory)" >&6; }
9402      fi
9403
9404      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR libs" >&5
9405 $as_echo_n "checking for RANDR libs... " >&6; }
9406      d=$with_randr/lib
9407      if test -d $d; then
9408        X_LIBS="-L$d $X_LIBS"
9409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9410 $as_echo "$d" >&6; }
9411      else
9412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9413 $as_echo "not found ($d: no such directory)" >&6; }
9414      fi
9415
9416      # replace the directory string with "yes".
9417      with_randr_req="yes"
9418      with_randr=$with_randr_req
9419      ;;
9420
9421     *)
9422      echo ""
9423      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
9424      echo "       If it is a directory, then \`DIR/include' will be added to"
9425      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9426      exit 1
9427      ;;
9428    esac
9429
9430
9431 if test "$with_randr" = yes; then
9432
9433   # first check for Xrandr.h
9434
9435   ac_save_CPPFLAGS="$CPPFLAGS"
9436   if test \! -z "$includedir" ; then
9437     CPPFLAGS="$CPPFLAGS -I$includedir"
9438   fi
9439   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9440   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9441   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "#include <X11/Xlib.h>
9442 "
9443 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = xyes; then :
9444   have_randr=yes
9445 fi
9446
9447
9448   CPPFLAGS="$ac_save_CPPFLAGS"
9449
9450   # if that succeeded, then check for the XRR code in the libraries
9451   if test "$have_randr" = yes; then
9452
9453     # RANDR probably needs -lXrender
9454     xrender_libs=
9455
9456   ac_save_CPPFLAGS="$CPPFLAGS"
9457   ac_save_LDFLAGS="$LDFLAGS"
9458 #  ac_save_LIBS="$LIBS"
9459
9460   if test \! -z "$includedir" ; then
9461     CPPFLAGS="$CPPFLAGS -I$includedir"
9462   fi
9463   # note: $X_CFLAGS includes $x_includes
9464   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9465
9466   if test \! -z "$libdir" ; then
9467     LDFLAGS="$LDFLAGS -L$libdir"
9468   fi
9469   # note: $X_LIBS includes $x_libraries
9470   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9471
9472   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9473   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9474   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderSetSubpixelOrder in -lXrender" >&5
9475 $as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
9476 if ${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+:} false; then :
9477   $as_echo_n "(cached) " >&6
9478 else
9479   ac_check_lib_save_LIBS=$LIBS
9480 LIBS="-lXrender -lXext -lX11 $LIBS"
9481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9482 /* end confdefs.h.  */
9483
9484 /* Override any GCC internal prototype to avoid an error.
9485    Use char because int might match the return type of a GCC
9486    builtin and then its argument prototype would still apply.  */
9487 #ifdef __cplusplus
9488 extern "C"
9489 #endif
9490 char XRenderSetSubpixelOrder ();
9491 int
9492 main ()
9493 {
9494 return XRenderSetSubpixelOrder ();
9495   ;
9496   return 0;
9497 }
9498 _ACEOF
9499 if ac_fn_c_try_link "$LINENO"; then :
9500   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
9501 else
9502   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
9503 fi
9504 rm -f core conftest.err conftest.$ac_objext \
9505     conftest$ac_exeext conftest.$ac_ext
9506 LIBS=$ac_check_lib_save_LIBS
9507 fi
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
9509 $as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
9510 if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = xyes; then :
9511   xrender_libs="-lXrender"
9512 else
9513   true
9514 fi
9515
9516   CPPFLAGS="$ac_save_CPPFLAGS"
9517   LDFLAGS="$ac_save_LDFLAGS"
9518 #  LIBS="$ac_save_LIBS"
9519
9520
9521     # first look for RANDR in -lXext
9522     have_randr=no
9523
9524   ac_save_CPPFLAGS="$CPPFLAGS"
9525   ac_save_LDFLAGS="$LDFLAGS"
9526 #  ac_save_LIBS="$LIBS"
9527
9528   if test \! -z "$includedir" ; then
9529     CPPFLAGS="$CPPFLAGS -I$includedir"
9530   fi
9531   # note: $X_CFLAGS includes $x_includes
9532   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9533
9534   if test \! -z "$libdir" ; then
9535     LDFLAGS="$LDFLAGS -L$libdir"
9536   fi
9537   # note: $X_LIBS includes $x_libraries
9538   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9539
9540   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9541   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9542   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXext" >&5
9543 $as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
9544 if ${ac_cv_lib_Xext_XRRGetScreenInfo+:} false; then :
9545   $as_echo_n "(cached) " >&6
9546 else
9547   ac_check_lib_save_LIBS=$LIBS
9548 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
9549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9550 /* end confdefs.h.  */
9551
9552 /* Override any GCC internal prototype to avoid an error.
9553    Use char because int might match the return type of a GCC
9554    builtin and then its argument prototype would still apply.  */
9555 #ifdef __cplusplus
9556 extern "C"
9557 #endif
9558 char XRRGetScreenInfo ();
9559 int
9560 main ()
9561 {
9562 return XRRGetScreenInfo ();
9563   ;
9564   return 0;
9565 }
9566 _ACEOF
9567 if ac_fn_c_try_link "$LINENO"; then :
9568   ac_cv_lib_Xext_XRRGetScreenInfo=yes
9569 else
9570   ac_cv_lib_Xext_XRRGetScreenInfo=no
9571 fi
9572 rm -f core conftest.err conftest.$ac_objext \
9573     conftest$ac_exeext conftest.$ac_ext
9574 LIBS=$ac_check_lib_save_LIBS
9575 fi
9576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
9577 $as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
9578 if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = xyes; then :
9579   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
9580 else
9581   true
9582 fi
9583
9584   CPPFLAGS="$ac_save_CPPFLAGS"
9585   LDFLAGS="$ac_save_LDFLAGS"
9586 #  LIBS="$ac_save_LIBS"
9587
9588
9589     # if that failed, look in -lXrandr
9590     if test "$have_randr" = no; then
9591
9592   ac_save_CPPFLAGS="$CPPFLAGS"
9593   ac_save_LDFLAGS="$LDFLAGS"
9594 #  ac_save_LIBS="$LIBS"
9595
9596   if test \! -z "$includedir" ; then
9597     CPPFLAGS="$CPPFLAGS -I$includedir"
9598   fi
9599   # note: $X_CFLAGS includes $x_includes
9600   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9601
9602   if test \! -z "$libdir" ; then
9603     LDFLAGS="$LDFLAGS -L$libdir"
9604   fi
9605   # note: $X_LIBS includes $x_libraries
9606   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9607
9608   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9609   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9610   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
9611 $as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
9612 if ${ac_cv_lib_Xrandr_XRRGetScreenInfo+:} false; then :
9613   $as_echo_n "(cached) " >&6
9614 else
9615   ac_check_lib_save_LIBS=$LIBS
9616 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
9617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9618 /* end confdefs.h.  */
9619
9620 /* Override any GCC internal prototype to avoid an error.
9621    Use char because int might match the return type of a GCC
9622    builtin and then its argument prototype would still apply.  */
9623 #ifdef __cplusplus
9624 extern "C"
9625 #endif
9626 char XRRGetScreenInfo ();
9627 int
9628 main ()
9629 {
9630 return XRRGetScreenInfo ();
9631   ;
9632   return 0;
9633 }
9634 _ACEOF
9635 if ac_fn_c_try_link "$LINENO"; then :
9636   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
9637 else
9638   ac_cv_lib_Xrandr_XRRGetScreenInfo=no
9639 fi
9640 rm -f core conftest.err conftest.$ac_objext \
9641     conftest$ac_exeext conftest.$ac_ext
9642 LIBS=$ac_check_lib_save_LIBS
9643 fi
9644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
9645 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
9646 if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = xyes; then :
9647   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
9648 else
9649   true
9650 fi
9651
9652   CPPFLAGS="$ac_save_CPPFLAGS"
9653   LDFLAGS="$ac_save_LDFLAGS"
9654 #  LIBS="$ac_save_LIBS"
9655
9656     fi
9657   fi
9658
9659   # if that succeeded, then we've really got it.
9660   if test "$have_randr" = yes; then
9661     $as_echo "#define HAVE_RANDR 1" >>confdefs.h
9662
9663
9664     # Now check for version 1.2 in the same libs.
9665     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
9666     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources" >&5
9667 $as_echo_n "checking for XRRGetScreenResources... " >&6; }
9668 if ${ac_cv_randr_12+:} false; then :
9669   $as_echo_n "(cached) " >&6
9670 else
9671   ac_cv_randr_12=no
9672
9673   ac_save_CPPFLAGS="$CPPFLAGS"
9674   if test \! -z "$includedir" ; then
9675     CPPFLAGS="$CPPFLAGS -I$includedir"
9676   fi
9677   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9678   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9679   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9680 /* end confdefs.h.  */
9681 #include <stdlib.h>
9682                          #include <X11/Xlib.h>
9683                          #include <X11/extensions/Xrandr.h>
9684 int
9685 main ()
9686 {
9687 XRRScreenResources *res =
9688                            XRRGetScreenResources (0, 0);
9689   ;
9690   return 0;
9691 }
9692 _ACEOF
9693 if ac_fn_c_try_compile "$LINENO"; then :
9694   ac_cv_randr_12=yes
9695 else
9696   ac_cv_randr_12=no
9697 fi
9698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9699   CPPFLAGS="$ac_save_CPPFLAGS"
9700 fi
9701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_randr_12" >&5
9702 $as_echo "$ac_cv_randr_12" >&6; }
9703     if test "$ac_cv_randr_12" = yes ; then
9704       $as_echo "#define HAVE_RANDR_12 1" >>confdefs.h
9705
9706     fi
9707 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
9708 #                  [true], $SAVER_LIBS)
9709   fi
9710
9711
9712 elif test "$with_randr" != no; then
9713   echo "error: must be yes or no: --with-randr-ext=$with_randr"
9714   exit 1
9715 fi
9716
9717
9718 ###############################################################################
9719 #
9720 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
9721 #       using other XF86 stuff.)
9722 #
9723 ###############################################################################
9724
9725 have_xf86miscsetgrabkeysstate=no
9726 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
9727
9728   ac_save_CPPFLAGS="$CPPFLAGS"
9729   ac_save_LDFLAGS="$LDFLAGS"
9730 #  ac_save_LIBS="$LIBS"
9731
9732   if test \! -z "$includedir" ; then
9733     CPPFLAGS="$CPPFLAGS -I$includedir"
9734   fi
9735   # note: $X_CFLAGS includes $x_includes
9736   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9737
9738   if test \! -z "$libdir" ; then
9739     LDFLAGS="$LDFLAGS -L$libdir"
9740   fi
9741   # note: $X_LIBS includes $x_libraries
9742   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9743
9744   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9745   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9746   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
9747 $as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
9748 if ${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+:} false; then :
9749   $as_echo_n "(cached) " >&6
9750 else
9751   ac_check_lib_save_LIBS=$LIBS
9752 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
9753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9754 /* end confdefs.h.  */
9755
9756 /* Override any GCC internal prototype to avoid an error.
9757    Use char because int might match the return type of a GCC
9758    builtin and then its argument prototype would still apply.  */
9759 #ifdef __cplusplus
9760 extern "C"
9761 #endif
9762 char XF86MiscSetGrabKeysState ();
9763 int
9764 main ()
9765 {
9766 return XF86MiscSetGrabKeysState ();
9767   ;
9768   return 0;
9769 }
9770 _ACEOF
9771 if ac_fn_c_try_link "$LINENO"; then :
9772   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
9773 else
9774   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
9775 fi
9776 rm -f core conftest.err conftest.$ac_objext \
9777     conftest$ac_exeext conftest.$ac_ext
9778 LIBS=$ac_check_lib_save_LIBS
9779 fi
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
9781 $as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
9782 if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = xyes; then :
9783   have_xf86miscsetgrabkeysstate=yes
9784 else
9785   true
9786 fi
9787
9788   CPPFLAGS="$ac_save_CPPFLAGS"
9789   LDFLAGS="$ac_save_LDFLAGS"
9790 #  LIBS="$ac_save_LIBS"
9791
9792   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
9793     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
9794     $as_echo "#define HAVE_XF86MISCSETGRABKEYSSTATE 1" >>confdefs.h
9795
9796   fi
9797 fi
9798
9799
9800 ###############################################################################
9801 #
9802 #       Check for HP XHPDisableReset and XHPEnableReset.
9803 #
9804 ###############################################################################
9805
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XHPDisableReset in X11/XHPlib.h" >&5
9807 $as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
9808
9809   ac_save_CPPFLAGS="$CPPFLAGS"
9810   if test \! -z "$includedir" ; then
9811     CPPFLAGS="$CPPFLAGS -I$includedir"
9812   fi
9813   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9814   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9816 /* end confdefs.h.  */
9817 #include <X11/XHPlib.h>
9818
9819 _ACEOF
9820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9821   $EGREP "XHPDisableReset" >/dev/null 2>&1; then :
9822   $as_echo "#define HAVE_XHPDISABLERESET 1" >>confdefs.h
9823
9824                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
9825                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9826 $as_echo "yes" >&6; }
9827 else
9828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9829 $as_echo "no" >&6; }
9830 fi
9831 rm -rf conftest*
9832
9833   CPPFLAGS="$ac_save_CPPFLAGS"
9834
9835
9836 ###############################################################################
9837 #
9838 #       Check for /proc/interrupts.
9839 #
9840 ###############################################################################
9841
9842 have_proc_interrupts=no
9843 with_proc_interrupts_req=unspecified
9844
9845 # Check whether --with-proc-interrupts was given.
9846 if test "${with_proc_interrupts+set}" = set; then :
9847   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
9848 else
9849   with_proc_interrupts=yes
9850 fi
9851
9852
9853 if test "$with_proc_interrupts" = yes; then
9854
9855   # Note that we may be building in an environment (e.g. Debian buildd chroot)
9856   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
9857   # check that it has the bits we need, but otherwise we'll just go on faith.
9858   #
9859   have_proc_interrupts=yes
9860
9861   if test -f /proc/interrupts; then
9862    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /proc/interrupts contains keyboard data" >&5
9863 $as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
9864 if ${ac_cv_have_proc_interrupts+:} false; then :
9865   $as_echo_n "(cached) " >&6
9866 else
9867   ac_cv_have_proc_interrupts=no
9868      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
9869        ac_cv_have_proc_interrupts=yes
9870      fi
9871
9872 fi
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_proc_interrupts" >&5
9874 $as_echo "$ac_cv_have_proc_interrupts" >&6; }
9875    have_proc_interrupts=$ac_cv_have_proc_interrupts
9876   fi
9877
9878   if test "$have_proc_interrupts" = yes; then
9879     $as_echo "#define HAVE_PROC_INTERRUPTS 1" >>confdefs.h
9880
9881   fi
9882
9883 elif test "$with_proc_interrupts" != no; then
9884   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
9885   exit 1
9886 fi
9887
9888
9889 ###############################################################################
9890 #
9891 #       The --enable-locking option
9892 #
9893 ###############################################################################
9894
9895 # Check whether --enable-locking was given.
9896 if test "${enable_locking+set}" = set; then :
9897   enableval=$enable_locking; enable_locking="$enableval"
9898 else
9899   if test "$ac_macosx" = yes; then
9900     # We can't lock on MacOS X, so default to not compiling in support for it.
9901     # But allow --enable-locking to override that, so I can debug Linux locking
9902     # under MacOS X11.
9903     enable_locking=no
9904    else
9905     enable_locking=yes
9906    fi
9907 fi
9908
9909 if test "$enable_locking" = yes; then
9910   true
9911 elif test "$enable_locking" = no; then
9912   $as_echo "#define NO_LOCKING 1" >>confdefs.h
9913
9914 else
9915   echo "error: must be yes or no: --enable-locking=$enable_locking"
9916   exit 1
9917 fi
9918
9919
9920 ###############################################################################
9921 #
9922 #       Whether to allow root password to unblank.
9923 #
9924 ###############################################################################
9925 # Check whether --enable-root-passwd was given.
9926 if test "${enable_root_passwd+set}" = set; then :
9927   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
9928 else
9929   enable_root_passwd=yes
9930 fi
9931
9932 if test "$enable_root_passwd" = yes; then
9933   $as_echo "#define ALLOW_ROOT_PASSWD 1" >>confdefs.h
9934
9935   true
9936 elif test "$enable_root_passwd" != no; then
9937   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
9938   exit 1
9939 fi
9940
9941 ###############################################################################
9942 #
9943 #       Check for PAM.
9944 #
9945 ###############################################################################
9946
9947 case "$host" in
9948   *-solaris*)
9949    # Solaris systems tend to come with PAM misconfigured.
9950    #  Don't build it by default, even if the headers exist.
9951    with_pam_default=no
9952    ;;
9953   *)
9954    # Default to building PAM support on all other systems, if it exists.
9955    with_pam_default=yes
9956   ;;
9957 esac
9958
9959 have_pam=no
9960 with_pam_req=unspecified
9961
9962
9963 # Check whether --with-pam was given.
9964 if test "${with_pam+set}" = set; then :
9965   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
9966 else
9967   with_pam=$with_pam_default
9968 fi
9969
9970
9971
9972 # Check whether --with-pam_service_name was given.
9973 if test "${with_pam_service_name+set}" = set; then :
9974   withval=$with_pam_service_name; pam_service_name="$withval"
9975 else
9976   pam_service_name="xscreensaver"
9977 fi
9978
9979
9980 # Check whether --enable-pam-check-account-type was given.
9981 if test "${enable_pam_check_account_type+set}" = set; then :
9982   enableval=$enable_pam_check_account_type; enable_pam_check_account_type="$enableval"
9983 else
9984   enable_pam_check_account_type=no
9985 fi
9986
9987 if test "$enable_pam_check_account_type" = yes ; then
9988   $as_echo "#define PAM_CHECK_ACCOUNT_TYPE 1" >>confdefs.h
9989
9990   true
9991 elif test "$enable_pam_check_account_type" != no ; then
9992   echo "error: must be yes or no: --enable-pam-check-account-type=$enable_pam_check_account_type"
9993   exit 1
9994 fi
9995
9996
9997    case "$with_pam" in
9998     yes) ;;
9999     no)  ;;
10000
10001     /*)
10002      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM headers" >&5
10003 $as_echo_n "checking for PAM headers... " >&6; }
10004      d=$with_pam/include
10005      if test -d $d; then
10006        X_CFLAGS="-I$d $X_CFLAGS"
10007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10008 $as_echo "$d" >&6; }
10009      else
10010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10011 $as_echo "not found ($d: no such directory)" >&6; }
10012      fi
10013
10014      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM libs" >&5
10015 $as_echo_n "checking for PAM libs... " >&6; }
10016      d=$with_pam/lib
10017      if test -d $d; then
10018        X_LIBS="-L$d $X_LIBS"
10019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10020 $as_echo "$d" >&6; }
10021      else
10022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10023 $as_echo "not found ($d: no such directory)" >&6; }
10024      fi
10025
10026      # replace the directory string with "yes".
10027      with_pam_req="yes"
10028      with_pam=$with_pam_req
10029      ;;
10030
10031     *)
10032      echo ""
10033      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
10034      echo "       If it is a directory, then \`DIR/include' will be added to"
10035      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10036      exit 1
10037      ;;
10038    esac
10039
10040
10041 if test "$enable_locking" = yes -a "$with_pam" = yes; then
10042   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM" >&5
10043 $as_echo_n "checking for PAM... " >&6; }
10044 if ${ac_cv_pam+:} false; then :
10045   $as_echo_n "(cached) " >&6
10046 else
10047
10048   ac_save_CPPFLAGS="$CPPFLAGS"
10049   if test \! -z "$includedir" ; then
10050     CPPFLAGS="$CPPFLAGS -I$includedir"
10051   fi
10052   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10053   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10055 /* end confdefs.h.  */
10056 #include <security/pam_appl.h>
10057 int
10058 main ()
10059 {
10060
10061   ;
10062   return 0;
10063 }
10064 _ACEOF
10065 if ac_fn_c_try_compile "$LINENO"; then :
10066   ac_cv_pam=yes
10067 else
10068   ac_cv_pam=no
10069 fi
10070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10071   CPPFLAGS="$ac_save_CPPFLAGS"
10072 fi
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pam" >&5
10074 $as_echo "$ac_cv_pam" >&6; }
10075   if test "$ac_cv_pam" = yes ; then
10076     have_pam=yes
10077     $as_echo "#define HAVE_PAM 1" >>confdefs.h
10078
10079     cat >>confdefs.h <<_ACEOF
10080 #define PAM_SERVICE_NAME "$pam_service_name"
10081 _ACEOF
10082
10083
10084     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
10085
10086     # libpam typically requires dlopen and dlsym.  On FreeBSD,
10087     # those are in libc.  On Linux and Solaris, they're in libdl.
10088     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10089 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10090 if ${ac_cv_lib_dl_dlopen+:} false; then :
10091   $as_echo_n "(cached) " >&6
10092 else
10093   ac_check_lib_save_LIBS=$LIBS
10094 LIBS="-ldl  $LIBS"
10095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10096 /* end confdefs.h.  */
10097
10098 /* Override any GCC internal prototype to avoid an error.
10099    Use char because int might match the return type of a GCC
10100    builtin and then its argument prototype would still apply.  */
10101 #ifdef __cplusplus
10102 extern "C"
10103 #endif
10104 char dlopen ();
10105 int
10106 main ()
10107 {
10108 return dlopen ();
10109   ;
10110   return 0;
10111 }
10112 _ACEOF
10113 if ac_fn_c_try_link "$LINENO"; then :
10114   ac_cv_lib_dl_dlopen=yes
10115 else
10116   ac_cv_lib_dl_dlopen=no
10117 fi
10118 rm -f core conftest.err conftest.$ac_objext \
10119     conftest$ac_exeext conftest.$ac_ext
10120 LIBS=$ac_check_lib_save_LIBS
10121 fi
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10123 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10124 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10125   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
10126 fi
10127
10128
10129     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
10130     have_timedwait=no
10131     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lc" >&5
10132 $as_echo_n "checking for sigtimedwait in -lc... " >&6; }
10133 if ${ac_cv_lib_c_sigtimedwait+:} false; then :
10134   $as_echo_n "(cached) " >&6
10135 else
10136   ac_check_lib_save_LIBS=$LIBS
10137 LIBS="-lc  $LIBS"
10138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10139 /* end confdefs.h.  */
10140
10141 /* Override any GCC internal prototype to avoid an error.
10142    Use char because int might match the return type of a GCC
10143    builtin and then its argument prototype would still apply.  */
10144 #ifdef __cplusplus
10145 extern "C"
10146 #endif
10147 char sigtimedwait ();
10148 int
10149 main ()
10150 {
10151 return sigtimedwait ();
10152   ;
10153   return 0;
10154 }
10155 _ACEOF
10156 if ac_fn_c_try_link "$LINENO"; then :
10157   ac_cv_lib_c_sigtimedwait=yes
10158 else
10159   ac_cv_lib_c_sigtimedwait=no
10160 fi
10161 rm -f core conftest.err conftest.$ac_objext \
10162     conftest$ac_exeext conftest.$ac_ext
10163 LIBS=$ac_check_lib_save_LIBS
10164 fi
10165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigtimedwait" >&5
10166 $as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
10167 if test "x$ac_cv_lib_c_sigtimedwait" = xyes; then :
10168   have_timedwait=yes
10169                   $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
10170
10171 fi
10172
10173     if test "$have_timedwait" = no ; then
10174       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lrt" >&5
10175 $as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
10176 if ${ac_cv_lib_rt_sigtimedwait+:} false; then :
10177   $as_echo_n "(cached) " >&6
10178 else
10179   ac_check_lib_save_LIBS=$LIBS
10180 LIBS="-lrt  $LIBS"
10181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10182 /* end confdefs.h.  */
10183
10184 /* Override any GCC internal prototype to avoid an error.
10185    Use char because int might match the return type of a GCC
10186    builtin and then its argument prototype would still apply.  */
10187 #ifdef __cplusplus
10188 extern "C"
10189 #endif
10190 char sigtimedwait ();
10191 int
10192 main ()
10193 {
10194 return sigtimedwait ();
10195   ;
10196   return 0;
10197 }
10198 _ACEOF
10199 if ac_fn_c_try_link "$LINENO"; then :
10200   ac_cv_lib_rt_sigtimedwait=yes
10201 else
10202   ac_cv_lib_rt_sigtimedwait=no
10203 fi
10204 rm -f core conftest.err conftest.$ac_objext \
10205     conftest$ac_exeext conftest.$ac_ext
10206 LIBS=$ac_check_lib_save_LIBS
10207 fi
10208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sigtimedwait" >&5
10209 $as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
10210 if test "x$ac_cv_lib_rt_sigtimedwait" = xyes; then :
10211   have_timedwait=yes
10212                                       $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
10213
10214                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
10215 fi
10216
10217     fi
10218
10219     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call pam_strerror" >&5
10220 $as_echo_n "checking how to call pam_strerror... " >&6; }
10221     if ${ac_cv_pam_strerror_args+:} false; then :
10222   $as_echo_n "(cached) " >&6
10223 else
10224
10225   ac_save_CPPFLAGS="$CPPFLAGS"
10226   if test \! -z "$includedir" ; then
10227     CPPFLAGS="$CPPFLAGS -I$includedir"
10228   fi
10229   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10230   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10231   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10232 /* end confdefs.h.  */
10233 #include <stdio.h>
10234                         #include <stdlib.h>
10235                         #include <security/pam_appl.h>
10236 int
10237 main ()
10238 {
10239 pam_handle_t *pamh = 0;
10240                         char *s = pam_strerror(pamh, PAM_SUCCESS);
10241   ;
10242   return 0;
10243 }
10244 _ACEOF
10245 if ac_fn_c_try_compile "$LINENO"; then :
10246   ac_pam_strerror_args=2
10247 else
10248
10249   ac_save_CPPFLAGS="$CPPFLAGS"
10250   if test \! -z "$includedir" ; then
10251     CPPFLAGS="$CPPFLAGS -I$includedir"
10252   fi
10253   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10254   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10256 /* end confdefs.h.  */
10257 #include <stdio.h>
10258                                           #include <stdlib.h>
10259                                           #include <security/pam_appl.h>
10260 int
10261 main ()
10262 {
10263 char *s =
10264                                            pam_strerror(PAM_SUCCESS);
10265   ;
10266   return 0;
10267 }
10268 _ACEOF
10269 if ac_fn_c_try_compile "$LINENO"; then :
10270   ac_pam_strerror_args=1
10271 else
10272   ac_pam_strerror_args=0
10273 fi
10274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10275   CPPFLAGS="$ac_save_CPPFLAGS"
10276 fi
10277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10278   CPPFLAGS="$ac_save_CPPFLAGS"
10279       ac_cv_pam_strerror_args=$ac_pam_strerror_args
10280 fi
10281
10282     ac_pam_strerror_args=$ac_cv_pam_strerror_args
10283     if test "$ac_pam_strerror_args" = 1 ; then
10284       { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
10285 $as_echo "one argument" >&6; }
10286     elif test "$ac_pam_strerror_args" = 2 ; then
10287       $as_echo "#define PAM_STRERROR_TWO_ARGS 1" >>confdefs.h
10288
10289       { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
10290 $as_echo "two arguments" >&6; }
10291     else
10292       { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
10293 $as_echo "unknown" >&6; }
10294     fi
10295
10296 # Check pam_fail_delay
10297     { $as_echo "$as_me:${as_lineno-$LINENO}: checking pam_fail_delay in -lpam" >&5
10298 $as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
10299     if ${ac_cv_pam_fail_delay+:} false; then :
10300   $as_echo_n "(cached) " >&6
10301 else
10302   ac_save_LDFLAGS="$LDFLAGS"
10303       LDFLAGS="-lpam"
10304       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10305 /* end confdefs.h.  */
10306 #include <security/pam_appl.h>
10307 int
10308 main ()
10309 {
10310 pam_handle_t *pamh = 0;
10311                    unsigned int usec = 1;
10312                    int status = pam_fail_delay (pamh, usec);
10313   ;
10314   return 0;
10315 }
10316 _ACEOF
10317 if ac_fn_c_try_link "$LINENO"; then :
10318   ac_pam_fail_delay=yes
10319 else
10320   ac_pam_fail_delay=no
10321 fi
10322 rm -f core conftest.err conftest.$ac_objext \
10323     conftest$ac_exeext conftest.$ac_ext
10324       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
10325       LDFLAGS=$ac_save_LDFLAGS
10326 fi
10327
10328
10329       if test "$ac_pam_fail_delay" = yes ; then
10330         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10331 $as_echo "yes" >&6; }
10332         $as_echo "#define HAVE_PAM_FAIL_DELAY 1" >>confdefs.h
10333
10334       else
10335         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10336 $as_echo "no" >&6; }
10337       fi
10338
10339   fi
10340 fi
10341
10342
10343 ###############################################################################
10344 #
10345 #       Check for Kerberos.
10346 #
10347 ###############################################################################
10348
10349 have_kerberos=no
10350 have_kerberos5=no
10351 with_kerberos_req=unspecified
10352
10353
10354 # Check whether --with-kerberos was given.
10355 if test "${with_kerberos+set}" = set; then :
10356   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
10357 else
10358   with_kerberos=yes
10359 fi
10360
10361
10362
10363    case "$with_kerberos" in
10364     yes) ;;
10365     no)  ;;
10366
10367     /*)
10368      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos headers" >&5
10369 $as_echo_n "checking for Kerberos headers... " >&6; }
10370      d=$with_kerberos/include
10371      if test -d $d; then
10372        X_CFLAGS="-I$d $X_CFLAGS"
10373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10374 $as_echo "$d" >&6; }
10375      else
10376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10377 $as_echo "not found ($d: no such directory)" >&6; }
10378      fi
10379
10380      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos libs" >&5
10381 $as_echo_n "checking for Kerberos libs... " >&6; }
10382      d=$with_kerberos/lib
10383      if test -d $d; then
10384        X_LIBS="-L$d $X_LIBS"
10385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10386 $as_echo "$d" >&6; }
10387      else
10388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10389 $as_echo "not found ($d: no such directory)" >&6; }
10390      fi
10391
10392      # replace the directory string with "yes".
10393      with_kerberos_req="yes"
10394      with_kerberos=$with_kerberos_req
10395      ;;
10396
10397     *)
10398      echo ""
10399      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
10400      echo "       If it is a directory, then \`DIR/include' will be added to"
10401      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10402      exit 1
10403      ;;
10404    esac
10405
10406
10407 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
10408   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 4" >&5
10409 $as_echo_n "checking for Kerberos 4... " >&6; }
10410 if ${ac_cv_kerberos+:} false; then :
10411   $as_echo_n "(cached) " >&6
10412 else
10413
10414   ac_save_CPPFLAGS="$CPPFLAGS"
10415   if test \! -z "$includedir" ; then
10416     CPPFLAGS="$CPPFLAGS -I$includedir"
10417   fi
10418   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10419   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10420   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10421 /* end confdefs.h.  */
10422 #include <krb.h>
10423 int
10424 main ()
10425 {
10426
10427   ;
10428   return 0;
10429 }
10430 _ACEOF
10431 if ac_fn_c_try_compile "$LINENO"; then :
10432   ac_cv_kerberos=yes
10433 else
10434   ac_cv_kerberos=no
10435 fi
10436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10437   CPPFLAGS="$ac_save_CPPFLAGS"
10438 fi
10439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos" >&5
10440 $as_echo "$ac_cv_kerberos" >&6; }
10441   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 5" >&5
10442 $as_echo_n "checking for Kerberos 5... " >&6; }
10443 if ${ac_cv_kerberos5+:} false; then :
10444   $as_echo_n "(cached) " >&6
10445 else
10446
10447   ac_save_CPPFLAGS="$CPPFLAGS"
10448   if test \! -z "$includedir" ; then
10449     CPPFLAGS="$CPPFLAGS -I$includedir"
10450   fi
10451   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10452   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10454 /* end confdefs.h.  */
10455 #include <kerberosIV/krb.h>
10456 int
10457 main ()
10458 {
10459
10460   ;
10461   return 0;
10462 }
10463 _ACEOF
10464 if ac_fn_c_try_compile "$LINENO"; then :
10465   ac_cv_kerberos5=yes
10466 else
10467   ac_cv_kerberos5=no
10468 fi
10469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10470   CPPFLAGS="$ac_save_CPPFLAGS"
10471 fi
10472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos5" >&5
10473 $as_echo "$ac_cv_kerberos5" >&6; }
10474
10475   if test "$ac_cv_kerberos" = yes ; then
10476     have_kerberos=yes
10477     $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10478
10479   fi
10480
10481   if test "$ac_cv_kerberos5" = yes ; then
10482
10483     # Andrew Snare <ajs@pigpond.com> wrote:
10484     #
10485     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
10486     # (krb4) was also available.  This turns out not to be the case with
10487     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
10488     # is optional.
10489     #
10490     # So, disable kerberosV support if libkrb4 can't be found.
10491     # This is not the best solution, but it makes the compile not fail.
10492     #
10493
10494   ac_save_CPPFLAGS="$CPPFLAGS"
10495   ac_save_LDFLAGS="$LDFLAGS"
10496 #  ac_save_LIBS="$LIBS"
10497
10498   if test \! -z "$includedir" ; then
10499     CPPFLAGS="$CPPFLAGS -I$includedir"
10500   fi
10501   # note: $X_CFLAGS includes $x_includes
10502   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10503
10504   if test \! -z "$libdir" ; then
10505     LDFLAGS="$LDFLAGS -L$libdir"
10506   fi
10507   # note: $X_LIBS includes $x_libraries
10508   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10509
10510   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10511   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10512   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_tf_realm in -lkrb4" >&5
10513 $as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
10514 if ${ac_cv_lib_krb4_krb_get_tf_realm+:} false; then :
10515   $as_echo_n "(cached) " >&6
10516 else
10517   ac_check_lib_save_LIBS=$LIBS
10518 LIBS="-lkrb4  $LIBS"
10519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10520 /* end confdefs.h.  */
10521
10522 /* Override any GCC internal prototype to avoid an error.
10523    Use char because int might match the return type of a GCC
10524    builtin and then its argument prototype would still apply.  */
10525 #ifdef __cplusplus
10526 extern "C"
10527 #endif
10528 char krb_get_tf_realm ();
10529 int
10530 main ()
10531 {
10532 return krb_get_tf_realm ();
10533   ;
10534   return 0;
10535 }
10536 _ACEOF
10537 if ac_fn_c_try_link "$LINENO"; then :
10538   ac_cv_lib_krb4_krb_get_tf_realm=yes
10539 else
10540   ac_cv_lib_krb4_krb_get_tf_realm=no
10541 fi
10542 rm -f core conftest.err conftest.$ac_objext \
10543     conftest$ac_exeext conftest.$ac_ext
10544 LIBS=$ac_check_lib_save_LIBS
10545 fi
10546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
10547 $as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
10548 if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = xyes; then :
10549   have_kerberos=yes
10550 else
10551   have_kerberos=no
10552 fi
10553
10554   CPPFLAGS="$ac_save_CPPFLAGS"
10555   LDFLAGS="$ac_save_LDFLAGS"
10556 #  LIBS="$ac_save_LIBS"
10557
10558     if test "$have_kerberos" = yes ; then
10559       have_kerberos5=yes
10560       $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10561
10562       $as_echo "#define HAVE_KERBEROS5 1" >>confdefs.h
10563
10564     else
10565       have_kerberos5=no
10566       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
10567 $as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
10568     fi
10569
10570   fi
10571
10572   if test "$have_kerberos5" = yes ; then
10573     # from Matt Knopp <mhat@infocalypse.netlag.com>
10574     # (who got it from amu@mit.edu)
10575
10576     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
10577
10578     # jwz: MacOS X uses -lkrb5, but not -lcrypt
10579
10580   ac_save_CPPFLAGS="$CPPFLAGS"
10581   ac_save_LDFLAGS="$LDFLAGS"
10582 #  ac_save_LIBS="$LIBS"
10583
10584   if test \! -z "$includedir" ; then
10585     CPPFLAGS="$CPPFLAGS -I$includedir"
10586   fi
10587   # note: $X_CFLAGS includes $x_includes
10588   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10589
10590   if test \! -z "$libdir" ; then
10591     LDFLAGS="$LDFLAGS -L$libdir"
10592   fi
10593   # note: $X_LIBS includes $x_libraries
10594   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10595
10596   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10597   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10598   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
10599 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
10600 if ${ac_cv_lib_crypt_crypt+:} false; then :
10601   $as_echo_n "(cached) " >&6
10602 else
10603   ac_check_lib_save_LIBS=$LIBS
10604 LIBS="-lcrypt  $LIBS"
10605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10606 /* end confdefs.h.  */
10607
10608 /* Override any GCC internal prototype to avoid an error.
10609    Use char because int might match the return type of a GCC
10610    builtin and then its argument prototype would still apply.  */
10611 #ifdef __cplusplus
10612 extern "C"
10613 #endif
10614 char crypt ();
10615 int
10616 main ()
10617 {
10618 return crypt ();
10619   ;
10620   return 0;
10621 }
10622 _ACEOF
10623 if ac_fn_c_try_link "$LINENO"; then :
10624   ac_cv_lib_crypt_crypt=yes
10625 else
10626   ac_cv_lib_crypt_crypt=no
10627 fi
10628 rm -f core conftest.err conftest.$ac_objext \
10629     conftest$ac_exeext conftest.$ac_ext
10630 LIBS=$ac_check_lib_save_LIBS
10631 fi
10632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
10633 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
10634 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
10635   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
10636 fi
10637
10638   CPPFLAGS="$ac_save_CPPFLAGS"
10639   LDFLAGS="$ac_save_LDFLAGS"
10640 #  LIBS="$ac_save_LIBS"
10641
10642
10643   elif test "$have_kerberos" = yes ; then
10644     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
10645     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
10646   fi
10647
10648   if test "$have_kerberos" = yes ; then
10649     ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
10650 if test "x$ac_cv_func_res_search" = xyes; then :
10651
10652 else
10653   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
10654 $as_echo_n "checking for res_search in -lresolv... " >&6; }
10655 if ${ac_cv_lib_resolv_res_search+:} false; then :
10656   $as_echo_n "(cached) " >&6
10657 else
10658   ac_check_lib_save_LIBS=$LIBS
10659 LIBS="-lresolv  $LIBS"
10660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10661 /* end confdefs.h.  */
10662
10663 /* Override any GCC internal prototype to avoid an error.
10664    Use char because int might match the return type of a GCC
10665    builtin and then its argument prototype would still apply.  */
10666 #ifdef __cplusplus
10667 extern "C"
10668 #endif
10669 char res_search ();
10670 int
10671 main ()
10672 {
10673 return res_search ();
10674   ;
10675   return 0;
10676 }
10677 _ACEOF
10678 if ac_fn_c_try_link "$LINENO"; then :
10679   ac_cv_lib_resolv_res_search=yes
10680 else
10681   ac_cv_lib_resolv_res_search=no
10682 fi
10683 rm -f core conftest.err conftest.$ac_objext \
10684     conftest$ac_exeext conftest.$ac_ext
10685 LIBS=$ac_check_lib_save_LIBS
10686 fi
10687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
10688 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
10689 if test "x$ac_cv_lib_resolv_res_search" = xyes; then :
10690   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
10691 else
10692   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
10693 $as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
10694
10695 fi
10696
10697 fi
10698
10699   fi
10700 fi
10701
10702
10703 ###############################################################################
10704 #
10705 #       Check for the nine billion variants of shadow passwords...
10706 #
10707 ###############################################################################
10708
10709 need_setuid=no
10710
10711 have_shadow=no
10712 with_shadow_req=unspecified
10713
10714
10715 # Check whether --with-shadow was given.
10716 if test "${with_shadow+set}" = set; then :
10717   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
10718 else
10719   with_shadow=yes
10720 fi
10721
10722
10723
10724    case "$with_shadow" in
10725     yes) ;;
10726     no)  ;;
10727
10728     /*)
10729      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password headers" >&5
10730 $as_echo_n "checking for shadow password headers... " >&6; }
10731      d=$with_shadow/include
10732      if test -d $d; then
10733        X_CFLAGS="-I$d $X_CFLAGS"
10734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10735 $as_echo "$d" >&6; }
10736      else
10737        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10738 $as_echo "not found ($d: no such directory)" >&6; }
10739      fi
10740
10741      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password libs" >&5
10742 $as_echo_n "checking for shadow password libs... " >&6; }
10743      d=$with_shadow/lib
10744      if test -d $d; then
10745        X_LIBS="-L$d $X_LIBS"
10746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10747 $as_echo "$d" >&6; }
10748      else
10749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10750 $as_echo "not found ($d: no such directory)" >&6; }
10751      fi
10752
10753      # replace the directory string with "yes".
10754      with_shadow_req="yes"
10755      with_shadow=$with_shadow_req
10756      ;;
10757
10758     *)
10759      echo ""
10760      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
10761      echo "       If it is a directory, then \`DIR/include' will be added to"
10762      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10763      exit 1
10764      ;;
10765    esac
10766
10767
10768 if test "$enable_locking" = no ; then
10769   with_shadow_req=no
10770   with_shadow=no
10771 fi
10772
10773
10774 ###############################################################################
10775 #
10776 #       Check for Sun "adjunct" passwords.
10777 #
10778 ###############################################################################
10779
10780 if test "$with_shadow" = yes ; then
10781   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sun-style shadow passwords" >&5
10782 $as_echo_n "checking for Sun-style shadow passwords... " >&6; }
10783 if ${ac_cv_sun_adjunct+:} false; then :
10784   $as_echo_n "(cached) " >&6
10785 else
10786
10787   ac_save_CPPFLAGS="$CPPFLAGS"
10788   if test \! -z "$includedir" ; then
10789     CPPFLAGS="$CPPFLAGS -I$includedir"
10790   fi
10791   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10792   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10793   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10794 /* end confdefs.h.  */
10795 #include <stdlib.h>
10796                                     #include <unistd.h>
10797                                     #include <sys/types.h>
10798                                     #include <sys/label.h>
10799                                     #include <sys/audit.h>
10800                                     #include <pwdadj.h>
10801 int
10802 main ()
10803 {
10804 struct passwd_adjunct *p = getpwanam("nobody");
10805                        const char *pw = p->pwa_passwd;
10806   ;
10807   return 0;
10808 }
10809 _ACEOF
10810 if ac_fn_c_try_compile "$LINENO"; then :
10811   ac_cv_sun_adjunct=yes
10812 else
10813   ac_cv_sun_adjunct=no
10814 fi
10815 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10816   CPPFLAGS="$ac_save_CPPFLAGS"
10817 fi
10818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sun_adjunct" >&5
10819 $as_echo "$ac_cv_sun_adjunct" >&6; }
10820   if test "$ac_cv_sun_adjunct" = yes; then
10821     have_shadow_adjunct=yes
10822     have_shadow=yes
10823     need_setuid=yes
10824   fi
10825 fi
10826
10827
10828 ###############################################################################
10829 #
10830 #       Check for DEC and SCO so-called "enhanced" security.
10831 #
10832 ###############################################################################
10833
10834 if test "$with_shadow" = yes ; then
10835   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DEC-style shadow passwords" >&5
10836 $as_echo_n "checking for DEC-style shadow passwords... " >&6; }
10837 if ${ac_cv_enhanced_passwd+:} false; then :
10838   $as_echo_n "(cached) " >&6
10839 else
10840
10841   ac_save_CPPFLAGS="$CPPFLAGS"
10842   if test \! -z "$includedir" ; then
10843     CPPFLAGS="$CPPFLAGS -I$includedir"
10844   fi
10845   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10846   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10847   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10848 /* end confdefs.h.  */
10849 #include <stdlib.h>
10850                                     #include <unistd.h>
10851                                     #include <sys/types.h>
10852                                     #include <pwd.h>
10853                                     #include <sys/security.h>
10854                                     #include <prot.h>
10855 int
10856 main ()
10857 {
10858 struct pr_passwd *p;
10859                        const char *pw;
10860                        set_auth_parameters(0, 0);
10861                        check_auth_parameters();
10862                        p = getprpwnam("nobody");
10863                        pw = p->ufld.fd_encrypt;
10864   ;
10865   return 0;
10866 }
10867 _ACEOF
10868 if ac_fn_c_try_compile "$LINENO"; then :
10869   ac_cv_enhanced_passwd=yes
10870 else
10871   ac_cv_enhanced_passwd=no
10872 fi
10873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10874   CPPFLAGS="$ac_save_CPPFLAGS"
10875 fi
10876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enhanced_passwd" >&5
10877 $as_echo "$ac_cv_enhanced_passwd" >&6; }
10878   if test $ac_cv_enhanced_passwd = yes; then
10879     have_shadow_enhanced=yes
10880     have_shadow=yes
10881     need_setuid=yes
10882
10883     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
10884     # (I'm told it needs -lcurses too, but I don't understand why.)
10885     # But on DEC, it's in -lsecurity.
10886     #
10887     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lprot" >&5
10888 $as_echo_n "checking for getprpwnam in -lprot... " >&6; }
10889 if ${ac_cv_lib_prot_getprpwnam+:} false; then :
10890   $as_echo_n "(cached) " >&6
10891 else
10892   ac_check_lib_save_LIBS=$LIBS
10893 LIBS="-lprot -lx $LIBS"
10894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10895 /* end confdefs.h.  */
10896
10897 /* Override any GCC internal prototype to avoid an error.
10898    Use char because int might match the return type of a GCC
10899    builtin and then its argument prototype would still apply.  */
10900 #ifdef __cplusplus
10901 extern "C"
10902 #endif
10903 char getprpwnam ();
10904 int
10905 main ()
10906 {
10907 return getprpwnam ();
10908   ;
10909   return 0;
10910 }
10911 _ACEOF
10912 if ac_fn_c_try_link "$LINENO"; then :
10913   ac_cv_lib_prot_getprpwnam=yes
10914 else
10915   ac_cv_lib_prot_getprpwnam=no
10916 fi
10917 rm -f core conftest.err conftest.$ac_objext \
10918     conftest$ac_exeext conftest.$ac_ext
10919 LIBS=$ac_check_lib_save_LIBS
10920 fi
10921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getprpwnam" >&5
10922 $as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
10923 if test "x$ac_cv_lib_prot_getprpwnam" = xyes; then :
10924   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
10925 else
10926   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lsecurity" >&5
10927 $as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
10928 if ${ac_cv_lib_security_getprpwnam+:} false; then :
10929   $as_echo_n "(cached) " >&6
10930 else
10931   ac_check_lib_save_LIBS=$LIBS
10932 LIBS="-lsecurity  $LIBS"
10933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10934 /* end confdefs.h.  */
10935
10936 /* Override any GCC internal prototype to avoid an error.
10937    Use char because int might match the return type of a GCC
10938    builtin and then its argument prototype would still apply.  */
10939 #ifdef __cplusplus
10940 extern "C"
10941 #endif
10942 char getprpwnam ();
10943 int
10944 main ()
10945 {
10946 return getprpwnam ();
10947   ;
10948   return 0;
10949 }
10950 _ACEOF
10951 if ac_fn_c_try_link "$LINENO"; then :
10952   ac_cv_lib_security_getprpwnam=yes
10953 else
10954   ac_cv_lib_security_getprpwnam=no
10955 fi
10956 rm -f core conftest.err conftest.$ac_objext \
10957     conftest$ac_exeext conftest.$ac_ext
10958 LIBS=$ac_check_lib_save_LIBS
10959 fi
10960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_getprpwnam" >&5
10961 $as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
10962 if test "x$ac_cv_lib_security_getprpwnam" = xyes; then :
10963   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
10964 fi
10965
10966 fi
10967
10968   fi
10969 fi
10970
10971 ###############################################################################
10972 #
10973 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
10974 #
10975 ###############################################################################
10976
10977 if test "$with_shadow" = yes ; then
10978   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HP-style shadow passwords" >&5
10979 $as_echo_n "checking for HP-style shadow passwords... " >&6; }
10980 if ${ac_cv_hpux_passwd+:} false; then :
10981   $as_echo_n "(cached) " >&6
10982 else
10983
10984   ac_save_CPPFLAGS="$CPPFLAGS"
10985   if test \! -z "$includedir" ; then
10986     CPPFLAGS="$CPPFLAGS -I$includedir"
10987   fi
10988   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10989   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10991 /* end confdefs.h.  */
10992 #include <stdlib.h>
10993                                     #include <unistd.h>
10994                                     #include <sys/types.h>
10995                                     #include <pwd.h>
10996                                     #include <hpsecurity.h>
10997                                     #include <prot.h>
10998 int
10999 main ()
11000 {
11001 struct s_passwd *p = getspwnam("nobody");
11002                        const char *pw = p->pw_passwd;
11003   ;
11004   return 0;
11005 }
11006 _ACEOF
11007 if ac_fn_c_try_compile "$LINENO"; then :
11008   ac_cv_hpux_passwd=yes
11009 else
11010   ac_cv_hpux_passwd=no
11011 fi
11012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11013   CPPFLAGS="$ac_save_CPPFLAGS"
11014 fi
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_hpux_passwd" >&5
11016 $as_echo "$ac_cv_hpux_passwd" >&6; }
11017   if test "$ac_cv_hpux_passwd" = yes; then
11018     have_shadow_hpux=yes
11019     have_shadow=yes
11020     need_setuid=yes
11021
11022     # on HPUX, bigcrypt is in -lsec
11023     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsec" >&5
11024 $as_echo_n "checking for bigcrypt in -lsec... " >&6; }
11025 if ${ac_cv_lib_sec_bigcrypt+:} false; then :
11026   $as_echo_n "(cached) " >&6
11027 else
11028   ac_check_lib_save_LIBS=$LIBS
11029 LIBS="-lsec  $LIBS"
11030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11031 /* end confdefs.h.  */
11032
11033 /* Override any GCC internal prototype to avoid an error.
11034    Use char because int might match the return type of a GCC
11035    builtin and then its argument prototype would still apply.  */
11036 #ifdef __cplusplus
11037 extern "C"
11038 #endif
11039 char bigcrypt ();
11040 int
11041 main ()
11042 {
11043 return bigcrypt ();
11044   ;
11045   return 0;
11046 }
11047 _ACEOF
11048 if ac_fn_c_try_link "$LINENO"; then :
11049   ac_cv_lib_sec_bigcrypt=yes
11050 else
11051   ac_cv_lib_sec_bigcrypt=no
11052 fi
11053 rm -f core conftest.err conftest.$ac_objext \
11054     conftest$ac_exeext conftest.$ac_ext
11055 LIBS=$ac_check_lib_save_LIBS
11056 fi
11057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_bigcrypt" >&5
11058 $as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
11059 if test "x$ac_cv_lib_sec_bigcrypt" = xyes; then :
11060   PASSWD_LIBS="$PASSWD_LIBS -lsec"
11061 fi
11062
11063   fi
11064 fi
11065
11066
11067 ###############################################################################
11068 #
11069 #       Check for FreeBSD-style shadow passwords.
11070 #
11071 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
11072 #       password systems -- except you only get stuff in the pw_passwd field
11073 #       if the running program is setuid.  So, guess that we've got this
11074 #       lossage to contend with if /etc/master.passwd exists, and default to
11075 #       a setuid installation.
11076 #
11077 ###############################################################################
11078
11079 if test "$with_shadow" = yes ; then
11080   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeBSD-style shadow passwords" >&5
11081 $as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
11082 if ${ac_cv_master_passwd+:} false; then :
11083   $as_echo_n "(cached) " >&6
11084 else
11085   if test -f /etc/master.passwd ; then
11086                     ac_cv_master_passwd=yes
11087                   else
11088                     ac_cv_master_passwd=no
11089                   fi
11090 fi
11091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_master_passwd" >&5
11092 $as_echo "$ac_cv_master_passwd" >&6; }
11093   if test "$ac_cv_master_passwd" = yes; then
11094     need_setuid=yes
11095   fi
11096 fi
11097
11098
11099 ###############################################################################
11100 #
11101 #       Check for traditional (ha!) shadow passwords.
11102 #
11103 ###############################################################################
11104
11105 if test "$with_shadow" = yes ; then
11106   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic shadow passwords" >&5
11107 $as_echo_n "checking for generic shadow passwords... " >&6; }
11108 if ${ac_cv_shadow+:} false; then :
11109   $as_echo_n "(cached) " >&6
11110 else
11111
11112   ac_save_CPPFLAGS="$CPPFLAGS"
11113   if test \! -z "$includedir" ; then
11114     CPPFLAGS="$CPPFLAGS -I$includedir"
11115   fi
11116   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11117   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11119 /* end confdefs.h.  */
11120 #include <stdlib.h>
11121                                     #include <unistd.h>
11122                                     #include <sys/types.h>
11123                                     #include <pwd.h>
11124                                     #include <shadow.h>
11125 int
11126 main ()
11127 {
11128 struct spwd *p = getspnam("nobody");
11129                        const char *pw = p->sp_pwdp;
11130   ;
11131   return 0;
11132 }
11133 _ACEOF
11134 if ac_fn_c_try_compile "$LINENO"; then :
11135   ac_cv_shadow=yes
11136 else
11137   ac_cv_shadow=no
11138 fi
11139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11140   CPPFLAGS="$ac_save_CPPFLAGS"
11141 fi
11142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_shadow" >&5
11143 $as_echo "$ac_cv_shadow" >&6; }
11144   if test "$ac_cv_shadow" = yes; then
11145     have_shadow=yes
11146     need_setuid=yes
11147
11148     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
11149     have_getspnam=no
11150     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lc" >&5
11151 $as_echo_n "checking for getspnam in -lc... " >&6; }
11152 if ${ac_cv_lib_c_getspnam+:} false; then :
11153   $as_echo_n "(cached) " >&6
11154 else
11155   ac_check_lib_save_LIBS=$LIBS
11156 LIBS="-lc  $LIBS"
11157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11158 /* end confdefs.h.  */
11159
11160 /* Override any GCC internal prototype to avoid an error.
11161    Use char because int might match the return type of a GCC
11162    builtin and then its argument prototype would still apply.  */
11163 #ifdef __cplusplus
11164 extern "C"
11165 #endif
11166 char getspnam ();
11167 int
11168 main ()
11169 {
11170 return getspnam ();
11171   ;
11172   return 0;
11173 }
11174 _ACEOF
11175 if ac_fn_c_try_link "$LINENO"; then :
11176   ac_cv_lib_c_getspnam=yes
11177 else
11178   ac_cv_lib_c_getspnam=no
11179 fi
11180 rm -f core conftest.err conftest.$ac_objext \
11181     conftest$ac_exeext conftest.$ac_ext
11182 LIBS=$ac_check_lib_save_LIBS
11183 fi
11184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_getspnam" >&5
11185 $as_echo "$ac_cv_lib_c_getspnam" >&6; }
11186 if test "x$ac_cv_lib_c_getspnam" = xyes; then :
11187   have_getspnam=yes
11188 fi
11189
11190     if test "$have_getspnam" = no ; then
11191       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
11192 $as_echo_n "checking for getspnam in -lgen... " >&6; }
11193 if ${ac_cv_lib_gen_getspnam+:} false; then :
11194   $as_echo_n "(cached) " >&6
11195 else
11196   ac_check_lib_save_LIBS=$LIBS
11197 LIBS="-lgen  $LIBS"
11198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11199 /* end confdefs.h.  */
11200
11201 /* Override any GCC internal prototype to avoid an error.
11202    Use char because int might match the return type of a GCC
11203    builtin and then its argument prototype would still apply.  */
11204 #ifdef __cplusplus
11205 extern "C"
11206 #endif
11207 char getspnam ();
11208 int
11209 main ()
11210 {
11211 return getspnam ();
11212   ;
11213   return 0;
11214 }
11215 _ACEOF
11216 if ac_fn_c_try_link "$LINENO"; then :
11217   ac_cv_lib_gen_getspnam=yes
11218 else
11219   ac_cv_lib_gen_getspnam=no
11220 fi
11221 rm -f core conftest.err conftest.$ac_objext \
11222     conftest$ac_exeext conftest.$ac_ext
11223 LIBS=$ac_check_lib_save_LIBS
11224 fi
11225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
11226 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
11227 if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
11228   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
11229 fi
11230
11231     fi
11232   fi
11233 fi
11234
11235
11236 ###############################################################################
11237 #
11238 #       Check for other libraries needed for non-shadow passwords.
11239 #
11240 ###############################################################################
11241
11242 if test "$enable_locking" = yes ; then
11243
11244   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
11245   have_crypt=no
11246   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lc" >&5
11247 $as_echo_n "checking for crypt in -lc... " >&6; }
11248 if ${ac_cv_lib_c_crypt+:} false; then :
11249   $as_echo_n "(cached) " >&6
11250 else
11251   ac_check_lib_save_LIBS=$LIBS
11252 LIBS="-lc  $LIBS"
11253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11254 /* end confdefs.h.  */
11255
11256 /* Override any GCC internal prototype to avoid an error.
11257    Use char because int might match the return type of a GCC
11258    builtin and then its argument prototype would still apply.  */
11259 #ifdef __cplusplus
11260 extern "C"
11261 #endif
11262 char crypt ();
11263 int
11264 main ()
11265 {
11266 return crypt ();
11267   ;
11268   return 0;
11269 }
11270 _ACEOF
11271 if ac_fn_c_try_link "$LINENO"; then :
11272   ac_cv_lib_c_crypt=yes
11273 else
11274   ac_cv_lib_c_crypt=no
11275 fi
11276 rm -f core conftest.err conftest.$ac_objext \
11277     conftest$ac_exeext conftest.$ac_ext
11278 LIBS=$ac_check_lib_save_LIBS
11279 fi
11280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_crypt" >&5
11281 $as_echo "$ac_cv_lib_c_crypt" >&6; }
11282 if test "x$ac_cv_lib_c_crypt" = xyes; then :
11283   have_crypt=yes
11284 fi
11285
11286   if test "$have_crypt" = no ; then
11287     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11288 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
11289 if ${ac_cv_lib_crypt_crypt+:} false; then :
11290   $as_echo_n "(cached) " >&6
11291 else
11292   ac_check_lib_save_LIBS=$LIBS
11293 LIBS="-lcrypt  $LIBS"
11294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11295 /* end confdefs.h.  */
11296
11297 /* Override any GCC internal prototype to avoid an error.
11298    Use char because int might match the return type of a GCC
11299    builtin and then its argument prototype would still apply.  */
11300 #ifdef __cplusplus
11301 extern "C"
11302 #endif
11303 char crypt ();
11304 int
11305 main ()
11306 {
11307 return crypt ();
11308   ;
11309   return 0;
11310 }
11311 _ACEOF
11312 if ac_fn_c_try_link "$LINENO"; then :
11313   ac_cv_lib_crypt_crypt=yes
11314 else
11315   ac_cv_lib_crypt_crypt=no
11316 fi
11317 rm -f core conftest.err conftest.$ac_objext \
11318     conftest$ac_exeext conftest.$ac_ext
11319 LIBS=$ac_check_lib_save_LIBS
11320 fi
11321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
11322 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11323 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
11324   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11325 fi
11326
11327   fi
11328 fi
11329
11330
11331 # Most of the above shadow mechanisms will have set need_setuid to yes,
11332 # if they were found.  But, on some systems, we need setuid even when
11333 # using plain old vanilla passwords.
11334 #
11335 if test "$enable_locking" = yes ; then
11336   case "$host" in
11337     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
11338       need_setuid=yes
11339     ;;
11340   esac
11341 fi
11342
11343
11344 if test "$have_shadow_adjunct" = yes ; then
11345   $as_echo "#define HAVE_ADJUNCT_PASSWD 1" >>confdefs.h
11346
11347 elif test "$have_shadow_enhanced" = yes ; then
11348   $as_echo "#define HAVE_ENHANCED_PASSWD 1" >>confdefs.h
11349
11350 elif test "$have_shadow_hpux" = yes ; then
11351   $as_echo "#define HAVE_HPUX_PASSWD 1" >>confdefs.h
11352
11353 elif test "$have_shadow" = yes ; then
11354   $as_echo "#define HAVE_SHADOW_PASSWD 1" >>confdefs.h
11355
11356 fi
11357
11358
11359 ###############################################################################
11360 #
11361 #       Check for external password helper
11362 #       On SuSE, instead of having xscreensaver be a setuid program, they
11363 #       fork an external program that takes the password on stdin, and
11364 #       returns true if that password is a valid one.  Then only that
11365 #       smaller program needs to be setuid.
11366 #
11367 #       (Note that this external program is not a GUI: the GUI is still
11368 #       all in xscreensaver itself; the external program just does auth.)
11369 #
11370 ###############################################################################
11371
11372 have_passwd_helper=no
11373 with_passwd_helper_req=unspecified
11374
11375
11376 # Check whether --with-passwd-helper was given.
11377 if test "${with_passwd_helper+set}" = set; then :
11378   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
11379 else
11380   with_passwd_helper=no
11381 fi
11382
11383 # no HANDLE_X_PATH_ARG for this one
11384
11385 if test "$enable_locking" = no ; then
11386   with_passwd_helper_req=no
11387   with_passwd_helper=no
11388 fi
11389
11390 case "$with_passwd_helper" in
11391   ""|no) : ;;
11392   /*)
11393     cat >>confdefs.h <<_ACEOF
11394 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
11395 _ACEOF
11396
11397     have_passwd_helper=yes;;
11398   *)
11399     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
11400     exit 1
11401 esac
11402
11403
11404 ###############################################################################
11405 #
11406 #       Check for a login manager for a "New Login" button on the lock dialog.
11407 #       Usually this will be "/usr/bin/gdmflexiserver".
11408 #
11409 ###############################################################################
11410
11411 with_login_manager_req=unspecified
11412 default_login_manager_1='gdmflexiserver -ls'
11413 default_login_manager_2='kdmctl reserve'
11414
11415
11416 # Check whether --with-login-manager was given.
11417 if test "${with_login_manager+set}" = set; then :
11418   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
11419 else
11420   with_login_manager=yes
11421 fi
11422
11423 # no HANDLE_X_PATH_ARG for this one
11424
11425 if test "$enable_locking" = no ; then
11426   with_login_manager_req=no
11427   with_login_manager=no
11428 fi
11429
11430 case "$with_login_manager_req" in
11431   no)
11432     with_login_manager=""
11433   ;;
11434
11435   yes|unspecified)
11436     # Try both defaults, use the one that exists.
11437
11438     set dummy $default_login_manager_1 ; login_manager_tmp=$2
11439     unset ac_cv_path_login_manager_tmp  # don't cache
11440     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11441 set dummy $login_manager_tmp; ac_word=$2
11442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11443 $as_echo_n "checking for $ac_word... " >&6; }
11444 if ${ac_cv_path_login_manager_tmp+:} false; then :
11445   $as_echo_n "(cached) " >&6
11446 else
11447   case $login_manager_tmp in
11448   [\\/]* | ?:[\\/]*)
11449   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11450   ;;
11451   *)
11452   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11453 for as_dir in $PATH
11454 do
11455   IFS=$as_save_IFS
11456   test -z "$as_dir" && as_dir=.
11457     for ac_exec_ext in '' $ac_executable_extensions; do
11458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11459     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11461     break 2
11462   fi
11463 done
11464   done
11465 IFS=$as_save_IFS
11466
11467   ;;
11468 esac
11469 fi
11470 login_manager_tmp=$ac_cv_path_login_manager_tmp
11471 if test -n "$login_manager_tmp"; then
11472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11473 $as_echo "$login_manager_tmp" >&6; }
11474 else
11475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11476 $as_echo "no" >&6; }
11477 fi
11478
11479
11480     if test ! -z "$login_manager_tmp" ; then
11481       with_login_manager="$default_login_manager_1"
11482     else
11483       set dummy $default_login_manager_2 ; login_manager_tmp=$2
11484       unset ac_cv_path_login_manager_tmp  # don't cache
11485       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11486 set dummy $login_manager_tmp; ac_word=$2
11487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11488 $as_echo_n "checking for $ac_word... " >&6; }
11489 if ${ac_cv_path_login_manager_tmp+:} false; then :
11490   $as_echo_n "(cached) " >&6
11491 else
11492   case $login_manager_tmp in
11493   [\\/]* | ?:[\\/]*)
11494   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11495   ;;
11496   *)
11497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11498 for as_dir in $PATH
11499 do
11500   IFS=$as_save_IFS
11501   test -z "$as_dir" && as_dir=.
11502     for ac_exec_ext in '' $ac_executable_extensions; do
11503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11504     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11506     break 2
11507   fi
11508 done
11509   done
11510 IFS=$as_save_IFS
11511
11512   ;;
11513 esac
11514 fi
11515 login_manager_tmp=$ac_cv_path_login_manager_tmp
11516 if test -n "$login_manager_tmp"; then
11517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11518 $as_echo "$login_manager_tmp" >&6; }
11519 else
11520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11521 $as_echo "no" >&6; }
11522 fi
11523
11524
11525       if test ! -z "$login_manager_tmp" ; then
11526         with_login_manager="$default_login_manager_2"
11527       else
11528         with_login_manager=""
11529       fi
11530     fi
11531   ;;
11532
11533   /*)
11534     # absolute path specified on cmd line
11535     set dummy $with_login_manager_req ; login_manager_tmp=$2
11536     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $login_manager_tmp" >&5
11537 $as_echo_n "checking for $login_manager_tmp... " >&6; }
11538     if test -x "$login_manager_tmp" ; then
11539       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11540 $as_echo "yes" >&6; }
11541     else
11542       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11543 $as_echo "no" >&6; }
11544       with_login_manager=""
11545     fi
11546   ;;
11547
11548   *)
11549     # relative path specified on cmd line
11550     set dummy $with_login_manager_req ; login_manager_tmp=$2
11551     unset ac_cv_path_login_manager_tmp    # don't cache
11552     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11553 set dummy $login_manager_tmp; ac_word=$2
11554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11555 $as_echo_n "checking for $ac_word... " >&6; }
11556 if ${ac_cv_path_login_manager_tmp+:} false; then :
11557   $as_echo_n "(cached) " >&6
11558 else
11559   case $login_manager_tmp in
11560   [\\/]* | ?:[\\/]*)
11561   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11562   ;;
11563   *)
11564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11565 for as_dir in $PATH
11566 do
11567   IFS=$as_save_IFS
11568   test -z "$as_dir" && as_dir=.
11569     for ac_exec_ext in '' $ac_executable_extensions; do
11570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11571     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11573     break 2
11574   fi
11575 done
11576   done
11577 IFS=$as_save_IFS
11578
11579   ;;
11580 esac
11581 fi
11582 login_manager_tmp=$ac_cv_path_login_manager_tmp
11583 if test -n "$login_manager_tmp"; then
11584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11585 $as_echo "$login_manager_tmp" >&6; }
11586 else
11587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11588 $as_echo "no" >&6; }
11589 fi
11590
11591
11592     if test -z "$login_manager_tmp" ; then
11593       with_login_manager=""
11594     else
11595       with_login_manager="$login_manager_tmp"
11596     fi
11597   ;;
11598 esac
11599 ac_cv_login_manager_program="$with_login_manager"
11600
11601 NEW_LOGIN_COMMAND_P=''
11602 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
11603
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for login manager" >&5
11605 $as_echo_n "checking for login manager... " >&6; }
11606 if test -z "$NEW_LOGIN_COMMAND" ; then
11607   NEW_LOGIN_COMMAND="$default_login_manager_1"
11608   NEW_LOGIN_COMMAND_P='! '
11609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND (disabled)" >&5
11610 $as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
11611 else
11612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND" >&5
11613 $as_echo "$NEW_LOGIN_COMMAND" >&6; }
11614 fi
11615
11616
11617 ###############################################################################
11618 #
11619 #       Check for -lgtk (and Gnome stuff)
11620 #
11621 ###############################################################################
11622
11623 have_gtk=no
11624 with_gtk_req=unspecified
11625
11626 # Check whether --with-gtk was given.
11627 if test "${with_gtk+set}" = set; then :
11628   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
11629 else
11630   with_gtk=yes
11631 fi
11632
11633
11634 # if --with-gtk=/directory/ was specified, remember that directory so that
11635 # we can also look for the `gtk-config' program in that directory.
11636 case "$with_gtk" in
11637   /*)
11638     gtk_dir="$with_gtk"
11639     ;;
11640   *)
11641     gtk_dir=""
11642     ;;
11643 esac
11644
11645
11646    case "$with_gtk" in
11647     yes) ;;
11648     no)  ;;
11649
11650     /*)
11651      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk headers" >&5
11652 $as_echo_n "checking for Gtk headers... " >&6; }
11653      d=$with_gtk/include
11654      if test -d $d; then
11655        X_CFLAGS="-I$d $X_CFLAGS"
11656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11657 $as_echo "$d" >&6; }
11658      else
11659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11660 $as_echo "not found ($d: no such directory)" >&6; }
11661      fi
11662
11663      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
11664 $as_echo_n "checking for Gtk libs... " >&6; }
11665      d=$with_gtk/lib
11666      if test -d $d; then
11667        X_LIBS="-L$d $X_LIBS"
11668        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11669 $as_echo "$d" >&6; }
11670      else
11671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11672 $as_echo "not found ($d: no such directory)" >&6; }
11673      fi
11674
11675      # replace the directory string with "yes".
11676      with_gtk_req="yes"
11677      with_gtk=$with_gtk_req
11678      ;;
11679
11680     *)
11681      echo ""
11682      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
11683      echo "       If it is a directory, then \`DIR/include' will be added to"
11684      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11685      exit 1
11686      ;;
11687    esac
11688
11689
11690 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
11691   echo "error: must be yes or no: --with-gtk=$with_gtk"
11692   exit 1
11693 fi
11694
11695
11696 parse_gtk_version_string() {
11697   # M4 sucks!!
11698
11699   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
11700   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
11701
11702   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
11703   if test -z "$ac_gtk_version"; then
11704     ac_gtk_version=unknown
11705     ac_gtk_version_string=unknown
11706   fi
11707 }
11708
11709 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
11710 # if the user specified --with-gtk=/foo/ then look there.
11711 #
11712 gtk_path="$PATH"
11713 if test ! -z "$gtk_dir"; then
11714   # canonicalize slashes.
11715   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
11716   gtk_path="$foo:$gtk_path"
11717 fi
11718
11719 for ac_prog in pkg-config
11720 do
11721   # Extract the first word of "$ac_prog", so it can be a program name with args.
11722 set dummy $ac_prog; ac_word=$2
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11724 $as_echo_n "checking for $ac_word... " >&6; }
11725 if ${ac_cv_path_pkg_config+:} false; then :
11726   $as_echo_n "(cached) " >&6
11727 else
11728   case $pkg_config in
11729   [\\/]* | ?:[\\/]*)
11730   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
11731   ;;
11732   *)
11733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11734 for as_dir in $gtk_path
11735 do
11736   IFS=$as_save_IFS
11737   test -z "$as_dir" && as_dir=.
11738     for ac_exec_ext in '' $ac_executable_extensions; do
11739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11740     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
11741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11742     break 2
11743   fi
11744 done
11745   done
11746 IFS=$as_save_IFS
11747
11748   ;;
11749 esac
11750 fi
11751 pkg_config=$ac_cv_path_pkg_config
11752 if test -n "$pkg_config"; then
11753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config" >&5
11754 $as_echo "$pkg_config" >&6; }
11755 else
11756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11757 $as_echo "no" >&6; }
11758 fi
11759
11760
11761   test -n "$pkg_config" && break
11762 done
11763
11764
11765 if test -z "$pkg_config" ; then
11766   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found!" >&5
11767 $as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
11768   pkg_config="false"
11769 fi
11770
11771
11772 # Utility function for running pkg-config-based tests...
11773 #
11774 pkgs=''
11775 pkg_check_version() {
11776   if test "$ok" = yes ; then
11777     req="$1"
11778     min="$2"
11779     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $req" >&5
11780 $as_echo_n "checking for $req... " >&6; }
11781     if $pkg_config --exists "$req" ; then
11782       vers=`$pkg_config --modversion "$req"`
11783       if $pkg_config --exists "$req >= $min" ; then
11784         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers" >&5
11785 $as_echo "$vers" >&6; }
11786         pkgs="$pkgs $req"
11787         return 1
11788       else
11789         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers (wanted >= $min)" >&5
11790 $as_echo "$vers (wanted >= $min)" >&6; }
11791         ok=no
11792         return 0
11793       fi
11794     else
11795       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11796 $as_echo "no" >&6; }
11797       ok=no
11798       return 0
11799     fi
11800   fi
11801 }
11802
11803
11804 jurassic_gtk=no
11805 gtk_halfassed=no
11806
11807 if test "$with_gtk" = yes; then
11808   have_gtk=no
11809
11810   ok="yes"
11811   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
11812   pkg_check_version         gmodule-2.0  2.0.0
11813   pkg_check_version          libxml-2.0  2.4.6
11814   pkg_check_version        libglade-2.0  1.99.0
11815   pkg_check_version      gdk-pixbuf-2.0  2.0.0
11816   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
11817   have_gtk="$ok"
11818
11819   if test "$have_gtk" = no; then
11820     if test -n "$ac_gtk_version_string" ; then
11821       gtk_halfassed="$ac_gtk_version_string"
11822       gtk_halfassed_lib="$req"
11823     fi
11824   fi
11825
11826   if test "$have_gtk" = yes; then
11827     parse_gtk_version_string
11828     jurassic_gtk=no
11829   fi
11830
11831   if test "$have_gtk" = yes; then
11832     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk includes" >&5
11833 $as_echo_n "checking for Gtk includes... " >&6; }
11834 if ${ac_cv_gtk_config_cflags+:} false; then :
11835   $as_echo_n "(cached) " >&6
11836 else
11837   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
11838 fi
11839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_cflags" >&5
11840 $as_echo "$ac_cv_gtk_config_cflags" >&6; }
11841     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
11842 $as_echo_n "checking for Gtk libs... " >&6; }
11843 if ${ac_cv_gtk_config_libs+:} false; then :
11844   $as_echo_n "(cached) " >&6
11845 else
11846   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
11847 fi
11848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_libs" >&5
11849 $as_echo "$ac_cv_gtk_config_libs" >&6; }
11850   fi
11851
11852   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
11853   ac_gtk_config_libs=$ac_cv_gtk_config_libs
11854
11855   GTK_EXTRA_OBJS=""
11856   GTK_DATADIR=""
11857   if test "$have_gtk" = yes; then
11858     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
11859     GTK_DATADIR="$GTK_DATADIR/share"
11860   fi
11861
11862   if test "$have_gtk" = yes; then
11863     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
11864     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
11865     $as_echo "#define HAVE_GTK 1" >>confdefs.h
11866
11867     $as_echo "#define HAVE_GTK2 1" >>confdefs.h
11868
11869     $as_echo "#define HAVE_XML 1" >>confdefs.h
11870
11871   fi
11872
11873 fi
11874
11875
11876 # Check for the various Gnome help and URL loading programs.
11877 #
11878 WITH_BROWSER=gnome-open
11879 if test "$have_gtk" = yes; then
11880   for ac_prog in gnome-open
11881 do
11882   # Extract the first word of "$ac_prog", so it can be a program name with args.
11883 set dummy $ac_prog; ac_word=$2
11884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11885 $as_echo_n "checking for $ac_word... " >&6; }
11886 if ${ac_cv_prog_gnome_open_program+:} false; then :
11887   $as_echo_n "(cached) " >&6
11888 else
11889   if test -n "$gnome_open_program"; then
11890   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
11891 else
11892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11893 for as_dir in $PATH
11894 do
11895   IFS=$as_save_IFS
11896   test -z "$as_dir" && as_dir=.
11897     for ac_exec_ext in '' $ac_executable_extensions; do
11898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11899     ac_cv_prog_gnome_open_program="$ac_prog"
11900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11901     break 2
11902   fi
11903 done
11904   done
11905 IFS=$as_save_IFS
11906
11907 fi
11908 fi
11909 gnome_open_program=$ac_cv_prog_gnome_open_program
11910 if test -n "$gnome_open_program"; then
11911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_open_program" >&5
11912 $as_echo "$gnome_open_program" >&6; }
11913 else
11914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11915 $as_echo "no" >&6; }
11916 fi
11917
11918
11919   test -n "$gnome_open_program" && break
11920 done
11921
11922   for ac_prog in gnome-url-show
11923 do
11924   # Extract the first word of "$ac_prog", so it can be a program name with args.
11925 set dummy $ac_prog; ac_word=$2
11926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11927 $as_echo_n "checking for $ac_word... " >&6; }
11928 if ${ac_cv_prog_gnome_url_show_program+:} false; then :
11929   $as_echo_n "(cached) " >&6
11930 else
11931   if test -n "$gnome_url_show_program"; then
11932   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
11933 else
11934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11935 for as_dir in $PATH
11936 do
11937   IFS=$as_save_IFS
11938   test -z "$as_dir" && as_dir=.
11939     for ac_exec_ext in '' $ac_executable_extensions; do
11940   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11941     ac_cv_prog_gnome_url_show_program="$ac_prog"
11942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11943     break 2
11944   fi
11945 done
11946   done
11947 IFS=$as_save_IFS
11948
11949 fi
11950 fi
11951 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
11952 if test -n "$gnome_url_show_program"; then
11953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_url_show_program" >&5
11954 $as_echo "$gnome_url_show_program" >&6; }
11955 else
11956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11957 $as_echo "no" >&6; }
11958 fi
11959
11960
11961   test -n "$gnome_url_show_program" && break
11962 done
11963
11964 fi
11965
11966
11967 ###############################################################################
11968 #
11969 #       Check for -lXm.
11970 #
11971 ###############################################################################
11972
11973 have_motif=no
11974 with_motif_req=unspecified
11975
11976 # Check whether --with-motif was given.
11977 if test "${with_motif+set}" = set; then :
11978   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
11979 else
11980   with_motif=no
11981 fi
11982
11983
11984
11985    case "$with_motif" in
11986     yes) ;;
11987     no)  ;;
11988
11989     /*)
11990      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif headers" >&5
11991 $as_echo_n "checking for Motif headers... " >&6; }
11992      d=$with_motif/include
11993      if test -d $d; then
11994        X_CFLAGS="-I$d $X_CFLAGS"
11995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11996 $as_echo "$d" >&6; }
11997      else
11998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11999 $as_echo "not found ($d: no such directory)" >&6; }
12000      fi
12001
12002      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif libs" >&5
12003 $as_echo_n "checking for Motif libs... " >&6; }
12004      d=$with_motif/lib
12005      if test -d $d; then
12006        X_LIBS="-L$d $X_LIBS"
12007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12008 $as_echo "$d" >&6; }
12009      else
12010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12011 $as_echo "not found ($d: no such directory)" >&6; }
12012      fi
12013
12014      # replace the directory string with "yes".
12015      with_motif_req="yes"
12016      with_motif=$with_motif_req
12017      ;;
12018
12019     *)
12020      echo ""
12021      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12022      echo "       If it is a directory, then \`DIR/include' will be added to"
12023      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12024      exit 1
12025      ;;
12026    esac
12027
12028
12029 if test "$with_motif" != yes -a "$with_motif" != no ; then
12030   echo "error: must be yes or no: --with-motif=$with_motif"
12031   exit 1
12032 fi
12033
12034 if test "$with_motif" = yes; then
12035   have_motif=no
12036
12037   ac_save_CPPFLAGS="$CPPFLAGS"
12038   if test \! -z "$includedir" ; then
12039     CPPFLAGS="$CPPFLAGS -I$includedir"
12040   fi
12041   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12042   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12043   ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "#include <stdlib.h>
12044                      #include <stdio.h>
12045                      #include <X11/Intrinsic.h>
12046 "
12047 if test "x$ac_cv_header_Xm_Xm_h" = xyes; then :
12048   have_motif=yes
12049                      $as_echo "#define HAVE_MOTIF 1" >>confdefs.h
12050
12051                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12052 fi
12053
12054
12055   CPPFLAGS="$ac_save_CPPFLAGS"
12056 fi
12057
12058
12059 if test "$have_motif" = yes; then
12060
12061   ac_save_CPPFLAGS="$CPPFLAGS"
12062   if test \! -z "$includedir" ; then
12063     CPPFLAGS="$CPPFLAGS -I$includedir"
12064   fi
12065   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12066   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12067   ac_fn_c_check_header_compile "$LINENO" "Xm/ComboBox.h" "ac_cv_header_Xm_ComboBox_h" "#include <stdlib.h>
12068                      #include <stdio.h>
12069                      #include <X11/Intrinsic.h>
12070 "
12071 if test "x$ac_cv_header_Xm_ComboBox_h" = xyes; then :
12072   $as_echo "#define HAVE_XMCOMBOBOX 1" >>confdefs.h
12073
12074 fi
12075
12076
12077   CPPFLAGS="$ac_save_CPPFLAGS"
12078 fi
12079
12080
12081 ###############################################################################
12082 #
12083 #       Checking whether Motif is really Lesstif.
12084 #
12085 ###############################################################################
12086
12087 have_lesstif=no
12088 if test "$have_motif" = yes ; then
12089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif is really LessTif" >&5
12090 $as_echo_n "checking whether Motif is really LessTif... " >&6; }
12091 if ${ac_cv_have_lesstif+:} false; then :
12092   $as_echo_n "(cached) " >&6
12093 else
12094
12095   ac_save_CPPFLAGS="$CPPFLAGS"
12096   if test \! -z "$includedir" ; then
12097     CPPFLAGS="$CPPFLAGS -I$includedir"
12098   fi
12099   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12100   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12102 /* end confdefs.h.  */
12103 #include <Xm/Xm.h>
12104 int
12105 main ()
12106 {
12107 long vers = LesstifVersion;
12108   ;
12109   return 0;
12110 }
12111 _ACEOF
12112 if ac_fn_c_try_compile "$LINENO"; then :
12113   ac_cv_have_lesstif=yes
12114 else
12115   ac_cv_have_lesstif=no
12116 fi
12117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12118   CPPFLAGS="$ac_save_CPPFLAGS"
12119 fi
12120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lesstif" >&5
12121 $as_echo "$ac_cv_have_lesstif" >&6; }
12122   have_lesstif=$ac_cv_have_lesstif
12123 fi
12124
12125
12126 lesstif_version=unknown
12127 lesstif_version_string=unknown
12128
12129 if test "$have_lesstif" = yes ; then
12130   ltv=unknown
12131   echo unknown > conftest-lt
12132   { $as_echo "$as_me:${as_lineno-$LINENO}: checking LessTif version number" >&5
12133 $as_echo_n "checking LessTif version number... " >&6; }
12134 if ${ac_cv_lesstif_version_string+:} false; then :
12135   $as_echo_n "(cached) " >&6
12136 else
12137
12138   ac_save_CPPFLAGS="$CPPFLAGS"
12139   if test \! -z "$includedir" ; then
12140     CPPFLAGS="$CPPFLAGS -I$includedir"
12141   fi
12142   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12143   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12144   if test "$cross_compiling" = yes; then :
12145   ac_cv_lesstif_version=unknown
12146                      ac_cv_lesstif_version_string=unknown
12147 else
12148   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12149 /* end confdefs.h.  */
12150 #include <stdio.h>
12151                      #include <Xm/Xm.h>
12152                      int main() {
12153                        FILE *f = fopen("conftest-lt", "w");
12154                        if (!f) exit(1);
12155                        fprintf(f, "%d %d.%d\n", LesstifVersion,
12156                           LESSTIF_VERSION, LESSTIF_REVISION);
12157                        fclose(f);
12158                        exit(0);
12159                      }
12160 _ACEOF
12161 if ac_fn_c_try_run "$LINENO"; then :
12162   ltv=`cat conftest-lt`
12163                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
12164                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
12165 else
12166   ac_cv_lesstif_version=unknown
12167                      ac_cv_lesstif_version_string=unknown
12168 fi
12169 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12170   conftest.$ac_objext conftest.beam conftest.$ac_ext
12171 fi
12172
12173   CPPFLAGS="$ac_save_CPPFLAGS"
12174 fi
12175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lesstif_version_string" >&5
12176 $as_echo "$ac_cv_lesstif_version_string" >&6; }
12177   rm -rf conftest-lt
12178   lesstif_version=$ac_cv_lesstif_version
12179   lesstif_version_string=$ac_cv_lesstif_version_string
12180
12181 fi
12182
12183
12184 if test "$have_motif" = yes ; then
12185   mtv=unknown
12186   echo unknown > conftest-mt
12187   { $as_echo "$as_me:${as_lineno-$LINENO}: checking Motif version number" >&5
12188 $as_echo_n "checking Motif version number... " >&6; }
12189 if ${ac_cv_motif_version_string+:} false; then :
12190   $as_echo_n "(cached) " >&6
12191 else
12192
12193   ac_save_CPPFLAGS="$CPPFLAGS"
12194   if test \! -z "$includedir" ; then
12195     CPPFLAGS="$CPPFLAGS -I$includedir"
12196   fi
12197   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12198   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12199   if test "$cross_compiling" = yes; then :
12200   ac_cv_motif_version=unknown
12201                      ac_cv_motif_version_string=unknown
12202 else
12203   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12204 /* end confdefs.h.  */
12205 #include <stdio.h>
12206                      #include <Xm/Xm.h>
12207                      int main() {
12208                        FILE *f = fopen("conftest-mt", "w");
12209                        if (!f) exit(1);
12210                        fprintf(f, "%d %d.%d\n", XmVersion,
12211                           XmVERSION, XmREVISION);
12212                        fclose(f);
12213                        exit(0);
12214                      }
12215 _ACEOF
12216 if ac_fn_c_try_run "$LINENO"; then :
12217   mtv=`cat conftest-mt`
12218                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
12219                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
12220 else
12221   ac_cv_motif_version=unknown
12222                      ac_cv_motif_version_string=unknown
12223 fi
12224 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12225   conftest.$ac_objext conftest.beam conftest.$ac_ext
12226 fi
12227
12228   CPPFLAGS="$ac_save_CPPFLAGS"
12229 fi
12230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_motif_version_string" >&5
12231 $as_echo "$ac_cv_motif_version_string" >&6; }
12232   rm -rf conftest-mt
12233   motif_version=$ac_cv_motif_version
12234   motif_version_string=$ac_cv_motif_version_string
12235
12236 fi
12237
12238
12239 ###############################################################################
12240 #
12241 #       Checking whether Motif requires -lXpm.
12242 #
12243 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
12244 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
12245 #       of the library whether to build the XPM code into libXm, or whether
12246 #       to rely on an external libXm.  So the only way to tell whether XPM is
12247 #       a link-time requirement is to examine libXm.a, which is very
12248 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
12249 #       always link against XPM if the XPM lib exists (and this will be a
12250 #       no-op if libXm happens to already have the XPM code in it.)
12251 #
12252 ###############################################################################
12253
12254 motif_requires_xpm=no
12255 if test "$have_motif" = yes ; then
12256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif requires XPM" >&5
12257 $as_echo_n "checking whether Motif requires XPM... " >&6; }
12258    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
12259    then
12260      motif_requires_xpm=yes
12261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
12262 $as_echo "maybe" >&6; }
12263    else
12264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12265 $as_echo "no" >&6; }
12266    fi
12267 fi
12268
12269
12270 ###############################################################################
12271 #
12272 #       Checking whether Motif requires -lXp.
12273 #
12274 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
12275 #       Extension".   Why this extension isn't in -lXext with all the others,
12276 #       I have no idea.
12277 #
12278 ###############################################################################
12279
12280 have_xp_ext=no
12281 if test "$have_motif" = yes ; then
12282    have_xp_ext=no
12283
12284   ac_save_CPPFLAGS="$CPPFLAGS"
12285   ac_save_LDFLAGS="$LDFLAGS"
12286 #  ac_save_LIBS="$LIBS"
12287
12288   if test \! -z "$includedir" ; then
12289     CPPFLAGS="$CPPFLAGS -I$includedir"
12290   fi
12291   # note: $X_CFLAGS includes $x_includes
12292   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12293
12294   if test \! -z "$libdir" ; then
12295     LDFLAGS="$LDFLAGS -L$libdir"
12296   fi
12297   # note: $X_LIBS includes $x_libraries
12298   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12299
12300   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12301   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12302   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpQueryExtension in -lXp" >&5
12303 $as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
12304 if ${ac_cv_lib_Xp_XpQueryExtension+:} false; then :
12305   $as_echo_n "(cached) " >&6
12306 else
12307   ac_check_lib_save_LIBS=$LIBS
12308 LIBS="-lXp -lX11 -lXext -lm $LIBS"
12309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12310 /* end confdefs.h.  */
12311
12312 /* Override any GCC internal prototype to avoid an error.
12313    Use char because int might match the return type of a GCC
12314    builtin and then its argument prototype would still apply.  */
12315 #ifdef __cplusplus
12316 extern "C"
12317 #endif
12318 char XpQueryExtension ();
12319 int
12320 main ()
12321 {
12322 return XpQueryExtension ();
12323   ;
12324   return 0;
12325 }
12326 _ACEOF
12327 if ac_fn_c_try_link "$LINENO"; then :
12328   ac_cv_lib_Xp_XpQueryExtension=yes
12329 else
12330   ac_cv_lib_Xp_XpQueryExtension=no
12331 fi
12332 rm -f core conftest.err conftest.$ac_objext \
12333     conftest$ac_exeext conftest.$ac_ext
12334 LIBS=$ac_check_lib_save_LIBS
12335 fi
12336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
12337 $as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
12338 if test "x$ac_cv_lib_Xp_XpQueryExtension" = xyes; then :
12339   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
12340 else
12341   true
12342 fi
12343
12344   CPPFLAGS="$ac_save_CPPFLAGS"
12345   LDFLAGS="$ac_save_LDFLAGS"
12346 #  LIBS="$ac_save_LIBS"
12347
12348 fi
12349
12350
12351 ###############################################################################
12352 #
12353 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
12354 #
12355 ###############################################################################
12356
12357 have_xintl=no
12358 if test "$have_motif" = yes ; then
12359
12360   ac_save_CPPFLAGS="$CPPFLAGS"
12361   ac_save_LDFLAGS="$LDFLAGS"
12362 #  ac_save_LIBS="$LIBS"
12363
12364   if test \! -z "$includedir" ; then
12365     CPPFLAGS="$CPPFLAGS -I$includedir"
12366   fi
12367   # note: $X_CFLAGS includes $x_includes
12368   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12369
12370   if test \! -z "$libdir" ; then
12371     LDFLAGS="$LDFLAGS -L$libdir"
12372   fi
12373   # note: $X_LIBS includes $x_libraries
12374   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12375
12376   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12377   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12378   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Xsetlocale in -lXintl" >&5
12379 $as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
12380 if ${ac_cv_lib_Xintl__Xsetlocale+:} false; then :
12381   $as_echo_n "(cached) " >&6
12382 else
12383   ac_check_lib_save_LIBS=$LIBS
12384 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
12385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12386 /* end confdefs.h.  */
12387
12388 /* Override any GCC internal prototype to avoid an error.
12389    Use char because int might match the return type of a GCC
12390    builtin and then its argument prototype would still apply.  */
12391 #ifdef __cplusplus
12392 extern "C"
12393 #endif
12394 char _Xsetlocale ();
12395 int
12396 main ()
12397 {
12398 return _Xsetlocale ();
12399   ;
12400   return 0;
12401 }
12402 _ACEOF
12403 if ac_fn_c_try_link "$LINENO"; then :
12404   ac_cv_lib_Xintl__Xsetlocale=yes
12405 else
12406   ac_cv_lib_Xintl__Xsetlocale=no
12407 fi
12408 rm -f core conftest.err conftest.$ac_objext \
12409     conftest$ac_exeext conftest.$ac_ext
12410 LIBS=$ac_check_lib_save_LIBS
12411 fi
12412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
12413 $as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
12414 if test "x$ac_cv_lib_Xintl__Xsetlocale" = xyes; then :
12415   have_xintl=yes
12416 else
12417   have_xintl=no
12418 fi
12419
12420   CPPFLAGS="$ac_save_CPPFLAGS"
12421   LDFLAGS="$ac_save_LDFLAGS"
12422 #  LIBS="$ac_save_LIBS"
12423
12424   if test "$have_xintl" = yes; then
12425     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
12426   fi
12427 fi
12428
12429
12430 ###############################################################################
12431 #
12432 #       Check for -lGL or -lMesaGL.
12433 #
12434 ###############################################################################
12435
12436 have_gl=no
12437 ac_have_mesa_gl=no
12438 with_gl_req=unspecified
12439 gl_halfassed=no
12440
12441 # Check whether --with-gl was given.
12442 if test "${with_gl+set}" = set; then :
12443   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
12444 else
12445   with_gl=yes
12446 fi
12447
12448
12449
12450    case "$with_gl" in
12451     yes) ;;
12452     no)  ;;
12453
12454     /*)
12455      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL headers" >&5
12456 $as_echo_n "checking for GL headers... " >&6; }
12457      d=$with_gl/include
12458      if test -d $d; then
12459        X_CFLAGS="-I$d $X_CFLAGS"
12460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12461 $as_echo "$d" >&6; }
12462      else
12463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12464 $as_echo "not found ($d: no such directory)" >&6; }
12465      fi
12466
12467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL libs" >&5
12468 $as_echo_n "checking for GL libs... " >&6; }
12469      d=$with_gl/lib
12470      if test -d $d; then
12471        X_LIBS="-L$d $X_LIBS"
12472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12473 $as_echo "$d" >&6; }
12474      else
12475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12476 $as_echo "not found ($d: no such directory)" >&6; }
12477      fi
12478
12479      # replace the directory string with "yes".
12480      with_gl_req="yes"
12481      with_gl=$with_gl_req
12482      ;;
12483
12484     *)
12485      echo ""
12486      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
12487      echo "       If it is a directory, then \`DIR/include' will be added to"
12488      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12489      exit 1
12490      ;;
12491    esac
12492
12493
12494 ac_mesagl_version=unknown
12495 ac_mesagl_version_string=unknown
12496
12497 if test "$with_gl" = yes; then
12498
12499   ac_save_CPPFLAGS="$CPPFLAGS"
12500   if test \! -z "$includedir" ; then
12501     CPPFLAGS="$CPPFLAGS -I$includedir"
12502   fi
12503   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12504   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12505   ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
12506 if test "x$ac_cv_header_GL_gl_h" = xyes; then :
12507   have_gl=yes
12508 else
12509   have_gl=no
12510 fi
12511
12512
12513   CPPFLAGS="$ac_save_CPPFLAGS"
12514   if test "$have_gl" = yes ; then
12515
12516   ac_save_CPPFLAGS="$CPPFLAGS"
12517   if test \! -z "$includedir" ; then
12518     CPPFLAGS="$CPPFLAGS -I$includedir"
12519   fi
12520   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12521   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12522   ac_fn_c_check_header_compile "$LINENO" "GL/glx.h" "ac_cv_header_GL_glx_h" "#include <GL/gl.h>
12523 "
12524 if test "x$ac_cv_header_GL_glx_h" = xyes; then :
12525   have_gl=yes
12526 else
12527   have_gl=no
12528 fi
12529
12530
12531   CPPFLAGS="$ac_save_CPPFLAGS"
12532   fi
12533
12534   # If we have the headers, try and figure out which vendor it's from.
12535   #
12536   if test "$have_gl" = yes ; then
12537
12538     # We need to know whether it's MesaGL so that we know which libraries
12539     # to link against.
12540     #
12541     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GL is really MesaGL" >&5
12542 $as_echo_n "checking whether GL is really MesaGL... " >&6; }
12543 if ${ac_cv_have_mesa_gl+:} false; then :
12544   $as_echo_n "(cached) " >&6
12545 else
12546   ac_cv_have_mesa_gl=no
12547        if test "$ac_macosx" = no; then
12548          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
12549          # It's not really Mesa, is it?
12550
12551   ac_save_CPPFLAGS="$CPPFLAGS"
12552   if test \! -z "$includedir" ; then
12553     CPPFLAGS="$CPPFLAGS -I$includedir"
12554   fi
12555   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12556   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12558 /* end confdefs.h.  */
12559 #include <GL/glx.h>
12560
12561 _ACEOF
12562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12563   $EGREP "Mesa|MESA" >/dev/null 2>&1; then :
12564   ac_cv_have_mesa_gl=yes
12565 fi
12566 rm -rf conftest*
12567
12568   CPPFLAGS="$ac_save_CPPFLAGS"
12569        fi
12570 fi
12571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mesa_gl" >&5
12572 $as_echo "$ac_cv_have_mesa_gl" >&6; }
12573     ac_have_mesa_gl=$ac_cv_have_mesa_gl
12574
12575     gl_lib_1=""
12576     GL_LIBS=""
12577
12578     if test "$ac_macosx" = yes; then
12579
12580       # Without these, every link against libGL gets a bunch of useless
12581       # warnings.
12582       #
12583       osx_crud="-bind_at_load -multiply_defined suppress"
12584       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
12585 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
12586       GL_LIBS="$GL_LIBS $osx_crud"
12587       unset osx_crud
12588
12589       # New lossage in 10.5.0: without this, we get:
12590       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
12591       #
12592       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
12593       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
12594
12595       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
12596 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
12597       GL_LIBS="$GL_LIBS $osx_crud"
12598       unset osx_crud
12599
12600       # New lossage in 10.6.8: we can't allow -L/opt/local/lib to be in the
12601       # link line, or at runtime XQueryExtension gets a segv due to some kind
12602       # of library version skew.  Libs must come from /usr/X11/lib even if
12603       # $prefix and/or $exec_prefix are set to /opt/local/.
12604       #
12605       { $as_echo "$as_me:${as_lineno-$LINENO}: result: omitting \"$libdir\" from LDFLAGS" >&5
12606 $as_echo "omitting \"$libdir\" from LDFLAGS" >&6; }
12607       libdir=''
12608
12609     fi
12610
12611
12612     # Some versions of MesaGL are compiled to require -lpthread.
12613     # So if the Mesa headers exist, and -lpthread exists, then always
12614     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
12615     #
12616     # Oftentimes, AX_PTHREAD will bring in -lpthread as well; but that ends
12617     # up before -l(Mesa)GL, instead of after where it would belong.
12618     #
12619     if test "$ac_have_mesa_gl" = yes; then
12620       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
12621 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
12622 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
12623   $as_echo_n "(cached) " >&6
12624 else
12625   ac_check_lib_save_LIBS=$LIBS
12626 LIBS="-lpthread  $LIBS"
12627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12628 /* end confdefs.h.  */
12629
12630 /* Override any GCC internal prototype to avoid an error.
12631    Use char because int might match the return type of a GCC
12632    builtin and then its argument prototype would still apply.  */
12633 #ifdef __cplusplus
12634 extern "C"
12635 #endif
12636 char pthread_create ();
12637 int
12638 main ()
12639 {
12640 return pthread_create ();
12641   ;
12642   return 0;
12643 }
12644 _ACEOF
12645 if ac_fn_c_try_link "$LINENO"; then :
12646   ac_cv_lib_pthread_pthread_create=yes
12647 else
12648   ac_cv_lib_pthread_pthread_create=no
12649 fi
12650 rm -f core conftest.err conftest.$ac_objext \
12651     conftest$ac_exeext conftest.$ac_ext
12652 LIBS=$ac_check_lib_save_LIBS
12653 fi
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
12655 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
12656 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
12657   GL_LIBS="-lpthread"
12658 fi
12659
12660     fi
12661
12662
12663     # If we have Mesa headers, check to see if we can link against -lMesaGL.
12664     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
12665     # Else, warn that GL is busted.  (We have the headers, but no libs.)
12666     #
12667
12668     if test "$ac_have_mesa_gl" = yes ; then
12669
12670   ac_save_CPPFLAGS="$CPPFLAGS"
12671   ac_save_LDFLAGS="$LDFLAGS"
12672 #  ac_save_LIBS="$LIBS"
12673
12674   if test \! -z "$includedir" ; then
12675     CPPFLAGS="$CPPFLAGS -I$includedir"
12676   fi
12677   # note: $X_CFLAGS includes $x_includes
12678   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12679
12680   if test \! -z "$libdir" ; then
12681     LDFLAGS="$LDFLAGS -L$libdir"
12682   fi
12683   # note: $X_LIBS includes $x_libraries
12684   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12685
12686   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12687   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12688   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lMesaGL" >&5
12689 $as_echo_n "checking for glXCreateContext in -lMesaGL... " >&6; }
12690 if ${ac_cv_lib_MesaGL_glXCreateContext+:} false; then :
12691   $as_echo_n "(cached) " >&6
12692 else
12693   ac_check_lib_save_LIBS=$LIBS
12694 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
12695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12696 /* end confdefs.h.  */
12697
12698 /* Override any GCC internal prototype to avoid an error.
12699    Use char because int might match the return type of a GCC
12700    builtin and then its argument prototype would still apply.  */
12701 #ifdef __cplusplus
12702 extern "C"
12703 #endif
12704 char glXCreateContext ();
12705 int
12706 main ()
12707 {
12708 return glXCreateContext ();
12709   ;
12710   return 0;
12711 }
12712 _ACEOF
12713 if ac_fn_c_try_link "$LINENO"; then :
12714   ac_cv_lib_MesaGL_glXCreateContext=yes
12715 else
12716   ac_cv_lib_MesaGL_glXCreateContext=no
12717 fi
12718 rm -f core conftest.err conftest.$ac_objext \
12719     conftest$ac_exeext conftest.$ac_ext
12720 LIBS=$ac_check_lib_save_LIBS
12721 fi
12722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
12723 $as_echo "$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
12724 if test "x$ac_cv_lib_MesaGL_glXCreateContext" = xyes; then :
12725   gl_lib_1="MesaGL"
12726                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
12727 fi
12728
12729   CPPFLAGS="$ac_save_CPPFLAGS"
12730   LDFLAGS="$ac_save_LDFLAGS"
12731 #  LIBS="$ac_save_LIBS"
12732
12733     fi
12734
12735     if test "$gl_lib_1" = "" ; then
12736
12737   ac_save_CPPFLAGS="$CPPFLAGS"
12738   ac_save_LDFLAGS="$LDFLAGS"
12739 #  ac_save_LIBS="$LIBS"
12740
12741   if test \! -z "$includedir" ; then
12742     CPPFLAGS="$CPPFLAGS -I$includedir"
12743   fi
12744   # note: $X_CFLAGS includes $x_includes
12745   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12746
12747   if test \! -z "$libdir" ; then
12748     LDFLAGS="$LDFLAGS -L$libdir"
12749   fi
12750   # note: $X_LIBS includes $x_libraries
12751   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12752
12753   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12754   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lGL" >&5
12756 $as_echo_n "checking for glXCreateContext in -lGL... " >&6; }
12757 if ${ac_cv_lib_GL_glXCreateContext+:} false; then :
12758   $as_echo_n "(cached) " >&6
12759 else
12760   ac_check_lib_save_LIBS=$LIBS
12761 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
12762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12763 /* end confdefs.h.  */
12764
12765 /* Override any GCC internal prototype to avoid an error.
12766    Use char because int might match the return type of a GCC
12767    builtin and then its argument prototype would still apply.  */
12768 #ifdef __cplusplus
12769 extern "C"
12770 #endif
12771 char glXCreateContext ();
12772 int
12773 main ()
12774 {
12775 return glXCreateContext ();
12776   ;
12777   return 0;
12778 }
12779 _ACEOF
12780 if ac_fn_c_try_link "$LINENO"; then :
12781   ac_cv_lib_GL_glXCreateContext=yes
12782 else
12783   ac_cv_lib_GL_glXCreateContext=no
12784 fi
12785 rm -f core conftest.err conftest.$ac_objext \
12786     conftest$ac_exeext conftest.$ac_ext
12787 LIBS=$ac_check_lib_save_LIBS
12788 fi
12789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_glXCreateContext" >&5
12790 $as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; }
12791 if test "x$ac_cv_lib_GL_glXCreateContext" = xyes; then :
12792   gl_lib_1="GL"
12793                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
12794 fi
12795
12796   CPPFLAGS="$ac_save_CPPFLAGS"
12797   LDFLAGS="$ac_save_LDFLAGS"
12798 #  LIBS="$ac_save_LIBS"
12799
12800     fi
12801
12802     if test "$gl_lib_1" = "" ; then
12803       # we have headers, but no libs -- bail.
12804       have_gl=no
12805       ac_have_mesa_gl=no
12806       gl_halfassed=yes
12807     else
12808       # linking works -- we can build the GL hacks.
12809       $as_echo "#define HAVE_GL 1" >>confdefs.h
12810
12811       if test "$ac_have_mesa_gl" = yes ; then
12812         $as_echo "#define HAVE_MESA_GL 1" >>confdefs.h
12813
12814       fi
12815     fi
12816   fi
12817
12818
12819   # Now that we know we have GL headers and libs, do some more GL testing.
12820   #
12821
12822   if test "$have_gl" = yes ; then
12823     # If it's MesaGL, we'd like to issue a warning if the version number
12824     # is less than or equal to 2.6, because that version had a security bug.
12825     #
12826     if test "$ac_have_mesa_gl" = yes; then
12827
12828       { $as_echo "$as_me:${as_lineno-$LINENO}: checking MesaGL version number" >&5
12829 $as_echo_n "checking MesaGL version number... " >&6; }
12830 if ${ac_cv_mesagl_version_string+:} false; then :
12831   $as_echo_n "(cached) " >&6
12832 else
12833   cat > conftest.$ac_ext <<EOF
12834 #line 12838 "configure"
12835 #include "confdefs.h"
12836 #include <GL/gl.h>
12837 #ifndef MESA_MAJOR_VERSION
12838 # include <GL/xmesa.h>
12839 # ifdef XMESA_MAJOR_VERSION
12840    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
12841       we have to check the XMesa version number (the number of the X protocol
12842       support, which seems to be the same as the Mesa version number.)
12843     */
12844 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
12845 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
12846 # else
12847    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
12848       so we have no way of telling what version of Mesa this is at all.
12849       So, we'll guess that the osmesa version (the "offscreen protocol")
12850       is less than or equal to the real mesa version number.  Except that
12851       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
12852       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
12853     */
12854 # include <GL/osmesa.h>
12855 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
12856 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
12857 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
12858 #   undef MESA_MINOR_VERSION
12859 #   define MESA_MINOR_VERSION 4 or newer, probably?
12860 #  endif
12861 # endif
12862 #endif
12863 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
12864 EOF
12865
12866          ac_save_CPPFLAGS="$CPPFLAGS"
12867          if test \! -z "$includedir" ; then
12868            CPPFLAGS="$CPPFLAGS -I$includedir"
12869          fi
12870          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12871
12872          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
12873
12874          # M4 sucks!!
12875
12876           mglv=`echo "$mglv" | sed -n \
12877              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
12878
12879
12880          rm -rf conftest.$ac_ext
12881
12882          CPPFLAGS="$ac_save_CPPFLAGS"
12883
12884          if test "$mglv" = ""; then
12885            ac_mesagl_version=unknown
12886            ac_mesagl_version_string=unknown
12887          else
12888            ac_mesagl_version_string="$mglv"
12889            # M4 sucks!!
12890
12891            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
12892            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
12893
12894            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
12895            if test -z "$ac_mesagl_version"; then
12896              ac_mesagl_version=unknown
12897              ac_mesagl_version_string=unknown
12898            fi
12899          fi
12900          ac_cv_mesagl_version=$ac_mesagl_version
12901          ac_cv_mesagl_version_string=$ac_mesagl_version_string
12902
12903 fi
12904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mesagl_version_string" >&5
12905 $as_echo "$ac_cv_mesagl_version_string" >&6; }
12906       ac_mesagl_version=$ac_cv_mesagl_version
12907       ac_mesagl_version_string=$ac_cv_mesagl_version_string
12908     fi
12909
12910
12911     # Check for OpenGL 1.1 features.
12912     #
12913
12914   ac_save_CPPFLAGS="$CPPFLAGS"
12915   ac_save_LDFLAGS="$LDFLAGS"
12916 #  ac_save_LIBS="$LIBS"
12917
12918   if test \! -z "$includedir" ; then
12919     CPPFLAGS="$CPPFLAGS -I$includedir"
12920   fi
12921   # note: $X_CFLAGS includes $x_includes
12922   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12923
12924   if test \! -z "$libdir" ; then
12925     LDFLAGS="$LDFLAGS -L$libdir"
12926   fi
12927   # note: $X_LIBS includes $x_libraries
12928   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12929
12930   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12931   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12932   as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
12933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBindTexture in -l$gl_lib_1" >&5
12934 $as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
12935 if eval \${$as_ac_Lib+:} false; then :
12936   $as_echo_n "(cached) " >&6
12937 else
12938   ac_check_lib_save_LIBS=$LIBS
12939 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
12940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12941 /* end confdefs.h.  */
12942
12943 /* Override any GCC internal prototype to avoid an error.
12944    Use char because int might match the return type of a GCC
12945    builtin and then its argument prototype would still apply.  */
12946 #ifdef __cplusplus
12947 extern "C"
12948 #endif
12949 char glBindTexture ();
12950 int
12951 main ()
12952 {
12953 return glBindTexture ();
12954   ;
12955   return 0;
12956 }
12957 _ACEOF
12958 if ac_fn_c_try_link "$LINENO"; then :
12959   eval "$as_ac_Lib=yes"
12960 else
12961   eval "$as_ac_Lib=no"
12962 fi
12963 rm -f core conftest.err conftest.$ac_objext \
12964     conftest$ac_exeext conftest.$ac_ext
12965 LIBS=$ac_check_lib_save_LIBS
12966 fi
12967 eval ac_res=\$$as_ac_Lib
12968                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12969 $as_echo "$ac_res" >&6; }
12970 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12971   $as_echo "#define HAVE_GLBINDTEXTURE 1" >>confdefs.h
12972
12973 else
12974   true
12975 fi
12976
12977   CPPFLAGS="$ac_save_CPPFLAGS"
12978   LDFLAGS="$ac_save_LDFLAGS"
12979 #  LIBS="$ac_save_LIBS"
12980
12981   fi
12982
12983 elif test "$with_gl" != no; then
12984   echo "error: must be yes or no: --with-gl=$with_gl"
12985   exit 1
12986 fi
12987
12988
12989 ###############################################################################
12990 #
12991 #       Check for -lgle.
12992 #
12993 ###############################################################################
12994
12995 have_gle=no
12996 with_gle_req=unspecified
12997 gle_halfassed=no
12998
12999 # Check whether --with-gle was given.
13000 if test "${with_gle+set}" = set; then :
13001   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
13002 else
13003   with_gle=yes
13004 fi
13005
13006
13007
13008    case "$with_gle" in
13009     yes) ;;
13010     no)  ;;
13011
13012     /*)
13013      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE headers" >&5
13014 $as_echo_n "checking for GLE headers... " >&6; }
13015      d=$with_gle/include
13016      if test -d $d; then
13017        X_CFLAGS="-I$d $X_CFLAGS"
13018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13019 $as_echo "$d" >&6; }
13020      else
13021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13022 $as_echo "not found ($d: no such directory)" >&6; }
13023      fi
13024
13025      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE libs" >&5
13026 $as_echo_n "checking for GLE libs... " >&6; }
13027      d=$with_gle/lib
13028      if test -d $d; then
13029        X_LIBS="-L$d $X_LIBS"
13030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13031 $as_echo "$d" >&6; }
13032      else
13033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13034 $as_echo "not found ($d: no such directory)" >&6; }
13035      fi
13036
13037      # replace the directory string with "yes".
13038      with_gle_req="yes"
13039      with_gle=$with_gle_req
13040      ;;
13041
13042     *)
13043      echo ""
13044      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
13045      echo "       If it is a directory, then \`DIR/include' will be added to"
13046      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13047      exit 1
13048      ;;
13049    esac
13050
13051
13052 GLE_LIBS=""
13053
13054 if test "$have_gl" = no ; then
13055  true
13056 elif test "$with_gle" = yes; then
13057
13058
13059   ac_save_CPPFLAGS="$CPPFLAGS"
13060   if test \! -z "$includedir" ; then
13061     CPPFLAGS="$CPPFLAGS -I$includedir"
13062   fi
13063   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13064   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13065   ac_fn_c_check_header_compile "$LINENO" "GL/gle.h" "ac_cv_header_GL_gle_h" "#include <GL/gl.h>
13066 "
13067 if test "x$ac_cv_header_GL_gle_h" = xyes; then :
13068   have_gle3=yes
13069 else
13070   have_gle3=no
13071 fi
13072
13073
13074   CPPFLAGS="$ac_save_CPPFLAGS"
13075   if test "$have_gle3" = yes ; then
13076     have_gle=yes;
13077   else
13078
13079   ac_save_CPPFLAGS="$CPPFLAGS"
13080   if test \! -z "$includedir" ; then
13081     CPPFLAGS="$CPPFLAGS -I$includedir"
13082   fi
13083   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13084   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13085   ac_fn_c_check_header_compile "$LINENO" "GL/gutil.h" "ac_cv_header_GL_gutil_h" "#include <GL/gl.h>
13086 "
13087 if test "x$ac_cv_header_GL_gutil_h" = xyes; then :
13088   have_gle=yes
13089 else
13090   have_gle=no
13091 fi
13092
13093
13094   CPPFLAGS="$ac_save_CPPFLAGS"
13095     if test "$have_gle" = yes ; then
13096
13097   ac_save_CPPFLAGS="$CPPFLAGS"
13098   if test \! -z "$includedir" ; then
13099     CPPFLAGS="$CPPFLAGS -I$includedir"
13100   fi
13101   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13102   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13103   ac_fn_c_check_header_compile "$LINENO" "GL/tube.h" "ac_cv_header_GL_tube_h" "#include <GL/gl.h>
13104 "
13105 if test "x$ac_cv_header_GL_tube_h" = xyes; then :
13106   have_gle=yes
13107 else
13108   have_gle=no
13109 fi
13110
13111
13112   CPPFLAGS="$ac_save_CPPFLAGS"
13113     fi
13114   fi
13115
13116   if test "$have_gle" = yes ; then
13117     have_gle=no
13118     gle_halfassed=yes
13119
13120   ac_save_CPPFLAGS="$CPPFLAGS"
13121   ac_save_LDFLAGS="$LDFLAGS"
13122 #  ac_save_LIBS="$LIBS"
13123
13124   if test \! -z "$includedir" ; then
13125     CPPFLAGS="$CPPFLAGS -I$includedir"
13126   fi
13127   # note: $X_CFLAGS includes $x_includes
13128   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13129
13130   if test \! -z "$libdir" ; then
13131     LDFLAGS="$LDFLAGS -L$libdir"
13132   fi
13133   # note: $X_LIBS includes $x_libraries
13134   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13135
13136   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13137   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13138   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gleCreateGC in -lgle" >&5
13139 $as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
13140 if ${ac_cv_lib_gle_gleCreateGC+:} false; then :
13141   $as_echo_n "(cached) " >&6
13142 else
13143   ac_check_lib_save_LIBS=$LIBS
13144 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
13145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13146 /* end confdefs.h.  */
13147
13148 /* Override any GCC internal prototype to avoid an error.
13149    Use char because int might match the return type of a GCC
13150    builtin and then its argument prototype would still apply.  */
13151 #ifdef __cplusplus
13152 extern "C"
13153 #endif
13154 char gleCreateGC ();
13155 int
13156 main ()
13157 {
13158 return gleCreateGC ();
13159   ;
13160   return 0;
13161 }
13162 _ACEOF
13163 if ac_fn_c_try_link "$LINENO"; then :
13164   ac_cv_lib_gle_gleCreateGC=yes
13165 else
13166   ac_cv_lib_gle_gleCreateGC=no
13167 fi
13168 rm -f core conftest.err conftest.$ac_objext \
13169     conftest$ac_exeext conftest.$ac_ext
13170 LIBS=$ac_check_lib_save_LIBS
13171 fi
13172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_gleCreateGC" >&5
13173 $as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
13174 if test "x$ac_cv_lib_gle_gleCreateGC" = xyes; then :
13175   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
13176 fi
13177
13178   CPPFLAGS="$ac_save_CPPFLAGS"
13179   LDFLAGS="$ac_save_LDFLAGS"
13180 #  LIBS="$ac_save_LIBS"
13181
13182   fi
13183   if test "$have_gle" = yes ; then
13184     have_gle=no
13185     gle_halfassed=yes
13186
13187     # sometimes the libmatrix stuff is included in libgle.  look there first.
13188 #
13189 # I don't get it.  For some reason, this test passes on SGI, as if
13190 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
13191 # Yet the link is succeeding.  Why???
13192 #
13193 #    AC_CHECK_X_LIB(gle, uview_direction_d,
13194 #                   [have_gle=yes; gle_halfassed=no],
13195 #                   [], $GL_LIBS -lX11 -lXext -lm)
13196
13197     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
13198     # *sigh*
13199     if test "$have_gle3" = yes ; then
13200
13201   ac_save_CPPFLAGS="$CPPFLAGS"
13202   ac_save_LDFLAGS="$LDFLAGS"
13203 #  ac_save_LIBS="$LIBS"
13204
13205   if test \! -z "$includedir" ; then
13206     CPPFLAGS="$CPPFLAGS -I$includedir"
13207   fi
13208   # note: $X_CFLAGS includes $x_includes
13209   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13210
13211   if test \! -z "$libdir" ; then
13212     LDFLAGS="$LDFLAGS -L$libdir"
13213   fi
13214   # note: $X_LIBS includes $x_libraries
13215   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13216
13217   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13218   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13219   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction in -lgle" >&5
13220 $as_echo_n "checking for uview_direction in -lgle... " >&6; }
13221 if ${ac_cv_lib_gle_uview_direction+:} false; then :
13222   $as_echo_n "(cached) " >&6
13223 else
13224   ac_check_lib_save_LIBS=$LIBS
13225 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
13226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13227 /* end confdefs.h.  */
13228
13229 /* Override any GCC internal prototype to avoid an error.
13230    Use char because int might match the return type of a GCC
13231    builtin and then its argument prototype would still apply.  */
13232 #ifdef __cplusplus
13233 extern "C"
13234 #endif
13235 char uview_direction ();
13236 int
13237 main ()
13238 {
13239 return uview_direction ();
13240   ;
13241   return 0;
13242 }
13243 _ACEOF
13244 if ac_fn_c_try_link "$LINENO"; then :
13245   ac_cv_lib_gle_uview_direction=yes
13246 else
13247   ac_cv_lib_gle_uview_direction=no
13248 fi
13249 rm -f core conftest.err conftest.$ac_objext \
13250     conftest$ac_exeext conftest.$ac_ext
13251 LIBS=$ac_check_lib_save_LIBS
13252 fi
13253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_uview_direction" >&5
13254 $as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
13255 if test "x$ac_cv_lib_gle_uview_direction" = xyes; then :
13256   have_gle=yes; gle_halfassed=no
13257 fi
13258
13259   CPPFLAGS="$ac_save_CPPFLAGS"
13260   LDFLAGS="$ac_save_LDFLAGS"
13261 #  LIBS="$ac_save_LIBS"
13262
13263     fi
13264     # if it wasn't in libgle, then look in libmatrix.
13265     if test "$have_gle" = no ; then
13266
13267   ac_save_CPPFLAGS="$CPPFLAGS"
13268   ac_save_LDFLAGS="$LDFLAGS"
13269 #  ac_save_LIBS="$LIBS"
13270
13271   if test \! -z "$includedir" ; then
13272     CPPFLAGS="$CPPFLAGS -I$includedir"
13273   fi
13274   # note: $X_CFLAGS includes $x_includes
13275   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13276
13277   if test \! -z "$libdir" ; then
13278     LDFLAGS="$LDFLAGS -L$libdir"
13279   fi
13280   # note: $X_LIBS includes $x_libraries
13281   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13282
13283   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13284   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13285   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction_d in -lmatrix" >&5
13286 $as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
13287 if ${ac_cv_lib_matrix_uview_direction_d+:} false; then :
13288   $as_echo_n "(cached) " >&6
13289 else
13290   ac_check_lib_save_LIBS=$LIBS
13291 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
13292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13293 /* end confdefs.h.  */
13294
13295 /* Override any GCC internal prototype to avoid an error.
13296    Use char because int might match the return type of a GCC
13297    builtin and then its argument prototype would still apply.  */
13298 #ifdef __cplusplus
13299 extern "C"
13300 #endif
13301 char uview_direction_d ();
13302 int
13303 main ()
13304 {
13305 return uview_direction_d ();
13306   ;
13307   return 0;
13308 }
13309 _ACEOF
13310 if ac_fn_c_try_link "$LINENO"; then :
13311   ac_cv_lib_matrix_uview_direction_d=yes
13312 else
13313   ac_cv_lib_matrix_uview_direction_d=no
13314 fi
13315 rm -f core conftest.err conftest.$ac_objext \
13316     conftest$ac_exeext conftest.$ac_ext
13317 LIBS=$ac_check_lib_save_LIBS
13318 fi
13319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_matrix_uview_direction_d" >&5
13320 $as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
13321 if test "x$ac_cv_lib_matrix_uview_direction_d" = xyes; then :
13322   have_gle=yes; gle_halfassed=no;
13323                       GLE_LIBS="$GLE_LIBS -lmatrix"
13324 fi
13325
13326   CPPFLAGS="$ac_save_CPPFLAGS"
13327   LDFLAGS="$ac_save_LDFLAGS"
13328 #  LIBS="$ac_save_LIBS"
13329
13330     fi
13331   fi
13332
13333   if test "$have_gle" = yes ; then
13334     $as_echo "#define HAVE_GLE 1" >>confdefs.h
13335
13336     if test "$have_gle3" = yes ; then
13337       $as_echo "#define HAVE_GLE3 1" >>confdefs.h
13338
13339     fi
13340   fi
13341
13342 elif test "$with_gle" != no; then
13343   echo "error: must be yes or no: --with-gle=$with_gle"
13344   exit 1
13345
13346 fi
13347
13348
13349 ###############################################################################
13350 #
13351 #       Handle --with-gles
13352 #
13353 ###############################################################################
13354
13355 with_gles_req=unspecified
13356
13357 # Check whether --with-gles was given.
13358 if test "${with_gles+set}" = set; then :
13359   withval=$with_gles; with_gles="$withval"; with_gles_req="$withval"
13360 else
13361   with_gles=no
13362 fi
13363
13364
13365
13366    case "$with_gles" in
13367     yes) ;;
13368     no)  ;;
13369
13370     /*)
13371      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES headers" >&5
13372 $as_echo_n "checking for JWZGLES headers... " >&6; }
13373      d=$with_gles/include
13374      if test -d $d; then
13375        X_CFLAGS="-I$d $X_CFLAGS"
13376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13377 $as_echo "$d" >&6; }
13378      else
13379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13380 $as_echo "not found ($d: no such directory)" >&6; }
13381      fi
13382
13383      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES libs" >&5
13384 $as_echo_n "checking for JWZGLES libs... " >&6; }
13385      d=$with_gles/lib
13386      if test -d $d; then
13387        X_LIBS="-L$d $X_LIBS"
13388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13389 $as_echo "$d" >&6; }
13390      else
13391        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13392 $as_echo "not found ($d: no such directory)" >&6; }
13393      fi
13394
13395      # replace the directory string with "yes".
13396      with_gles_req="yes"
13397      with_gles=$with_gles_req
13398      ;;
13399
13400     *)
13401      echo ""
13402      echo "error: argument to --with-gles must be \"yes\", \"no\", or a directory."
13403      echo "       If it is a directory, then \`DIR/include' will be added to"
13404      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13405      exit 1
13406      ;;
13407    esac
13408
13409
13410 if test "$with_gles" = yes; then
13411   have_gles=yes
13412   $as_echo "#define HAVE_JWZGLES 1" >>confdefs.h
13413
13414   JWZGLES_OBJS="jwzgles.o"
13415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OpenGL ES compatiblity shim" >&5
13416 $as_echo "using OpenGL ES compatiblity shim" >&6; }
13417 elif test "$with_gles" != no; then
13418   echo "error: must be yes or no: --with-gles=$with_xpm"
13419   exit 1
13420 fi
13421
13422 # May want to phase out glBitmap even in a non-GLES world.
13423 #
13424 if test "$have_gles" = yes; then
13425   GLFPS_OBJS="fps-gl.o glxfonts.o texfont.o"
13426   GLFONT_OBJS=""
13427 else
13428   $as_echo "#define HAVE_GLBITMAP 1" >>confdefs.h
13429
13430   GLFPS_OBJS="fps-gl.o glxfonts.o"
13431   GLFONT_OBJS="texfont.o"
13432 fi
13433
13434
13435 ###############################################################################
13436 #
13437 #       Check for -lgdk_pixbuf.
13438 #       These tests are for gdk_pixbuf usage of the hacks,
13439 #       not xscreensaver-demo (thus we have to test again to get
13440 #       the libraries right: don't want to pull in all of GTK
13441 #       for the hacks.)
13442 #
13443 ###############################################################################
13444
13445 have_gdk_pixbuf=no
13446 with_gdk_pixbuf_req=unspecified
13447
13448 # Check whether --with-pixbuf was given.
13449 if test "${with_pixbuf+set}" = set; then :
13450   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
13451 else
13452   with_gdk_pixbuf=yes
13453 fi
13454
13455
13456 # if --with-pixbuf=/directory/ was specified, remember that directory so that
13457 # we can also look for the `gdk-pixbuf-config' program in that directory.
13458 case "$with_gdk_pixbuf" in
13459   /*)
13460     gdk_pixbuf_dir="$with_gdk_pixbuf"
13461     ;;
13462   *)
13463     gdk_pixbuf_dir=""
13464     ;;
13465 esac
13466
13467
13468    case "$with_gdk_pixbuf" in
13469     yes) ;;
13470     no)  ;;
13471
13472     /*)
13473      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF headers" >&5
13474 $as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
13475      d=$with_gdk_pixbuf/include
13476      if test -d $d; then
13477        X_CFLAGS="-I$d $X_CFLAGS"
13478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13479 $as_echo "$d" >&6; }
13480      else
13481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13482 $as_echo "not found ($d: no such directory)" >&6; }
13483      fi
13484
13485      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF libs" >&5
13486 $as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
13487      d=$with_gdk_pixbuf/lib
13488      if test -d $d; then
13489        X_LIBS="-L$d $X_LIBS"
13490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13491 $as_echo "$d" >&6; }
13492      else
13493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13494 $as_echo "not found ($d: no such directory)" >&6; }
13495      fi
13496
13497      # replace the directory string with "yes".
13498      with_gdk_pixbuf_req="yes"
13499      with_gdk_pixbuf=$with_gdk_pixbuf_req
13500      ;;
13501
13502     *)
13503      echo ""
13504      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
13505      echo "       If it is a directory, then \`DIR/include' will be added to"
13506      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13507      exit 1
13508      ;;
13509    esac
13510
13511
13512 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
13513   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
13514   exit 1
13515 fi
13516
13517 if test "$with_gdk_pixbuf" = yes; then
13518   have_gdk_pixbuf=no
13519
13520   pkgs=''
13521   ok="yes"
13522
13523   pkg_check_version gdk-pixbuf-2.0      2.0.0
13524   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
13525   have_gdk_pixbuf="$ok"
13526
13527   if test "$have_gdk_pixbuf" = yes; then
13528     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf includes" >&5
13529 $as_echo_n "checking for gdk-pixbuf includes... " >&6; }
13530 if ${ac_cv_gdk_pixbuf_config_cflags+:} false; then :
13531   $as_echo_n "(cached) " >&6
13532 else
13533   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
13534 fi
13535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
13536 $as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
13537     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf libs" >&5
13538 $as_echo_n "checking for gdk-pixbuf libs... " >&6; }
13539 if ${ac_cv_gdk_pixbuf_config_libs+:} false; then :
13540   $as_echo_n "(cached) " >&6
13541 else
13542   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
13543 fi
13544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_libs" >&5
13545 $as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
13546   fi
13547
13548   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
13549   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
13550
13551
13552   if test "$have_gdk_pixbuf" = yes; then
13553     #
13554     # we appear to have pixbuf; check for headers/libs to be sure.
13555     #
13556     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
13557     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
13558
13559     have_gdk_pixbuf=no
13560
13561     # check for header A...
13562
13563   ac_save_CPPFLAGS="$CPPFLAGS"
13564   if test \! -z "$includedir" ; then
13565     CPPFLAGS="$CPPFLAGS -I$includedir"
13566   fi
13567   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13568   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13569   ac_fn_c_check_header_mongrel "$LINENO" "gdk-pixbuf/gdk-pixbuf.h" "ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" "$ac_includes_default"
13570 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = xyes; then :
13571   have_gdk_pixbuf=yes
13572 fi
13573
13574
13575   CPPFLAGS="$ac_save_CPPFLAGS"
13576
13577     # if that worked, check for header B...
13578     if test "$have_gdk_pixbuf" = yes; then
13579       have_gdk_pixbuf=no
13580       gdk_pixbuf_halfassed=yes
13581
13582   ac_save_CPPFLAGS="$CPPFLAGS"
13583   if test \! -z "$includedir" ; then
13584     CPPFLAGS="$CPPFLAGS -I$includedir"
13585   fi
13586   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13587   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13588   ac_fn_c_check_header_mongrel "$LINENO" "gdk-pixbuf/gdk-pixbuf-xlib.h" "ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" "$ac_includes_default"
13589 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = xyes; then :
13590   have_gdk_pixbuf=yes
13591                          gdk_pixbuf_halfassed=no
13592 fi
13593
13594
13595   CPPFLAGS="$ac_save_CPPFLAGS"
13596
13597       # yay, it has a new name in Gtk 2.x...
13598       if test "$have_gdk_pixbuf" = no; then
13599         have_gdk_pixbuf=no
13600         gdk_pixbuf_halfassed=yes
13601
13602   ac_save_CPPFLAGS="$CPPFLAGS"
13603   if test \! -z "$includedir" ; then
13604     CPPFLAGS="$CPPFLAGS -I$includedir"
13605   fi
13606   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13607   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13608   ac_fn_c_check_header_mongrel "$LINENO" "gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" "ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" "$ac_includes_default"
13609 if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = xyes; then :
13610   have_gdk_pixbuf=yes
13611                            gdk_pixbuf_halfassed=no
13612 fi
13613
13614
13615   CPPFLAGS="$ac_save_CPPFLAGS"
13616       fi
13617     fi
13618     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
13619   fi
13620
13621   if test "$have_gdk_pixbuf" = yes; then
13622     # we have the headers, now check for the libraries
13623     have_gdk_pixbuf=no
13624     gdk_pixbuf_halfassed=yes
13625
13626     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability..." >&5
13627 $as_echo "checking for gdk_pixbuf usability..." >&6; }
13628
13629     # library A...
13630
13631   ac_save_CPPFLAGS="$CPPFLAGS"
13632   ac_save_LDFLAGS="$LDFLAGS"
13633 #  ac_save_LIBS="$LIBS"
13634
13635   if test \! -z "$includedir" ; then
13636     CPPFLAGS="$CPPFLAGS -I$includedir"
13637   fi
13638   # note: $X_CFLAGS includes $x_includes
13639   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13640
13641   if test \! -z "$libdir" ; then
13642     LDFLAGS="$LDFLAGS -L$libdir"
13643   fi
13644   # note: $X_LIBS includes $x_libraries
13645   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13646
13647   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13648   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13649   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_new_from_file in -lc" >&5
13650 $as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
13651 if ${ac_cv_lib_c_gdk_pixbuf_new_from_file+:} false; then :
13652   $as_echo_n "(cached) " >&6
13653 else
13654   ac_check_lib_save_LIBS=$LIBS
13655 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
13656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13657 /* end confdefs.h.  */
13658
13659 /* Override any GCC internal prototype to avoid an error.
13660    Use char because int might match the return type of a GCC
13661    builtin and then its argument prototype would still apply.  */
13662 #ifdef __cplusplus
13663 extern "C"
13664 #endif
13665 char gdk_pixbuf_new_from_file ();
13666 int
13667 main ()
13668 {
13669 return gdk_pixbuf_new_from_file ();
13670   ;
13671   return 0;
13672 }
13673 _ACEOF
13674 if ac_fn_c_try_link "$LINENO"; then :
13675   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
13676 else
13677   ac_cv_lib_c_gdk_pixbuf_new_from_file=no
13678 fi
13679 rm -f core conftest.err conftest.$ac_objext \
13680     conftest$ac_exeext conftest.$ac_ext
13681 LIBS=$ac_check_lib_save_LIBS
13682 fi
13683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
13684 $as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
13685 if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = xyes; then :
13686   have_gdk_pixbuf=yes
13687 fi
13688
13689   CPPFLAGS="$ac_save_CPPFLAGS"
13690   LDFLAGS="$ac_save_LDFLAGS"
13691 #  LIBS="$ac_save_LIBS"
13692
13693     # library B...
13694     if test "$have_gdk_pixbuf" = yes; then
13695       have_gdk_pixbuf=no
13696
13697   ac_save_CPPFLAGS="$CPPFLAGS"
13698   ac_save_LDFLAGS="$LDFLAGS"
13699 #  ac_save_LIBS="$LIBS"
13700
13701   if test \! -z "$includedir" ; then
13702     CPPFLAGS="$CPPFLAGS -I$includedir"
13703   fi
13704   # note: $X_CFLAGS includes $x_includes
13705   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13706
13707   if test \! -z "$libdir" ; then
13708     LDFLAGS="$LDFLAGS -L$libdir"
13709   fi
13710   # note: $X_LIBS includes $x_libraries
13711   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13712
13713   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13714   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13715   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_xlib_init in -lc" >&5
13716 $as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
13717 if ${ac_cv_lib_c_gdk_pixbuf_xlib_init+:} false; then :
13718   $as_echo_n "(cached) " >&6
13719 else
13720   ac_check_lib_save_LIBS=$LIBS
13721 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
13722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13723 /* end confdefs.h.  */
13724
13725 /* Override any GCC internal prototype to avoid an error.
13726    Use char because int might match the return type of a GCC
13727    builtin and then its argument prototype would still apply.  */
13728 #ifdef __cplusplus
13729 extern "C"
13730 #endif
13731 char gdk_pixbuf_xlib_init ();
13732 int
13733 main ()
13734 {
13735 return gdk_pixbuf_xlib_init ();
13736   ;
13737   return 0;
13738 }
13739 _ACEOF
13740 if ac_fn_c_try_link "$LINENO"; then :
13741   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
13742 else
13743   ac_cv_lib_c_gdk_pixbuf_xlib_init=no
13744 fi
13745 rm -f core conftest.err conftest.$ac_objext \
13746     conftest$ac_exeext conftest.$ac_ext
13747 LIBS=$ac_check_lib_save_LIBS
13748 fi
13749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
13750 $as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
13751 if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = xyes; then :
13752   have_gdk_pixbuf=yes
13753                       gdk_pixbuf_halfassed=no
13754 fi
13755
13756   CPPFLAGS="$ac_save_CPPFLAGS"
13757   LDFLAGS="$ac_save_LDFLAGS"
13758 #  LIBS="$ac_save_LIBS"
13759
13760     fi
13761   fi
13762
13763   if test "$have_gdk_pixbuf" = yes; then
13764     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
13765     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
13766     $as_echo "#define HAVE_GDK_PIXBUF 1" >>confdefs.h
13767
13768   else
13769     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability... no" >&5
13770 $as_echo "checking for gdk_pixbuf usability... no" >&6; }
13771   fi
13772
13773   if test "$have_gdk_pixbuf" = yes; then
13774
13775   ac_save_CPPFLAGS="$CPPFLAGS"
13776   ac_save_LDFLAGS="$LDFLAGS"
13777 #  ac_save_LIBS="$LIBS"
13778
13779   if test \! -z "$includedir" ; then
13780     CPPFLAGS="$CPPFLAGS -I$includedir"
13781   fi
13782   # note: $X_CFLAGS includes $x_includes
13783   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13784
13785   if test \! -z "$libdir" ; then
13786     LDFLAGS="$LDFLAGS -L$libdir"
13787   fi
13788   # note: $X_LIBS includes $x_libraries
13789   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13790
13791   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13792   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13793   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
13794 $as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
13795 if ${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+:} false; then :
13796   $as_echo_n "(cached) " >&6
13797 else
13798   ac_check_lib_save_LIBS=$LIBS
13799 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
13800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13801 /* end confdefs.h.  */
13802
13803 /* Override any GCC internal prototype to avoid an error.
13804    Use char because int might match the return type of a GCC
13805    builtin and then its argument prototype would still apply.  */
13806 #ifdef __cplusplus
13807 extern "C"
13808 #endif
13809 char gdk_pixbuf_apply_embedded_orientation ();
13810 int
13811 main ()
13812 {
13813 return gdk_pixbuf_apply_embedded_orientation ();
13814   ;
13815   return 0;
13816 }
13817 _ACEOF
13818 if ac_fn_c_try_link "$LINENO"; then :
13819   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
13820 else
13821   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
13822 fi
13823 rm -f core conftest.err conftest.$ac_objext \
13824     conftest$ac_exeext conftest.$ac_ext
13825 LIBS=$ac_check_lib_save_LIBS
13826 fi
13827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
13828 $as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
13829 if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = xyes; then :
13830   $as_echo "#define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1" >>confdefs.h
13831
13832 fi
13833
13834   CPPFLAGS="$ac_save_CPPFLAGS"
13835   LDFLAGS="$ac_save_LDFLAGS"
13836 #  LIBS="$ac_save_LIBS"
13837
13838   fi
13839 fi
13840
13841
13842 ###############################################################################
13843 #
13844 #       Check for -lXpm.
13845 #
13846 ###############################################################################
13847
13848 have_xpm=no
13849 with_xpm_req=unspecified
13850
13851 # Check whether --with-xpm was given.
13852 if test "${with_xpm+set}" = set; then :
13853   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
13854 else
13855   with_xpm=yes
13856 fi
13857
13858
13859
13860    case "$with_xpm" in
13861     yes) ;;
13862     no)  ;;
13863
13864     /*)
13865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM headers" >&5
13866 $as_echo_n "checking for XPM headers... " >&6; }
13867      d=$with_xpm/include
13868      if test -d $d; then
13869        X_CFLAGS="-I$d $X_CFLAGS"
13870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13871 $as_echo "$d" >&6; }
13872      else
13873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13874 $as_echo "not found ($d: no such directory)" >&6; }
13875      fi
13876
13877      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM libs" >&5
13878 $as_echo_n "checking for XPM libs... " >&6; }
13879      d=$with_xpm/lib
13880      if test -d $d; then
13881        X_LIBS="-L$d $X_LIBS"
13882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13883 $as_echo "$d" >&6; }
13884      else
13885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13886 $as_echo "not found ($d: no such directory)" >&6; }
13887      fi
13888
13889      # replace the directory string with "yes".
13890      with_xpm_req="yes"
13891      with_xpm=$with_xpm_req
13892      ;;
13893
13894     *)
13895      echo ""
13896      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
13897      echo "       If it is a directory, then \`DIR/include' will be added to"
13898      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13899      exit 1
13900      ;;
13901    esac
13902
13903
13904 if test "$with_xpm" = yes; then
13905
13906   ac_save_CPPFLAGS="$CPPFLAGS"
13907   if test \! -z "$includedir" ; then
13908     CPPFLAGS="$CPPFLAGS -I$includedir"
13909   fi
13910   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13911   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13912   ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "#include <X11/Xlib.h>
13913 "
13914 if test "x$ac_cv_header_X11_xpm_h" = xyes; then :
13915   have_xpm=yes
13916                     $as_echo "#define HAVE_XPM 1" >>confdefs.h
13917
13918                     XPM_LIBS="-lXpm $XPM_LIBS"
13919 fi
13920
13921
13922   CPPFLAGS="$ac_save_CPPFLAGS"
13923 elif test "$with_xpm" != no; then
13924   echo "error: must be yes or no: --with-xpm=$with_xpm"
13925   exit 1
13926 fi
13927
13928 # See comment near $motif_requires_xpm, above.
13929 # Need to do this here, after both Motif and XPM have been checked for.
13930 #
13931 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
13932   if test "$motif_requires_xpm" = yes ; then
13933     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
13934   fi
13935 fi
13936
13937 if test "$XPM_LIBS" = "" ; then
13938   XPM_LIBS=$(MINIXPM)
13939 fi
13940
13941
13942 ###############################################################################
13943 #
13944 #       Check for -ljpeg
13945 #
13946 ###############################################################################
13947
13948 have_jpeg=no
13949 with_jpeg_req=unspecified
13950 jpeg_halfassed=no
13951
13952 # Check whether --with-jpeg was given.
13953 if test "${with_jpeg+set}" = set; then :
13954   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
13955 else
13956   with_jpeg=yes
13957 fi
13958
13959
13960
13961    case "$with_jpeg" in
13962     yes) ;;
13963     no)  ;;
13964
13965     /*)
13966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG headers" >&5
13967 $as_echo_n "checking for JPEG headers... " >&6; }
13968      d=$with_jpeg/include
13969      if test -d $d; then
13970        X_CFLAGS="-I$d $X_CFLAGS"
13971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13972 $as_echo "$d" >&6; }
13973      else
13974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13975 $as_echo "not found ($d: no such directory)" >&6; }
13976      fi
13977
13978      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG libs" >&5
13979 $as_echo_n "checking for JPEG libs... " >&6; }
13980      d=$with_jpeg/lib
13981      if test -d $d; then
13982        X_LIBS="-L$d $X_LIBS"
13983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13984 $as_echo "$d" >&6; }
13985      else
13986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13987 $as_echo "not found ($d: no such directory)" >&6; }
13988      fi
13989
13990      # replace the directory string with "yes".
13991      with_jpeg_req="yes"
13992      with_jpeg=$with_jpeg_req
13993      ;;
13994
13995     *)
13996      echo ""
13997      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
13998      echo "       If it is a directory, then \`DIR/include' will be added to"
13999      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14000      exit 1
14001      ;;
14002    esac
14003
14004
14005 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
14006   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
14007   exit 1
14008 fi
14009
14010 if test "$with_jpeg" = yes; then
14011
14012   have_jpeg=no
14013
14014   ac_save_CPPFLAGS="$CPPFLAGS"
14015   if test \! -z "$includedir" ; then
14016     CPPFLAGS="$CPPFLAGS -I$includedir"
14017   fi
14018   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14019   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14020   ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
14021 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
14022   have_jpeg=yes
14023 fi
14024
14025
14026   CPPFLAGS="$ac_save_CPPFLAGS"
14027
14028   if test "$have_jpeg" = yes; then
14029     # we have the header, now check for the library
14030     have_jpeg=no
14031     jpeg_halfassed=yes
14032
14033   ac_save_CPPFLAGS="$CPPFLAGS"
14034   ac_save_LDFLAGS="$LDFLAGS"
14035 #  ac_save_LIBS="$LIBS"
14036
14037   if test \! -z "$includedir" ; then
14038     CPPFLAGS="$CPPFLAGS -I$includedir"
14039   fi
14040   # note: $X_CFLAGS includes $x_includes
14041   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14042
14043   if test \! -z "$libdir" ; then
14044     LDFLAGS="$LDFLAGS -L$libdir"
14045   fi
14046   # note: $X_LIBS includes $x_libraries
14047   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14048
14049   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14050   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_start_compress in -ljpeg" >&5
14052 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
14053 if ${ac_cv_lib_jpeg_jpeg_start_compress+:} false; then :
14054   $as_echo_n "(cached) " >&6
14055 else
14056   ac_check_lib_save_LIBS=$LIBS
14057 LIBS="-ljpeg  $LIBS"
14058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14059 /* end confdefs.h.  */
14060
14061 /* Override any GCC internal prototype to avoid an error.
14062    Use char because int might match the return type of a GCC
14063    builtin and then its argument prototype would still apply.  */
14064 #ifdef __cplusplus
14065 extern "C"
14066 #endif
14067 char jpeg_start_compress ();
14068 int
14069 main ()
14070 {
14071 return jpeg_start_compress ();
14072   ;
14073   return 0;
14074 }
14075 _ACEOF
14076 if ac_fn_c_try_link "$LINENO"; then :
14077   ac_cv_lib_jpeg_jpeg_start_compress=yes
14078 else
14079   ac_cv_lib_jpeg_jpeg_start_compress=no
14080 fi
14081 rm -f core conftest.err conftest.$ac_objext \
14082     conftest$ac_exeext conftest.$ac_ext
14083 LIBS=$ac_check_lib_save_LIBS
14084 fi
14085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
14086 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
14087 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = xyes; then :
14088   have_jpeg=yes
14089                     jpeg_halfassed=no
14090                     JPEG_LIBS="-ljpeg"
14091                     $as_echo "#define HAVE_JPEGLIB 1" >>confdefs.h
14092
14093 fi
14094
14095   CPPFLAGS="$ac_save_CPPFLAGS"
14096   LDFLAGS="$ac_save_LDFLAGS"
14097 #  LIBS="$ac_save_LIBS"
14098
14099   fi
14100 fi
14101
14102
14103 ###############################################################################
14104 #
14105 #       Check for pty support: this allows 'phosphor' and 'apple2'
14106 #       to run curses-based programs, or be used as terminal windows.
14107 #
14108 ###############################################################################
14109
14110 PTY_LIBS=
14111 for ac_header in pty.h util.h
14112 do :
14113   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14114 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14115 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14116   cat >>confdefs.h <<_ACEOF
14117 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14118 _ACEOF
14119
14120 fi
14121
14122 done
14123
14124
14125   ac_save_CPPFLAGS="$CPPFLAGS"
14126   ac_save_LDFLAGS="$LDFLAGS"
14127 #  ac_save_LIBS="$LIBS"
14128
14129   if test \! -z "$includedir" ; then
14130     CPPFLAGS="$CPPFLAGS -I$includedir"
14131   fi
14132   # note: $X_CFLAGS includes $x_includes
14133   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14134
14135   if test \! -z "$libdir" ; then
14136     LDFLAGS="$LDFLAGS -L$libdir"
14137   fi
14138   # note: $X_LIBS includes $x_libraries
14139   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14140
14141   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14142   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14143   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
14144 $as_echo_n "checking for forkpty in -lutil... " >&6; }
14145 if ${ac_cv_lib_util_forkpty+:} false; then :
14146   $as_echo_n "(cached) " >&6
14147 else
14148   ac_check_lib_save_LIBS=$LIBS
14149 LIBS="-lutil  $LIBS"
14150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14151 /* end confdefs.h.  */
14152
14153 /* Override any GCC internal prototype to avoid an error.
14154    Use char because int might match the return type of a GCC
14155    builtin and then its argument prototype would still apply.  */
14156 #ifdef __cplusplus
14157 extern "C"
14158 #endif
14159 char forkpty ();
14160 int
14161 main ()
14162 {
14163 return forkpty ();
14164   ;
14165   return 0;
14166 }
14167 _ACEOF
14168 if ac_fn_c_try_link "$LINENO"; then :
14169   ac_cv_lib_util_forkpty=yes
14170 else
14171   ac_cv_lib_util_forkpty=no
14172 fi
14173 rm -f core conftest.err conftest.$ac_objext \
14174     conftest$ac_exeext conftest.$ac_ext
14175 LIBS=$ac_check_lib_save_LIBS
14176 fi
14177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
14178 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
14179 if test "x$ac_cv_lib_util_forkpty" = xyes; then :
14180   PTY_LIBS="-lutil"
14181                 ac_have_forkpty=yes
14182                 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
14183
14184 fi
14185
14186   CPPFLAGS="$ac_save_CPPFLAGS"
14187   LDFLAGS="$ac_save_LDFLAGS"
14188 #  LIBS="$ac_save_LIBS"
14189
14190
14191 if test "$ac_have_forkpty" != yes ; then
14192   # we don't need (or have) -lutil on MacOS 10.4.2...
14193
14194   ac_save_CPPFLAGS="$CPPFLAGS"
14195   ac_save_LDFLAGS="$LDFLAGS"
14196 #  ac_save_LIBS="$LIBS"
14197
14198   if test \! -z "$includedir" ; then
14199     CPPFLAGS="$CPPFLAGS -I$includedir"
14200   fi
14201   # note: $X_CFLAGS includes $x_includes
14202   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14203
14204   if test \! -z "$libdir" ; then
14205     LDFLAGS="$LDFLAGS -L$libdir"
14206   fi
14207   # note: $X_LIBS includes $x_libraries
14208   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14209
14210   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14211   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14212   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lc" >&5
14213 $as_echo_n "checking for forkpty in -lc... " >&6; }
14214 if ${ac_cv_lib_c_forkpty+:} false; then :
14215   $as_echo_n "(cached) " >&6
14216 else
14217   ac_check_lib_save_LIBS=$LIBS
14218 LIBS="-lc  $LIBS"
14219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14220 /* end confdefs.h.  */
14221
14222 /* Override any GCC internal prototype to avoid an error.
14223    Use char because int might match the return type of a GCC
14224    builtin and then its argument prototype would still apply.  */
14225 #ifdef __cplusplus
14226 extern "C"
14227 #endif
14228 char forkpty ();
14229 int
14230 main ()
14231 {
14232 return forkpty ();
14233   ;
14234   return 0;
14235 }
14236 _ACEOF
14237 if ac_fn_c_try_link "$LINENO"; then :
14238   ac_cv_lib_c_forkpty=yes
14239 else
14240   ac_cv_lib_c_forkpty=no
14241 fi
14242 rm -f core conftest.err conftest.$ac_objext \
14243     conftest$ac_exeext conftest.$ac_ext
14244 LIBS=$ac_check_lib_save_LIBS
14245 fi
14246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_forkpty" >&5
14247 $as_echo "$ac_cv_lib_c_forkpty" >&6; }
14248 if test "x$ac_cv_lib_c_forkpty" = xyes; then :
14249   PTY_LIBS=""
14250                   $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
14251
14252 fi
14253
14254   CPPFLAGS="$ac_save_CPPFLAGS"
14255   LDFLAGS="$ac_save_LDFLAGS"
14256 #  LIBS="$ac_save_LIBS"
14257
14258 fi
14259
14260 ###############################################################################
14261 #
14262 #       Check for the XSHM server extension.
14263 #
14264 ###############################################################################
14265
14266 have_xshm=no
14267 with_xshm_req=unspecified
14268
14269 # Check whether --with-xshm-ext was given.
14270 if test "${with_xshm_ext+set}" = set; then :
14271   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
14272 else
14273   with_xshm=yes
14274 fi
14275
14276
14277
14278    case "$with_xshm" in
14279     yes) ;;
14280     no)  ;;
14281
14282     /*)
14283      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM headers" >&5
14284 $as_echo_n "checking for XSHM headers... " >&6; }
14285      d=$with_xshm/include
14286      if test -d $d; then
14287        X_CFLAGS="-I$d $X_CFLAGS"
14288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14289 $as_echo "$d" >&6; }
14290      else
14291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14292 $as_echo "not found ($d: no such directory)" >&6; }
14293      fi
14294
14295      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM libs" >&5
14296 $as_echo_n "checking for XSHM libs... " >&6; }
14297      d=$with_xshm/lib
14298      if test -d $d; then
14299        X_LIBS="-L$d $X_LIBS"
14300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14301 $as_echo "$d" >&6; }
14302      else
14303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14304 $as_echo "not found ($d: no such directory)" >&6; }
14305      fi
14306
14307      # replace the directory string with "yes".
14308      with_xshm_req="yes"
14309      with_xshm=$with_xshm_req
14310      ;;
14311
14312     *)
14313      echo ""
14314      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
14315      echo "       If it is a directory, then \`DIR/include' will be added to"
14316      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14317      exit 1
14318      ;;
14319    esac
14320
14321
14322 if test "$with_xshm" = yes; then
14323
14324   # first check for Xshm.h.
14325
14326   ac_save_CPPFLAGS="$CPPFLAGS"
14327   if test \! -z "$includedir" ; then
14328     CPPFLAGS="$CPPFLAGS -I$includedir"
14329   fi
14330   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14331   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14332   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XShm.h" "ac_cv_header_X11_extensions_XShm_h" "#include <X11/Xlib.h>
14333 "
14334 if test "x$ac_cv_header_X11_extensions_XShm_h" = xyes; then :
14335   have_xshm=yes
14336 fi
14337
14338
14339   CPPFLAGS="$ac_save_CPPFLAGS"
14340
14341   # if that succeeded, then check for sys/ipc.h.
14342   if test "$have_xshm" = yes; then
14343     have_xshm=no
14344
14345   ac_save_CPPFLAGS="$CPPFLAGS"
14346   if test \! -z "$includedir" ; then
14347     CPPFLAGS="$CPPFLAGS -I$includedir"
14348   fi
14349   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14350   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14351   ac_fn_c_check_header_mongrel "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
14352 if test "x$ac_cv_header_sys_ipc_h" = xyes; then :
14353   have_xshm=yes
14354 fi
14355
14356
14357   CPPFLAGS="$ac_save_CPPFLAGS"
14358   fi
14359
14360   # if that succeeded, then check for sys/shm.h.
14361   if test "$have_xshm" = yes; then
14362     have_xshm=no
14363
14364   ac_save_CPPFLAGS="$CPPFLAGS"
14365   if test \! -z "$includedir" ; then
14366     CPPFLAGS="$CPPFLAGS -I$includedir"
14367   fi
14368   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14369   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14370   ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
14371 if test "x$ac_cv_header_sys_shm_h" = xyes; then :
14372   have_xshm=yes
14373 fi
14374
14375
14376   CPPFLAGS="$ac_save_CPPFLAGS"
14377   fi
14378
14379   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
14380   # to exist, but the library code to not exist.  And even better, the library
14381   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
14382   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
14383   # that's not quite right, but close enough.)
14384   #
14385   case "$host" in
14386     *-aix*)
14387       if  `uname -v` -eq 3 ; then
14388         have_xshm=no
14389
14390   ac_save_CPPFLAGS="$CPPFLAGS"
14391   ac_save_LDFLAGS="$LDFLAGS"
14392 #  ac_save_LIBS="$LIBS"
14393
14394   if test \! -z "$includedir" ; then
14395     CPPFLAGS="$CPPFLAGS -I$includedir"
14396   fi
14397   # note: $X_CFLAGS includes $x_includes
14398   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14399
14400   if test \! -z "$libdir" ; then
14401     LDFLAGS="$LDFLAGS -L$libdir"
14402   fi
14403   # note: $X_LIBS includes $x_libraries
14404   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14405
14406   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14407   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14408   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryExtension in -lXextSam" >&5
14409 $as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
14410 if ${ac_cv_lib_XextSam_XShmQueryExtension+:} false; then :
14411   $as_echo_n "(cached) " >&6
14412 else
14413   ac_check_lib_save_LIBS=$LIBS
14414 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
14415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14416 /* end confdefs.h.  */
14417
14418 /* Override any GCC internal prototype to avoid an error.
14419    Use char because int might match the return type of a GCC
14420    builtin and then its argument prototype would still apply.  */
14421 #ifdef __cplusplus
14422 extern "C"
14423 #endif
14424 char XShmQueryExtension ();
14425 int
14426 main ()
14427 {
14428 return XShmQueryExtension ();
14429   ;
14430   return 0;
14431 }
14432 _ACEOF
14433 if ac_fn_c_try_link "$LINENO"; then :
14434   ac_cv_lib_XextSam_XShmQueryExtension=yes
14435 else
14436   ac_cv_lib_XextSam_XShmQueryExtension=no
14437 fi
14438 rm -f core conftest.err conftest.$ac_objext \
14439     conftest$ac_exeext conftest.$ac_ext
14440 LIBS=$ac_check_lib_save_LIBS
14441 fi
14442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
14443 $as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
14444 if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = xyes; then :
14445   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
14446 else
14447   true
14448 fi
14449
14450   CPPFLAGS="$ac_save_CPPFLAGS"
14451   LDFLAGS="$ac_save_LDFLAGS"
14452 #  LIBS="$ac_save_LIBS"
14453
14454       fi
14455     ;;
14456   esac
14457
14458   # if that succeeded, then we've really got it.
14459   if test "$have_xshm" = yes; then
14460     $as_echo "#define HAVE_XSHM_EXTENSION 1" >>confdefs.h
14461
14462   fi
14463
14464 elif test "$with_xshm" != no; then
14465   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
14466   exit 1
14467 fi
14468
14469
14470 ###############################################################################
14471 #
14472 #       Check for the DOUBLE-BUFFER server extension.
14473 #
14474 ###############################################################################
14475
14476 have_xdbe=no
14477 with_xdbe_req=unspecified
14478
14479 # Check whether --with-xdbe-ext was given.
14480 if test "${with_xdbe_ext+set}" = set; then :
14481   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
14482 else
14483   with_xdbe=yes
14484 fi
14485
14486
14487
14488    case "$with_xdbe" in
14489     yes) ;;
14490     no)  ;;
14491
14492     /*)
14493      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER headers" >&5
14494 $as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
14495      d=$with_xdbe/include
14496      if test -d $d; then
14497        X_CFLAGS="-I$d $X_CFLAGS"
14498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14499 $as_echo "$d" >&6; }
14500      else
14501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14502 $as_echo "not found ($d: no such directory)" >&6; }
14503      fi
14504
14505      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER libs" >&5
14506 $as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
14507      d=$with_xdbe/lib
14508      if test -d $d; then
14509        X_LIBS="-L$d $X_LIBS"
14510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14511 $as_echo "$d" >&6; }
14512      else
14513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14514 $as_echo "not found ($d: no such directory)" >&6; }
14515      fi
14516
14517      # replace the directory string with "yes".
14518      with_xdbe_req="yes"
14519      with_xdbe=$with_xdbe_req
14520      ;;
14521
14522     *)
14523      echo ""
14524      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
14525      echo "       If it is a directory, then \`DIR/include' will be added to"
14526      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14527      exit 1
14528      ;;
14529    esac
14530
14531
14532 if test "$with_xdbe" = yes; then
14533
14534
14535   ac_save_CPPFLAGS="$CPPFLAGS"
14536   if test \! -z "$includedir" ; then
14537     CPPFLAGS="$CPPFLAGS -I$includedir"
14538   fi
14539   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14540   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14541   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xdbe.h" "ac_cv_header_X11_extensions_Xdbe_h" "#include <X11/Xlib.h>
14542 "
14543 if test "x$ac_cv_header_X11_extensions_Xdbe_h" = xyes; then :
14544   have_xdbe=yes
14545 fi
14546
14547
14548   CPPFLAGS="$ac_save_CPPFLAGS"
14549   if test "$have_xdbe" = yes; then
14550     $as_echo "#define HAVE_DOUBLE_BUFFER_EXTENSION 1" >>confdefs.h
14551
14552   fi
14553
14554 elif test "$with_xdbe" != no; then
14555   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
14556   exit 1
14557 fi
14558
14559
14560 ###############################################################################
14561 #
14562 #       Check for the SGI XReadDisplay server extension.
14563 #
14564 #       Note: this has to be down here, rather than up with the other server
14565 #       extension tests, so that the output of `configure --help' is in the
14566 #       right order.  Arrgh!
14567 #
14568 ###############################################################################
14569
14570 have_readdisplay=no
14571 with_readdisplay_req=unspecified
14572
14573 # Check whether --with-readdisplay was given.
14574 if test "${with_readdisplay+set}" = set; then :
14575   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
14576 else
14577   with_readdisplay=yes
14578 fi
14579
14580
14581
14582    case "$with_readdisplay" in
14583     yes) ;;
14584     no)  ;;
14585
14586     /*)
14587      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay headers" >&5
14588 $as_echo_n "checking for XReadDisplay headers... " >&6; }
14589      d=$with_readdisplay/include
14590      if test -d $d; then
14591        X_CFLAGS="-I$d $X_CFLAGS"
14592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14593 $as_echo "$d" >&6; }
14594      else
14595        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14596 $as_echo "not found ($d: no such directory)" >&6; }
14597      fi
14598
14599      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay libs" >&5
14600 $as_echo_n "checking for XReadDisplay libs... " >&6; }
14601      d=$with_readdisplay/lib
14602      if test -d $d; then
14603        X_LIBS="-L$d $X_LIBS"
14604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14605 $as_echo "$d" >&6; }
14606      else
14607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14608 $as_echo "not found ($d: no such directory)" >&6; }
14609      fi
14610
14611      # replace the directory string with "yes".
14612      with_readdisplay_req="yes"
14613      with_readdisplay=$with_readdisplay_req
14614      ;;
14615
14616     *)
14617      echo ""
14618      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
14619      echo "       If it is a directory, then \`DIR/include' will be added to"
14620      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14621      exit 1
14622      ;;
14623    esac
14624
14625
14626 if test "$with_readdisplay" = yes; then
14627
14628   ac_save_CPPFLAGS="$CPPFLAGS"
14629   if test \! -z "$includedir" ; then
14630     CPPFLAGS="$CPPFLAGS -I$includedir"
14631   fi
14632   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14633   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14634   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/readdisplay.h" "ac_cv_header_X11_extensions_readdisplay_h" "#include <X11/Xlib.h>
14635 "
14636 if test "x$ac_cv_header_X11_extensions_readdisplay_h" = xyes; then :
14637   $as_echo "#define HAVE_READ_DISPLAY_EXTENSION 1" >>confdefs.h
14638
14639 fi
14640
14641
14642   CPPFLAGS="$ac_save_CPPFLAGS"
14643 elif test "$with_readdisplay" != no; then
14644   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
14645   exit 1
14646 fi
14647
14648
14649 ###############################################################################
14650 #
14651 #       Check for a directory full of images to use as the default value
14652 #       of the "imageDirectory" preference.
14653 #
14654 ###############################################################################
14655
14656 have_imagedir=no
14657 with_imagedir_req=unspecified
14658
14659
14660 # Check whether --with-image-directory was given.
14661 if test "${with_image_directory+set}" = set; then :
14662   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
14663 else
14664   with_imagedir=yes
14665 fi
14666
14667 # no HANDLE_X_PATH_ARG for this one
14668
14669 case "$with_imagedir" in
14670   /*)
14671     # absolute path
14672     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $with_imagedir" >&5
14673 $as_echo_n "checking for image directory $with_imagedir... " >&6; }
14674     if test -d "$with_imagedir" ; then
14675       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14676 $as_echo "yes" >&6; }
14677     else
14678       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14679 $as_echo "no" >&6; }
14680       with_imagedir=""
14681     fi
14682   ;;
14683   yes)
14684     with_imagedir=""
14685
14686     #### Could use some more defaults here...
14687     for dd in \
14688       "/usr/share/backgrounds/images/"          \
14689       "/usr/share/wallpapers/"                  \
14690       "/Library/Desktop Pictures/"              \
14691     ; do
14692       if test -z "$with_imagedir"; then
14693         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $dd" >&5
14694 $as_echo_n "checking for image directory $dd... " >&6; }
14695         if test -d "$dd" ; then
14696           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14697 $as_echo "yes" >&6; }
14698           with_imagedir="$dd"
14699         else
14700           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14701 $as_echo "no" >&6; }
14702         fi
14703       fi
14704     done
14705
14706   ;;
14707   no)
14708     with_imagedir=""
14709   ;;
14710
14711   *)
14712     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
14713     exit 1
14714   ;;
14715 esac
14716 ac_cv_imagedir="$with_imagedir"
14717
14718 DEFAULT_IMAGES_P='True'
14719 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
14720
14721 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
14722   DEFAULT_IMAGES_P='False'
14723 fi
14724
14725
14726 ###############################################################################
14727 #
14728 #       Pick a text file to use as the default of the "textFile" preference.
14729 #       Any old file will do, but preferably one that will make interesting
14730 #       shapes when displayed by "starwars" and "fontglide".
14731 #
14732 ###############################################################################
14733
14734 have_textfile=no
14735 with_textfile_req=unspecified
14736
14737
14738 # Check whether --with-text-file was given.
14739 if test "${with_text_file+set}" = set; then :
14740   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
14741 else
14742   with_textfile=yes
14743 fi
14744
14745 # no HANDLE_X_PATH_ARG for this one
14746
14747 case "$with_textfile" in
14748   /*)
14749     # absolute path
14750     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $with_textfile" >&5
14751 $as_echo_n "checking for text file $with_textfile... " >&6; }
14752     if test -f "$with_textfile" ; then
14753       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14754 $as_echo "yes" >&6; }
14755     else
14756       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14757 $as_echo "no" >&6; }
14758       with_textfile=""
14759     fi
14760   ;;
14761   yes)
14762     with_textfile=""
14763
14764     #### Could use some more defaults here...
14765     for f in \
14766       "/usr/X11R6/lib/X11/doc/README"              \
14767       "/usr/share/doc/xserver-common/copyright"    \
14768       "/usr/share/doc/xserver-xorg-core/copyright" \
14769       "/usr/X11R6/README"                          \
14770       "/usr/share/doc/libX11*/COPYING"             \
14771       "/usr/X11/share/X11/doc/README*"             \
14772       "/usr/share/doc/debian/debian-manifesto"     \
14773     ; do
14774       if test -z "$with_textfile"; then
14775         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $f" >&5
14776 $as_echo_n "checking for text file $f... " >&6; }
14777         f=`/bin/ls $f 2>&- | head -1`
14778         if test -f "$f" ; then
14779           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14780 $as_echo "yes" >&6; }
14781           with_textfile="$f"
14782         else
14783           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14784 $as_echo "no" >&6; }
14785         fi
14786       fi
14787     done
14788
14789   ;;
14790   no)
14791     with_textfile=""
14792   ;;
14793
14794   *)
14795     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
14796     exit 1
14797   ;;
14798 esac
14799 ac_cv_textfile="$with_textfile"
14800
14801 DEFAULT_TEXT_FILE="$ac_cv_textfile"
14802
14803
14804 ###############################################################################
14805 #
14806 #       Check the browser to see help URL
14807 #
14808 ###############################################################################
14809
14810 have_browser=no
14811 with_browser_req=unspecified
14812
14813
14814 # Check whether --with-browser was given.
14815 if test "${with_browser+set}" = set; then :
14816   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
14817 else
14818   with_browser=no
14819 fi
14820
14821 # no HANDLE_X_PATH_ARG for this one
14822
14823 case "$with_browser" in
14824   no )
14825   ;;
14826   * )
14827     WITH_BROWSER=$with_browser
14828     gnome_open_program=$with_browser
14829     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for browser $with_browser" >&5
14830 $as_echo_n "checking for browser $with_browser... " >&6; }
14831     with_browser_fullpath=`which $with_browser 2>/dev/null`
14832     case $with_browser_fullpath in
14833          /* )
14834                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14835 $as_echo "yes" >&6; }
14836                  have_browser=yes
14837                  ;;
14838         * )
14839                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14840 $as_echo "no" >&6; }
14841 # Only warning: we don't want to install all packages for the
14842 # dependency of the browser in building stage...
14843                echo "WARNING: browser not found: --with-browser=$with_browser"
14844                ;;
14845     esac
14846   ;;
14847 esac
14848 ac_cv_browser="$with_browser"
14849
14850 ###############################################################################
14851 #
14852 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
14853 #       This should be safe, but let's give people the option.
14854 #
14855 ###############################################################################
14856
14857 setuid_hacks_default=no
14858 setuid_hacks="$setuid_hacks_default"
14859
14860 # Check whether --with-setuid-hacks was given.
14861 if test "${with_setuid_hacks+set}" = set; then :
14862   withval=$with_setuid_hacks; setuid_hacks="$withval"
14863 else
14864   setuid_hacks="$setuid_hacks_default"
14865 fi
14866
14867
14868
14869    case "$setuid_hacks" in
14870     yes) ;;
14871     no)  ;;
14872
14873     /*)
14874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks headers" >&5
14875 $as_echo_n "checking for setuid hacks headers... " >&6; }
14876      d=$setuid_hacks/include
14877      if test -d $d; then
14878        X_CFLAGS="-I$d $X_CFLAGS"
14879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14880 $as_echo "$d" >&6; }
14881      else
14882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14883 $as_echo "not found ($d: no such directory)" >&6; }
14884      fi
14885
14886      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks libs" >&5
14887 $as_echo_n "checking for setuid hacks libs... " >&6; }
14888      d=$setuid_hacks/lib
14889      if test -d $d; then
14890        X_LIBS="-L$d $X_LIBS"
14891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14892 $as_echo "$d" >&6; }
14893      else
14894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14895 $as_echo "not found ($d: no such directory)" >&6; }
14896      fi
14897
14898      # replace the directory string with "yes".
14899      setuid_hacks_req="yes"
14900      setuid_hacks=$setuid_hacks_req
14901      ;;
14902
14903     *)
14904      echo ""
14905      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
14906      echo "       If it is a directory, then \`DIR/include' will be added to"
14907      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14908      exit 1
14909      ;;
14910    esac
14911
14912
14913 if test "$setuid_hacks" = yes; then
14914   true
14915 elif test "$setuid_hacks" != no; then
14916   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
14917   exit 1
14918 fi
14919
14920
14921 ###############################################################################
14922 #
14923 #       Done testing.  Now, set up the various -I and -L variables,
14924 #       and decide which GUI program to build by default.
14925 #
14926 ###############################################################################
14927
14928 DEPEND=makedepend
14929 DEPEND_FLAGS=
14930 DEPEND_DEFINES=
14931
14932
14933 if test \! -z "$includedir" ; then
14934   INCLUDES="$INCLUDES -I$includedir"
14935 fi
14936
14937 if test \! -z "$libdir" ; then
14938   LDFLAGS="$LDFLAGS -L$libdir"
14939 fi
14940
14941
14942 PREFERRED_DEMO_PROGRAM=''
14943 ALL_DEMO_PROGRAMS=
14944 if test "$have_motif" = yes; then
14945   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
14946   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
14947 fi
14948 if test "$have_gtk" = yes; then
14949   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
14950   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
14951 fi
14952
14953
14954 if test "$have_kerberos" = yes; then
14955   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
14956   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
14957 fi
14958 if test "$have_pam" = yes; then
14959   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
14960   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
14961   INSTALL_PAM="install-pam"
14962 fi
14963 if test "$enable_pam_check_account_type" = yes; then
14964   COMMENT_PAM_CHECK_ACCOUNT=""
14965 else
14966   COMMENT_PAM_CHECK_ACCOUNT="#"
14967 fi
14968 if test "$have_passwd_helper" = yes; then
14969   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
14970   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
14971 fi
14972   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
14973   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
14974
14975
14976 if test "$enable_locking" = yes; then
14977   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
14978   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
14979 else
14980   LOCK_SRCS='$(NOLOCK_SRCS_1)'
14981   LOCK_OBJS='$(NOLOCK_OBJS_1)'
14982 fi
14983
14984 if test "$ac_macosx" = yes; then
14985   EXES_OSX='$(EXES_OSX)'
14986   SCRIPTS_OSX='$(SCRIPTS_OSX)'
14987   MEN_OSX='$(MEN_OSX)'
14988 else
14989   EXES_OSX=
14990   SCRIPTS_OSX=
14991   MEN_OSX=
14992 fi
14993
14994
14995 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
14996
14997 if test "$need_setuid" = yes; then
14998   NEED_SETUID=yes
14999 else
15000   NEED_SETUID=no
15001 fi
15002
15003 if test "$setuid_hacks" = yes; then
15004   SETUID_HACKS=yes
15005 else
15006   SETUID_HACKS=no
15007 fi
15008
15009 tab='   '
15010 if test "$have_gl" = yes; then
15011   GL_EXES='$(GL_EXES)'
15012   SUID_EXES='$(SUID_EXES)'
15013   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
15014   GL_UTIL_EXES='$(GL_UTIL_EXES)'
15015   GL_MEN='$(GL_MEN)'
15016   GL_KLUDGE=" "
15017 else
15018   GL_KLUDGE="-"
15019 fi
15020
15021 if test "$have_gle" = yes; then
15022   GLE_EXES='$(GLE_EXES)'
15023   GLE_KLUDGE=" "
15024 else
15025   GLE_KLUDGE="-"
15026 fi
15027
15028 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
15029  JPEG_EXES='$(JPEG_EXES)'
15030 fi
15031
15032
15033 # Another substitution in the XScreenSaver.ad.in file:
15034 #
15035 if test "$gnome_open_program" != ''; then
15036   GNOME24=''
15037   GNOME22='!    '
15038   NOGNOME='!    '
15039 elif test "$gnome_url_show_program" != ''; then
15040   GNOME24='!    '
15041   GNOME22=''
15042   NOGNOME='!    '
15043 else
15044   GNOME24='!    '
15045   GNOME22='!    '
15046   NOGNOME=''
15047 fi
15048
15049
15050 # Set PO_DATADIR to something sensible.
15051 #
15052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale directory" >&5
15053 $as_echo_n "checking for locale directory... " >&6; }
15054 if test -n "$GTK_DATADIR" ; then
15055   PO_DATADIR="$GTK_DATADIR"
15056 elif test "$have_gtk" = yes; then
15057   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15058   PO_DATADIR="$PO_DATADIR/share"
15059 fi
15060
15061 if test -z "$PO_DATADIR" ; then
15062   #
15063   # #### Total fucking kludge --
15064   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
15065   # but of course we need to expand all the nested variables to do that...
15066   #
15067   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
15068   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
15069 fi
15070
15071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PO_DATADIR/locale" >&5
15072 $as_echo "$PO_DATADIR/locale" >&6; }
15073
15074
15075 # canonicalize slashes.
15076 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
15077
15078 # gcc 3.0 likes to issue this warning for every file:
15079 #
15080 # cc1: warning: changing search order for system directory "/usr/local/include"
15081 # cc1: warning:   as it has already been specified as a non-system directory
15082 #
15083 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
15084 # Which *should* be totally redundant, and thus an ok thing to delete?
15085 #
15086 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
15087
15088
15089 ###############################################################################
15090 #
15091 #       Perform substitutions and write Makefiles.
15092 #
15093 ###############################################################################
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163 APPDEFAULTS=$ac_x_app_defaults
15164
15165
15166
15167
15168
15169
15170
15171 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile driver/xscreensaver.pam hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
15172
15173 cat >confcache <<\_ACEOF
15174 # This file is a shell script that caches the results of configure
15175 # tests run on this system so they can be shared between configure
15176 # scripts and configure runs, see configure's option --config-cache.
15177 # It is not useful on other systems.  If it contains results you don't
15178 # want to keep, you may remove or edit it.
15179 #
15180 # config.status only pays attention to the cache file if you give it
15181 # the --recheck option to rerun configure.
15182 #
15183 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15184 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15185 # following values.
15186
15187 _ACEOF
15188
15189 # The following way of writing the cache mishandles newlines in values,
15190 # but we know of no workaround that is simple, portable, and efficient.
15191 # So, we kill variables containing newlines.
15192 # Ultrix sh set writes to stderr and can't be redirected directly,
15193 # and sets the high bit in the cache file unless we assign to the vars.
15194 (
15195   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15196     eval ac_val=\$$ac_var
15197     case $ac_val in #(
15198     *${as_nl}*)
15199       case $ac_var in #(
15200       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15201 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15202       esac
15203       case $ac_var in #(
15204       _ | IFS | as_nl) ;; #(
15205       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15206       *) { eval $ac_var=; unset $ac_var;} ;;
15207       esac ;;
15208     esac
15209   done
15210
15211   (set) 2>&1 |
15212     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15213     *${as_nl}ac_space=\ *)
15214       # `set' does not quote correctly, so add quotes: double-quote
15215       # substitution turns \\\\ into \\, and sed turns \\ into \.
15216       sed -n \
15217         "s/'/'\\\\''/g;
15218           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15219       ;; #(
15220     *)
15221       # `set' quotes correctly as required by POSIX, so do not add quotes.
15222       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15223       ;;
15224     esac |
15225     sort
15226 ) |
15227   sed '
15228      /^ac_cv_env_/b end
15229      t clear
15230      :clear
15231      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15232      t end
15233      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15234      :end' >>confcache
15235 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15236   if test -w "$cache_file"; then
15237     if test "x$cache_file" != "x/dev/null"; then
15238       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15239 $as_echo "$as_me: updating cache $cache_file" >&6;}
15240       if test ! -f "$cache_file" || test -h "$cache_file"; then
15241         cat confcache >"$cache_file"
15242       else
15243         case $cache_file in #(
15244         */* | ?:*)
15245           mv -f confcache "$cache_file"$$ &&
15246           mv -f "$cache_file"$$ "$cache_file" ;; #(
15247         *)
15248           mv -f confcache "$cache_file" ;;
15249         esac
15250       fi
15251     fi
15252   else
15253     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15254 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15255   fi
15256 fi
15257 rm -f confcache
15258
15259 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15260 # Let make expand exec_prefix.
15261 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15262
15263 DEFS=-DHAVE_CONFIG_H
15264
15265 ac_libobjs=
15266 ac_ltlibobjs=
15267 U=
15268 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15269   # 1. Remove the extension, and $U if already installed.
15270   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15271   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15272   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15273   #    will be set to the directory where LIBOBJS objects are built.
15274   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15275   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15276 done
15277 LIBOBJS=$ac_libobjs
15278
15279 LTLIBOBJS=$ac_ltlibobjs
15280
15281
15282
15283 : "${CONFIG_STATUS=./config.status}"
15284 ac_write_fail=0
15285 ac_clean_files_save=$ac_clean_files
15286 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15287 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15288 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15289 as_write_fail=0
15290 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15291 #! $SHELL
15292 # Generated by $as_me.
15293 # Run this file to recreate the current configuration.
15294 # Compiler output produced by configure, useful for debugging
15295 # configure, is in config.log if it exists.
15296
15297 debug=false
15298 ac_cs_recheck=false
15299 ac_cs_silent=false
15300
15301 SHELL=\${CONFIG_SHELL-$SHELL}
15302 export SHELL
15303 _ASEOF
15304 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15305 ## -------------------- ##
15306 ## M4sh Initialization. ##
15307 ## -------------------- ##
15308
15309 # Be more Bourne compatible
15310 DUALCASE=1; export DUALCASE # for MKS sh
15311 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15312   emulate sh
15313   NULLCMD=:
15314   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15315   # is contrary to our usage.  Disable this feature.
15316   alias -g '${1+"$@"}'='"$@"'
15317   setopt NO_GLOB_SUBST
15318 else
15319   case `(set -o) 2>/dev/null` in #(
15320   *posix*) :
15321     set -o posix ;; #(
15322   *) :
15323      ;;
15324 esac
15325 fi
15326
15327
15328 as_nl='
15329 '
15330 export as_nl
15331 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15332 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15333 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15334 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15335 # Prefer a ksh shell builtin over an external printf program on Solaris,
15336 # but without wasting forks for bash or zsh.
15337 if test -z "$BASH_VERSION$ZSH_VERSION" \
15338     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15339   as_echo='print -r --'
15340   as_echo_n='print -rn --'
15341 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15342   as_echo='printf %s\n'
15343   as_echo_n='printf %s'
15344 else
15345   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15346     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15347     as_echo_n='/usr/ucb/echo -n'
15348   else
15349     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15350     as_echo_n_body='eval
15351       arg=$1;
15352       case $arg in #(
15353       *"$as_nl"*)
15354         expr "X$arg" : "X\\(.*\\)$as_nl";
15355         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15356       esac;
15357       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15358     '
15359     export as_echo_n_body
15360     as_echo_n='sh -c $as_echo_n_body as_echo'
15361   fi
15362   export as_echo_body
15363   as_echo='sh -c $as_echo_body as_echo'
15364 fi
15365
15366 # The user is always right.
15367 if test "${PATH_SEPARATOR+set}" != set; then
15368   PATH_SEPARATOR=:
15369   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15370     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15371       PATH_SEPARATOR=';'
15372   }
15373 fi
15374
15375
15376 # IFS
15377 # We need space, tab and new line, in precisely that order.  Quoting is
15378 # there to prevent editors from complaining about space-tab.
15379 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15380 # splitting by setting IFS to empty value.)
15381 IFS=" ""        $as_nl"
15382
15383 # Find who we are.  Look in the path if we contain no directory separator.
15384 as_myself=
15385 case $0 in #((
15386   *[\\/]* ) as_myself=$0 ;;
15387   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15388 for as_dir in $PATH
15389 do
15390   IFS=$as_save_IFS
15391   test -z "$as_dir" && as_dir=.
15392     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15393   done
15394 IFS=$as_save_IFS
15395
15396      ;;
15397 esac
15398 # We did not find ourselves, most probably we were run as `sh COMMAND'
15399 # in which case we are not to be found in the path.
15400 if test "x$as_myself" = x; then
15401   as_myself=$0
15402 fi
15403 if test ! -f "$as_myself"; then
15404   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15405   exit 1
15406 fi
15407
15408 # Unset variables that we do not need and which cause bugs (e.g. in
15409 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15410 # suppresses any "Segmentation fault" message there.  '((' could
15411 # trigger a bug in pdksh 5.2.14.
15412 for as_var in BASH_ENV ENV MAIL MAILPATH
15413 do eval test x\${$as_var+set} = xset \
15414   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15415 done
15416 PS1='$ '
15417 PS2='> '
15418 PS4='+ '
15419
15420 # NLS nuisances.
15421 LC_ALL=C
15422 export LC_ALL
15423 LANGUAGE=C
15424 export LANGUAGE
15425
15426 # CDPATH.
15427 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15428
15429
15430 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15431 # ----------------------------------------
15432 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15433 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15434 # script with STATUS, using 1 if that was 0.
15435 as_fn_error ()
15436 {
15437   as_status=$1; test $as_status -eq 0 && as_status=1
15438   if test "$4"; then
15439     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15440     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15441   fi
15442   $as_echo "$as_me: error: $2" >&2
15443   as_fn_exit $as_status
15444 } # as_fn_error
15445
15446
15447 # as_fn_set_status STATUS
15448 # -----------------------
15449 # Set $? to STATUS, without forking.
15450 as_fn_set_status ()
15451 {
15452   return $1
15453 } # as_fn_set_status
15454
15455 # as_fn_exit STATUS
15456 # -----------------
15457 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15458 as_fn_exit ()
15459 {
15460   set +e
15461   as_fn_set_status $1
15462   exit $1
15463 } # as_fn_exit
15464
15465 # as_fn_unset VAR
15466 # ---------------
15467 # Portably unset VAR.
15468 as_fn_unset ()
15469 {
15470   { eval $1=; unset $1;}
15471 }
15472 as_unset=as_fn_unset
15473 # as_fn_append VAR VALUE
15474 # ----------------------
15475 # Append the text in VALUE to the end of the definition contained in VAR. Take
15476 # advantage of any shell optimizations that allow amortized linear growth over
15477 # repeated appends, instead of the typical quadratic growth present in naive
15478 # implementations.
15479 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15480   eval 'as_fn_append ()
15481   {
15482     eval $1+=\$2
15483   }'
15484 else
15485   as_fn_append ()
15486   {
15487     eval $1=\$$1\$2
15488   }
15489 fi # as_fn_append
15490
15491 # as_fn_arith ARG...
15492 # ------------------
15493 # Perform arithmetic evaluation on the ARGs, and store the result in the
15494 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15495 # must be portable across $(()) and expr.
15496 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15497   eval 'as_fn_arith ()
15498   {
15499     as_val=$(( $* ))
15500   }'
15501 else
15502   as_fn_arith ()
15503   {
15504     as_val=`expr "$@" || test $? -eq 1`
15505   }
15506 fi # as_fn_arith
15507
15508
15509 if expr a : '\(a\)' >/dev/null 2>&1 &&
15510    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15511   as_expr=expr
15512 else
15513   as_expr=false
15514 fi
15515
15516 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15517   as_basename=basename
15518 else
15519   as_basename=false
15520 fi
15521
15522 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15523   as_dirname=dirname
15524 else
15525   as_dirname=false
15526 fi
15527
15528 as_me=`$as_basename -- "$0" ||
15529 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15530          X"$0" : 'X\(//\)$' \| \
15531          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15532 $as_echo X/"$0" |
15533     sed '/^.*\/\([^/][^/]*\)\/*$/{
15534             s//\1/
15535             q
15536           }
15537           /^X\/\(\/\/\)$/{
15538             s//\1/
15539             q
15540           }
15541           /^X\/\(\/\).*/{
15542             s//\1/
15543             q
15544           }
15545           s/.*/./; q'`
15546
15547 # Avoid depending upon Character Ranges.
15548 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15549 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15550 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15551 as_cr_digits='0123456789'
15552 as_cr_alnum=$as_cr_Letters$as_cr_digits
15553
15554 ECHO_C= ECHO_N= ECHO_T=
15555 case `echo -n x` in #(((((
15556 -n*)
15557   case `echo 'xy\c'` in
15558   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15559   xy)  ECHO_C='\c';;
15560   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15561        ECHO_T=' ';;
15562   esac;;
15563 *)
15564   ECHO_N='-n';;
15565 esac
15566
15567 rm -f conf$$ conf$$.exe conf$$.file
15568 if test -d conf$$.dir; then
15569   rm -f conf$$.dir/conf$$.file
15570 else
15571   rm -f conf$$.dir
15572   mkdir conf$$.dir 2>/dev/null
15573 fi
15574 if (echo >conf$$.file) 2>/dev/null; then
15575   if ln -s conf$$.file conf$$ 2>/dev/null; then
15576     as_ln_s='ln -s'
15577     # ... but there are two gotchas:
15578     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15579     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15580     # In both cases, we have to default to `cp -pR'.
15581     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15582       as_ln_s='cp -pR'
15583   elif ln conf$$.file conf$$ 2>/dev/null; then
15584     as_ln_s=ln
15585   else
15586     as_ln_s='cp -pR'
15587   fi
15588 else
15589   as_ln_s='cp -pR'
15590 fi
15591 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15592 rmdir conf$$.dir 2>/dev/null
15593
15594
15595 # as_fn_mkdir_p
15596 # -------------
15597 # Create "$as_dir" as a directory, including parents if necessary.
15598 as_fn_mkdir_p ()
15599 {
15600
15601   case $as_dir in #(
15602   -*) as_dir=./$as_dir;;
15603   esac
15604   test -d "$as_dir" || eval $as_mkdir_p || {
15605     as_dirs=
15606     while :; do
15607       case $as_dir in #(
15608       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15609       *) as_qdir=$as_dir;;
15610       esac
15611       as_dirs="'$as_qdir' $as_dirs"
15612       as_dir=`$as_dirname -- "$as_dir" ||
15613 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15614          X"$as_dir" : 'X\(//\)[^/]' \| \
15615          X"$as_dir" : 'X\(//\)$' \| \
15616          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15617 $as_echo X"$as_dir" |
15618     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15619             s//\1/
15620             q
15621           }
15622           /^X\(\/\/\)[^/].*/{
15623             s//\1/
15624             q
15625           }
15626           /^X\(\/\/\)$/{
15627             s//\1/
15628             q
15629           }
15630           /^X\(\/\).*/{
15631             s//\1/
15632             q
15633           }
15634           s/.*/./; q'`
15635       test -d "$as_dir" && break
15636     done
15637     test -z "$as_dirs" || eval "mkdir $as_dirs"
15638   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15639
15640
15641 } # as_fn_mkdir_p
15642 if mkdir -p . 2>/dev/null; then
15643   as_mkdir_p='mkdir -p "$as_dir"'
15644 else
15645   test -d ./-p && rmdir ./-p
15646   as_mkdir_p=false
15647 fi
15648
15649
15650 # as_fn_executable_p FILE
15651 # -----------------------
15652 # Test if FILE is an executable regular file.
15653 as_fn_executable_p ()
15654 {
15655   test -f "$1" && test -x "$1"
15656 } # as_fn_executable_p
15657 as_test_x='test -x'
15658 as_executable_p=as_fn_executable_p
15659
15660 # Sed expression to map a string onto a valid CPP name.
15661 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15662
15663 # Sed expression to map a string onto a valid variable name.
15664 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15665
15666
15667 exec 6>&1
15668 ## ----------------------------------- ##
15669 ## Main body of $CONFIG_STATUS script. ##
15670 ## ----------------------------------- ##
15671 _ASEOF
15672 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15673
15674 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15675 # Save the log message, to keep $0 and so on meaningful, and to
15676 # report actual input values of CONFIG_FILES etc. instead of their
15677 # values after options handling.
15678 ac_log="
15679 This file was extended by $as_me, which was
15680 generated by GNU Autoconf 2.69.  Invocation command line was
15681
15682   CONFIG_FILES    = $CONFIG_FILES
15683   CONFIG_HEADERS  = $CONFIG_HEADERS
15684   CONFIG_LINKS    = $CONFIG_LINKS
15685   CONFIG_COMMANDS = $CONFIG_COMMANDS
15686   $ $0 $@
15687
15688 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15689 "
15690
15691 _ACEOF
15692
15693 case $ac_config_files in *"
15694 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15695 esac
15696
15697 case $ac_config_headers in *"
15698 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15699 esac
15700
15701
15702 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15703 # Files that config.status was made for.
15704 config_files="$ac_config_files"
15705 config_headers="$ac_config_headers"
15706 config_commands="$ac_config_commands"
15707
15708 _ACEOF
15709
15710 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15711 ac_cs_usage="\
15712 \`$as_me' instantiates files and other configuration actions
15713 from templates according to the current configuration.  Unless the files
15714 and actions are specified as TAGs, all are instantiated by default.
15715
15716 Usage: $0 [OPTION]... [TAG]...
15717
15718   -h, --help       print this help, then exit
15719   -V, --version    print version number and configuration settings, then exit
15720       --config     print configuration, then exit
15721   -q, --quiet, --silent
15722                    do not print progress messages
15723   -d, --debug      don't remove temporary files
15724       --recheck    update $as_me by reconfiguring in the same conditions
15725       --file=FILE[:TEMPLATE]
15726                    instantiate the configuration file FILE
15727       --header=FILE[:TEMPLATE]
15728                    instantiate the configuration header FILE
15729
15730 Configuration files:
15731 $config_files
15732
15733 Configuration headers:
15734 $config_headers
15735
15736 Configuration commands:
15737 $config_commands
15738
15739 Report bugs to the package provider."
15740
15741 _ACEOF
15742 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15743 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15744 ac_cs_version="\\
15745 config.status
15746 configured by $0, generated by GNU Autoconf 2.69,
15747   with options \\"\$ac_cs_config\\"
15748
15749 Copyright (C) 2012 Free Software Foundation, Inc.
15750 This config.status script is free software; the Free Software Foundation
15751 gives unlimited permission to copy, distribute and modify it."
15752
15753 ac_pwd='$ac_pwd'
15754 srcdir='$srcdir'
15755 INSTALL='$INSTALL'
15756 test -n "\$AWK" || AWK=awk
15757 _ACEOF
15758
15759 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15760 # The default lists apply if the user does not specify any file.
15761 ac_need_defaults=:
15762 while test $# != 0
15763 do
15764   case $1 in
15765   --*=?*)
15766     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15767     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15768     ac_shift=:
15769     ;;
15770   --*=)
15771     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15772     ac_optarg=
15773     ac_shift=:
15774     ;;
15775   *)
15776     ac_option=$1
15777     ac_optarg=$2
15778     ac_shift=shift
15779     ;;
15780   esac
15781
15782   case $ac_option in
15783   # Handling of the options.
15784   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15785     ac_cs_recheck=: ;;
15786   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15787     $as_echo "$ac_cs_version"; exit ;;
15788   --config | --confi | --conf | --con | --co | --c )
15789     $as_echo "$ac_cs_config"; exit ;;
15790   --debug | --debu | --deb | --de | --d | -d )
15791     debug=: ;;
15792   --file | --fil | --fi | --f )
15793     $ac_shift
15794     case $ac_optarg in
15795     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15796     '') as_fn_error $? "missing file argument" ;;
15797     esac
15798     as_fn_append CONFIG_FILES " '$ac_optarg'"
15799     ac_need_defaults=false;;
15800   --header | --heade | --head | --hea )
15801     $ac_shift
15802     case $ac_optarg in
15803     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15804     esac
15805     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15806     ac_need_defaults=false;;
15807   --he | --h)
15808     # Conflict between --help and --header
15809     as_fn_error $? "ambiguous option: \`$1'
15810 Try \`$0 --help' for more information.";;
15811   --help | --hel | -h )
15812     $as_echo "$ac_cs_usage"; exit ;;
15813   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15814   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15815     ac_cs_silent=: ;;
15816
15817   # This is an error.
15818   -*) as_fn_error $? "unrecognized option: \`$1'
15819 Try \`$0 --help' for more information." ;;
15820
15821   *) as_fn_append ac_config_targets " $1"
15822      ac_need_defaults=false ;;
15823
15824   esac
15825   shift
15826 done
15827
15828 ac_configure_extra_args=
15829
15830 if $ac_cs_silent; then
15831   exec 6>/dev/null
15832   ac_configure_extra_args="$ac_configure_extra_args --silent"
15833 fi
15834
15835 _ACEOF
15836 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15837 if \$ac_cs_recheck; then
15838   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15839   shift
15840   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15841   CONFIG_SHELL='$SHELL'
15842   export CONFIG_SHELL
15843   exec "\$@"
15844 fi
15845
15846 _ACEOF
15847 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15848 exec 5>>config.log
15849 {
15850   echo
15851   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15852 ## Running $as_me. ##
15853 _ASBOX
15854   $as_echo "$ac_log"
15855 } >&5
15856
15857 _ACEOF
15858 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15859 #
15860 # INIT-COMMANDS
15861 #
15862
15863
15864 _ACEOF
15865
15866 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15867
15868 # Handling of arguments.
15869 for ac_config_target in $ac_config_targets
15870 do
15871   case $ac_config_target in
15872     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
15873     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
15874     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15875     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
15876     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
15877     "driver/xscreensaver.pam") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.pam" ;;
15878     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
15879     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
15880     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
15881     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
15882
15883   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15884   esac
15885 done
15886
15887
15888 # If the user did not use the arguments to specify the items to instantiate,
15889 # then the envvar interface is used.  Set only those that are not.
15890 # We use the long form for the default assignment because of an extremely
15891 # bizarre bug on SunOS 4.1.3.
15892 if $ac_need_defaults; then
15893   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15894   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15895   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15896 fi
15897
15898 # Have a temporary directory for convenience.  Make it in the build tree
15899 # simply because there is no reason against having it here, and in addition,
15900 # creating and moving files from /tmp can sometimes cause problems.
15901 # Hook for its removal unless debugging.
15902 # Note that there is a small window in which the directory will not be cleaned:
15903 # after its creation but before its name has been assigned to `$tmp'.
15904 $debug ||
15905 {
15906   tmp= ac_tmp=
15907   trap 'exit_status=$?
15908   : "${ac_tmp:=$tmp}"
15909   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15910 ' 0
15911   trap 'as_fn_exit 1' 1 2 13 15
15912 }
15913 # Create a (secure) tmp directory for tmp files.
15914
15915 {
15916   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15917   test -d "$tmp"
15918 }  ||
15919 {
15920   tmp=./conf$$-$RANDOM
15921   (umask 077 && mkdir "$tmp")
15922 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15923 ac_tmp=$tmp
15924
15925 # Set up the scripts for CONFIG_FILES section.
15926 # No need to generate them if there are no CONFIG_FILES.
15927 # This happens for instance with `./config.status config.h'.
15928 if test -n "$CONFIG_FILES"; then
15929
15930
15931 ac_cr=`echo X | tr X '\015'`
15932 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15933 # But we know of no other shell where ac_cr would be empty at this
15934 # point, so we can use a bashism as a fallback.
15935 if test "x$ac_cr" = x; then
15936   eval ac_cr=\$\'\\r\'
15937 fi
15938 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15939 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15940   ac_cs_awk_cr='\\r'
15941 else
15942   ac_cs_awk_cr=$ac_cr
15943 fi
15944
15945 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15946 _ACEOF
15947
15948
15949 {
15950   echo "cat >conf$$subs.awk <<_ACEOF" &&
15951   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15952   echo "_ACEOF"
15953 } >conf$$subs.sh ||
15954   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15955 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15956 ac_delim='%!_!# '
15957 for ac_last_try in false false false false false :; do
15958   . ./conf$$subs.sh ||
15959     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15960
15961   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15962   if test $ac_delim_n = $ac_delim_num; then
15963     break
15964   elif $ac_last_try; then
15965     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15966   else
15967     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15968   fi
15969 done
15970 rm -f conf$$subs.sh
15971
15972 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15973 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15974 _ACEOF
15975 sed -n '
15976 h
15977 s/^/S["/; s/!.*/"]=/
15978 p
15979 g
15980 s/^[^!]*!//
15981 :repl
15982 t repl
15983 s/'"$ac_delim"'$//
15984 t delim
15985 :nl
15986 h
15987 s/\(.\{148\}\)..*/\1/
15988 t more1
15989 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15990 p
15991 n
15992 b repl
15993 :more1
15994 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15995 p
15996 g
15997 s/.\{148\}//
15998 t nl
15999 :delim
16000 h
16001 s/\(.\{148\}\)..*/\1/
16002 t more2
16003 s/["\\]/\\&/g; s/^/"/; s/$/"/
16004 p
16005 b
16006 :more2
16007 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16008 p
16009 g
16010 s/.\{148\}//
16011 t delim
16012 ' <conf$$subs.awk | sed '
16013 /^[^""]/{
16014   N
16015   s/\n//
16016 }
16017 ' >>$CONFIG_STATUS || ac_write_fail=1
16018 rm -f conf$$subs.awk
16019 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16020 _ACAWK
16021 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16022   for (key in S) S_is_set[key] = 1
16023   FS = "\a"
16024
16025 }
16026 {
16027   line = $ 0
16028   nfields = split(line, field, "@")
16029   substed = 0
16030   len = length(field[1])
16031   for (i = 2; i < nfields; i++) {
16032     key = field[i]
16033     keylen = length(key)
16034     if (S_is_set[key]) {
16035       value = S[key]
16036       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16037       len += length(value) + length(field[++i])
16038       substed = 1
16039     } else
16040       len += 1 + keylen
16041   }
16042
16043   print line
16044 }
16045
16046 _ACAWK
16047 _ACEOF
16048 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16049 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16050   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16051 else
16052   cat
16053 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16054   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16055 _ACEOF
16056
16057 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16058 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16059 # trailing colons and then remove the whole line if VPATH becomes empty
16060 # (actually we leave an empty line to preserve line numbers).
16061 if test "x$srcdir" = x.; then
16062   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16063 h
16064 s///
16065 s/^/:/
16066 s/[      ]*$/:/
16067 s/:\$(srcdir):/:/g
16068 s/:\${srcdir}:/:/g
16069 s/:@srcdir@:/:/g
16070 s/^:*//
16071 s/:*$//
16072 x
16073 s/\(=[   ]*\).*/\1/
16074 G
16075 s/\n//
16076 s/^[^=]*=[       ]*$//
16077 }'
16078 fi
16079
16080 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16081 fi # test -n "$CONFIG_FILES"
16082
16083 # Set up the scripts for CONFIG_HEADERS section.
16084 # No need to generate them if there are no CONFIG_HEADERS.
16085 # This happens for instance with `./config.status Makefile'.
16086 if test -n "$CONFIG_HEADERS"; then
16087 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16088 BEGIN {
16089 _ACEOF
16090
16091 # Transform confdefs.h into an awk script `defines.awk', embedded as
16092 # here-document in config.status, that substitutes the proper values into
16093 # config.h.in to produce config.h.
16094
16095 # Create a delimiter string that does not exist in confdefs.h, to ease
16096 # handling of long lines.
16097 ac_delim='%!_!# '
16098 for ac_last_try in false false :; do
16099   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16100   if test -z "$ac_tt"; then
16101     break
16102   elif $ac_last_try; then
16103     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16104   else
16105     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16106   fi
16107 done
16108
16109 # For the awk script, D is an array of macro values keyed by name,
16110 # likewise P contains macro parameters if any.  Preserve backslash
16111 # newline sequences.
16112
16113 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16114 sed -n '
16115 s/.\{148\}/&'"$ac_delim"'/g
16116 t rset
16117 :rset
16118 s/^[     ]*#[    ]*define[       ][      ]*/ /
16119 t def
16120 d
16121 :def
16122 s/\\$//
16123 t bsnl
16124 s/["\\]/\\&/g
16125 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16126 D["\1"]=" \3"/p
16127 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16128 d
16129 :bsnl
16130 s/["\\]/\\&/g
16131 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16132 D["\1"]=" \3\\\\\\n"\\/p
16133 t cont
16134 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16135 t cont
16136 d
16137 :cont
16138 n
16139 s/.\{148\}/&'"$ac_delim"'/g
16140 t clear
16141 :clear
16142 s/\\$//
16143 t bsnlc
16144 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16145 d
16146 :bsnlc
16147 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16148 b cont
16149 ' <confdefs.h | sed '
16150 s/'"$ac_delim"'/"\\\
16151 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16152
16153 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16154   for (key in D) D_is_set[key] = 1
16155   FS = "\a"
16156 }
16157 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16158   line = \$ 0
16159   split(line, arg, " ")
16160   if (arg[1] == "#") {
16161     defundef = arg[2]
16162     mac1 = arg[3]
16163   } else {
16164     defundef = substr(arg[1], 2)
16165     mac1 = arg[2]
16166   }
16167   split(mac1, mac2, "(") #)
16168   macro = mac2[1]
16169   prefix = substr(line, 1, index(line, defundef) - 1)
16170   if (D_is_set[macro]) {
16171     # Preserve the white space surrounding the "#".
16172     print prefix "define", macro P[macro] D[macro]
16173     next
16174   } else {
16175     # Replace #undef with comments.  This is necessary, for example,
16176     # in the case of _POSIX_SOURCE, which is predefined and required
16177     # on some systems where configure will not decide to define it.
16178     if (defundef == "undef") {
16179       print "/*", prefix defundef, macro, "*/"
16180       next
16181     }
16182   }
16183 }
16184 { print }
16185 _ACAWK
16186 _ACEOF
16187 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16188   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16189 fi # test -n "$CONFIG_HEADERS"
16190
16191
16192 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
16193 shift
16194 for ac_tag
16195 do
16196   case $ac_tag in
16197   :[FHLC]) ac_mode=$ac_tag; continue;;
16198   esac
16199   case $ac_mode$ac_tag in
16200   :[FHL]*:*);;
16201   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16202   :[FH]-) ac_tag=-:-;;
16203   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16204   esac
16205   ac_save_IFS=$IFS
16206   IFS=:
16207   set x $ac_tag
16208   IFS=$ac_save_IFS
16209   shift
16210   ac_file=$1
16211   shift
16212
16213   case $ac_mode in
16214   :L) ac_source=$1;;
16215   :[FH])
16216     ac_file_inputs=
16217     for ac_f
16218     do
16219       case $ac_f in
16220       -) ac_f="$ac_tmp/stdin";;
16221       *) # Look for the file first in the build tree, then in the source tree
16222          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16223          # because $ac_f cannot contain `:'.
16224          test -f "$ac_f" ||
16225            case $ac_f in
16226            [\\/$]*) false;;
16227            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16228            esac ||
16229            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16230       esac
16231       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16232       as_fn_append ac_file_inputs " '$ac_f'"
16233     done
16234
16235     # Let's still pretend it is `configure' which instantiates (i.e., don't
16236     # use $as_me), people would be surprised to read:
16237     #    /* config.h.  Generated by config.status.  */
16238     configure_input='Generated from '`
16239           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16240         `' by configure.'
16241     if test x"$ac_file" != x-; then
16242       configure_input="$ac_file.  $configure_input"
16243       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16244 $as_echo "$as_me: creating $ac_file" >&6;}
16245     fi
16246     # Neutralize special characters interpreted by sed in replacement strings.
16247     case $configure_input in #(
16248     *\&* | *\|* | *\\* )
16249        ac_sed_conf_input=`$as_echo "$configure_input" |
16250        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16251     *) ac_sed_conf_input=$configure_input;;
16252     esac
16253
16254     case $ac_tag in
16255     *:-:* | *:-) cat >"$ac_tmp/stdin" \
16256       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16257     esac
16258     ;;
16259   esac
16260
16261   ac_dir=`$as_dirname -- "$ac_file" ||
16262 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16263          X"$ac_file" : 'X\(//\)[^/]' \| \
16264          X"$ac_file" : 'X\(//\)$' \| \
16265          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16266 $as_echo X"$ac_file" |
16267     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16268             s//\1/
16269             q
16270           }
16271           /^X\(\/\/\)[^/].*/{
16272             s//\1/
16273             q
16274           }
16275           /^X\(\/\/\)$/{
16276             s//\1/
16277             q
16278           }
16279           /^X\(\/\).*/{
16280             s//\1/
16281             q
16282           }
16283           s/.*/./; q'`
16284   as_dir="$ac_dir"; as_fn_mkdir_p
16285   ac_builddir=.
16286
16287 case "$ac_dir" in
16288 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16289 *)
16290   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16291   # A ".." for each directory in $ac_dir_suffix.
16292   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16293   case $ac_top_builddir_sub in
16294   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16295   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16296   esac ;;
16297 esac
16298 ac_abs_top_builddir=$ac_pwd
16299 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16300 # for backward compatibility:
16301 ac_top_builddir=$ac_top_build_prefix
16302
16303 case $srcdir in
16304   .)  # We are building in place.
16305     ac_srcdir=.
16306     ac_top_srcdir=$ac_top_builddir_sub
16307     ac_abs_top_srcdir=$ac_pwd ;;
16308   [\\/]* | ?:[\\/]* )  # Absolute name.
16309     ac_srcdir=$srcdir$ac_dir_suffix;
16310     ac_top_srcdir=$srcdir
16311     ac_abs_top_srcdir=$srcdir ;;
16312   *) # Relative name.
16313     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16314     ac_top_srcdir=$ac_top_build_prefix$srcdir
16315     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16316 esac
16317 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16318
16319
16320   case $ac_mode in
16321   :F)
16322   #
16323   # CONFIG_FILE
16324   #
16325
16326   case $INSTALL in
16327   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16328   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16329   esac
16330 _ACEOF
16331
16332 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16333 # If the template does not know about datarootdir, expand it.
16334 # FIXME: This hack should be removed a few years after 2.60.
16335 ac_datarootdir_hack=; ac_datarootdir_seen=
16336 ac_sed_dataroot='
16337 /datarootdir/ {
16338   p
16339   q
16340 }
16341 /@datadir@/p
16342 /@docdir@/p
16343 /@infodir@/p
16344 /@localedir@/p
16345 /@mandir@/p'
16346 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16347 *datarootdir*) ac_datarootdir_seen=yes;;
16348 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16349   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16350 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16351 _ACEOF
16352 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16353   ac_datarootdir_hack='
16354   s&@datadir@&$datadir&g
16355   s&@docdir@&$docdir&g
16356   s&@infodir@&$infodir&g
16357   s&@localedir@&$localedir&g
16358   s&@mandir@&$mandir&g
16359   s&\\\${datarootdir}&$datarootdir&g' ;;
16360 esac
16361 _ACEOF
16362
16363 # Neutralize VPATH when `$srcdir' = `.'.
16364 # Shell code in configure.ac might set extrasub.
16365 # FIXME: do we really want to maintain this feature?
16366 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16367 ac_sed_extra="$ac_vpsub
16368 $extrasub
16369 _ACEOF
16370 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16371 :t
16372 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16373 s|@configure_input@|$ac_sed_conf_input|;t t
16374 s&@top_builddir@&$ac_top_builddir_sub&;t t
16375 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16376 s&@srcdir@&$ac_srcdir&;t t
16377 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16378 s&@top_srcdir@&$ac_top_srcdir&;t t
16379 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16380 s&@builddir@&$ac_builddir&;t t
16381 s&@abs_builddir@&$ac_abs_builddir&;t t
16382 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16383 s&@INSTALL@&$ac_INSTALL&;t t
16384 $ac_datarootdir_hack
16385 "
16386 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16387   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16388
16389 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16390   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16391   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16392       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16393   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16394 which seems to be undefined.  Please make sure it is defined" >&5
16395 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16396 which seems to be undefined.  Please make sure it is defined" >&2;}
16397
16398   rm -f "$ac_tmp/stdin"
16399   case $ac_file in
16400   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16401   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16402   esac \
16403   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16404  ;;
16405   :H)
16406   #
16407   # CONFIG_HEADER
16408   #
16409   if test x"$ac_file" != x-; then
16410     {
16411       $as_echo "/* $configure_input  */" \
16412       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16413     } >"$ac_tmp/config.h" \
16414       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16415     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16416       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16417 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16418     else
16419       rm -f "$ac_file"
16420       mv "$ac_tmp/config.h" "$ac_file" \
16421         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16422     fi
16423   else
16424     $as_echo "/* $configure_input  */" \
16425       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16426       || as_fn_error $? "could not create -" "$LINENO" 5
16427   fi
16428  ;;
16429
16430   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16431 $as_echo "$as_me: executing $ac_file commands" >&6;}
16432  ;;
16433   esac
16434
16435
16436   case $ac_file$ac_mode in
16437     "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
16438         rm -f po/stamp-it po/stamp-it.tmp
16439         > po/stamp-it.tmp
16440         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
16441         mv po/stamp-it.tmp po/stamp-it
16442       esac ;;
16443
16444   esac
16445 done # for ac_tag
16446
16447
16448 as_fn_exit 0
16449 _ACEOF
16450 ac_clean_files=$ac_clean_files_save
16451
16452 test $ac_write_fail = 0 ||
16453   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16454
16455
16456 # configure is writing to config.log, and then calls config.status.
16457 # config.status does its own redirection, appending to config.log.
16458 # Unfortunately, on DOS this fails, as config.log is still kept open
16459 # by configure, so config.status won't be able to write to it; its
16460 # output is simply discarded.  So we exec the FD to /dev/null,
16461 # effectively closing config.log, so it can be properly (re)opened and
16462 # appended to by config.status.  When coming back to configure, we
16463 # need to make the FD available again.
16464 if test "$no_create" != yes; then
16465   ac_cs_success=:
16466   ac_config_status_args=
16467   test "$silent" = yes &&
16468     ac_config_status_args="$ac_config_status_args --quiet"
16469   exec 5>/dev/null
16470   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16471   exec 5>>config.log
16472   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16473   # would make configure fail if this is the last instruction.
16474   $ac_cs_success || as_fn_exit 1
16475 fi
16476 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16477   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16478 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16479 fi
16480
16481
16482 ###############################################################################
16483 #
16484 #       Print some warnings at the end.
16485 #
16486 ###############################################################################
16487
16488 warn_prefix_1="    Warning:"
16489 warn_prefix_2="       Note:"
16490 warn_prefix="$warn_prefix_1"
16491
16492 warning=no
16493 warnsep='    #################################################################'
16494
16495 warnpre() {
16496   if test "$warning" = no ; then
16497     echo '' ; echo "$warnsep" ; echo ''
16498     warning=yes
16499   fi
16500 }
16501
16502 warn() {
16503   warnpre
16504   if test "$warning" = long ; then echo '' ; fi
16505   warning=yes
16506   rest="$@"
16507   echo "$warn_prefix $rest"
16508 }
16509
16510 warnL() {
16511   was=$warning
16512   warnpre
16513   warning=yes
16514   if test "$was" != no ; then echo '' ; fi
16515   rest="$@"
16516   echo "$warn_prefix $rest"
16517 }
16518
16519 warn2() {
16520   rest="$@"
16521   echo "             $rest"
16522   warning=long
16523 }
16524
16525 note() {
16526   warn_prefix="$warn_prefix_2"
16527   warn $@
16528   warn_prefix="$warn_prefix_1"
16529 }
16530
16531 noteL() {
16532   warn_prefix="$warn_prefix_2"
16533   warnL $@
16534   warn_prefix="$warn_prefix_1"
16535 }
16536
16537
16538 # ac_prog_cc_no_pthread normally only happens on AIX, because according
16539 # to AX_PTHREAD, AIX needs CC=xlc_r or CC=cc_r to do threads.
16540 # If CC is specified, it takes precedence over --with-pthread.
16541 if test "$ac_prog_cc_no_pthread" ; then
16542   warnL "You requested $ac_original_cc for the C compiler, but it doesn't"
16543   warn2 "support POSIX threads."
16544   echo ""
16545   warn2 "If you have multiple CPU cores, try CC=$PTHREAD_CC."
16546 elif test "$with_pthread_req" = yes -a "$have_pthread" = no ; then
16547   warn 'POSIX threads were requested, but were not found.'
16548 fi
16549
16550 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
16551   warn 'The SGI saver extension was requested, but was not found.'
16552 fi
16553
16554 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
16555   warn 'The XIdle extension was requested, but was not found.'
16556 fi
16557
16558 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
16559   warn 'The XSHM extension was requested, but was not found.'
16560 fi
16561
16562 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
16563   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
16564 fi
16565
16566 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
16567   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
16568 fi
16569
16570 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
16571   warn 'The DPMS extension was requested, but was not found.'
16572 fi
16573
16574 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
16575   warn 'The Xinerama extension was requested, but was not found.'
16576 fi
16577
16578 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
16579   warn 'The XF86VMODE extension was requested, but was not found.'
16580 fi
16581
16582 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
16583   warn 'The RANDR extension was requested, but was not found.'
16584 fi
16585
16586 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
16587   warn "Checking of /proc/interrupts was requested, but it's bogus."
16588 fi
16589
16590 if test "$pkg_config" = false ; then
16591   warnL 'The "pkg-config" program was not found.  Without that,'
16592   warn2 "detection of the various GTK libraries won't work."
16593 else
16594   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
16595   if test "x$pkgerr" != "x" ; then
16596     warnL 'The "pkg-config" program produces errors.  This often causes'
16597     warn2 "detection of the various GTK libraries to malfunction."
16598     warn2 "The errors are:"
16599     echo ''
16600     echo "$pkgerr" | sed 's/^/             > /g'
16601   fi
16602 fi
16603
16604 if test "$gtk_halfassed" != no ; then
16605   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
16606   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
16607   warn2 "Perhaps some of the development packages are not installed?"
16608   if test "$have_gtk" = yes ; then
16609     v="$ac_gtk_version_string"
16610     warn2 "GTK $v is also installed, so it will be used instead."
16611     warn2 "Please read the above output and the \`config.log' file"
16612     warn2 "for more details."
16613   fi
16614 fi
16615
16616 motif_warn2() {
16617   warn2 'Though the Motif front-end to xscreensaver is still'
16618   warn2 'maintained, it is no longer being updated with new'
16619   warn2 'features: all new development on the xscreensaver-demo'
16620   warn2 'program is happening in the GTK version, and not in the'
16621   warn2 'Motif version.  It is recommended that you build against'
16622   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
16623 }
16624
16625 if test "$have_motif" = no -a "$have_gtk" = no; then
16626
16627   if test "$with_motif" = yes; then
16628     warnL "Neither the GTK nor Motif libraries were found; the"
16629     warn2 "\`xscreensaver-demo' program requires one of these."
16630     echo ''
16631     motif_warn2
16632   else
16633     warnL "The GTK libraries do not seem to be available; the"
16634     warn2 "\`xscreensaver-demo' program requires them."
16635 #   echo ''
16636 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
16637 #   warn2 "\`--with-motif' option) but that is NOT recommended."
16638 #   motif_warn2
16639   fi
16640
16641 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
16642   warnL "Use of Motif was requested, but it wasn't found;"
16643   warn2 "Gtk will be used instead."
16644
16645 elif test "$jurassic_gtk" = yes ; then
16646
16647   pref_gtk=2.0
16648
16649   v="$ac_gtk_version_string"
16650   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
16651     warnL "Use of Gtk was requested, but its version number is unknown;"
16652   elif test "$with_gtk_req" = yes ; then
16653     warnL "Use of Gtk was requested, but it is version $v;"
16654   else
16655     warnL "Gtk was found on this system, but it is version $v;"
16656   fi
16657
16658   warn2 "Gtk $pref_gtk or newer is required."
16659
16660 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
16661   warnL "Use of Gtk was requested, but it wasn't found."
16662 fi
16663
16664
16665 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
16666   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
16667   warn2 "headers were not found.  That can't be good.  Please"
16668   warn2 "install the GDK-Pixbuf development kit and re-configure."
16669 fi
16670
16671 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
16672
16673   preferred_lesstif=0.92
16674
16675   if test "$lesstif_version" = unknown; then
16676     warnL "Unable to determine the LessTif version number!"
16677     warn2 "Make sure you are using version $preferred_lesstif or newer."
16678     warn2 "See <http://www.lesstif.org/>."
16679
16680   elif test \! $lesstif_version -gt 82; then
16681     warnL "LessTif version $lesstif_version_string is being used."
16682     warn2 "LessTif versions 0.82 and earlier are too buggy to"
16683     warn2 "use with XScreenSaver; it is strongly recommended"
16684     warn2 "that you upgrade to at least version $preferred_lesstif!"
16685     warn2 "See <http://www.lesstif.org/>."
16686   fi
16687 fi
16688
16689
16690 if test "$have_motif" = yes -a "$have_gtk" = no ; then
16691   warn  'Motif is being used, and GTK is not.'
16692   echo  ''
16693   motif_warn2
16694 fi
16695
16696
16697 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
16698   warnL 'Use of XPM was requested, but it was not found.'
16699 fi
16700
16701 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
16702   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
16703 fi
16704
16705 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
16706    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
16707
16708   if test "$with_gdk_pixbuf_req" = yes ; then
16709     true
16710   elif test "$with_gdk_pixbuf_req" = no ; then
16711     warnL 'The GDK-Pixbuf library is not being used.'
16712   else
16713     warnL 'The GDK-Pixbuf library was not found.'
16714   fi
16715
16716   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
16717     true
16718   elif test "$with_xpm_req" = no ; then
16719     warnL 'The XPM library is not being used.'
16720   else
16721     warnL 'The XPM library was not found.'
16722   fi
16723
16724   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
16725     warn2 'The XPM library is being used instead.'
16726   fi
16727
16728   if test "$gdk_pixbuf_halfassed" = yes ; then
16729     echo ''
16730     warn2 'More specifically, we found the headers, but not the'
16731     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
16732     warn2 "system, or something else went wrong.  The \`config.log'"
16733     warn2 'file might contain some clues.'
16734   fi
16735
16736   echo ''
16737   warn2 'Some of the demos will not use images as much as they could.'
16738   warn2 'You should consider installing GDK-Pixbuf and re-running'
16739   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
16740   warn2 'provides support for more image formats.)'
16741 fi
16742
16743
16744 if test "$have_jpeg" = no ; then
16745   if test "$with_jpeg_req" = yes ; then
16746     warnL 'Use of libjpeg was requested, but it was not found.'
16747   elif test "$with_jpeg_req" = no ; then
16748     noteL 'The JPEG library is not being used.'
16749   else
16750     noteL 'The JPEG library was not found.'
16751   fi
16752
16753   if test "$jpeg_halfassed" = yes ; then
16754     echo ''
16755     warn2 'More specifically, we found the headers, but not the'
16756     warn2 'library; so either JPEG is half-installed on this'
16757     warn2 "system, or something else went wrong.  The \`config.log'"
16758     warn2 'file might contain some clues.'
16759     echo ''
16760   fi
16761
16762   if test "$have_gdk_pixbuf" = no ; then
16763     warn2 "This means that it won't be possible for the image-manipulating"
16764     warn2 "display modes to load files from disk; and it also means that"
16765     warn2 "the \`webcollage' program will be much slower."
16766   else
16767     warn2 "This means the \`webcollage' program will be much slower."
16768   fi
16769 fi
16770
16771
16772 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
16773   preferred_mesagl=3.4
16774   mgv="$ac_mesagl_version_string"
16775   pgl="$preferred_mesagl"
16776
16777   if test "$ac_mesagl_version" = unknown; then
16778     true
16779     # warnL "Unable to determine the MesaGL version number!"
16780     # warn2 "Make sure you are using version $preferred_mesagl or newer."
16781
16782   elif test \! "$ac_mesagl_version" -gt 2006; then
16783     warnL "MesaGL version number is $mgv --"
16784     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
16785     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
16786
16787   elif test \! "$ac_mesagl_version" -gt 3003; then
16788     warnL "MesaGL version number is $mgv --"
16789     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
16790     warn2 "that you upgrade to $pgl or newer."
16791   fi
16792 fi
16793
16794 if test "$have_gl" = no ; then
16795   if test "$with_gl_req" = yes ; then
16796     warnL 'Use of GL was requested, but it was not found.'
16797   elif test "$with_gl_req" = no ; then
16798     noteL 'The OpenGL 3D library is not being used.'
16799   else
16800     noteL 'The OpenGL 3D library was not found.'
16801   fi
16802
16803   if test "$gl_halfassed" = yes ; then
16804     echo ''
16805     warn2 'More specifically, we found the headers, but not the'
16806     warn2 'libraries; so either GL is half-installed on this'
16807     warn2 "system, or something else went wrong.  The \`config.log'"
16808     warn2 'file might contain some clues.'
16809   fi
16810
16811   echo ''
16812   warn2 'Those demos which use 3D will not be built or installed.'
16813   warn2 'You might want to consider installing OpenGL and'
16814   warn2 "re-running configure.  If your vendor doesn't ship"
16815   warn2 'their own implementation of OpenGL, you can get a free'
16816   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
16817   warn2 'info, see <http://www.opengl.org/>.'
16818
16819 fi
16820
16821
16822 if test "$have_gl" = yes -a "$have_gle" = no ; then
16823
16824  # nobody cares about this; don't print the warning unless it was
16825  # requested and not found, or halfway-found.
16826  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
16827
16828   if test "$with_gle_req" = yes ; then
16829     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
16830     warn2 'it was not found (though the OpenGL library was found, and'
16831     warn2 'is being used.)'
16832   elif test "$with_gle_req" = no ; then
16833     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
16834     warn2 'library is not.'
16835   else
16836     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
16837     warn2 'was not.'
16838   fi
16839
16840   if test "$gle_halfassed" = yes ; then
16841     echo ''
16842     warn2 'More specifically, we found the headers, but not the'
16843     warn2 'libraries; so either GLE is half-installed on this'
16844     warn2 "system, or something else went wrong.  The \`config.log'"
16845     warn2 'file might contain some clues.'
16846   fi
16847
16848   echo ''
16849   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
16850   warn2 'will not be built or installed.  You might want to consider'
16851   warn2 'installing GLE and re-running configure.  You can find the'
16852   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
16853   warn2 'OpenGL info, see <http://www.opengl.org/>.'
16854
16855  fi
16856 fi
16857
16858
16859 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
16860   warn 'Use of XReadDisplay was requested, but it was not found.'
16861 fi
16862
16863 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
16864   warn 'Use of Kerberos was requested, but it was not found.'
16865 fi
16866
16867 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
16868   warn 'Use of PAM was requested, but it was not found.'
16869 fi
16870
16871 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
16872   warn 'Use of shadow passwords was requested, but they were not found.'
16873 fi
16874
16875 if test "$ac_macosx" = yes ; then
16876   if test "$enable_locking" = yes ; then
16877     warn  "You have specified --enable-locking on MacOS X."
16878     warn2 "THIS DOES NOT WORK!  Don't do this!"
16879   fi
16880 fi
16881
16882
16883 # You are in a twisty maze of namespaces and syntaxes, all alike.
16884 # Fuck the skull of Unix.
16885 #
16886 bindir=`eval eval eval eval eval eval eval echo $bindir`
16887 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
16888 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
16889
16890 # canonicalize slashes.
16891 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
16892 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
16893 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
16894
16895
16896 # Sanity check the hackdir
16897 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
16898   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
16899     echo ""
16900     as_fn_error $? "\"--with-hackdir=${bindir}/${bad_choice}\" won't work.
16901                    There will be an executable installed with that name, so
16902                    that can't be the name of a directory as well.  Please
16903                    re-configure with a different directory name." "$LINENO" 5
16904   fi
16905 done
16906
16907
16908 do_dir_warning=no
16909
16910 # Now let's warn if there's a previous RPM version already installed.
16911 # But don't bother with this test if we are currently *building* an RPM.
16912
16913 if test -z "$RPM_PACKAGE_VERSION" ; then
16914
16915   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
16916
16917   # M4 sucks!!
16918
16919   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
16920         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
16921         head -1`
16922
16923
16924   if test \! -z "$rpmv" ; then
16925     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
16926     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
16927
16928     warning=no
16929     warnL "There is already an installed RPM of xscreensaver $rpmv"
16930     warn2 'on this system.  You might want to remove it ("rpm -ve")'
16931     warn2 'before running "make install" in this directory.'
16932     echo ""
16933     warn2 "Alternately, you could build this version of xscreensaver"
16934     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
16935     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
16936     warn2 "See the RPM documentation for more info."
16937     echo ""
16938
16939     if test "$rpmbdir" = "$rpmhdir" ; then
16940       warn2 "The RPM version was installed in $rpmbdir/."
16941       do_dir_warning=yes
16942     else
16943       warn2 "The RPM version was installed in $rpmbdir/,"
16944       warn2 "with demos in $rpmhdir/."
16945     fi
16946   fi
16947 fi
16948
16949 # Also warn if there's a Debian package installed.
16950 #
16951 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
16952 debv=''
16953 for dpkg in $debnames ; do
16954   if test -z "$debv"; then
16955     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
16956   fi
16957 done
16958
16959 if test \! -z "$debv" ; then
16960   debbdir=`dpkg -L $debnames 2>/dev/null | \
16961             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
16962   debhdir=`dpkg -L $debnames 2>/dev/null | \
16963             sed -n 's@^\(.*/\)popsquares$@\1@p'`
16964   if test -z "$debbdir" ; then debbdir='???'; fi
16965   if test -z "$debhdir" ; then debhdir='???'; fi
16966
16967   warning=no
16968   warnL "There is already an installed dpkg of xscreensaver"
16969   warn2 "version \"$debv\" on this system."
16970   echo ""
16971   warn2 "The dpkg was installed in $debbdir,"
16972   warn2 "with demos in $debhdir."
16973 fi
16974
16975
16976 if test "${bindir}" = "${HACKDIR}" ; then
16977   do_dir_warning=yes
16978 fi
16979
16980 if test "$do_dir_warning" = yes; then
16981   echo ""
16982   echo "$warnsep"
16983   echo ""
16984   echo '      When you run "make install", the "xscreensaver",'
16985   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
16986   echo "      will be installed in ${bindir}/."
16987   echo ""
16988   echo "      The various graphics demos (190+ different executables) will"
16989   echo "      be installed in ${HACKDIR}/."
16990   echo ""
16991   echo "      If you would prefer the demos to be installed elsewhere,"
16992   echo "      you should re-run configure with the --with-hackdir=DIR"
16993   echo "      option.  For more information, run \`./configure --help'."
16994   warning=yes
16995 fi
16996
16997 if test "$warning" != no; then
16998   echo '' ; echo "$warnsep" ; echo ''
16999 fi
17000
17001 if test "$do_dir_warning" = no; then
17002   if test "$warning" = no; then
17003     echo ''
17004   fi
17005   echo "User programs will be installed in ${bindir}/"
17006   echo "Screen savers will be installed in ${HACKDIR}/"
17007   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
17008   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
17009   echo ''
17010 fi