From http://www.jwz.org/xscreensaver/xscreensaver-5.24.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 INTLTOOL_PERL
716 INTLTOOL_UPDATE
717 INTLTOOL_MERGE
718 INTLTOOL_EXTRACT
719 INTLTOOL_CAVES_RULE
720 INTLTOOL_XML_RULE
721 INTLTOOL_UI_RULE
722 INTLTOOL_SOUNDLIST_RULE
723 INTLTOOL_SHEET_RULE
724 INTLTOOL_SERVER_RULE
725 INTLTOOL_PONG_RULE
726 INTLTOOL_OAF_RULE
727 INTLTOOL_KEYS_RULE
728 INTLTOOL_DIRECTORY_RULE
729 INTLTOOL_DESKTOP_RULE
730 X_EXTRA_LIBS
731 X_LIBS
732 X_PRE_LIBS
733 X_CFLAGS
734 XMKMF
735 PERL
736 EGREP
737 GREP
738 SET_MAKE
739 INSTALL_DATA
740 INSTALL_SCRIPT
741 INSTALL_PROGRAM
742 CPP
743 OBJEXT
744 EXEEXT
745 ac_ct_CC
746 CPPFLAGS
747 LDFLAGS
748 CFLAGS
749 CC
750 host_os
751 host_vendor
752 host_cpu
753 host
754 build_os
755 build_vendor
756 build_cpu
757 build
758 target_alias
759 host_alias
760 build_alias
761 LIBS
762 ECHO_T
763 ECHO_N
764 ECHO_C
765 DEFS
766 mandir
767 localedir
768 libdir
769 psdir
770 pdfdir
771 dvidir
772 htmldir
773 infodir
774 docdir
775 oldincludedir
776 includedir
777 localstatedir
778 sharedstatedir
779 sysconfdir
780 datadir
781 datarootdir
782 libexecdir
783 sbindir
784 bindir
785 program_transform_name
786 prefix
787 exec_prefix
788 PACKAGE_URL
789 PACKAGE_BUGREPORT
790 PACKAGE_STRING
791 PACKAGE_VERSION
792 PACKAGE_TARNAME
793 PACKAGE_NAME
794 PATH_SEPARATOR
795 SHELL'
796 ac_subst_files=''
797 ac_user_opts='
798 enable_option_checking
799 with_x_app_defaults
800 enable_largefile
801 with_x
802 with_hackdir
803 enable_subdir
804 with_configdir
805 with_dpms_ext
806 with_xinerama_ext
807 with_xinput_ext
808 with_xf86vmode_ext
809 with_xf86gamma_ext
810 with_randr_ext
811 with_proc_interrupts
812 enable_locking
813 enable_root_passwd
814 with_pam
815 with_pam_service_name
816 enable_pam_check_account_type
817 with_kerberos
818 with_shadow
819 with_passwd_helper
820 with_login_manager
821 with_gtk
822 with_motif
823 with_gl
824 with_gle
825 with_gles
826 with_pixbuf
827 with_xpm
828 with_jpeg
829 with_xshm_ext
830 with_xdbe_ext
831 with_readdisplay
832 with_image_directory
833 with_text_file
834 with_browser
835 with_setuid_hacks
836 '
837       ac_precious_vars='build_alias
838 host_alias
839 target_alias
840 CC
841 CFLAGS
842 LDFLAGS
843 LIBS
844 CPPFLAGS
845 CPP
846 XMKMF'
847
848
849 # Initialize some variables set by options.
850 ac_init_help=
851 ac_init_version=false
852 ac_unrecognized_opts=
853 ac_unrecognized_sep=
854 # The variables have the same names as the options, with
855 # dashes changed to underlines.
856 cache_file=/dev/null
857 exec_prefix=NONE
858 no_create=
859 no_recursion=
860 prefix=NONE
861 program_prefix=NONE
862 program_suffix=NONE
863 program_transform_name=s,x,x,
864 silent=
865 site=
866 srcdir=
867 verbose=
868 x_includes=NONE
869 x_libraries=NONE
870
871 # Installation directory options.
872 # These are left unexpanded so users can "make install exec_prefix=/foo"
873 # and all the variables that are supposed to be based on exec_prefix
874 # by default will actually change.
875 # Use braces instead of parens because sh, perl, etc. also accept them.
876 # (The list follows the same order as the GNU Coding Standards.)
877 bindir='${exec_prefix}/bin'
878 sbindir='${exec_prefix}/sbin'
879 libexecdir='${exec_prefix}/libexec'
880 datarootdir='${prefix}/share'
881 datadir='${datarootdir}'
882 sysconfdir='${prefix}/etc'
883 sharedstatedir='${prefix}/com'
884 localstatedir='${prefix}/var'
885 includedir='${prefix}/include'
886 oldincludedir='/usr/include'
887 docdir='${datarootdir}/doc/${PACKAGE}'
888 infodir='${datarootdir}/info'
889 htmldir='${docdir}'
890 dvidir='${docdir}'
891 pdfdir='${docdir}'
892 psdir='${docdir}'
893 libdir='${exec_prefix}/lib'
894 localedir='${datarootdir}/locale'
895 mandir='${datarootdir}/man'
896
897 ac_prev=
898 ac_dashdash=
899 for ac_option
900 do
901   # If the previous option needs an argument, assign it.
902   if test -n "$ac_prev"; then
903     eval $ac_prev=\$ac_option
904     ac_prev=
905     continue
906   fi
907
908   case $ac_option in
909   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
910   *=)   ac_optarg= ;;
911   *)    ac_optarg=yes ;;
912   esac
913
914   # Accept the important Cygnus configure options, so we can diagnose typos.
915
916   case $ac_dashdash$ac_option in
917   --)
918     ac_dashdash=yes ;;
919
920   -bindir | --bindir | --bindi | --bind | --bin | --bi)
921     ac_prev=bindir ;;
922   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
923     bindir=$ac_optarg ;;
924
925   -build | --build | --buil | --bui | --bu)
926     ac_prev=build_alias ;;
927   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
928     build_alias=$ac_optarg ;;
929
930   -cache-file | --cache-file | --cache-fil | --cache-fi \
931   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
932     ac_prev=cache_file ;;
933   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
934   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
935     cache_file=$ac_optarg ;;
936
937   --config-cache | -C)
938     cache_file=config.cache ;;
939
940   -datadir | --datadir | --datadi | --datad)
941     ac_prev=datadir ;;
942   -datadir=* | --datadir=* | --datadi=* | --datad=*)
943     datadir=$ac_optarg ;;
944
945   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
946   | --dataroo | --dataro | --datar)
947     ac_prev=datarootdir ;;
948   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
949   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
950     datarootdir=$ac_optarg ;;
951
952   -disable-* | --disable-*)
953     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
954     # Reject names that are not valid shell variable names.
955     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
956       as_fn_error $? "invalid feature name: $ac_useropt"
957     ac_useropt_orig=$ac_useropt
958     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
959     case $ac_user_opts in
960       *"
961 "enable_$ac_useropt"
962 "*) ;;
963       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
964          ac_unrecognized_sep=', ';;
965     esac
966     eval enable_$ac_useropt=no ;;
967
968   -docdir | --docdir | --docdi | --doc | --do)
969     ac_prev=docdir ;;
970   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
971     docdir=$ac_optarg ;;
972
973   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
974     ac_prev=dvidir ;;
975   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
976     dvidir=$ac_optarg ;;
977
978   -enable-* | --enable-*)
979     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
980     # Reject names that are not valid shell variable names.
981     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
982       as_fn_error $? "invalid feature name: $ac_useropt"
983     ac_useropt_orig=$ac_useropt
984     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
985     case $ac_user_opts in
986       *"
987 "enable_$ac_useropt"
988 "*) ;;
989       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
990          ac_unrecognized_sep=', ';;
991     esac
992     eval enable_$ac_useropt=\$ac_optarg ;;
993
994   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
995   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
996   | --exec | --exe | --ex)
997     ac_prev=exec_prefix ;;
998   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
999   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1000   | --exec=* | --exe=* | --ex=*)
1001     exec_prefix=$ac_optarg ;;
1002
1003   -gas | --gas | --ga | --g)
1004     # Obsolete; use --with-gas.
1005     with_gas=yes ;;
1006
1007   -help | --help | --hel | --he | -h)
1008     ac_init_help=long ;;
1009   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1010     ac_init_help=recursive ;;
1011   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1012     ac_init_help=short ;;
1013
1014   -host | --host | --hos | --ho)
1015     ac_prev=host_alias ;;
1016   -host=* | --host=* | --hos=* | --ho=*)
1017     host_alias=$ac_optarg ;;
1018
1019   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1020     ac_prev=htmldir ;;
1021   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1022   | --ht=*)
1023     htmldir=$ac_optarg ;;
1024
1025   -includedir | --includedir | --includedi | --included | --include \
1026   | --includ | --inclu | --incl | --inc)
1027     ac_prev=includedir ;;
1028   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1029   | --includ=* | --inclu=* | --incl=* | --inc=*)
1030     includedir=$ac_optarg ;;
1031
1032   -infodir | --infodir | --infodi | --infod | --info | --inf)
1033     ac_prev=infodir ;;
1034   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1035     infodir=$ac_optarg ;;
1036
1037   -libdir | --libdir | --libdi | --libd)
1038     ac_prev=libdir ;;
1039   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1040     libdir=$ac_optarg ;;
1041
1042   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1043   | --libexe | --libex | --libe)
1044     ac_prev=libexecdir ;;
1045   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1046   | --libexe=* | --libex=* | --libe=*)
1047     libexecdir=$ac_optarg ;;
1048
1049   -localedir | --localedir | --localedi | --localed | --locale)
1050     ac_prev=localedir ;;
1051   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1052     localedir=$ac_optarg ;;
1053
1054   -localstatedir | --localstatedir | --localstatedi | --localstated \
1055   | --localstate | --localstat | --localsta | --localst | --locals)
1056     ac_prev=localstatedir ;;
1057   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1058   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1059     localstatedir=$ac_optarg ;;
1060
1061   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1062     ac_prev=mandir ;;
1063   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1064     mandir=$ac_optarg ;;
1065
1066   -nfp | --nfp | --nf)
1067     # Obsolete; use --without-fp.
1068     with_fp=no ;;
1069
1070   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1071   | --no-cr | --no-c | -n)
1072     no_create=yes ;;
1073
1074   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1075   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1076     no_recursion=yes ;;
1077
1078   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1079   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1080   | --oldin | --oldi | --old | --ol | --o)
1081     ac_prev=oldincludedir ;;
1082   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1083   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1084   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1085     oldincludedir=$ac_optarg ;;
1086
1087   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1088     ac_prev=prefix ;;
1089   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1090     prefix=$ac_optarg ;;
1091
1092   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1093   | --program-pre | --program-pr | --program-p)
1094     ac_prev=program_prefix ;;
1095   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1096   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1097     program_prefix=$ac_optarg ;;
1098
1099   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1100   | --program-suf | --program-su | --program-s)
1101     ac_prev=program_suffix ;;
1102   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1103   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1104     program_suffix=$ac_optarg ;;
1105
1106   -program-transform-name | --program-transform-name \
1107   | --program-transform-nam | --program-transform-na \
1108   | --program-transform-n | --program-transform- \
1109   | --program-transform | --program-transfor \
1110   | --program-transfo | --program-transf \
1111   | --program-trans | --program-tran \
1112   | --progr-tra | --program-tr | --program-t)
1113     ac_prev=program_transform_name ;;
1114   -program-transform-name=* | --program-transform-name=* \
1115   | --program-transform-nam=* | --program-transform-na=* \
1116   | --program-transform-n=* | --program-transform-=* \
1117   | --program-transform=* | --program-transfor=* \
1118   | --program-transfo=* | --program-transf=* \
1119   | --program-trans=* | --program-tran=* \
1120   | --progr-tra=* | --program-tr=* | --program-t=*)
1121     program_transform_name=$ac_optarg ;;
1122
1123   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1124     ac_prev=pdfdir ;;
1125   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1126     pdfdir=$ac_optarg ;;
1127
1128   -psdir | --psdir | --psdi | --psd | --ps)
1129     ac_prev=psdir ;;
1130   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1131     psdir=$ac_optarg ;;
1132
1133   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1134   | -silent | --silent | --silen | --sile | --sil)
1135     silent=yes ;;
1136
1137   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1138     ac_prev=sbindir ;;
1139   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1140   | --sbi=* | --sb=*)
1141     sbindir=$ac_optarg ;;
1142
1143   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1144   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1145   | --sharedst | --shareds | --shared | --share | --shar \
1146   | --sha | --sh)
1147     ac_prev=sharedstatedir ;;
1148   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1149   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1150   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1151   | --sha=* | --sh=*)
1152     sharedstatedir=$ac_optarg ;;
1153
1154   -site | --site | --sit)
1155     ac_prev=site ;;
1156   -site=* | --site=* | --sit=*)
1157     site=$ac_optarg ;;
1158
1159   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1160     ac_prev=srcdir ;;
1161   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1162     srcdir=$ac_optarg ;;
1163
1164   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1165   | --syscon | --sysco | --sysc | --sys | --sy)
1166     ac_prev=sysconfdir ;;
1167   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1168   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1169     sysconfdir=$ac_optarg ;;
1170
1171   -target | --target | --targe | --targ | --tar | --ta | --t)
1172     ac_prev=target_alias ;;
1173   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1174     target_alias=$ac_optarg ;;
1175
1176   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1177     verbose=yes ;;
1178
1179   -version | --version | --versio | --versi | --vers | -V)
1180     ac_init_version=: ;;
1181
1182   -with-* | --with-*)
1183     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1184     # Reject names that are not valid shell variable names.
1185     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1186       as_fn_error $? "invalid package name: $ac_useropt"
1187     ac_useropt_orig=$ac_useropt
1188     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1189     case $ac_user_opts in
1190       *"
1191 "with_$ac_useropt"
1192 "*) ;;
1193       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1194          ac_unrecognized_sep=', ';;
1195     esac
1196     eval with_$ac_useropt=\$ac_optarg ;;
1197
1198   -without-* | --without-*)
1199     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1200     # Reject names that are not valid shell variable names.
1201     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1202       as_fn_error $? "invalid package name: $ac_useropt"
1203     ac_useropt_orig=$ac_useropt
1204     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205     case $ac_user_opts in
1206       *"
1207 "with_$ac_useropt"
1208 "*) ;;
1209       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1210          ac_unrecognized_sep=', ';;
1211     esac
1212     eval with_$ac_useropt=no ;;
1213
1214   --x)
1215     # Obsolete; use --with-x.
1216     with_x=yes ;;
1217
1218   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1219   | --x-incl | --x-inc | --x-in | --x-i)
1220     ac_prev=x_includes ;;
1221   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1222   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1223     x_includes=$ac_optarg ;;
1224
1225   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1226   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1227     ac_prev=x_libraries ;;
1228   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1229   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1230     x_libraries=$ac_optarg ;;
1231
1232   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1233 Try \`$0 --help' for more information"
1234     ;;
1235
1236   *=*)
1237     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1238     # Reject names that are not valid shell variable names.
1239     case $ac_envvar in #(
1240       '' | [0-9]* | *[!_$as_cr_alnum]* )
1241       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1242     esac
1243     eval $ac_envvar=\$ac_optarg
1244     export $ac_envvar ;;
1245
1246   *)
1247     # FIXME: should be removed in autoconf 3.0.
1248     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1249     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1250       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1251     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1252     ;;
1253
1254   esac
1255 done
1256
1257 if test -n "$ac_prev"; then
1258   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1259   as_fn_error $? "missing argument to $ac_option"
1260 fi
1261
1262 if test -n "$ac_unrecognized_opts"; then
1263   case $enable_option_checking in
1264     no) ;;
1265     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1266     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1267   esac
1268 fi
1269
1270 # Check all directory arguments for consistency.
1271 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1272                 datadir sysconfdir sharedstatedir localstatedir includedir \
1273                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1274                 libdir localedir mandir
1275 do
1276   eval ac_val=\$$ac_var
1277   # Remove trailing slashes.
1278   case $ac_val in
1279     */ )
1280       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1281       eval $ac_var=\$ac_val;;
1282   esac
1283   # Be sure to have absolute directory names.
1284   case $ac_val in
1285     [\\/$]* | ?:[\\/]* )  continue;;
1286     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1287   esac
1288   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1289 done
1290
1291 # There might be people who depend on the old broken behavior: `$host'
1292 # used to hold the argument of --host etc.
1293 # FIXME: To remove some day.
1294 build=$build_alias
1295 host=$host_alias
1296 target=$target_alias
1297
1298 # FIXME: To remove some day.
1299 if test "x$host_alias" != x; then
1300   if test "x$build_alias" = x; then
1301     cross_compiling=maybe
1302   elif test "x$build_alias" != "x$host_alias"; then
1303     cross_compiling=yes
1304   fi
1305 fi
1306
1307 ac_tool_prefix=
1308 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1309
1310 test "$silent" = yes && exec 6>/dev/null
1311
1312
1313 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1314 ac_ls_di=`ls -di .` &&
1315 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1316   as_fn_error $? "working directory cannot be determined"
1317 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1318   as_fn_error $? "pwd does not report name of working directory"
1319
1320
1321 # Find the source files, if location was not specified.
1322 if test -z "$srcdir"; then
1323   ac_srcdir_defaulted=yes
1324   # Try the directory containing this script, then the parent directory.
1325   ac_confdir=`$as_dirname -- "$as_myself" ||
1326 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1327          X"$as_myself" : 'X\(//\)[^/]' \| \
1328          X"$as_myself" : 'X\(//\)$' \| \
1329          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1330 $as_echo X"$as_myself" |
1331     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1332             s//\1/
1333             q
1334           }
1335           /^X\(\/\/\)[^/].*/{
1336             s//\1/
1337             q
1338           }
1339           /^X\(\/\/\)$/{
1340             s//\1/
1341             q
1342           }
1343           /^X\(\/\).*/{
1344             s//\1/
1345             q
1346           }
1347           s/.*/./; q'`
1348   srcdir=$ac_confdir
1349   if test ! -r "$srcdir/$ac_unique_file"; then
1350     srcdir=..
1351   fi
1352 else
1353   ac_srcdir_defaulted=no
1354 fi
1355 if test ! -r "$srcdir/$ac_unique_file"; then
1356   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1357   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1358 fi
1359 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1360 ac_abs_confdir=`(
1361         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1362         pwd)`
1363 # When building in place, set srcdir=.
1364 if test "$ac_abs_confdir" = "$ac_pwd"; then
1365   srcdir=.
1366 fi
1367 # Remove unnecessary trailing slashes from srcdir.
1368 # Double slashes in file names in object file debugging info
1369 # mess up M-x gdb in Emacs.
1370 case $srcdir in
1371 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1372 esac
1373 for ac_var in $ac_precious_vars; do
1374   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1375   eval ac_env_${ac_var}_value=\$${ac_var}
1376   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1377   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1378 done
1379
1380 #
1381 # Report the --help message.
1382 #
1383 if test "$ac_init_help" = "long"; then
1384   # Omit some internal or obsolete options to make the list less imposing.
1385   # This message is too long to be a string in the A/UX 3.1 sh.
1386   cat <<_ACEOF
1387 \`configure' configures this package to adapt to many kinds of systems.
1388
1389 Usage: $0 [OPTION]... [VAR=VALUE]...
1390
1391 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1392 VAR=VALUE.  See below for descriptions of some of the useful variables.
1393
1394 Defaults for the options are specified in brackets.
1395
1396
1397 Configuration:
1398
1399   -h, --help              display this help and exit
1400       --help=short        display options specific to this package
1401       --help=recursive    display the short help of all the included packages
1402   -V, --version           display version information and exit
1403   -q, --quiet, --silent   do not print \`checking ...' messages
1404       --cache-file=FILE   cache test results in FILE [disabled]
1405   -C, --config-cache      alias for \`--cache-file=config.cache'
1406   -n, --no-create         do not create output files
1407       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1408
1409 Installation directories:
1410   --prefix=PREFIX         install architecture-independent files in PREFIX
1411                           [$ac_default_prefix]
1412   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1413                           [PREFIX]
1414
1415 By default, \`make install' will install all the files in
1416 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1417 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1418 for instance \`--prefix=\$HOME'.
1419
1420 For better control, use the options below.
1421
1422 Fine tuning of the installation directories:
1423   --bindir=DIR            user executables [EPREFIX/bin]
1424   --libexecdir=DIR        program executables [EPREFIX/libexec]
1425   --libdir=DIR            object code libraries [EPREFIX/lib]
1426   --includedir=DIR        C header files [PREFIX/include]
1427   --x-includes=DIR        X include files are in DIR
1428   --x-libraries=DIR       X library files are in DIR
1429   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1430   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1431   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1432   --mandir=DIR            man documentation [DATAROOTDIR/man]
1433   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1434   --htmldir=DIR           html documentation [DOCDIR]
1435   --dvidir=DIR            dvi documentation [DOCDIR]
1436   --pdfdir=DIR            pdf documentation [DOCDIR]
1437   --psdir=DIR             ps documentation [DOCDIR]
1438 _ACEOF
1439
1440   cat <<\_ACEOF
1441
1442 X features:
1443   --x-includes=DIR    X include files are in DIR
1444   --x-libraries=DIR   X library files are in DIR
1445
1446 System types:
1447   --build=BUILD     configure for building on BUILD [guessed]
1448   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1449 _ACEOF
1450 fi
1451
1452 if test -n "$ac_init_help"; then
1453
1454   cat <<\_ACEOF
1455
1456 Optional Features:
1457   --disable-option-checking  ignore unrecognized --enable/--with options
1458   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1459   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1460   --disable-largefile     omit support for large files
1461
1462 Screen locking options:
1463   --enable-locking        Compile in support for locking the display.
1464   --disable-locking       Do not allow locking at all.
1465
1466   --enable-root-passwd        Allow root passwd to unlock screen.
1467   --disable-root-passwd       Do not allow that.
1468   --enable-pam-check-account-type
1469                           Whether PAM should check the result of account
1470                           modules when authenticating. Only do this if you
1471                           have account configured properly on your system.
1472
1473 Optional Packages:
1474   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1475   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1476
1477
1478 Installation options:
1479   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1480                           Default: `PREFIX/libexec/xscreensaver/'
1481   --with-configdir=DIR    Where to install the data files that describe each
1482                           of the display modes to the GUI.
1483                           Default: `PREFIX/share/xscreensaver/config/'
1484   --with-x-app-defaults=DIR
1485                            Where to install xscreensaver configuration file.
1486
1487   --with-dpms-ext         Include support for the DPMS extension.
1488   --with-xinerama-ext     Include support for the XINERAMA extension.
1489   --with-xinput-ext       Include support for the XInput extension.
1490   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1491   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1492   --with-randr-ext        Include support for the X Resize+Rotate extension.
1493   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1494                           file to notice keyboard activity.
1495   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1496   --with-pam-service-name NAME arg is the name of the PAM service that
1497                           xscreensaver will authenticate as.
1498   --with-kerberos         Include support for Kerberos authentication.
1499   --with-shadow           Include support for shadow password authentication.
1500   --with-passwd-helper    Include support for an external password
1501                           verification helper program.
1502   --with-login-manager    Put a "New Login" button on the unlock dialog that
1503                           runs a login manager like gdmflexiserver or kdmctl.
1504
1505 User interface options:
1506
1507   --with-gtk              Use the Gtk toolkit for the user interface.
1508   --with-motif            Use the Motif toolkit for the user interface
1509                           (no longer supported.)
1510
1511 Graphics options:
1512
1513   --with-gl               Build those demos which depend on OpenGL.
1514   --with-gle              Build those demos which depend on GLE
1515                           (the OpenGL "extrusion" library.)
1516   --with-gles             Target OpenGL ES 1.x API instead of OpenGL 1.3.
1517   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1518                           demos, which will make it possible for them to read
1519                           GIF, JPEG, and PNG files as well.
1520   --with-xpm              Include support for XPM files in some demos.
1521                           (Not needed if Pixbuf is used.)
1522   --with-jpeg             Include support for the JPEG library.
1523   --with-xshm-ext         Include support for the Shared Memory extension.
1524   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1525   --with-readdisplay      Include support for the XReadDisplay extension.
1526   --with-image-directory  Arg is the default directory from which some demos
1527                           will choose random images to display.
1528   --with-text-file=FILE   By default, some demos may display this file.
1529   --with-browser=BROWSER  Specify the web browser used to show the help URL.
1530   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1531                           (which is needed in order to ping other hosts.)
1532
1533
1534 Some influential environment variables:
1535   CC          C compiler command
1536   CFLAGS      C compiler flags
1537   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1538               nonstandard directory <lib dir>
1539   LIBS        libraries to pass to the linker, e.g. -l<library>
1540   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1541               you have headers in a nonstandard directory <include dir>
1542   CPP         C preprocessor
1543   XMKMF       Path to xmkmf, Makefile generator for X Window System
1544
1545 Use these variables to override the choices made by `configure' or to help
1546 it to find libraries and programs with nonstandard names/locations.
1547
1548 Report bugs to the package provider.
1549 _ACEOF
1550 ac_status=$?
1551 fi
1552
1553 if test "$ac_init_help" = "recursive"; then
1554   # If there are subdirs, report their specific --help.
1555   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1556     test -d "$ac_dir" ||
1557       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1558       continue
1559     ac_builddir=.
1560
1561 case "$ac_dir" in
1562 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1563 *)
1564   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1565   # A ".." for each directory in $ac_dir_suffix.
1566   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1567   case $ac_top_builddir_sub in
1568   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1569   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1570   esac ;;
1571 esac
1572 ac_abs_top_builddir=$ac_pwd
1573 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1574 # for backward compatibility:
1575 ac_top_builddir=$ac_top_build_prefix
1576
1577 case $srcdir in
1578   .)  # We are building in place.
1579     ac_srcdir=.
1580     ac_top_srcdir=$ac_top_builddir_sub
1581     ac_abs_top_srcdir=$ac_pwd ;;
1582   [\\/]* | ?:[\\/]* )  # Absolute name.
1583     ac_srcdir=$srcdir$ac_dir_suffix;
1584     ac_top_srcdir=$srcdir
1585     ac_abs_top_srcdir=$srcdir ;;
1586   *) # Relative name.
1587     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1588     ac_top_srcdir=$ac_top_build_prefix$srcdir
1589     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1590 esac
1591 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1592
1593     cd "$ac_dir" || { ac_status=$?; continue; }
1594     # Check for guested configure.
1595     if test -f "$ac_srcdir/configure.gnu"; then
1596       echo &&
1597       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1598     elif test -f "$ac_srcdir/configure"; then
1599       echo &&
1600       $SHELL "$ac_srcdir/configure" --help=recursive
1601     else
1602       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1603     fi || ac_status=$?
1604     cd "$ac_pwd" || { ac_status=$?; break; }
1605   done
1606 fi
1607
1608 test -n "$ac_init_help" && exit $ac_status
1609 if $ac_init_version; then
1610   cat <<\_ACEOF
1611 configure
1612 generated by GNU Autoconf 2.69
1613
1614 Copyright (C) 2012 Free Software Foundation, Inc.
1615 This configure script is free software; the Free Software Foundation
1616 gives unlimited permission to copy, distribute and modify it.
1617 _ACEOF
1618   exit
1619 fi
1620
1621 ## ------------------------ ##
1622 ## Autoconf initialization. ##
1623 ## ------------------------ ##
1624
1625 # ac_fn_c_try_compile LINENO
1626 # --------------------------
1627 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1628 ac_fn_c_try_compile ()
1629 {
1630   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1631   rm -rf conftest.$ac_objext
1632   if { { ac_try="$ac_compile"
1633 case "(($ac_try" in
1634   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1635   *) ac_try_echo=$ac_try;;
1636 esac
1637 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1638 $as_echo "$ac_try_echo"; } >&5
1639   (eval "$ac_compile") 2>conftest.err
1640   ac_status=$?
1641   if test -s conftest.err; then
1642     grep -v '^ *+' conftest.err >conftest.er1
1643     cat conftest.er1 >&5
1644     mv -f conftest.er1 conftest.err
1645   fi
1646   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1647   test $ac_status = 0; } && {
1648          test -z "$ac_c_werror_flag" ||
1649          test ! -s conftest.err
1650        } && test -s conftest.$ac_objext; then :
1651   ac_retval=0
1652 else
1653   $as_echo "$as_me: failed program was:" >&5
1654 sed 's/^/| /' conftest.$ac_ext >&5
1655
1656         ac_retval=1
1657 fi
1658   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1659   as_fn_set_status $ac_retval
1660
1661 } # ac_fn_c_try_compile
1662
1663 # ac_fn_c_try_run LINENO
1664 # ----------------------
1665 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1666 # that executables *can* be run.
1667 ac_fn_c_try_run ()
1668 {
1669   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1670   if { { ac_try="$ac_link"
1671 case "(($ac_try" in
1672   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1673   *) ac_try_echo=$ac_try;;
1674 esac
1675 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1676 $as_echo "$ac_try_echo"; } >&5
1677   (eval "$ac_link") 2>&5
1678   ac_status=$?
1679   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1680   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1681   { { case "(($ac_try" in
1682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1683   *) ac_try_echo=$ac_try;;
1684 esac
1685 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1686 $as_echo "$ac_try_echo"; } >&5
1687   (eval "$ac_try") 2>&5
1688   ac_status=$?
1689   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1690   test $ac_status = 0; }; }; then :
1691   ac_retval=0
1692 else
1693   $as_echo "$as_me: program exited with status $ac_status" >&5
1694        $as_echo "$as_me: failed program was:" >&5
1695 sed 's/^/| /' conftest.$ac_ext >&5
1696
1697        ac_retval=$ac_status
1698 fi
1699   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1700   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1701   as_fn_set_status $ac_retval
1702
1703 } # ac_fn_c_try_run
1704
1705 # ac_fn_c_try_cpp LINENO
1706 # ----------------------
1707 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1708 ac_fn_c_try_cpp ()
1709 {
1710   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1711   if { { ac_try="$ac_cpp conftest.$ac_ext"
1712 case "(($ac_try" in
1713   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1714   *) ac_try_echo=$ac_try;;
1715 esac
1716 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1717 $as_echo "$ac_try_echo"; } >&5
1718   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1719   ac_status=$?
1720   if test -s conftest.err; then
1721     grep -v '^ *+' conftest.err >conftest.er1
1722     cat conftest.er1 >&5
1723     mv -f conftest.er1 conftest.err
1724   fi
1725   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1726   test $ac_status = 0; } > conftest.i && {
1727          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1728          test ! -s conftest.err
1729        }; then :
1730   ac_retval=0
1731 else
1732   $as_echo "$as_me: failed program was:" >&5
1733 sed 's/^/| /' conftest.$ac_ext >&5
1734
1735     ac_retval=1
1736 fi
1737   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1738   as_fn_set_status $ac_retval
1739
1740 } # ac_fn_c_try_cpp
1741
1742 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1743 # -------------------------------------------------------
1744 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1745 # the include files in INCLUDES and setting the cache variable VAR
1746 # accordingly.
1747 ac_fn_c_check_header_mongrel ()
1748 {
1749   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1750   if eval \${$3+:} false; then :
1751   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1752 $as_echo_n "checking for $2... " >&6; }
1753 if eval \${$3+:} false; then :
1754   $as_echo_n "(cached) " >&6
1755 fi
1756 eval ac_res=\$$3
1757                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1758 $as_echo "$ac_res" >&6; }
1759 else
1760   # Is the header compilable?
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1762 $as_echo_n "checking $2 usability... " >&6; }
1763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1764 /* end confdefs.h.  */
1765 $4
1766 #include <$2>
1767 _ACEOF
1768 if ac_fn_c_try_compile "$LINENO"; then :
1769   ac_header_compiler=yes
1770 else
1771   ac_header_compiler=no
1772 fi
1773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1775 $as_echo "$ac_header_compiler" >&6; }
1776
1777 # Is the header present?
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1779 $as_echo_n "checking $2 presence... " >&6; }
1780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781 /* end confdefs.h.  */
1782 #include <$2>
1783 _ACEOF
1784 if ac_fn_c_try_cpp "$LINENO"; then :
1785   ac_header_preproc=yes
1786 else
1787   ac_header_preproc=no
1788 fi
1789 rm -rf conftest.err conftest.i conftest.$ac_ext
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1791 $as_echo "$ac_header_preproc" >&6; }
1792
1793 # So?  What about this header?
1794 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1795   yes:no: )
1796     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1797 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1798     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1799 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1800     ;;
1801   no:yes:* )
1802     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1803 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1804     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1805 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1806     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1807 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1808     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1809 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1810     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1811 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1812     ;;
1813 esac
1814   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1815 $as_echo_n "checking for $2... " >&6; }
1816 if eval \${$3+:} false; then :
1817   $as_echo_n "(cached) " >&6
1818 else
1819   eval "$3=\$ac_header_compiler"
1820 fi
1821 eval ac_res=\$$3
1822                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1823 $as_echo "$ac_res" >&6; }
1824 fi
1825   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1826
1827 } # ac_fn_c_check_header_mongrel
1828
1829 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1830 # -------------------------------------------------------
1831 # Tests whether HEADER exists and can be compiled using the include files in
1832 # INCLUDES, setting the cache variable VAR accordingly.
1833 ac_fn_c_check_header_compile ()
1834 {
1835   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1837 $as_echo_n "checking for $2... " >&6; }
1838 if eval \${$3+:} false; then :
1839   $as_echo_n "(cached) " >&6
1840 else
1841   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1842 /* end confdefs.h.  */
1843 $4
1844 #include <$2>
1845 _ACEOF
1846 if ac_fn_c_try_compile "$LINENO"; then :
1847   eval "$3=yes"
1848 else
1849   eval "$3=no"
1850 fi
1851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1852 fi
1853 eval ac_res=\$$3
1854                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855 $as_echo "$ac_res" >&6; }
1856   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1857
1858 } # ac_fn_c_check_header_compile
1859
1860 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1861 # -------------------------------------------
1862 # Tests whether TYPE exists after having included INCLUDES, setting cache
1863 # variable VAR accordingly.
1864 ac_fn_c_check_type ()
1865 {
1866   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1868 $as_echo_n "checking for $2... " >&6; }
1869 if eval \${$3+:} false; then :
1870   $as_echo_n "(cached) " >&6
1871 else
1872   eval "$3=no"
1873   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1874 /* end confdefs.h.  */
1875 $4
1876 int
1877 main ()
1878 {
1879 if (sizeof ($2))
1880          return 0;
1881   ;
1882   return 0;
1883 }
1884 _ACEOF
1885 if ac_fn_c_try_compile "$LINENO"; then :
1886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887 /* end confdefs.h.  */
1888 $4
1889 int
1890 main ()
1891 {
1892 if (sizeof (($2)))
1893             return 0;
1894   ;
1895   return 0;
1896 }
1897 _ACEOF
1898 if ac_fn_c_try_compile "$LINENO"; then :
1899
1900 else
1901   eval "$3=yes"
1902 fi
1903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1904 fi
1905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1906 fi
1907 eval ac_res=\$$3
1908                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1909 $as_echo "$ac_res" >&6; }
1910   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1911
1912 } # ac_fn_c_check_type
1913
1914 # ac_fn_c_try_link LINENO
1915 # -----------------------
1916 # Try to link conftest.$ac_ext, and return whether this succeeded.
1917 ac_fn_c_try_link ()
1918 {
1919   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920   rm -rf conftest.$ac_objext conftest$ac_exeext
1921   if { { ac_try="$ac_link"
1922 case "(($ac_try" in
1923   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1924   *) ac_try_echo=$ac_try;;
1925 esac
1926 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1927 $as_echo "$ac_try_echo"; } >&5
1928   (eval "$ac_link") 2>conftest.err
1929   ac_status=$?
1930   if test -s conftest.err; then
1931     grep -v '^ *+' conftest.err >conftest.er1
1932     cat conftest.er1 >&5
1933     mv -f conftest.er1 conftest.err
1934   fi
1935   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1936   test $ac_status = 0; } && {
1937          test -z "$ac_c_werror_flag" ||
1938          test ! -s conftest.err
1939        } && test -s conftest$ac_exeext && {
1940          test "$cross_compiling" = yes ||
1941          test -x conftest$ac_exeext
1942        }; then :
1943   ac_retval=0
1944 else
1945   $as_echo "$as_me: failed program was:" >&5
1946 sed 's/^/| /' conftest.$ac_ext >&5
1947
1948         ac_retval=1
1949 fi
1950   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1951   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1952   # interfere with the next link command; also delete a directory that is
1953   # left behind by Apple's compiler.  We do this before executing the actions.
1954   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1955   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1956   as_fn_set_status $ac_retval
1957
1958 } # ac_fn_c_try_link
1959
1960 # ac_fn_c_check_func LINENO FUNC VAR
1961 # ----------------------------------
1962 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1963 ac_fn_c_check_func ()
1964 {
1965   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1966   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1967 $as_echo_n "checking for $2... " >&6; }
1968 if eval \${$3+:} false; then :
1969   $as_echo_n "(cached) " >&6
1970 else
1971   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1972 /* end confdefs.h.  */
1973 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1974    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1975 #define $2 innocuous_$2
1976
1977 /* System header to define __stub macros and hopefully few prototypes,
1978     which can conflict with char $2 (); below.
1979     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1980     <limits.h> exists even on freestanding compilers.  */
1981
1982 #ifdef __STDC__
1983 # include <limits.h>
1984 #else
1985 # include <assert.h>
1986 #endif
1987
1988 #undef $2
1989
1990 /* Override any GCC internal prototype to avoid an error.
1991    Use char because int might match the return type of a GCC
1992    builtin and then its argument prototype would still apply.  */
1993 #ifdef __cplusplus
1994 extern "C"
1995 #endif
1996 char $2 ();
1997 /* The GNU C library defines this for functions which it implements
1998     to always fail with ENOSYS.  Some functions are actually named
1999     something starting with __ and the normal name is an alias.  */
2000 #if defined __stub_$2 || defined __stub___$2
2001 choke me
2002 #endif
2003
2004 int
2005 main ()
2006 {
2007 return $2 ();
2008   ;
2009   return 0;
2010 }
2011 _ACEOF
2012 if ac_fn_c_try_link "$LINENO"; then :
2013   eval "$3=yes"
2014 else
2015   eval "$3=no"
2016 fi
2017 rm -f core conftest.err conftest.$ac_objext \
2018     conftest$ac_exeext conftest.$ac_ext
2019 fi
2020 eval ac_res=\$$3
2021                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2022 $as_echo "$ac_res" >&6; }
2023   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2024
2025 } # ac_fn_c_check_func
2026 cat >config.log <<_ACEOF
2027 This file contains any messages produced by compilers while
2028 running configure, to aid debugging if configure makes a mistake.
2029
2030 It was created by $as_me, which was
2031 generated by GNU Autoconf 2.69.  Invocation command line was
2032
2033   $ $0 $@
2034
2035 _ACEOF
2036 exec 5>>config.log
2037 {
2038 cat <<_ASUNAME
2039 ## --------- ##
2040 ## Platform. ##
2041 ## --------- ##
2042
2043 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2044 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2045 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2046 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2047 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2048
2049 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2050 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2051
2052 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2053 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2054 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2055 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2056 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2057 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2058 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2059
2060 _ASUNAME
2061
2062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2063 for as_dir in $PATH
2064 do
2065   IFS=$as_save_IFS
2066   test -z "$as_dir" && as_dir=.
2067     $as_echo "PATH: $as_dir"
2068   done
2069 IFS=$as_save_IFS
2070
2071 } >&5
2072
2073 cat >&5 <<_ACEOF
2074
2075
2076 ## ----------- ##
2077 ## Core tests. ##
2078 ## ----------- ##
2079
2080 _ACEOF
2081
2082
2083 # Keep a trace of the command line.
2084 # Strip out --no-create and --no-recursion so they do not pile up.
2085 # Strip out --silent because we don't want to record it for future runs.
2086 # Also quote any args containing shell meta-characters.
2087 # Make two passes to allow for proper duplicate-argument suppression.
2088 ac_configure_args=
2089 ac_configure_args0=
2090 ac_configure_args1=
2091 ac_must_keep_next=false
2092 for ac_pass in 1 2
2093 do
2094   for ac_arg
2095   do
2096     case $ac_arg in
2097     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2098     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2099     | -silent | --silent | --silen | --sile | --sil)
2100       continue ;;
2101     *\'*)
2102       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2103     esac
2104     case $ac_pass in
2105     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2106     2)
2107       as_fn_append ac_configure_args1 " '$ac_arg'"
2108       if test $ac_must_keep_next = true; then
2109         ac_must_keep_next=false # Got value, back to normal.
2110       else
2111         case $ac_arg in
2112           *=* | --config-cache | -C | -disable-* | --disable-* \
2113           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2114           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2115           | -with-* | --with-* | -without-* | --without-* | --x)
2116             case "$ac_configure_args0 " in
2117               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2118             esac
2119             ;;
2120           -* ) ac_must_keep_next=true ;;
2121         esac
2122       fi
2123       as_fn_append ac_configure_args " '$ac_arg'"
2124       ;;
2125     esac
2126   done
2127 done
2128 { ac_configure_args0=; unset ac_configure_args0;}
2129 { ac_configure_args1=; unset ac_configure_args1;}
2130
2131 # When interrupted or exit'd, cleanup temporary files, and complete
2132 # config.log.  We remove comments because anyway the quotes in there
2133 # would cause problems or look ugly.
2134 # WARNING: Use '\'' to represent an apostrophe within the trap.
2135 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2136 trap 'exit_status=$?
2137   # Save into config.log some information that might help in debugging.
2138   {
2139     echo
2140
2141     $as_echo "## ---------------- ##
2142 ## Cache variables. ##
2143 ## ---------------- ##"
2144     echo
2145     # The following way of writing the cache mishandles newlines in values,
2146 (
2147   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2148     eval ac_val=\$$ac_var
2149     case $ac_val in #(
2150     *${as_nl}*)
2151       case $ac_var in #(
2152       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2153 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2154       esac
2155       case $ac_var in #(
2156       _ | IFS | as_nl) ;; #(
2157       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2158       *) { eval $ac_var=; unset $ac_var;} ;;
2159       esac ;;
2160     esac
2161   done
2162   (set) 2>&1 |
2163     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2164     *${as_nl}ac_space=\ *)
2165       sed -n \
2166         "s/'\''/'\''\\\\'\'''\''/g;
2167           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2168       ;; #(
2169     *)
2170       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2171       ;;
2172     esac |
2173     sort
2174 )
2175     echo
2176
2177     $as_echo "## ----------------- ##
2178 ## Output variables. ##
2179 ## ----------------- ##"
2180     echo
2181     for ac_var in $ac_subst_vars
2182     do
2183       eval ac_val=\$$ac_var
2184       case $ac_val in
2185       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2186       esac
2187       $as_echo "$ac_var='\''$ac_val'\''"
2188     done | sort
2189     echo
2190
2191     if test -n "$ac_subst_files"; then
2192       $as_echo "## ------------------- ##
2193 ## File substitutions. ##
2194 ## ------------------- ##"
2195       echo
2196       for ac_var in $ac_subst_files
2197       do
2198         eval ac_val=\$$ac_var
2199         case $ac_val in
2200         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2201         esac
2202         $as_echo "$ac_var='\''$ac_val'\''"
2203       done | sort
2204       echo
2205     fi
2206
2207     if test -s confdefs.h; then
2208       $as_echo "## ----------- ##
2209 ## confdefs.h. ##
2210 ## ----------- ##"
2211       echo
2212       cat confdefs.h
2213       echo
2214     fi
2215     test "$ac_signal" != 0 &&
2216       $as_echo "$as_me: caught signal $ac_signal"
2217     $as_echo "$as_me: exit $exit_status"
2218   } >&5
2219   rm -f core *.core core.conftest.* &&
2220     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2221     exit $exit_status
2222 ' 0
2223 for ac_signal in 1 2 13 15; do
2224   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2225 done
2226 ac_signal=0
2227
2228 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2229 rm -f -r conftest* confdefs.h
2230
2231 $as_echo "/* confdefs.h */" > confdefs.h
2232
2233 # Predefined preprocessor variables.
2234
2235 cat >>confdefs.h <<_ACEOF
2236 #define PACKAGE_NAME "$PACKAGE_NAME"
2237 _ACEOF
2238
2239 cat >>confdefs.h <<_ACEOF
2240 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2241 _ACEOF
2242
2243 cat >>confdefs.h <<_ACEOF
2244 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2245 _ACEOF
2246
2247 cat >>confdefs.h <<_ACEOF
2248 #define PACKAGE_STRING "$PACKAGE_STRING"
2249 _ACEOF
2250
2251 cat >>confdefs.h <<_ACEOF
2252 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2253 _ACEOF
2254
2255 cat >>confdefs.h <<_ACEOF
2256 #define PACKAGE_URL "$PACKAGE_URL"
2257 _ACEOF
2258
2259
2260 # Let the site file select an alternate cache file if it wants to.
2261 # Prefer an explicitly selected file to automatically selected ones.
2262 ac_site_file1=NONE
2263 ac_site_file2=NONE
2264 if test -n "$CONFIG_SITE"; then
2265   # We do not want a PATH search for config.site.
2266   case $CONFIG_SITE in #((
2267     -*)  ac_site_file1=./$CONFIG_SITE;;
2268     */*) ac_site_file1=$CONFIG_SITE;;
2269     *)   ac_site_file1=./$CONFIG_SITE;;
2270   esac
2271 elif test "x$prefix" != xNONE; then
2272   ac_site_file1=$prefix/share/config.site
2273   ac_site_file2=$prefix/etc/config.site
2274 else
2275   ac_site_file1=$ac_default_prefix/share/config.site
2276   ac_site_file2=$ac_default_prefix/etc/config.site
2277 fi
2278 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2279 do
2280   test "x$ac_site_file" = xNONE && continue
2281   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2282     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2283 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2284     sed 's/^/| /' "$ac_site_file" >&5
2285     . "$ac_site_file" \
2286       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2287 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2288 as_fn_error $? "failed to load site script $ac_site_file
2289 See \`config.log' for more details" "$LINENO" 5; }
2290   fi
2291 done
2292
2293 if test -r "$cache_file"; then
2294   # Some versions of bash will fail to source /dev/null (special files
2295   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2296   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2297     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2298 $as_echo "$as_me: loading cache $cache_file" >&6;}
2299     case $cache_file in
2300       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2301       *)                      . "./$cache_file";;
2302     esac
2303   fi
2304 else
2305   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2306 $as_echo "$as_me: creating cache $cache_file" >&6;}
2307   >$cache_file
2308 fi
2309
2310 as_fn_append ac_header_list " stdlib.h"
2311 as_fn_append ac_header_list " unistd.h"
2312 as_fn_append ac_header_list " sys/param.h"
2313 # Check that the precious variables saved in the cache have kept the same
2314 # value.
2315 ac_cache_corrupted=false
2316 for ac_var in $ac_precious_vars; do
2317   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2318   eval ac_new_set=\$ac_env_${ac_var}_set
2319   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2320   eval ac_new_val=\$ac_env_${ac_var}_value
2321   case $ac_old_set,$ac_new_set in
2322     set,)
2323       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2324 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2325       ac_cache_corrupted=: ;;
2326     ,set)
2327       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2328 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2329       ac_cache_corrupted=: ;;
2330     ,);;
2331     *)
2332       if test "x$ac_old_val" != "x$ac_new_val"; then
2333         # differences in whitespace do not lead to failure.
2334         ac_old_val_w=`echo x $ac_old_val`
2335         ac_new_val_w=`echo x $ac_new_val`
2336         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2337           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2338 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2339           ac_cache_corrupted=:
2340         else
2341           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2342 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2343           eval $ac_var=\$ac_old_val
2344         fi
2345         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2346 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2347         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2348 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2349       fi;;
2350   esac
2351   # Pass precious variables to config.status.
2352   if test "$ac_new_set" = set; then
2353     case $ac_new_val in
2354     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2355     *) ac_arg=$ac_var=$ac_new_val ;;
2356     esac
2357     case " $ac_configure_args " in
2358       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2359       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2360     esac
2361   fi
2362 done
2363 if $ac_cache_corrupted; then
2364   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2365 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2366   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2367 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2368   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2369 fi
2370 ## -------------------- ##
2371 ## Main body of script. ##
2372 ## -------------------- ##
2373
2374 ac_ext=c
2375 ac_cpp='$CPP $CPPFLAGS'
2376 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2377 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2378 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2379
2380
2381 ac_config_headers="$ac_config_headers config.h"
2382
2383
2384 echo "current directory: `pwd`"
2385 echo "command line was: $0 $@"
2386
2387 ###############################################################################
2388 #
2389 #       Autoheader stuff
2390 #
2391 ###############################################################################
2392
2393
2394
2395
2396
2397
2398
2399 # This only ever existed in X11R4 and X11R5.
2400 #AH_TEMPLATE([HAVE_XIDLE_EXTENSION],
2401 #           [Define this if you have the XIDLE extension installed. If you
2402 #           have the XIDLE extension, this is recommended.  (You have this
2403 #           extension if the file /usr/include/X11/extensions/xidle.h
2404 #           exists.) Turning on this flag lets XScreenSaver work better with
2405 #           servers which support this extension; but it will still work
2406 #           with servers which do not suport it, so it's a good idea to
2407 #           compile in support for it if you can.])
2408
2409 # Using this extension will crash your X server and make fading not work.
2410 #AH_TEMPLATE([HAVE_MIT_SAVER_EXTENSION],
2411 #           [Define this if you have the MIT-SCREEN-SAVER extension
2412 #            installed.  See the caveats about this extension, above.
2413 #            (It's available if /usr/include/X11/extensions/scrnsaver.h
2414 #            exists.)])
2415
2416 # This only ever existed on SGI hardware.
2417 #AH_TEMPLATE([HAVE_SGI_SAVER_EXTENSION],
2418 #           [Define this if you have the SGI SCREEN_SAVER extension.  This is
2419 #           standard on Irix systems, and not available elsewhere.])
2420
2421 # This only ever existed on SGI hardware.
2422 #AH_TEMPLATE([HAVE_SGI_VC_EXTENSION],
2423 #           [Define this if you have the SGI-VIDEO-CONTROL extension.  This
2424 #           is standard on Irix systems, and not available elsewhere.])
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
2531
2532
2533
2534
2535
2536
2537 # After checking to see that --srcdir is correct (which AC_INIT does)
2538 # check for some random other files that come later in the tar file,
2539 # to make sure everything is here.
2540 #
2541 for d in driver utils hacks hacks/glx ; do
2542   f=$srcdir/$d/Makefile.in
2543   if test \! -r $f ; then
2544     echo ""
2545     echo "ERROR: The package is incomplete: $f does not exist."
2546     echo "       This probably means that your download was truncated."
2547     echo ""
2548     exit 1
2549   fi
2550 done
2551
2552 ###############################################################################
2553 #
2554 #       Function to figure out how to run the compiler.
2555 #
2556 ###############################################################################
2557
2558
2559
2560
2561 ###############################################################################
2562 #
2563 #       Check for availability of various gcc command-line options.
2564 #
2565 ###############################################################################
2566
2567
2568
2569
2570
2571
2572
2573 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2574 # around an Apple-specific gcc bug.
2575 #
2576
2577
2578 ###############################################################################
2579 #
2580 #       Function to figure out how to disable // comments in ANSI C code.
2581 #
2582 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2583 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2584 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2585 #       so much for compatibility!)
2586 #
2587 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2588 #       declarations preceed statements, without resorting to "-pedantic".
2589 #       This means that there is no way to get gcc3 to issue warnings that
2590 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2591 #       also drowning in totally useless warnings.  Thank you master may I
2592 #       have another.
2593 #
2594 #       So, I give up, let's just use -pedantic.
2595 #
2596 ###############################################################################
2597
2598
2599
2600
2601
2602
2603 ###############################################################################
2604 #
2605 #       Function to figure out how to create directory trees.
2606 #
2607 ###############################################################################
2608
2609
2610
2611
2612 ###############################################################################
2613 #
2614 #       Function to check whether gettimeofday() exists, and how to call it.
2615 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2616 #
2617 ###############################################################################
2618
2619
2620
2621
2622 ###############################################################################
2623 #
2624 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2625 #
2626 ###############################################################################
2627
2628 # M4 sucks!!  perl sucks too!!
2629
2630 perl_version_cmd='print $]'
2631
2632
2633
2634
2635
2636 ###############################################################################
2637 #
2638 #       Function to demand "bc".  Losers.
2639 #
2640 ###############################################################################
2641
2642
2643
2644 ###############################################################################
2645 #
2646 #       Functions to check how to do ICMP PING requests.
2647 #
2648 ###############################################################################
2649
2650
2651
2652
2653
2654
2655 ###############################################################################
2656 #
2657 #       Functions to check for various X11 crap.
2658 #
2659 ###############################################################################
2660
2661 # Try and find the app-defaults directory.
2662 # It sucks that autoconf doesn't do this already...
2663 #
2664
2665
2666 ###############################################################################
2667 #
2668 #       Handle the --with-x-app-defaults option HERE
2669 #
2670 ###############################################################################
2671
2672
2673 # Check whether --with-x-app-defaults was given.
2674 if test "${with_x_app_defaults+set}" = set; then :
2675   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2676 else
2677   eval ac_x_app_defaults="$withval"
2678 fi
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690 # Random special-cases for X on certain pathological OSes.
2691 # You know who you are.
2692 #
2693
2694
2695
2696
2697
2698 ###############################################################################
2699 #
2700 #       Some utility functions to make checking for X things easier.
2701 #
2702 ###############################################################################
2703
2704 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2705 #
2706
2707
2708 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2709 #
2710
2711
2712 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2713 #
2714
2715
2716
2717 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2718 # Use this sparingly; it probably doesn't work very well on X programs.
2719 #
2720
2721
2722 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2723 # (But not the -L directories!)
2724 #
2725
2726
2727
2728
2729 # Usage: HANDLE_X_PATH_ARG([variable_name],
2730 #                          [--command-line-option],
2731 #                          [descriptive string])
2732 #
2733 # All of the --with options take three forms:
2734 #
2735 #   --with-foo (or --with-foo=yes)
2736 #   --without-foo (or --with-foo=no)
2737 #   --with-foo=/DIR
2738 #
2739 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2740 # a directory (string beginning with a slash) it checks to see whether
2741 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2742 # as appropriate.
2743 #
2744
2745
2746
2747
2748 ###############################################################################
2749 ###############################################################################
2750 #
2751 #       End of function definitions.  Now start actually executing stuff.
2752 #
2753 ###############################################################################
2754 ###############################################################################
2755
2756 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2757 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2758 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2759
2760
2761 # random compiler setup
2762 ac_aux_dir=
2763 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2764   if test -f "$ac_dir/install-sh"; then
2765     ac_aux_dir=$ac_dir
2766     ac_install_sh="$ac_aux_dir/install-sh -c"
2767     break
2768   elif test -f "$ac_dir/install.sh"; then
2769     ac_aux_dir=$ac_dir
2770     ac_install_sh="$ac_aux_dir/install.sh -c"
2771     break
2772   elif test -f "$ac_dir/shtool"; then
2773     ac_aux_dir=$ac_dir
2774     ac_install_sh="$ac_aux_dir/shtool install -c"
2775     break
2776   fi
2777 done
2778 if test -z "$ac_aux_dir"; then
2779   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2780 fi
2781
2782 # These three variables are undocumented and unsupported,
2783 # and are intended to be withdrawn in a future Autoconf release.
2784 # They can cause serious problems if a builder's source tree is in a directory
2785 # whose full name contains unusual characters.
2786 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2787 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2788 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2789
2790
2791 # Make sure we can run config.sub.
2792 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2793   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2794
2795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2796 $as_echo_n "checking build system type... " >&6; }
2797 if ${ac_cv_build+:} false; then :
2798   $as_echo_n "(cached) " >&6
2799 else
2800   ac_build_alias=$build_alias
2801 test "x$ac_build_alias" = x &&
2802   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2803 test "x$ac_build_alias" = x &&
2804   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2805 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2806   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2807
2808 fi
2809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2810 $as_echo "$ac_cv_build" >&6; }
2811 case $ac_cv_build in
2812 *-*-*) ;;
2813 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2814 esac
2815 build=$ac_cv_build
2816 ac_save_IFS=$IFS; IFS='-'
2817 set x $ac_cv_build
2818 shift
2819 build_cpu=$1
2820 build_vendor=$2
2821 shift; shift
2822 # Remember, the first character of IFS is used to create $*,
2823 # except with old shells:
2824 build_os=$*
2825 IFS=$ac_save_IFS
2826 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2827
2828
2829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2830 $as_echo_n "checking host system type... " >&6; }
2831 if ${ac_cv_host+:} false; then :
2832   $as_echo_n "(cached) " >&6
2833 else
2834   if test "x$host_alias" = x; then
2835   ac_cv_host=$ac_cv_build
2836 else
2837   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2838     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2839 fi
2840
2841 fi
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2843 $as_echo "$ac_cv_host" >&6; }
2844 case $ac_cv_host in
2845 *-*-*) ;;
2846 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2847 esac
2848 host=$ac_cv_host
2849 ac_save_IFS=$IFS; IFS='-'
2850 set x $ac_cv_host
2851 shift
2852 host_cpu=$1
2853 host_vendor=$2
2854 shift; shift
2855 # Remember, the first character of IFS is used to create $*,
2856 # except with old shells:
2857 host_os=$*
2858 IFS=$ac_save_IFS
2859 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2860
2861
2862 ac_ext=c
2863 ac_cpp='$CPP $CPPFLAGS'
2864 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2865 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2866 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2867 if test -n "$ac_tool_prefix"; then
2868   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2869 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2871 $as_echo_n "checking for $ac_word... " >&6; }
2872 if ${ac_cv_prog_CC+:} false; then :
2873   $as_echo_n "(cached) " >&6
2874 else
2875   if test -n "$CC"; then
2876   ac_cv_prog_CC="$CC" # Let the user override the test.
2877 else
2878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2879 for as_dir in $PATH
2880 do
2881   IFS=$as_save_IFS
2882   test -z "$as_dir" && as_dir=.
2883     for ac_exec_ext in '' $ac_executable_extensions; do
2884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2885     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2887     break 2
2888   fi
2889 done
2890   done
2891 IFS=$as_save_IFS
2892
2893 fi
2894 fi
2895 CC=$ac_cv_prog_CC
2896 if test -n "$CC"; then
2897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2898 $as_echo "$CC" >&6; }
2899 else
2900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2901 $as_echo "no" >&6; }
2902 fi
2903
2904
2905 fi
2906 if test -z "$ac_cv_prog_CC"; then
2907   ac_ct_CC=$CC
2908   # Extract the first word of "gcc", so it can be a program name with args.
2909 set dummy gcc; ac_word=$2
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2911 $as_echo_n "checking for $ac_word... " >&6; }
2912 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2913   $as_echo_n "(cached) " >&6
2914 else
2915   if test -n "$ac_ct_CC"; then
2916   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2917 else
2918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2919 for as_dir in $PATH
2920 do
2921   IFS=$as_save_IFS
2922   test -z "$as_dir" && as_dir=.
2923     for ac_exec_ext in '' $ac_executable_extensions; do
2924   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2925     ac_cv_prog_ac_ct_CC="gcc"
2926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2927     break 2
2928   fi
2929 done
2930   done
2931 IFS=$as_save_IFS
2932
2933 fi
2934 fi
2935 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2936 if test -n "$ac_ct_CC"; then
2937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2938 $as_echo "$ac_ct_CC" >&6; }
2939 else
2940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2941 $as_echo "no" >&6; }
2942 fi
2943
2944   if test "x$ac_ct_CC" = x; then
2945     CC=""
2946   else
2947     case $cross_compiling:$ac_tool_warned in
2948 yes:)
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2950 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2951 ac_tool_warned=yes ;;
2952 esac
2953     CC=$ac_ct_CC
2954   fi
2955 else
2956   CC="$ac_cv_prog_CC"
2957 fi
2958
2959 if test -z "$CC"; then
2960           if test -n "$ac_tool_prefix"; then
2961     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2962 set dummy ${ac_tool_prefix}cc; ac_word=$2
2963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2964 $as_echo_n "checking for $ac_word... " >&6; }
2965 if ${ac_cv_prog_CC+:} false; then :
2966   $as_echo_n "(cached) " >&6
2967 else
2968   if test -n "$CC"; then
2969   ac_cv_prog_CC="$CC" # Let the user override the test.
2970 else
2971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2972 for as_dir in $PATH
2973 do
2974   IFS=$as_save_IFS
2975   test -z "$as_dir" && as_dir=.
2976     for ac_exec_ext in '' $ac_executable_extensions; do
2977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2978     ac_cv_prog_CC="${ac_tool_prefix}cc"
2979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2980     break 2
2981   fi
2982 done
2983   done
2984 IFS=$as_save_IFS
2985
2986 fi
2987 fi
2988 CC=$ac_cv_prog_CC
2989 if test -n "$CC"; then
2990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2991 $as_echo "$CC" >&6; }
2992 else
2993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2994 $as_echo "no" >&6; }
2995 fi
2996
2997
2998   fi
2999 fi
3000 if test -z "$CC"; then
3001   # Extract the first word of "cc", so it can be a program name with args.
3002 set dummy cc; ac_word=$2
3003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3004 $as_echo_n "checking for $ac_word... " >&6; }
3005 if ${ac_cv_prog_CC+:} false; then :
3006   $as_echo_n "(cached) " >&6
3007 else
3008   if test -n "$CC"; then
3009   ac_cv_prog_CC="$CC" # Let the user override the test.
3010 else
3011   ac_prog_rejected=no
3012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3013 for as_dir in $PATH
3014 do
3015   IFS=$as_save_IFS
3016   test -z "$as_dir" && as_dir=.
3017     for ac_exec_ext in '' $ac_executable_extensions; do
3018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3019     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3020        ac_prog_rejected=yes
3021        continue
3022      fi
3023     ac_cv_prog_CC="cc"
3024     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3025     break 2
3026   fi
3027 done
3028   done
3029 IFS=$as_save_IFS
3030
3031 if test $ac_prog_rejected = yes; then
3032   # We found a bogon in the path, so make sure we never use it.
3033   set dummy $ac_cv_prog_CC
3034   shift
3035   if test $# != 0; then
3036     # We chose a different compiler from the bogus one.
3037     # However, it has the same basename, so the bogon will be chosen
3038     # first if we set CC to just the basename; use the full file name.
3039     shift
3040     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3041   fi
3042 fi
3043 fi
3044 fi
3045 CC=$ac_cv_prog_CC
3046 if test -n "$CC"; then
3047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3048 $as_echo "$CC" >&6; }
3049 else
3050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3051 $as_echo "no" >&6; }
3052 fi
3053
3054
3055 fi
3056 if test -z "$CC"; then
3057   if test -n "$ac_tool_prefix"; then
3058   for ac_prog in cl.exe
3059   do
3060     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3061 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3063 $as_echo_n "checking for $ac_word... " >&6; }
3064 if ${ac_cv_prog_CC+:} false; then :
3065   $as_echo_n "(cached) " >&6
3066 else
3067   if test -n "$CC"; then
3068   ac_cv_prog_CC="$CC" # Let the user override the test.
3069 else
3070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3071 for as_dir in $PATH
3072 do
3073   IFS=$as_save_IFS
3074   test -z "$as_dir" && as_dir=.
3075     for ac_exec_ext in '' $ac_executable_extensions; do
3076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3077     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3079     break 2
3080   fi
3081 done
3082   done
3083 IFS=$as_save_IFS
3084
3085 fi
3086 fi
3087 CC=$ac_cv_prog_CC
3088 if test -n "$CC"; then
3089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3090 $as_echo "$CC" >&6; }
3091 else
3092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3093 $as_echo "no" >&6; }
3094 fi
3095
3096
3097     test -n "$CC" && break
3098   done
3099 fi
3100 if test -z "$CC"; then
3101   ac_ct_CC=$CC
3102   for ac_prog in cl.exe
3103 do
3104   # Extract the first word of "$ac_prog", so it can be a program name with args.
3105 set dummy $ac_prog; ac_word=$2
3106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3107 $as_echo_n "checking for $ac_word... " >&6; }
3108 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3109   $as_echo_n "(cached) " >&6
3110 else
3111   if test -n "$ac_ct_CC"; then
3112   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3113 else
3114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3115 for as_dir in $PATH
3116 do
3117   IFS=$as_save_IFS
3118   test -z "$as_dir" && as_dir=.
3119     for ac_exec_ext in '' $ac_executable_extensions; do
3120   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3121     ac_cv_prog_ac_ct_CC="$ac_prog"
3122     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3123     break 2
3124   fi
3125 done
3126   done
3127 IFS=$as_save_IFS
3128
3129 fi
3130 fi
3131 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3132 if test -n "$ac_ct_CC"; then
3133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3134 $as_echo "$ac_ct_CC" >&6; }
3135 else
3136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3137 $as_echo "no" >&6; }
3138 fi
3139
3140
3141   test -n "$ac_ct_CC" && break
3142 done
3143
3144   if test "x$ac_ct_CC" = x; then
3145     CC=""
3146   else
3147     case $cross_compiling:$ac_tool_warned in
3148 yes:)
3149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3150 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3151 ac_tool_warned=yes ;;
3152 esac
3153     CC=$ac_ct_CC
3154   fi
3155 fi
3156
3157 fi
3158
3159
3160 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3161 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3162 as_fn_error $? "no acceptable C compiler found in \$PATH
3163 See \`config.log' for more details" "$LINENO" 5; }
3164
3165 # Provide some information about the compiler.
3166 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3167 set X $ac_compile
3168 ac_compiler=$2
3169 for ac_option in --version -v -V -qversion; do
3170   { { ac_try="$ac_compiler $ac_option >&5"
3171 case "(($ac_try" in
3172   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3173   *) ac_try_echo=$ac_try;;
3174 esac
3175 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3176 $as_echo "$ac_try_echo"; } >&5
3177   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3178   ac_status=$?
3179   if test -s conftest.err; then
3180     sed '10a\
3181 ... rest of stderr output deleted ...
3182          10q' conftest.err >conftest.er1
3183     cat conftest.er1 >&5
3184   fi
3185   rm -rf conftest.er1 conftest.err
3186   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3187   test $ac_status = 0; }
3188 done
3189
3190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3191 /* end confdefs.h.  */
3192
3193 int
3194 main ()
3195 {
3196
3197   ;
3198   return 0;
3199 }
3200 _ACEOF
3201 ac_clean_files_save=$ac_clean_files
3202 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3203 # Try to create an executable without -o first, disregard a.out.
3204 # It will help us diagnose broken compilers, and finding out an intuition
3205 # of exeext.
3206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3207 $as_echo_n "checking whether the C compiler works... " >&6; }
3208 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3209
3210 # The possible output files:
3211 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3212
3213 ac_rmfiles=
3214 for ac_file in $ac_files
3215 do
3216   case $ac_file in
3217     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3218     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3219   esac
3220 done
3221 rm -f $ac_rmfiles
3222
3223 if { { ac_try="$ac_link_default"
3224 case "(($ac_try" in
3225   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3226   *) ac_try_echo=$ac_try;;
3227 esac
3228 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3229 $as_echo "$ac_try_echo"; } >&5
3230   (eval "$ac_link_default") 2>&5
3231   ac_status=$?
3232   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3233   test $ac_status = 0; }; then :
3234   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3235 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3236 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3237 # so that the user can short-circuit this test for compilers unknown to
3238 # Autoconf.
3239 for ac_file in $ac_files ''
3240 do
3241   test -f "$ac_file" || continue
3242   case $ac_file in
3243     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3244         ;;
3245     [ab].out )
3246         # We found the default executable, but exeext='' is most
3247         # certainly right.
3248         break;;
3249     *.* )
3250         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3251         then :; else
3252            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3253         fi
3254         # We set ac_cv_exeext here because the later test for it is not
3255         # safe: cross compilers may not add the suffix if given an `-o'
3256         # argument, so we may need to know it at that point already.
3257         # Even if this section looks crufty: it has the advantage of
3258         # actually working.
3259         break;;
3260     * )
3261         break;;
3262   esac
3263 done
3264 test "$ac_cv_exeext" = no && ac_cv_exeext=
3265
3266 else
3267   ac_file=''
3268 fi
3269 if test -z "$ac_file"; then :
3270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3271 $as_echo "no" >&6; }
3272 $as_echo "$as_me: failed program was:" >&5
3273 sed 's/^/| /' conftest.$ac_ext >&5
3274
3275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3276 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3277 as_fn_error 77 "C compiler cannot create executables
3278 See \`config.log' for more details" "$LINENO" 5; }
3279 else
3280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3281 $as_echo "yes" >&6; }
3282 fi
3283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3284 $as_echo_n "checking for C compiler default output file name... " >&6; }
3285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3286 $as_echo "$ac_file" >&6; }
3287 ac_exeext=$ac_cv_exeext
3288
3289 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3290 ac_clean_files=$ac_clean_files_save
3291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3292 $as_echo_n "checking for suffix of executables... " >&6; }
3293 if { { ac_try="$ac_link"
3294 case "(($ac_try" in
3295   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3296   *) ac_try_echo=$ac_try;;
3297 esac
3298 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3299 $as_echo "$ac_try_echo"; } >&5
3300   (eval "$ac_link") 2>&5
3301   ac_status=$?
3302   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3303   test $ac_status = 0; }; then :
3304   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3305 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3306 # work properly (i.e., refer to `conftest.exe'), while it won't with
3307 # `rm'.
3308 for ac_file in conftest.exe conftest conftest.*; do
3309   test -f "$ac_file" || continue
3310   case $ac_file in
3311     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3312     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3313           break;;
3314     * ) break;;
3315   esac
3316 done
3317 else
3318   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3319 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3320 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3321 See \`config.log' for more details" "$LINENO" 5; }
3322 fi
3323 rm -rf conftest conftest$ac_cv_exeext
3324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3325 $as_echo "$ac_cv_exeext" >&6; }
3326
3327 rm -rf conftest.$ac_ext
3328 EXEEXT=$ac_cv_exeext
3329 ac_exeext=$EXEEXT
3330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3331 /* end confdefs.h.  */
3332 #include <stdio.h>
3333 int
3334 main ()
3335 {
3336 FILE *f = fopen ("conftest.out", "w");
3337  return ferror (f) || fclose (f) != 0;
3338
3339   ;
3340   return 0;
3341 }
3342 _ACEOF
3343 ac_clean_files="$ac_clean_files conftest.out"
3344 # Check that the compiler produces executables we can run.  If not, either
3345 # the compiler is broken, or we cross compile.
3346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3347 $as_echo_n "checking whether we are cross compiling... " >&6; }
3348 if test "$cross_compiling" != yes; then
3349   { { ac_try="$ac_link"
3350 case "(($ac_try" in
3351   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3352   *) ac_try_echo=$ac_try;;
3353 esac
3354 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3355 $as_echo "$ac_try_echo"; } >&5
3356   (eval "$ac_link") 2>&5
3357   ac_status=$?
3358   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3359   test $ac_status = 0; }
3360   if { ac_try='./conftest$ac_cv_exeext'
3361   { { case "(($ac_try" in
3362   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3363   *) ac_try_echo=$ac_try;;
3364 esac
3365 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3366 $as_echo "$ac_try_echo"; } >&5
3367   (eval "$ac_try") 2>&5
3368   ac_status=$?
3369   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3370   test $ac_status = 0; }; }; then
3371     cross_compiling=no
3372   else
3373     if test "$cross_compiling" = maybe; then
3374         cross_compiling=yes
3375     else
3376         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3377 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3378 as_fn_error $? "cannot run C compiled programs.
3379 If you meant to cross compile, use \`--host'.
3380 See \`config.log' for more details" "$LINENO" 5; }
3381     fi
3382   fi
3383 fi
3384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3385 $as_echo "$cross_compiling" >&6; }
3386
3387 rm -rf conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3388 ac_clean_files=$ac_clean_files_save
3389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3390 $as_echo_n "checking for suffix of object files... " >&6; }
3391 if ${ac_cv_objext+:} false; then :
3392   $as_echo_n "(cached) " >&6
3393 else
3394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3395 /* end confdefs.h.  */
3396
3397 int
3398 main ()
3399 {
3400
3401   ;
3402   return 0;
3403 }
3404 _ACEOF
3405 rm -rf conftest.o conftest.obj
3406 if { { ac_try="$ac_compile"
3407 case "(($ac_try" in
3408   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3409   *) ac_try_echo=$ac_try;;
3410 esac
3411 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3412 $as_echo "$ac_try_echo"; } >&5
3413   (eval "$ac_compile") 2>&5
3414   ac_status=$?
3415   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3416   test $ac_status = 0; }; then :
3417   for ac_file in conftest.o conftest.obj conftest.*; do
3418   test -f "$ac_file" || continue;
3419   case $ac_file in
3420     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3421     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3422        break;;
3423   esac
3424 done
3425 else
3426   $as_echo "$as_me: failed program was:" >&5
3427 sed 's/^/| /' conftest.$ac_ext >&5
3428
3429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3430 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3431 as_fn_error $? "cannot compute suffix of object files: cannot compile
3432 See \`config.log' for more details" "$LINENO" 5; }
3433 fi
3434 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
3435 fi
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3437 $as_echo "$ac_cv_objext" >&6; }
3438 OBJEXT=$ac_cv_objext
3439 ac_objext=$OBJEXT
3440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3441 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3442 if ${ac_cv_c_compiler_gnu+:} false; then :
3443   $as_echo_n "(cached) " >&6
3444 else
3445   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3446 /* end confdefs.h.  */
3447
3448 int
3449 main ()
3450 {
3451 #ifndef __GNUC__
3452        choke me
3453 #endif
3454
3455   ;
3456   return 0;
3457 }
3458 _ACEOF
3459 if ac_fn_c_try_compile "$LINENO"; then :
3460   ac_compiler_gnu=yes
3461 else
3462   ac_compiler_gnu=no
3463 fi
3464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3465 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3466
3467 fi
3468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3469 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3470 if test $ac_compiler_gnu = yes; then
3471   GCC=yes
3472 else
3473   GCC=
3474 fi
3475 ac_test_CFLAGS=${CFLAGS+set}
3476 ac_save_CFLAGS=$CFLAGS
3477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3478 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3479 if ${ac_cv_prog_cc_g+:} false; then :
3480   $as_echo_n "(cached) " >&6
3481 else
3482   ac_save_c_werror_flag=$ac_c_werror_flag
3483    ac_c_werror_flag=yes
3484    ac_cv_prog_cc_g=no
3485    CFLAGS="-g"
3486    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3487 /* end confdefs.h.  */
3488
3489 int
3490 main ()
3491 {
3492
3493   ;
3494   return 0;
3495 }
3496 _ACEOF
3497 if ac_fn_c_try_compile "$LINENO"; then :
3498   ac_cv_prog_cc_g=yes
3499 else
3500   CFLAGS=""
3501       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3502 /* end confdefs.h.  */
3503
3504 int
3505 main ()
3506 {
3507
3508   ;
3509   return 0;
3510 }
3511 _ACEOF
3512 if ac_fn_c_try_compile "$LINENO"; then :
3513
3514 else
3515   ac_c_werror_flag=$ac_save_c_werror_flag
3516          CFLAGS="-g"
3517          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3518 /* end confdefs.h.  */
3519
3520 int
3521 main ()
3522 {
3523
3524   ;
3525   return 0;
3526 }
3527 _ACEOF
3528 if ac_fn_c_try_compile "$LINENO"; then :
3529   ac_cv_prog_cc_g=yes
3530 fi
3531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3532 fi
3533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3534 fi
3535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3536    ac_c_werror_flag=$ac_save_c_werror_flag
3537 fi
3538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3539 $as_echo "$ac_cv_prog_cc_g" >&6; }
3540 if test "$ac_test_CFLAGS" = set; then
3541   CFLAGS=$ac_save_CFLAGS
3542 elif test $ac_cv_prog_cc_g = yes; then
3543   if test "$GCC" = yes; then
3544     CFLAGS="-g -O2"
3545   else
3546     CFLAGS="-g"
3547   fi
3548 else
3549   if test "$GCC" = yes; then
3550     CFLAGS="-O2"
3551   else
3552     CFLAGS=
3553   fi
3554 fi
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3556 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3557 if ${ac_cv_prog_cc_c89+:} false; then :
3558   $as_echo_n "(cached) " >&6
3559 else
3560   ac_cv_prog_cc_c89=no
3561 ac_save_CC=$CC
3562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3563 /* end confdefs.h.  */
3564 #include <stdarg.h>
3565 #include <stdio.h>
3566 struct stat;
3567 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3568 struct buf { int x; };
3569 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3570 static char *e (p, i)
3571      char **p;
3572      int i;
3573 {
3574   return p[i];
3575 }
3576 static char *f (char * (*g) (char **, int), char **p, ...)
3577 {
3578   char *s;
3579   va_list v;
3580   va_start (v,p);
3581   s = g (p, va_arg (v,int));
3582   va_end (v);
3583   return s;
3584 }
3585
3586 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3587    function prototypes and stuff, but not '\xHH' hex character constants.
3588    These don't provoke an error unfortunately, instead are silently treated
3589    as 'x'.  The following induces an error, until -std is added to get
3590    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3591    array size at least.  It's necessary to write '\x00'==0 to get something
3592    that's true only with -std.  */
3593 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3594
3595 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3596    inside strings and character constants.  */
3597 #define FOO(x) 'x'
3598 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3599
3600 int test (int i, double x);
3601 struct s1 {int (*f) (int a);};
3602 struct s2 {int (*f) (double a);};
3603 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3604 int argc;
3605 char **argv;
3606 int
3607 main ()
3608 {
3609 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3610   ;
3611   return 0;
3612 }
3613 _ACEOF
3614 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3615         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3616 do
3617   CC="$ac_save_CC $ac_arg"
3618   if ac_fn_c_try_compile "$LINENO"; then :
3619   ac_cv_prog_cc_c89=$ac_arg
3620 fi
3621 rm -f core conftest.err conftest.$ac_objext
3622   test "x$ac_cv_prog_cc_c89" != "xno" && break
3623 done
3624 rm -rf conftest.$ac_ext
3625 CC=$ac_save_CC
3626
3627 fi
3628 # AC_CACHE_VAL
3629 case "x$ac_cv_prog_cc_c89" in
3630   x)
3631     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3632 $as_echo "none needed" >&6; } ;;
3633   xno)
3634     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3635 $as_echo "unsupported" >&6; } ;;
3636   *)
3637     CC="$CC $ac_cv_prog_cc_c89"
3638     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3639 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3640 esac
3641 if test "x$ac_cv_prog_cc_c89" != xno; then :
3642
3643 fi
3644
3645 ac_ext=c
3646 ac_cpp='$CPP $CPPFLAGS'
3647 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3648 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3650
3651
3652
3653
3654   if test -z "$GCC"; then
3655     # not using GCC
3656     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to request ANSI compilation" >&5
3657 $as_echo_n "checking how to request ANSI compilation... " >&6; }
3658     case "$host" in
3659       *-hpux* )
3660         { $as_echo "$as_me:${as_lineno-$LINENO}: result: HPUX: adding -Ae" >&5
3661 $as_echo "HPUX: adding -Ae" >&6; }
3662         CC="$CC -Ae"
3663       ;;
3664       *-aix* )
3665         { $as_echo "$as_me:${as_lineno-$LINENO}: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3666 $as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3667         CC="$CC -qlanglvl=ansi -qhalt=e"
3668       ;;
3669       *-dec-* )
3670         { $as_echo "$as_me:${as_lineno-$LINENO}: result: DEC: adding -std1 -ieee" >&5
3671 $as_echo "DEC: adding -std1 -ieee" >&6; }
3672         CC="$CC -std1"
3673       ;;
3674       *)
3675         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no idea" >&5
3676 $as_echo "no idea" >&6; }
3677       ;;
3678     esac
3679   else
3680     # using GCC
3681     case "$host" in
3682       *-solaris*)
3683         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris: adding -D__EXTENSIONS__" >&5
3684 $as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
3685         CC="$CC -D__EXTENSIONS__"
3686       ;;
3687     esac
3688   fi
3689
3690   OBJCC="$CC"
3691
3692   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler works on ANSI C" >&5
3693 $as_echo_n "checking whether the compiler works on ANSI C... " >&6; }
3694   if test "$cross_compiling" = yes; then :
3695   as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
3696 else
3697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3698 /* end confdefs.h.  */
3699  main(int ac, char **av) { return 0; }
3700 _ACEOF
3701 if ac_fn_c_try_run "$LINENO"; then :
3702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3703 $as_echo "yes" >&6; }
3704 else
3705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3706 $as_echo "no" >&6; }
3707      as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
3708 fi
3709 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3710   conftest.$ac_objext conftest.beam conftest.$ac_ext
3711 fi
3712
3713
3714   if test -n "$GCC"; then
3715     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on gcc compiler warnings." >&5
3716 $as_echo "Turning on gcc compiler warnings." >&6; }
3717     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3718     OBJCC="$OBJCC -Wall"
3719     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
3720     # and so perhaps now we can do without -pedantic?
3721   else
3722     case "$host" in
3723       *-irix5* |*-irix6.0-3* )
3724         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on SGI compiler warnings." >&5
3725 $as_echo "Turning on SGI compiler warnings." >&6; }
3726         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3727       ;;
3728 #     *-dec-osf* )
3729 #       if test -z "$GCC"; then
3730 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3731 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3732 #       fi
3733 #     ;;
3734     esac
3735   fi
3736
3737 if test -n "$GCC"; then
3738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wno-overlength-strings" >&5
3739 $as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
3740 if ${ac_cv_gcc_accepts_no_overlength+:} false; then :
3741   $as_echo_n "(cached) " >&6
3742 else
3743   rm -rf conftest.$ac_ext
3744      touch conftest.$ac_ext
3745      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3746           grep unrecognized >/dev/null ); then
3747        ac_cv_gcc_accepts_no_overlength=no
3748      else
3749        ac_cv_gcc_accepts_no_overlength=yes
3750        CC="$CC -Wno-overlength-strings"
3751      fi
3752 fi
3753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_overlength" >&5
3754 $as_echo "$ac_cv_gcc_accepts_no_overlength" >&6; }
3755    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
3756   fi
3757
3758 if test -n "$GCC"; then
3759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3760 $as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
3761 if ${ac_cv_gcc_accepts_no_decl_after+:} false; then :
3762   $as_echo_n "(cached) " >&6
3763 else
3764   rm -rf conftest.$ac_ext
3765      touch conftest.$ac_ext
3766      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3767           grep unrecognized >/dev/null ); then
3768        ac_cv_gcc_accepts_no_decl_after=no
3769      else
3770        ac_cv_gcc_accepts_no_decl_after=yes
3771        CC="$CC -Wdeclaration-after-statement"
3772      fi
3773 fi
3774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_decl_after" >&5
3775 $as_echo "$ac_cv_gcc_accepts_no_decl_after" >&6; }
3776    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
3777   fi
3778
3779 if test -n "$GCC"; then
3780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -no-cpp-precomp" >&5
3781 $as_echo_n "checking whether gcc accepts -no-cpp-precomp... " >&6; }
3782 if ${ac_cv_gcc_accepts_no_cpp_precomp+:} false; then :
3783   $as_echo_n "(cached) " >&6
3784 else
3785   rm -rf conftest.$ac_ext
3786      touch conftest.$ac_ext
3787      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3788           grep unrecognized >/dev/null ); then
3789        ac_cv_gcc_accepts_no_cpp_precomp=no
3790      else
3791        ac_cv_gcc_accepts_no_cpp_precomp=yes
3792        CC="$CC -no-cpp-precomp"
3793      fi
3794 fi
3795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3796 $as_echo "$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3797    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3798   fi
3799
3800 if test -n "$GCC"; then
3801
3802   case "$host" in
3803     *-darwin* )
3804       # Fucking Apple let // comments sneak into OpenGL headers, so
3805       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
3806     ;;
3807    *)
3808      if test -n "$GCC"; then
3809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -std=c89" >&5
3810 $as_echo_n "checking whether gcc accepts -std=c89... " >&6; }
3811 if ${ac_cv_gcc_accepts_std+:} false; then :
3812   $as_echo_n "(cached) " >&6
3813 else
3814   rm -rf conftest.$ac_ext
3815      touch conftest.$ac_ext
3816      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3817           grep unrecognized >/dev/null ); then
3818        ac_cv_gcc_accepts_std=no
3819      else
3820        ac_cv_gcc_accepts_std=yes
3821        CC="$CC -std=c89"
3822      fi
3823 fi
3824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_std" >&5
3825 $as_echo "$ac_cv_gcc_accepts_std" >&6; }
3826    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3827   fi
3828
3829    ;;
3830   esac
3831
3832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling C++ comments in ANSI C code." >&5
3833 $as_echo "Disabling C++ comments in ANSI C code." >&6; }
3834    #
3835    # The reason that // comments are banned from xscreensaver is that gcc is
3836    # basically the only compiler in the world that supports them in C code.
3837    # All other vendors support them only in their C++ compilers, not in their
3838    # ANSI C compilers.  This means that it's a portability problem: every time
3839    # these comments have snuck into the xscreensaver source code, I've gotten
3840    # complaints about it the next day.  So we turn off support for them in gcc
3841    # as well to prevent them from accidentially slipping in.
3842    #
3843    if test "$ac_gcc_accepts_std" = yes ; then
3844      #
3845      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3846      # (That appears to be the only additional preprocessor symbol
3847      # it defines, in addition to the syntax changes it makes.)
3848      #
3849      # -std=gnu89 is no good, because // comments were a GNU extension
3850      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3851      # with -std=gnu89 but not with -std=c89.)
3852      #
3853      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
3854      CC="$CC -U__STRICT_ANSI__"
3855 #   else
3856 #     # The old way:
3857 #     CC="$CC -Wp,-lang-c89"
3858    fi
3859   fi
3860
3861 ac_ext=c
3862 ac_cpp='$CPP $CPPFLAGS'
3863 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3864 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3865 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3867 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3868 # On Suns, sometimes $CPP names a directory.
3869 if test -n "$CPP" && test -d "$CPP"; then
3870   CPP=
3871 fi
3872 if test -z "$CPP"; then
3873   if ${ac_cv_prog_CPP+:} false; then :
3874   $as_echo_n "(cached) " >&6
3875 else
3876       # Double quotes because CPP needs to be expanded
3877     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3878     do
3879       ac_preproc_ok=false
3880 for ac_c_preproc_warn_flag in '' yes
3881 do
3882   # Use a header file that comes with gcc, so configuring glibc
3883   # with a fresh cross-compiler works.
3884   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3885   # <limits.h> exists even on freestanding compilers.
3886   # On the NeXT, cc -E runs the code through the compiler's parser,
3887   # not just through cpp. "Syntax error" is here to catch this case.
3888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3889 /* end confdefs.h.  */
3890 #ifdef __STDC__
3891 # include <limits.h>
3892 #else
3893 # include <assert.h>
3894 #endif
3895                      Syntax error
3896 _ACEOF
3897 if ac_fn_c_try_cpp "$LINENO"; then :
3898
3899 else
3900   # Broken: fails on valid input.
3901 continue
3902 fi
3903 rm -rf conftest.err conftest.i conftest.$ac_ext
3904
3905   # OK, works on sane cases.  Now check whether nonexistent headers
3906   # can be detected and how.
3907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3908 /* end confdefs.h.  */
3909 #include <ac_nonexistent.h>
3910 _ACEOF
3911 if ac_fn_c_try_cpp "$LINENO"; then :
3912   # Broken: success on invalid input.
3913 continue
3914 else
3915   # Passes both tests.
3916 ac_preproc_ok=:
3917 break
3918 fi
3919 rm -rf conftest.err conftest.i conftest.$ac_ext
3920
3921 done
3922 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3923 rm -rf conftest.i conftest.err conftest.$ac_ext
3924 if $ac_preproc_ok; then :
3925   break
3926 fi
3927
3928     done
3929     ac_cv_prog_CPP=$CPP
3930
3931 fi
3932   CPP=$ac_cv_prog_CPP
3933 else
3934   ac_cv_prog_CPP=$CPP
3935 fi
3936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3937 $as_echo "$CPP" >&6; }
3938 ac_preproc_ok=false
3939 for ac_c_preproc_warn_flag in '' yes
3940 do
3941   # Use a header file that comes with gcc, so configuring glibc
3942   # with a fresh cross-compiler works.
3943   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3944   # <limits.h> exists even on freestanding compilers.
3945   # On the NeXT, cc -E runs the code through the compiler's parser,
3946   # not just through cpp. "Syntax error" is here to catch this case.
3947   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3948 /* end confdefs.h.  */
3949 #ifdef __STDC__
3950 # include <limits.h>
3951 #else
3952 # include <assert.h>
3953 #endif
3954                      Syntax error
3955 _ACEOF
3956 if ac_fn_c_try_cpp "$LINENO"; then :
3957
3958 else
3959   # Broken: fails on valid input.
3960 continue
3961 fi
3962 rm -rf conftest.err conftest.i conftest.$ac_ext
3963
3964   # OK, works on sane cases.  Now check whether nonexistent headers
3965   # can be detected and how.
3966   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3967 /* end confdefs.h.  */
3968 #include <ac_nonexistent.h>
3969 _ACEOF
3970 if ac_fn_c_try_cpp "$LINENO"; then :
3971   # Broken: success on invalid input.
3972 continue
3973 else
3974   # Passes both tests.
3975 ac_preproc_ok=:
3976 break
3977 fi
3978 rm -rf conftest.err conftest.i conftest.$ac_ext
3979
3980 done
3981 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3982 rm -rf conftest.i conftest.err conftest.$ac_ext
3983 if $ac_preproc_ok; then :
3984
3985 else
3986   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3987 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3988 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3989 See \`config.log' for more details" "$LINENO" 5; }
3990 fi
3991
3992 ac_ext=c
3993 ac_cpp='$CPP $CPPFLAGS'
3994 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3995 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3996 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3997
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
3999 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4000 if ${ac_cv_c_const+:} false; then :
4001   $as_echo_n "(cached) " >&6
4002 else
4003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4004 /* end confdefs.h.  */
4005
4006 int
4007 main ()
4008 {
4009
4010 #ifndef __cplusplus
4011   /* Ultrix mips cc rejects this sort of thing.  */
4012   typedef int charset[2];
4013   const charset cs = { 0, 0 };
4014   /* SunOS 4.1.1 cc rejects this.  */
4015   char const *const *pcpcc;
4016   char **ppc;
4017   /* NEC SVR4.0.2 mips cc rejects this.  */
4018   struct point {int x, y;};
4019   static struct point const zero = {0,0};
4020   /* AIX XL C 1.02.0.0 rejects this.
4021      It does not let you subtract one const X* pointer from another in
4022      an arm of an if-expression whose if-part is not a constant
4023      expression */
4024   const char *g = "string";
4025   pcpcc = &g + (g ? g-g : 0);
4026   /* HPUX 7.0 cc rejects these. */
4027   ++pcpcc;
4028   ppc = (char**) pcpcc;
4029   pcpcc = (char const *const *) ppc;
4030   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4031     char tx;
4032     char *t = &tx;
4033     char const *s = 0 ? (char *) 0 : (char const *) 0;
4034
4035     *t++ = 0;
4036     if (s) return 0;
4037   }
4038   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4039     int x[] = {25, 17};
4040     const int *foo = &x[0];
4041     ++foo;
4042   }
4043   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4044     typedef const int *iptr;
4045     iptr p = 0;
4046     ++p;
4047   }
4048   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4049        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4050     struct s { int j; const int *ap[3]; } bx;
4051     struct s *b = &bx; b->j = 5;
4052   }
4053   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4054     const int foo = 10;
4055     if (!foo) return 0;
4056   }
4057   return !cs[0] && !zero.x;
4058 #endif
4059
4060   ;
4061   return 0;
4062 }
4063 _ACEOF
4064 if ac_fn_c_try_compile "$LINENO"; then :
4065   ac_cv_c_const=yes
4066 else
4067   ac_cv_c_const=no
4068 fi
4069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4070 fi
4071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4072 $as_echo "$ac_cv_c_const" >&6; }
4073 if test $ac_cv_c_const = no; then
4074
4075 $as_echo "#define const /**/" >>confdefs.h
4076
4077 fi
4078
4079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4080 $as_echo_n "checking for inline... " >&6; }
4081 if ${ac_cv_c_inline+:} false; then :
4082   $as_echo_n "(cached) " >&6
4083 else
4084   ac_cv_c_inline=no
4085 for ac_kw in inline __inline__ __inline; do
4086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4087 /* end confdefs.h.  */
4088 #ifndef __cplusplus
4089 typedef int foo_t;
4090 static $ac_kw foo_t static_foo () {return 0; }
4091 $ac_kw foo_t foo () {return 0; }
4092 #endif
4093
4094 _ACEOF
4095 if ac_fn_c_try_compile "$LINENO"; then :
4096   ac_cv_c_inline=$ac_kw
4097 fi
4098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4099   test "$ac_cv_c_inline" != no && break
4100 done
4101
4102 fi
4103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4104 $as_echo "$ac_cv_c_inline" >&6; }
4105
4106 case $ac_cv_c_inline in
4107   inline | yes) ;;
4108   *)
4109     case $ac_cv_c_inline in
4110       no) ac_val=;;
4111       *) ac_val=$ac_cv_c_inline;;
4112     esac
4113     cat >>confdefs.h <<_ACEOF
4114 #ifndef __cplusplus
4115 #define inline $ac_val
4116 #endif
4117 _ACEOF
4118     ;;
4119 esac
4120
4121
4122 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4123   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bc" >&5
4124 $as_echo_n "checking for bc... " >&6; }
4125   if test "$ac_bc_result" = "15" ; then
4126     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4127 $as_echo "yes" >&6; }
4128   else
4129     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4130 $as_echo "no" >&6; }
4131     echo ''
4132     as_fn_error $? "Your system doesn't have \"bc\", which has been a standard
4133                   part of Unix since the 1970s.  Come back when your vendor
4134                   has grown a clue." "$LINENO" 5
4135   fi
4136
4137
4138 # stuff for Makefiles
4139 # Find a good install program.  We prefer a C program (faster),
4140 # so one script is as good as another.  But avoid the broken or
4141 # incompatible versions:
4142 # SysV /etc/install, /usr/sbin/install
4143 # SunOS /usr/etc/install
4144 # IRIX /sbin/install
4145 # AIX /bin/install
4146 # AmigaOS /C/install, which installs bootblocks on floppy discs
4147 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4148 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4149 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4150 # OS/2's system install, which has a completely different semantic
4151 # ./install, which can be erroneously created by make from ./install.sh.
4152 # Reject install programs that cannot install multiple files.
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4154 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4155 if test -z "$INSTALL"; then
4156 if ${ac_cv_path_install+:} false; then :
4157   $as_echo_n "(cached) " >&6
4158 else
4159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4160 for as_dir in $PATH
4161 do
4162   IFS=$as_save_IFS
4163   test -z "$as_dir" && as_dir=.
4164     # Account for people who put trailing slashes in PATH elements.
4165 case $as_dir/ in #((
4166   ./ | .// | /[cC]/* | \
4167   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4168   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4169   /usr/ucb/* ) ;;
4170   *)
4171     # OSF1 and SCO ODT 3.0 have their own names for install.
4172     # Don't use installbsd from OSF since it installs stuff as root
4173     # by default.
4174     for ac_prog in ginstall scoinst install; do
4175       for ac_exec_ext in '' $ac_executable_extensions; do
4176         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4177           if test $ac_prog = install &&
4178             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4179             # AIX install.  It has an incompatible calling convention.
4180             :
4181           elif test $ac_prog = install &&
4182             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4183             # program-specific install script used by HP pwplus--don't use.
4184             :
4185           else
4186             rm -rf conftest.one conftest.two conftest.dir
4187             echo one > conftest.one
4188             echo two > conftest.two
4189             mkdir conftest.dir
4190             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4191               test -s conftest.one && test -s conftest.two &&
4192               test -s conftest.dir/conftest.one &&
4193               test -s conftest.dir/conftest.two
4194             then
4195               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4196               break 3
4197             fi
4198           fi
4199         fi
4200       done
4201     done
4202     ;;
4203 esac
4204
4205   done
4206 IFS=$as_save_IFS
4207
4208 rm -rf conftest.one conftest.two conftest.dir
4209
4210 fi
4211   if test "${ac_cv_path_install+set}" = set; then
4212     INSTALL=$ac_cv_path_install
4213   else
4214     # As a last resort, use the slow shell script.  Don't cache a
4215     # value for INSTALL within a source directory, because that will
4216     # break other packages using the cache if that directory is
4217     # removed, or if the value is a relative name.
4218     INSTALL=$ac_install_sh
4219   fi
4220 fi
4221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4222 $as_echo "$INSTALL" >&6; }
4223
4224 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4225 # It thinks the first close brace ends the variable substitution.
4226 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4227
4228 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4229
4230 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4231
4232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4233 $as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4234 if ${ac_cv_install_d_creates_dirs+:} false; then :
4235   $as_echo_n "(cached) " >&6
4236 else
4237   ac_cv_install_d_creates_dirs=no
4238      rm -rf conftestdir
4239      if mkdir conftestdir; then
4240        cd conftestdir 2>/dev/null
4241        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4242        if test -d dir1/dir2/. ; then
4243          ac_cv_install_d_creates_dirs=yes
4244        fi
4245        cd .. 2>/dev/null
4246        rm -rf conftestdir
4247      fi
4248
4249 fi
4250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_install_d_creates_dirs" >&5
4251 $as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4252
4253   if test "$ac_cv_install_d_creates_dirs" = no ; then
4254     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"mkdir -p\" creates intermediate directories" >&5
4255 $as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4256 if ${ac_cv_mkdir_p_creates_dirs+:} false; then :
4257   $as_echo_n "(cached) " >&6
4258 else
4259   ac_cv_mkdir_p_creates_dirs=no
4260        rm -rf conftestdir
4261        if mkdir conftestdir; then
4262          cd conftestdir 2>/dev/null
4263          mkdir -p dir1/dir2 >/dev/null 2>&1
4264          if test -d dir1/dir2/. ; then
4265            ac_cv_mkdir_p_creates_dirs=yes
4266          fi
4267          cd .. 2>/dev/null
4268          rm -rf conftestdir
4269        fi
4270
4271 fi
4272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_p_creates_dirs" >&5
4273 $as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4274   fi
4275
4276   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4277     INSTALL_DIRS='${INSTALL} -d'
4278   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4279     INSTALL_DIRS='mkdir -p'
4280   else
4281     # any other ideas?
4282     INSTALL_DIRS='${INSTALL} -d'
4283   fi
4284
4285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4286 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4287 set x ${MAKE-make}
4288 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4289 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4290   $as_echo_n "(cached) " >&6
4291 else
4292   cat >conftest.make <<\_ACEOF
4293 SHELL = /bin/sh
4294 all:
4295         @echo '@@@%%%=$(MAKE)=@@@%%%'
4296 _ACEOF
4297 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4298 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4299   *@@@%%%=?*=@@@%%%*)
4300     eval ac_cv_prog_make_${ac_make}_set=yes;;
4301   *)
4302     eval ac_cv_prog_make_${ac_make}_set=no;;
4303 esac
4304 rm -rf conftest.make
4305 fi
4306 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4308 $as_echo "yes" >&6; }
4309   SET_MAKE=
4310 else
4311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4312 $as_echo "no" >&6; }
4313   SET_MAKE="MAKE=${MAKE-make}"
4314 fi
4315
4316
4317 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4318 # That's wrong: it should be set to '${INSTALL}', so that one can
4319 # implement the "install-strip" target properly (strip executables,
4320 # but do not try to strip scripts.)
4321 #
4322 INSTALL_SCRIPT='${INSTALL}'
4323
4324 # random libc stuff
4325
4326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4327 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4328 if ${ac_cv_path_GREP+:} false; then :
4329   $as_echo_n "(cached) " >&6
4330 else
4331   if test -z "$GREP"; then
4332   ac_path_GREP_found=false
4333   # Loop through the user's path and test for each of PROGNAME-LIST
4334   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4335 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4336 do
4337   IFS=$as_save_IFS
4338   test -z "$as_dir" && as_dir=.
4339     for ac_prog in grep ggrep; do
4340     for ac_exec_ext in '' $ac_executable_extensions; do
4341       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4342       as_fn_executable_p "$ac_path_GREP" || continue
4343 # Check for GNU ac_path_GREP and select it if it is found.
4344   # Check for GNU $ac_path_GREP
4345 case `"$ac_path_GREP" --version 2>&1` in
4346 *GNU*)
4347   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4348 *)
4349   ac_count=0
4350   $as_echo_n 0123456789 >"conftest.in"
4351   while :
4352   do
4353     cat "conftest.in" "conftest.in" >"conftest.tmp"
4354     mv "conftest.tmp" "conftest.in"
4355     cp "conftest.in" "conftest.nl"
4356     $as_echo 'GREP' >> "conftest.nl"
4357     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4358     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4359     as_fn_arith $ac_count + 1 && ac_count=$as_val
4360     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4361       # Best one so far, save it but keep looking for a better one
4362       ac_cv_path_GREP="$ac_path_GREP"
4363       ac_path_GREP_max=$ac_count
4364     fi
4365     # 10*(2^10) chars as input seems more than enough
4366     test $ac_count -gt 10 && break
4367   done
4368   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4369 esac
4370
4371       $ac_path_GREP_found && break 3
4372     done
4373   done
4374   done
4375 IFS=$as_save_IFS
4376   if test -z "$ac_cv_path_GREP"; then
4377     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4378   fi
4379 else
4380   ac_cv_path_GREP=$GREP
4381 fi
4382
4383 fi
4384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4385 $as_echo "$ac_cv_path_GREP" >&6; }
4386  GREP="$ac_cv_path_GREP"
4387
4388
4389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4390 $as_echo_n "checking for egrep... " >&6; }
4391 if ${ac_cv_path_EGREP+:} false; then :
4392   $as_echo_n "(cached) " >&6
4393 else
4394   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4395    then ac_cv_path_EGREP="$GREP -E"
4396    else
4397      if test -z "$EGREP"; then
4398   ac_path_EGREP_found=false
4399   # Loop through the user's path and test for each of PROGNAME-LIST
4400   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4401 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4402 do
4403   IFS=$as_save_IFS
4404   test -z "$as_dir" && as_dir=.
4405     for ac_prog in egrep; do
4406     for ac_exec_ext in '' $ac_executable_extensions; do
4407       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4408       as_fn_executable_p "$ac_path_EGREP" || continue
4409 # Check for GNU ac_path_EGREP and select it if it is found.
4410   # Check for GNU $ac_path_EGREP
4411 case `"$ac_path_EGREP" --version 2>&1` in
4412 *GNU*)
4413   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4414 *)
4415   ac_count=0
4416   $as_echo_n 0123456789 >"conftest.in"
4417   while :
4418   do
4419     cat "conftest.in" "conftest.in" >"conftest.tmp"
4420     mv "conftest.tmp" "conftest.in"
4421     cp "conftest.in" "conftest.nl"
4422     $as_echo 'EGREP' >> "conftest.nl"
4423     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4424     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4425     as_fn_arith $ac_count + 1 && ac_count=$as_val
4426     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4427       # Best one so far, save it but keep looking for a better one
4428       ac_cv_path_EGREP="$ac_path_EGREP"
4429       ac_path_EGREP_max=$ac_count
4430     fi
4431     # 10*(2^10) chars as input seems more than enough
4432     test $ac_count -gt 10 && break
4433   done
4434   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4435 esac
4436
4437       $ac_path_EGREP_found && break 3
4438     done
4439   done
4440   done
4441 IFS=$as_save_IFS
4442   if test -z "$ac_cv_path_EGREP"; then
4443     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4444   fi
4445 else
4446   ac_cv_path_EGREP=$EGREP
4447 fi
4448
4449    fi
4450 fi
4451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4452 $as_echo "$ac_cv_path_EGREP" >&6; }
4453  EGREP="$ac_cv_path_EGREP"
4454
4455
4456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4457 $as_echo_n "checking for ANSI C header files... " >&6; }
4458 if ${ac_cv_header_stdc+:} false; then :
4459   $as_echo_n "(cached) " >&6
4460 else
4461   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4462 /* end confdefs.h.  */
4463 #include <stdlib.h>
4464 #include <stdarg.h>
4465 #include <string.h>
4466 #include <float.h>
4467
4468 int
4469 main ()
4470 {
4471
4472   ;
4473   return 0;
4474 }
4475 _ACEOF
4476 if ac_fn_c_try_compile "$LINENO"; then :
4477   ac_cv_header_stdc=yes
4478 else
4479   ac_cv_header_stdc=no
4480 fi
4481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4482
4483 if test $ac_cv_header_stdc = yes; then
4484   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4485   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486 /* end confdefs.h.  */
4487 #include <string.h>
4488
4489 _ACEOF
4490 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4491   $EGREP "memchr" >/dev/null 2>&1; then :
4492
4493 else
4494   ac_cv_header_stdc=no
4495 fi
4496 rm -rf conftest*
4497
4498 fi
4499
4500 if test $ac_cv_header_stdc = yes; then
4501   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4503 /* end confdefs.h.  */
4504 #include <stdlib.h>
4505
4506 _ACEOF
4507 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4508   $EGREP "free" >/dev/null 2>&1; then :
4509
4510 else
4511   ac_cv_header_stdc=no
4512 fi
4513 rm -rf conftest*
4514
4515 fi
4516
4517 if test $ac_cv_header_stdc = yes; then
4518   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4519   if test "$cross_compiling" = yes; then :
4520   :
4521 else
4522   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4523 /* end confdefs.h.  */
4524 #include <ctype.h>
4525 #include <stdlib.h>
4526 #if ((' ' & 0x0FF) == 0x020)
4527 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4528 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4529 #else
4530 # define ISLOWER(c) \
4531                    (('a' <= (c) && (c) <= 'i') \
4532                      || ('j' <= (c) && (c) <= 'r') \
4533                      || ('s' <= (c) && (c) <= 'z'))
4534 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4535 #endif
4536
4537 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4538 int
4539 main ()
4540 {
4541   int i;
4542   for (i = 0; i < 256; i++)
4543     if (XOR (islower (i), ISLOWER (i))
4544         || toupper (i) != TOUPPER (i))
4545       return 2;
4546   return 0;
4547 }
4548 _ACEOF
4549 if ac_fn_c_try_run "$LINENO"; then :
4550
4551 else
4552   ac_cv_header_stdc=no
4553 fi
4554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4555   conftest.$ac_objext conftest.beam conftest.$ac_ext
4556 fi
4557
4558 fi
4559 fi
4560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4561 $as_echo "$ac_cv_header_stdc" >&6; }
4562 if test $ac_cv_header_stdc = yes; then
4563
4564 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4565
4566 fi
4567
4568 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4569 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4570                   inttypes.h stdint.h unistd.h
4571 do :
4572   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4573 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4574 "
4575 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4576   cat >>confdefs.h <<_ACEOF
4577 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4578 _ACEOF
4579
4580 fi
4581
4582 done
4583
4584
4585 for ac_header in unistd.h
4586 do :
4587   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
4588 if test "x$ac_cv_header_unistd_h" = xyes; then :
4589   cat >>confdefs.h <<_ACEOF
4590 #define HAVE_UNISTD_H 1
4591 _ACEOF
4592
4593 fi
4594
4595 done
4596
4597 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
4598 if test "x$ac_cv_type_mode_t" = xyes; then :
4599
4600 else
4601
4602 cat >>confdefs.h <<_ACEOF
4603 #define mode_t int
4604 _ACEOF
4605
4606 fi
4607
4608 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
4609 if test "x$ac_cv_type_pid_t" = xyes; then :
4610
4611 else
4612
4613 cat >>confdefs.h <<_ACEOF
4614 #define pid_t int
4615 _ACEOF
4616
4617 fi
4618
4619 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
4620 if test "x$ac_cv_type_size_t" = xyes; then :
4621
4622 else
4623
4624 cat >>confdefs.h <<_ACEOF
4625 #define size_t unsigned int
4626 _ACEOF
4627
4628 fi
4629
4630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
4631 $as_echo_n "checking return type of signal handlers... " >&6; }
4632 if ${ac_cv_type_signal+:} false; then :
4633   $as_echo_n "(cached) " >&6
4634 else
4635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4636 /* end confdefs.h.  */
4637 #include <sys/types.h>
4638 #include <signal.h>
4639
4640 int
4641 main ()
4642 {
4643 return *(signal (0, 0)) (0) == 1;
4644   ;
4645   return 0;
4646 }
4647 _ACEOF
4648 if ac_fn_c_try_compile "$LINENO"; then :
4649   ac_cv_type_signal=int
4650 else
4651   ac_cv_type_signal=void
4652 fi
4653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4654 fi
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
4656 $as_echo "$ac_cv_type_signal" >&6; }
4657
4658 cat >>confdefs.h <<_ACEOF
4659 #define RETSIGTYPE $ac_cv_type_signal
4660 _ACEOF
4661
4662
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
4664 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
4665 if ${ac_cv_header_time+:} false; then :
4666   $as_echo_n "(cached) " >&6
4667 else
4668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4669 /* end confdefs.h.  */
4670 #include <sys/types.h>
4671 #include <sys/time.h>
4672 #include <time.h>
4673
4674 int
4675 main ()
4676 {
4677 if ((struct tm *) 0)
4678 return 0;
4679   ;
4680   return 0;
4681 }
4682 _ACEOF
4683 if ac_fn_c_try_compile "$LINENO"; then :
4684   ac_cv_header_time=yes
4685 else
4686   ac_cv_header_time=no
4687 fi
4688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4689 fi
4690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
4691 $as_echo "$ac_cv_header_time" >&6; }
4692 if test $ac_cv_header_time = yes; then
4693
4694 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
4695
4696 fi
4697
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4699 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4700 if ${ac_cv_header_sys_wait_h+:} false; then :
4701   $as_echo_n "(cached) " >&6
4702 else
4703   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4704 /* end confdefs.h.  */
4705 #include <sys/types.h>
4706 #include <sys/wait.h>
4707 #ifndef WEXITSTATUS
4708 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4709 #endif
4710 #ifndef WIFEXITED
4711 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4712 #endif
4713
4714 int
4715 main ()
4716 {
4717   int s;
4718   wait (&s);
4719   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4720   ;
4721   return 0;
4722 }
4723 _ACEOF
4724 if ac_fn_c_try_compile "$LINENO"; then :
4725   ac_cv_header_sys_wait_h=yes
4726 else
4727   ac_cv_header_sys_wait_h=no
4728 fi
4729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4730 fi
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4732 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
4733 if test $ac_cv_header_sys_wait_h = yes; then
4734
4735 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
4736
4737 fi
4738
4739 ac_header_dirent=no
4740 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4741   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
4743 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
4744 if eval \${$as_ac_Header+:} false; then :
4745   $as_echo_n "(cached) " >&6
4746 else
4747   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4748 /* end confdefs.h.  */
4749 #include <sys/types.h>
4750 #include <$ac_hdr>
4751
4752 int
4753 main ()
4754 {
4755 if ((DIR *) 0)
4756 return 0;
4757   ;
4758   return 0;
4759 }
4760 _ACEOF
4761 if ac_fn_c_try_compile "$LINENO"; then :
4762   eval "$as_ac_Header=yes"
4763 else
4764   eval "$as_ac_Header=no"
4765 fi
4766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4767 fi
4768 eval ac_res=\$$as_ac_Header
4769                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
4770 $as_echo "$ac_res" >&6; }
4771 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4772   cat >>confdefs.h <<_ACEOF
4773 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4774 _ACEOF
4775
4776 ac_header_dirent=$ac_hdr; break
4777 fi
4778
4779 done
4780 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4781 if test $ac_header_dirent = dirent.h; then
4782   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
4783 $as_echo_n "checking for library containing opendir... " >&6; }
4784 if ${ac_cv_search_opendir+:} false; then :
4785   $as_echo_n "(cached) " >&6
4786 else
4787   ac_func_search_save_LIBS=$LIBS
4788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4789 /* end confdefs.h.  */
4790
4791 /* Override any GCC internal prototype to avoid an error.
4792    Use char because int might match the return type of a GCC
4793    builtin and then its argument prototype would still apply.  */
4794 #ifdef __cplusplus
4795 extern "C"
4796 #endif
4797 char opendir ();
4798 int
4799 main ()
4800 {
4801 return opendir ();
4802   ;
4803   return 0;
4804 }
4805 _ACEOF
4806 for ac_lib in '' dir; do
4807   if test -z "$ac_lib"; then
4808     ac_res="none required"
4809   else
4810     ac_res=-l$ac_lib
4811     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4812   fi
4813   if ac_fn_c_try_link "$LINENO"; then :
4814   ac_cv_search_opendir=$ac_res
4815 fi
4816 rm -f core conftest.err conftest.$ac_objext \
4817     conftest$ac_exeext
4818   if ${ac_cv_search_opendir+:} false; then :
4819   break
4820 fi
4821 done
4822 if ${ac_cv_search_opendir+:} false; then :
4823
4824 else
4825   ac_cv_search_opendir=no
4826 fi
4827 rm conftest.$ac_ext
4828 LIBS=$ac_func_search_save_LIBS
4829 fi
4830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
4831 $as_echo "$ac_cv_search_opendir" >&6; }
4832 ac_res=$ac_cv_search_opendir
4833 if test "$ac_res" != no; then :
4834   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4835
4836 fi
4837
4838 else
4839   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
4840 $as_echo_n "checking for library containing opendir... " >&6; }
4841 if ${ac_cv_search_opendir+:} false; then :
4842   $as_echo_n "(cached) " >&6
4843 else
4844   ac_func_search_save_LIBS=$LIBS
4845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4846 /* end confdefs.h.  */
4847
4848 /* Override any GCC internal prototype to avoid an error.
4849    Use char because int might match the return type of a GCC
4850    builtin and then its argument prototype would still apply.  */
4851 #ifdef __cplusplus
4852 extern "C"
4853 #endif
4854 char opendir ();
4855 int
4856 main ()
4857 {
4858 return opendir ();
4859   ;
4860   return 0;
4861 }
4862 _ACEOF
4863 for ac_lib in '' x; do
4864   if test -z "$ac_lib"; then
4865     ac_res="none required"
4866   else
4867     ac_res=-l$ac_lib
4868     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4869   fi
4870   if ac_fn_c_try_link "$LINENO"; then :
4871   ac_cv_search_opendir=$ac_res
4872 fi
4873 rm -f core conftest.err conftest.$ac_objext \
4874     conftest$ac_exeext
4875   if ${ac_cv_search_opendir+:} false; then :
4876   break
4877 fi
4878 done
4879 if ${ac_cv_search_opendir+:} false; then :
4880
4881 else
4882   ac_cv_search_opendir=no
4883 fi
4884 rm conftest.$ac_ext
4885 LIBS=$ac_func_search_save_LIBS
4886 fi
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
4888 $as_echo "$ac_cv_search_opendir" >&6; }
4889 ac_res=$ac_cv_search_opendir
4890 if test "$ac_res" != no; then :
4891   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4892
4893 fi
4894
4895 fi
4896
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call gettimeofday" >&5
4898 $as_echo_n "checking how to call gettimeofday... " >&6; }
4899   if ${ac_cv_gettimeofday_args+:} false; then :
4900   $as_echo_n "(cached) " >&6
4901 else
4902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4903 /* end confdefs.h.  */
4904 #include <stdlib.h>
4905                     #include <sys/time.h>
4906 int
4907 main ()
4908 {
4909 struct timeval tv; struct timezone tzp;
4910                     gettimeofday(&tv, &tzp);
4911   ;
4912   return 0;
4913 }
4914 _ACEOF
4915 if ac_fn_c_try_compile "$LINENO"; then :
4916   ac_gettimeofday_args=2
4917 else
4918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4919 /* end confdefs.h.  */
4920 #include <stdlib.h>
4921                                     #include <sys/time.h>
4922 int
4923 main ()
4924 {
4925 struct timeval tv; gettimeofday(&tv);
4926   ;
4927   return 0;
4928 }
4929 _ACEOF
4930 if ac_fn_c_try_compile "$LINENO"; then :
4931   ac_gettimeofday_args=1
4932 else
4933   ac_gettimeofday_args=0
4934 fi
4935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4936 fi
4937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4938     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4939 fi
4940
4941   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4942   if test "$ac_gettimeofday_args" = 1 ; then
4943     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
4944
4945     { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
4946 $as_echo "one argument" >&6; }
4947   elif test "$ac_gettimeofday_args" = 2 ; then
4948     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
4949
4950     $as_echo "#define GETTIMEOFDAY_TWO_ARGS 1" >>confdefs.h
4951
4952     { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
4953 $as_echo "two arguments" >&6; }
4954   else
4955     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
4956 $as_echo "unknown" >&6; }
4957   fi
4958
4959 # Check whether --enable-largefile was given.
4960 if test "${enable_largefile+set}" = set; then :
4961   enableval=$enable_largefile;
4962 fi
4963
4964 if test "$enable_largefile" != no; then
4965
4966   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4967 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4968 if ${ac_cv_sys_largefile_CC+:} false; then :
4969   $as_echo_n "(cached) " >&6
4970 else
4971   ac_cv_sys_largefile_CC=no
4972      if test "$GCC" != yes; then
4973        ac_save_CC=$CC
4974        while :; do
4975          # IRIX 6.2 and later do not support large files by default,
4976          # so use the C compiler's -n32 option if that helps.
4977          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4978 /* end confdefs.h.  */
4979 #include <sys/types.h>
4980  /* Check that off_t can represent 2**63 - 1 correctly.
4981     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4982     since some C++ compilers masquerading as C compilers
4983     incorrectly reject 9223372036854775807.  */
4984 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4985   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4986                        && LARGE_OFF_T % 2147483647 == 1)
4987                       ? 1 : -1];
4988 int
4989 main ()
4990 {
4991
4992   ;
4993   return 0;
4994 }
4995 _ACEOF
4996          if ac_fn_c_try_compile "$LINENO"; then :
4997   break
4998 fi
4999 rm -f core conftest.err conftest.$ac_objext
5000          CC="$CC -n32"
5001          if ac_fn_c_try_compile "$LINENO"; then :
5002   ac_cv_sys_largefile_CC=' -n32'; break
5003 fi
5004 rm -f core conftest.err conftest.$ac_objext
5005          break
5006        done
5007        CC=$ac_save_CC
5008        rm -rf conftest.$ac_ext
5009     fi
5010 fi
5011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5012 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5013   if test "$ac_cv_sys_largefile_CC" != no; then
5014     CC=$CC$ac_cv_sys_largefile_CC
5015   fi
5016
5017   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5018 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5019 if ${ac_cv_sys_file_offset_bits+:} false; then :
5020   $as_echo_n "(cached) " >&6
5021 else
5022   while :; do
5023   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5024 /* end confdefs.h.  */
5025 #include <sys/types.h>
5026  /* Check that off_t can represent 2**63 - 1 correctly.
5027     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5028     since some C++ compilers masquerading as C compilers
5029     incorrectly reject 9223372036854775807.  */
5030 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5031   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5032                        && LARGE_OFF_T % 2147483647 == 1)
5033                       ? 1 : -1];
5034 int
5035 main ()
5036 {
5037
5038   ;
5039   return 0;
5040 }
5041 _ACEOF
5042 if ac_fn_c_try_compile "$LINENO"; then :
5043   ac_cv_sys_file_offset_bits=no; break
5044 fi
5045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5047 /* end confdefs.h.  */
5048 #define _FILE_OFFSET_BITS 64
5049 #include <sys/types.h>
5050  /* Check that off_t can represent 2**63 - 1 correctly.
5051     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5052     since some C++ compilers masquerading as C compilers
5053     incorrectly reject 9223372036854775807.  */
5054 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5055   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5056                        && LARGE_OFF_T % 2147483647 == 1)
5057                       ? 1 : -1];
5058 int
5059 main ()
5060 {
5061
5062   ;
5063   return 0;
5064 }
5065 _ACEOF
5066 if ac_fn_c_try_compile "$LINENO"; then :
5067   ac_cv_sys_file_offset_bits=64; break
5068 fi
5069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5070   ac_cv_sys_file_offset_bits=unknown
5071   break
5072 done
5073 fi
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5075 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5076 case $ac_cv_sys_file_offset_bits in #(
5077   no | unknown) ;;
5078   *)
5079 cat >>confdefs.h <<_ACEOF
5080 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5081 _ACEOF
5082 ;;
5083 esac
5084 rm -rf conftest*
5085   if test $ac_cv_sys_file_offset_bits = unknown; then
5086     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5087 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5088 if ${ac_cv_sys_large_files+:} false; then :
5089   $as_echo_n "(cached) " >&6
5090 else
5091   while :; do
5092   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5093 /* end confdefs.h.  */
5094 #include <sys/types.h>
5095  /* Check that off_t can represent 2**63 - 1 correctly.
5096     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5097     since some C++ compilers masquerading as C compilers
5098     incorrectly reject 9223372036854775807.  */
5099 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5100   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5101                        && LARGE_OFF_T % 2147483647 == 1)
5102                       ? 1 : -1];
5103 int
5104 main ()
5105 {
5106
5107   ;
5108   return 0;
5109 }
5110 _ACEOF
5111 if ac_fn_c_try_compile "$LINENO"; then :
5112   ac_cv_sys_large_files=no; break
5113 fi
5114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5115   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5116 /* end confdefs.h.  */
5117 #define _LARGE_FILES 1
5118 #include <sys/types.h>
5119  /* Check that off_t can represent 2**63 - 1 correctly.
5120     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5121     since some C++ compilers masquerading as C compilers
5122     incorrectly reject 9223372036854775807.  */
5123 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5124   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5125                        && LARGE_OFF_T % 2147483647 == 1)
5126                       ? 1 : -1];
5127 int
5128 main ()
5129 {
5130
5131   ;
5132   return 0;
5133 }
5134 _ACEOF
5135 if ac_fn_c_try_compile "$LINENO"; then :
5136   ac_cv_sys_large_files=1; break
5137 fi
5138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5139   ac_cv_sys_large_files=unknown
5140   break
5141 done
5142 fi
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5144 $as_echo "$ac_cv_sys_large_files" >&6; }
5145 case $ac_cv_sys_large_files in #(
5146   no | unknown) ;;
5147   *)
5148 cat >>confdefs.h <<_ACEOF
5149 #define _LARGE_FILES $ac_cv_sys_large_files
5150 _ACEOF
5151 ;;
5152 esac
5153 rm -rf conftest*
5154   fi
5155
5156
5157 fi
5158
5159 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5160 do :
5161   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5162 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5163 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5164   cat >>confdefs.h <<_ACEOF
5165 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5166 _ACEOF
5167
5168 fi
5169 done
5170
5171 for ac_func in sigaction syslog realpath setrlimit
5172 do :
5173   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5174 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5175 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5176   cat >>confdefs.h <<_ACEOF
5177 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5178 _ACEOF
5179
5180 fi
5181 done
5182
5183 for ac_func in setlocale
5184 do :
5185   ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
5186 if test "x$ac_cv_func_setlocale" = xyes; then :
5187   cat >>confdefs.h <<_ACEOF
5188 #define HAVE_SETLOCALE 1
5189 _ACEOF
5190
5191 fi
5192 done
5193
5194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmp" >&5
5195 $as_echo_n "checking for struct icmp... " >&6; }
5196 if ${ac_cv_have_icmp+:} false; then :
5197   $as_echo_n "(cached) " >&6
5198 else
5199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5200 /* end confdefs.h.  */
5201 #include <stdlib.h>
5202                    #include <stdio.h>
5203                    #include <math.h>
5204                    #include <unistd.h>
5205                    #include <limits.h>
5206                    #include <signal.h>
5207                    #include <fcntl.h>
5208                    #include <sys/types.h>
5209                    #include <sys/time.h>
5210                    #include <sys/ipc.h>
5211                    #include <sys/shm.h>
5212                    #include <sys/socket.h>
5213                    #include <netinet/in_systm.h>
5214                    #include <netinet/in.h>
5215                    #include <netinet/ip.h>
5216                    #include <netinet/ip_icmp.h>
5217                    #include <netinet/udp.h>
5218                    #include <arpa/inet.h>
5219                    #include <netdb.h>
5220 int
5221 main ()
5222 {
5223 struct icmp i;
5224                    struct sockaddr s;
5225                    struct sockaddr_in si;
5226                    struct ip ip;
5227                    i.icmp_type = ICMP_ECHO;
5228                    i.icmp_code = 0;
5229                    i.icmp_cksum = 0;
5230                    i.icmp_id = 0;
5231                    i.icmp_seq = 0;
5232                    si.sin_family = AF_INET;
5233                    #if defined(__DECC) || defined(_IP_VHL)
5234                    ip.ip_vhl = 0;
5235                    #else
5236                    ip.ip_hl = 0;
5237                    #endif
5238
5239   ;
5240   return 0;
5241 }
5242 _ACEOF
5243 if ac_fn_c_try_compile "$LINENO"; then :
5244   ac_cv_have_icmp=yes
5245 else
5246   ac_cv_have_icmp=no
5247 fi
5248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5249 fi
5250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmp" >&5
5251 $as_echo "$ac_cv_have_icmp" >&6; }
5252  if test "$ac_cv_have_icmp" = yes ; then
5253    $as_echo "#define HAVE_ICMP 1" >>confdefs.h
5254
5255  fi
5256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmphdr" >&5
5257 $as_echo_n "checking for struct icmphdr... " >&6; }
5258 if ${ac_cv_have_icmphdr+:} false; then :
5259   $as_echo_n "(cached) " >&6
5260 else
5261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5262 /* end confdefs.h.  */
5263 #include <stdlib.h>
5264                    #include <stdio.h>
5265                    #include <math.h>
5266                    #include <unistd.h>
5267                    #include <limits.h>
5268                    #include <signal.h>
5269                    #include <fcntl.h>
5270                    #include <sys/types.h>
5271                    #include <sys/time.h>
5272                    #include <sys/ipc.h>
5273                    #include <sys/shm.h>
5274                    #include <sys/socket.h>
5275                    #include <netinet/in_systm.h>
5276                    #include <netinet/in.h>
5277                    #include <netinet/ip.h>
5278                    #include <netinet/ip_icmp.h>
5279                    #include <netinet/udp.h>
5280                    #include <arpa/inet.h>
5281                    #include <netdb.h>
5282 int
5283 main ()
5284 {
5285 struct icmphdr i;
5286                    struct sockaddr s;
5287                    struct sockaddr_in si;
5288                    struct ip ip;
5289                    i.type = ICMP_ECHO;
5290                    i.code = 0;
5291                    i.checksum = 0;
5292                    i.un.echo.id = 0;
5293                    i.un.echo.sequence = 0;
5294                    si.sin_family = AF_INET;
5295                    ip.ip_hl = 0;
5296   ;
5297   return 0;
5298 }
5299 _ACEOF
5300 if ac_fn_c_try_compile "$LINENO"; then :
5301   ac_cv_have_icmphdr=yes
5302 else
5303   ac_cv_have_icmphdr=no
5304 fi
5305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5306 fi
5307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmphdr" >&5
5308 $as_echo "$ac_cv_have_icmphdr" >&6; }
5309  if test "$ac_cv_have_icmphdr" = yes ; then
5310    $as_echo "#define HAVE_ICMPHDR 1" >>confdefs.h
5311
5312  fi
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs" >&5
5314 $as_echo_n "checking for getifaddrs... " >&6; }
5315 if ${ac_cv_have_getifaddrs+:} false; then :
5316   $as_echo_n "(cached) " >&6
5317 else
5318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5319 /* end confdefs.h.  */
5320 #include <stdlib.h>
5321                    #include <unistd.h>
5322                    #include <arpa/inet.h>
5323                    #include <ifaddrs.h>
5324 int
5325 main ()
5326 {
5327 struct ifaddrs *ifa;
5328                    getifaddrs (&ifa);
5329                    ifa->ifa_next = 0;
5330                    ifa->ifa_addr->sa_family = 0;
5331   ;
5332   return 0;
5333 }
5334 _ACEOF
5335 if ac_fn_c_try_compile "$LINENO"; then :
5336   ac_cv_have_getifaddrs=yes
5337 else
5338   ac_cv_have_getifaddrs=no
5339 fi
5340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5341 fi
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getifaddrs" >&5
5343 $as_echo "$ac_cv_have_getifaddrs" >&6; }
5344  if test "$ac_cv_have_getifaddrs" = yes ; then
5345    $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
5346
5347  fi
5348 for ac_header in crypt.h sys/select.h
5349 do :
5350   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5351 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5352 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5353   cat >>confdefs.h <<_ACEOF
5354 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5355 _ACEOF
5356
5357 fi
5358
5359 done
5360
5361 for ac_prog in perl5 perl
5362 do
5363   # Extract the first word of "$ac_prog", so it can be a program name with args.
5364 set dummy $ac_prog; ac_word=$2
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5366 $as_echo_n "checking for $ac_word... " >&6; }
5367 if ${ac_cv_path_PERL+:} false; then :
5368   $as_echo_n "(cached) " >&6
5369 else
5370   case $PERL in
5371   [\\/]* | ?:[\\/]*)
5372   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5373   ;;
5374   *)
5375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5376 for as_dir in $PATH
5377 do
5378   IFS=$as_save_IFS
5379   test -z "$as_dir" && as_dir=.
5380     for ac_exec_ext in '' $ac_executable_extensions; do
5381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5382     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5384     break 2
5385   fi
5386 done
5387   done
5388 IFS=$as_save_IFS
5389
5390   ;;
5391 esac
5392 fi
5393 PERL=$ac_cv_path_PERL
5394 if test -n "$PERL"; then
5395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
5396 $as_echo "$PERL" >&6; }
5397 else
5398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399 $as_echo "no" >&6; }
5400 fi
5401
5402
5403   test -n "$PERL" && break
5404 done
5405
5406   if test -z "$PERL" ; then
5407     PERL_VERSION=0
5408   else
5409     { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5
5410 $as_echo_n "checking perl version... " >&6; }
5411 if ${ac_cv_perl_version+:} false; then :
5412   $as_echo_n "(cached) " >&6
5413 else
5414   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
5415 fi
5416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_perl_version" >&5
5417 $as_echo "$ac_cv_perl_version" >&6; }
5418     PERL_VERSION=$ac_cv_perl_version
5419   fi
5420
5421
5422 if test -z "$PERL" ; then
5423   # don't let it be blank...
5424   PERL=/usr/bin/perl
5425 fi
5426
5427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
5428 $as_echo_n "checking for X... " >&6; }
5429
5430
5431 # Check whether --with-x was given.
5432 if test "${with_x+set}" = set; then :
5433   withval=$with_x;
5434 fi
5435
5436 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5437 if test "x$with_x" = xno; then
5438   # The user explicitly disabled X.
5439   have_x=disabled
5440 else
5441   case $x_includes,$x_libraries in #(
5442     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
5443     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
5444   $as_echo_n "(cached) " >&6
5445 else
5446   # One or both of the vars are not set, and there is no cached value.
5447 ac_x_includes=no ac_x_libraries=no
5448 rm -f -r conftest.dir
5449 if mkdir conftest.dir; then
5450   cd conftest.dir
5451   cat >Imakefile <<'_ACEOF'
5452 incroot:
5453         @echo incroot='${INCROOT}'
5454 usrlibdir:
5455         @echo usrlibdir='${USRLIBDIR}'
5456 libdir:
5457         @echo libdir='${LIBDIR}'
5458 _ACEOF
5459   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
5460     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
5461     for ac_var in incroot usrlibdir libdir; do
5462       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
5463     done
5464     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5465     for ac_extension in a so sl dylib la dll; do
5466       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
5467          test -f "$ac_im_libdir/libX11.$ac_extension"; then
5468         ac_im_usrlibdir=$ac_im_libdir; break
5469       fi
5470     done
5471     # Screen out bogus values from the imake configuration.  They are
5472     # bogus both because they are the default anyway, and because
5473     # using them would break gcc on systems where it needs fixed includes.
5474     case $ac_im_incroot in
5475         /usr/include) ac_x_includes= ;;
5476         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
5477     esac
5478     case $ac_im_usrlibdir in
5479         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
5480         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
5481     esac
5482   fi
5483   cd ..
5484   rm -f -r conftest.dir
5485 fi
5486
5487 # Standard set of common directories for X headers.
5488 # Check X11 before X11Rn because it is often a symlink to the current release.
5489 ac_x_header_dirs='
5490 /usr/X11/include
5491 /usr/X11R7/include
5492 /usr/X11R6/include
5493 /usr/X11R5/include
5494 /usr/X11R4/include
5495
5496 /usr/include/X11
5497 /usr/include/X11R7
5498 /usr/include/X11R6
5499 /usr/include/X11R5
5500 /usr/include/X11R4
5501
5502 /usr/local/X11/include
5503 /usr/local/X11R7/include
5504 /usr/local/X11R6/include
5505 /usr/local/X11R5/include
5506 /usr/local/X11R4/include
5507
5508 /usr/local/include/X11
5509 /usr/local/include/X11R7
5510 /usr/local/include/X11R6
5511 /usr/local/include/X11R5
5512 /usr/local/include/X11R4
5513
5514 /usr/X386/include
5515 /usr/x386/include
5516 /usr/XFree86/include/X11
5517
5518 /usr/include
5519 /usr/local/include
5520 /usr/unsupported/include
5521 /usr/athena/include
5522 /usr/local/x11r5/include
5523 /usr/lpp/Xamples/include
5524
5525 /usr/openwin/include
5526 /usr/openwin/share/include'
5527
5528 if test "$ac_x_includes" = no; then
5529   # Guess where to find include files, by looking for Xlib.h.
5530   # First, try using that file with no special directory specified.
5531   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5532 /* end confdefs.h.  */
5533 #include <X11/Xlib.h>
5534 _ACEOF
5535 if ac_fn_c_try_cpp "$LINENO"; then :
5536   # We can compile using X headers with no special include directory.
5537 ac_x_includes=
5538 else
5539   for ac_dir in $ac_x_header_dirs; do
5540   if test -r "$ac_dir/X11/Xlib.h"; then
5541     ac_x_includes=$ac_dir
5542     break
5543   fi
5544 done
5545 fi
5546 rm -rf conftest.err conftest.i conftest.$ac_ext
5547 fi # $ac_x_includes = no
5548
5549 if test "$ac_x_libraries" = no; then
5550   # Check for the libraries.
5551   # See if we find them without any special options.
5552   # Don't add to $LIBS permanently.
5553   ac_save_LIBS=$LIBS
5554   LIBS="-lX11 $LIBS"
5555   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5556 /* end confdefs.h.  */
5557 #include <X11/Xlib.h>
5558 int
5559 main ()
5560 {
5561 XrmInitialize ()
5562   ;
5563   return 0;
5564 }
5565 _ACEOF
5566 if ac_fn_c_try_link "$LINENO"; then :
5567   LIBS=$ac_save_LIBS
5568 # We can link X programs with no special library path.
5569 ac_x_libraries=
5570 else
5571   LIBS=$ac_save_LIBS
5572 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5573 do
5574   # Don't even attempt the hair of trying to link an X program!
5575   for ac_extension in a so sl dylib la dll; do
5576     if test -r "$ac_dir/libX11.$ac_extension"; then
5577       ac_x_libraries=$ac_dir
5578       break 2
5579     fi
5580   done
5581 done
5582 fi
5583 rm -f core conftest.err conftest.$ac_objext \
5584     conftest$ac_exeext conftest.$ac_ext
5585 fi # $ac_x_libraries = no
5586
5587 case $ac_x_includes,$ac_x_libraries in #(
5588   no,* | *,no | *\'*)
5589     # Didn't find X, or a directory has "'" in its name.
5590     ac_cv_have_x="have_x=no";; #(
5591   *)
5592     # Record where we found X for the cache.
5593     ac_cv_have_x="have_x=yes\
5594         ac_x_includes='$ac_x_includes'\
5595         ac_x_libraries='$ac_x_libraries'"
5596 esac
5597 fi
5598 ;; #(
5599     *) have_x=yes;;
5600   esac
5601   eval "$ac_cv_have_x"
5602 fi # $with_x != no
5603
5604 if test "$have_x" != yes; then
5605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
5606 $as_echo "$have_x" >&6; }
5607   no_x=yes
5608 else
5609   # If each of the values was on the command line, it overrides each guess.
5610   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5611   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5612   # Update the cache value to reflect the command line values.
5613   ac_cv_have_x="have_x=yes\
5614         ac_x_includes='$x_includes'\
5615         ac_x_libraries='$x_libraries'"
5616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
5617 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
5618 fi
5619
5620 if test "$no_x" = yes; then
5621   # Not all programs may use this symbol, but it does not hurt to define it.
5622
5623 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
5624
5625   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5626 else
5627   if test -n "$x_includes"; then
5628     X_CFLAGS="$X_CFLAGS -I$x_includes"
5629   fi
5630
5631   # It would also be nice to do this for all -L options, not just this one.
5632   if test -n "$x_libraries"; then
5633     X_LIBS="$X_LIBS -L$x_libraries"
5634     # For Solaris; some versions of Sun CC require a space after -R and
5635     # others require no space.  Words are not sufficient . . . .
5636     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
5637 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
5638     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5639     ac_xsave_c_werror_flag=$ac_c_werror_flag
5640     ac_c_werror_flag=yes
5641     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5642 /* end confdefs.h.  */
5643
5644 int
5645 main ()
5646 {
5647
5648   ;
5649   return 0;
5650 }
5651 _ACEOF
5652 if ac_fn_c_try_link "$LINENO"; then :
5653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5654 $as_echo "no" >&6; }
5655        X_LIBS="$X_LIBS -R$x_libraries"
5656 else
5657   LIBS="$ac_xsave_LIBS -R $x_libraries"
5658        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5659 /* end confdefs.h.  */
5660
5661 int
5662 main ()
5663 {
5664
5665   ;
5666   return 0;
5667 }
5668 _ACEOF
5669 if ac_fn_c_try_link "$LINENO"; then :
5670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5671 $as_echo "yes" >&6; }
5672           X_LIBS="$X_LIBS -R $x_libraries"
5673 else
5674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
5675 $as_echo "neither works" >&6; }
5676 fi
5677 rm -f core conftest.err conftest.$ac_objext \
5678     conftest$ac_exeext conftest.$ac_ext
5679 fi
5680 rm -f core conftest.err conftest.$ac_objext \
5681     conftest$ac_exeext conftest.$ac_ext
5682     ac_c_werror_flag=$ac_xsave_c_werror_flag
5683     LIBS=$ac_xsave_LIBS
5684   fi
5685
5686   # Check for system-dependent libraries X programs must link with.
5687   # Do this before checking for the system-independent R6 libraries
5688   # (-lICE), since we may need -lsocket or whatever for X linking.
5689
5690   if test "$ISC" = yes; then
5691     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5692   else
5693     # Martyn Johnson says this is needed for Ultrix, if the X
5694     # libraries were built with DECnet support.  And Karl Berry says
5695     # the Alpha needs dnet_stub (dnet does not exist).
5696     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5697     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5698 /* end confdefs.h.  */
5699
5700 /* Override any GCC internal prototype to avoid an error.
5701    Use char because int might match the return type of a GCC
5702    builtin and then its argument prototype would still apply.  */
5703 #ifdef __cplusplus
5704 extern "C"
5705 #endif
5706 char XOpenDisplay ();
5707 int
5708 main ()
5709 {
5710 return XOpenDisplay ();
5711   ;
5712   return 0;
5713 }
5714 _ACEOF
5715 if ac_fn_c_try_link "$LINENO"; then :
5716
5717 else
5718   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
5719 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
5720 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
5721   $as_echo_n "(cached) " >&6
5722 else
5723   ac_check_lib_save_LIBS=$LIBS
5724 LIBS="-ldnet  $LIBS"
5725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5726 /* end confdefs.h.  */
5727
5728 /* Override any GCC internal prototype to avoid an error.
5729    Use char because int might match the return type of a GCC
5730    builtin and then its argument prototype would still apply.  */
5731 #ifdef __cplusplus
5732 extern "C"
5733 #endif
5734 char dnet_ntoa ();
5735 int
5736 main ()
5737 {
5738 return dnet_ntoa ();
5739   ;
5740   return 0;
5741 }
5742 _ACEOF
5743 if ac_fn_c_try_link "$LINENO"; then :
5744   ac_cv_lib_dnet_dnet_ntoa=yes
5745 else
5746   ac_cv_lib_dnet_dnet_ntoa=no
5747 fi
5748 rm -f core conftest.err conftest.$ac_objext \
5749     conftest$ac_exeext conftest.$ac_ext
5750 LIBS=$ac_check_lib_save_LIBS
5751 fi
5752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5753 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
5754 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
5755   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5756 fi
5757
5758     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5759       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
5760 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
5761 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
5762   $as_echo_n "(cached) " >&6
5763 else
5764   ac_check_lib_save_LIBS=$LIBS
5765 LIBS="-ldnet_stub  $LIBS"
5766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5767 /* end confdefs.h.  */
5768
5769 /* Override any GCC internal prototype to avoid an error.
5770    Use char because int might match the return type of a GCC
5771    builtin and then its argument prototype would still apply.  */
5772 #ifdef __cplusplus
5773 extern "C"
5774 #endif
5775 char dnet_ntoa ();
5776 int
5777 main ()
5778 {
5779 return dnet_ntoa ();
5780   ;
5781   return 0;
5782 }
5783 _ACEOF
5784 if ac_fn_c_try_link "$LINENO"; then :
5785   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5786 else
5787   ac_cv_lib_dnet_stub_dnet_ntoa=no
5788 fi
5789 rm -f core conftest.err conftest.$ac_objext \
5790     conftest$ac_exeext conftest.$ac_ext
5791 LIBS=$ac_check_lib_save_LIBS
5792 fi
5793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5794 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
5795 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
5796   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5797 fi
5798
5799     fi
5800 fi
5801 rm -f core conftest.err conftest.$ac_objext \
5802     conftest$ac_exeext conftest.$ac_ext
5803     LIBS="$ac_xsave_LIBS"
5804
5805     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5806     # to get the SysV transport functions.
5807     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5808     # needs -lnsl.
5809     # The nsl library prevents programs from opening the X display
5810     # on Irix 5.2, according to T.E. Dickey.
5811     # The functions gethostbyname, getservbyname, and inet_addr are
5812     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5813     ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
5814 if test "x$ac_cv_func_gethostbyname" = xyes; then :
5815
5816 fi
5817
5818     if test $ac_cv_func_gethostbyname = no; then
5819       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
5820 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
5821 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
5822   $as_echo_n "(cached) " >&6
5823 else
5824   ac_check_lib_save_LIBS=$LIBS
5825 LIBS="-lnsl  $LIBS"
5826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5827 /* end confdefs.h.  */
5828
5829 /* Override any GCC internal prototype to avoid an error.
5830    Use char because int might match the return type of a GCC
5831    builtin and then its argument prototype would still apply.  */
5832 #ifdef __cplusplus
5833 extern "C"
5834 #endif
5835 char gethostbyname ();
5836 int
5837 main ()
5838 {
5839 return gethostbyname ();
5840   ;
5841   return 0;
5842 }
5843 _ACEOF
5844 if ac_fn_c_try_link "$LINENO"; then :
5845   ac_cv_lib_nsl_gethostbyname=yes
5846 else
5847   ac_cv_lib_nsl_gethostbyname=no
5848 fi
5849 rm -f core conftest.err conftest.$ac_objext \
5850     conftest$ac_exeext conftest.$ac_ext
5851 LIBS=$ac_check_lib_save_LIBS
5852 fi
5853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
5854 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
5855 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
5856   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5857 fi
5858
5859       if test $ac_cv_lib_nsl_gethostbyname = no; then
5860         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
5861 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
5862 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
5863   $as_echo_n "(cached) " >&6
5864 else
5865   ac_check_lib_save_LIBS=$LIBS
5866 LIBS="-lbsd  $LIBS"
5867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5868 /* end confdefs.h.  */
5869
5870 /* Override any GCC internal prototype to avoid an error.
5871    Use char because int might match the return type of a GCC
5872    builtin and then its argument prototype would still apply.  */
5873 #ifdef __cplusplus
5874 extern "C"
5875 #endif
5876 char gethostbyname ();
5877 int
5878 main ()
5879 {
5880 return gethostbyname ();
5881   ;
5882   return 0;
5883 }
5884 _ACEOF
5885 if ac_fn_c_try_link "$LINENO"; then :
5886   ac_cv_lib_bsd_gethostbyname=yes
5887 else
5888   ac_cv_lib_bsd_gethostbyname=no
5889 fi
5890 rm -f core conftest.err conftest.$ac_objext \
5891     conftest$ac_exeext conftest.$ac_ext
5892 LIBS=$ac_check_lib_save_LIBS
5893 fi
5894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
5895 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
5896 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
5897   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5898 fi
5899
5900       fi
5901     fi
5902
5903     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5904     # socket/setsockopt and other routines are undefined under SCO ODT
5905     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5906     # on later versions), says Simon Leinen: it contains gethostby*
5907     # variants that don't use the name server (or something).  -lsocket
5908     # must be given before -lnsl if both are needed.  We assume that
5909     # if connect needs -lnsl, so does gethostbyname.
5910     ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
5911 if test "x$ac_cv_func_connect" = xyes; then :
5912
5913 fi
5914
5915     if test $ac_cv_func_connect = no; then
5916       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
5917 $as_echo_n "checking for connect in -lsocket... " >&6; }
5918 if ${ac_cv_lib_socket_connect+:} false; then :
5919   $as_echo_n "(cached) " >&6
5920 else
5921   ac_check_lib_save_LIBS=$LIBS
5922 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5924 /* end confdefs.h.  */
5925
5926 /* Override any GCC internal prototype to avoid an error.
5927    Use char because int might match the return type of a GCC
5928    builtin and then its argument prototype would still apply.  */
5929 #ifdef __cplusplus
5930 extern "C"
5931 #endif
5932 char connect ();
5933 int
5934 main ()
5935 {
5936 return connect ();
5937   ;
5938   return 0;
5939 }
5940 _ACEOF
5941 if ac_fn_c_try_link "$LINENO"; then :
5942   ac_cv_lib_socket_connect=yes
5943 else
5944   ac_cv_lib_socket_connect=no
5945 fi
5946 rm -f core conftest.err conftest.$ac_objext \
5947     conftest$ac_exeext conftest.$ac_ext
5948 LIBS=$ac_check_lib_save_LIBS
5949 fi
5950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
5951 $as_echo "$ac_cv_lib_socket_connect" >&6; }
5952 if test "x$ac_cv_lib_socket_connect" = xyes; then :
5953   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5954 fi
5955
5956     fi
5957
5958     # Guillermo Gomez says -lposix is necessary on A/UX.
5959     ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
5960 if test "x$ac_cv_func_remove" = xyes; then :
5961
5962 fi
5963
5964     if test $ac_cv_func_remove = no; then
5965       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
5966 $as_echo_n "checking for remove in -lposix... " >&6; }
5967 if ${ac_cv_lib_posix_remove+:} false; then :
5968   $as_echo_n "(cached) " >&6
5969 else
5970   ac_check_lib_save_LIBS=$LIBS
5971 LIBS="-lposix  $LIBS"
5972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5973 /* end confdefs.h.  */
5974
5975 /* Override any GCC internal prototype to avoid an error.
5976    Use char because int might match the return type of a GCC
5977    builtin and then its argument prototype would still apply.  */
5978 #ifdef __cplusplus
5979 extern "C"
5980 #endif
5981 char remove ();
5982 int
5983 main ()
5984 {
5985 return remove ();
5986   ;
5987   return 0;
5988 }
5989 _ACEOF
5990 if ac_fn_c_try_link "$LINENO"; then :
5991   ac_cv_lib_posix_remove=yes
5992 else
5993   ac_cv_lib_posix_remove=no
5994 fi
5995 rm -f core conftest.err conftest.$ac_objext \
5996     conftest$ac_exeext conftest.$ac_ext
5997 LIBS=$ac_check_lib_save_LIBS
5998 fi
5999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
6000 $as_echo "$ac_cv_lib_posix_remove" >&6; }
6001 if test "x$ac_cv_lib_posix_remove" = xyes; then :
6002   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6003 fi
6004
6005     fi
6006
6007     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6008     ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
6009 if test "x$ac_cv_func_shmat" = xyes; then :
6010
6011 fi
6012
6013     if test $ac_cv_func_shmat = no; then
6014       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
6015 $as_echo_n "checking for shmat in -lipc... " >&6; }
6016 if ${ac_cv_lib_ipc_shmat+:} false; then :
6017   $as_echo_n "(cached) " >&6
6018 else
6019   ac_check_lib_save_LIBS=$LIBS
6020 LIBS="-lipc  $LIBS"
6021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6022 /* end confdefs.h.  */
6023
6024 /* Override any GCC internal prototype to avoid an error.
6025    Use char because int might match the return type of a GCC
6026    builtin and then its argument prototype would still apply.  */
6027 #ifdef __cplusplus
6028 extern "C"
6029 #endif
6030 char shmat ();
6031 int
6032 main ()
6033 {
6034 return shmat ();
6035   ;
6036   return 0;
6037 }
6038 _ACEOF
6039 if ac_fn_c_try_link "$LINENO"; then :
6040   ac_cv_lib_ipc_shmat=yes
6041 else
6042   ac_cv_lib_ipc_shmat=no
6043 fi
6044 rm -f core conftest.err conftest.$ac_objext \
6045     conftest$ac_exeext conftest.$ac_ext
6046 LIBS=$ac_check_lib_save_LIBS
6047 fi
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
6049 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
6050 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
6051   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6052 fi
6053
6054     fi
6055   fi
6056
6057   # Check for libraries that X11R6 Xt/Xaw programs need.
6058   ac_save_LDFLAGS=$LDFLAGS
6059   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6060   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6061   # check for ICE first), but we must link in the order -lSM -lICE or
6062   # we get undefined symbols.  So assume we have SM if we have ICE.
6063   # These have to be linked with before -lX11, unlike the other
6064   # libraries we check for below, so use a different variable.
6065   # John Interrante, Karl Berry
6066   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
6067 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
6068 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
6069   $as_echo_n "(cached) " >&6
6070 else
6071   ac_check_lib_save_LIBS=$LIBS
6072 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6074 /* end confdefs.h.  */
6075
6076 /* Override any GCC internal prototype to avoid an error.
6077    Use char because int might match the return type of a GCC
6078    builtin and then its argument prototype would still apply.  */
6079 #ifdef __cplusplus
6080 extern "C"
6081 #endif
6082 char IceConnectionNumber ();
6083 int
6084 main ()
6085 {
6086 return IceConnectionNumber ();
6087   ;
6088   return 0;
6089 }
6090 _ACEOF
6091 if ac_fn_c_try_link "$LINENO"; then :
6092   ac_cv_lib_ICE_IceConnectionNumber=yes
6093 else
6094   ac_cv_lib_ICE_IceConnectionNumber=no
6095 fi
6096 rm -f core conftest.err conftest.$ac_objext \
6097     conftest$ac_exeext conftest.$ac_ext
6098 LIBS=$ac_check_lib_save_LIBS
6099 fi
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6101 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
6102 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
6103   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6104 fi
6105
6106   LDFLAGS=$ac_save_LDFLAGS
6107
6108 fi
6109
6110
6111 if test "$have_x" != yes; then
6112   as_fn_error $? "Couldn't find X11 headers/libs.  Try \`$0 --help'." "$LINENO" 5
6113 fi
6114
6115
6116     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X app-defaults directory" >&5
6117 $as_echo_n "checking for X app-defaults directory... " >&6; }
6118 if ${ac_cv_x_app_defaults+:} false; then :
6119   $as_echo_n "(cached) " >&6
6120 else
6121
6122   rm -fr conftestdir
6123   if mkdir conftestdir; then
6124     cd conftestdir 2>/dev/null
6125     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6126     cat > Imakefile <<'EOF'
6127 acfindx:
6128         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6129 EOF
6130     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6131       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6132       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6133     fi
6134     cd .. 2>/dev/null
6135     rm -fr conftestdir
6136   fi
6137       if test x"$ac_x_app_defaults" = x; then
6138
6139   # Look for the directory under a standard set of common directories.
6140   # Check X11 before X11Rn because it's often a symlink to the current release.
6141   for ac_dir in                                 \
6142     /usr/X11/lib/app-defaults                   \
6143     /usr/X11R6/lib/app-defaults                 \
6144     /usr/X11R6/lib/X11/app-defaults             \
6145     /usr/X11R5/lib/app-defaults                 \
6146     /usr/X11R5/lib/X11/app-defaults             \
6147     /usr/X11R4/lib/app-defaults                 \
6148     /usr/X11R4/lib/X11/app-defaults             \
6149                                                 \
6150     /usr/lib/X11/app-defaults                   \
6151     /usr/lib/X11R6/app-defaults                 \
6152     /usr/lib/X11R5/app-defaults                 \
6153     /usr/lib/X11R4/app-defaults                 \
6154                                                 \
6155     /usr/local/X11/lib/app-defaults             \
6156     /usr/local/X11R6/lib/app-defaults           \
6157     /usr/local/X11R5/lib/app-defaults           \
6158     /usr/local/X11R4/lib/app-defaults           \
6159                                                 \
6160     /usr/local/lib/X11/app-defaults             \
6161     /usr/local/lib/X11R6/app-defaults           \
6162     /usr/local/lib/X11R6/X11/app-defaults       \
6163     /usr/local/lib/X11R5/app-defaults           \
6164     /usr/local/lib/X11R5/X11/app-defaults       \
6165     /usr/local/lib/X11R4/app-defaults           \
6166     /usr/local/lib/X11R4/X11/app-defaults       \
6167                                                 \
6168     /usr/X386/lib/X11/app-defaults              \
6169     /usr/x386/lib/X11/app-defaults              \
6170     /usr/XFree86/lib/X11/app-defaults           \
6171                                                 \
6172     /usr/lib/X11/app-defaults                   \
6173     /usr/local/lib/X11/app-defaults             \
6174     /usr/unsupported/lib/X11/app-defaults       \
6175     /usr/athena/lib/X11/app-defaults            \
6176     /usr/local/x11r5/lib/X11/app-defaults       \
6177     /usr/lpp/Xamples/lib/X11/app-defaults       \
6178     /lib/usr/lib/X11/app-defaults               \
6179                                                 \
6180     /usr/openwin/lib/app-defaults               \
6181     /usr/openwin/lib/X11/app-defaults           \
6182     /usr/openwin/share/lib/app-defaults         \
6183     /usr/openwin/share/lib/X11/app-defaults     \
6184                                                 \
6185     /X11R6/lib/app-defaults                     \
6186     /X11R5/lib/app-defaults                     \
6187     /X11R4/lib/app-defaults                     \
6188     ; \
6189   do
6190     if test -d "$ac_dir"; then
6191       ac_x_app_defaults=$ac_dir
6192       break
6193     fi
6194   done
6195
6196       fi
6197       if test x"$ac_x_app_defaults" = x; then
6198         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6199       else
6200         # Record where we found app-defaults for the cache.
6201         ac_cv_x_app_defaults="$ac_x_app_defaults"
6202       fi
6203 fi
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x_app_defaults" >&5
6205 $as_echo "$ac_cv_x_app_defaults" >&6; }
6206     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6207 case "$host" in
6208     *-hpux*)
6209
6210       # The following arcana was gleaned from conversations with
6211       # Eric Schwartz <erics@col.hp.com>:
6212       #
6213       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6214       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6215       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6216       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6217       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6218       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6219       # you don't need any -I or -L arguments.
6220       #
6221       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6222       # are the same division as 10.x.  However, there are no symlinks to
6223       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6224       # arguments are always necessary.
6225       #
6226       # However, X11R6 was available on HPUX 9.x as a patch: if that
6227       # patch was installed, then all of X11R6 went in to
6228       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6229       #
6230       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6231       # whether R5 was available as a patch; R6 undoubtedly was not.)
6232       #
6233       # So.  We try and use the highest numbered pair of
6234       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6235       # that are available.  We do not mix and match different versions
6236       # of X.
6237       #
6238       # Question I still don't know the answer to: (do you?)
6239       #
6240       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6241       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6242       #     that contrib directory?  Did it contain so-called "standard"
6243       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6244       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6245       #     be a situation where one had to reach into the R5 headers and
6246       #     libs to find Xmu?  That is, must both R6 and R5 directories
6247       #     be on the -I and -L lists in that case?
6248       #
6249       for version in X11R6 X11R5 X11R4 ; do
6250         # if either pair of directories exists...
6251         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6252         then
6253            # if contrib exists, use it...
6254            if test -d /usr/contrib/$version/include ; then
6255              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6256              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6257            fi
6258            # if the "standard" one exists, use it.
6259            if test -d /usr/include/$version ; then
6260              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6261              X_LIBS="$X_LIBS -L/usr/lib/$version"
6262            fi
6263            # since at least one of the pair exists, go no farther.
6264            break
6265         fi
6266       done
6267
6268       # Now find Motif.  Thanks for not making xmkmf find this by
6269       # default, you losers.
6270       #
6271       if test -d /usr/include/Motif2.1 ; then
6272         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6273         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6274       elif test -d /usr/include/Motif1.2 ; then
6275         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6276         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6277       elif test -d /usr/include/Motif1.1 ; then
6278         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6279         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6280       fi
6281
6282       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6283       #
6284       if test -d /opt/graphics/OpenGL/include ; then
6285         # HP-UX 10.20 puts it here
6286         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6287         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6288       elif test -d /opt/Mesa/lib ; then
6289         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6290         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6291       fi
6292
6293
6294       if test -d /opt/xpm/lib/X11 ; then
6295         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6296         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6297       fi
6298
6299       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6300       # in /usr/local/, unless there is already an xscreensaver in
6301       # /usr/local/bin/.  This can be overridden with the --prefix arg
6302       # to configure.  I'm not sure this is the right thing to do, but
6303       # Richard Lloyd says so...
6304       #
6305       if test \! -x /usr/local/bin/xscreensaver ; then
6306         ac_default_prefix=/opt/xscreensaver
6307       fi
6308
6309     ;;
6310     *-solaris*)
6311
6312       # Thanks for not making xmkmf find this by default, pinheads.
6313       # And thanks for moving things around again, too.  Is this
6314       # really the standard location now?  What happened to the
6315       # joke that this kind of thing went in /opt?
6316       # cthomp says "answer: CDE (Common Disorganized Environment)"
6317       #
6318       if test -f /usr/dt/include/Xm/Xm.h ; then
6319         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6320         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6321
6322         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6323         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcmp in -lgen" >&5
6324 $as_echo_n "checking for regcmp in -lgen... " >&6; }
6325 if ${ac_cv_lib_gen_regcmp+:} false; then :
6326   $as_echo_n "(cached) " >&6
6327 else
6328   ac_check_lib_save_LIBS=$LIBS
6329 LIBS="-lgen  $LIBS"
6330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6331 /* end confdefs.h.  */
6332
6333 /* Override any GCC internal prototype to avoid an error.
6334    Use char because int might match the return type of a GCC
6335    builtin and then its argument prototype would still apply.  */
6336 #ifdef __cplusplus
6337 extern "C"
6338 #endif
6339 char regcmp ();
6340 int
6341 main ()
6342 {
6343 return regcmp ();
6344   ;
6345   return 0;
6346 }
6347 _ACEOF
6348 if ac_fn_c_try_link "$LINENO"; then :
6349   ac_cv_lib_gen_regcmp=yes
6350 else
6351   ac_cv_lib_gen_regcmp=no
6352 fi
6353 rm -f core conftest.err conftest.$ac_objext \
6354     conftest$ac_exeext conftest.$ac_ext
6355 LIBS=$ac_check_lib_save_LIBS
6356 fi
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_regcmp" >&5
6358 $as_echo "$ac_cv_lib_gen_regcmp" >&6; }
6359 if test "x$ac_cv_lib_gen_regcmp" = xyes; then :
6360   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6361 fi
6362
6363       fi
6364
6365     ;;
6366     *-darwin*)
6367
6368       # On MacOS X (10.x with "fink"), many things are under /sw/.
6369       #
6370       if test -d /sw/include ; then
6371         X_CFLAGS="-I/sw/include $X_CFLAGS"
6372         X_LIBS="-L/sw/lib $X_LIBS"
6373       fi
6374     ;;
6375   esac
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPointer" >&5
6377 $as_echo_n "checking for XPointer... " >&6; }
6378 if ${ac_cv_xpointer+:} false; then :
6379   $as_echo_n "(cached) " >&6
6380 else
6381
6382   ac_save_CPPFLAGS="$CPPFLAGS"
6383   if test \! -z "$includedir" ; then
6384     CPPFLAGS="$CPPFLAGS -I$includedir"
6385   fi
6386   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6387   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
6388   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6389 /* end confdefs.h.  */
6390 #include <X11/Xlib.h>
6391 int
6392 main ()
6393 {
6394 XPointer foo = (XPointer) 0;
6395   ;
6396   return 0;
6397 }
6398 _ACEOF
6399 if ac_fn_c_try_compile "$LINENO"; then :
6400   ac_cv_xpointer=yes
6401 else
6402   ac_cv_xpointer=no
6403 fi
6404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6405   CPPFLAGS="$ac_save_CPPFLAGS"
6406 fi
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xpointer" >&5
6408 $as_echo "$ac_cv_xpointer" >&6; }
6409   if test "$ac_cv_xpointer" != yes; then
6410    $as_echo "#define XPointer char*" >>confdefs.h
6411
6412   fi
6413
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is MacOS X" >&5
6415 $as_echo_n "checking whether this is MacOS X... " >&6; }
6416   ac_macosx=no
6417   case "$host" in
6418     *-apple-darwin* )
6419       ac_macosx=yes
6420     ;;
6421   esac
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_macosx" >&5
6423 $as_echo "$ac_macosx" >&6; }
6424
6425
6426 ###############################################################################
6427 #
6428 #       Gettext support
6429 #
6430 ###############################################################################
6431
6432
6433
6434 if test -n ""; then
6435     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= " >&5
6436 $as_echo_n "checking for intltool >= ... " >&6; }
6437
6438     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
6439     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
6440
6441     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
6442
6443
6444     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
6445         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5
6446 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
6447     else
6448         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
6449 $as_echo "$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
6450         exit 1
6451     fi
6452 fi
6453
6454   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
6455 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
6456      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -k -u -c $(top_builddir)/po/.intltool-merge-cache'
6457       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
6458      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
6459    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -u -c $(top_builddir)/po/.intltool-merge-cache'
6460     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
6461 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
6462        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
6463       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
6464     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478 # Use the tools built into the package, not the ones that are installed.
6479
6480 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
6481 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
6482 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
6483
6484
6485
6486
6487
6488 # Extract the first word of "perl", so it can be a program name with args.
6489 set dummy perl; ac_word=$2
6490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6491 $as_echo_n "checking for $ac_word... " >&6; }
6492 if ${ac_cv_path_INTLTOOL_PERL+:} false; then :
6493   $as_echo_n "(cached) " >&6
6494 else
6495   case $INTLTOOL_PERL in
6496   [\\/]* | ?:[\\/]*)
6497   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
6498   ;;
6499   *)
6500   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6501 for as_dir in $PATH
6502 do
6503   IFS=$as_save_IFS
6504   test -z "$as_dir" && as_dir=.
6505     for ac_exec_ext in '' $ac_executable_extensions; do
6506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6507     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
6508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6509     break 2
6510   fi
6511 done
6512   done
6513 IFS=$as_save_IFS
6514
6515   ;;
6516 esac
6517 fi
6518 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
6519 if test -n "$INTLTOOL_PERL"; then
6520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_PERL" >&5
6521 $as_echo "$INTLTOOL_PERL" >&6; }
6522 else
6523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6524 $as_echo "no" >&6; }
6525 fi
6526
6527
6528 if test -z "$INTLTOOL_PERL"; then
6529    as_fn_error $? "perl not found; required for intltool" "$LINENO" 5
6530 fi
6531 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
6532    as_fn_error $? "perl 5.x required for intltool" "$LINENO" 5
6533 fi
6534
6535 # Remove file type tags (using []) from po/POTFILES.
6536
6537
6538
6539
6540
6541
6542
6543 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
6544
6545 ac_config_commands="$ac_config_commands default-1"
6546
6547
6548
6549 GETTEXT_PACKAGE=xscreensaver
6550
6551 cat >>confdefs.h <<_ACEOF
6552 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
6553 _ACEOF
6554
6555
6556 cat >>confdefs.h <<_ACEOF
6557 #define PACKAGE "$GETTEXT_PACKAGE"
6558 _ACEOF
6559
6560
6561
6562 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"
6563 if test -n "$ac_tool_prefix"; then
6564   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6565 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6567 $as_echo_n "checking for $ac_word... " >&6; }
6568 if ${ac_cv_prog_RANLIB+:} false; then :
6569   $as_echo_n "(cached) " >&6
6570 else
6571   if test -n "$RANLIB"; then
6572   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6573 else
6574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6575 for as_dir in $PATH
6576 do
6577   IFS=$as_save_IFS
6578   test -z "$as_dir" && as_dir=.
6579     for ac_exec_ext in '' $ac_executable_extensions; do
6580   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6581     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6583     break 2
6584   fi
6585 done
6586   done
6587 IFS=$as_save_IFS
6588
6589 fi
6590 fi
6591 RANLIB=$ac_cv_prog_RANLIB
6592 if test -n "$RANLIB"; then
6593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6594 $as_echo "$RANLIB" >&6; }
6595 else
6596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6597 $as_echo "no" >&6; }
6598 fi
6599
6600
6601 fi
6602 if test -z "$ac_cv_prog_RANLIB"; then
6603   ac_ct_RANLIB=$RANLIB
6604   # Extract the first word of "ranlib", so it can be a program name with args.
6605 set dummy ranlib; ac_word=$2
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6607 $as_echo_n "checking for $ac_word... " >&6; }
6608 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6609   $as_echo_n "(cached) " >&6
6610 else
6611   if test -n "$ac_ct_RANLIB"; then
6612   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6613 else
6614 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6615 for as_dir in $PATH
6616 do
6617   IFS=$as_save_IFS
6618   test -z "$as_dir" && as_dir=.
6619     for ac_exec_ext in '' $ac_executable_extensions; do
6620   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6621     ac_cv_prog_ac_ct_RANLIB="ranlib"
6622     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6623     break 2
6624   fi
6625 done
6626   done
6627 IFS=$as_save_IFS
6628
6629 fi
6630 fi
6631 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6632 if test -n "$ac_ct_RANLIB"; then
6633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6634 $as_echo "$ac_ct_RANLIB" >&6; }
6635 else
6636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6637 $as_echo "no" >&6; }
6638 fi
6639
6640   if test "x$ac_ct_RANLIB" = x; then
6641     RANLIB=":"
6642   else
6643     case $cross_compiling:$ac_tool_warned in
6644 yes:)
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6646 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6647 ac_tool_warned=yes ;;
6648 esac
6649     RANLIB=$ac_ct_RANLIB
6650   fi
6651 else
6652   RANLIB="$ac_cv_prog_RANLIB"
6653 fi
6654
6655 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6656 if test "x$ac_cv_type_off_t" = xyes; then :
6657
6658 else
6659
6660 cat >>confdefs.h <<_ACEOF
6661 #define off_t long int
6662 _ACEOF
6663
6664 fi
6665
6666 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6667 # for constant arguments.  Useless!
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6669 $as_echo_n "checking for working alloca.h... " >&6; }
6670 if ${ac_cv_working_alloca_h+:} false; then :
6671   $as_echo_n "(cached) " >&6
6672 else
6673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6674 /* end confdefs.h.  */
6675 #include <alloca.h>
6676 int
6677 main ()
6678 {
6679 char *p = (char *) alloca (2 * sizeof (int));
6680                           if (p) return 0;
6681   ;
6682   return 0;
6683 }
6684 _ACEOF
6685 if ac_fn_c_try_link "$LINENO"; then :
6686   ac_cv_working_alloca_h=yes
6687 else
6688   ac_cv_working_alloca_h=no
6689 fi
6690 rm -f core conftest.err conftest.$ac_objext \
6691     conftest$ac_exeext conftest.$ac_ext
6692 fi
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6694 $as_echo "$ac_cv_working_alloca_h" >&6; }
6695 if test $ac_cv_working_alloca_h = yes; then
6696
6697 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6698
6699 fi
6700
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6702 $as_echo_n "checking for alloca... " >&6; }
6703 if ${ac_cv_func_alloca_works+:} false; then :
6704   $as_echo_n "(cached) " >&6
6705 else
6706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6707 /* end confdefs.h.  */
6708 #ifdef __GNUC__
6709 # define alloca __builtin_alloca
6710 #else
6711 # ifdef _MSC_VER
6712 #  include <malloc.h>
6713 #  define alloca _alloca
6714 # else
6715 #  ifdef HAVE_ALLOCA_H
6716 #   include <alloca.h>
6717 #  else
6718 #   ifdef _AIX
6719  #pragma alloca
6720 #   else
6721 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6722 void *alloca (size_t);
6723 #    endif
6724 #   endif
6725 #  endif
6726 # endif
6727 #endif
6728
6729 int
6730 main ()
6731 {
6732 char *p = (char *) alloca (1);
6733                                     if (p) return 0;
6734   ;
6735   return 0;
6736 }
6737 _ACEOF
6738 if ac_fn_c_try_link "$LINENO"; then :
6739   ac_cv_func_alloca_works=yes
6740 else
6741   ac_cv_func_alloca_works=no
6742 fi
6743 rm -f core conftest.err conftest.$ac_objext \
6744     conftest$ac_exeext conftest.$ac_ext
6745 fi
6746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6747 $as_echo "$ac_cv_func_alloca_works" >&6; }
6748
6749 if test $ac_cv_func_alloca_works = yes; then
6750
6751 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6752
6753 else
6754   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6755 # that cause trouble.  Some versions do not even contain alloca or
6756 # contain a buggy version.  If you still want to use their alloca,
6757 # use ar to extract alloca.o from them instead of compiling alloca.c.
6758
6759 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6760
6761 $as_echo "#define C_ALLOCA 1" >>confdefs.h
6762
6763
6764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6765 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
6766 if ${ac_cv_os_cray+:} false; then :
6767   $as_echo_n "(cached) " >&6
6768 else
6769   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6770 /* end confdefs.h.  */
6771 #if defined CRAY && ! defined CRAY2
6772 webecray
6773 #else
6774 wenotbecray
6775 #endif
6776
6777 _ACEOF
6778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6779   $EGREP "webecray" >/dev/null 2>&1; then :
6780   ac_cv_os_cray=yes
6781 else
6782   ac_cv_os_cray=no
6783 fi
6784 rm -rf conftest*
6785
6786 fi
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6788 $as_echo "$ac_cv_os_cray" >&6; }
6789 if test $ac_cv_os_cray = yes; then
6790   for ac_func in _getb67 GETB67 getb67; do
6791     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6792 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6793 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6794
6795 cat >>confdefs.h <<_ACEOF
6796 #define CRAY_STACKSEG_END $ac_func
6797 _ACEOF
6798
6799     break
6800 fi
6801
6802   done
6803 fi
6804
6805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6806 $as_echo_n "checking stack direction for C alloca... " >&6; }
6807 if ${ac_cv_c_stack_direction+:} false; then :
6808   $as_echo_n "(cached) " >&6
6809 else
6810   if test "$cross_compiling" = yes; then :
6811   ac_cv_c_stack_direction=0
6812 else
6813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6814 /* end confdefs.h.  */
6815 $ac_includes_default
6816 int
6817 find_stack_direction (int *addr, int depth)
6818 {
6819   int dir, dummy = 0;
6820   if (! addr)
6821     addr = &dummy;
6822   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6823   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6824   return dir + dummy;
6825 }
6826
6827 int
6828 main (int argc, char **argv)
6829 {
6830   return find_stack_direction (0, argc + !argv + 20) < 0;
6831 }
6832 _ACEOF
6833 if ac_fn_c_try_run "$LINENO"; then :
6834   ac_cv_c_stack_direction=1
6835 else
6836   ac_cv_c_stack_direction=-1
6837 fi
6838 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6839   conftest.$ac_objext conftest.beam conftest.$ac_ext
6840 fi
6841
6842 fi
6843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6844 $as_echo "$ac_cv_c_stack_direction" >&6; }
6845 cat >>confdefs.h <<_ACEOF
6846 #define STACK_DIRECTION $ac_cv_c_stack_direction
6847 _ACEOF
6848
6849
6850 fi
6851
6852
6853
6854
6855   for ac_header in $ac_header_list
6856 do :
6857   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6858 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6859 "
6860 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6861   cat >>confdefs.h <<_ACEOF
6862 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6863 _ACEOF
6864
6865 fi
6866
6867 done
6868
6869
6870
6871
6872
6873
6874
6875
6876 for ac_func in getpagesize
6877 do :
6878   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
6879 if test "x$ac_cv_func_getpagesize" = xyes; then :
6880   cat >>confdefs.h <<_ACEOF
6881 #define HAVE_GETPAGESIZE 1
6882 _ACEOF
6883
6884 fi
6885 done
6886
6887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
6888 $as_echo_n "checking for working mmap... " >&6; }
6889 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
6890   $as_echo_n "(cached) " >&6
6891 else
6892   if test "$cross_compiling" = yes; then :
6893   ac_cv_func_mmap_fixed_mapped=no
6894 else
6895   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6896 /* end confdefs.h.  */
6897 $ac_includes_default
6898 /* malloc might have been renamed as rpl_malloc. */
6899 #undef malloc
6900
6901 /* Thanks to Mike Haertel and Jim Avera for this test.
6902    Here is a matrix of mmap possibilities:
6903         mmap private not fixed
6904         mmap private fixed at somewhere currently unmapped
6905         mmap private fixed at somewhere already mapped
6906         mmap shared not fixed
6907         mmap shared fixed at somewhere currently unmapped
6908         mmap shared fixed at somewhere already mapped
6909    For private mappings, we should verify that changes cannot be read()
6910    back from the file, nor mmap's back from the file at a different
6911    address.  (There have been systems where private was not correctly
6912    implemented like the infamous i386 svr4.0, and systems where the
6913    VM page cache was not coherent with the file system buffer cache
6914    like early versions of FreeBSD and possibly contemporary NetBSD.)
6915    For shared mappings, we should conversely verify that changes get
6916    propagated back to all the places they're supposed to be.
6917
6918    Grep wants private fixed already mapped.
6919    The main things grep needs to know about mmap are:
6920    * does it exist and is it safe to write into the mmap'd area
6921    * how to use it (BSD variants)  */
6922
6923 #include <fcntl.h>
6924 #include <sys/mman.h>
6925
6926 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
6927 char *malloc ();
6928 #endif
6929
6930 /* This mess was copied from the GNU getpagesize.h.  */
6931 #ifndef HAVE_GETPAGESIZE
6932 # ifdef _SC_PAGESIZE
6933 #  define getpagesize() sysconf(_SC_PAGESIZE)
6934 # else /* no _SC_PAGESIZE */
6935 #  ifdef HAVE_SYS_PARAM_H
6936 #   include <sys/param.h>
6937 #   ifdef EXEC_PAGESIZE
6938 #    define getpagesize() EXEC_PAGESIZE
6939 #   else /* no EXEC_PAGESIZE */
6940 #    ifdef NBPG
6941 #     define getpagesize() NBPG * CLSIZE
6942 #     ifndef CLSIZE
6943 #      define CLSIZE 1
6944 #     endif /* no CLSIZE */
6945 #    else /* no NBPG */
6946 #     ifdef NBPC
6947 #      define getpagesize() NBPC
6948 #     else /* no NBPC */
6949 #      ifdef PAGESIZE
6950 #       define getpagesize() PAGESIZE
6951 #      endif /* PAGESIZE */
6952 #     endif /* no NBPC */
6953 #    endif /* no NBPG */
6954 #   endif /* no EXEC_PAGESIZE */
6955 #  else /* no HAVE_SYS_PARAM_H */
6956 #   define getpagesize() 8192   /* punt totally */
6957 #  endif /* no HAVE_SYS_PARAM_H */
6958 # endif /* no _SC_PAGESIZE */
6959
6960 #endif /* no HAVE_GETPAGESIZE */
6961
6962 int
6963 main ()
6964 {
6965   char *data, *data2, *data3;
6966   const char *cdata2;
6967   int i, pagesize;
6968   int fd, fd2;
6969
6970   pagesize = getpagesize ();
6971
6972   /* First, make a file with some known garbage in it. */
6973   data = (char *) malloc (pagesize);
6974   if (!data)
6975     return 1;
6976   for (i = 0; i < pagesize; ++i)
6977     *(data + i) = rand ();
6978   umask (0);
6979   fd = creat ("conftest.mmap", 0600);
6980   if (fd < 0)
6981     return 2;
6982   if (write (fd, data, pagesize) != pagesize)
6983     return 3;
6984   close (fd);
6985
6986   /* Next, check that the tail of a page is zero-filled.  File must have
6987      non-zero length, otherwise we risk SIGBUS for entire page.  */
6988   fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
6989   if (fd2 < 0)
6990     return 4;
6991   cdata2 = "";
6992   if (write (fd2, cdata2, 1) != 1)
6993     return 5;
6994   data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
6995   if (data2 == MAP_FAILED)
6996     return 6;
6997   for (i = 0; i < pagesize; ++i)
6998     if (*(data2 + i))
6999       return 7;
7000   close (fd2);
7001   if (munmap (data2, pagesize))
7002     return 8;
7003
7004   /* Next, try to mmap the file at a fixed address which already has
7005      something else allocated at it.  If we can, also make sure that
7006      we see the same garbage.  */
7007   fd = open ("conftest.mmap", O_RDWR);
7008   if (fd < 0)
7009     return 9;
7010   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7011                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7012     return 10;
7013   for (i = 0; i < pagesize; ++i)
7014     if (*(data + i) != *(data2 + i))
7015       return 11;
7016
7017   /* Finally, make sure that changes to the mapped area do not
7018      percolate back to the file as seen by read().  (This is a bug on
7019      some variants of i386 svr4.0.)  */
7020   for (i = 0; i < pagesize; ++i)
7021     *(data2 + i) = *(data2 + i) + 1;
7022   data3 = (char *) malloc (pagesize);
7023   if (!data3)
7024     return 12;
7025   if (read (fd, data3, pagesize) != pagesize)
7026     return 13;
7027   for (i = 0; i < pagesize; ++i)
7028     if (*(data + i) != *(data3 + i))
7029       return 14;
7030   close (fd);
7031   return 0;
7032 }
7033 _ACEOF
7034 if ac_fn_c_try_run "$LINENO"; then :
7035   ac_cv_func_mmap_fixed_mapped=yes
7036 else
7037   ac_cv_func_mmap_fixed_mapped=no
7038 fi
7039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7040   conftest.$ac_objext conftest.beam conftest.$ac_ext
7041 fi
7042
7043 fi
7044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7045 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
7046 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7047
7048 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
7049
7050 fi
7051 rm -rf conftest.mmap conftest.txt
7052
7053
7054    for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7055 unistd.h sys/param.h
7056 do :
7057   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7058 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7059 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7060   cat >>confdefs.h <<_ACEOF
7061 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7062 _ACEOF
7063
7064 fi
7065
7066 done
7067
7068    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7069 strdup __argz_count __argz_stringify __argz_next
7070 do :
7071   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7072 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7073 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7074   cat >>confdefs.h <<_ACEOF
7075 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7076 _ACEOF
7077
7078 fi
7079 done
7080
7081
7082    if test $ac_cv_header_locale_h = yes; then
7083     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
7084 $as_echo_n "checking for LC_MESSAGES... " >&6; }
7085 if ${am_cv_val_LC_MESSAGES+:} false; then :
7086   $as_echo_n "(cached) " >&6
7087 else
7088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7089 /* end confdefs.h.  */
7090 #include <locale.h>
7091 int
7092 main ()
7093 {
7094 return LC_MESSAGES
7095   ;
7096   return 0;
7097 }
7098 _ACEOF
7099 if ac_fn_c_try_link "$LINENO"; then :
7100   am_cv_val_LC_MESSAGES=yes
7101 else
7102   am_cv_val_LC_MESSAGES=no
7103 fi
7104 rm -f core conftest.err conftest.$ac_objext \
7105     conftest$ac_exeext conftest.$ac_ext
7106 fi
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
7108 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
7109     if test $am_cv_val_LC_MESSAGES = yes; then
7110
7111 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
7112
7113     fi
7114   fi
7115      USE_NLS=yes
7116
7117
7118         nls_cv_force_use_gnu_gettext="no"
7119
7120     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7121     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7122                               nls_cv_header_intl=
7123       nls_cv_header_libgt=
7124       CATOBJEXT=NONE
7125
7126       ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
7127 if test "x$ac_cv_header_libintl_h" = xyes; then :
7128   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
7129 $as_echo_n "checking for dgettext in libc... " >&6; }
7130 if ${gt_cv_func_dgettext_libc+:} false; then :
7131   $as_echo_n "(cached) " >&6
7132 else
7133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7134 /* end confdefs.h.  */
7135 #include <libintl.h>
7136 int
7137 main ()
7138 {
7139 return (int) dgettext ("","")
7140   ;
7141   return 0;
7142 }
7143 _ACEOF
7144 if ac_fn_c_try_link "$LINENO"; then :
7145   gt_cv_func_dgettext_libc=yes
7146 else
7147   gt_cv_func_dgettext_libc=no
7148 fi
7149 rm -f core conftest.err conftest.$ac_objext \
7150     conftest$ac_exeext conftest.$ac_ext
7151 fi
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
7153 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
7154
7155           if test "$gt_cv_func_dgettext_libc" != "yes"; then
7156             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
7157 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
7158 if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
7159   $as_echo_n "(cached) " >&6
7160 else
7161   ac_check_lib_save_LIBS=$LIBS
7162 LIBS="-lintl  $LIBS"
7163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7164 /* end confdefs.h.  */
7165
7166 /* Override any GCC internal prototype to avoid an error.
7167    Use char because int might match the return type of a GCC
7168    builtin and then its argument prototype would still apply.  */
7169 #ifdef __cplusplus
7170 extern "C"
7171 #endif
7172 char bindtextdomain ();
7173 int
7174 main ()
7175 {
7176 return bindtextdomain ();
7177   ;
7178   return 0;
7179 }
7180 _ACEOF
7181 if ac_fn_c_try_link "$LINENO"; then :
7182   ac_cv_lib_intl_bindtextdomain=yes
7183 else
7184   ac_cv_lib_intl_bindtextdomain=no
7185 fi
7186 rm -f core conftest.err conftest.$ac_objext \
7187     conftest$ac_exeext conftest.$ac_ext
7188 LIBS=$ac_check_lib_save_LIBS
7189 fi
7190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
7191 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
7192 if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
7193   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libintl" >&5
7194 $as_echo_n "checking for dgettext in libintl... " >&6; }
7195 if ${gt_cv_func_dgettext_libintl+:} false; then :
7196   $as_echo_n "(cached) " >&6
7197 else
7198   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
7199 $as_echo_n "checking for dgettext in -lintl... " >&6; }
7200 if ${ac_cv_lib_intl_dgettext+:} false; then :
7201   $as_echo_n "(cached) " >&6
7202 else
7203   ac_check_lib_save_LIBS=$LIBS
7204 LIBS="-lintl  $LIBS"
7205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7206 /* end confdefs.h.  */
7207
7208 /* Override any GCC internal prototype to avoid an error.
7209    Use char because int might match the return type of a GCC
7210    builtin and then its argument prototype would still apply.  */
7211 #ifdef __cplusplus
7212 extern "C"
7213 #endif
7214 char dgettext ();
7215 int
7216 main ()
7217 {
7218 return dgettext ();
7219   ;
7220   return 0;
7221 }
7222 _ACEOF
7223 if ac_fn_c_try_link "$LINENO"; then :
7224   ac_cv_lib_intl_dgettext=yes
7225 else
7226   ac_cv_lib_intl_dgettext=no
7227 fi
7228 rm -f core conftest.err conftest.$ac_objext \
7229     conftest$ac_exeext conftest.$ac_ext
7230 LIBS=$ac_check_lib_save_LIBS
7231 fi
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
7233 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
7234 if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
7235   gt_cv_func_dgettext_libintl=yes
7236 else
7237   gt_cv_func_dgettext_libintl=no
7238 fi
7239
7240 fi
7241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libintl" >&5
7242 $as_echo "$gt_cv_func_dgettext_libintl" >&6; }
7243 fi
7244
7245           fi
7246
7247           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7248             LIBS="$LIBS -lintl";
7249           fi
7250
7251           if test "$gt_cv_func_dgettext_libc" = "yes" \
7252             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7253
7254 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
7255
7256             # Extract the first word of "msgfmt", so it can be a program name with args.
7257 set dummy msgfmt; ac_word=$2
7258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7259 $as_echo_n "checking for $ac_word... " >&6; }
7260 if ${ac_cv_path_MSGFMT+:} false; then :
7261   $as_echo_n "(cached) " >&6
7262 else
7263   case "$MSGFMT" in
7264   /*)
7265   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7266   ;;
7267   *)
7268   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7269   for ac_dir in $PATH; do
7270     test -z "$ac_dir" && ac_dir=.
7271     if test -f $ac_dir/$ac_word; then
7272       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7273         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7274         break
7275       fi
7276     fi
7277   done
7278   IFS="$ac_save_ifs"
7279   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7280   ;;
7281 esac
7282 fi
7283 MSGFMT="$ac_cv_path_MSGFMT"
7284 if test -n "$MSGFMT"; then
7285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
7286 $as_echo "$MSGFMT" >&6; }
7287 else
7288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7289 $as_echo "no" >&6; }
7290 fi
7291             if test "$MSGFMT" != "no"; then
7292               for ac_func in dcgettext
7293 do :
7294   ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
7295 if test "x$ac_cv_func_dcgettext" = xyes; then :
7296   cat >>confdefs.h <<_ACEOF
7297 #define HAVE_DCGETTEXT 1
7298 _ACEOF
7299
7300 fi
7301 done
7302
7303               # Extract the first word of "gmsgfmt", so it can be a program name with args.
7304 set dummy gmsgfmt; ac_word=$2
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7306 $as_echo_n "checking for $ac_word... " >&6; }
7307 if ${ac_cv_path_GMSGFMT+:} false; then :
7308   $as_echo_n "(cached) " >&6
7309 else
7310   case $GMSGFMT in
7311   [\\/]* | ?:[\\/]*)
7312   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7313   ;;
7314   *)
7315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7316 for as_dir in $PATH
7317 do
7318   IFS=$as_save_IFS
7319   test -z "$as_dir" && as_dir=.
7320     for ac_exec_ext in '' $ac_executable_extensions; do
7321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7322     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7324     break 2
7325   fi
7326 done
7327   done
7328 IFS=$as_save_IFS
7329
7330   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7331   ;;
7332 esac
7333 fi
7334 GMSGFMT=$ac_cv_path_GMSGFMT
7335 if test -n "$GMSGFMT"; then
7336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
7337 $as_echo "$GMSGFMT" >&6; }
7338 else
7339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7340 $as_echo "no" >&6; }
7341 fi
7342
7343
7344               # Extract the first word of "xgettext", so it can be a program name with args.
7345 set dummy xgettext; ac_word=$2
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7347 $as_echo_n "checking for $ac_word... " >&6; }
7348 if ${ac_cv_path_XGETTEXT+:} false; then :
7349   $as_echo_n "(cached) " >&6
7350 else
7351   case "$XGETTEXT" in
7352   /*)
7353   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7354   ;;
7355   *)
7356   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7357   for ac_dir in $PATH; do
7358     test -z "$ac_dir" && ac_dir=.
7359     if test -f $ac_dir/$ac_word; then
7360       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7361         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7362         break
7363       fi
7364     fi
7365   done
7366   IFS="$ac_save_ifs"
7367   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7368   ;;
7369 esac
7370 fi
7371 XGETTEXT="$ac_cv_path_XGETTEXT"
7372 if test -n "$XGETTEXT"; then
7373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
7374 $as_echo "$XGETTEXT" >&6; }
7375 else
7376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7377 $as_echo "no" >&6; }
7378 fi
7379
7380               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7381 /* end confdefs.h.  */
7382
7383 int
7384 main ()
7385 {
7386 extern int _nl_msg_cat_cntr;
7387                              return _nl_msg_cat_cntr
7388   ;
7389   return 0;
7390 }
7391 _ACEOF
7392 if ac_fn_c_try_link "$LINENO"; then :
7393   CATOBJEXT=.gmo
7394                  DATADIRNAME=share
7395 else
7396   CATOBJEXT=.mo
7397                  DATADIRNAME=lib
7398 fi
7399 rm -f core conftest.err conftest.$ac_objext \
7400     conftest$ac_exeext conftest.$ac_ext
7401               INSTOBJEXT=.mo
7402             fi
7403           fi
7404
7405           # Added by Martin Baulig 12/15/98 for libc5 systems
7406           if test "$gt_cv_func_dgettext_libc" != "yes" \
7407             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
7408             INTLLIBS=-lintl
7409             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
7410           fi
7411
7412 fi
7413
7414
7415
7416       if test "$CATOBJEXT" = "NONE"; then
7417                         nls_cv_use_gnu_gettext=yes
7418       fi
7419     fi
7420
7421     if test "$nls_cv_use_gnu_gettext" != "yes"; then
7422
7423 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
7424
7425     else
7426             CATOBJEXT=
7427     fi
7428
7429         if test "$XGETTEXT" != ":"; then
7430                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7431         : ;
7432       else
7433         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
7434 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
7435         XGETTEXT=":"
7436       fi
7437     fi
7438
7439     # We need to process the po/ directory.
7440     POSUB=po
7441
7442     ac_config_commands="$ac_config_commands default-2"
7443
7444
7445                 for lang in $ALL_LINGUAS; do
7446       GMOFILES="$GMOFILES $lang.gmo"
7447       POFILES="$POFILES $lang.po"
7448     done
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462    if test "x$CATOBJEXT" != "x"; then
7463      if test "x$ALL_LINGUAS" = "x"; then
7464        LINGUAS=
7465      else
7466        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
7467 $as_echo_n "checking for catalogs to be installed... " >&6; }
7468        NEW_LINGUAS=
7469        for lang in ${LINGUAS=$ALL_LINGUAS}; do
7470          case "$ALL_LINGUAS" in
7471           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
7472          esac
7473        done
7474        LINGUAS=$NEW_LINGUAS
7475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
7476 $as_echo "$LINGUAS" >&6; }
7477      fi
7478
7479           if test -n "$LINGUAS"; then
7480        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7481      fi
7482    fi
7483
7484             test -d po || mkdir po
7485    if test "$CATOBJEXT" = ".cat"; then
7486      ac_fn_c_check_header_mongrel "$LINENO" "linux/version.h" "ac_cv_header_linux_version_h" "$ac_includes_default"
7487 if test "x$ac_cv_header_linux_version_h" = xyes; then :
7488   msgformat=linux
7489 else
7490   msgformat=xopen
7491 fi
7492
7493
7494
7495                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
7496    fi
7497
7498             MKINSTALLDIRS=
7499 #
7500 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
7501 #
7502 #   if test -n "$ac_aux_dir"; then
7503 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7504 #   fi
7505    if test -z "$MKINSTALLDIRS"; then
7506      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7507    fi
7508
7509    # jwz: you know what, screw it.  Let's just use the version that I
7510    # already computed in configure.in, instead of this version that came
7511    # with the i18n crud, ok?
7512    MKINSTALLDIRS="$INSTALL_DIRS"
7513
7514
7515
7516
7517          test -d po || mkdir po
7518    if test "x$srcdir" != "x."; then
7519      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
7520        posrcprefix="$srcdir/"
7521      else
7522        posrcprefix="../$srcdir/"
7523      fi
7524    else
7525      posrcprefix="../"
7526    fi
7527    rm -f po/POTFILES
7528    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
7529         < $srcdir/po/POTFILES.in > po/POTFILES
7530
7531 MKINSTALLDIRS="$INSTALL_DIRS"
7532
7533
7534 ###############################################################################
7535 #
7536 #       Check for -lXmu (some fucked up vendors don't ship it...)
7537 #
7538 ###############################################################################
7539
7540 have_xmu=no
7541
7542   ac_save_CPPFLAGS="$CPPFLAGS"
7543   if test \! -z "$includedir" ; then
7544     CPPFLAGS="$CPPFLAGS -I$includedir"
7545   fi
7546   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7547   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7548   ac_fn_c_check_header_compile "$LINENO" "X11/Xmu/Error.h" "ac_cv_header_X11_Xmu_Error_h" "#include <stdlib.h>
7549                    #include <stdio.h>
7550                    #include <X11/Intrinsic.h>
7551 "
7552 if test "x$ac_cv_header_X11_Xmu_Error_h" = xyes; then :
7553   have_xmu=yes
7554 fi
7555
7556
7557   CPPFLAGS="$ac_save_CPPFLAGS"
7558 if test "$have_xmu" = no ; then
7559   XMU_SRCS='$(UTILS_SRC)/xmu.c'
7560   XMU_OBJS='$(UTILS_BIN)/xmu.o'
7561   XMU_LIBS=''
7562 else
7563   XMU_SRCS=''
7564   XMU_OBJS=''
7565   XMU_LIBS='-lXmu'
7566   $as_echo "#define HAVE_XMU 1" >>confdefs.h
7567
7568 fi
7569
7570
7571 ###############################################################################
7572 #
7573 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
7574 #       See comp.windows.x FAQ question 124.  The right fix is to
7575 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
7576 #
7577 ###############################################################################
7578
7579 if test "$have_xmu" = yes ; then
7580   case "$host" in
7581     *-sunos4*)
7582     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
7583 $as_echo_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... " >&6; }
7584 if ${ac_cv_sunos_xmu_bug+:} false; then :
7585   $as_echo_n "(cached) " >&6
7586 else
7587   ac_save_LDFLAGS="$LDFLAGS"
7588                     if test \! -z "$x_libraries" ; then
7589                       LDFLAGS="$LDFLAGS -L$x_libraries"
7590                     fi
7591                     # Note: this trick never works!  (Generally.)
7592                     # We're only getting away with using AC_TRY_LINK
7593                     # with X libraries because we know it's SunOS.
7594                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
7595                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7596 /* end confdefs.h.  */
7597
7598 int
7599 main ()
7600 {
7601
7602   ;
7603   return 0;
7604 }
7605 _ACEOF
7606 if ac_fn_c_try_link "$LINENO"; then :
7607   ac_cv_sunos_xmu_bug=no
7608 else
7609   ac_cv_sunos_xmu_bug=yes
7610 fi
7611 rm -f core conftest.err conftest.$ac_objext \
7612     conftest$ac_exeext conftest.$ac_ext
7613                     LDFLAGS="$ac_save_LDFLAGS"
7614 fi
7615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sunos_xmu_bug" >&5
7616 $as_echo "$ac_cv_sunos_xmu_bug" >&6; }
7617     if test "$ac_cv_sunos_xmu_bug" = yes ; then
7618       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler understands -static" >&5
7619 $as_echo_n "checking whether the compiler understands -static... " >&6; }
7620 if ${ac_cv_ld_static+:} false; then :
7621   $as_echo_n "(cached) " >&6
7622 else
7623   ac_save_LDFLAGS="$LDFLAGS"
7624                       LDFLAGS="$LDFLAGS -static"
7625                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7626 /* end confdefs.h.  */
7627
7628 int
7629 main ()
7630 {
7631
7632   ;
7633   return 0;
7634 }
7635 _ACEOF
7636 if ac_fn_c_try_link "$LINENO"; then :
7637   ac_cv_ld_static=yes
7638 else
7639   ac_cv_ld_static=no
7640 fi
7641 rm -f core conftest.err conftest.$ac_objext \
7642     conftest$ac_exeext conftest.$ac_ext
7643                     LDFLAGS="$ac_save_LDFLAGS"
7644 fi
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ld_static" >&5
7646 $as_echo "$ac_cv_ld_static" >&6; }
7647       if test "$ac_cv_ld_static" = yes ; then
7648         LDFLAGS="$LDFLAGS -static"
7649       else
7650         LDFLAGS="$LDFLAGS -Bstatic"
7651       fi
7652     fi
7653     ;;
7654   esac
7655 fi
7656
7657
7658 ###############################################################################
7659 #
7660 #       Handle the --with-hackdir option
7661 #
7662 ###############################################################################
7663
7664 have_hackdir=yes
7665 with_hackdir_req=unspecified
7666
7667 # Check whether --with-hackdir was given.
7668 if test "${with_hackdir+set}" = set; then :
7669   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
7670 else
7671   with_hackdir=yes
7672 fi
7673
7674
7675 if test x"$with_hackdir" = xyes; then
7676   HACKDIR='${libexecdir}/xscreensaver'
7677 elif test x"$with_hackdir" = xno; then
7678   HACKDIR='${bindir}'
7679 else
7680   HACKDIR=$with_hackdir
7681 fi
7682
7683 # canonicalize slashes.
7684 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
7685
7686 # Expand HACKDIR as HACKDIR_FULL
7687 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
7688
7689 # This option used to be called --enable-subdir; make sure that is no longer
7690 # used, since configure brain-damagedly ignores unknown --enable options.
7691
7692 obsolete_enable=
7693 # Check whether --enable-subdir was given.
7694 if test "${enable_subdir+set}" = set; then :
7695   enableval=$enable_subdir; obsolete_enable=yes
7696 fi
7697
7698 if test -n "$obsolete_enable"; then
7699   echo "error: the --enable-subdir option has been replaced with"
7700   echo "       the new --with-hackdir option; see \`configure --help'"
7701   echo "       for more information."
7702   exit 1
7703 fi
7704
7705
7706 ###############################################################################
7707 #
7708 #       Handle the --with-configdir option
7709 #       Help for --with-x-app-defaults option added.
7710 #
7711 ###############################################################################
7712
7713 have_configdir=yes
7714 with_configdir_req=unspecified
7715
7716 # Check whether --with-configdir was given.
7717 if test "${with_configdir+set}" = set; then :
7718   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
7719 else
7720   with_configdir=yes
7721 fi
7722
7723
7724 if test x"$with_configdir" = xyes; then
7725   HACK_CONF_DIR='${datadir}/xscreensaver/config'
7726 elif test x"$with_configdir" = xno; then
7727   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
7728   exit 1
7729 else
7730   # there must be a better way than this...
7731   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
7732     # absolute path
7733     HACK_CONF_DIR=$with_configdir
7734   else
7735     # relative path
7736     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
7737   fi
7738 fi
7739
7740
7741
7742
7743 ###############################################################################
7744 #
7745 #       Check for the SGI SCREEN_SAVER server extension.
7746 #
7747 ###############################################################################
7748
7749 #have_sgi=no
7750 #with_sgi_req=unspecified
7751 #AC_ARG_WITH(sgi-ext,
7752 #[Except where noted, all of the --with options below can also take a
7753 #directory argument: for example, `--with-motif=/opt/Motif'.  That would
7754 #cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
7755 #to be added to the -L list, assuming those directories exist.
7756 #
7757 #By default, support for each of these options will be built in, if the
7758 #relevant library routines exist.  At run time, they will then be used
7759 #only if the X server being used supports them.  Each --with option has
7760 #a corresponding --without option, to override building support for them
7761 #at all.
7762 #
7763 #Screen blanking and idle-detection options:
7764 #
7765 #  --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.],
7766 #  [with_sgi="$withval"; with_sgi_req="$withval"],[with_sgi=yes])
7767 #
7768 #HANDLE_X_PATH_ARG(with_sgi, --with-sgi-ext, SGI SCREEN_SAVER)
7769 #
7770 #if test "$with_sgi" = yes; then
7771 #  AC_CHECK_X_HEADER(X11/extensions/XScreenSaver.h,
7772 #                    [have_sgi=yes
7773 #                     AC_DEFINE(HAVE_SGI_SAVER_EXTENSION)],,
7774 #                    [#include <X11/Xlib.h>])
7775 #
7776 #elif test "$with_sgi" != no; then
7777 #  echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
7778 #  exit 1
7779 #fi
7780
7781
7782 ###############################################################################
7783 #
7784 #       Check for the XIDLE server extension.
7785 #
7786 ###############################################################################
7787
7788 #have_xidle=no
7789 #with_xidle_req=unspecified
7790 #AC_ARG_WITH(xidle-ext,
7791 #[  --with-xidle-ext        Include support for the XIDLE extension.],
7792 #  [with_xidle="$withval"; with_xidle_req="$withval"],[with_xidle=yes])
7793 #
7794 #HANDLE_X_PATH_ARG(with_xidle, --with-xidle-ext, XIDLE)
7795 #
7796 #if test "$with_xidle" = yes; then
7797 #  AC_CHECK_X_HEADER(X11/extensions/xidle.h,
7798 #                    [have_xidle=yes
7799 #                     AC_DEFINE(HAVE_XIDLE_EXTENSION)],,
7800 #                    [#include <X11/Xlib.h>])
7801 #elif test "$with_xidle" != no; then
7802 #  echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
7803 #  exit 1
7804 #fi
7805
7806
7807 ###############################################################################
7808 #
7809 #       Check for the SGI-VIDEO-CONTROL server extension.
7810 #
7811 ###############################################################################
7812
7813 #have_sgivc=no
7814 #with_sgivc_req=unspecified
7815 #AC_ARG_WITH(sgivc-ext,
7816 #[  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.],
7817 #  [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
7818 #
7819 #HANDLE_X_PATH_ARG(with_sgivc, --with-sgivc-ext, SGI-VIDEO-CONTROL)
7820 #
7821 #if test "$with_sgivc" = yes; then
7822 #
7823 #  # first check for XSGIvc.h
7824 #  AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes],,
7825 #                    [#include <X11/Xlib.h>])
7826 #
7827 #  # if that succeeded, then check for the -lXsgivc
7828 #  if test "$have_sgivc" = yes; then
7829 #    have_sgivc=no
7830 #    AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
7831 #                  [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [true],
7832 #                  -lXext -lX11)
7833 #  fi
7834 #
7835 #  # if that succeeded, then we've really got it.
7836 #  if test "$have_sgivc" = yes; then
7837 #    AC_DEFINE(HAVE_SGI_VC_EXTENSION)
7838 #  fi
7839 #
7840 #elif test "$with_sgivc" != no; then
7841 #  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
7842 #  exit 1
7843 #fi
7844
7845
7846 ###############################################################################
7847 #
7848 #       Check for the DPMS server extension.
7849 #
7850 ###############################################################################
7851
7852 have_dpms=no
7853 with_dpms_req=unspecified
7854
7855 # Check whether --with-dpms-ext was given.
7856 if test "${with_dpms_ext+set}" = set; then :
7857   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
7858 else
7859   with_dpms=yes
7860 fi
7861
7862
7863
7864    case "$with_dpms" in
7865     yes) ;;
7866     no)  ;;
7867
7868     /*)
7869      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS headers" >&5
7870 $as_echo_n "checking for DPMS headers... " >&6; }
7871      d=$with_dpms/include
7872      if test -d $d; then
7873        X_CFLAGS="-I$d $X_CFLAGS"
7874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
7875 $as_echo "$d" >&6; }
7876      else
7877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
7878 $as_echo "not found ($d: no such directory)" >&6; }
7879      fi
7880
7881      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS libs" >&5
7882 $as_echo_n "checking for DPMS libs... " >&6; }
7883      d=$with_dpms/lib
7884      if test -d $d; then
7885        X_LIBS="-L$d $X_LIBS"
7886        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
7887 $as_echo "$d" >&6; }
7888      else
7889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
7890 $as_echo "not found ($d: no such directory)" >&6; }
7891      fi
7892
7893      # replace the directory string with "yes".
7894      with_dpms_req="yes"
7895      with_dpms=$with_dpms_req
7896      ;;
7897
7898     *)
7899      echo ""
7900      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
7901      echo "       If it is a directory, then \`DIR/include' will be added to"
7902      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
7903      exit 1
7904      ;;
7905    esac
7906
7907
7908 if test "$with_dpms" = yes; then
7909
7910   # first check for dpms.h
7911
7912   ac_save_CPPFLAGS="$CPPFLAGS"
7913   if test \! -z "$includedir" ; then
7914     CPPFLAGS="$CPPFLAGS -I$includedir"
7915   fi
7916   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7917   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7918   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/dpms.h" "ac_cv_header_X11_extensions_dpms_h" "#include <X11/Xlib.h>
7919                      #include <X11/Xmd.h>
7920 "
7921 if test "x$ac_cv_header_X11_extensions_dpms_h" = xyes; then :
7922   have_dpms=yes
7923 fi
7924
7925
7926   CPPFLAGS="$ac_save_CPPFLAGS"
7927
7928   # if that succeeded, then check for the DPMS code in the libraries
7929   if test "$have_dpms" = yes; then
7930
7931     # first look in -lXext (this is where it is with XFree86 4.0)
7932     have_dpms=no
7933
7934   ac_save_CPPFLAGS="$CPPFLAGS"
7935   ac_save_LDFLAGS="$LDFLAGS"
7936 #  ac_save_LIBS="$LIBS"
7937
7938   if test \! -z "$includedir" ; then
7939     CPPFLAGS="$CPPFLAGS -I$includedir"
7940   fi
7941   # note: $X_CFLAGS includes $x_includes
7942   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7943
7944   if test \! -z "$libdir" ; then
7945     LDFLAGS="$LDFLAGS -L$libdir"
7946   fi
7947   # note: $X_LIBS includes $x_libraries
7948   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
7949
7950   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7951   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
7952   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXext" >&5
7953 $as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
7954 if ${ac_cv_lib_Xext_DPMSInfo+:} false; then :
7955   $as_echo_n "(cached) " >&6
7956 else
7957   ac_check_lib_save_LIBS=$LIBS
7958 LIBS="-lXext -lXext -lX11 $LIBS"
7959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7960 /* end confdefs.h.  */
7961
7962 /* Override any GCC internal prototype to avoid an error.
7963    Use char because int might match the return type of a GCC
7964    builtin and then its argument prototype would still apply.  */
7965 #ifdef __cplusplus
7966 extern "C"
7967 #endif
7968 char DPMSInfo ();
7969 int
7970 main ()
7971 {
7972 return DPMSInfo ();
7973   ;
7974   return 0;
7975 }
7976 _ACEOF
7977 if ac_fn_c_try_link "$LINENO"; then :
7978   ac_cv_lib_Xext_DPMSInfo=yes
7979 else
7980   ac_cv_lib_Xext_DPMSInfo=no
7981 fi
7982 rm -f core conftest.err conftest.$ac_objext \
7983     conftest$ac_exeext conftest.$ac_ext
7984 LIBS=$ac_check_lib_save_LIBS
7985 fi
7986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_DPMSInfo" >&5
7987 $as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
7988 if test "x$ac_cv_lib_Xext_DPMSInfo" = xyes; then :
7989   have_dpms=yes
7990 else
7991   true
7992 fi
7993
7994   CPPFLAGS="$ac_save_CPPFLAGS"
7995   LDFLAGS="$ac_save_LDFLAGS"
7996 #  LIBS="$ac_save_LIBS"
7997
7998
7999     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
8000     if test "$have_dpms" = no; then
8001
8002   ac_save_CPPFLAGS="$CPPFLAGS"
8003   ac_save_LDFLAGS="$LDFLAGS"
8004 #  ac_save_LIBS="$LIBS"
8005
8006   if test \! -z "$includedir" ; then
8007     CPPFLAGS="$CPPFLAGS -I$includedir"
8008   fi
8009   # note: $X_CFLAGS includes $x_includes
8010   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8011
8012   if test \! -z "$libdir" ; then
8013     LDFLAGS="$LDFLAGS -L$libdir"
8014   fi
8015   # note: $X_LIBS includes $x_libraries
8016   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8017
8018   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8019   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8020   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXdpms" >&5
8021 $as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
8022 if ${ac_cv_lib_Xdpms_DPMSInfo+:} false; then :
8023   $as_echo_n "(cached) " >&6
8024 else
8025   ac_check_lib_save_LIBS=$LIBS
8026 LIBS="-lXdpms -lXext -lX11 $LIBS"
8027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8028 /* end confdefs.h.  */
8029
8030 /* Override any GCC internal prototype to avoid an error.
8031    Use char because int might match the return type of a GCC
8032    builtin and then its argument prototype would still apply.  */
8033 #ifdef __cplusplus
8034 extern "C"
8035 #endif
8036 char DPMSInfo ();
8037 int
8038 main ()
8039 {
8040 return DPMSInfo ();
8041   ;
8042   return 0;
8043 }
8044 _ACEOF
8045 if ac_fn_c_try_link "$LINENO"; then :
8046   ac_cv_lib_Xdpms_DPMSInfo=yes
8047 else
8048   ac_cv_lib_Xdpms_DPMSInfo=no
8049 fi
8050 rm -f core conftest.err conftest.$ac_objext \
8051     conftest$ac_exeext conftest.$ac_ext
8052 LIBS=$ac_check_lib_save_LIBS
8053 fi
8054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
8055 $as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
8056 if test "x$ac_cv_lib_Xdpms_DPMSInfo" = xyes; then :
8057   have_dpms=yes; XDPMS_LIBS="-lXdpms"
8058 else
8059   true
8060 fi
8061
8062   CPPFLAGS="$ac_save_CPPFLAGS"
8063   LDFLAGS="$ac_save_LDFLAGS"
8064 #  LIBS="$ac_save_LIBS"
8065
8066     fi
8067   fi
8068
8069
8070   # if that succeeded, then we've really got it.
8071   if test "$have_dpms" = yes; then
8072     $as_echo "#define HAVE_DPMS_EXTENSION 1" >>confdefs.h
8073
8074   fi
8075
8076 elif test "$with_dpms" != no; then
8077   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
8078   exit 1
8079 fi
8080
8081
8082 ###############################################################################
8083 #
8084 #       Check for the XINERAMA server extension.
8085 #
8086 ###############################################################################
8087
8088 have_xinerama=no
8089 with_xinerama_req=unspecified
8090
8091 # Check whether --with-xinerama-ext was given.
8092 if test "${with_xinerama_ext+set}" = set; then :
8093   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
8094 else
8095   with_xinerama=yes
8096 fi
8097
8098
8099
8100    case "$with_xinerama" in
8101     yes) ;;
8102     no)  ;;
8103
8104     /*)
8105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA headers" >&5
8106 $as_echo_n "checking for XINERAMA headers... " >&6; }
8107      d=$with_xinerama/include
8108      if test -d $d; then
8109        X_CFLAGS="-I$d $X_CFLAGS"
8110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8111 $as_echo "$d" >&6; }
8112      else
8113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8114 $as_echo "not found ($d: no such directory)" >&6; }
8115      fi
8116
8117      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA libs" >&5
8118 $as_echo_n "checking for XINERAMA libs... " >&6; }
8119      d=$with_xinerama/lib
8120      if test -d $d; then
8121        X_LIBS="-L$d $X_LIBS"
8122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8123 $as_echo "$d" >&6; }
8124      else
8125        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8126 $as_echo "not found ($d: no such directory)" >&6; }
8127      fi
8128
8129      # replace the directory string with "yes".
8130      with_xinerama_req="yes"
8131      with_xinerama=$with_xinerama_req
8132      ;;
8133
8134     *)
8135      echo ""
8136      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
8137      echo "       If it is a directory, then \`DIR/include' will be added to"
8138      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8139      exit 1
8140      ;;
8141    esac
8142
8143
8144 if test "$with_xinerama" = yes; then
8145
8146   # first check for Xinerama.h
8147
8148   ac_save_CPPFLAGS="$CPPFLAGS"
8149   if test \! -z "$includedir" ; then
8150     CPPFLAGS="$CPPFLAGS -I$includedir"
8151   fi
8152   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8153   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8154   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "#include <X11/Xlib.h>
8155 "
8156 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = xyes; then :
8157   have_xinerama=yes
8158 fi
8159
8160
8161   CPPFLAGS="$ac_save_CPPFLAGS"
8162
8163   # if that succeeded, then check for the XINERAMA code in the libraries
8164   if test "$have_xinerama" = yes; then
8165
8166     # first look in -lXext
8167     have_xinerama=no
8168
8169   ac_save_CPPFLAGS="$CPPFLAGS"
8170   ac_save_LDFLAGS="$LDFLAGS"
8171 #  ac_save_LIBS="$LIBS"
8172
8173   if test \! -z "$includedir" ; then
8174     CPPFLAGS="$CPPFLAGS -I$includedir"
8175   fi
8176   # note: $X_CFLAGS includes $x_includes
8177   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8178
8179   if test \! -z "$libdir" ; then
8180     LDFLAGS="$LDFLAGS -L$libdir"
8181   fi
8182   # note: $X_LIBS includes $x_libraries
8183   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8184
8185   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8186   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8187   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXext" >&5
8188 $as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
8189 if ${ac_cv_lib_Xext_XineramaQueryScreens+:} false; then :
8190   $as_echo_n "(cached) " >&6
8191 else
8192   ac_check_lib_save_LIBS=$LIBS
8193 LIBS="-lXext -lXext -lX11 $LIBS"
8194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8195 /* end confdefs.h.  */
8196
8197 /* Override any GCC internal prototype to avoid an error.
8198    Use char because int might match the return type of a GCC
8199    builtin and then its argument prototype would still apply.  */
8200 #ifdef __cplusplus
8201 extern "C"
8202 #endif
8203 char XineramaQueryScreens ();
8204 int
8205 main ()
8206 {
8207 return XineramaQueryScreens ();
8208   ;
8209   return 0;
8210 }
8211 _ACEOF
8212 if ac_fn_c_try_link "$LINENO"; then :
8213   ac_cv_lib_Xext_XineramaQueryScreens=yes
8214 else
8215   ac_cv_lib_Xext_XineramaQueryScreens=no
8216 fi
8217 rm -f core conftest.err conftest.$ac_objext \
8218     conftest$ac_exeext conftest.$ac_ext
8219 LIBS=$ac_check_lib_save_LIBS
8220 fi
8221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
8222 $as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
8223 if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = xyes; then :
8224   have_xinerama=yes
8225 else
8226   true
8227 fi
8228
8229   CPPFLAGS="$ac_save_CPPFLAGS"
8230   LDFLAGS="$ac_save_LDFLAGS"
8231 #  LIBS="$ac_save_LIBS"
8232
8233
8234     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
8235     if test "$have_xinerama" = no; then
8236
8237   ac_save_CPPFLAGS="$CPPFLAGS"
8238   ac_save_LDFLAGS="$LDFLAGS"
8239 #  ac_save_LIBS="$LIBS"
8240
8241   if test \! -z "$includedir" ; then
8242     CPPFLAGS="$CPPFLAGS -I$includedir"
8243   fi
8244   # note: $X_CFLAGS includes $x_includes
8245   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8246
8247   if test \! -z "$libdir" ; then
8248     LDFLAGS="$LDFLAGS -L$libdir"
8249   fi
8250   # note: $X_LIBS includes $x_libraries
8251   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8252
8253   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8254   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8255   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXinerama" >&5
8256 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
8257 if ${ac_cv_lib_Xinerama_XineramaQueryScreens+:} false; then :
8258   $as_echo_n "(cached) " >&6
8259 else
8260   ac_check_lib_save_LIBS=$LIBS
8261 LIBS="-lXinerama -lXext -lX11 $LIBS"
8262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8263 /* end confdefs.h.  */
8264
8265 /* Override any GCC internal prototype to avoid an error.
8266    Use char because int might match the return type of a GCC
8267    builtin and then its argument prototype would still apply.  */
8268 #ifdef __cplusplus
8269 extern "C"
8270 #endif
8271 char XineramaQueryScreens ();
8272 int
8273 main ()
8274 {
8275 return XineramaQueryScreens ();
8276   ;
8277   return 0;
8278 }
8279 _ACEOF
8280 if ac_fn_c_try_link "$LINENO"; then :
8281   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
8282 else
8283   ac_cv_lib_Xinerama_XineramaQueryScreens=no
8284 fi
8285 rm -f core conftest.err conftest.$ac_objext \
8286     conftest$ac_exeext conftest.$ac_ext
8287 LIBS=$ac_check_lib_save_LIBS
8288 fi
8289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
8290 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
8291 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = xyes; then :
8292   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
8293 else
8294   true
8295 fi
8296
8297   CPPFLAGS="$ac_save_CPPFLAGS"
8298   LDFLAGS="$ac_save_LDFLAGS"
8299 #  LIBS="$ac_save_LIBS"
8300
8301     fi
8302   fi
8303
8304   # if that succeeded, then we've really got it.
8305   if test "$have_xinerama" = yes; then
8306     $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
8307
8308   fi
8309
8310 elif test "$with_xinerama" != no; then
8311   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
8312   exit 1
8313 fi
8314
8315
8316 ###############################################################################
8317 #
8318 #       Check for the XINPUT server extension.
8319 #
8320 ###############################################################################
8321
8322 have_xinput=no
8323 with_xinput_req=unspecified
8324
8325 # Check whether --with-xinput-ext was given.
8326 if test "${with_xinput_ext+set}" = set; then :
8327   withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
8328 else
8329   with_xinput=yes
8330 fi
8331
8332
8333
8334    case "$with_xinput" in
8335     yes) ;;
8336     no)  ;;
8337
8338     /*)
8339      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT headers" >&5
8340 $as_echo_n "checking for XINPUT headers... " >&6; }
8341      d=$with_xinput/include
8342      if test -d $d; then
8343        X_CFLAGS="-I$d $X_CFLAGS"
8344        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8345 $as_echo "$d" >&6; }
8346      else
8347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8348 $as_echo "not found ($d: no such directory)" >&6; }
8349      fi
8350
8351      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT libs" >&5
8352 $as_echo_n "checking for XINPUT libs... " >&6; }
8353      d=$with_xinput/lib
8354      if test -d $d; then
8355        X_LIBS="-L$d $X_LIBS"
8356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8357 $as_echo "$d" >&6; }
8358      else
8359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8360 $as_echo "not found ($d: no such directory)" >&6; }
8361      fi
8362
8363      # replace the directory string with "yes".
8364      with_xinput_req="yes"
8365      with_xinput=$with_xinput_req
8366      ;;
8367
8368     *)
8369      echo ""
8370      echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
8371      echo "       If it is a directory, then \`DIR/include' will be added to"
8372      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8373      exit 1
8374      ;;
8375    esac
8376
8377
8378 if test "$with_xinput" = yes; then
8379
8380   # first check for Xinput.h
8381
8382   ac_save_CPPFLAGS="$CPPFLAGS"
8383   if test \! -z "$includedir" ; then
8384     CPPFLAGS="$CPPFLAGS -I$includedir"
8385   fi
8386   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8387   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8388   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XInput.h" "ac_cv_header_X11_extensions_XInput_h" "#include <X11/Xlib.h>
8389 "
8390 if test "x$ac_cv_header_X11_extensions_XInput_h" = xyes; then :
8391   have_xinput=yes
8392 fi
8393
8394
8395   CPPFLAGS="$ac_save_CPPFLAGS"
8396
8397   # if that succeeded, then check for libXi
8398   if test "$have_xinput" = yes; then
8399     have_xinput=no
8400
8401   ac_save_CPPFLAGS="$CPPFLAGS"
8402   ac_save_LDFLAGS="$LDFLAGS"
8403 #  ac_save_LIBS="$LIBS"
8404
8405   if test \! -z "$includedir" ; then
8406     CPPFLAGS="$CPPFLAGS -I$includedir"
8407   fi
8408   # note: $X_CFLAGS includes $x_includes
8409   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8410
8411   if test \! -z "$libdir" ; then
8412     LDFLAGS="$LDFLAGS -L$libdir"
8413   fi
8414   # note: $X_LIBS includes $x_libraries
8415   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8416
8417   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8418   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8419   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XListInputDevices in -lXi" >&5
8420 $as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
8421 if ${ac_cv_lib_Xi_XListInputDevices+:} false; then :
8422   $as_echo_n "(cached) " >&6
8423 else
8424   ac_check_lib_save_LIBS=$LIBS
8425 LIBS="-lXi -lXext -lX11 $LIBS"
8426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8427 /* end confdefs.h.  */
8428
8429 /* Override any GCC internal prototype to avoid an error.
8430    Use char because int might match the return type of a GCC
8431    builtin and then its argument prototype would still apply.  */
8432 #ifdef __cplusplus
8433 extern "C"
8434 #endif
8435 char XListInputDevices ();
8436 int
8437 main ()
8438 {
8439 return XListInputDevices ();
8440   ;
8441   return 0;
8442 }
8443 _ACEOF
8444 if ac_fn_c_try_link "$LINENO"; then :
8445   ac_cv_lib_Xi_XListInputDevices=yes
8446 else
8447   ac_cv_lib_Xi_XListInputDevices=no
8448 fi
8449 rm -f core conftest.err conftest.$ac_objext \
8450     conftest$ac_exeext conftest.$ac_ext
8451 LIBS=$ac_check_lib_save_LIBS
8452 fi
8453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xi_XListInputDevices" >&5
8454 $as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
8455 if test "x$ac_cv_lib_Xi_XListInputDevices" = xyes; then :
8456   have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
8457 else
8458   true
8459 fi
8460
8461   CPPFLAGS="$ac_save_CPPFLAGS"
8462   LDFLAGS="$ac_save_LDFLAGS"
8463 #  LIBS="$ac_save_LIBS"
8464
8465   fi
8466
8467   # if that succeeded, then we've really got it.
8468   if test "$have_xinput" = yes; then
8469     $as_echo "#define HAVE_XINPUT 1" >>confdefs.h
8470
8471   fi
8472
8473 elif test "$with_xinput" != no; then
8474   echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
8475   exit 1
8476 fi
8477
8478
8479 ###############################################################################
8480 #
8481 #       Check for the XF86VMODE server extension (for virtual screens.)
8482 #
8483 ###############################################################################
8484
8485 have_xf86vmode=no
8486 with_xf86vmode_req=unspecified
8487
8488 # Check whether --with-xf86vmode-ext was given.
8489 if test "${with_xf86vmode_ext+set}" = set; then :
8490   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
8491 else
8492   with_xf86vmode=yes
8493 fi
8494
8495
8496
8497    case "$with_xf86vmode" in
8498     yes) ;;
8499     no)  ;;
8500
8501     /*)
8502      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode headers" >&5
8503 $as_echo_n "checking for xf86vmode headers... " >&6; }
8504      d=$with_xf86vmode/include
8505      if test -d $d; then
8506        X_CFLAGS="-I$d $X_CFLAGS"
8507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8508 $as_echo "$d" >&6; }
8509      else
8510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8511 $as_echo "not found ($d: no such directory)" >&6; }
8512      fi
8513
8514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode libs" >&5
8515 $as_echo_n "checking for xf86vmode libs... " >&6; }
8516      d=$with_xf86vmode/lib
8517      if test -d $d; then
8518        X_LIBS="-L$d $X_LIBS"
8519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8520 $as_echo "$d" >&6; }
8521      else
8522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8523 $as_echo "not found ($d: no such directory)" >&6; }
8524      fi
8525
8526      # replace the directory string with "yes".
8527      with_xf86vmode_req="yes"
8528      with_xf86vmode=$with_xf86vmode_req
8529      ;;
8530
8531     *)
8532      echo ""
8533      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
8534      echo "       If it is a directory, then \`DIR/include' will be added to"
8535      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8536      exit 1
8537      ;;
8538    esac
8539
8540
8541 VIDMODE_LIBS=""
8542
8543 if test "$with_xf86vmode" = yes; then
8544
8545   # first check for xf86vmode.h
8546
8547   ac_save_CPPFLAGS="$CPPFLAGS"
8548   if test \! -z "$includedir" ; then
8549     CPPFLAGS="$CPPFLAGS -I$includedir"
8550   fi
8551   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8552   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8553   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
8554 "
8555 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
8556   have_xf86vmode=yes
8557 fi
8558
8559
8560   CPPFLAGS="$ac_save_CPPFLAGS"
8561
8562   # if that succeeded, then check for the -lXxf86vm
8563   if test "$have_xf86vmode" = yes; then
8564     have_xf86vmode=no
8565
8566   ac_save_CPPFLAGS="$CPPFLAGS"
8567   ac_save_LDFLAGS="$LDFLAGS"
8568 #  ac_save_LIBS="$LIBS"
8569
8570   if test \! -z "$includedir" ; then
8571     CPPFLAGS="$CPPFLAGS -I$includedir"
8572   fi
8573   # note: $X_CFLAGS includes $x_includes
8574   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8575
8576   if test \! -z "$libdir" ; then
8577     LDFLAGS="$LDFLAGS -L$libdir"
8578   fi
8579   # note: $X_LIBS includes $x_libraries
8580   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8581
8582   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8583   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8584   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
8585 $as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
8586 if ${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+:} false; then :
8587   $as_echo_n "(cached) " >&6
8588 else
8589   ac_check_lib_save_LIBS=$LIBS
8590 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
8591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8592 /* end confdefs.h.  */
8593
8594 /* Override any GCC internal prototype to avoid an error.
8595    Use char because int might match the return type of a GCC
8596    builtin and then its argument prototype would still apply.  */
8597 #ifdef __cplusplus
8598 extern "C"
8599 #endif
8600 char XF86VidModeGetViewPort ();
8601 int
8602 main ()
8603 {
8604 return XF86VidModeGetViewPort ();
8605   ;
8606   return 0;
8607 }
8608 _ACEOF
8609 if ac_fn_c_try_link "$LINENO"; then :
8610   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
8611 else
8612   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
8613 fi
8614 rm -f core conftest.err conftest.$ac_objext \
8615     conftest$ac_exeext conftest.$ac_ext
8616 LIBS=$ac_check_lib_save_LIBS
8617 fi
8618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
8619 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
8620 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = xyes; then :
8621   have_xf86vmode=yes;
8622                    VIDMODE_LIBS="-lXxf86vm";
8623                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
8624 else
8625   true
8626 fi
8627
8628   CPPFLAGS="$ac_save_CPPFLAGS"
8629   LDFLAGS="$ac_save_LDFLAGS"
8630 #  LIBS="$ac_save_LIBS"
8631
8632   fi
8633
8634   # if that succeeded, then we've really got it.
8635   if test "$have_xf86vmode" = yes; then
8636     $as_echo "#define HAVE_XF86VMODE 1" >>confdefs.h
8637
8638   fi
8639
8640 elif test "$with_xf86vmode" != no; then
8641   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
8642   exit 1
8643 fi
8644
8645
8646 ###############################################################################
8647 #
8648 #       Check for the XF86VMODE server extension (for gamma fading.)
8649 #
8650 ###############################################################################
8651
8652 have_xf86gamma=no
8653 have_xf86gamma_ramp=no
8654 with_xf86gamma_req=unspecified
8655
8656 # Check whether --with-xf86gamma-ext was given.
8657 if test "${with_xf86gamma_ext+set}" = set; then :
8658   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
8659 else
8660   with_xf86gamma=yes
8661 fi
8662
8663
8664
8665    case "$with_xf86gamma" in
8666     yes) ;;
8667     no)  ;;
8668
8669     /*)
8670      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma headers" >&5
8671 $as_echo_n "checking for xf86gamma headers... " >&6; }
8672      d=$with_xf86gamma/include
8673      if test -d $d; then
8674        X_CFLAGS="-I$d $X_CFLAGS"
8675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8676 $as_echo "$d" >&6; }
8677      else
8678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8679 $as_echo "not found ($d: no such directory)" >&6; }
8680      fi
8681
8682      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma libs" >&5
8683 $as_echo_n "checking for xf86gamma libs... " >&6; }
8684      d=$with_xf86gamma/lib
8685      if test -d $d; then
8686        X_LIBS="-L$d $X_LIBS"
8687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8688 $as_echo "$d" >&6; }
8689      else
8690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8691 $as_echo "not found ($d: no such directory)" >&6; }
8692      fi
8693
8694      # replace the directory string with "yes".
8695      with_xf86gamma_req="yes"
8696      with_xf86gamma=$with_xf86gamma_req
8697      ;;
8698
8699     *)
8700      echo ""
8701      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
8702      echo "       If it is a directory, then \`DIR/include' will be added to"
8703      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8704      exit 1
8705      ;;
8706    esac
8707
8708
8709 if test "$with_xf86gamma" = yes; then
8710
8711   # first check for xf86vmode.h, if we haven't already
8712   if test "$have_xf86vmode" = yes; then
8713     have_xf86gamma=yes
8714   else
8715
8716   ac_save_CPPFLAGS="$CPPFLAGS"
8717   if test \! -z "$includedir" ; then
8718     CPPFLAGS="$CPPFLAGS -I$includedir"
8719   fi
8720   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8721   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8722   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
8723 "
8724 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
8725   have_xf86gamma=yes
8726 fi
8727
8728
8729   CPPFLAGS="$ac_save_CPPFLAGS"
8730   fi
8731
8732   # if that succeeded, then check for the -lXxf86vm
8733   if test "$have_xf86gamma" = yes; then
8734     have_xf86gamma=no
8735
8736   ac_save_CPPFLAGS="$CPPFLAGS"
8737   ac_save_LDFLAGS="$LDFLAGS"
8738 #  ac_save_LIBS="$LIBS"
8739
8740   if test \! -z "$includedir" ; then
8741     CPPFLAGS="$CPPFLAGS -I$includedir"
8742   fi
8743   # note: $X_CFLAGS includes $x_includes
8744   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8745
8746   if test \! -z "$libdir" ; then
8747     LDFLAGS="$LDFLAGS -L$libdir"
8748   fi
8749   # note: $X_LIBS includes $x_libraries
8750   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8751
8752   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8753   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8754   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
8755 $as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
8756 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+:} false; then :
8757   $as_echo_n "(cached) " >&6
8758 else
8759   ac_check_lib_save_LIBS=$LIBS
8760 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
8761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8762 /* end confdefs.h.  */
8763
8764 /* Override any GCC internal prototype to avoid an error.
8765    Use char because int might match the return type of a GCC
8766    builtin and then its argument prototype would still apply.  */
8767 #ifdef __cplusplus
8768 extern "C"
8769 #endif
8770 char XF86VidModeSetGamma ();
8771 int
8772 main ()
8773 {
8774 return XF86VidModeSetGamma ();
8775   ;
8776   return 0;
8777 }
8778 _ACEOF
8779 if ac_fn_c_try_link "$LINENO"; then :
8780   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
8781 else
8782   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
8783 fi
8784 rm -f core conftest.err conftest.$ac_objext \
8785     conftest$ac_exeext conftest.$ac_ext
8786 LIBS=$ac_check_lib_save_LIBS
8787 fi
8788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
8789 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
8790 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = xyes; then :
8791   have_xf86gamma=yes
8792 else
8793   true
8794 fi
8795
8796   CPPFLAGS="$ac_save_CPPFLAGS"
8797   LDFLAGS="$ac_save_LDFLAGS"
8798 #  LIBS="$ac_save_LIBS"
8799
8800   fi
8801
8802   # check for the Ramp versions of the functions too.
8803   if test "$have_xf86gamma" = yes; then
8804     have_xf86gamma_ramp=no
8805
8806   ac_save_CPPFLAGS="$CPPFLAGS"
8807   ac_save_LDFLAGS="$LDFLAGS"
8808 #  ac_save_LIBS="$LIBS"
8809
8810   if test \! -z "$includedir" ; then
8811     CPPFLAGS="$CPPFLAGS -I$includedir"
8812   fi
8813   # note: $X_CFLAGS includes $x_includes
8814   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8815
8816   if test \! -z "$libdir" ; then
8817     LDFLAGS="$LDFLAGS -L$libdir"
8818   fi
8819   # note: $X_LIBS includes $x_libraries
8820   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8821
8822   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8823   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8824   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
8825 $as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
8826 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+:} false; then :
8827   $as_echo_n "(cached) " >&6
8828 else
8829   ac_check_lib_save_LIBS=$LIBS
8830 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
8831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8832 /* end confdefs.h.  */
8833
8834 /* Override any GCC internal prototype to avoid an error.
8835    Use char because int might match the return type of a GCC
8836    builtin and then its argument prototype would still apply.  */
8837 #ifdef __cplusplus
8838 extern "C"
8839 #endif
8840 char XF86VidModeSetGammaRamp ();
8841 int
8842 main ()
8843 {
8844 return XF86VidModeSetGammaRamp ();
8845   ;
8846   return 0;
8847 }
8848 _ACEOF
8849 if ac_fn_c_try_link "$LINENO"; then :
8850   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
8851 else
8852   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
8853 fi
8854 rm -f core conftest.err conftest.$ac_objext \
8855     conftest$ac_exeext conftest.$ac_ext
8856 LIBS=$ac_check_lib_save_LIBS
8857 fi
8858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
8859 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
8860 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = xyes; then :
8861   have_xf86gamma_ramp=yes
8862 else
8863   true
8864 fi
8865
8866   CPPFLAGS="$ac_save_CPPFLAGS"
8867   LDFLAGS="$ac_save_LDFLAGS"
8868 #  LIBS="$ac_save_LIBS"
8869
8870   fi
8871
8872   # if those tests succeeded, then we've really got the functions.
8873   if test "$have_xf86gamma" = yes; then
8874     $as_echo "#define HAVE_XF86VMODE_GAMMA 1" >>confdefs.h
8875
8876   fi
8877
8878   if test "$have_xf86gamma_ramp" = yes; then
8879     $as_echo "#define HAVE_XF86VMODE_GAMMA_RAMP 1" >>confdefs.h
8880
8881   fi
8882
8883   # pull in the lib, if we haven't already
8884   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
8885     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
8886   fi
8887
8888 elif test "$with_xf86gamma" != no; then
8889   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
8890   exit 1
8891 fi
8892
8893
8894 ###############################################################################
8895 #
8896 #       Check for the RANDR (Resize and Rotate) server extension.
8897 #
8898 #       We need this to detect when the resolution of the desktop
8899 #       has changed out from under us (this is a newer, different
8900 #       mechanism than the XF86VMODE virtual viewports.)
8901 #
8902 ###############################################################################
8903
8904 have_randr=no
8905 with_randr_req=unspecified
8906
8907 # Check whether --with-randr-ext was given.
8908 if test "${with_randr_ext+set}" = set; then :
8909   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
8910 else
8911   with_randr=yes
8912 fi
8913
8914
8915
8916    case "$with_randr" in
8917     yes) ;;
8918     no)  ;;
8919
8920     /*)
8921      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR headers" >&5
8922 $as_echo_n "checking for RANDR headers... " >&6; }
8923      d=$with_randr/include
8924      if test -d $d; then
8925        X_CFLAGS="-I$d $X_CFLAGS"
8926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8927 $as_echo "$d" >&6; }
8928      else
8929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8930 $as_echo "not found ($d: no such directory)" >&6; }
8931      fi
8932
8933      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR libs" >&5
8934 $as_echo_n "checking for RANDR libs... " >&6; }
8935      d=$with_randr/lib
8936      if test -d $d; then
8937        X_LIBS="-L$d $X_LIBS"
8938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8939 $as_echo "$d" >&6; }
8940      else
8941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8942 $as_echo "not found ($d: no such directory)" >&6; }
8943      fi
8944
8945      # replace the directory string with "yes".
8946      with_randr_req="yes"
8947      with_randr=$with_randr_req
8948      ;;
8949
8950     *)
8951      echo ""
8952      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
8953      echo "       If it is a directory, then \`DIR/include' will be added to"
8954      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8955      exit 1
8956      ;;
8957    esac
8958
8959
8960 if test "$with_randr" = yes; then
8961
8962   # first check for Xrandr.h
8963
8964   ac_save_CPPFLAGS="$CPPFLAGS"
8965   if test \! -z "$includedir" ; then
8966     CPPFLAGS="$CPPFLAGS -I$includedir"
8967   fi
8968   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8969   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8970   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "#include <X11/Xlib.h>
8971 "
8972 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = xyes; then :
8973   have_randr=yes
8974 fi
8975
8976
8977   CPPFLAGS="$ac_save_CPPFLAGS"
8978
8979   # if that succeeded, then check for the XRR code in the libraries
8980   if test "$have_randr" = yes; then
8981
8982     # RANDR probably needs -lXrender
8983     xrender_libs=
8984
8985   ac_save_CPPFLAGS="$CPPFLAGS"
8986   ac_save_LDFLAGS="$LDFLAGS"
8987 #  ac_save_LIBS="$LIBS"
8988
8989   if test \! -z "$includedir" ; then
8990     CPPFLAGS="$CPPFLAGS -I$includedir"
8991   fi
8992   # note: $X_CFLAGS includes $x_includes
8993   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8994
8995   if test \! -z "$libdir" ; then
8996     LDFLAGS="$LDFLAGS -L$libdir"
8997   fi
8998   # note: $X_LIBS includes $x_libraries
8999   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9000
9001   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9002   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9003   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderSetSubpixelOrder in -lXrender" >&5
9004 $as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
9005 if ${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+:} false; then :
9006   $as_echo_n "(cached) " >&6
9007 else
9008   ac_check_lib_save_LIBS=$LIBS
9009 LIBS="-lXrender -lXext -lX11 $LIBS"
9010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9011 /* end confdefs.h.  */
9012
9013 /* Override any GCC internal prototype to avoid an error.
9014    Use char because int might match the return type of a GCC
9015    builtin and then its argument prototype would still apply.  */
9016 #ifdef __cplusplus
9017 extern "C"
9018 #endif
9019 char XRenderSetSubpixelOrder ();
9020 int
9021 main ()
9022 {
9023 return XRenderSetSubpixelOrder ();
9024   ;
9025   return 0;
9026 }
9027 _ACEOF
9028 if ac_fn_c_try_link "$LINENO"; then :
9029   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
9030 else
9031   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
9032 fi
9033 rm -f core conftest.err conftest.$ac_objext \
9034     conftest$ac_exeext conftest.$ac_ext
9035 LIBS=$ac_check_lib_save_LIBS
9036 fi
9037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
9038 $as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
9039 if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = xyes; then :
9040   xrender_libs="-lXrender"
9041 else
9042   true
9043 fi
9044
9045   CPPFLAGS="$ac_save_CPPFLAGS"
9046   LDFLAGS="$ac_save_LDFLAGS"
9047 #  LIBS="$ac_save_LIBS"
9048
9049
9050     # first look for RANDR in -lXext
9051     have_randr=no
9052
9053   ac_save_CPPFLAGS="$CPPFLAGS"
9054   ac_save_LDFLAGS="$LDFLAGS"
9055 #  ac_save_LIBS="$LIBS"
9056
9057   if test \! -z "$includedir" ; then
9058     CPPFLAGS="$CPPFLAGS -I$includedir"
9059   fi
9060   # note: $X_CFLAGS includes $x_includes
9061   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9062
9063   if test \! -z "$libdir" ; then
9064     LDFLAGS="$LDFLAGS -L$libdir"
9065   fi
9066   # note: $X_LIBS includes $x_libraries
9067   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9068
9069   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9070   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9071   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXext" >&5
9072 $as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
9073 if ${ac_cv_lib_Xext_XRRGetScreenInfo+:} false; then :
9074   $as_echo_n "(cached) " >&6
9075 else
9076   ac_check_lib_save_LIBS=$LIBS
9077 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
9078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9079 /* end confdefs.h.  */
9080
9081 /* Override any GCC internal prototype to avoid an error.
9082    Use char because int might match the return type of a GCC
9083    builtin and then its argument prototype would still apply.  */
9084 #ifdef __cplusplus
9085 extern "C"
9086 #endif
9087 char XRRGetScreenInfo ();
9088 int
9089 main ()
9090 {
9091 return XRRGetScreenInfo ();
9092   ;
9093   return 0;
9094 }
9095 _ACEOF
9096 if ac_fn_c_try_link "$LINENO"; then :
9097   ac_cv_lib_Xext_XRRGetScreenInfo=yes
9098 else
9099   ac_cv_lib_Xext_XRRGetScreenInfo=no
9100 fi
9101 rm -f core conftest.err conftest.$ac_objext \
9102     conftest$ac_exeext conftest.$ac_ext
9103 LIBS=$ac_check_lib_save_LIBS
9104 fi
9105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
9106 $as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
9107 if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = xyes; then :
9108   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
9109 else
9110   true
9111 fi
9112
9113   CPPFLAGS="$ac_save_CPPFLAGS"
9114   LDFLAGS="$ac_save_LDFLAGS"
9115 #  LIBS="$ac_save_LIBS"
9116
9117
9118     # if that failed, look in -lXrandr
9119     if test "$have_randr" = no; then
9120
9121   ac_save_CPPFLAGS="$CPPFLAGS"
9122   ac_save_LDFLAGS="$LDFLAGS"
9123 #  ac_save_LIBS="$LIBS"
9124
9125   if test \! -z "$includedir" ; then
9126     CPPFLAGS="$CPPFLAGS -I$includedir"
9127   fi
9128   # note: $X_CFLAGS includes $x_includes
9129   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9130
9131   if test \! -z "$libdir" ; then
9132     LDFLAGS="$LDFLAGS -L$libdir"
9133   fi
9134   # note: $X_LIBS includes $x_libraries
9135   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9136
9137   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9138   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9139   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
9140 $as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
9141 if ${ac_cv_lib_Xrandr_XRRGetScreenInfo+:} false; then :
9142   $as_echo_n "(cached) " >&6
9143 else
9144   ac_check_lib_save_LIBS=$LIBS
9145 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
9146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9147 /* end confdefs.h.  */
9148
9149 /* Override any GCC internal prototype to avoid an error.
9150    Use char because int might match the return type of a GCC
9151    builtin and then its argument prototype would still apply.  */
9152 #ifdef __cplusplus
9153 extern "C"
9154 #endif
9155 char XRRGetScreenInfo ();
9156 int
9157 main ()
9158 {
9159 return XRRGetScreenInfo ();
9160   ;
9161   return 0;
9162 }
9163 _ACEOF
9164 if ac_fn_c_try_link "$LINENO"; then :
9165   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
9166 else
9167   ac_cv_lib_Xrandr_XRRGetScreenInfo=no
9168 fi
9169 rm -f core conftest.err conftest.$ac_objext \
9170     conftest$ac_exeext conftest.$ac_ext
9171 LIBS=$ac_check_lib_save_LIBS
9172 fi
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
9174 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
9175 if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = xyes; then :
9176   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
9177 else
9178   true
9179 fi
9180
9181   CPPFLAGS="$ac_save_CPPFLAGS"
9182   LDFLAGS="$ac_save_LDFLAGS"
9183 #  LIBS="$ac_save_LIBS"
9184
9185     fi
9186   fi
9187
9188   # if that succeeded, then we've really got it.
9189   if test "$have_randr" = yes; then
9190     $as_echo "#define HAVE_RANDR 1" >>confdefs.h
9191
9192
9193     # Now check for version 1.2 in the same libs.
9194     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
9195     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources" >&5
9196 $as_echo_n "checking for XRRGetScreenResources... " >&6; }
9197 if ${ac_cv_randr_12+:} false; then :
9198   $as_echo_n "(cached) " >&6
9199 else
9200   ac_cv_randr_12=no
9201
9202   ac_save_CPPFLAGS="$CPPFLAGS"
9203   if test \! -z "$includedir" ; then
9204     CPPFLAGS="$CPPFLAGS -I$includedir"
9205   fi
9206   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9207   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9209 /* end confdefs.h.  */
9210 #include <stdlib.h>
9211                          #include <X11/Xlib.h>
9212                          #include <X11/extensions/Xrandr.h>
9213 int
9214 main ()
9215 {
9216 XRRScreenResources *res =
9217                            XRRGetScreenResources (0, 0);
9218   ;
9219   return 0;
9220 }
9221 _ACEOF
9222 if ac_fn_c_try_compile "$LINENO"; then :
9223   ac_cv_randr_12=yes
9224 else
9225   ac_cv_randr_12=no
9226 fi
9227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9228   CPPFLAGS="$ac_save_CPPFLAGS"
9229 fi
9230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_randr_12" >&5
9231 $as_echo "$ac_cv_randr_12" >&6; }
9232     if test "$ac_cv_randr_12" = yes ; then
9233       $as_echo "#define HAVE_RANDR_12 1" >>confdefs.h
9234
9235     fi
9236 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
9237 #                  [true], $SAVER_LIBS)
9238   fi
9239
9240
9241 elif test "$with_randr" != no; then
9242   echo "error: must be yes or no: --with-randr-ext=$with_randr"
9243   exit 1
9244 fi
9245
9246
9247 ###############################################################################
9248 #
9249 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
9250 #       using other XF86 stuff.)
9251 #
9252 ###############################################################################
9253
9254 have_xf86miscsetgrabkeysstate=no
9255 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
9256
9257   ac_save_CPPFLAGS="$CPPFLAGS"
9258   ac_save_LDFLAGS="$LDFLAGS"
9259 #  ac_save_LIBS="$LIBS"
9260
9261   if test \! -z "$includedir" ; then
9262     CPPFLAGS="$CPPFLAGS -I$includedir"
9263   fi
9264   # note: $X_CFLAGS includes $x_includes
9265   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9266
9267   if test \! -z "$libdir" ; then
9268     LDFLAGS="$LDFLAGS -L$libdir"
9269   fi
9270   # note: $X_LIBS includes $x_libraries
9271   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9272
9273   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9274   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9275   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
9276 $as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
9277 if ${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+:} false; then :
9278   $as_echo_n "(cached) " >&6
9279 else
9280   ac_check_lib_save_LIBS=$LIBS
9281 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
9282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9283 /* end confdefs.h.  */
9284
9285 /* Override any GCC internal prototype to avoid an error.
9286    Use char because int might match the return type of a GCC
9287    builtin and then its argument prototype would still apply.  */
9288 #ifdef __cplusplus
9289 extern "C"
9290 #endif
9291 char XF86MiscSetGrabKeysState ();
9292 int
9293 main ()
9294 {
9295 return XF86MiscSetGrabKeysState ();
9296   ;
9297   return 0;
9298 }
9299 _ACEOF
9300 if ac_fn_c_try_link "$LINENO"; then :
9301   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
9302 else
9303   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
9304 fi
9305 rm -f core conftest.err conftest.$ac_objext \
9306     conftest$ac_exeext conftest.$ac_ext
9307 LIBS=$ac_check_lib_save_LIBS
9308 fi
9309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
9310 $as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
9311 if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = xyes; then :
9312   have_xf86miscsetgrabkeysstate=yes
9313 else
9314   true
9315 fi
9316
9317   CPPFLAGS="$ac_save_CPPFLAGS"
9318   LDFLAGS="$ac_save_LDFLAGS"
9319 #  LIBS="$ac_save_LIBS"
9320
9321   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
9322     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
9323     $as_echo "#define HAVE_XF86MISCSETGRABKEYSSTATE 1" >>confdefs.h
9324
9325   fi
9326 fi
9327
9328
9329 ###############################################################################
9330 #
9331 #       Check for HP XHPDisableReset and XHPEnableReset.
9332 #
9333 ###############################################################################
9334
9335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XHPDisableReset in X11/XHPlib.h" >&5
9336 $as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
9337
9338   ac_save_CPPFLAGS="$CPPFLAGS"
9339   if test \! -z "$includedir" ; then
9340     CPPFLAGS="$CPPFLAGS -I$includedir"
9341   fi
9342   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9343   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9345 /* end confdefs.h.  */
9346 #include <X11/XHPlib.h>
9347
9348 _ACEOF
9349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9350   $EGREP "XHPDisableReset" >/dev/null 2>&1; then :
9351   $as_echo "#define HAVE_XHPDISABLERESET 1" >>confdefs.h
9352
9353                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
9354                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9355 $as_echo "yes" >&6; }
9356 else
9357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9358 $as_echo "no" >&6; }
9359 fi
9360 rm -rf conftest*
9361
9362   CPPFLAGS="$ac_save_CPPFLAGS"
9363
9364
9365 ###############################################################################
9366 #
9367 #       Check for /proc/interrupts.
9368 #
9369 ###############################################################################
9370
9371 have_proc_interrupts=no
9372 with_proc_interrupts_req=unspecified
9373
9374 # Check whether --with-proc-interrupts was given.
9375 if test "${with_proc_interrupts+set}" = set; then :
9376   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
9377 else
9378   with_proc_interrupts=yes
9379 fi
9380
9381
9382 if test "$with_proc_interrupts" = yes; then
9383
9384   # Note that we may be building in an environment (e.g. Debian buildd chroot)
9385   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
9386   # check that it has the bits we need, but otherwise we'll just go on faith.
9387   #
9388   have_proc_interrupts=yes
9389
9390   if test -f /proc/interrupts; then
9391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /proc/interrupts contains keyboard data" >&5
9392 $as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
9393 if ${ac_cv_have_proc_interrupts+:} false; then :
9394   $as_echo_n "(cached) " >&6
9395 else
9396   ac_cv_have_proc_interrupts=no
9397      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
9398        ac_cv_have_proc_interrupts=yes
9399      fi
9400
9401 fi
9402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_proc_interrupts" >&5
9403 $as_echo "$ac_cv_have_proc_interrupts" >&6; }
9404    have_proc_interrupts=$ac_cv_have_proc_interrupts
9405   fi
9406
9407   if test "$have_proc_interrupts" = yes; then
9408     $as_echo "#define HAVE_PROC_INTERRUPTS 1" >>confdefs.h
9409
9410   fi
9411
9412 elif test "$with_proc_interrupts" != no; then
9413   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
9414   exit 1
9415 fi
9416
9417
9418 ###############################################################################
9419 #
9420 #       The --enable-locking option
9421 #
9422 ###############################################################################
9423
9424 # Check whether --enable-locking was given.
9425 if test "${enable_locking+set}" = set; then :
9426   enableval=$enable_locking; enable_locking="$enableval"
9427 else
9428   if test "$ac_macosx" = yes; then
9429     # We can't lock on MacOS X, so default to not compiling in support for it.
9430     # But allow --enable-locking to override that, so I can debug Linux locking
9431     # under MacOS X11.
9432     enable_locking=no
9433    else
9434     enable_locking=yes
9435    fi
9436 fi
9437
9438 if test "$enable_locking" = yes; then
9439   true
9440 elif test "$enable_locking" = no; then
9441   $as_echo "#define NO_LOCKING 1" >>confdefs.h
9442
9443 else
9444   echo "error: must be yes or no: --enable-locking=$enable_locking"
9445   exit 1
9446 fi
9447
9448
9449 ###############################################################################
9450 #
9451 #       Whether to allow root password to unblank.
9452 #
9453 ###############################################################################
9454 # Check whether --enable-root-passwd was given.
9455 if test "${enable_root_passwd+set}" = set; then :
9456   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
9457 else
9458   enable_root_passwd=yes
9459 fi
9460
9461 if test "$enable_root_passwd" = yes; then
9462   $as_echo "#define ALLOW_ROOT_PASSWD 1" >>confdefs.h
9463
9464   true
9465 elif test "$enable_root_passwd" != no; then
9466   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
9467   exit 1
9468 fi
9469
9470 ###############################################################################
9471 #
9472 #       Check for PAM.
9473 #
9474 ###############################################################################
9475
9476 case "$host" in
9477   *-solaris*)
9478    # Solaris systems tend to come with PAM misconfigured.
9479    #  Don't build it by default, even if the headers exist.
9480    with_pam_default=no
9481    ;;
9482   *)
9483    # Default to building PAM support on all other systems, if it exists.
9484    with_pam_default=yes
9485   ;;
9486 esac
9487
9488 have_pam=no
9489 with_pam_req=unspecified
9490
9491
9492 # Check whether --with-pam was given.
9493 if test "${with_pam+set}" = set; then :
9494   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
9495 else
9496   with_pam=$with_pam_default
9497 fi
9498
9499
9500
9501 # Check whether --with-pam_service_name was given.
9502 if test "${with_pam_service_name+set}" = set; then :
9503   withval=$with_pam_service_name; pam_service_name="$withval"
9504 else
9505   pam_service_name="xscreensaver"
9506 fi
9507
9508
9509 # Check whether --enable-pam-check-account-type was given.
9510 if test "${enable_pam_check_account_type+set}" = set; then :
9511   enableval=$enable_pam_check_account_type; enable_pam_check_account_type="$enableval"
9512 else
9513   enable_pam_check_account_type=no
9514 fi
9515
9516 if test "$enable_pam_check_account_type" = yes ; then
9517   $as_echo "#define PAM_CHECK_ACCOUNT_TYPE 1" >>confdefs.h
9518
9519   true
9520 elif test "$enable_pam_check_account_type" != no ; then
9521   echo "error: must be yes or no: --enable-pam-check-account-type=$enable_pam_check_account_type"
9522   exit 1
9523 fi
9524
9525
9526    case "$with_pam" in
9527     yes) ;;
9528     no)  ;;
9529
9530     /*)
9531      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM headers" >&5
9532 $as_echo_n "checking for PAM headers... " >&6; }
9533      d=$with_pam/include
9534      if test -d $d; then
9535        X_CFLAGS="-I$d $X_CFLAGS"
9536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9537 $as_echo "$d" >&6; }
9538      else
9539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9540 $as_echo "not found ($d: no such directory)" >&6; }
9541      fi
9542
9543      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM libs" >&5
9544 $as_echo_n "checking for PAM libs... " >&6; }
9545      d=$with_pam/lib
9546      if test -d $d; then
9547        X_LIBS="-L$d $X_LIBS"
9548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9549 $as_echo "$d" >&6; }
9550      else
9551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9552 $as_echo "not found ($d: no such directory)" >&6; }
9553      fi
9554
9555      # replace the directory string with "yes".
9556      with_pam_req="yes"
9557      with_pam=$with_pam_req
9558      ;;
9559
9560     *)
9561      echo ""
9562      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
9563      echo "       If it is a directory, then \`DIR/include' will be added to"
9564      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9565      exit 1
9566      ;;
9567    esac
9568
9569
9570 if test "$enable_locking" = yes -a "$with_pam" = yes; then
9571   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM" >&5
9572 $as_echo_n "checking for PAM... " >&6; }
9573 if ${ac_cv_pam+:} false; then :
9574   $as_echo_n "(cached) " >&6
9575 else
9576
9577   ac_save_CPPFLAGS="$CPPFLAGS"
9578   if test \! -z "$includedir" ; then
9579     CPPFLAGS="$CPPFLAGS -I$includedir"
9580   fi
9581   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9582   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9583   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9584 /* end confdefs.h.  */
9585 #include <security/pam_appl.h>
9586 int
9587 main ()
9588 {
9589
9590   ;
9591   return 0;
9592 }
9593 _ACEOF
9594 if ac_fn_c_try_compile "$LINENO"; then :
9595   ac_cv_pam=yes
9596 else
9597   ac_cv_pam=no
9598 fi
9599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9600   CPPFLAGS="$ac_save_CPPFLAGS"
9601 fi
9602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pam" >&5
9603 $as_echo "$ac_cv_pam" >&6; }
9604   if test "$ac_cv_pam" = yes ; then
9605     have_pam=yes
9606     $as_echo "#define HAVE_PAM 1" >>confdefs.h
9607
9608     cat >>confdefs.h <<_ACEOF
9609 #define PAM_SERVICE_NAME "$pam_service_name"
9610 _ACEOF
9611
9612
9613     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
9614
9615     # libpam typically requires dlopen and dlsym.  On FreeBSD,
9616     # those are in libc.  On Linux and Solaris, they're in libdl.
9617     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9618 $as_echo_n "checking for dlopen in -ldl... " >&6; }
9619 if ${ac_cv_lib_dl_dlopen+:} false; then :
9620   $as_echo_n "(cached) " >&6
9621 else
9622   ac_check_lib_save_LIBS=$LIBS
9623 LIBS="-ldl  $LIBS"
9624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9625 /* end confdefs.h.  */
9626
9627 /* Override any GCC internal prototype to avoid an error.
9628    Use char because int might match the return type of a GCC
9629    builtin and then its argument prototype would still apply.  */
9630 #ifdef __cplusplus
9631 extern "C"
9632 #endif
9633 char dlopen ();
9634 int
9635 main ()
9636 {
9637 return dlopen ();
9638   ;
9639   return 0;
9640 }
9641 _ACEOF
9642 if ac_fn_c_try_link "$LINENO"; then :
9643   ac_cv_lib_dl_dlopen=yes
9644 else
9645   ac_cv_lib_dl_dlopen=no
9646 fi
9647 rm -f core conftest.err conftest.$ac_objext \
9648     conftest$ac_exeext conftest.$ac_ext
9649 LIBS=$ac_check_lib_save_LIBS
9650 fi
9651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9652 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
9653 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
9654   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
9655 fi
9656
9657
9658     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
9659     have_timedwait=no
9660     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lc" >&5
9661 $as_echo_n "checking for sigtimedwait in -lc... " >&6; }
9662 if ${ac_cv_lib_c_sigtimedwait+:} false; then :
9663   $as_echo_n "(cached) " >&6
9664 else
9665   ac_check_lib_save_LIBS=$LIBS
9666 LIBS="-lc  $LIBS"
9667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9668 /* end confdefs.h.  */
9669
9670 /* Override any GCC internal prototype to avoid an error.
9671    Use char because int might match the return type of a GCC
9672    builtin and then its argument prototype would still apply.  */
9673 #ifdef __cplusplus
9674 extern "C"
9675 #endif
9676 char sigtimedwait ();
9677 int
9678 main ()
9679 {
9680 return sigtimedwait ();
9681   ;
9682   return 0;
9683 }
9684 _ACEOF
9685 if ac_fn_c_try_link "$LINENO"; then :
9686   ac_cv_lib_c_sigtimedwait=yes
9687 else
9688   ac_cv_lib_c_sigtimedwait=no
9689 fi
9690 rm -f core conftest.err conftest.$ac_objext \
9691     conftest$ac_exeext conftest.$ac_ext
9692 LIBS=$ac_check_lib_save_LIBS
9693 fi
9694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigtimedwait" >&5
9695 $as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
9696 if test "x$ac_cv_lib_c_sigtimedwait" = xyes; then :
9697   have_timedwait=yes
9698                   $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
9699
9700 fi
9701
9702     if test "$have_timedwait" = no ; then
9703       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lrt" >&5
9704 $as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
9705 if ${ac_cv_lib_rt_sigtimedwait+:} false; then :
9706   $as_echo_n "(cached) " >&6
9707 else
9708   ac_check_lib_save_LIBS=$LIBS
9709 LIBS="-lrt  $LIBS"
9710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9711 /* end confdefs.h.  */
9712
9713 /* Override any GCC internal prototype to avoid an error.
9714    Use char because int might match the return type of a GCC
9715    builtin and then its argument prototype would still apply.  */
9716 #ifdef __cplusplus
9717 extern "C"
9718 #endif
9719 char sigtimedwait ();
9720 int
9721 main ()
9722 {
9723 return sigtimedwait ();
9724   ;
9725   return 0;
9726 }
9727 _ACEOF
9728 if ac_fn_c_try_link "$LINENO"; then :
9729   ac_cv_lib_rt_sigtimedwait=yes
9730 else
9731   ac_cv_lib_rt_sigtimedwait=no
9732 fi
9733 rm -f core conftest.err conftest.$ac_objext \
9734     conftest$ac_exeext conftest.$ac_ext
9735 LIBS=$ac_check_lib_save_LIBS
9736 fi
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sigtimedwait" >&5
9738 $as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
9739 if test "x$ac_cv_lib_rt_sigtimedwait" = xyes; then :
9740   have_timedwait=yes
9741                                       $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
9742
9743                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
9744 fi
9745
9746     fi
9747
9748     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call pam_strerror" >&5
9749 $as_echo_n "checking how to call pam_strerror... " >&6; }
9750     if ${ac_cv_pam_strerror_args+:} false; then :
9751   $as_echo_n "(cached) " >&6
9752 else
9753
9754   ac_save_CPPFLAGS="$CPPFLAGS"
9755   if test \! -z "$includedir" ; then
9756     CPPFLAGS="$CPPFLAGS -I$includedir"
9757   fi
9758   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9759   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9761 /* end confdefs.h.  */
9762 #include <stdio.h>
9763                         #include <stdlib.h>
9764                         #include <security/pam_appl.h>
9765 int
9766 main ()
9767 {
9768 pam_handle_t *pamh = 0;
9769                         char *s = pam_strerror(pamh, PAM_SUCCESS);
9770   ;
9771   return 0;
9772 }
9773 _ACEOF
9774 if ac_fn_c_try_compile "$LINENO"; then :
9775   ac_pam_strerror_args=2
9776 else
9777
9778   ac_save_CPPFLAGS="$CPPFLAGS"
9779   if test \! -z "$includedir" ; then
9780     CPPFLAGS="$CPPFLAGS -I$includedir"
9781   fi
9782   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9783   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9785 /* end confdefs.h.  */
9786 #include <stdio.h>
9787                                           #include <stdlib.h>
9788                                           #include <security/pam_appl.h>
9789 int
9790 main ()
9791 {
9792 char *s =
9793                                            pam_strerror(PAM_SUCCESS);
9794   ;
9795   return 0;
9796 }
9797 _ACEOF
9798 if ac_fn_c_try_compile "$LINENO"; then :
9799   ac_pam_strerror_args=1
9800 else
9801   ac_pam_strerror_args=0
9802 fi
9803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9804   CPPFLAGS="$ac_save_CPPFLAGS"
9805 fi
9806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9807   CPPFLAGS="$ac_save_CPPFLAGS"
9808       ac_cv_pam_strerror_args=$ac_pam_strerror_args
9809 fi
9810
9811     ac_pam_strerror_args=$ac_cv_pam_strerror_args
9812     if test "$ac_pam_strerror_args" = 1 ; then
9813       { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
9814 $as_echo "one argument" >&6; }
9815     elif test "$ac_pam_strerror_args" = 2 ; then
9816       $as_echo "#define PAM_STRERROR_TWO_ARGS 1" >>confdefs.h
9817
9818       { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
9819 $as_echo "two arguments" >&6; }
9820     else
9821       { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
9822 $as_echo "unknown" >&6; }
9823     fi
9824
9825 # Check pam_fail_delay
9826     { $as_echo "$as_me:${as_lineno-$LINENO}: checking pam_fail_delay in -lpam" >&5
9827 $as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
9828     if ${ac_cv_pam_fail_delay+:} false; then :
9829   $as_echo_n "(cached) " >&6
9830 else
9831   ac_save_LDFLAGS="$LDFLAGS"
9832       LDFLAGS="-lpam"
9833       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9834 /* end confdefs.h.  */
9835 #include <security/pam_appl.h>
9836 int
9837 main ()
9838 {
9839 pam_handle_t *pamh = 0;
9840                    unsigned int usec = 1;
9841                    int status = pam_fail_delay (pamh, usec);
9842   ;
9843   return 0;
9844 }
9845 _ACEOF
9846 if ac_fn_c_try_link "$LINENO"; then :
9847   ac_pam_fail_delay=yes
9848 else
9849   ac_pam_fail_delay=no
9850 fi
9851 rm -f core conftest.err conftest.$ac_objext \
9852     conftest$ac_exeext conftest.$ac_ext
9853       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
9854       LDFLAGS=$ac_save_LDFLAGS
9855 fi
9856
9857
9858       if test "$ac_pam_fail_delay" = yes ; then
9859         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9860 $as_echo "yes" >&6; }
9861         $as_echo "#define HAVE_PAM_FAIL_DELAY 1" >>confdefs.h
9862
9863       else
9864         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865 $as_echo "no" >&6; }
9866       fi
9867
9868   fi
9869 fi
9870
9871
9872 ###############################################################################
9873 #
9874 #       Check for Kerberos.
9875 #
9876 ###############################################################################
9877
9878 have_kerberos=no
9879 have_kerberos5=no
9880 with_kerberos_req=unspecified
9881
9882
9883 # Check whether --with-kerberos was given.
9884 if test "${with_kerberos+set}" = set; then :
9885   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
9886 else
9887   with_kerberos=yes
9888 fi
9889
9890
9891
9892    case "$with_kerberos" in
9893     yes) ;;
9894     no)  ;;
9895
9896     /*)
9897      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos headers" >&5
9898 $as_echo_n "checking for Kerberos headers... " >&6; }
9899      d=$with_kerberos/include
9900      if test -d $d; then
9901        X_CFLAGS="-I$d $X_CFLAGS"
9902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9903 $as_echo "$d" >&6; }
9904      else
9905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9906 $as_echo "not found ($d: no such directory)" >&6; }
9907      fi
9908
9909      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos libs" >&5
9910 $as_echo_n "checking for Kerberos libs... " >&6; }
9911      d=$with_kerberos/lib
9912      if test -d $d; then
9913        X_LIBS="-L$d $X_LIBS"
9914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9915 $as_echo "$d" >&6; }
9916      else
9917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9918 $as_echo "not found ($d: no such directory)" >&6; }
9919      fi
9920
9921      # replace the directory string with "yes".
9922      with_kerberos_req="yes"
9923      with_kerberos=$with_kerberos_req
9924      ;;
9925
9926     *)
9927      echo ""
9928      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
9929      echo "       If it is a directory, then \`DIR/include' will be added to"
9930      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9931      exit 1
9932      ;;
9933    esac
9934
9935
9936 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
9937   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 4" >&5
9938 $as_echo_n "checking for Kerberos 4... " >&6; }
9939 if ${ac_cv_kerberos+:} false; then :
9940   $as_echo_n "(cached) " >&6
9941 else
9942
9943   ac_save_CPPFLAGS="$CPPFLAGS"
9944   if test \! -z "$includedir" ; then
9945     CPPFLAGS="$CPPFLAGS -I$includedir"
9946   fi
9947   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9948   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9950 /* end confdefs.h.  */
9951 #include <krb.h>
9952 int
9953 main ()
9954 {
9955
9956   ;
9957   return 0;
9958 }
9959 _ACEOF
9960 if ac_fn_c_try_compile "$LINENO"; then :
9961   ac_cv_kerberos=yes
9962 else
9963   ac_cv_kerberos=no
9964 fi
9965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9966   CPPFLAGS="$ac_save_CPPFLAGS"
9967 fi
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos" >&5
9969 $as_echo "$ac_cv_kerberos" >&6; }
9970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 5" >&5
9971 $as_echo_n "checking for Kerberos 5... " >&6; }
9972 if ${ac_cv_kerberos5+:} false; then :
9973   $as_echo_n "(cached) " >&6
9974 else
9975
9976   ac_save_CPPFLAGS="$CPPFLAGS"
9977   if test \! -z "$includedir" ; then
9978     CPPFLAGS="$CPPFLAGS -I$includedir"
9979   fi
9980   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9981   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9982   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9983 /* end confdefs.h.  */
9984 #include <kerberosIV/krb.h>
9985 int
9986 main ()
9987 {
9988
9989   ;
9990   return 0;
9991 }
9992 _ACEOF
9993 if ac_fn_c_try_compile "$LINENO"; then :
9994   ac_cv_kerberos5=yes
9995 else
9996   ac_cv_kerberos5=no
9997 fi
9998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9999   CPPFLAGS="$ac_save_CPPFLAGS"
10000 fi
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos5" >&5
10002 $as_echo "$ac_cv_kerberos5" >&6; }
10003
10004   if test "$ac_cv_kerberos" = yes ; then
10005     have_kerberos=yes
10006     $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10007
10008   fi
10009
10010   if test "$ac_cv_kerberos5" = yes ; then
10011
10012     # Andrew Snare <ajs@pigpond.com> wrote:
10013     #
10014     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
10015     # (krb4) was also available.  This turns out not to be the case with
10016     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
10017     # is optional.
10018     #
10019     # So, disable kerberosV support if libkrb4 can't be found.
10020     # This is not the best solution, but it makes the compile not fail.
10021     #
10022
10023   ac_save_CPPFLAGS="$CPPFLAGS"
10024   ac_save_LDFLAGS="$LDFLAGS"
10025 #  ac_save_LIBS="$LIBS"
10026
10027   if test \! -z "$includedir" ; then
10028     CPPFLAGS="$CPPFLAGS -I$includedir"
10029   fi
10030   # note: $X_CFLAGS includes $x_includes
10031   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10032
10033   if test \! -z "$libdir" ; then
10034     LDFLAGS="$LDFLAGS -L$libdir"
10035   fi
10036   # note: $X_LIBS includes $x_libraries
10037   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10038
10039   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10040   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_tf_realm in -lkrb4" >&5
10042 $as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
10043 if ${ac_cv_lib_krb4_krb_get_tf_realm+:} false; then :
10044   $as_echo_n "(cached) " >&6
10045 else
10046   ac_check_lib_save_LIBS=$LIBS
10047 LIBS="-lkrb4  $LIBS"
10048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10049 /* end confdefs.h.  */
10050
10051 /* Override any GCC internal prototype to avoid an error.
10052    Use char because int might match the return type of a GCC
10053    builtin and then its argument prototype would still apply.  */
10054 #ifdef __cplusplus
10055 extern "C"
10056 #endif
10057 char krb_get_tf_realm ();
10058 int
10059 main ()
10060 {
10061 return krb_get_tf_realm ();
10062   ;
10063   return 0;
10064 }
10065 _ACEOF
10066 if ac_fn_c_try_link "$LINENO"; then :
10067   ac_cv_lib_krb4_krb_get_tf_realm=yes
10068 else
10069   ac_cv_lib_krb4_krb_get_tf_realm=no
10070 fi
10071 rm -f core conftest.err conftest.$ac_objext \
10072     conftest$ac_exeext conftest.$ac_ext
10073 LIBS=$ac_check_lib_save_LIBS
10074 fi
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
10076 $as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
10077 if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = xyes; then :
10078   have_kerberos=yes
10079 else
10080   have_kerberos=no
10081 fi
10082
10083   CPPFLAGS="$ac_save_CPPFLAGS"
10084   LDFLAGS="$ac_save_LDFLAGS"
10085 #  LIBS="$ac_save_LIBS"
10086
10087     if test "$have_kerberos" = yes ; then
10088       have_kerberos5=yes
10089       $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10090
10091       $as_echo "#define HAVE_KERBEROS5 1" >>confdefs.h
10092
10093     else
10094       have_kerberos5=no
10095       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
10096 $as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
10097     fi
10098
10099   fi
10100
10101   if test "$have_kerberos5" = yes ; then
10102     # from Matt Knopp <mhat@infocalypse.netlag.com>
10103     # (who got it from amu@mit.edu)
10104
10105     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
10106
10107     # jwz: MacOS X uses -lkrb5, but not -lcrypt
10108
10109   ac_save_CPPFLAGS="$CPPFLAGS"
10110   ac_save_LDFLAGS="$LDFLAGS"
10111 #  ac_save_LIBS="$LIBS"
10112
10113   if test \! -z "$includedir" ; then
10114     CPPFLAGS="$CPPFLAGS -I$includedir"
10115   fi
10116   # note: $X_CFLAGS includes $x_includes
10117   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10118
10119   if test \! -z "$libdir" ; then
10120     LDFLAGS="$LDFLAGS -L$libdir"
10121   fi
10122   # note: $X_LIBS includes $x_libraries
10123   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10124
10125   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10126   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10127   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
10128 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
10129 if ${ac_cv_lib_crypt_crypt+:} false; then :
10130   $as_echo_n "(cached) " >&6
10131 else
10132   ac_check_lib_save_LIBS=$LIBS
10133 LIBS="-lcrypt  $LIBS"
10134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10135 /* end confdefs.h.  */
10136
10137 /* Override any GCC internal prototype to avoid an error.
10138    Use char because int might match the return type of a GCC
10139    builtin and then its argument prototype would still apply.  */
10140 #ifdef __cplusplus
10141 extern "C"
10142 #endif
10143 char crypt ();
10144 int
10145 main ()
10146 {
10147 return crypt ();
10148   ;
10149   return 0;
10150 }
10151 _ACEOF
10152 if ac_fn_c_try_link "$LINENO"; then :
10153   ac_cv_lib_crypt_crypt=yes
10154 else
10155   ac_cv_lib_crypt_crypt=no
10156 fi
10157 rm -f core conftest.err conftest.$ac_objext \
10158     conftest$ac_exeext conftest.$ac_ext
10159 LIBS=$ac_check_lib_save_LIBS
10160 fi
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
10162 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
10163 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
10164   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
10165 fi
10166
10167   CPPFLAGS="$ac_save_CPPFLAGS"
10168   LDFLAGS="$ac_save_LDFLAGS"
10169 #  LIBS="$ac_save_LIBS"
10170
10171
10172   elif test "$have_kerberos" = yes ; then
10173     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
10174     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
10175   fi
10176
10177   if test "$have_kerberos" = yes ; then
10178     ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
10179 if test "x$ac_cv_func_res_search" = xyes; then :
10180
10181 else
10182   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
10183 $as_echo_n "checking for res_search in -lresolv... " >&6; }
10184 if ${ac_cv_lib_resolv_res_search+:} false; then :
10185   $as_echo_n "(cached) " >&6
10186 else
10187   ac_check_lib_save_LIBS=$LIBS
10188 LIBS="-lresolv  $LIBS"
10189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10190 /* end confdefs.h.  */
10191
10192 /* Override any GCC internal prototype to avoid an error.
10193    Use char because int might match the return type of a GCC
10194    builtin and then its argument prototype would still apply.  */
10195 #ifdef __cplusplus
10196 extern "C"
10197 #endif
10198 char res_search ();
10199 int
10200 main ()
10201 {
10202 return res_search ();
10203   ;
10204   return 0;
10205 }
10206 _ACEOF
10207 if ac_fn_c_try_link "$LINENO"; then :
10208   ac_cv_lib_resolv_res_search=yes
10209 else
10210   ac_cv_lib_resolv_res_search=no
10211 fi
10212 rm -f core conftest.err conftest.$ac_objext \
10213     conftest$ac_exeext conftest.$ac_ext
10214 LIBS=$ac_check_lib_save_LIBS
10215 fi
10216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
10217 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
10218 if test "x$ac_cv_lib_resolv_res_search" = xyes; then :
10219   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
10220 else
10221   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
10222 $as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
10223
10224 fi
10225
10226 fi
10227
10228   fi
10229 fi
10230
10231
10232 ###############################################################################
10233 #
10234 #       Check for the nine billion variants of shadow passwords...
10235 #
10236 ###############################################################################
10237
10238 need_setuid=no
10239
10240 have_shadow=no
10241 with_shadow_req=unspecified
10242
10243
10244 # Check whether --with-shadow was given.
10245 if test "${with_shadow+set}" = set; then :
10246   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
10247 else
10248   with_shadow=yes
10249 fi
10250
10251
10252
10253    case "$with_shadow" in
10254     yes) ;;
10255     no)  ;;
10256
10257     /*)
10258      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password headers" >&5
10259 $as_echo_n "checking for shadow password headers... " >&6; }
10260      d=$with_shadow/include
10261      if test -d $d; then
10262        X_CFLAGS="-I$d $X_CFLAGS"
10263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10264 $as_echo "$d" >&6; }
10265      else
10266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10267 $as_echo "not found ($d: no such directory)" >&6; }
10268      fi
10269
10270      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password libs" >&5
10271 $as_echo_n "checking for shadow password libs... " >&6; }
10272      d=$with_shadow/lib
10273      if test -d $d; then
10274        X_LIBS="-L$d $X_LIBS"
10275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10276 $as_echo "$d" >&6; }
10277      else
10278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10279 $as_echo "not found ($d: no such directory)" >&6; }
10280      fi
10281
10282      # replace the directory string with "yes".
10283      with_shadow_req="yes"
10284      with_shadow=$with_shadow_req
10285      ;;
10286
10287     *)
10288      echo ""
10289      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
10290      echo "       If it is a directory, then \`DIR/include' will be added to"
10291      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10292      exit 1
10293      ;;
10294    esac
10295
10296
10297 if test "$enable_locking" = no ; then
10298   with_shadow_req=no
10299   with_shadow=no
10300 fi
10301
10302
10303 ###############################################################################
10304 #
10305 #       Check for Sun "adjunct" passwords.
10306 #
10307 ###############################################################################
10308
10309 if test "$with_shadow" = yes ; then
10310   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sun-style shadow passwords" >&5
10311 $as_echo_n "checking for Sun-style shadow passwords... " >&6; }
10312 if ${ac_cv_sun_adjunct+:} false; then :
10313   $as_echo_n "(cached) " >&6
10314 else
10315
10316   ac_save_CPPFLAGS="$CPPFLAGS"
10317   if test \! -z "$includedir" ; then
10318     CPPFLAGS="$CPPFLAGS -I$includedir"
10319   fi
10320   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10321   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10323 /* end confdefs.h.  */
10324 #include <stdlib.h>
10325                                     #include <unistd.h>
10326                                     #include <sys/types.h>
10327                                     #include <sys/label.h>
10328                                     #include <sys/audit.h>
10329                                     #include <pwdadj.h>
10330 int
10331 main ()
10332 {
10333 struct passwd_adjunct *p = getpwanam("nobody");
10334                        const char *pw = p->pwa_passwd;
10335   ;
10336   return 0;
10337 }
10338 _ACEOF
10339 if ac_fn_c_try_compile "$LINENO"; then :
10340   ac_cv_sun_adjunct=yes
10341 else
10342   ac_cv_sun_adjunct=no
10343 fi
10344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10345   CPPFLAGS="$ac_save_CPPFLAGS"
10346 fi
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sun_adjunct" >&5
10348 $as_echo "$ac_cv_sun_adjunct" >&6; }
10349   if test "$ac_cv_sun_adjunct" = yes; then
10350     have_shadow_adjunct=yes
10351     have_shadow=yes
10352     need_setuid=yes
10353   fi
10354 fi
10355
10356
10357 ###############################################################################
10358 #
10359 #       Check for DEC and SCO so-called "enhanced" security.
10360 #
10361 ###############################################################################
10362
10363 if test "$with_shadow" = yes ; then
10364   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DEC-style shadow passwords" >&5
10365 $as_echo_n "checking for DEC-style shadow passwords... " >&6; }
10366 if ${ac_cv_enhanced_passwd+:} false; then :
10367   $as_echo_n "(cached) " >&6
10368 else
10369
10370   ac_save_CPPFLAGS="$CPPFLAGS"
10371   if test \! -z "$includedir" ; then
10372     CPPFLAGS="$CPPFLAGS -I$includedir"
10373   fi
10374   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10375   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10376   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10377 /* end confdefs.h.  */
10378 #include <stdlib.h>
10379                                     #include <unistd.h>
10380                                     #include <sys/types.h>
10381                                     #include <pwd.h>
10382                                     #include <sys/security.h>
10383                                     #include <prot.h>
10384 int
10385 main ()
10386 {
10387 struct pr_passwd *p;
10388                        const char *pw;
10389                        set_auth_parameters(0, 0);
10390                        check_auth_parameters();
10391                        p = getprpwnam("nobody");
10392                        pw = p->ufld.fd_encrypt;
10393   ;
10394   return 0;
10395 }
10396 _ACEOF
10397 if ac_fn_c_try_compile "$LINENO"; then :
10398   ac_cv_enhanced_passwd=yes
10399 else
10400   ac_cv_enhanced_passwd=no
10401 fi
10402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10403   CPPFLAGS="$ac_save_CPPFLAGS"
10404 fi
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enhanced_passwd" >&5
10406 $as_echo "$ac_cv_enhanced_passwd" >&6; }
10407   if test $ac_cv_enhanced_passwd = yes; then
10408     have_shadow_enhanced=yes
10409     have_shadow=yes
10410     need_setuid=yes
10411
10412     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
10413     # (I'm told it needs -lcurses too, but I don't understand why.)
10414     # But on DEC, it's in -lsecurity.
10415     #
10416     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lprot" >&5
10417 $as_echo_n "checking for getprpwnam in -lprot... " >&6; }
10418 if ${ac_cv_lib_prot_getprpwnam+:} false; then :
10419   $as_echo_n "(cached) " >&6
10420 else
10421   ac_check_lib_save_LIBS=$LIBS
10422 LIBS="-lprot -lx $LIBS"
10423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10424 /* end confdefs.h.  */
10425
10426 /* Override any GCC internal prototype to avoid an error.
10427    Use char because int might match the return type of a GCC
10428    builtin and then its argument prototype would still apply.  */
10429 #ifdef __cplusplus
10430 extern "C"
10431 #endif
10432 char getprpwnam ();
10433 int
10434 main ()
10435 {
10436 return getprpwnam ();
10437   ;
10438   return 0;
10439 }
10440 _ACEOF
10441 if ac_fn_c_try_link "$LINENO"; then :
10442   ac_cv_lib_prot_getprpwnam=yes
10443 else
10444   ac_cv_lib_prot_getprpwnam=no
10445 fi
10446 rm -f core conftest.err conftest.$ac_objext \
10447     conftest$ac_exeext conftest.$ac_ext
10448 LIBS=$ac_check_lib_save_LIBS
10449 fi
10450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getprpwnam" >&5
10451 $as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
10452 if test "x$ac_cv_lib_prot_getprpwnam" = xyes; then :
10453   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
10454 else
10455   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lsecurity" >&5
10456 $as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
10457 if ${ac_cv_lib_security_getprpwnam+:} false; then :
10458   $as_echo_n "(cached) " >&6
10459 else
10460   ac_check_lib_save_LIBS=$LIBS
10461 LIBS="-lsecurity  $LIBS"
10462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10463 /* end confdefs.h.  */
10464
10465 /* Override any GCC internal prototype to avoid an error.
10466    Use char because int might match the return type of a GCC
10467    builtin and then its argument prototype would still apply.  */
10468 #ifdef __cplusplus
10469 extern "C"
10470 #endif
10471 char getprpwnam ();
10472 int
10473 main ()
10474 {
10475 return getprpwnam ();
10476   ;
10477   return 0;
10478 }
10479 _ACEOF
10480 if ac_fn_c_try_link "$LINENO"; then :
10481   ac_cv_lib_security_getprpwnam=yes
10482 else
10483   ac_cv_lib_security_getprpwnam=no
10484 fi
10485 rm -f core conftest.err conftest.$ac_objext \
10486     conftest$ac_exeext conftest.$ac_ext
10487 LIBS=$ac_check_lib_save_LIBS
10488 fi
10489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_getprpwnam" >&5
10490 $as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
10491 if test "x$ac_cv_lib_security_getprpwnam" = xyes; then :
10492   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
10493 fi
10494
10495 fi
10496
10497   fi
10498 fi
10499
10500 ###############################################################################
10501 #
10502 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
10503 #
10504 ###############################################################################
10505
10506 if test "$with_shadow" = yes ; then
10507   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HP-style shadow passwords" >&5
10508 $as_echo_n "checking for HP-style shadow passwords... " >&6; }
10509 if ${ac_cv_hpux_passwd+:} false; then :
10510   $as_echo_n "(cached) " >&6
10511 else
10512
10513   ac_save_CPPFLAGS="$CPPFLAGS"
10514   if test \! -z "$includedir" ; then
10515     CPPFLAGS="$CPPFLAGS -I$includedir"
10516   fi
10517   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10518   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10519   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10520 /* end confdefs.h.  */
10521 #include <stdlib.h>
10522                                     #include <unistd.h>
10523                                     #include <sys/types.h>
10524                                     #include <pwd.h>
10525                                     #include <hpsecurity.h>
10526                                     #include <prot.h>
10527 int
10528 main ()
10529 {
10530 struct s_passwd *p = getspwnam("nobody");
10531                        const char *pw = p->pw_passwd;
10532   ;
10533   return 0;
10534 }
10535 _ACEOF
10536 if ac_fn_c_try_compile "$LINENO"; then :
10537   ac_cv_hpux_passwd=yes
10538 else
10539   ac_cv_hpux_passwd=no
10540 fi
10541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10542   CPPFLAGS="$ac_save_CPPFLAGS"
10543 fi
10544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_hpux_passwd" >&5
10545 $as_echo "$ac_cv_hpux_passwd" >&6; }
10546   if test "$ac_cv_hpux_passwd" = yes; then
10547     have_shadow_hpux=yes
10548     have_shadow=yes
10549     need_setuid=yes
10550
10551     # on HPUX, bigcrypt is in -lsec
10552     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsec" >&5
10553 $as_echo_n "checking for bigcrypt in -lsec... " >&6; }
10554 if ${ac_cv_lib_sec_bigcrypt+:} false; then :
10555   $as_echo_n "(cached) " >&6
10556 else
10557   ac_check_lib_save_LIBS=$LIBS
10558 LIBS="-lsec  $LIBS"
10559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10560 /* end confdefs.h.  */
10561
10562 /* Override any GCC internal prototype to avoid an error.
10563    Use char because int might match the return type of a GCC
10564    builtin and then its argument prototype would still apply.  */
10565 #ifdef __cplusplus
10566 extern "C"
10567 #endif
10568 char bigcrypt ();
10569 int
10570 main ()
10571 {
10572 return bigcrypt ();
10573   ;
10574   return 0;
10575 }
10576 _ACEOF
10577 if ac_fn_c_try_link "$LINENO"; then :
10578   ac_cv_lib_sec_bigcrypt=yes
10579 else
10580   ac_cv_lib_sec_bigcrypt=no
10581 fi
10582 rm -f core conftest.err conftest.$ac_objext \
10583     conftest$ac_exeext conftest.$ac_ext
10584 LIBS=$ac_check_lib_save_LIBS
10585 fi
10586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_bigcrypt" >&5
10587 $as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
10588 if test "x$ac_cv_lib_sec_bigcrypt" = xyes; then :
10589   PASSWD_LIBS="$PASSWD_LIBS -lsec"
10590 fi
10591
10592   fi
10593 fi
10594
10595
10596 ###############################################################################
10597 #
10598 #       Check for FreeBSD-style shadow passwords.
10599 #
10600 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
10601 #       password systems -- except you only get stuff in the pw_passwd field
10602 #       if the running program is setuid.  So, guess that we've got this
10603 #       lossage to contend with if /etc/master.passwd exists, and default to
10604 #       a setuid installation.
10605 #
10606 ###############################################################################
10607
10608 if test "$with_shadow" = yes ; then
10609   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeBSD-style shadow passwords" >&5
10610 $as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
10611 if ${ac_cv_master_passwd+:} false; then :
10612   $as_echo_n "(cached) " >&6
10613 else
10614   if test -f /etc/master.passwd ; then
10615                     ac_cv_master_passwd=yes
10616                   else
10617                     ac_cv_master_passwd=no
10618                   fi
10619 fi
10620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_master_passwd" >&5
10621 $as_echo "$ac_cv_master_passwd" >&6; }
10622   if test "$ac_cv_master_passwd" = yes; then
10623     need_setuid=yes
10624   fi
10625 fi
10626
10627
10628 ###############################################################################
10629 #
10630 #       Check for traditional (ha!) shadow passwords.
10631 #
10632 ###############################################################################
10633
10634 if test "$with_shadow" = yes ; then
10635   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic shadow passwords" >&5
10636 $as_echo_n "checking for generic shadow passwords... " >&6; }
10637 if ${ac_cv_shadow+:} false; then :
10638   $as_echo_n "(cached) " >&6
10639 else
10640
10641   ac_save_CPPFLAGS="$CPPFLAGS"
10642   if test \! -z "$includedir" ; then
10643     CPPFLAGS="$CPPFLAGS -I$includedir"
10644   fi
10645   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10646   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10647   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10648 /* end confdefs.h.  */
10649 #include <stdlib.h>
10650                                     #include <unistd.h>
10651                                     #include <sys/types.h>
10652                                     #include <pwd.h>
10653                                     #include <shadow.h>
10654 int
10655 main ()
10656 {
10657 struct spwd *p = getspnam("nobody");
10658                        const char *pw = p->sp_pwdp;
10659   ;
10660   return 0;
10661 }
10662 _ACEOF
10663 if ac_fn_c_try_compile "$LINENO"; then :
10664   ac_cv_shadow=yes
10665 else
10666   ac_cv_shadow=no
10667 fi
10668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10669   CPPFLAGS="$ac_save_CPPFLAGS"
10670 fi
10671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_shadow" >&5
10672 $as_echo "$ac_cv_shadow" >&6; }
10673   if test "$ac_cv_shadow" = yes; then
10674     have_shadow=yes
10675     need_setuid=yes
10676
10677     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
10678     have_getspnam=no
10679     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lc" >&5
10680 $as_echo_n "checking for getspnam in -lc... " >&6; }
10681 if ${ac_cv_lib_c_getspnam+:} false; then :
10682   $as_echo_n "(cached) " >&6
10683 else
10684   ac_check_lib_save_LIBS=$LIBS
10685 LIBS="-lc  $LIBS"
10686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10687 /* end confdefs.h.  */
10688
10689 /* Override any GCC internal prototype to avoid an error.
10690    Use char because int might match the return type of a GCC
10691    builtin and then its argument prototype would still apply.  */
10692 #ifdef __cplusplus
10693 extern "C"
10694 #endif
10695 char getspnam ();
10696 int
10697 main ()
10698 {
10699 return getspnam ();
10700   ;
10701   return 0;
10702 }
10703 _ACEOF
10704 if ac_fn_c_try_link "$LINENO"; then :
10705   ac_cv_lib_c_getspnam=yes
10706 else
10707   ac_cv_lib_c_getspnam=no
10708 fi
10709 rm -f core conftest.err conftest.$ac_objext \
10710     conftest$ac_exeext conftest.$ac_ext
10711 LIBS=$ac_check_lib_save_LIBS
10712 fi
10713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_getspnam" >&5
10714 $as_echo "$ac_cv_lib_c_getspnam" >&6; }
10715 if test "x$ac_cv_lib_c_getspnam" = xyes; then :
10716   have_getspnam=yes
10717 fi
10718
10719     if test "$have_getspnam" = no ; then
10720       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
10721 $as_echo_n "checking for getspnam in -lgen... " >&6; }
10722 if ${ac_cv_lib_gen_getspnam+:} false; then :
10723   $as_echo_n "(cached) " >&6
10724 else
10725   ac_check_lib_save_LIBS=$LIBS
10726 LIBS="-lgen  $LIBS"
10727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10728 /* end confdefs.h.  */
10729
10730 /* Override any GCC internal prototype to avoid an error.
10731    Use char because int might match the return type of a GCC
10732    builtin and then its argument prototype would still apply.  */
10733 #ifdef __cplusplus
10734 extern "C"
10735 #endif
10736 char getspnam ();
10737 int
10738 main ()
10739 {
10740 return getspnam ();
10741   ;
10742   return 0;
10743 }
10744 _ACEOF
10745 if ac_fn_c_try_link "$LINENO"; then :
10746   ac_cv_lib_gen_getspnam=yes
10747 else
10748   ac_cv_lib_gen_getspnam=no
10749 fi
10750 rm -f core conftest.err conftest.$ac_objext \
10751     conftest$ac_exeext conftest.$ac_ext
10752 LIBS=$ac_check_lib_save_LIBS
10753 fi
10754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
10755 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
10756 if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
10757   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
10758 fi
10759
10760     fi
10761   fi
10762 fi
10763
10764
10765 ###############################################################################
10766 #
10767 #       Check for other libraries needed for non-shadow passwords.
10768 #
10769 ###############################################################################
10770
10771 if test "$enable_locking" = yes ; then
10772
10773   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
10774   have_crypt=no
10775   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lc" >&5
10776 $as_echo_n "checking for crypt in -lc... " >&6; }
10777 if ${ac_cv_lib_c_crypt+:} false; then :
10778   $as_echo_n "(cached) " >&6
10779 else
10780   ac_check_lib_save_LIBS=$LIBS
10781 LIBS="-lc  $LIBS"
10782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10783 /* end confdefs.h.  */
10784
10785 /* Override any GCC internal prototype to avoid an error.
10786    Use char because int might match the return type of a GCC
10787    builtin and then its argument prototype would still apply.  */
10788 #ifdef __cplusplus
10789 extern "C"
10790 #endif
10791 char crypt ();
10792 int
10793 main ()
10794 {
10795 return crypt ();
10796   ;
10797   return 0;
10798 }
10799 _ACEOF
10800 if ac_fn_c_try_link "$LINENO"; then :
10801   ac_cv_lib_c_crypt=yes
10802 else
10803   ac_cv_lib_c_crypt=no
10804 fi
10805 rm -f core conftest.err conftest.$ac_objext \
10806     conftest$ac_exeext conftest.$ac_ext
10807 LIBS=$ac_check_lib_save_LIBS
10808 fi
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_crypt" >&5
10810 $as_echo "$ac_cv_lib_c_crypt" >&6; }
10811 if test "x$ac_cv_lib_c_crypt" = xyes; then :
10812   have_crypt=yes
10813 fi
10814
10815   if test "$have_crypt" = no ; then
10816     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
10817 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
10818 if ${ac_cv_lib_crypt_crypt+:} false; then :
10819   $as_echo_n "(cached) " >&6
10820 else
10821   ac_check_lib_save_LIBS=$LIBS
10822 LIBS="-lcrypt  $LIBS"
10823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10824 /* end confdefs.h.  */
10825
10826 /* Override any GCC internal prototype to avoid an error.
10827    Use char because int might match the return type of a GCC
10828    builtin and then its argument prototype would still apply.  */
10829 #ifdef __cplusplus
10830 extern "C"
10831 #endif
10832 char crypt ();
10833 int
10834 main ()
10835 {
10836 return crypt ();
10837   ;
10838   return 0;
10839 }
10840 _ACEOF
10841 if ac_fn_c_try_link "$LINENO"; then :
10842   ac_cv_lib_crypt_crypt=yes
10843 else
10844   ac_cv_lib_crypt_crypt=no
10845 fi
10846 rm -f core conftest.err conftest.$ac_objext \
10847     conftest$ac_exeext conftest.$ac_ext
10848 LIBS=$ac_check_lib_save_LIBS
10849 fi
10850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
10851 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
10852 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
10853   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
10854 fi
10855
10856   fi
10857 fi
10858
10859
10860 # Most of the above shadow mechanisms will have set need_setuid to yes,
10861 # if they were found.  But, on some systems, we need setuid even when
10862 # using plain old vanilla passwords.
10863 #
10864 if test "$enable_locking" = yes ; then
10865   case "$host" in
10866     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
10867       need_setuid=yes
10868     ;;
10869   esac
10870 fi
10871
10872
10873 if test "$have_shadow_adjunct" = yes ; then
10874   $as_echo "#define HAVE_ADJUNCT_PASSWD 1" >>confdefs.h
10875
10876 elif test "$have_shadow_enhanced" = yes ; then
10877   $as_echo "#define HAVE_ENHANCED_PASSWD 1" >>confdefs.h
10878
10879 elif test "$have_shadow_hpux" = yes ; then
10880   $as_echo "#define HAVE_HPUX_PASSWD 1" >>confdefs.h
10881
10882 elif test "$have_shadow" = yes ; then
10883   $as_echo "#define HAVE_SHADOW_PASSWD 1" >>confdefs.h
10884
10885 fi
10886
10887
10888 ###############################################################################
10889 #
10890 #       Check for external password helper
10891 #       On SuSE, instead of having xscreensaver be a setuid program, they
10892 #       fork an external program that takes the password on stdin, and
10893 #       returns true if that password is a valid one.  Then only that
10894 #       smaller program needs to be setuid.
10895 #
10896 #       (Note that this external program is not a GUI: the GUI is still
10897 #       all in xscreensaver itself; the external program just does auth.)
10898 #
10899 ###############################################################################
10900
10901 have_passwd_helper=no
10902 with_passwd_helper_req=unspecified
10903
10904
10905 # Check whether --with-passwd-helper was given.
10906 if test "${with_passwd_helper+set}" = set; then :
10907   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
10908 else
10909   with_passwd_helper=no
10910 fi
10911
10912 # no HANDLE_X_PATH_ARG for this one
10913
10914 if test "$enable_locking" = no ; then
10915   with_passwd_helper_req=no
10916   with_passwd_helper=no
10917 fi
10918
10919 case "$with_passwd_helper" in
10920   ""|no) : ;;
10921   /*)
10922     cat >>confdefs.h <<_ACEOF
10923 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
10924 _ACEOF
10925
10926     have_passwd_helper=yes;;
10927   *)
10928     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
10929     exit 1
10930 esac
10931
10932
10933 ###############################################################################
10934 #
10935 #       Check for a login manager for a "New Login" button on the lock dialog.
10936 #       Usually this will be "/usr/bin/gdmflexiserver".
10937 #
10938 ###############################################################################
10939
10940 with_login_manager_req=unspecified
10941 default_login_manager_1='gdmflexiserver -ls'
10942 default_login_manager_2='kdmctl reserve'
10943
10944
10945 # Check whether --with-login-manager was given.
10946 if test "${with_login_manager+set}" = set; then :
10947   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
10948 else
10949   with_login_manager=yes
10950 fi
10951
10952 # no HANDLE_X_PATH_ARG for this one
10953
10954 if test "$enable_locking" = no ; then
10955   with_login_manager_req=no
10956   with_login_manager=no
10957 fi
10958
10959 case "$with_login_manager_req" in
10960   no)
10961     with_login_manager=""
10962   ;;
10963
10964   yes|unspecified)
10965     # Try both defaults, use the one that exists.
10966
10967     set dummy $default_login_manager_1 ; login_manager_tmp=$2
10968     unset ac_cv_path_login_manager_tmp  # don't cache
10969     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
10970 set dummy $login_manager_tmp; ac_word=$2
10971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10972 $as_echo_n "checking for $ac_word... " >&6; }
10973 if ${ac_cv_path_login_manager_tmp+:} false; then :
10974   $as_echo_n "(cached) " >&6
10975 else
10976   case $login_manager_tmp in
10977   [\\/]* | ?:[\\/]*)
10978   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
10979   ;;
10980   *)
10981   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10982 for as_dir in $PATH
10983 do
10984   IFS=$as_save_IFS
10985   test -z "$as_dir" && as_dir=.
10986     for ac_exec_ext in '' $ac_executable_extensions; do
10987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10988     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
10989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10990     break 2
10991   fi
10992 done
10993   done
10994 IFS=$as_save_IFS
10995
10996   ;;
10997 esac
10998 fi
10999 login_manager_tmp=$ac_cv_path_login_manager_tmp
11000 if test -n "$login_manager_tmp"; then
11001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11002 $as_echo "$login_manager_tmp" >&6; }
11003 else
11004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11005 $as_echo "no" >&6; }
11006 fi
11007
11008
11009     if test ! -z "$login_manager_tmp" ; then
11010       with_login_manager="$default_login_manager_1"
11011     else
11012       set dummy $default_login_manager_2 ; login_manager_tmp=$2
11013       unset ac_cv_path_login_manager_tmp  # don't cache
11014       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11015 set dummy $login_manager_tmp; ac_word=$2
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11017 $as_echo_n "checking for $ac_word... " >&6; }
11018 if ${ac_cv_path_login_manager_tmp+:} false; then :
11019   $as_echo_n "(cached) " >&6
11020 else
11021   case $login_manager_tmp in
11022   [\\/]* | ?:[\\/]*)
11023   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11024   ;;
11025   *)
11026   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11027 for as_dir in $PATH
11028 do
11029   IFS=$as_save_IFS
11030   test -z "$as_dir" && as_dir=.
11031     for ac_exec_ext in '' $ac_executable_extensions; do
11032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11033     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11035     break 2
11036   fi
11037 done
11038   done
11039 IFS=$as_save_IFS
11040
11041   ;;
11042 esac
11043 fi
11044 login_manager_tmp=$ac_cv_path_login_manager_tmp
11045 if test -n "$login_manager_tmp"; then
11046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11047 $as_echo "$login_manager_tmp" >&6; }
11048 else
11049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11050 $as_echo "no" >&6; }
11051 fi
11052
11053
11054       if test ! -z "$login_manager_tmp" ; then
11055         with_login_manager="$default_login_manager_2"
11056       else
11057         with_login_manager=""
11058       fi
11059     fi
11060   ;;
11061
11062   /*)
11063     # absolute path specified on cmd line
11064     set dummy $with_login_manager_req ; login_manager_tmp=$2
11065     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $login_manager_tmp" >&5
11066 $as_echo_n "checking for $login_manager_tmp... " >&6; }
11067     if test -x "$login_manager_tmp" ; then
11068       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11069 $as_echo "yes" >&6; }
11070     else
11071       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11072 $as_echo "no" >&6; }
11073       with_login_manager=""
11074     fi
11075   ;;
11076
11077   *)
11078     # relative path specified on cmd line
11079     set dummy $with_login_manager_req ; login_manager_tmp=$2
11080     unset ac_cv_path_login_manager_tmp    # don't cache
11081     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11082 set dummy $login_manager_tmp; ac_word=$2
11083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11084 $as_echo_n "checking for $ac_word... " >&6; }
11085 if ${ac_cv_path_login_manager_tmp+:} false; then :
11086   $as_echo_n "(cached) " >&6
11087 else
11088   case $login_manager_tmp in
11089   [\\/]* | ?:[\\/]*)
11090   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11091   ;;
11092   *)
11093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11094 for as_dir in $PATH
11095 do
11096   IFS=$as_save_IFS
11097   test -z "$as_dir" && as_dir=.
11098     for ac_exec_ext in '' $ac_executable_extensions; do
11099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11100     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11102     break 2
11103   fi
11104 done
11105   done
11106 IFS=$as_save_IFS
11107
11108   ;;
11109 esac
11110 fi
11111 login_manager_tmp=$ac_cv_path_login_manager_tmp
11112 if test -n "$login_manager_tmp"; then
11113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11114 $as_echo "$login_manager_tmp" >&6; }
11115 else
11116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11117 $as_echo "no" >&6; }
11118 fi
11119
11120
11121     if test -z "$login_manager_tmp" ; then
11122       with_login_manager=""
11123     else
11124       with_login_manager="$login_manager_tmp"
11125     fi
11126   ;;
11127 esac
11128 ac_cv_login_manager_program="$with_login_manager"
11129
11130 NEW_LOGIN_COMMAND_P=''
11131 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
11132
11133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for login manager" >&5
11134 $as_echo_n "checking for login manager... " >&6; }
11135 if test -z "$NEW_LOGIN_COMMAND" ; then
11136   NEW_LOGIN_COMMAND="$default_login_manager_1"
11137   NEW_LOGIN_COMMAND_P='! '
11138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND (disabled)" >&5
11139 $as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
11140 else
11141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND" >&5
11142 $as_echo "$NEW_LOGIN_COMMAND" >&6; }
11143 fi
11144
11145
11146 ###############################################################################
11147 #
11148 #       Check for -lgtk (and Gnome stuff)
11149 #
11150 ###############################################################################
11151
11152 have_gtk=no
11153 with_gtk_req=unspecified
11154
11155 # Check whether --with-gtk was given.
11156 if test "${with_gtk+set}" = set; then :
11157   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
11158 else
11159   with_gtk=yes
11160 fi
11161
11162
11163 # if --with-gtk=/directory/ was specified, remember that directory so that
11164 # we can also look for the `gtk-config' program in that directory.
11165 case "$with_gtk" in
11166   /*)
11167     gtk_dir="$with_gtk"
11168     ;;
11169   *)
11170     gtk_dir=""
11171     ;;
11172 esac
11173
11174
11175    case "$with_gtk" in
11176     yes) ;;
11177     no)  ;;
11178
11179     /*)
11180      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk headers" >&5
11181 $as_echo_n "checking for Gtk headers... " >&6; }
11182      d=$with_gtk/include
11183      if test -d $d; then
11184        X_CFLAGS="-I$d $X_CFLAGS"
11185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11186 $as_echo "$d" >&6; }
11187      else
11188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11189 $as_echo "not found ($d: no such directory)" >&6; }
11190      fi
11191
11192      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
11193 $as_echo_n "checking for Gtk libs... " >&6; }
11194      d=$with_gtk/lib
11195      if test -d $d; then
11196        X_LIBS="-L$d $X_LIBS"
11197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11198 $as_echo "$d" >&6; }
11199      else
11200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11201 $as_echo "not found ($d: no such directory)" >&6; }
11202      fi
11203
11204      # replace the directory string with "yes".
11205      with_gtk_req="yes"
11206      with_gtk=$with_gtk_req
11207      ;;
11208
11209     *)
11210      echo ""
11211      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
11212      echo "       If it is a directory, then \`DIR/include' will be added to"
11213      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11214      exit 1
11215      ;;
11216    esac
11217
11218
11219 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
11220   echo "error: must be yes or no: --with-gtk=$with_gtk"
11221   exit 1
11222 fi
11223
11224
11225 parse_gtk_version_string() {
11226   # M4 sucks!!
11227
11228   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
11229   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
11230
11231   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
11232   if test -z "$ac_gtk_version"; then
11233     ac_gtk_version=unknown
11234     ac_gtk_version_string=unknown
11235   fi
11236 }
11237
11238 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
11239 # if the user specified --with-gtk=/foo/ then look there.
11240 #
11241 gtk_path="$PATH"
11242 if test ! -z "$gtk_dir"; then
11243   # canonicalize slashes.
11244   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
11245   gtk_path="$foo:$gtk_path"
11246 fi
11247
11248 for ac_prog in pkg-config
11249 do
11250   # Extract the first word of "$ac_prog", so it can be a program name with args.
11251 set dummy $ac_prog; ac_word=$2
11252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11253 $as_echo_n "checking for $ac_word... " >&6; }
11254 if ${ac_cv_path_pkg_config+:} false; then :
11255   $as_echo_n "(cached) " >&6
11256 else
11257   case $pkg_config in
11258   [\\/]* | ?:[\\/]*)
11259   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
11260   ;;
11261   *)
11262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11263 for as_dir in $gtk_path
11264 do
11265   IFS=$as_save_IFS
11266   test -z "$as_dir" && as_dir=.
11267     for ac_exec_ext in '' $ac_executable_extensions; do
11268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11269     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
11270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11271     break 2
11272   fi
11273 done
11274   done
11275 IFS=$as_save_IFS
11276
11277   ;;
11278 esac
11279 fi
11280 pkg_config=$ac_cv_path_pkg_config
11281 if test -n "$pkg_config"; then
11282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config" >&5
11283 $as_echo "$pkg_config" >&6; }
11284 else
11285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11286 $as_echo "no" >&6; }
11287 fi
11288
11289
11290   test -n "$pkg_config" && break
11291 done
11292
11293
11294 if test -z "$pkg_config" ; then
11295   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found!" >&5
11296 $as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
11297   pkg_config="false"
11298 fi
11299
11300
11301 # Utility function for running pkg-config-based tests...
11302 #
11303 pkgs=''
11304 pkg_check_version() {
11305   if test "$ok" = yes ; then
11306     req="$1"
11307     min="$2"
11308     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $req" >&5
11309 $as_echo_n "checking for $req... " >&6; }
11310     if $pkg_config --exists "$req" ; then
11311       vers=`$pkg_config --modversion "$req"`
11312       if $pkg_config --exists "$req >= $min" ; then
11313         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers" >&5
11314 $as_echo "$vers" >&6; }
11315         pkgs="$pkgs $req"
11316         return 1
11317       else
11318         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers (wanted >= $min)" >&5
11319 $as_echo "$vers (wanted >= $min)" >&6; }
11320         ok=no
11321         return 0
11322       fi
11323     else
11324       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11325 $as_echo "no" >&6; }
11326       ok=no
11327       return 0
11328     fi
11329   fi
11330 }
11331
11332
11333 jurassic_gtk=no
11334 gtk_halfassed=no
11335
11336 if test "$with_gtk" = yes; then
11337   have_gtk=no
11338
11339   ok="yes"
11340   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
11341   pkg_check_version         gmodule-2.0  2.0.0
11342   pkg_check_version          libxml-2.0  2.4.6
11343   pkg_check_version        libglade-2.0  1.99.0
11344   pkg_check_version      gdk-pixbuf-2.0  2.0.0
11345   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
11346   have_gtk="$ok"
11347
11348   if test "$have_gtk" = no; then
11349     if test -n "$ac_gtk_version_string" ; then
11350       gtk_halfassed="$ac_gtk_version_string"
11351       gtk_halfassed_lib="$req"
11352     fi
11353   fi
11354
11355   if test "$have_gtk" = yes; then
11356     parse_gtk_version_string
11357     jurassic_gtk=no
11358   fi
11359
11360   if test "$have_gtk" = yes; then
11361     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk includes" >&5
11362 $as_echo_n "checking for Gtk includes... " >&6; }
11363 if ${ac_cv_gtk_config_cflags+:} false; then :
11364   $as_echo_n "(cached) " >&6
11365 else
11366   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
11367 fi
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_cflags" >&5
11369 $as_echo "$ac_cv_gtk_config_cflags" >&6; }
11370     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
11371 $as_echo_n "checking for Gtk libs... " >&6; }
11372 if ${ac_cv_gtk_config_libs+:} false; then :
11373   $as_echo_n "(cached) " >&6
11374 else
11375   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
11376 fi
11377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_libs" >&5
11378 $as_echo "$ac_cv_gtk_config_libs" >&6; }
11379   fi
11380
11381   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
11382   ac_gtk_config_libs=$ac_cv_gtk_config_libs
11383
11384   GTK_EXTRA_OBJS=""
11385   GTK_DATADIR=""
11386   if test "$have_gtk" = yes; then
11387     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
11388     GTK_DATADIR="$GTK_DATADIR/share"
11389   fi
11390
11391   if test "$have_gtk" = yes; then
11392     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
11393     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
11394     $as_echo "#define HAVE_GTK 1" >>confdefs.h
11395
11396     $as_echo "#define HAVE_GTK2 1" >>confdefs.h
11397
11398     $as_echo "#define HAVE_XML 1" >>confdefs.h
11399
11400   fi
11401
11402 fi
11403
11404
11405 # Check for the various Gnome help and URL loading programs.
11406 #
11407 WITH_BROWSER=gnome-open
11408 if test "$have_gtk" = yes; then
11409   for ac_prog in gnome-open
11410 do
11411   # Extract the first word of "$ac_prog", so it can be a program name with args.
11412 set dummy $ac_prog; ac_word=$2
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11414 $as_echo_n "checking for $ac_word... " >&6; }
11415 if ${ac_cv_prog_gnome_open_program+:} false; then :
11416   $as_echo_n "(cached) " >&6
11417 else
11418   if test -n "$gnome_open_program"; then
11419   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
11420 else
11421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11422 for as_dir in $PATH
11423 do
11424   IFS=$as_save_IFS
11425   test -z "$as_dir" && as_dir=.
11426     for ac_exec_ext in '' $ac_executable_extensions; do
11427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11428     ac_cv_prog_gnome_open_program="$ac_prog"
11429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11430     break 2
11431   fi
11432 done
11433   done
11434 IFS=$as_save_IFS
11435
11436 fi
11437 fi
11438 gnome_open_program=$ac_cv_prog_gnome_open_program
11439 if test -n "$gnome_open_program"; then
11440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_open_program" >&5
11441 $as_echo "$gnome_open_program" >&6; }
11442 else
11443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11444 $as_echo "no" >&6; }
11445 fi
11446
11447
11448   test -n "$gnome_open_program" && break
11449 done
11450
11451   for ac_prog in gnome-url-show
11452 do
11453   # Extract the first word of "$ac_prog", so it can be a program name with args.
11454 set dummy $ac_prog; ac_word=$2
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11456 $as_echo_n "checking for $ac_word... " >&6; }
11457 if ${ac_cv_prog_gnome_url_show_program+:} false; then :
11458   $as_echo_n "(cached) " >&6
11459 else
11460   if test -n "$gnome_url_show_program"; then
11461   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
11462 else
11463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11464 for as_dir in $PATH
11465 do
11466   IFS=$as_save_IFS
11467   test -z "$as_dir" && as_dir=.
11468     for ac_exec_ext in '' $ac_executable_extensions; do
11469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11470     ac_cv_prog_gnome_url_show_program="$ac_prog"
11471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11472     break 2
11473   fi
11474 done
11475   done
11476 IFS=$as_save_IFS
11477
11478 fi
11479 fi
11480 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
11481 if test -n "$gnome_url_show_program"; then
11482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_url_show_program" >&5
11483 $as_echo "$gnome_url_show_program" >&6; }
11484 else
11485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11486 $as_echo "no" >&6; }
11487 fi
11488
11489
11490   test -n "$gnome_url_show_program" && break
11491 done
11492
11493 fi
11494
11495
11496 ###############################################################################
11497 #
11498 #       Check for -lXm.
11499 #
11500 ###############################################################################
11501
11502 have_motif=no
11503 with_motif_req=unspecified
11504
11505 # Check whether --with-motif was given.
11506 if test "${with_motif+set}" = set; then :
11507   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
11508 else
11509   with_motif=no
11510 fi
11511
11512
11513
11514    case "$with_motif" in
11515     yes) ;;
11516     no)  ;;
11517
11518     /*)
11519      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif headers" >&5
11520 $as_echo_n "checking for Motif headers... " >&6; }
11521      d=$with_motif/include
11522      if test -d $d; then
11523        X_CFLAGS="-I$d $X_CFLAGS"
11524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11525 $as_echo "$d" >&6; }
11526      else
11527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11528 $as_echo "not found ($d: no such directory)" >&6; }
11529      fi
11530
11531      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif libs" >&5
11532 $as_echo_n "checking for Motif libs... " >&6; }
11533      d=$with_motif/lib
11534      if test -d $d; then
11535        X_LIBS="-L$d $X_LIBS"
11536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11537 $as_echo "$d" >&6; }
11538      else
11539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11540 $as_echo "not found ($d: no such directory)" >&6; }
11541      fi
11542
11543      # replace the directory string with "yes".
11544      with_motif_req="yes"
11545      with_motif=$with_motif_req
11546      ;;
11547
11548     *)
11549      echo ""
11550      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
11551      echo "       If it is a directory, then \`DIR/include' will be added to"
11552      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11553      exit 1
11554      ;;
11555    esac
11556
11557
11558 if test "$with_motif" != yes -a "$with_motif" != no ; then
11559   echo "error: must be yes or no: --with-motif=$with_motif"
11560   exit 1
11561 fi
11562
11563 if test "$with_motif" = yes; then
11564   have_motif=no
11565
11566   ac_save_CPPFLAGS="$CPPFLAGS"
11567   if test \! -z "$includedir" ; then
11568     CPPFLAGS="$CPPFLAGS -I$includedir"
11569   fi
11570   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11571   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11572   ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "#include <stdlib.h>
11573                      #include <stdio.h>
11574                      #include <X11/Intrinsic.h>
11575 "
11576 if test "x$ac_cv_header_Xm_Xm_h" = xyes; then :
11577   have_motif=yes
11578                      $as_echo "#define HAVE_MOTIF 1" >>confdefs.h
11579
11580                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
11581 fi
11582
11583
11584   CPPFLAGS="$ac_save_CPPFLAGS"
11585 fi
11586
11587
11588 if test "$have_motif" = yes; then
11589
11590   ac_save_CPPFLAGS="$CPPFLAGS"
11591   if test \! -z "$includedir" ; then
11592     CPPFLAGS="$CPPFLAGS -I$includedir"
11593   fi
11594   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11595   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11596   ac_fn_c_check_header_compile "$LINENO" "Xm/ComboBox.h" "ac_cv_header_Xm_ComboBox_h" "#include <stdlib.h>
11597                      #include <stdio.h>
11598                      #include <X11/Intrinsic.h>
11599 "
11600 if test "x$ac_cv_header_Xm_ComboBox_h" = xyes; then :
11601   $as_echo "#define HAVE_XMCOMBOBOX 1" >>confdefs.h
11602
11603 fi
11604
11605
11606   CPPFLAGS="$ac_save_CPPFLAGS"
11607 fi
11608
11609
11610 ###############################################################################
11611 #
11612 #       Checking whether Motif is really Lesstif.
11613 #
11614 ###############################################################################
11615
11616 have_lesstif=no
11617 if test "$have_motif" = yes ; then
11618   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif is really LessTif" >&5
11619 $as_echo_n "checking whether Motif is really LessTif... " >&6; }
11620 if ${ac_cv_have_lesstif+:} false; then :
11621   $as_echo_n "(cached) " >&6
11622 else
11623
11624   ac_save_CPPFLAGS="$CPPFLAGS"
11625   if test \! -z "$includedir" ; then
11626     CPPFLAGS="$CPPFLAGS -I$includedir"
11627   fi
11628   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11629   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11630   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11631 /* end confdefs.h.  */
11632 #include <Xm/Xm.h>
11633 int
11634 main ()
11635 {
11636 long vers = LesstifVersion;
11637   ;
11638   return 0;
11639 }
11640 _ACEOF
11641 if ac_fn_c_try_compile "$LINENO"; then :
11642   ac_cv_have_lesstif=yes
11643 else
11644   ac_cv_have_lesstif=no
11645 fi
11646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11647   CPPFLAGS="$ac_save_CPPFLAGS"
11648 fi
11649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lesstif" >&5
11650 $as_echo "$ac_cv_have_lesstif" >&6; }
11651   have_lesstif=$ac_cv_have_lesstif
11652 fi
11653
11654
11655 lesstif_version=unknown
11656 lesstif_version_string=unknown
11657
11658 if test "$have_lesstif" = yes ; then
11659   ltv=unknown
11660   echo unknown > conftest-lt
11661   { $as_echo "$as_me:${as_lineno-$LINENO}: checking LessTif version number" >&5
11662 $as_echo_n "checking LessTif version number... " >&6; }
11663 if ${ac_cv_lesstif_version_string+:} false; then :
11664   $as_echo_n "(cached) " >&6
11665 else
11666
11667   ac_save_CPPFLAGS="$CPPFLAGS"
11668   if test \! -z "$includedir" ; then
11669     CPPFLAGS="$CPPFLAGS -I$includedir"
11670   fi
11671   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11672   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11673   if test "$cross_compiling" = yes; then :
11674   ac_cv_lesstif_version=unknown
11675                      ac_cv_lesstif_version_string=unknown
11676 else
11677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11678 /* end confdefs.h.  */
11679 #include <stdio.h>
11680                      #include <Xm/Xm.h>
11681                      int main() {
11682                        FILE *f = fopen("conftest-lt", "w");
11683                        if (!f) exit(1);
11684                        fprintf(f, "%d %d.%d\n", LesstifVersion,
11685                           LESSTIF_VERSION, LESSTIF_REVISION);
11686                        fclose(f);
11687                        exit(0);
11688                      }
11689 _ACEOF
11690 if ac_fn_c_try_run "$LINENO"; then :
11691   ltv=`cat conftest-lt`
11692                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
11693                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
11694 else
11695   ac_cv_lesstif_version=unknown
11696                      ac_cv_lesstif_version_string=unknown
11697 fi
11698 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11699   conftest.$ac_objext conftest.beam conftest.$ac_ext
11700 fi
11701
11702   CPPFLAGS="$ac_save_CPPFLAGS"
11703 fi
11704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lesstif_version_string" >&5
11705 $as_echo "$ac_cv_lesstif_version_string" >&6; }
11706   rm -rf conftest-lt
11707   lesstif_version=$ac_cv_lesstif_version
11708   lesstif_version_string=$ac_cv_lesstif_version_string
11709
11710 fi
11711
11712
11713 if test "$have_motif" = yes ; then
11714   mtv=unknown
11715   echo unknown > conftest-mt
11716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking Motif version number" >&5
11717 $as_echo_n "checking Motif version number... " >&6; }
11718 if ${ac_cv_motif_version_string+:} false; then :
11719   $as_echo_n "(cached) " >&6
11720 else
11721
11722   ac_save_CPPFLAGS="$CPPFLAGS"
11723   if test \! -z "$includedir" ; then
11724     CPPFLAGS="$CPPFLAGS -I$includedir"
11725   fi
11726   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11727   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11728   if test "$cross_compiling" = yes; then :
11729   ac_cv_motif_version=unknown
11730                      ac_cv_motif_version_string=unknown
11731 else
11732   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11733 /* end confdefs.h.  */
11734 #include <stdio.h>
11735                      #include <Xm/Xm.h>
11736                      int main() {
11737                        FILE *f = fopen("conftest-mt", "w");
11738                        if (!f) exit(1);
11739                        fprintf(f, "%d %d.%d\n", XmVersion,
11740                           XmVERSION, XmREVISION);
11741                        fclose(f);
11742                        exit(0);
11743                      }
11744 _ACEOF
11745 if ac_fn_c_try_run "$LINENO"; then :
11746   mtv=`cat conftest-mt`
11747                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
11748                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
11749 else
11750   ac_cv_motif_version=unknown
11751                      ac_cv_motif_version_string=unknown
11752 fi
11753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11754   conftest.$ac_objext conftest.beam conftest.$ac_ext
11755 fi
11756
11757   CPPFLAGS="$ac_save_CPPFLAGS"
11758 fi
11759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_motif_version_string" >&5
11760 $as_echo "$ac_cv_motif_version_string" >&6; }
11761   rm -rf conftest-mt
11762   motif_version=$ac_cv_motif_version
11763   motif_version_string=$ac_cv_motif_version_string
11764
11765 fi
11766
11767
11768 ###############################################################################
11769 #
11770 #       Checking whether Motif requires -lXpm.
11771 #
11772 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
11773 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
11774 #       of the library whether to build the XPM code into libXm, or whether
11775 #       to rely on an external libXm.  So the only way to tell whether XPM is
11776 #       a link-time requirement is to examine libXm.a, which is very
11777 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
11778 #       always link against XPM if the XPM lib exists (and this will be a
11779 #       no-op if libXm happens to already have the XPM code in it.)
11780 #
11781 ###############################################################################
11782
11783 motif_requires_xpm=no
11784 if test "$have_motif" = yes ; then
11785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif requires XPM" >&5
11786 $as_echo_n "checking whether Motif requires XPM... " >&6; }
11787    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
11788    then
11789      motif_requires_xpm=yes
11790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
11791 $as_echo "maybe" >&6; }
11792    else
11793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11794 $as_echo "no" >&6; }
11795    fi
11796 fi
11797
11798
11799 ###############################################################################
11800 #
11801 #       Checking whether Motif requires -lXp.
11802 #
11803 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
11804 #       Extension".   Why this extension isn't in -lXext with all the others,
11805 #       I have no idea.
11806 #
11807 ###############################################################################
11808
11809 have_xp_ext=no
11810 if test "$have_motif" = yes ; then
11811    have_xp_ext=no
11812
11813   ac_save_CPPFLAGS="$CPPFLAGS"
11814   ac_save_LDFLAGS="$LDFLAGS"
11815 #  ac_save_LIBS="$LIBS"
11816
11817   if test \! -z "$includedir" ; then
11818     CPPFLAGS="$CPPFLAGS -I$includedir"
11819   fi
11820   # note: $X_CFLAGS includes $x_includes
11821   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11822
11823   if test \! -z "$libdir" ; then
11824     LDFLAGS="$LDFLAGS -L$libdir"
11825   fi
11826   # note: $X_LIBS includes $x_libraries
11827   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11828
11829   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11830   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11831   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpQueryExtension in -lXp" >&5
11832 $as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
11833 if ${ac_cv_lib_Xp_XpQueryExtension+:} false; then :
11834   $as_echo_n "(cached) " >&6
11835 else
11836   ac_check_lib_save_LIBS=$LIBS
11837 LIBS="-lXp -lX11 -lXext -lm $LIBS"
11838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11839 /* end confdefs.h.  */
11840
11841 /* Override any GCC internal prototype to avoid an error.
11842    Use char because int might match the return type of a GCC
11843    builtin and then its argument prototype would still apply.  */
11844 #ifdef __cplusplus
11845 extern "C"
11846 #endif
11847 char XpQueryExtension ();
11848 int
11849 main ()
11850 {
11851 return XpQueryExtension ();
11852   ;
11853   return 0;
11854 }
11855 _ACEOF
11856 if ac_fn_c_try_link "$LINENO"; then :
11857   ac_cv_lib_Xp_XpQueryExtension=yes
11858 else
11859   ac_cv_lib_Xp_XpQueryExtension=no
11860 fi
11861 rm -f core conftest.err conftest.$ac_objext \
11862     conftest$ac_exeext conftest.$ac_ext
11863 LIBS=$ac_check_lib_save_LIBS
11864 fi
11865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
11866 $as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
11867 if test "x$ac_cv_lib_Xp_XpQueryExtension" = xyes; then :
11868   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
11869 else
11870   true
11871 fi
11872
11873   CPPFLAGS="$ac_save_CPPFLAGS"
11874   LDFLAGS="$ac_save_LDFLAGS"
11875 #  LIBS="$ac_save_LIBS"
11876
11877 fi
11878
11879
11880 ###############################################################################
11881 #
11882 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
11883 #
11884 ###############################################################################
11885
11886 have_xintl=no
11887 if test "$have_motif" = yes ; then
11888
11889   ac_save_CPPFLAGS="$CPPFLAGS"
11890   ac_save_LDFLAGS="$LDFLAGS"
11891 #  ac_save_LIBS="$LIBS"
11892
11893   if test \! -z "$includedir" ; then
11894     CPPFLAGS="$CPPFLAGS -I$includedir"
11895   fi
11896   # note: $X_CFLAGS includes $x_includes
11897   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11898
11899   if test \! -z "$libdir" ; then
11900     LDFLAGS="$LDFLAGS -L$libdir"
11901   fi
11902   # note: $X_LIBS includes $x_libraries
11903   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11904
11905   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11906   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Xsetlocale in -lXintl" >&5
11908 $as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
11909 if ${ac_cv_lib_Xintl__Xsetlocale+:} false; then :
11910   $as_echo_n "(cached) " >&6
11911 else
11912   ac_check_lib_save_LIBS=$LIBS
11913 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
11914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11915 /* end confdefs.h.  */
11916
11917 /* Override any GCC internal prototype to avoid an error.
11918    Use char because int might match the return type of a GCC
11919    builtin and then its argument prototype would still apply.  */
11920 #ifdef __cplusplus
11921 extern "C"
11922 #endif
11923 char _Xsetlocale ();
11924 int
11925 main ()
11926 {
11927 return _Xsetlocale ();
11928   ;
11929   return 0;
11930 }
11931 _ACEOF
11932 if ac_fn_c_try_link "$LINENO"; then :
11933   ac_cv_lib_Xintl__Xsetlocale=yes
11934 else
11935   ac_cv_lib_Xintl__Xsetlocale=no
11936 fi
11937 rm -f core conftest.err conftest.$ac_objext \
11938     conftest$ac_exeext conftest.$ac_ext
11939 LIBS=$ac_check_lib_save_LIBS
11940 fi
11941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
11942 $as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
11943 if test "x$ac_cv_lib_Xintl__Xsetlocale" = xyes; then :
11944   have_xintl=yes
11945 else
11946   have_xintl=no
11947 fi
11948
11949   CPPFLAGS="$ac_save_CPPFLAGS"
11950   LDFLAGS="$ac_save_LDFLAGS"
11951 #  LIBS="$ac_save_LIBS"
11952
11953   if test "$have_xintl" = yes; then
11954     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
11955   fi
11956 fi
11957
11958
11959 ###############################################################################
11960 #
11961 #       Check for -lGL or -lMesaGL.
11962 #
11963 ###############################################################################
11964
11965 have_gl=no
11966 ac_have_mesa_gl=no
11967 with_gl_req=unspecified
11968 gl_halfassed=no
11969
11970 # Check whether --with-gl was given.
11971 if test "${with_gl+set}" = set; then :
11972   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
11973 else
11974   with_gl=yes
11975 fi
11976
11977
11978
11979    case "$with_gl" in
11980     yes) ;;
11981     no)  ;;
11982
11983     /*)
11984      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL headers" >&5
11985 $as_echo_n "checking for GL headers... " >&6; }
11986      d=$with_gl/include
11987      if test -d $d; then
11988        X_CFLAGS="-I$d $X_CFLAGS"
11989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11990 $as_echo "$d" >&6; }
11991      else
11992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11993 $as_echo "not found ($d: no such directory)" >&6; }
11994      fi
11995
11996      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL libs" >&5
11997 $as_echo_n "checking for GL libs... " >&6; }
11998      d=$with_gl/lib
11999      if test -d $d; then
12000        X_LIBS="-L$d $X_LIBS"
12001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12002 $as_echo "$d" >&6; }
12003      else
12004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12005 $as_echo "not found ($d: no such directory)" >&6; }
12006      fi
12007
12008      # replace the directory string with "yes".
12009      with_gl_req="yes"
12010      with_gl=$with_gl_req
12011      ;;
12012
12013     *)
12014      echo ""
12015      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
12016      echo "       If it is a directory, then \`DIR/include' will be added to"
12017      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12018      exit 1
12019      ;;
12020    esac
12021
12022
12023 ac_mesagl_version=unknown
12024 ac_mesagl_version_string=unknown
12025
12026 if test "$with_gl" = yes; then
12027
12028   ac_save_CPPFLAGS="$CPPFLAGS"
12029   if test \! -z "$includedir" ; then
12030     CPPFLAGS="$CPPFLAGS -I$includedir"
12031   fi
12032   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12033   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12034   ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
12035 if test "x$ac_cv_header_GL_gl_h" = xyes; then :
12036   have_gl=yes
12037 else
12038   have_gl=no
12039 fi
12040
12041
12042   CPPFLAGS="$ac_save_CPPFLAGS"
12043   if test "$have_gl" = yes ; then
12044
12045   ac_save_CPPFLAGS="$CPPFLAGS"
12046   if test \! -z "$includedir" ; then
12047     CPPFLAGS="$CPPFLAGS -I$includedir"
12048   fi
12049   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12050   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12051   ac_fn_c_check_header_compile "$LINENO" "GL/glx.h" "ac_cv_header_GL_glx_h" "#include <GL/gl.h>
12052 "
12053 if test "x$ac_cv_header_GL_glx_h" = xyes; then :
12054   have_gl=yes
12055 else
12056   have_gl=no
12057 fi
12058
12059
12060   CPPFLAGS="$ac_save_CPPFLAGS"
12061   fi
12062
12063   # If we have the headers, try and figure out which vendor it's from.
12064   #
12065   if test "$have_gl" = yes ; then
12066
12067     # We need to know whether it's MesaGL so that we know which libraries
12068     # to link against.
12069     #
12070     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GL is really MesaGL" >&5
12071 $as_echo_n "checking whether GL is really MesaGL... " >&6; }
12072 if ${ac_cv_have_mesa_gl+:} false; then :
12073   $as_echo_n "(cached) " >&6
12074 else
12075   ac_cv_have_mesa_gl=no
12076        if test "$ac_macosx" = no; then
12077          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
12078          # It's not really Mesa, is it?
12079
12080   ac_save_CPPFLAGS="$CPPFLAGS"
12081   if test \! -z "$includedir" ; then
12082     CPPFLAGS="$CPPFLAGS -I$includedir"
12083   fi
12084   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12085   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12087 /* end confdefs.h.  */
12088 #include <GL/glx.h>
12089
12090 _ACEOF
12091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12092   $EGREP "Mesa|MESA" >/dev/null 2>&1; then :
12093   ac_cv_have_mesa_gl=yes
12094 fi
12095 rm -rf conftest*
12096
12097   CPPFLAGS="$ac_save_CPPFLAGS"
12098        fi
12099 fi
12100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mesa_gl" >&5
12101 $as_echo "$ac_cv_have_mesa_gl" >&6; }
12102     ac_have_mesa_gl=$ac_cv_have_mesa_gl
12103
12104     gl_lib_1=""
12105     GL_LIBS=""
12106
12107     if test "$ac_macosx" = yes; then
12108
12109       # Without these, every link against libGL gets a bunch of useless
12110       # warnings.
12111       #
12112       osx_crud="-bind_at_load -multiply_defined suppress"
12113       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
12114 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
12115       GL_LIBS="$GL_LIBS $osx_crud"
12116       unset osx_crud
12117
12118       # New lossage in 10.5.0: without this, we get:
12119       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
12120       #
12121       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
12122       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
12123
12124       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
12125 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
12126       GL_LIBS="$GL_LIBS $osx_crud"
12127       unset osx_crud
12128
12129       # New lossage in 10.6.8: we can't allow -L/opt/local/lib to be in the
12130       # link line, or at runtime XQueryExtension gets a segv due to some kind
12131       # of library version skew.  Libs must come from /usr/X11/lib even if
12132       # $prefix and/or $exec_prefix are set to /opt/local/.
12133       #
12134       { $as_echo "$as_me:${as_lineno-$LINENO}: result: omitting \"$libdir\" from LDFLAGS" >&5
12135 $as_echo "omitting \"$libdir\" from LDFLAGS" >&6; }
12136       libdir=''
12137
12138     fi
12139
12140
12141     # Some versions of MesaGL are compiled to require -lpthread.
12142     # So if the Mesa headers exist, and -lpthread exists, then always
12143     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
12144     #
12145     if test "$ac_have_mesa_gl" = yes; then
12146       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
12147 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
12148 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
12149   $as_echo_n "(cached) " >&6
12150 else
12151   ac_check_lib_save_LIBS=$LIBS
12152 LIBS="-lpthread  $LIBS"
12153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12154 /* end confdefs.h.  */
12155
12156 /* Override any GCC internal prototype to avoid an error.
12157    Use char because int might match the return type of a GCC
12158    builtin and then its argument prototype would still apply.  */
12159 #ifdef __cplusplus
12160 extern "C"
12161 #endif
12162 char pthread_create ();
12163 int
12164 main ()
12165 {
12166 return pthread_create ();
12167   ;
12168   return 0;
12169 }
12170 _ACEOF
12171 if ac_fn_c_try_link "$LINENO"; then :
12172   ac_cv_lib_pthread_pthread_create=yes
12173 else
12174   ac_cv_lib_pthread_pthread_create=no
12175 fi
12176 rm -f core conftest.err conftest.$ac_objext \
12177     conftest$ac_exeext conftest.$ac_ext
12178 LIBS=$ac_check_lib_save_LIBS
12179 fi
12180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
12181 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
12182 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
12183   GL_LIBS="-lpthread"
12184 fi
12185
12186     fi
12187
12188
12189     # If we have Mesa headers, check to see if we can link against -lMesaGL.
12190     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
12191     # Else, warn that GL is busted.  (We have the headers, but no libs.)
12192     #
12193
12194     if test "$ac_have_mesa_gl" = yes ; then
12195
12196   ac_save_CPPFLAGS="$CPPFLAGS"
12197   ac_save_LDFLAGS="$LDFLAGS"
12198 #  ac_save_LIBS="$LIBS"
12199
12200   if test \! -z "$includedir" ; then
12201     CPPFLAGS="$CPPFLAGS -I$includedir"
12202   fi
12203   # note: $X_CFLAGS includes $x_includes
12204   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12205
12206   if test \! -z "$libdir" ; then
12207     LDFLAGS="$LDFLAGS -L$libdir"
12208   fi
12209   # note: $X_LIBS includes $x_libraries
12210   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12211
12212   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12213   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12214   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lMesaGL" >&5
12215 $as_echo_n "checking for glXCreateContext in -lMesaGL... " >&6; }
12216 if ${ac_cv_lib_MesaGL_glXCreateContext+:} false; then :
12217   $as_echo_n "(cached) " >&6
12218 else
12219   ac_check_lib_save_LIBS=$LIBS
12220 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
12221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12222 /* end confdefs.h.  */
12223
12224 /* Override any GCC internal prototype to avoid an error.
12225    Use char because int might match the return type of a GCC
12226    builtin and then its argument prototype would still apply.  */
12227 #ifdef __cplusplus
12228 extern "C"
12229 #endif
12230 char glXCreateContext ();
12231 int
12232 main ()
12233 {
12234 return glXCreateContext ();
12235   ;
12236   return 0;
12237 }
12238 _ACEOF
12239 if ac_fn_c_try_link "$LINENO"; then :
12240   ac_cv_lib_MesaGL_glXCreateContext=yes
12241 else
12242   ac_cv_lib_MesaGL_glXCreateContext=no
12243 fi
12244 rm -f core conftest.err conftest.$ac_objext \
12245     conftest$ac_exeext conftest.$ac_ext
12246 LIBS=$ac_check_lib_save_LIBS
12247 fi
12248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
12249 $as_echo "$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
12250 if test "x$ac_cv_lib_MesaGL_glXCreateContext" = xyes; then :
12251   gl_lib_1="MesaGL"
12252                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
12253 fi
12254
12255   CPPFLAGS="$ac_save_CPPFLAGS"
12256   LDFLAGS="$ac_save_LDFLAGS"
12257 #  LIBS="$ac_save_LIBS"
12258
12259     fi
12260
12261     if test "$gl_lib_1" = "" ; then
12262
12263   ac_save_CPPFLAGS="$CPPFLAGS"
12264   ac_save_LDFLAGS="$LDFLAGS"
12265 #  ac_save_LIBS="$LIBS"
12266
12267   if test \! -z "$includedir" ; then
12268     CPPFLAGS="$CPPFLAGS -I$includedir"
12269   fi
12270   # note: $X_CFLAGS includes $x_includes
12271   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12272
12273   if test \! -z "$libdir" ; then
12274     LDFLAGS="$LDFLAGS -L$libdir"
12275   fi
12276   # note: $X_LIBS includes $x_libraries
12277   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12278
12279   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12280   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12281   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lGL" >&5
12282 $as_echo_n "checking for glXCreateContext in -lGL... " >&6; }
12283 if ${ac_cv_lib_GL_glXCreateContext+:} false; then :
12284   $as_echo_n "(cached) " >&6
12285 else
12286   ac_check_lib_save_LIBS=$LIBS
12287 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
12288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12289 /* end confdefs.h.  */
12290
12291 /* Override any GCC internal prototype to avoid an error.
12292    Use char because int might match the return type of a GCC
12293    builtin and then its argument prototype would still apply.  */
12294 #ifdef __cplusplus
12295 extern "C"
12296 #endif
12297 char glXCreateContext ();
12298 int
12299 main ()
12300 {
12301 return glXCreateContext ();
12302   ;
12303   return 0;
12304 }
12305 _ACEOF
12306 if ac_fn_c_try_link "$LINENO"; then :
12307   ac_cv_lib_GL_glXCreateContext=yes
12308 else
12309   ac_cv_lib_GL_glXCreateContext=no
12310 fi
12311 rm -f core conftest.err conftest.$ac_objext \
12312     conftest$ac_exeext conftest.$ac_ext
12313 LIBS=$ac_check_lib_save_LIBS
12314 fi
12315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_glXCreateContext" >&5
12316 $as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; }
12317 if test "x$ac_cv_lib_GL_glXCreateContext" = xyes; then :
12318   gl_lib_1="GL"
12319                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
12320 fi
12321
12322   CPPFLAGS="$ac_save_CPPFLAGS"
12323   LDFLAGS="$ac_save_LDFLAGS"
12324 #  LIBS="$ac_save_LIBS"
12325
12326     fi
12327
12328     if test "$gl_lib_1" = "" ; then
12329       # we have headers, but no libs -- bail.
12330       have_gl=no
12331       ac_have_mesa_gl=no
12332       gl_halfassed=yes
12333     else
12334       # linking works -- we can build the GL hacks.
12335       $as_echo "#define HAVE_GL 1" >>confdefs.h
12336
12337       if test "$ac_have_mesa_gl" = yes ; then
12338         $as_echo "#define HAVE_MESA_GL 1" >>confdefs.h
12339
12340       fi
12341     fi
12342   fi
12343
12344
12345   # Now that we know we have GL headers and libs, do some more GL testing.
12346   #
12347
12348   if test "$have_gl" = yes ; then
12349     # If it's MesaGL, we'd like to issue a warning if the version number
12350     # is less than or equal to 2.6, because that version had a security bug.
12351     #
12352     if test "$ac_have_mesa_gl" = yes; then
12353
12354       { $as_echo "$as_me:${as_lineno-$LINENO}: checking MesaGL version number" >&5
12355 $as_echo_n "checking MesaGL version number... " >&6; }
12356 if ${ac_cv_mesagl_version_string+:} false; then :
12357   $as_echo_n "(cached) " >&6
12358 else
12359   cat > conftest.$ac_ext <<EOF
12360 #line 12364 "configure"
12361 #include "confdefs.h"
12362 #include <GL/gl.h>
12363 #ifndef MESA_MAJOR_VERSION
12364 # include <GL/xmesa.h>
12365 # ifdef XMESA_MAJOR_VERSION
12366    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
12367       we have to check the XMesa version number (the number of the X protocol
12368       support, which seems to be the same as the Mesa version number.)
12369     */
12370 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
12371 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
12372 # else
12373    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
12374       so we have no way of telling what version of Mesa this is at all.
12375       So, we'll guess that the osmesa version (the "offscreen protocol")
12376       is less than or equal to the real mesa version number.  Except that
12377       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
12378       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
12379     */
12380 # include <GL/osmesa.h>
12381 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
12382 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
12383 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
12384 #   undef MESA_MINOR_VERSION
12385 #   define MESA_MINOR_VERSION 4 or newer, probably?
12386 #  endif
12387 # endif
12388 #endif
12389 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
12390 EOF
12391
12392          ac_save_CPPFLAGS="$CPPFLAGS"
12393          if test \! -z "$includedir" ; then
12394            CPPFLAGS="$CPPFLAGS -I$includedir"
12395          fi
12396          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12397
12398          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
12399
12400          # M4 sucks!!
12401
12402           mglv=`echo "$mglv" | sed -n \
12403              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
12404
12405
12406          rm -rf conftest.$ac_ext
12407
12408          CPPFLAGS="$ac_save_CPPFLAGS"
12409
12410          if test "$mglv" = ""; then
12411            ac_mesagl_version=unknown
12412            ac_mesagl_version_string=unknown
12413          else
12414            ac_mesagl_version_string="$mglv"
12415            # M4 sucks!!
12416
12417            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
12418            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
12419
12420            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
12421            if test -z "$ac_mesagl_version"; then
12422              ac_mesagl_version=unknown
12423              ac_mesagl_version_string=unknown
12424            fi
12425          fi
12426          ac_cv_mesagl_version=$ac_mesagl_version
12427          ac_cv_mesagl_version_string=$ac_mesagl_version_string
12428
12429 fi
12430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mesagl_version_string" >&5
12431 $as_echo "$ac_cv_mesagl_version_string" >&6; }
12432       ac_mesagl_version=$ac_cv_mesagl_version
12433       ac_mesagl_version_string=$ac_cv_mesagl_version_string
12434     fi
12435
12436
12437     # Check for OpenGL 1.1 features.
12438     #
12439
12440   ac_save_CPPFLAGS="$CPPFLAGS"
12441   ac_save_LDFLAGS="$LDFLAGS"
12442 #  ac_save_LIBS="$LIBS"
12443
12444   if test \! -z "$includedir" ; then
12445     CPPFLAGS="$CPPFLAGS -I$includedir"
12446   fi
12447   # note: $X_CFLAGS includes $x_includes
12448   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12449
12450   if test \! -z "$libdir" ; then
12451     LDFLAGS="$LDFLAGS -L$libdir"
12452   fi
12453   # note: $X_LIBS includes $x_libraries
12454   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12455
12456   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12457   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12458   as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
12459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBindTexture in -l$gl_lib_1" >&5
12460 $as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
12461 if eval \${$as_ac_Lib+:} false; then :
12462   $as_echo_n "(cached) " >&6
12463 else
12464   ac_check_lib_save_LIBS=$LIBS
12465 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
12466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12467 /* end confdefs.h.  */
12468
12469 /* Override any GCC internal prototype to avoid an error.
12470    Use char because int might match the return type of a GCC
12471    builtin and then its argument prototype would still apply.  */
12472 #ifdef __cplusplus
12473 extern "C"
12474 #endif
12475 char glBindTexture ();
12476 int
12477 main ()
12478 {
12479 return glBindTexture ();
12480   ;
12481   return 0;
12482 }
12483 _ACEOF
12484 if ac_fn_c_try_link "$LINENO"; then :
12485   eval "$as_ac_Lib=yes"
12486 else
12487   eval "$as_ac_Lib=no"
12488 fi
12489 rm -f core conftest.err conftest.$ac_objext \
12490     conftest$ac_exeext conftest.$ac_ext
12491 LIBS=$ac_check_lib_save_LIBS
12492 fi
12493 eval ac_res=\$$as_ac_Lib
12494                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12495 $as_echo "$ac_res" >&6; }
12496 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12497   $as_echo "#define HAVE_GLBINDTEXTURE 1" >>confdefs.h
12498
12499 else
12500   true
12501 fi
12502
12503   CPPFLAGS="$ac_save_CPPFLAGS"
12504   LDFLAGS="$ac_save_LDFLAGS"
12505 #  LIBS="$ac_save_LIBS"
12506
12507   fi
12508
12509 elif test "$with_gl" != no; then
12510   echo "error: must be yes or no: --with-gl=$with_gl"
12511   exit 1
12512 fi
12513
12514
12515 ###############################################################################
12516 #
12517 #       Check for -lgle.
12518 #
12519 ###############################################################################
12520
12521 have_gle=no
12522 with_gle_req=unspecified
12523 gle_halfassed=no
12524
12525 # Check whether --with-gle was given.
12526 if test "${with_gle+set}" = set; then :
12527   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
12528 else
12529   with_gle=yes
12530 fi
12531
12532
12533
12534    case "$with_gle" in
12535     yes) ;;
12536     no)  ;;
12537
12538     /*)
12539      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE headers" >&5
12540 $as_echo_n "checking for GLE headers... " >&6; }
12541      d=$with_gle/include
12542      if test -d $d; then
12543        X_CFLAGS="-I$d $X_CFLAGS"
12544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12545 $as_echo "$d" >&6; }
12546      else
12547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12548 $as_echo "not found ($d: no such directory)" >&6; }
12549      fi
12550
12551      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE libs" >&5
12552 $as_echo_n "checking for GLE libs... " >&6; }
12553      d=$with_gle/lib
12554      if test -d $d; then
12555        X_LIBS="-L$d $X_LIBS"
12556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12557 $as_echo "$d" >&6; }
12558      else
12559        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12560 $as_echo "not found ($d: no such directory)" >&6; }
12561      fi
12562
12563      # replace the directory string with "yes".
12564      with_gle_req="yes"
12565      with_gle=$with_gle_req
12566      ;;
12567
12568     *)
12569      echo ""
12570      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
12571      echo "       If it is a directory, then \`DIR/include' will be added to"
12572      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12573      exit 1
12574      ;;
12575    esac
12576
12577
12578 GLE_LIBS=""
12579
12580 if test "$have_gl" = no ; then
12581  true
12582 elif test "$with_gle" = yes; then
12583
12584
12585   ac_save_CPPFLAGS="$CPPFLAGS"
12586   if test \! -z "$includedir" ; then
12587     CPPFLAGS="$CPPFLAGS -I$includedir"
12588   fi
12589   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12590   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12591   ac_fn_c_check_header_compile "$LINENO" "GL/gle.h" "ac_cv_header_GL_gle_h" "#include <GL/gl.h>
12592 "
12593 if test "x$ac_cv_header_GL_gle_h" = xyes; then :
12594   have_gle3=yes
12595 else
12596   have_gle3=no
12597 fi
12598
12599
12600   CPPFLAGS="$ac_save_CPPFLAGS"
12601   if test "$have_gle3" = yes ; then
12602     have_gle=yes;
12603   else
12604
12605   ac_save_CPPFLAGS="$CPPFLAGS"
12606   if test \! -z "$includedir" ; then
12607     CPPFLAGS="$CPPFLAGS -I$includedir"
12608   fi
12609   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12610   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12611   ac_fn_c_check_header_compile "$LINENO" "GL/gutil.h" "ac_cv_header_GL_gutil_h" "#include <GL/gl.h>
12612 "
12613 if test "x$ac_cv_header_GL_gutil_h" = xyes; then :
12614   have_gle=yes
12615 else
12616   have_gle=no
12617 fi
12618
12619
12620   CPPFLAGS="$ac_save_CPPFLAGS"
12621     if test "$have_gle" = yes ; then
12622
12623   ac_save_CPPFLAGS="$CPPFLAGS"
12624   if test \! -z "$includedir" ; then
12625     CPPFLAGS="$CPPFLAGS -I$includedir"
12626   fi
12627   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12628   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12629   ac_fn_c_check_header_compile "$LINENO" "GL/tube.h" "ac_cv_header_GL_tube_h" "#include <GL/gl.h>
12630 "
12631 if test "x$ac_cv_header_GL_tube_h" = xyes; then :
12632   have_gle=yes
12633 else
12634   have_gle=no
12635 fi
12636
12637
12638   CPPFLAGS="$ac_save_CPPFLAGS"
12639     fi
12640   fi
12641
12642   if test "$have_gle" = yes ; then
12643     have_gle=no
12644     gle_halfassed=yes
12645
12646   ac_save_CPPFLAGS="$CPPFLAGS"
12647   ac_save_LDFLAGS="$LDFLAGS"
12648 #  ac_save_LIBS="$LIBS"
12649
12650   if test \! -z "$includedir" ; then
12651     CPPFLAGS="$CPPFLAGS -I$includedir"
12652   fi
12653   # note: $X_CFLAGS includes $x_includes
12654   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12655
12656   if test \! -z "$libdir" ; then
12657     LDFLAGS="$LDFLAGS -L$libdir"
12658   fi
12659   # note: $X_LIBS includes $x_libraries
12660   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12661
12662   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12663   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gleCreateGC in -lgle" >&5
12665 $as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
12666 if ${ac_cv_lib_gle_gleCreateGC+:} false; then :
12667   $as_echo_n "(cached) " >&6
12668 else
12669   ac_check_lib_save_LIBS=$LIBS
12670 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
12671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12672 /* end confdefs.h.  */
12673
12674 /* Override any GCC internal prototype to avoid an error.
12675    Use char because int might match the return type of a GCC
12676    builtin and then its argument prototype would still apply.  */
12677 #ifdef __cplusplus
12678 extern "C"
12679 #endif
12680 char gleCreateGC ();
12681 int
12682 main ()
12683 {
12684 return gleCreateGC ();
12685   ;
12686   return 0;
12687 }
12688 _ACEOF
12689 if ac_fn_c_try_link "$LINENO"; then :
12690   ac_cv_lib_gle_gleCreateGC=yes
12691 else
12692   ac_cv_lib_gle_gleCreateGC=no
12693 fi
12694 rm -f core conftest.err conftest.$ac_objext \
12695     conftest$ac_exeext conftest.$ac_ext
12696 LIBS=$ac_check_lib_save_LIBS
12697 fi
12698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_gleCreateGC" >&5
12699 $as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
12700 if test "x$ac_cv_lib_gle_gleCreateGC" = xyes; then :
12701   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
12702 fi
12703
12704   CPPFLAGS="$ac_save_CPPFLAGS"
12705   LDFLAGS="$ac_save_LDFLAGS"
12706 #  LIBS="$ac_save_LIBS"
12707
12708   fi
12709   if test "$have_gle" = yes ; then
12710     have_gle=no
12711     gle_halfassed=yes
12712
12713     # sometimes the libmatrix stuff is included in libgle.  look there first.
12714 #
12715 # I don't get it.  For some reason, this test passes on SGI, as if
12716 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
12717 # Yet the link is succeeding.  Why???
12718 #
12719 #    AC_CHECK_X_LIB(gle, uview_direction_d,
12720 #                   [have_gle=yes; gle_halfassed=no],
12721 #                   [], $GL_LIBS -lX11 -lXext -lm)
12722
12723     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
12724     # *sigh*
12725     if test "$have_gle3" = yes ; then
12726
12727   ac_save_CPPFLAGS="$CPPFLAGS"
12728   ac_save_LDFLAGS="$LDFLAGS"
12729 #  ac_save_LIBS="$LIBS"
12730
12731   if test \! -z "$includedir" ; then
12732     CPPFLAGS="$CPPFLAGS -I$includedir"
12733   fi
12734   # note: $X_CFLAGS includes $x_includes
12735   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12736
12737   if test \! -z "$libdir" ; then
12738     LDFLAGS="$LDFLAGS -L$libdir"
12739   fi
12740   # note: $X_LIBS includes $x_libraries
12741   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12742
12743   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12744   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12745   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction in -lgle" >&5
12746 $as_echo_n "checking for uview_direction in -lgle... " >&6; }
12747 if ${ac_cv_lib_gle_uview_direction+:} false; then :
12748   $as_echo_n "(cached) " >&6
12749 else
12750   ac_check_lib_save_LIBS=$LIBS
12751 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
12752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12753 /* end confdefs.h.  */
12754
12755 /* Override any GCC internal prototype to avoid an error.
12756    Use char because int might match the return type of a GCC
12757    builtin and then its argument prototype would still apply.  */
12758 #ifdef __cplusplus
12759 extern "C"
12760 #endif
12761 char uview_direction ();
12762 int
12763 main ()
12764 {
12765 return uview_direction ();
12766   ;
12767   return 0;
12768 }
12769 _ACEOF
12770 if ac_fn_c_try_link "$LINENO"; then :
12771   ac_cv_lib_gle_uview_direction=yes
12772 else
12773   ac_cv_lib_gle_uview_direction=no
12774 fi
12775 rm -f core conftest.err conftest.$ac_objext \
12776     conftest$ac_exeext conftest.$ac_ext
12777 LIBS=$ac_check_lib_save_LIBS
12778 fi
12779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_uview_direction" >&5
12780 $as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
12781 if test "x$ac_cv_lib_gle_uview_direction" = xyes; then :
12782   have_gle=yes; gle_halfassed=no
12783 fi
12784
12785   CPPFLAGS="$ac_save_CPPFLAGS"
12786   LDFLAGS="$ac_save_LDFLAGS"
12787 #  LIBS="$ac_save_LIBS"
12788
12789     fi
12790     # if it wasn't in libgle, then look in libmatrix.
12791     if test "$have_gle" = no ; then
12792
12793   ac_save_CPPFLAGS="$CPPFLAGS"
12794   ac_save_LDFLAGS="$LDFLAGS"
12795 #  ac_save_LIBS="$LIBS"
12796
12797   if test \! -z "$includedir" ; then
12798     CPPFLAGS="$CPPFLAGS -I$includedir"
12799   fi
12800   # note: $X_CFLAGS includes $x_includes
12801   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12802
12803   if test \! -z "$libdir" ; then
12804     LDFLAGS="$LDFLAGS -L$libdir"
12805   fi
12806   # note: $X_LIBS includes $x_libraries
12807   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12808
12809   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12810   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12811   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction_d in -lmatrix" >&5
12812 $as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
12813 if ${ac_cv_lib_matrix_uview_direction_d+:} false; then :
12814   $as_echo_n "(cached) " >&6
12815 else
12816   ac_check_lib_save_LIBS=$LIBS
12817 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
12818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12819 /* end confdefs.h.  */
12820
12821 /* Override any GCC internal prototype to avoid an error.
12822    Use char because int might match the return type of a GCC
12823    builtin and then its argument prototype would still apply.  */
12824 #ifdef __cplusplus
12825 extern "C"
12826 #endif
12827 char uview_direction_d ();
12828 int
12829 main ()
12830 {
12831 return uview_direction_d ();
12832   ;
12833   return 0;
12834 }
12835 _ACEOF
12836 if ac_fn_c_try_link "$LINENO"; then :
12837   ac_cv_lib_matrix_uview_direction_d=yes
12838 else
12839   ac_cv_lib_matrix_uview_direction_d=no
12840 fi
12841 rm -f core conftest.err conftest.$ac_objext \
12842     conftest$ac_exeext conftest.$ac_ext
12843 LIBS=$ac_check_lib_save_LIBS
12844 fi
12845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_matrix_uview_direction_d" >&5
12846 $as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
12847 if test "x$ac_cv_lib_matrix_uview_direction_d" = xyes; then :
12848   have_gle=yes; gle_halfassed=no;
12849                       GLE_LIBS="$GLE_LIBS -lmatrix"
12850 fi
12851
12852   CPPFLAGS="$ac_save_CPPFLAGS"
12853   LDFLAGS="$ac_save_LDFLAGS"
12854 #  LIBS="$ac_save_LIBS"
12855
12856     fi
12857   fi
12858
12859   if test "$have_gle" = yes ; then
12860     $as_echo "#define HAVE_GLE 1" >>confdefs.h
12861
12862     if test "$have_gle3" = yes ; then
12863       $as_echo "#define HAVE_GLE3 1" >>confdefs.h
12864
12865     fi
12866   fi
12867
12868 elif test "$with_gle" != no; then
12869   echo "error: must be yes or no: --with-gle=$with_gle"
12870   exit 1
12871
12872 fi
12873
12874
12875 ###############################################################################
12876 #
12877 #       Handle --with-gles
12878 #
12879 ###############################################################################
12880
12881 with_gles_req=unspecified
12882
12883 # Check whether --with-gles was given.
12884 if test "${with_gles+set}" = set; then :
12885   withval=$with_gles; with_gles="$withval"; with_gles_req="$withval"
12886 else
12887   with_gles=no
12888 fi
12889
12890
12891
12892    case "$with_gles" in
12893     yes) ;;
12894     no)  ;;
12895
12896     /*)
12897      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES headers" >&5
12898 $as_echo_n "checking for JWZGLES headers... " >&6; }
12899      d=$with_gles/include
12900      if test -d $d; then
12901        X_CFLAGS="-I$d $X_CFLAGS"
12902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12903 $as_echo "$d" >&6; }
12904      else
12905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12906 $as_echo "not found ($d: no such directory)" >&6; }
12907      fi
12908
12909      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES libs" >&5
12910 $as_echo_n "checking for JWZGLES libs... " >&6; }
12911      d=$with_gles/lib
12912      if test -d $d; then
12913        X_LIBS="-L$d $X_LIBS"
12914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12915 $as_echo "$d" >&6; }
12916      else
12917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12918 $as_echo "not found ($d: no such directory)" >&6; }
12919      fi
12920
12921      # replace the directory string with "yes".
12922      with_gles_req="yes"
12923      with_gles=$with_gles_req
12924      ;;
12925
12926     *)
12927      echo ""
12928      echo "error: argument to --with-gles must be \"yes\", \"no\", or a directory."
12929      echo "       If it is a directory, then \`DIR/include' will be added to"
12930      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12931      exit 1
12932      ;;
12933    esac
12934
12935
12936 if test "$with_gles" = yes; then
12937   have_gles=yes
12938   $as_echo "#define HAVE_JWZGLES 1" >>confdefs.h
12939
12940   JWZGLES_OBJS="jwzgles.o"
12941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OpenGL ES compatiblity shim" >&5
12942 $as_echo "using OpenGL ES compatiblity shim" >&6; }
12943 elif test "$with_gles" != no; then
12944   echo "error: must be yes or no: --with-gles=$with_xpm"
12945   exit 1
12946 fi
12947
12948 # May want to phase out glBitmap even in a non-GLES world.
12949 #
12950 if test "$have_gles" = yes; then
12951   GLFPS_OBJS="fps-gl.o glxfonts.o texfont.o"
12952   GLFONT_OBJS=""
12953 else
12954   $as_echo "#define HAVE_GLBITMAP 1" >>confdefs.h
12955
12956   GLFPS_OBJS="fps-gl.o glxfonts.o"
12957   GLFONT_OBJS="texfont.o"
12958 fi
12959
12960
12961 ###############################################################################
12962 #
12963 #       Check for -lgdk_pixbuf.
12964 #       These tests are for gdk_pixbuf usage of the hacks,
12965 #       not xscreensaver-demo (thus we have to test again to get
12966 #       the libraries right: don't want to pull in all of GTK
12967 #       for the hacks.)
12968 #
12969 ###############################################################################
12970
12971 have_gdk_pixbuf=no
12972 with_gdk_pixbuf_req=unspecified
12973
12974 # Check whether --with-pixbuf was given.
12975 if test "${with_pixbuf+set}" = set; then :
12976   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
12977 else
12978   with_gdk_pixbuf=yes
12979 fi
12980
12981
12982 # if --with-pixbuf=/directory/ was specified, remember that directory so that
12983 # we can also look for the `gdk-pixbuf-config' program in that directory.
12984 case "$with_gdk_pixbuf" in
12985   /*)
12986     gdk_pixbuf_dir="$with_gdk_pixbuf"
12987     ;;
12988   *)
12989     gdk_pixbuf_dir=""
12990     ;;
12991 esac
12992
12993
12994    case "$with_gdk_pixbuf" in
12995     yes) ;;
12996     no)  ;;
12997
12998     /*)
12999      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF headers" >&5
13000 $as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
13001      d=$with_gdk_pixbuf/include
13002      if test -d $d; then
13003        X_CFLAGS="-I$d $X_CFLAGS"
13004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13005 $as_echo "$d" >&6; }
13006      else
13007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13008 $as_echo "not found ($d: no such directory)" >&6; }
13009      fi
13010
13011      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF libs" >&5
13012 $as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
13013      d=$with_gdk_pixbuf/lib
13014      if test -d $d; then
13015        X_LIBS="-L$d $X_LIBS"
13016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13017 $as_echo "$d" >&6; }
13018      else
13019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13020 $as_echo "not found ($d: no such directory)" >&6; }
13021      fi
13022
13023      # replace the directory string with "yes".
13024      with_gdk_pixbuf_req="yes"
13025      with_gdk_pixbuf=$with_gdk_pixbuf_req
13026      ;;
13027
13028     *)
13029      echo ""
13030      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
13031      echo "       If it is a directory, then \`DIR/include' will be added to"
13032      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13033      exit 1
13034      ;;
13035    esac
13036
13037
13038 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
13039   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
13040   exit 1
13041 fi
13042
13043 if test "$with_gdk_pixbuf" = yes; then
13044   have_gdk_pixbuf=no
13045
13046   pkgs=''
13047   ok="yes"
13048
13049   pkg_check_version gdk-pixbuf-2.0      2.0.0
13050   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
13051   have_gdk_pixbuf="$ok"
13052
13053   if test "$have_gdk_pixbuf" = yes; then
13054     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf includes" >&5
13055 $as_echo_n "checking for gdk-pixbuf includes... " >&6; }
13056 if ${ac_cv_gdk_pixbuf_config_cflags+:} false; then :
13057   $as_echo_n "(cached) " >&6
13058 else
13059   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
13060 fi
13061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
13062 $as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
13063     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf libs" >&5
13064 $as_echo_n "checking for gdk-pixbuf libs... " >&6; }
13065 if ${ac_cv_gdk_pixbuf_config_libs+:} false; then :
13066   $as_echo_n "(cached) " >&6
13067 else
13068   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
13069 fi
13070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_libs" >&5
13071 $as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
13072   fi
13073
13074   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
13075   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
13076
13077
13078   if test "$have_gdk_pixbuf" = yes; then
13079     #
13080     # we appear to have pixbuf; check for headers/libs to be sure.
13081     #
13082     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
13083     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
13084
13085     have_gdk_pixbuf=no
13086
13087     # check for header A...
13088
13089   ac_save_CPPFLAGS="$CPPFLAGS"
13090   if test \! -z "$includedir" ; then
13091     CPPFLAGS="$CPPFLAGS -I$includedir"
13092   fi
13093   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13094   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13095   ac_fn_c_check_header_mongrel "$LINENO" "gdk-pixbuf/gdk-pixbuf.h" "ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" "$ac_includes_default"
13096 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = xyes; then :
13097   have_gdk_pixbuf=yes
13098 fi
13099
13100
13101   CPPFLAGS="$ac_save_CPPFLAGS"
13102
13103     # if that worked, check for header B...
13104     if test "$have_gdk_pixbuf" = yes; then
13105       have_gdk_pixbuf=no
13106       gdk_pixbuf_halfassed=yes
13107
13108   ac_save_CPPFLAGS="$CPPFLAGS"
13109   if test \! -z "$includedir" ; then
13110     CPPFLAGS="$CPPFLAGS -I$includedir"
13111   fi
13112   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13113   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13114   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"
13115 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = xyes; then :
13116   have_gdk_pixbuf=yes
13117                          gdk_pixbuf_halfassed=no
13118 fi
13119
13120
13121   CPPFLAGS="$ac_save_CPPFLAGS"
13122
13123       # yay, it has a new name in Gtk 2.x...
13124       if test "$have_gdk_pixbuf" = no; then
13125         have_gdk_pixbuf=no
13126         gdk_pixbuf_halfassed=yes
13127
13128   ac_save_CPPFLAGS="$CPPFLAGS"
13129   if test \! -z "$includedir" ; then
13130     CPPFLAGS="$CPPFLAGS -I$includedir"
13131   fi
13132   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13133   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13134   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"
13135 if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = xyes; then :
13136   have_gdk_pixbuf=yes
13137                            gdk_pixbuf_halfassed=no
13138 fi
13139
13140
13141   CPPFLAGS="$ac_save_CPPFLAGS"
13142       fi
13143     fi
13144     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
13145   fi
13146
13147   if test "$have_gdk_pixbuf" = yes; then
13148     # we have the headers, now check for the libraries
13149     have_gdk_pixbuf=no
13150     gdk_pixbuf_halfassed=yes
13151
13152     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability..." >&5
13153 $as_echo "checking for gdk_pixbuf usability..." >&6; }
13154
13155     # library A...
13156
13157   ac_save_CPPFLAGS="$CPPFLAGS"
13158   ac_save_LDFLAGS="$LDFLAGS"
13159 #  ac_save_LIBS="$LIBS"
13160
13161   if test \! -z "$includedir" ; then
13162     CPPFLAGS="$CPPFLAGS -I$includedir"
13163   fi
13164   # note: $X_CFLAGS includes $x_includes
13165   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13166
13167   if test \! -z "$libdir" ; then
13168     LDFLAGS="$LDFLAGS -L$libdir"
13169   fi
13170   # note: $X_LIBS includes $x_libraries
13171   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13172
13173   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13174   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13175   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_new_from_file in -lc" >&5
13176 $as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
13177 if ${ac_cv_lib_c_gdk_pixbuf_new_from_file+:} false; then :
13178   $as_echo_n "(cached) " >&6
13179 else
13180   ac_check_lib_save_LIBS=$LIBS
13181 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
13182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13183 /* end confdefs.h.  */
13184
13185 /* Override any GCC internal prototype to avoid an error.
13186    Use char because int might match the return type of a GCC
13187    builtin and then its argument prototype would still apply.  */
13188 #ifdef __cplusplus
13189 extern "C"
13190 #endif
13191 char gdk_pixbuf_new_from_file ();
13192 int
13193 main ()
13194 {
13195 return gdk_pixbuf_new_from_file ();
13196   ;
13197   return 0;
13198 }
13199 _ACEOF
13200 if ac_fn_c_try_link "$LINENO"; then :
13201   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
13202 else
13203   ac_cv_lib_c_gdk_pixbuf_new_from_file=no
13204 fi
13205 rm -f core conftest.err conftest.$ac_objext \
13206     conftest$ac_exeext conftest.$ac_ext
13207 LIBS=$ac_check_lib_save_LIBS
13208 fi
13209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
13210 $as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
13211 if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = xyes; then :
13212   have_gdk_pixbuf=yes
13213 fi
13214
13215   CPPFLAGS="$ac_save_CPPFLAGS"
13216   LDFLAGS="$ac_save_LDFLAGS"
13217 #  LIBS="$ac_save_LIBS"
13218
13219     # library B...
13220     if test "$have_gdk_pixbuf" = yes; then
13221       have_gdk_pixbuf=no
13222
13223   ac_save_CPPFLAGS="$CPPFLAGS"
13224   ac_save_LDFLAGS="$LDFLAGS"
13225 #  ac_save_LIBS="$LIBS"
13226
13227   if test \! -z "$includedir" ; then
13228     CPPFLAGS="$CPPFLAGS -I$includedir"
13229   fi
13230   # note: $X_CFLAGS includes $x_includes
13231   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13232
13233   if test \! -z "$libdir" ; then
13234     LDFLAGS="$LDFLAGS -L$libdir"
13235   fi
13236   # note: $X_LIBS includes $x_libraries
13237   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13238
13239   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13240   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13241   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_xlib_init in -lc" >&5
13242 $as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
13243 if ${ac_cv_lib_c_gdk_pixbuf_xlib_init+:} false; then :
13244   $as_echo_n "(cached) " >&6
13245 else
13246   ac_check_lib_save_LIBS=$LIBS
13247 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
13248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13249 /* end confdefs.h.  */
13250
13251 /* Override any GCC internal prototype to avoid an error.
13252    Use char because int might match the return type of a GCC
13253    builtin and then its argument prototype would still apply.  */
13254 #ifdef __cplusplus
13255 extern "C"
13256 #endif
13257 char gdk_pixbuf_xlib_init ();
13258 int
13259 main ()
13260 {
13261 return gdk_pixbuf_xlib_init ();
13262   ;
13263   return 0;
13264 }
13265 _ACEOF
13266 if ac_fn_c_try_link "$LINENO"; then :
13267   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
13268 else
13269   ac_cv_lib_c_gdk_pixbuf_xlib_init=no
13270 fi
13271 rm -f core conftest.err conftest.$ac_objext \
13272     conftest$ac_exeext conftest.$ac_ext
13273 LIBS=$ac_check_lib_save_LIBS
13274 fi
13275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
13276 $as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
13277 if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = xyes; then :
13278   have_gdk_pixbuf=yes
13279                       gdk_pixbuf_halfassed=no
13280 fi
13281
13282   CPPFLAGS="$ac_save_CPPFLAGS"
13283   LDFLAGS="$ac_save_LDFLAGS"
13284 #  LIBS="$ac_save_LIBS"
13285
13286     fi
13287   fi
13288
13289   if test "$have_gdk_pixbuf" = yes; then
13290     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
13291     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
13292     $as_echo "#define HAVE_GDK_PIXBUF 1" >>confdefs.h
13293
13294   else
13295     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability... no" >&5
13296 $as_echo "checking for gdk_pixbuf usability... no" >&6; }
13297   fi
13298
13299   if test "$have_gdk_pixbuf" = yes; then
13300
13301   ac_save_CPPFLAGS="$CPPFLAGS"
13302   ac_save_LDFLAGS="$LDFLAGS"
13303 #  ac_save_LIBS="$LIBS"
13304
13305   if test \! -z "$includedir" ; then
13306     CPPFLAGS="$CPPFLAGS -I$includedir"
13307   fi
13308   # note: $X_CFLAGS includes $x_includes
13309   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13310
13311   if test \! -z "$libdir" ; then
13312     LDFLAGS="$LDFLAGS -L$libdir"
13313   fi
13314   # note: $X_LIBS includes $x_libraries
13315   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13316
13317   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13318   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13319   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
13320 $as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
13321 if ${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+:} false; then :
13322   $as_echo_n "(cached) " >&6
13323 else
13324   ac_check_lib_save_LIBS=$LIBS
13325 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
13326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13327 /* end confdefs.h.  */
13328
13329 /* Override any GCC internal prototype to avoid an error.
13330    Use char because int might match the return type of a GCC
13331    builtin and then its argument prototype would still apply.  */
13332 #ifdef __cplusplus
13333 extern "C"
13334 #endif
13335 char gdk_pixbuf_apply_embedded_orientation ();
13336 int
13337 main ()
13338 {
13339 return gdk_pixbuf_apply_embedded_orientation ();
13340   ;
13341   return 0;
13342 }
13343 _ACEOF
13344 if ac_fn_c_try_link "$LINENO"; then :
13345   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
13346 else
13347   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
13348 fi
13349 rm -f core conftest.err conftest.$ac_objext \
13350     conftest$ac_exeext conftest.$ac_ext
13351 LIBS=$ac_check_lib_save_LIBS
13352 fi
13353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
13354 $as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
13355 if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = xyes; then :
13356   $as_echo "#define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1" >>confdefs.h
13357
13358 fi
13359
13360   CPPFLAGS="$ac_save_CPPFLAGS"
13361   LDFLAGS="$ac_save_LDFLAGS"
13362 #  LIBS="$ac_save_LIBS"
13363
13364   fi
13365 fi
13366
13367
13368 ###############################################################################
13369 #
13370 #       Check for -lXpm.
13371 #
13372 ###############################################################################
13373
13374 have_xpm=no
13375 with_xpm_req=unspecified
13376
13377 # Check whether --with-xpm was given.
13378 if test "${with_xpm+set}" = set; then :
13379   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
13380 else
13381   with_xpm=yes
13382 fi
13383
13384
13385
13386    case "$with_xpm" in
13387     yes) ;;
13388     no)  ;;
13389
13390     /*)
13391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM headers" >&5
13392 $as_echo_n "checking for XPM headers... " >&6; }
13393      d=$with_xpm/include
13394      if test -d $d; then
13395        X_CFLAGS="-I$d $X_CFLAGS"
13396        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13397 $as_echo "$d" >&6; }
13398      else
13399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13400 $as_echo "not found ($d: no such directory)" >&6; }
13401      fi
13402
13403      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM libs" >&5
13404 $as_echo_n "checking for XPM libs... " >&6; }
13405      d=$with_xpm/lib
13406      if test -d $d; then
13407        X_LIBS="-L$d $X_LIBS"
13408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13409 $as_echo "$d" >&6; }
13410      else
13411        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13412 $as_echo "not found ($d: no such directory)" >&6; }
13413      fi
13414
13415      # replace the directory string with "yes".
13416      with_xpm_req="yes"
13417      with_xpm=$with_xpm_req
13418      ;;
13419
13420     *)
13421      echo ""
13422      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
13423      echo "       If it is a directory, then \`DIR/include' will be added to"
13424      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13425      exit 1
13426      ;;
13427    esac
13428
13429
13430 if test "$with_xpm" = yes; then
13431
13432   ac_save_CPPFLAGS="$CPPFLAGS"
13433   if test \! -z "$includedir" ; then
13434     CPPFLAGS="$CPPFLAGS -I$includedir"
13435   fi
13436   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13437   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13438   ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "#include <X11/Xlib.h>
13439 "
13440 if test "x$ac_cv_header_X11_xpm_h" = xyes; then :
13441   have_xpm=yes
13442                     $as_echo "#define HAVE_XPM 1" >>confdefs.h
13443
13444                     XPM_LIBS="-lXpm $XPM_LIBS"
13445 fi
13446
13447
13448   CPPFLAGS="$ac_save_CPPFLAGS"
13449 elif test "$with_xpm" != no; then
13450   echo "error: must be yes or no: --with-xpm=$with_xpm"
13451   exit 1
13452 fi
13453
13454 # See comment near $motif_requires_xpm, above.
13455 # Need to do this here, after both Motif and XPM have been checked for.
13456 #
13457 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
13458   if test "$motif_requires_xpm" = yes ; then
13459     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
13460   fi
13461 fi
13462
13463 if test "$XPM_LIBS" = "" ; then
13464   XPM_LIBS=$(MINIXPM)
13465 fi
13466
13467
13468 ###############################################################################
13469 #
13470 #       Check for -ljpeg
13471 #
13472 ###############################################################################
13473
13474 have_jpeg=no
13475 with_jpeg_req=unspecified
13476 jpeg_halfassed=no
13477
13478 # Check whether --with-jpeg was given.
13479 if test "${with_jpeg+set}" = set; then :
13480   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
13481 else
13482   with_jpeg=yes
13483 fi
13484
13485
13486
13487    case "$with_jpeg" in
13488     yes) ;;
13489     no)  ;;
13490
13491     /*)
13492      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG headers" >&5
13493 $as_echo_n "checking for JPEG headers... " >&6; }
13494      d=$with_jpeg/include
13495      if test -d $d; then
13496        X_CFLAGS="-I$d $X_CFLAGS"
13497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13498 $as_echo "$d" >&6; }
13499      else
13500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13501 $as_echo "not found ($d: no such directory)" >&6; }
13502      fi
13503
13504      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG libs" >&5
13505 $as_echo_n "checking for JPEG libs... " >&6; }
13506      d=$with_jpeg/lib
13507      if test -d $d; then
13508        X_LIBS="-L$d $X_LIBS"
13509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13510 $as_echo "$d" >&6; }
13511      else
13512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13513 $as_echo "not found ($d: no such directory)" >&6; }
13514      fi
13515
13516      # replace the directory string with "yes".
13517      with_jpeg_req="yes"
13518      with_jpeg=$with_jpeg_req
13519      ;;
13520
13521     *)
13522      echo ""
13523      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
13524      echo "       If it is a directory, then \`DIR/include' will be added to"
13525      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13526      exit 1
13527      ;;
13528    esac
13529
13530
13531 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
13532   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
13533   exit 1
13534 fi
13535
13536 if test "$with_jpeg" = yes; then
13537
13538   have_jpeg=no
13539
13540   ac_save_CPPFLAGS="$CPPFLAGS"
13541   if test \! -z "$includedir" ; then
13542     CPPFLAGS="$CPPFLAGS -I$includedir"
13543   fi
13544   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13545   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13546   ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
13547 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
13548   have_jpeg=yes
13549 fi
13550
13551
13552   CPPFLAGS="$ac_save_CPPFLAGS"
13553
13554   if test "$have_jpeg" = yes; then
13555     # we have the header, now check for the library
13556     have_jpeg=no
13557     jpeg_halfassed=yes
13558
13559   ac_save_CPPFLAGS="$CPPFLAGS"
13560   ac_save_LDFLAGS="$LDFLAGS"
13561 #  ac_save_LIBS="$LIBS"
13562
13563   if test \! -z "$includedir" ; then
13564     CPPFLAGS="$CPPFLAGS -I$includedir"
13565   fi
13566   # note: $X_CFLAGS includes $x_includes
13567   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13568
13569   if test \! -z "$libdir" ; then
13570     LDFLAGS="$LDFLAGS -L$libdir"
13571   fi
13572   # note: $X_LIBS includes $x_libraries
13573   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13574
13575   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13576   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13577   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_start_compress in -ljpeg" >&5
13578 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
13579 if ${ac_cv_lib_jpeg_jpeg_start_compress+:} false; then :
13580   $as_echo_n "(cached) " >&6
13581 else
13582   ac_check_lib_save_LIBS=$LIBS
13583 LIBS="-ljpeg  $LIBS"
13584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13585 /* end confdefs.h.  */
13586
13587 /* Override any GCC internal prototype to avoid an error.
13588    Use char because int might match the return type of a GCC
13589    builtin and then its argument prototype would still apply.  */
13590 #ifdef __cplusplus
13591 extern "C"
13592 #endif
13593 char jpeg_start_compress ();
13594 int
13595 main ()
13596 {
13597 return jpeg_start_compress ();
13598   ;
13599   return 0;
13600 }
13601 _ACEOF
13602 if ac_fn_c_try_link "$LINENO"; then :
13603   ac_cv_lib_jpeg_jpeg_start_compress=yes
13604 else
13605   ac_cv_lib_jpeg_jpeg_start_compress=no
13606 fi
13607 rm -f core conftest.err conftest.$ac_objext \
13608     conftest$ac_exeext conftest.$ac_ext
13609 LIBS=$ac_check_lib_save_LIBS
13610 fi
13611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
13612 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
13613 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = xyes; then :
13614   have_jpeg=yes
13615                     jpeg_halfassed=no
13616                     JPEG_LIBS="-ljpeg"
13617                     $as_echo "#define HAVE_JPEGLIB 1" >>confdefs.h
13618
13619 fi
13620
13621   CPPFLAGS="$ac_save_CPPFLAGS"
13622   LDFLAGS="$ac_save_LDFLAGS"
13623 #  LIBS="$ac_save_LIBS"
13624
13625   fi
13626 fi
13627
13628
13629 ###############################################################################
13630 #
13631 #       Check for pty support: this allows 'phosphor' and 'apple2'
13632 #       to run curses-based programs, or be used as terminal windows.
13633 #
13634 ###############################################################################
13635
13636 PTY_LIBS=
13637 for ac_header in pty.h util.h
13638 do :
13639   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13640 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13641 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13642   cat >>confdefs.h <<_ACEOF
13643 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13644 _ACEOF
13645
13646 fi
13647
13648 done
13649
13650
13651   ac_save_CPPFLAGS="$CPPFLAGS"
13652   ac_save_LDFLAGS="$LDFLAGS"
13653 #  ac_save_LIBS="$LIBS"
13654
13655   if test \! -z "$includedir" ; then
13656     CPPFLAGS="$CPPFLAGS -I$includedir"
13657   fi
13658   # note: $X_CFLAGS includes $x_includes
13659   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13660
13661   if test \! -z "$libdir" ; then
13662     LDFLAGS="$LDFLAGS -L$libdir"
13663   fi
13664   # note: $X_LIBS includes $x_libraries
13665   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13666
13667   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13668   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13669   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
13670 $as_echo_n "checking for forkpty in -lutil... " >&6; }
13671 if ${ac_cv_lib_util_forkpty+:} false; then :
13672   $as_echo_n "(cached) " >&6
13673 else
13674   ac_check_lib_save_LIBS=$LIBS
13675 LIBS="-lutil  $LIBS"
13676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13677 /* end confdefs.h.  */
13678
13679 /* Override any GCC internal prototype to avoid an error.
13680    Use char because int might match the return type of a GCC
13681    builtin and then its argument prototype would still apply.  */
13682 #ifdef __cplusplus
13683 extern "C"
13684 #endif
13685 char forkpty ();
13686 int
13687 main ()
13688 {
13689 return forkpty ();
13690   ;
13691   return 0;
13692 }
13693 _ACEOF
13694 if ac_fn_c_try_link "$LINENO"; then :
13695   ac_cv_lib_util_forkpty=yes
13696 else
13697   ac_cv_lib_util_forkpty=no
13698 fi
13699 rm -f core conftest.err conftest.$ac_objext \
13700     conftest$ac_exeext conftest.$ac_ext
13701 LIBS=$ac_check_lib_save_LIBS
13702 fi
13703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
13704 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
13705 if test "x$ac_cv_lib_util_forkpty" = xyes; then :
13706   PTY_LIBS="-lutil"
13707                 ac_have_forkpty=yes
13708                 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
13709
13710 fi
13711
13712   CPPFLAGS="$ac_save_CPPFLAGS"
13713   LDFLAGS="$ac_save_LDFLAGS"
13714 #  LIBS="$ac_save_LIBS"
13715
13716
13717 if test "$ac_have_forkpty" != yes ; then
13718   # we don't need (or have) -lutil on MacOS 10.4.2...
13719
13720   ac_save_CPPFLAGS="$CPPFLAGS"
13721   ac_save_LDFLAGS="$LDFLAGS"
13722 #  ac_save_LIBS="$LIBS"
13723
13724   if test \! -z "$includedir" ; then
13725     CPPFLAGS="$CPPFLAGS -I$includedir"
13726   fi
13727   # note: $X_CFLAGS includes $x_includes
13728   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13729
13730   if test \! -z "$libdir" ; then
13731     LDFLAGS="$LDFLAGS -L$libdir"
13732   fi
13733   # note: $X_LIBS includes $x_libraries
13734   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13735
13736   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13737   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lc" >&5
13739 $as_echo_n "checking for forkpty in -lc... " >&6; }
13740 if ${ac_cv_lib_c_forkpty+:} false; then :
13741   $as_echo_n "(cached) " >&6
13742 else
13743   ac_check_lib_save_LIBS=$LIBS
13744 LIBS="-lc  $LIBS"
13745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13746 /* end confdefs.h.  */
13747
13748 /* Override any GCC internal prototype to avoid an error.
13749    Use char because int might match the return type of a GCC
13750    builtin and then its argument prototype would still apply.  */
13751 #ifdef __cplusplus
13752 extern "C"
13753 #endif
13754 char forkpty ();
13755 int
13756 main ()
13757 {
13758 return forkpty ();
13759   ;
13760   return 0;
13761 }
13762 _ACEOF
13763 if ac_fn_c_try_link "$LINENO"; then :
13764   ac_cv_lib_c_forkpty=yes
13765 else
13766   ac_cv_lib_c_forkpty=no
13767 fi
13768 rm -f core conftest.err conftest.$ac_objext \
13769     conftest$ac_exeext conftest.$ac_ext
13770 LIBS=$ac_check_lib_save_LIBS
13771 fi
13772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_forkpty" >&5
13773 $as_echo "$ac_cv_lib_c_forkpty" >&6; }
13774 if test "x$ac_cv_lib_c_forkpty" = xyes; then :
13775   PTY_LIBS=""
13776                   $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
13777
13778 fi
13779
13780   CPPFLAGS="$ac_save_CPPFLAGS"
13781   LDFLAGS="$ac_save_LDFLAGS"
13782 #  LIBS="$ac_save_LIBS"
13783
13784 fi
13785
13786 ###############################################################################
13787 #
13788 #       Check for the XSHM server extension.
13789 #
13790 ###############################################################################
13791
13792 have_xshm=no
13793 with_xshm_req=unspecified
13794
13795 # Check whether --with-xshm-ext was given.
13796 if test "${with_xshm_ext+set}" = set; then :
13797   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
13798 else
13799   with_xshm=yes
13800 fi
13801
13802
13803
13804    case "$with_xshm" in
13805     yes) ;;
13806     no)  ;;
13807
13808     /*)
13809      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM headers" >&5
13810 $as_echo_n "checking for XSHM headers... " >&6; }
13811      d=$with_xshm/include
13812      if test -d $d; then
13813        X_CFLAGS="-I$d $X_CFLAGS"
13814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13815 $as_echo "$d" >&6; }
13816      else
13817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13818 $as_echo "not found ($d: no such directory)" >&6; }
13819      fi
13820
13821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM libs" >&5
13822 $as_echo_n "checking for XSHM libs... " >&6; }
13823      d=$with_xshm/lib
13824      if test -d $d; then
13825        X_LIBS="-L$d $X_LIBS"
13826        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13827 $as_echo "$d" >&6; }
13828      else
13829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13830 $as_echo "not found ($d: no such directory)" >&6; }
13831      fi
13832
13833      # replace the directory string with "yes".
13834      with_xshm_req="yes"
13835      with_xshm=$with_xshm_req
13836      ;;
13837
13838     *)
13839      echo ""
13840      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
13841      echo "       If it is a directory, then \`DIR/include' will be added to"
13842      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13843      exit 1
13844      ;;
13845    esac
13846
13847
13848 if test "$with_xshm" = yes; then
13849
13850   # first check for Xshm.h.
13851
13852   ac_save_CPPFLAGS="$CPPFLAGS"
13853   if test \! -z "$includedir" ; then
13854     CPPFLAGS="$CPPFLAGS -I$includedir"
13855   fi
13856   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13857   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13858   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XShm.h" "ac_cv_header_X11_extensions_XShm_h" "#include <X11/Xlib.h>
13859 "
13860 if test "x$ac_cv_header_X11_extensions_XShm_h" = xyes; then :
13861   have_xshm=yes
13862 fi
13863
13864
13865   CPPFLAGS="$ac_save_CPPFLAGS"
13866
13867   # if that succeeded, then check for sys/ipc.h.
13868   if test "$have_xshm" = yes; then
13869     have_xshm=no
13870
13871   ac_save_CPPFLAGS="$CPPFLAGS"
13872   if test \! -z "$includedir" ; then
13873     CPPFLAGS="$CPPFLAGS -I$includedir"
13874   fi
13875   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13876   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13877   ac_fn_c_check_header_mongrel "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
13878 if test "x$ac_cv_header_sys_ipc_h" = xyes; then :
13879   have_xshm=yes
13880 fi
13881
13882
13883   CPPFLAGS="$ac_save_CPPFLAGS"
13884   fi
13885
13886   # if that succeeded, then check for sys/shm.h.
13887   if test "$have_xshm" = yes; then
13888     have_xshm=no
13889
13890   ac_save_CPPFLAGS="$CPPFLAGS"
13891   if test \! -z "$includedir" ; then
13892     CPPFLAGS="$CPPFLAGS -I$includedir"
13893   fi
13894   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13895   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13896   ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
13897 if test "x$ac_cv_header_sys_shm_h" = xyes; then :
13898   have_xshm=yes
13899 fi
13900
13901
13902   CPPFLAGS="$ac_save_CPPFLAGS"
13903   fi
13904
13905   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
13906   # to exist, but the library code to not exist.  And even better, the library
13907   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
13908   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
13909   # that's not quite right, but close enough.)
13910   #
13911   case "$host" in
13912     *-aix*)
13913       if  `uname -v` -eq 3 ; then
13914         have_xshm=no
13915
13916   ac_save_CPPFLAGS="$CPPFLAGS"
13917   ac_save_LDFLAGS="$LDFLAGS"
13918 #  ac_save_LIBS="$LIBS"
13919
13920   if test \! -z "$includedir" ; then
13921     CPPFLAGS="$CPPFLAGS -I$includedir"
13922   fi
13923   # note: $X_CFLAGS includes $x_includes
13924   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13925
13926   if test \! -z "$libdir" ; then
13927     LDFLAGS="$LDFLAGS -L$libdir"
13928   fi
13929   # note: $X_LIBS includes $x_libraries
13930   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13931
13932   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13933   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13934   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryExtension in -lXextSam" >&5
13935 $as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
13936 if ${ac_cv_lib_XextSam_XShmQueryExtension+:} false; then :
13937   $as_echo_n "(cached) " >&6
13938 else
13939   ac_check_lib_save_LIBS=$LIBS
13940 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
13941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13942 /* end confdefs.h.  */
13943
13944 /* Override any GCC internal prototype to avoid an error.
13945    Use char because int might match the return type of a GCC
13946    builtin and then its argument prototype would still apply.  */
13947 #ifdef __cplusplus
13948 extern "C"
13949 #endif
13950 char XShmQueryExtension ();
13951 int
13952 main ()
13953 {
13954 return XShmQueryExtension ();
13955   ;
13956   return 0;
13957 }
13958 _ACEOF
13959 if ac_fn_c_try_link "$LINENO"; then :
13960   ac_cv_lib_XextSam_XShmQueryExtension=yes
13961 else
13962   ac_cv_lib_XextSam_XShmQueryExtension=no
13963 fi
13964 rm -f core conftest.err conftest.$ac_objext \
13965     conftest$ac_exeext conftest.$ac_ext
13966 LIBS=$ac_check_lib_save_LIBS
13967 fi
13968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
13969 $as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
13970 if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = xyes; then :
13971   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
13972 else
13973   true
13974 fi
13975
13976   CPPFLAGS="$ac_save_CPPFLAGS"
13977   LDFLAGS="$ac_save_LDFLAGS"
13978 #  LIBS="$ac_save_LIBS"
13979
13980       fi
13981     ;;
13982   esac
13983
13984   # if that succeeded, then we've really got it.
13985   if test "$have_xshm" = yes; then
13986     $as_echo "#define HAVE_XSHM_EXTENSION 1" >>confdefs.h
13987
13988   fi
13989
13990 elif test "$with_xshm" != no; then
13991   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
13992   exit 1
13993 fi
13994
13995
13996 ###############################################################################
13997 #
13998 #       Check for the DOUBLE-BUFFER server extension.
13999 #
14000 ###############################################################################
14001
14002 have_xdbe=no
14003 with_xdbe_req=unspecified
14004
14005 # Check whether --with-xdbe-ext was given.
14006 if test "${with_xdbe_ext+set}" = set; then :
14007   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
14008 else
14009   with_xdbe=yes
14010 fi
14011
14012
14013
14014    case "$with_xdbe" in
14015     yes) ;;
14016     no)  ;;
14017
14018     /*)
14019      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER headers" >&5
14020 $as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
14021      d=$with_xdbe/include
14022      if test -d $d; then
14023        X_CFLAGS="-I$d $X_CFLAGS"
14024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14025 $as_echo "$d" >&6; }
14026      else
14027        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14028 $as_echo "not found ($d: no such directory)" >&6; }
14029      fi
14030
14031      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER libs" >&5
14032 $as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
14033      d=$with_xdbe/lib
14034      if test -d $d; then
14035        X_LIBS="-L$d $X_LIBS"
14036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14037 $as_echo "$d" >&6; }
14038      else
14039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14040 $as_echo "not found ($d: no such directory)" >&6; }
14041      fi
14042
14043      # replace the directory string with "yes".
14044      with_xdbe_req="yes"
14045      with_xdbe=$with_xdbe_req
14046      ;;
14047
14048     *)
14049      echo ""
14050      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
14051      echo "       If it is a directory, then \`DIR/include' will be added to"
14052      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14053      exit 1
14054      ;;
14055    esac
14056
14057
14058 if test "$with_xdbe" = yes; then
14059
14060
14061   ac_save_CPPFLAGS="$CPPFLAGS"
14062   if test \! -z "$includedir" ; then
14063     CPPFLAGS="$CPPFLAGS -I$includedir"
14064   fi
14065   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14066   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14067   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xdbe.h" "ac_cv_header_X11_extensions_Xdbe_h" "#include <X11/Xlib.h>
14068 "
14069 if test "x$ac_cv_header_X11_extensions_Xdbe_h" = xyes; then :
14070   have_xdbe=yes
14071 fi
14072
14073
14074   CPPFLAGS="$ac_save_CPPFLAGS"
14075   if test "$have_xdbe" = yes; then
14076     $as_echo "#define HAVE_DOUBLE_BUFFER_EXTENSION 1" >>confdefs.h
14077
14078   fi
14079
14080 elif test "$with_xdbe" != no; then
14081   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
14082   exit 1
14083 fi
14084
14085
14086 ###############################################################################
14087 #
14088 #       Check for the SGI XReadDisplay server extension.
14089 #
14090 #       Note: this has to be down here, rather than up with the other server
14091 #       extension tests, so that the output of `configure --help' is in the
14092 #       right order.  Arrgh!
14093 #
14094 ###############################################################################
14095
14096 have_readdisplay=no
14097 with_readdisplay_req=unspecified
14098
14099 # Check whether --with-readdisplay was given.
14100 if test "${with_readdisplay+set}" = set; then :
14101   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
14102 else
14103   with_readdisplay=yes
14104 fi
14105
14106
14107
14108    case "$with_readdisplay" in
14109     yes) ;;
14110     no)  ;;
14111
14112     /*)
14113      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay headers" >&5
14114 $as_echo_n "checking for XReadDisplay headers... " >&6; }
14115      d=$with_readdisplay/include
14116      if test -d $d; then
14117        X_CFLAGS="-I$d $X_CFLAGS"
14118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14119 $as_echo "$d" >&6; }
14120      else
14121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14122 $as_echo "not found ($d: no such directory)" >&6; }
14123      fi
14124
14125      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay libs" >&5
14126 $as_echo_n "checking for XReadDisplay libs... " >&6; }
14127      d=$with_readdisplay/lib
14128      if test -d $d; then
14129        X_LIBS="-L$d $X_LIBS"
14130        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14131 $as_echo "$d" >&6; }
14132      else
14133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14134 $as_echo "not found ($d: no such directory)" >&6; }
14135      fi
14136
14137      # replace the directory string with "yes".
14138      with_readdisplay_req="yes"
14139      with_readdisplay=$with_readdisplay_req
14140      ;;
14141
14142     *)
14143      echo ""
14144      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
14145      echo "       If it is a directory, then \`DIR/include' will be added to"
14146      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14147      exit 1
14148      ;;
14149    esac
14150
14151
14152 if test "$with_readdisplay" = yes; then
14153
14154   ac_save_CPPFLAGS="$CPPFLAGS"
14155   if test \! -z "$includedir" ; then
14156     CPPFLAGS="$CPPFLAGS -I$includedir"
14157   fi
14158   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14159   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14160   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/readdisplay.h" "ac_cv_header_X11_extensions_readdisplay_h" "#include <X11/Xlib.h>
14161 "
14162 if test "x$ac_cv_header_X11_extensions_readdisplay_h" = xyes; then :
14163   $as_echo "#define HAVE_READ_DISPLAY_EXTENSION 1" >>confdefs.h
14164
14165 fi
14166
14167
14168   CPPFLAGS="$ac_save_CPPFLAGS"
14169 elif test "$with_readdisplay" != no; then
14170   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
14171   exit 1
14172 fi
14173
14174
14175 ###############################################################################
14176 #
14177 #       Check for a directory full of images to use as the default value
14178 #       of the "imageDirectory" preference.
14179 #
14180 ###############################################################################
14181
14182 have_imagedir=no
14183 with_imagedir_req=unspecified
14184
14185
14186 # Check whether --with-image-directory was given.
14187 if test "${with_image_directory+set}" = set; then :
14188   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
14189 else
14190   with_imagedir=yes
14191 fi
14192
14193 # no HANDLE_X_PATH_ARG for this one
14194
14195 case "$with_imagedir" in
14196   /*)
14197     # absolute path
14198     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $with_imagedir" >&5
14199 $as_echo_n "checking for image directory $with_imagedir... " >&6; }
14200     if test -d "$with_imagedir" ; then
14201       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14202 $as_echo "yes" >&6; }
14203     else
14204       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14205 $as_echo "no" >&6; }
14206       with_imagedir=""
14207     fi
14208   ;;
14209   yes)
14210     with_imagedir=""
14211
14212     #### Could use some more defaults here...
14213     for dd in \
14214       "/usr/share/backgrounds/images/"          \
14215       "/usr/share/wallpapers/"                  \
14216       "/Library/Desktop Pictures/"              \
14217     ; do
14218       if test -z "$with_imagedir"; then
14219         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $dd" >&5
14220 $as_echo_n "checking for image directory $dd... " >&6; }
14221         if test -d "$dd" ; then
14222           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14223 $as_echo "yes" >&6; }
14224           with_imagedir="$dd"
14225         else
14226           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14227 $as_echo "no" >&6; }
14228         fi
14229       fi
14230     done
14231
14232   ;;
14233   no)
14234     with_imagedir=""
14235   ;;
14236
14237   *)
14238     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
14239     exit 1
14240   ;;
14241 esac
14242 ac_cv_imagedir="$with_imagedir"
14243
14244 DEFAULT_IMAGES_P='True'
14245 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
14246
14247 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
14248   DEFAULT_IMAGES_P='False'
14249 fi
14250
14251
14252 ###############################################################################
14253 #
14254 #       Pick a text file to use as the default of the "textFile" preference.
14255 #       Any old file will do, but preferably one that will make interesting
14256 #       shapes when displayed by "starwars" and "fontglide".
14257 #
14258 ###############################################################################
14259
14260 have_textfile=no
14261 with_textfile_req=unspecified
14262
14263
14264 # Check whether --with-text-file was given.
14265 if test "${with_text_file+set}" = set; then :
14266   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
14267 else
14268   with_textfile=yes
14269 fi
14270
14271 # no HANDLE_X_PATH_ARG for this one
14272
14273 case "$with_textfile" in
14274   /*)
14275     # absolute path
14276     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $with_textfile" >&5
14277 $as_echo_n "checking for text file $with_textfile... " >&6; }
14278     if test -f "$with_textfile" ; then
14279       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14280 $as_echo "yes" >&6; }
14281     else
14282       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14283 $as_echo "no" >&6; }
14284       with_textfile=""
14285     fi
14286   ;;
14287   yes)
14288     with_textfile=""
14289
14290     #### Could use some more defaults here...
14291     for f in \
14292       "/usr/X11R6/lib/X11/doc/README"              \
14293       "/usr/share/doc/xserver-common/copyright"    \
14294       "/usr/share/doc/xserver-xorg-core/copyright" \
14295       "/usr/X11R6/README"                          \
14296       "/usr/share/doc/libX11*/COPYING"             \
14297       "/usr/X11/share/X11/doc/README*"             \
14298       "/usr/share/doc/debian/debian-manifesto"     \
14299     ; do
14300       if test -z "$with_textfile"; then
14301         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $f" >&5
14302 $as_echo_n "checking for text file $f... " >&6; }
14303         f=`/bin/ls $f 2>&- | head -1`
14304         if test -f "$f" ; then
14305           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14306 $as_echo "yes" >&6; }
14307           with_textfile="$f"
14308         else
14309           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14310 $as_echo "no" >&6; }
14311         fi
14312       fi
14313     done
14314
14315   ;;
14316   no)
14317     with_textfile=""
14318   ;;
14319
14320   *)
14321     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
14322     exit 1
14323   ;;
14324 esac
14325 ac_cv_textfile="$with_textfile"
14326
14327 DEFAULT_TEXT_FILE="$ac_cv_textfile"
14328
14329
14330 ###############################################################################
14331 #
14332 #       Check the browser to see help URL
14333 #
14334 ###############################################################################
14335
14336 have_browser=no
14337 with_browser_req=unspecified
14338
14339
14340 # Check whether --with-browser was given.
14341 if test "${with_browser+set}" = set; then :
14342   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
14343 else
14344   with_browser=no
14345 fi
14346
14347 # no HANDLE_X_PATH_ARG for this one
14348
14349 case "$with_browser" in
14350   no )
14351   ;;
14352   * )
14353     WITH_BROWSER=$with_browser
14354     gnome_open_program=$with_browser
14355     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for browser $with_browser" >&5
14356 $as_echo_n "checking for browser $with_browser... " >&6; }
14357     with_browser_fullpath=`which $with_browser 2>/dev/null`
14358     case $with_browser_fullpath in
14359          /* )
14360                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14361 $as_echo "yes" >&6; }
14362                  have_browser=yes
14363                  ;;
14364         * )
14365                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14366 $as_echo "no" >&6; }
14367 # Only warning: we don't want to install all packages for the
14368 # dependency of the browser in building stage...
14369                echo "WARNING: browser not found: --with-browser=$with_browser"
14370                ;;
14371     esac
14372   ;;
14373 esac
14374 ac_cv_browser="$with_browser"
14375
14376 ###############################################################################
14377 #
14378 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
14379 #       This should be safe, but let's give people the option.
14380 #
14381 ###############################################################################
14382
14383 setuid_hacks_default=no
14384 setuid_hacks="$setuid_hacks_default"
14385
14386 # Check whether --with-setuid-hacks was given.
14387 if test "${with_setuid_hacks+set}" = set; then :
14388   withval=$with_setuid_hacks; setuid_hacks="$withval"
14389 else
14390   setuid_hacks="$setuid_hacks_default"
14391 fi
14392
14393
14394
14395    case "$setuid_hacks" in
14396     yes) ;;
14397     no)  ;;
14398
14399     /*)
14400      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks headers" >&5
14401 $as_echo_n "checking for setuid hacks headers... " >&6; }
14402      d=$setuid_hacks/include
14403      if test -d $d; then
14404        X_CFLAGS="-I$d $X_CFLAGS"
14405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14406 $as_echo "$d" >&6; }
14407      else
14408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14409 $as_echo "not found ($d: no such directory)" >&6; }
14410      fi
14411
14412      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks libs" >&5
14413 $as_echo_n "checking for setuid hacks libs... " >&6; }
14414      d=$setuid_hacks/lib
14415      if test -d $d; then
14416        X_LIBS="-L$d $X_LIBS"
14417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14418 $as_echo "$d" >&6; }
14419      else
14420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14421 $as_echo "not found ($d: no such directory)" >&6; }
14422      fi
14423
14424      # replace the directory string with "yes".
14425      setuid_hacks_req="yes"
14426      setuid_hacks=$setuid_hacks_req
14427      ;;
14428
14429     *)
14430      echo ""
14431      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
14432      echo "       If it is a directory, then \`DIR/include' will be added to"
14433      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14434      exit 1
14435      ;;
14436    esac
14437
14438
14439 if test "$setuid_hacks" = yes; then
14440   true
14441 elif test "$setuid_hacks" != no; then
14442   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
14443   exit 1
14444 fi
14445
14446
14447 ###############################################################################
14448 #
14449 #       Done testing.  Now, set up the various -I and -L variables,
14450 #       and decide which GUI program to build by default.
14451 #
14452 ###############################################################################
14453
14454 DEPEND=makedepend
14455 DEPEND_FLAGS=
14456 DEPEND_DEFINES=
14457
14458
14459 if test \! -z "$includedir" ; then
14460   INCLUDES="$INCLUDES -I$includedir"
14461 fi
14462
14463 if test \! -z "$libdir" ; then
14464   LDFLAGS="$LDFLAGS -L$libdir"
14465 fi
14466
14467
14468 PREFERRED_DEMO_PROGRAM=''
14469 ALL_DEMO_PROGRAMS=
14470 if test "$have_motif" = yes; then
14471   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
14472   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
14473 fi
14474 if test "$have_gtk" = yes; then
14475   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
14476   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
14477 fi
14478
14479
14480 if test "$have_kerberos" = yes; then
14481   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
14482   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
14483 fi
14484 if test "$have_pam" = yes; then
14485   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
14486   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
14487   INSTALL_PAM="install-pam"
14488 fi
14489 if test "$enable_pam_check_account_type" = yes; then
14490   COMMENT_PAM_CHECK_ACCOUNT=""
14491 else
14492   COMMENT_PAM_CHECK_ACCOUNT="#"
14493 fi
14494 if test "$have_passwd_helper" = yes; then
14495   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
14496   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
14497 fi
14498   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
14499   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
14500
14501
14502 if test "$enable_locking" = yes; then
14503   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
14504   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
14505 else
14506   LOCK_SRCS='$(NOLOCK_SRCS_1)'
14507   LOCK_OBJS='$(NOLOCK_OBJS_1)'
14508 fi
14509
14510 if test "$ac_macosx" = yes; then
14511   EXES_OSX='$(EXES_OSX)'
14512   SCRIPTS_OSX='$(SCRIPTS_OSX)'
14513   MEN_OSX='$(MEN_OSX)'
14514 else
14515   EXES_OSX=
14516   SCRIPTS_OSX=
14517   MEN_OSX=
14518 fi
14519
14520
14521 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
14522
14523 if test "$need_setuid" = yes; then
14524   NEED_SETUID=yes
14525 else
14526   NEED_SETUID=no
14527 fi
14528
14529 if test "$setuid_hacks" = yes; then
14530   SETUID_HACKS=yes
14531 else
14532   SETUID_HACKS=no
14533 fi
14534
14535 tab='   '
14536 if test "$have_gl" = yes; then
14537   GL_EXES='$(GL_EXES)'
14538   SUID_EXES='$(SUID_EXES)'
14539   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
14540   GL_UTIL_EXES='$(GL_UTIL_EXES)'
14541   GL_MEN='$(GL_MEN)'
14542   GL_KLUDGE=" "
14543 else
14544   GL_KLUDGE="-"
14545 fi
14546
14547 if test "$have_gle" = yes; then
14548   GLE_EXES='$(GLE_EXES)'
14549   GLE_KLUDGE=" "
14550 else
14551   GLE_KLUDGE="-"
14552 fi
14553
14554 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
14555  JPEG_EXES='$(JPEG_EXES)'
14556 fi
14557
14558
14559 # Another substitution in the XScreenSaver.ad.in file:
14560 #
14561 if test "$gnome_open_program" != ''; then
14562   GNOME24=''
14563   GNOME22='!    '
14564   NOGNOME='!    '
14565 elif test "$gnome_url_show_program" != ''; then
14566   GNOME24='!    '
14567   GNOME22=''
14568   NOGNOME='!    '
14569 else
14570   GNOME24='!    '
14571   GNOME22='!    '
14572   NOGNOME=''
14573 fi
14574
14575
14576 # Set PO_DATADIR to something sensible.
14577 #
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale directory" >&5
14579 $as_echo_n "checking for locale directory... " >&6; }
14580 if test -n "$GTK_DATADIR" ; then
14581   PO_DATADIR="$GTK_DATADIR"
14582 elif test "$have_gtk" = yes; then
14583   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
14584   PO_DATADIR="$PO_DATADIR/share"
14585 fi
14586
14587 if test -z "$PO_DATADIR" ; then
14588   #
14589   # #### Total fucking kludge --
14590   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
14591   # but of course we need to expand all the nested variables to do that...
14592   #
14593   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
14594   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
14595 fi
14596
14597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PO_DATADIR/locale" >&5
14598 $as_echo "$PO_DATADIR/locale" >&6; }
14599
14600
14601 # canonicalize slashes.
14602 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
14603
14604 # gcc 3.0 likes to issue this warning for every file:
14605 #
14606 # cc1: warning: changing search order for system directory "/usr/local/include"
14607 # cc1: warning:   as it has already been specified as a non-system directory
14608 #
14609 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
14610 # Which *should* be totally redundant, and thus an ok thing to delete?
14611 #
14612 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
14613
14614
14615 ###############################################################################
14616 #
14617 #       Perform substitutions and write Makefiles.
14618 #
14619 ###############################################################################
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689 APPDEFAULTS=$ac_x_app_defaults
14690
14691
14692
14693
14694
14695
14696
14697 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"
14698
14699 cat >confcache <<\_ACEOF
14700 # This file is a shell script that caches the results of configure
14701 # tests run on this system so they can be shared between configure
14702 # scripts and configure runs, see configure's option --config-cache.
14703 # It is not useful on other systems.  If it contains results you don't
14704 # want to keep, you may remove or edit it.
14705 #
14706 # config.status only pays attention to the cache file if you give it
14707 # the --recheck option to rerun configure.
14708 #
14709 # `ac_cv_env_foo' variables (set or unset) will be overridden when
14710 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14711 # following values.
14712
14713 _ACEOF
14714
14715 # The following way of writing the cache mishandles newlines in values,
14716 # but we know of no workaround that is simple, portable, and efficient.
14717 # So, we kill variables containing newlines.
14718 # Ultrix sh set writes to stderr and can't be redirected directly,
14719 # and sets the high bit in the cache file unless we assign to the vars.
14720 (
14721   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14722     eval ac_val=\$$ac_var
14723     case $ac_val in #(
14724     *${as_nl}*)
14725       case $ac_var in #(
14726       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14727 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14728       esac
14729       case $ac_var in #(
14730       _ | IFS | as_nl) ;; #(
14731       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14732       *) { eval $ac_var=; unset $ac_var;} ;;
14733       esac ;;
14734     esac
14735   done
14736
14737   (set) 2>&1 |
14738     case $as_nl`(ac_space=' '; set) 2>&1` in #(
14739     *${as_nl}ac_space=\ *)
14740       # `set' does not quote correctly, so add quotes: double-quote
14741       # substitution turns \\\\ into \\, and sed turns \\ into \.
14742       sed -n \
14743         "s/'/'\\\\''/g;
14744           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14745       ;; #(
14746     *)
14747       # `set' quotes correctly as required by POSIX, so do not add quotes.
14748       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14749       ;;
14750     esac |
14751     sort
14752 ) |
14753   sed '
14754      /^ac_cv_env_/b end
14755      t clear
14756      :clear
14757      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14758      t end
14759      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14760      :end' >>confcache
14761 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14762   if test -w "$cache_file"; then
14763     if test "x$cache_file" != "x/dev/null"; then
14764       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14765 $as_echo "$as_me: updating cache $cache_file" >&6;}
14766       if test ! -f "$cache_file" || test -h "$cache_file"; then
14767         cat confcache >"$cache_file"
14768       else
14769         case $cache_file in #(
14770         */* | ?:*)
14771           mv -f confcache "$cache_file"$$ &&
14772           mv -f "$cache_file"$$ "$cache_file" ;; #(
14773         *)
14774           mv -f confcache "$cache_file" ;;
14775         esac
14776       fi
14777     fi
14778   else
14779     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14780 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14781   fi
14782 fi
14783 rm -f confcache
14784
14785 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14786 # Let make expand exec_prefix.
14787 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14788
14789 DEFS=-DHAVE_CONFIG_H
14790
14791 ac_libobjs=
14792 ac_ltlibobjs=
14793 U=
14794 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14795   # 1. Remove the extension, and $U if already installed.
14796   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14797   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14798   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14799   #    will be set to the directory where LIBOBJS objects are built.
14800   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14801   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14802 done
14803 LIBOBJS=$ac_libobjs
14804
14805 LTLIBOBJS=$ac_ltlibobjs
14806
14807
14808
14809
14810         mv -f po/POTFILES po/POTFILES.tmp
14811         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
14812         rm -f po/POTFILES.tmp
14813
14814
14815
14816 : "${CONFIG_STATUS=./config.status}"
14817 ac_write_fail=0
14818 ac_clean_files_save=$ac_clean_files
14819 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14820 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14821 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14822 as_write_fail=0
14823 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14824 #! $SHELL
14825 # Generated by $as_me.
14826 # Run this file to recreate the current configuration.
14827 # Compiler output produced by configure, useful for debugging
14828 # configure, is in config.log if it exists.
14829
14830 debug=false
14831 ac_cs_recheck=false
14832 ac_cs_silent=false
14833
14834 SHELL=\${CONFIG_SHELL-$SHELL}
14835 export SHELL
14836 _ASEOF
14837 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14838 ## -------------------- ##
14839 ## M4sh Initialization. ##
14840 ## -------------------- ##
14841
14842 # Be more Bourne compatible
14843 DUALCASE=1; export DUALCASE # for MKS sh
14844 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14845   emulate sh
14846   NULLCMD=:
14847   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14848   # is contrary to our usage.  Disable this feature.
14849   alias -g '${1+"$@"}'='"$@"'
14850   setopt NO_GLOB_SUBST
14851 else
14852   case `(set -o) 2>/dev/null` in #(
14853   *posix*) :
14854     set -o posix ;; #(
14855   *) :
14856      ;;
14857 esac
14858 fi
14859
14860
14861 as_nl='
14862 '
14863 export as_nl
14864 # Printing a long string crashes Solaris 7 /usr/bin/printf.
14865 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14866 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14867 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14868 # Prefer a ksh shell builtin over an external printf program on Solaris,
14869 # but without wasting forks for bash or zsh.
14870 if test -z "$BASH_VERSION$ZSH_VERSION" \
14871     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14872   as_echo='print -r --'
14873   as_echo_n='print -rn --'
14874 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14875   as_echo='printf %s\n'
14876   as_echo_n='printf %s'
14877 else
14878   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14879     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14880     as_echo_n='/usr/ucb/echo -n'
14881   else
14882     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14883     as_echo_n_body='eval
14884       arg=$1;
14885       case $arg in #(
14886       *"$as_nl"*)
14887         expr "X$arg" : "X\\(.*\\)$as_nl";
14888         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14889       esac;
14890       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14891     '
14892     export as_echo_n_body
14893     as_echo_n='sh -c $as_echo_n_body as_echo'
14894   fi
14895   export as_echo_body
14896   as_echo='sh -c $as_echo_body as_echo'
14897 fi
14898
14899 # The user is always right.
14900 if test "${PATH_SEPARATOR+set}" != set; then
14901   PATH_SEPARATOR=:
14902   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14903     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14904       PATH_SEPARATOR=';'
14905   }
14906 fi
14907
14908
14909 # IFS
14910 # We need space, tab and new line, in precisely that order.  Quoting is
14911 # there to prevent editors from complaining about space-tab.
14912 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
14913 # splitting by setting IFS to empty value.)
14914 IFS=" ""        $as_nl"
14915
14916 # Find who we are.  Look in the path if we contain no directory separator.
14917 as_myself=
14918 case $0 in #((
14919   *[\\/]* ) as_myself=$0 ;;
14920   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14921 for as_dir in $PATH
14922 do
14923   IFS=$as_save_IFS
14924   test -z "$as_dir" && as_dir=.
14925     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14926   done
14927 IFS=$as_save_IFS
14928
14929      ;;
14930 esac
14931 # We did not find ourselves, most probably we were run as `sh COMMAND'
14932 # in which case we are not to be found in the path.
14933 if test "x$as_myself" = x; then
14934   as_myself=$0
14935 fi
14936 if test ! -f "$as_myself"; then
14937   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14938   exit 1
14939 fi
14940
14941 # Unset variables that we do not need and which cause bugs (e.g. in
14942 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
14943 # suppresses any "Segmentation fault" message there.  '((' could
14944 # trigger a bug in pdksh 5.2.14.
14945 for as_var in BASH_ENV ENV MAIL MAILPATH
14946 do eval test x\${$as_var+set} = xset \
14947   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14948 done
14949 PS1='$ '
14950 PS2='> '
14951 PS4='+ '
14952
14953 # NLS nuisances.
14954 LC_ALL=C
14955 export LC_ALL
14956 LANGUAGE=C
14957 export LANGUAGE
14958
14959 # CDPATH.
14960 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14961
14962
14963 # as_fn_error STATUS ERROR [LINENO LOG_FD]
14964 # ----------------------------------------
14965 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14966 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14967 # script with STATUS, using 1 if that was 0.
14968 as_fn_error ()
14969 {
14970   as_status=$1; test $as_status -eq 0 && as_status=1
14971   if test "$4"; then
14972     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14973     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14974   fi
14975   $as_echo "$as_me: error: $2" >&2
14976   as_fn_exit $as_status
14977 } # as_fn_error
14978
14979
14980 # as_fn_set_status STATUS
14981 # -----------------------
14982 # Set $? to STATUS, without forking.
14983 as_fn_set_status ()
14984 {
14985   return $1
14986 } # as_fn_set_status
14987
14988 # as_fn_exit STATUS
14989 # -----------------
14990 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14991 as_fn_exit ()
14992 {
14993   set +e
14994   as_fn_set_status $1
14995   exit $1
14996 } # as_fn_exit
14997
14998 # as_fn_unset VAR
14999 # ---------------
15000 # Portably unset VAR.
15001 as_fn_unset ()
15002 {
15003   { eval $1=; unset $1;}
15004 }
15005 as_unset=as_fn_unset
15006 # as_fn_append VAR VALUE
15007 # ----------------------
15008 # Append the text in VALUE to the end of the definition contained in VAR. Take
15009 # advantage of any shell optimizations that allow amortized linear growth over
15010 # repeated appends, instead of the typical quadratic growth present in naive
15011 # implementations.
15012 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15013   eval 'as_fn_append ()
15014   {
15015     eval $1+=\$2
15016   }'
15017 else
15018   as_fn_append ()
15019   {
15020     eval $1=\$$1\$2
15021   }
15022 fi # as_fn_append
15023
15024 # as_fn_arith ARG...
15025 # ------------------
15026 # Perform arithmetic evaluation on the ARGs, and store the result in the
15027 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15028 # must be portable across $(()) and expr.
15029 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15030   eval 'as_fn_arith ()
15031   {
15032     as_val=$(( $* ))
15033   }'
15034 else
15035   as_fn_arith ()
15036   {
15037     as_val=`expr "$@" || test $? -eq 1`
15038   }
15039 fi # as_fn_arith
15040
15041
15042 if expr a : '\(a\)' >/dev/null 2>&1 &&
15043    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15044   as_expr=expr
15045 else
15046   as_expr=false
15047 fi
15048
15049 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15050   as_basename=basename
15051 else
15052   as_basename=false
15053 fi
15054
15055 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15056   as_dirname=dirname
15057 else
15058   as_dirname=false
15059 fi
15060
15061 as_me=`$as_basename -- "$0" ||
15062 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15063          X"$0" : 'X\(//\)$' \| \
15064          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15065 $as_echo X/"$0" |
15066     sed '/^.*\/\([^/][^/]*\)\/*$/{
15067             s//\1/
15068             q
15069           }
15070           /^X\/\(\/\/\)$/{
15071             s//\1/
15072             q
15073           }
15074           /^X\/\(\/\).*/{
15075             s//\1/
15076             q
15077           }
15078           s/.*/./; q'`
15079
15080 # Avoid depending upon Character Ranges.
15081 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15082 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15083 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15084 as_cr_digits='0123456789'
15085 as_cr_alnum=$as_cr_Letters$as_cr_digits
15086
15087 ECHO_C= ECHO_N= ECHO_T=
15088 case `echo -n x` in #(((((
15089 -n*)
15090   case `echo 'xy\c'` in
15091   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15092   xy)  ECHO_C='\c';;
15093   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15094        ECHO_T=' ';;
15095   esac;;
15096 *)
15097   ECHO_N='-n';;
15098 esac
15099
15100 rm -f conf$$ conf$$.exe conf$$.file
15101 if test -d conf$$.dir; then
15102   rm -f conf$$.dir/conf$$.file
15103 else
15104   rm -f conf$$.dir
15105   mkdir conf$$.dir 2>/dev/null
15106 fi
15107 if (echo >conf$$.file) 2>/dev/null; then
15108   if ln -s conf$$.file conf$$ 2>/dev/null; then
15109     as_ln_s='ln -s'
15110     # ... but there are two gotchas:
15111     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15112     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15113     # In both cases, we have to default to `cp -pR'.
15114     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15115       as_ln_s='cp -pR'
15116   elif ln conf$$.file conf$$ 2>/dev/null; then
15117     as_ln_s=ln
15118   else
15119     as_ln_s='cp -pR'
15120   fi
15121 else
15122   as_ln_s='cp -pR'
15123 fi
15124 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15125 rmdir conf$$.dir 2>/dev/null
15126
15127
15128 # as_fn_mkdir_p
15129 # -------------
15130 # Create "$as_dir" as a directory, including parents if necessary.
15131 as_fn_mkdir_p ()
15132 {
15133
15134   case $as_dir in #(
15135   -*) as_dir=./$as_dir;;
15136   esac
15137   test -d "$as_dir" || eval $as_mkdir_p || {
15138     as_dirs=
15139     while :; do
15140       case $as_dir in #(
15141       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15142       *) as_qdir=$as_dir;;
15143       esac
15144       as_dirs="'$as_qdir' $as_dirs"
15145       as_dir=`$as_dirname -- "$as_dir" ||
15146 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15147          X"$as_dir" : 'X\(//\)[^/]' \| \
15148          X"$as_dir" : 'X\(//\)$' \| \
15149          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15150 $as_echo X"$as_dir" |
15151     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15152             s//\1/
15153             q
15154           }
15155           /^X\(\/\/\)[^/].*/{
15156             s//\1/
15157             q
15158           }
15159           /^X\(\/\/\)$/{
15160             s//\1/
15161             q
15162           }
15163           /^X\(\/\).*/{
15164             s//\1/
15165             q
15166           }
15167           s/.*/./; q'`
15168       test -d "$as_dir" && break
15169     done
15170     test -z "$as_dirs" || eval "mkdir $as_dirs"
15171   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15172
15173
15174 } # as_fn_mkdir_p
15175 if mkdir -p . 2>/dev/null; then
15176   as_mkdir_p='mkdir -p "$as_dir"'
15177 else
15178   test -d ./-p && rmdir ./-p
15179   as_mkdir_p=false
15180 fi
15181
15182
15183 # as_fn_executable_p FILE
15184 # -----------------------
15185 # Test if FILE is an executable regular file.
15186 as_fn_executable_p ()
15187 {
15188   test -f "$1" && test -x "$1"
15189 } # as_fn_executable_p
15190 as_test_x='test -x'
15191 as_executable_p=as_fn_executable_p
15192
15193 # Sed expression to map a string onto a valid CPP name.
15194 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15195
15196 # Sed expression to map a string onto a valid variable name.
15197 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15198
15199
15200 exec 6>&1
15201 ## ----------------------------------- ##
15202 ## Main body of $CONFIG_STATUS script. ##
15203 ## ----------------------------------- ##
15204 _ASEOF
15205 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15206
15207 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15208 # Save the log message, to keep $0 and so on meaningful, and to
15209 # report actual input values of CONFIG_FILES etc. instead of their
15210 # values after options handling.
15211 ac_log="
15212 This file was extended by $as_me, which was
15213 generated by GNU Autoconf 2.69.  Invocation command line was
15214
15215   CONFIG_FILES    = $CONFIG_FILES
15216   CONFIG_HEADERS  = $CONFIG_HEADERS
15217   CONFIG_LINKS    = $CONFIG_LINKS
15218   CONFIG_COMMANDS = $CONFIG_COMMANDS
15219   $ $0 $@
15220
15221 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15222 "
15223
15224 _ACEOF
15225
15226 case $ac_config_files in *"
15227 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15228 esac
15229
15230 case $ac_config_headers in *"
15231 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15232 esac
15233
15234
15235 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15236 # Files that config.status was made for.
15237 config_files="$ac_config_files"
15238 config_headers="$ac_config_headers"
15239 config_commands="$ac_config_commands"
15240
15241 _ACEOF
15242
15243 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15244 ac_cs_usage="\
15245 \`$as_me' instantiates files and other configuration actions
15246 from templates according to the current configuration.  Unless the files
15247 and actions are specified as TAGs, all are instantiated by default.
15248
15249 Usage: $0 [OPTION]... [TAG]...
15250
15251   -h, --help       print this help, then exit
15252   -V, --version    print version number and configuration settings, then exit
15253       --config     print configuration, then exit
15254   -q, --quiet, --silent
15255                    do not print progress messages
15256   -d, --debug      don't remove temporary files
15257       --recheck    update $as_me by reconfiguring in the same conditions
15258       --file=FILE[:TEMPLATE]
15259                    instantiate the configuration file FILE
15260       --header=FILE[:TEMPLATE]
15261                    instantiate the configuration header FILE
15262
15263 Configuration files:
15264 $config_files
15265
15266 Configuration headers:
15267 $config_headers
15268
15269 Configuration commands:
15270 $config_commands
15271
15272 Report bugs to the package provider."
15273
15274 _ACEOF
15275 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15276 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15277 ac_cs_version="\\
15278 config.status
15279 configured by $0, generated by GNU Autoconf 2.69,
15280   with options \\"\$ac_cs_config\\"
15281
15282 Copyright (C) 2012 Free Software Foundation, Inc.
15283 This config.status script is free software; the Free Software Foundation
15284 gives unlimited permission to copy, distribute and modify it."
15285
15286 ac_pwd='$ac_pwd'
15287 srcdir='$srcdir'
15288 INSTALL='$INSTALL'
15289 test -n "\$AWK" || AWK=awk
15290 _ACEOF
15291
15292 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15293 # The default lists apply if the user does not specify any file.
15294 ac_need_defaults=:
15295 while test $# != 0
15296 do
15297   case $1 in
15298   --*=?*)
15299     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15300     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15301     ac_shift=:
15302     ;;
15303   --*=)
15304     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15305     ac_optarg=
15306     ac_shift=:
15307     ;;
15308   *)
15309     ac_option=$1
15310     ac_optarg=$2
15311     ac_shift=shift
15312     ;;
15313   esac
15314
15315   case $ac_option in
15316   # Handling of the options.
15317   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15318     ac_cs_recheck=: ;;
15319   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15320     $as_echo "$ac_cs_version"; exit ;;
15321   --config | --confi | --conf | --con | --co | --c )
15322     $as_echo "$ac_cs_config"; exit ;;
15323   --debug | --debu | --deb | --de | --d | -d )
15324     debug=: ;;
15325   --file | --fil | --fi | --f )
15326     $ac_shift
15327     case $ac_optarg in
15328     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15329     '') as_fn_error $? "missing file argument" ;;
15330     esac
15331     as_fn_append CONFIG_FILES " '$ac_optarg'"
15332     ac_need_defaults=false;;
15333   --header | --heade | --head | --hea )
15334     $ac_shift
15335     case $ac_optarg in
15336     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15337     esac
15338     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15339     ac_need_defaults=false;;
15340   --he | --h)
15341     # Conflict between --help and --header
15342     as_fn_error $? "ambiguous option: \`$1'
15343 Try \`$0 --help' for more information.";;
15344   --help | --hel | -h )
15345     $as_echo "$ac_cs_usage"; exit ;;
15346   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15347   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15348     ac_cs_silent=: ;;
15349
15350   # This is an error.
15351   -*) as_fn_error $? "unrecognized option: \`$1'
15352 Try \`$0 --help' for more information." ;;
15353
15354   *) as_fn_append ac_config_targets " $1"
15355      ac_need_defaults=false ;;
15356
15357   esac
15358   shift
15359 done
15360
15361 ac_configure_extra_args=
15362
15363 if $ac_cs_silent; then
15364   exec 6>/dev/null
15365   ac_configure_extra_args="$ac_configure_extra_args --silent"
15366 fi
15367
15368 _ACEOF
15369 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15370 if \$ac_cs_recheck; then
15371   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15372   shift
15373   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15374   CONFIG_SHELL='$SHELL'
15375   export CONFIG_SHELL
15376   exec "\$@"
15377 fi
15378
15379 _ACEOF
15380 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15381 exec 5>>config.log
15382 {
15383   echo
15384   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15385 ## Running $as_me. ##
15386 _ASBOX
15387   $as_echo "$ac_log"
15388 } >&5
15389
15390 _ACEOF
15391 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15392 #
15393 # INIT-COMMANDS
15394 #
15395 INTLTOOL_PERL=${INTLTOOL_PERL}
15396
15397
15398 _ACEOF
15399
15400 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15401
15402 # Handling of arguments.
15403 for ac_config_target in $ac_config_targets
15404 do
15405   case $ac_config_target in
15406     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
15407     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
15408     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
15409     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15410     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
15411     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
15412     "driver/xscreensaver.pam") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.pam" ;;
15413     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
15414     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
15415     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
15416     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
15417
15418   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15419   esac
15420 done
15421
15422
15423 # If the user did not use the arguments to specify the items to instantiate,
15424 # then the envvar interface is used.  Set only those that are not.
15425 # We use the long form for the default assignment because of an extremely
15426 # bizarre bug on SunOS 4.1.3.
15427 if $ac_need_defaults; then
15428   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15429   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15430   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15431 fi
15432
15433 # Have a temporary directory for convenience.  Make it in the build tree
15434 # simply because there is no reason against having it here, and in addition,
15435 # creating and moving files from /tmp can sometimes cause problems.
15436 # Hook for its removal unless debugging.
15437 # Note that there is a small window in which the directory will not be cleaned:
15438 # after its creation but before its name has been assigned to `$tmp'.
15439 $debug ||
15440 {
15441   tmp= ac_tmp=
15442   trap 'exit_status=$?
15443   : "${ac_tmp:=$tmp}"
15444   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15445 ' 0
15446   trap 'as_fn_exit 1' 1 2 13 15
15447 }
15448 # Create a (secure) tmp directory for tmp files.
15449
15450 {
15451   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15452   test -d "$tmp"
15453 }  ||
15454 {
15455   tmp=./conf$$-$RANDOM
15456   (umask 077 && mkdir "$tmp")
15457 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15458 ac_tmp=$tmp
15459
15460 # Set up the scripts for CONFIG_FILES section.
15461 # No need to generate them if there are no CONFIG_FILES.
15462 # This happens for instance with `./config.status config.h'.
15463 if test -n "$CONFIG_FILES"; then
15464
15465
15466 ac_cr=`echo X | tr X '\015'`
15467 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15468 # But we know of no other shell where ac_cr would be empty at this
15469 # point, so we can use a bashism as a fallback.
15470 if test "x$ac_cr" = x; then
15471   eval ac_cr=\$\'\\r\'
15472 fi
15473 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15474 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15475   ac_cs_awk_cr='\\r'
15476 else
15477   ac_cs_awk_cr=$ac_cr
15478 fi
15479
15480 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15481 _ACEOF
15482
15483
15484 {
15485   echo "cat >conf$$subs.awk <<_ACEOF" &&
15486   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15487   echo "_ACEOF"
15488 } >conf$$subs.sh ||
15489   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15490 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15491 ac_delim='%!_!# '
15492 for ac_last_try in false false false false false :; do
15493   . ./conf$$subs.sh ||
15494     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15495
15496   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15497   if test $ac_delim_n = $ac_delim_num; then
15498     break
15499   elif $ac_last_try; then
15500     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15501   else
15502     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15503   fi
15504 done
15505 rm -f conf$$subs.sh
15506
15507 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15508 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15509 _ACEOF
15510 sed -n '
15511 h
15512 s/^/S["/; s/!.*/"]=/
15513 p
15514 g
15515 s/^[^!]*!//
15516 :repl
15517 t repl
15518 s/'"$ac_delim"'$//
15519 t delim
15520 :nl
15521 h
15522 s/\(.\{148\}\)..*/\1/
15523 t more1
15524 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15525 p
15526 n
15527 b repl
15528 :more1
15529 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15530 p
15531 g
15532 s/.\{148\}//
15533 t nl
15534 :delim
15535 h
15536 s/\(.\{148\}\)..*/\1/
15537 t more2
15538 s/["\\]/\\&/g; s/^/"/; s/$/"/
15539 p
15540 b
15541 :more2
15542 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15543 p
15544 g
15545 s/.\{148\}//
15546 t delim
15547 ' <conf$$subs.awk | sed '
15548 /^[^""]/{
15549   N
15550   s/\n//
15551 }
15552 ' >>$CONFIG_STATUS || ac_write_fail=1
15553 rm -f conf$$subs.awk
15554 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15555 _ACAWK
15556 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15557   for (key in S) S_is_set[key] = 1
15558   FS = "\a"
15559
15560 }
15561 {
15562   line = $ 0
15563   nfields = split(line, field, "@")
15564   substed = 0
15565   len = length(field[1])
15566   for (i = 2; i < nfields; i++) {
15567     key = field[i]
15568     keylen = length(key)
15569     if (S_is_set[key]) {
15570       value = S[key]
15571       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15572       len += length(value) + length(field[++i])
15573       substed = 1
15574     } else
15575       len += 1 + keylen
15576   }
15577
15578   print line
15579 }
15580
15581 _ACAWK
15582 _ACEOF
15583 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15584 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15585   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15586 else
15587   cat
15588 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15589   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15590 _ACEOF
15591
15592 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15593 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15594 # trailing colons and then remove the whole line if VPATH becomes empty
15595 # (actually we leave an empty line to preserve line numbers).
15596 if test "x$srcdir" = x.; then
15597   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
15598 h
15599 s///
15600 s/^/:/
15601 s/[      ]*$/:/
15602 s/:\$(srcdir):/:/g
15603 s/:\${srcdir}:/:/g
15604 s/:@srcdir@:/:/g
15605 s/^:*//
15606 s/:*$//
15607 x
15608 s/\(=[   ]*\).*/\1/
15609 G
15610 s/\n//
15611 s/^[^=]*=[       ]*$//
15612 }'
15613 fi
15614
15615 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15616 fi # test -n "$CONFIG_FILES"
15617
15618 # Set up the scripts for CONFIG_HEADERS section.
15619 # No need to generate them if there are no CONFIG_HEADERS.
15620 # This happens for instance with `./config.status Makefile'.
15621 if test -n "$CONFIG_HEADERS"; then
15622 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15623 BEGIN {
15624 _ACEOF
15625
15626 # Transform confdefs.h into an awk script `defines.awk', embedded as
15627 # here-document in config.status, that substitutes the proper values into
15628 # config.h.in to produce config.h.
15629
15630 # Create a delimiter string that does not exist in confdefs.h, to ease
15631 # handling of long lines.
15632 ac_delim='%!_!# '
15633 for ac_last_try in false false :; do
15634   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15635   if test -z "$ac_tt"; then
15636     break
15637   elif $ac_last_try; then
15638     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15639   else
15640     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15641   fi
15642 done
15643
15644 # For the awk script, D is an array of macro values keyed by name,
15645 # likewise P contains macro parameters if any.  Preserve backslash
15646 # newline sequences.
15647
15648 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15649 sed -n '
15650 s/.\{148\}/&'"$ac_delim"'/g
15651 t rset
15652 :rset
15653 s/^[     ]*#[    ]*define[       ][      ]*/ /
15654 t def
15655 d
15656 :def
15657 s/\\$//
15658 t bsnl
15659 s/["\\]/\\&/g
15660 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15661 D["\1"]=" \3"/p
15662 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
15663 d
15664 :bsnl
15665 s/["\\]/\\&/g
15666 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15667 D["\1"]=" \3\\\\\\n"\\/p
15668 t cont
15669 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15670 t cont
15671 d
15672 :cont
15673 n
15674 s/.\{148\}/&'"$ac_delim"'/g
15675 t clear
15676 :clear
15677 s/\\$//
15678 t bsnlc
15679 s/["\\]/\\&/g; s/^/"/; s/$/"/p
15680 d
15681 :bsnlc
15682 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15683 b cont
15684 ' <confdefs.h | sed '
15685 s/'"$ac_delim"'/"\\\
15686 "/g' >>$CONFIG_STATUS || ac_write_fail=1
15687
15688 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15689   for (key in D) D_is_set[key] = 1
15690   FS = "\a"
15691 }
15692 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15693   line = \$ 0
15694   split(line, arg, " ")
15695   if (arg[1] == "#") {
15696     defundef = arg[2]
15697     mac1 = arg[3]
15698   } else {
15699     defundef = substr(arg[1], 2)
15700     mac1 = arg[2]
15701   }
15702   split(mac1, mac2, "(") #)
15703   macro = mac2[1]
15704   prefix = substr(line, 1, index(line, defundef) - 1)
15705   if (D_is_set[macro]) {
15706     # Preserve the white space surrounding the "#".
15707     print prefix "define", macro P[macro] D[macro]
15708     next
15709   } else {
15710     # Replace #undef with comments.  This is necessary, for example,
15711     # in the case of _POSIX_SOURCE, which is predefined and required
15712     # on some systems where configure will not decide to define it.
15713     if (defundef == "undef") {
15714       print "/*", prefix defundef, macro, "*/"
15715       next
15716     }
15717   }
15718 }
15719 { print }
15720 _ACAWK
15721 _ACEOF
15722 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15723   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15724 fi # test -n "$CONFIG_HEADERS"
15725
15726
15727 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
15728 shift
15729 for ac_tag
15730 do
15731   case $ac_tag in
15732   :[FHLC]) ac_mode=$ac_tag; continue;;
15733   esac
15734   case $ac_mode$ac_tag in
15735   :[FHL]*:*);;
15736   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15737   :[FH]-) ac_tag=-:-;;
15738   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15739   esac
15740   ac_save_IFS=$IFS
15741   IFS=:
15742   set x $ac_tag
15743   IFS=$ac_save_IFS
15744   shift
15745   ac_file=$1
15746   shift
15747
15748   case $ac_mode in
15749   :L) ac_source=$1;;
15750   :[FH])
15751     ac_file_inputs=
15752     for ac_f
15753     do
15754       case $ac_f in
15755       -) ac_f="$ac_tmp/stdin";;
15756       *) # Look for the file first in the build tree, then in the source tree
15757          # (if the path is not absolute).  The absolute path cannot be DOS-style,
15758          # because $ac_f cannot contain `:'.
15759          test -f "$ac_f" ||
15760            case $ac_f in
15761            [\\/$]*) false;;
15762            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15763            esac ||
15764            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15765       esac
15766       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15767       as_fn_append ac_file_inputs " '$ac_f'"
15768     done
15769
15770     # Let's still pretend it is `configure' which instantiates (i.e., don't
15771     # use $as_me), people would be surprised to read:
15772     #    /* config.h.  Generated by config.status.  */
15773     configure_input='Generated from '`
15774           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15775         `' by configure.'
15776     if test x"$ac_file" != x-; then
15777       configure_input="$ac_file.  $configure_input"
15778       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15779 $as_echo "$as_me: creating $ac_file" >&6;}
15780     fi
15781     # Neutralize special characters interpreted by sed in replacement strings.
15782     case $configure_input in #(
15783     *\&* | *\|* | *\\* )
15784        ac_sed_conf_input=`$as_echo "$configure_input" |
15785        sed 's/[\\\\&|]/\\\\&/g'`;; #(
15786     *) ac_sed_conf_input=$configure_input;;
15787     esac
15788
15789     case $ac_tag in
15790     *:-:* | *:-) cat >"$ac_tmp/stdin" \
15791       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15792     esac
15793     ;;
15794   esac
15795
15796   ac_dir=`$as_dirname -- "$ac_file" ||
15797 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15798          X"$ac_file" : 'X\(//\)[^/]' \| \
15799          X"$ac_file" : 'X\(//\)$' \| \
15800          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15801 $as_echo X"$ac_file" |
15802     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15803             s//\1/
15804             q
15805           }
15806           /^X\(\/\/\)[^/].*/{
15807             s//\1/
15808             q
15809           }
15810           /^X\(\/\/\)$/{
15811             s//\1/
15812             q
15813           }
15814           /^X\(\/\).*/{
15815             s//\1/
15816             q
15817           }
15818           s/.*/./; q'`
15819   as_dir="$ac_dir"; as_fn_mkdir_p
15820   ac_builddir=.
15821
15822 case "$ac_dir" in
15823 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15824 *)
15825   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15826   # A ".." for each directory in $ac_dir_suffix.
15827   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15828   case $ac_top_builddir_sub in
15829   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15830   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15831   esac ;;
15832 esac
15833 ac_abs_top_builddir=$ac_pwd
15834 ac_abs_builddir=$ac_pwd$ac_dir_suffix
15835 # for backward compatibility:
15836 ac_top_builddir=$ac_top_build_prefix
15837
15838 case $srcdir in
15839   .)  # We are building in place.
15840     ac_srcdir=.
15841     ac_top_srcdir=$ac_top_builddir_sub
15842     ac_abs_top_srcdir=$ac_pwd ;;
15843   [\\/]* | ?:[\\/]* )  # Absolute name.
15844     ac_srcdir=$srcdir$ac_dir_suffix;
15845     ac_top_srcdir=$srcdir
15846     ac_abs_top_srcdir=$srcdir ;;
15847   *) # Relative name.
15848     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15849     ac_top_srcdir=$ac_top_build_prefix$srcdir
15850     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15851 esac
15852 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15853
15854
15855   case $ac_mode in
15856   :F)
15857   #
15858   # CONFIG_FILE
15859   #
15860
15861   case $INSTALL in
15862   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15863   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15864   esac
15865 _ACEOF
15866
15867 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15868 # If the template does not know about datarootdir, expand it.
15869 # FIXME: This hack should be removed a few years after 2.60.
15870 ac_datarootdir_hack=; ac_datarootdir_seen=
15871 ac_sed_dataroot='
15872 /datarootdir/ {
15873   p
15874   q
15875 }
15876 /@datadir@/p
15877 /@docdir@/p
15878 /@infodir@/p
15879 /@localedir@/p
15880 /@mandir@/p'
15881 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15882 *datarootdir*) ac_datarootdir_seen=yes;;
15883 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15884   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15885 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15886 _ACEOF
15887 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15888   ac_datarootdir_hack='
15889   s&@datadir@&$datadir&g
15890   s&@docdir@&$docdir&g
15891   s&@infodir@&$infodir&g
15892   s&@localedir@&$localedir&g
15893   s&@mandir@&$mandir&g
15894   s&\\\${datarootdir}&$datarootdir&g' ;;
15895 esac
15896 _ACEOF
15897
15898 # Neutralize VPATH when `$srcdir' = `.'.
15899 # Shell code in configure.ac might set extrasub.
15900 # FIXME: do we really want to maintain this feature?
15901 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15902 ac_sed_extra="$ac_vpsub
15903 $extrasub
15904 _ACEOF
15905 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15906 :t
15907 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15908 s|@configure_input@|$ac_sed_conf_input|;t t
15909 s&@top_builddir@&$ac_top_builddir_sub&;t t
15910 s&@top_build_prefix@&$ac_top_build_prefix&;t t
15911 s&@srcdir@&$ac_srcdir&;t t
15912 s&@abs_srcdir@&$ac_abs_srcdir&;t t
15913 s&@top_srcdir@&$ac_top_srcdir&;t t
15914 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15915 s&@builddir@&$ac_builddir&;t t
15916 s&@abs_builddir@&$ac_abs_builddir&;t t
15917 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15918 s&@INSTALL@&$ac_INSTALL&;t t
15919 $ac_datarootdir_hack
15920 "
15921 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15922   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15923
15924 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15925   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15926   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
15927       "$ac_tmp/out"`; test -z "$ac_out"; } &&
15928   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15929 which seems to be undefined.  Please make sure it is defined" >&5
15930 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15931 which seems to be undefined.  Please make sure it is defined" >&2;}
15932
15933   rm -f "$ac_tmp/stdin"
15934   case $ac_file in
15935   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15936   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
15937   esac \
15938   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15939  ;;
15940   :H)
15941   #
15942   # CONFIG_HEADER
15943   #
15944   if test x"$ac_file" != x-; then
15945     {
15946       $as_echo "/* $configure_input  */" \
15947       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15948     } >"$ac_tmp/config.h" \
15949       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15950     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
15951       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15952 $as_echo "$as_me: $ac_file is unchanged" >&6;}
15953     else
15954       rm -f "$ac_file"
15955       mv "$ac_tmp/config.h" "$ac_file" \
15956         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15957     fi
15958   else
15959     $as_echo "/* $configure_input  */" \
15960       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15961       || as_fn_error $? "could not create -" "$LINENO" 5
15962   fi
15963  ;;
15964
15965   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15966 $as_echo "$as_me: executing $ac_file commands" >&6;}
15967  ;;
15968   esac
15969
15970
15971   case $ac_file$ac_mode in
15972     "default-1":C)
15973
15974 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
15975 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
15976   rm -f intltool-extract.out
15977 else
15978   mv -f intltool-extract.out intltool-extract
15979 fi
15980 chmod ugo+x intltool-extract
15981 chmod u+w intltool-extract
15982
15983 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
15984 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
15985   rm -f intltool-merge.out
15986 else
15987   mv -f intltool-merge.out intltool-merge
15988 fi
15989 chmod ugo+x intltool-merge
15990 chmod u+w intltool-merge
15991
15992 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
15993 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
15994   rm -f intltool-update.out
15995 else
15996   mv -f intltool-update.out intltool-update
15997 fi
15998 chmod ugo+x intltool-update
15999 chmod u+w intltool-update
16000
16001  ;;
16002     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
16003         rm -f po/stamp-it po/stamp-it.tmp
16004         > po/stamp-it.tmp
16005         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
16006         mv po/stamp-it.tmp po/stamp-it
16007       esac ;;
16008
16009   esac
16010 done # for ac_tag
16011
16012
16013 as_fn_exit 0
16014 _ACEOF
16015 ac_clean_files=$ac_clean_files_save
16016
16017 test $ac_write_fail = 0 ||
16018   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16019
16020
16021 # configure is writing to config.log, and then calls config.status.
16022 # config.status does its own redirection, appending to config.log.
16023 # Unfortunately, on DOS this fails, as config.log is still kept open
16024 # by configure, so config.status won't be able to write to it; its
16025 # output is simply discarded.  So we exec the FD to /dev/null,
16026 # effectively closing config.log, so it can be properly (re)opened and
16027 # appended to by config.status.  When coming back to configure, we
16028 # need to make the FD available again.
16029 if test "$no_create" != yes; then
16030   ac_cs_success=:
16031   ac_config_status_args=
16032   test "$silent" = yes &&
16033     ac_config_status_args="$ac_config_status_args --quiet"
16034   exec 5>/dev/null
16035   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16036   exec 5>>config.log
16037   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16038   # would make configure fail if this is the last instruction.
16039   $ac_cs_success || as_fn_exit 1
16040 fi
16041 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16042   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16043 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16044 fi
16045
16046
16047 ###############################################################################
16048 #
16049 #       Print some warnings at the end.
16050 #
16051 ###############################################################################
16052
16053 warn_prefix_1="    Warning:"
16054 warn_prefix_2="       Note:"
16055 warn_prefix="$warn_prefix_1"
16056
16057 warning=no
16058 warnsep='    #################################################################'
16059
16060 warnpre() {
16061   if test "$warning" = no ; then
16062     echo '' ; echo "$warnsep" ; echo ''
16063     warning=yes
16064   fi
16065 }
16066
16067 warn() {
16068   warnpre
16069   if test "$warning" = long ; then echo '' ; fi
16070   warning=yes
16071   rest="$@"
16072   echo "$warn_prefix $rest"
16073 }
16074
16075 warnL() {
16076   was=$warning
16077   warnpre
16078   warning=yes
16079   if test "$was" != no ; then echo '' ; fi
16080   rest="$@"
16081   echo "$warn_prefix $rest"
16082 }
16083
16084 warn2() {
16085   rest="$@"
16086   echo "             $rest"
16087   warning=long
16088 }
16089
16090 note() {
16091   warn_prefix="$warn_prefix_2"
16092   warn $@
16093   warn_prefix="$warn_prefix_1"
16094 }
16095
16096 noteL() {
16097   warn_prefix="$warn_prefix_2"
16098   warnL $@
16099   warn_prefix="$warn_prefix_1"
16100 }
16101
16102
16103 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
16104   warn 'The SGI saver extension was requested, but was not found.'
16105 fi
16106
16107 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
16108   warn 'The XIdle extension was requested, but was not found.'
16109 fi
16110
16111 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
16112   warn 'The XSHM extension was requested, but was not found.'
16113 fi
16114
16115 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
16116   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
16117 fi
16118
16119 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
16120   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
16121 fi
16122
16123 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
16124   warn 'The DPMS extension was requested, but was not found.'
16125 fi
16126
16127 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
16128   warn 'The Xinerama extension was requested, but was not found.'
16129 fi
16130
16131 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
16132   warn 'The XF86VMODE extension was requested, but was not found.'
16133 fi
16134
16135 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
16136   warn 'The RANDR extension was requested, but was not found.'
16137 fi
16138
16139 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
16140   warn "Checking of /proc/interrupts was requested, but it's bogus."
16141 fi
16142
16143 if test "$pkg_config" = false ; then
16144   warnL 'The "pkg-config" program was not found.  Without that,'
16145   warn2 "detection of the various GTK libraries won't work."
16146 else
16147   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
16148   if test "x$pkgerr" != "x" ; then
16149     warnL 'The "pkg-config" program produces errors.  This often causes'
16150     warn2 "detection of the various GTK libraries to malfunction."
16151     warn2 "The errors are:"
16152     echo ''
16153     echo "$pkgerr" | sed 's/^/             > /g'
16154   fi
16155 fi
16156
16157 if test "$gtk_halfassed" != no ; then
16158   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
16159   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
16160   warn2 "Perhaps some of the development packages are not installed?"
16161   if test "$have_gtk" = yes ; then
16162     v="$ac_gtk_version_string"
16163     warn2 "GTK $v is also installed, so it will be used instead."
16164     warn2 "Please read the above output and the \`config.log' file"
16165     warn2 "for more details."
16166   fi
16167 fi
16168
16169 motif_warn2() {
16170   warn2 'Though the Motif front-end to xscreensaver is still'
16171   warn2 'maintained, it is no longer being updated with new'
16172   warn2 'features: all new development on the xscreensaver-demo'
16173   warn2 'program is happening in the GTK version, and not in the'
16174   warn2 'Motif version.  It is recommended that you build against'
16175   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
16176 }
16177
16178 if test "$have_motif" = no -a "$have_gtk" = no; then
16179
16180   if test "$with_motif" = yes; then
16181     warnL "Neither the GTK nor Motif libraries were found; the"
16182     warn2 "\`xscreensaver-demo' program requires one of these."
16183     echo ''
16184     motif_warn2
16185   else
16186     warnL "The GTK libraries do not seem to be available; the"
16187     warn2 "\`xscreensaver-demo' program requires them."
16188 #   echo ''
16189 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
16190 #   warn2 "\`--with-motif' option) but that is NOT recommended."
16191 #   motif_warn2
16192   fi
16193
16194 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
16195   warnL "Use of Motif was requested, but it wasn't found;"
16196   warn2 "Gtk will be used instead."
16197
16198 elif test "$jurassic_gtk" = yes ; then
16199
16200   pref_gtk=2.0
16201
16202   v="$ac_gtk_version_string"
16203   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
16204     warnL "Use of Gtk was requested, but its version number is unknown;"
16205   elif test "$with_gtk_req" = yes ; then
16206     warnL "Use of Gtk was requested, but it is version $v;"
16207   else
16208     warnL "Gtk was found on this system, but it is version $v;"
16209   fi
16210
16211   warn2 "Gtk $pref_gtk or newer is required."
16212
16213 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
16214   warnL "Use of Gtk was requested, but it wasn't found."
16215 fi
16216
16217
16218 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
16219   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
16220   warn2 "headers were not found.  That can't be good.  Please"
16221   warn2 "install the GDK-Pixbuf development kit and re-configure."
16222 fi
16223
16224 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
16225
16226   preferred_lesstif=0.92
16227
16228   if test "$lesstif_version" = unknown; then
16229     warnL "Unable to determine the LessTif version number!"
16230     warn2 "Make sure you are using version $preferred_lesstif or newer."
16231     warn2 "See <http://www.lesstif.org/>."
16232
16233   elif test \! $lesstif_version -gt 82; then
16234     warnL "LessTif version $lesstif_version_string is being used."
16235     warn2 "LessTif versions 0.82 and earlier are too buggy to"
16236     warn2 "use with XScreenSaver; it is strongly recommended"
16237     warn2 "that you upgrade to at least version $preferred_lesstif!"
16238     warn2 "See <http://www.lesstif.org/>."
16239   fi
16240 fi
16241
16242
16243 if test "$have_motif" = yes -a "$have_gtk" = no ; then
16244   warn  'Motif is being used, and GTK is not.'
16245   echo  ''
16246   motif_warn2
16247 fi
16248
16249
16250 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
16251   warnL 'Use of XPM was requested, but it was not found.'
16252 fi
16253
16254 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
16255   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
16256 fi
16257
16258 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
16259    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
16260
16261   if test "$with_gdk_pixbuf_req" = yes ; then
16262     true
16263   elif test "$with_gdk_pixbuf_req" = no ; then
16264     warnL 'The GDK-Pixbuf library is not being used.'
16265   else
16266     warnL 'The GDK-Pixbuf library was not found.'
16267   fi
16268
16269   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
16270     true
16271   elif test "$with_xpm_req" = no ; then
16272     warnL 'The XPM library is not being used.'
16273   else
16274     warnL 'The XPM library was not found.'
16275   fi
16276
16277   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
16278     warn2 'The XPM library is being used instead.'
16279   fi
16280
16281   if test "$gdk_pixbuf_halfassed" = yes ; then
16282     echo ''
16283     warn2 'More specifically, we found the headers, but not the'
16284     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
16285     warn2 "system, or something else went wrong.  The \`config.log'"
16286     warn2 'file might contain some clues.'
16287   fi
16288
16289   echo ''
16290   warn2 'Some of the demos will not use images as much as they could.'
16291   warn2 'You should consider installing GDK-Pixbuf and re-running'
16292   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
16293   warn2 'provides support for more image formats.)'
16294 fi
16295
16296
16297 if test "$have_jpeg" = no ; then
16298   if test "$with_jpeg_req" = yes ; then
16299     warnL 'Use of libjpeg was requested, but it was not found.'
16300   elif test "$with_jpeg_req" = no ; then
16301     noteL 'The JPEG library is not being used.'
16302   else
16303     noteL 'The JPEG library was not found.'
16304   fi
16305
16306   if test "$jpeg_halfassed" = yes ; then
16307     echo ''
16308     warn2 'More specifically, we found the headers, but not the'
16309     warn2 'library; so either JPEG is half-installed on this'
16310     warn2 "system, or something else went wrong.  The \`config.log'"
16311     warn2 'file might contain some clues.'
16312     echo ''
16313   fi
16314
16315   if test "$have_gdk_pixbuf" = no ; then
16316     warn2 "This means that it won't be possible for the image-manipulating"
16317     warn2 "display modes to load files from disk; and it also means that"
16318     warn2 "the \`webcollage' program will be much slower."
16319   else
16320     warn2 "This means the \`webcollage' program will be much slower."
16321   fi
16322 fi
16323
16324
16325 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
16326   preferred_mesagl=3.4
16327   mgv="$ac_mesagl_version_string"
16328   pgl="$preferred_mesagl"
16329
16330   if test "$ac_mesagl_version" = unknown; then
16331     true
16332     # warnL "Unable to determine the MesaGL version number!"
16333     # warn2 "Make sure you are using version $preferred_mesagl or newer."
16334
16335   elif test \! "$ac_mesagl_version" -gt 2006; then
16336     warnL "MesaGL version number is $mgv --"
16337     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
16338     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
16339
16340   elif test \! "$ac_mesagl_version" -gt 3003; then
16341     warnL "MesaGL version number is $mgv --"
16342     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
16343     warn2 "that you upgrade to $pgl or newer."
16344   fi
16345 fi
16346
16347 if test "$have_gl" = no ; then
16348   if test "$with_gl_req" = yes ; then
16349     warnL 'Use of GL was requested, but it was not found.'
16350   elif test "$with_gl_req" = no ; then
16351     noteL 'The OpenGL 3D library is not being used.'
16352   else
16353     noteL 'The OpenGL 3D library was not found.'
16354   fi
16355
16356   if test "$gl_halfassed" = yes ; then
16357     echo ''
16358     warn2 'More specifically, we found the headers, but not the'
16359     warn2 'libraries; so either GL is half-installed on this'
16360     warn2 "system, or something else went wrong.  The \`config.log'"
16361     warn2 'file might contain some clues.'
16362   fi
16363
16364   echo ''
16365   warn2 'Those demos which use 3D will not be built or installed.'
16366   warn2 'You might want to consider installing OpenGL and'
16367   warn2 "re-running configure.  If your vendor doesn't ship"
16368   warn2 'their own implementation of OpenGL, you can get a free'
16369   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
16370   warn2 'info, see <http://www.opengl.org/>.'
16371
16372 fi
16373
16374
16375 if test "$have_gl" = yes -a "$have_gle" = no ; then
16376
16377  # nobody cares about this; don't print the warning unless it was
16378  # requested and not found, or halfway-found.
16379  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
16380
16381   if test "$with_gle_req" = yes ; then
16382     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
16383     warn2 'it was not found (though the OpenGL library was found, and'
16384     warn2 'is being used.)'
16385   elif test "$with_gle_req" = no ; then
16386     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
16387     warn2 'library is not.'
16388   else
16389     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
16390     warn2 'was not.'
16391   fi
16392
16393   if test "$gle_halfassed" = yes ; then
16394     echo ''
16395     warn2 'More specifically, we found the headers, but not the'
16396     warn2 'libraries; so either GLE is half-installed on this'
16397     warn2 "system, or something else went wrong.  The \`config.log'"
16398     warn2 'file might contain some clues.'
16399   fi
16400
16401   echo ''
16402   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
16403   warn2 'will not be built or installed.  You might want to consider'
16404   warn2 'installing GLE and re-running configure.  You can find the'
16405   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
16406   warn2 'OpenGL info, see <http://www.opengl.org/>.'
16407
16408  fi
16409 fi
16410
16411
16412 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
16413   warn 'Use of XReadDisplay was requested, but it was not found.'
16414 fi
16415
16416 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
16417   warn 'Use of Kerberos was requested, but it was not found.'
16418 fi
16419
16420 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
16421   warn 'Use of PAM was requested, but it was not found.'
16422 fi
16423
16424 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
16425   warn 'Use of shadow passwords was requested, but they were not found.'
16426 fi
16427
16428 if test "$ac_macosx" = yes ; then
16429   if test "$enable_locking" = yes ; then
16430     warn  "You have specified --enable-locking on MacOS X."
16431     warn2 "THIS DOES NOT WORK!  Don't do this!"
16432   fi
16433 fi
16434
16435
16436 # You are in a twisty maze of namespaces and syntaxes, all alike.
16437 # Fuck the skull of Unix.
16438 #
16439 bindir=`eval eval eval eval eval eval eval echo $bindir`
16440 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
16441 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
16442
16443 # canonicalize slashes.
16444 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
16445 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
16446 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
16447
16448
16449 # Sanity check the hackdir
16450 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
16451   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
16452     echo ""
16453     as_fn_error $? "\"--with-hackdir=${bindir}/${bad_choice}\" won't work.
16454                    There will be an executable installed with that name, so
16455                    that can't be the name of a directory as well.  Please
16456                    re-configure with a different directory name." "$LINENO" 5
16457   fi
16458 done
16459
16460
16461 do_dir_warning=no
16462
16463 # Now let's warn if there's a previous RPM version already installed.
16464 # But don't bother with this test if we are currently *building* an RPM.
16465
16466 if test -z "$RPM_PACKAGE_VERSION" ; then
16467
16468   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
16469
16470   # M4 sucks!!
16471
16472   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
16473         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
16474         head -1`
16475
16476
16477   if test \! -z "$rpmv" ; then
16478     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
16479     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
16480
16481     warning=no
16482     warnL "There is already an installed RPM of xscreensaver $rpmv"
16483     warn2 'on this system.  You might want to remove it ("rpm -ve")'
16484     warn2 'before running "make install" in this directory.'
16485     echo ""
16486     warn2 "Alternately, you could build this version of xscreensaver"
16487     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
16488     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
16489     warn2 "See the RPM documentation for more info."
16490     echo ""
16491
16492     if test "$rpmbdir" = "$rpmhdir" ; then
16493       warn2 "The RPM version was installed in $rpmbdir/."
16494       do_dir_warning=yes
16495     else
16496       warn2 "The RPM version was installed in $rpmbdir/,"
16497       warn2 "with demos in $rpmhdir/."
16498     fi
16499   fi
16500 fi
16501
16502 # Also warn if there's a Debian package installed.
16503 #
16504 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
16505 debv=''
16506 for dpkg in $debnames ; do
16507   if test -z "$debv"; then
16508     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
16509   fi
16510 done
16511
16512 if test \! -z "$debv" ; then
16513   debbdir=`dpkg -L $debnames 2>/dev/null | \
16514             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
16515   debhdir=`dpkg -L $debnames 2>/dev/null | \
16516             sed -n 's@^\(.*/\)popsquares$@\1@p'`
16517   if test -z "$debbdir" ; then debbdir='???'; fi
16518   if test -z "$debhdir" ; then debhdir='???'; fi
16519
16520   warning=no
16521   warnL "There is already an installed dpkg of xscreensaver"
16522   warn2 "version \"$debv\" on this system."
16523   echo ""
16524   warn2 "The dpkg was installed in $debbdir,"
16525   warn2 "with demos in $debhdir."
16526 fi
16527
16528
16529 if test "${bindir}" = "${HACKDIR}" ; then
16530   do_dir_warning=yes
16531 fi
16532
16533 if test "$do_dir_warning" = yes; then
16534   echo ""
16535   echo "$warnsep"
16536   echo ""
16537   echo '      When you run "make install", the "xscreensaver",'
16538   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
16539   echo "      will be installed in ${bindir}/."
16540   echo ""
16541   echo "      The various graphics demos (190+ different executables) will"
16542   echo "      be installed in ${HACKDIR}/."
16543   echo ""
16544   echo "      If you would prefer the demos to be installed elsewhere,"
16545   echo "      you should re-run configure with the --with-hackdir=DIR"
16546   echo "      option.  For more information, run \`./configure --help'."
16547   warning=yes
16548 fi
16549
16550 if test "$warning" != no; then
16551   echo '' ; echo "$warnsep" ; echo ''
16552 fi
16553
16554 if test "$do_dir_warning" = no; then
16555   if test "$warning" = no; then
16556     echo ''
16557   fi
16558   echo "User programs will be installed in ${bindir}/"
16559   echo "Screen savers will be installed in ${HACKDIR}/"
16560   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
16561   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
16562   echo ''
16563 fi