From http://www.jwz.org/xscreensaver/xscreensaver-5.30.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_subst_vars='LTLIBOBJS
623 LIBOBJS
624 DEPEND_DEFINES
625 DEPEND_FLAGS
626 DEPEND
627 APPDEFAULTS
628 GTK_EXTRA_OBJS
629 HACK_CONF_DIR
630 PO_DATADIR
631 GTK_DATADIR
632 HACKDIR_FULL
633 HACKDIR
634 NOGNOME
635 GNOME22
636 GNOME24
637 JWZGLES_OBJS
638 GLE_KLUDGE
639 GLE_EXES
640 GL_KLUDGE
641 GL_MEN
642 GL_UTIL_EXES
643 SUID_EXES
644 RETIRED_GL_EXES
645 GL_EXES
646 JPEG_EXES
647 LOCK_OBJS
648 LOCK_SRCS
649 SAVER_GL_LIBS
650 SAVER_GL_OBJS
651 SAVER_GL_SRCS
652 XMU_LIBS
653 XMU_OBJS
654 XMU_SRCS
655 PASSWD_OBJS
656 PASSWD_SRCS
657 MEN_OSX
658 SCRIPTS_OSX
659 EXES_OSX
660 OBJCC
661 COMMENT_DEMO_GLADE2_GTK_2_22_TAIL
662 COMMENT_DEMO_GLADE2_GTK_2_22_HEAD
663 WITH_BROWSER
664 DEFAULT_TEXT_FILE
665 DEFAULT_IMAGE_DIRECTORY
666 DEFAULT_IMAGES_P
667 NEW_LOGIN_COMMAND_P
668 NEW_LOGIN_COMMAND
669 COMMENT_PAM_CHECK_ACCOUNT
670 HAVE_PAM_FAIL_DELAY
671 INSTALL_PAM
672 NEED_SETUID
673 INSTALL_DIRS
674 SETUID_HACKS
675 INSTALL_SETUID
676 PASSWD_LIBS
677 XINERAMA_LIBS
678 XDPMS_LIBS
679 GLE_LIBS
680 GL_LIBS
681 PTY_LIBS
682 XPM_LIBS
683 HACK_LIBS
684 JPEG_LIBS
685 XML_LIBS
686 GTK_LIBS
687 MOTIF_LIBS
688 SAVER_LIBS
689 ALL_DEMO_PROGRAMS
690 PREFERRED_DEMO_PROGRAM
691 INCLUDES
692 gnome_url_show_program
693 gnome_open_program
694 pkg_config
695 login_manager_tmp
696 MKINSTALLDIRS
697 POSUB
698 POFILES
699 PO_IN_DATADIR_FALSE
700 PO_IN_DATADIR_TRUE
701 INTLLIBS
702 INSTOBJEXT
703 GMOFILES
704 CATOBJEXT
705 CATALOGS
706 MSGFMT_OPTS
707 GETTEXT_PACKAGE
708 DATADIRNAME
709 ALL_LINGUAS
710 GMSGFMT
711 MSGFMT
712 MSGMERGE
713 XGETTEXT
714 INTLTOOL_POLICY_RULE
715 INTLTOOL_SERVICE_RULE
716 INTLTOOL_THEME_RULE
717 INTLTOOL_SCHEMAS_RULE
718 INTLTOOL_CAVES_RULE
719 INTLTOOL_XML_NOMERGE_RULE
720 INTLTOOL_XML_RULE
721 INTLTOOL_KBD_RULE
722 INTLTOOL_XAM_RULE
723 INTLTOOL_UI_RULE
724 INTLTOOL_SOUNDLIST_RULE
725 INTLTOOL_SHEET_RULE
726 INTLTOOL_SERVER_RULE
727 INTLTOOL_PONG_RULE
728 INTLTOOL_OAF_RULE
729 INTLTOOL_PROP_RULE
730 INTLTOOL_KEYS_RULE
731 INTLTOOL_DIRECTORY_RULE
732 INTLTOOL_DESKTOP_RULE
733 intltool__v_merge_options_0
734 intltool__v_merge_options_
735 INTLTOOL_V_MERGE_OPTIONS
736 INTLTOOL__v_MERGE_0
737 INTLTOOL__v_MERGE_
738 INTLTOOL_V_MERGE
739 AM_DEFAULT_VERBOSITY
740 INTLTOOL_EXTRACT
741 INTLTOOL_MERGE
742 INTLTOOL_UPDATE
743 USE_NLS
744 X_EXTRA_LIBS
745 X_LIBS
746 X_PRE_LIBS
747 X_CFLAGS
748 XMKMF
749 PERL
750 EGREP
751 GREP
752 SET_MAKE
753 INSTALL_DATA
754 INSTALL_SCRIPT
755 INSTALL_PROGRAM
756 CPP
757 PTHREAD_CFLAGS
758 PTHREAD_LIBS
759 PTHREAD_CC
760 ax_pthread_config
761 OBJEXT
762 EXEEXT
763 ac_ct_CC
764 CPPFLAGS
765 LDFLAGS
766 CFLAGS
767 CC
768 host_os
769 host_vendor
770 host_cpu
771 host
772 build_os
773 build_vendor
774 build_cpu
775 build
776 target_alias
777 host_alias
778 build_alias
779 LIBS
780 ECHO_T
781 ECHO_N
782 ECHO_C
783 DEFS
784 mandir
785 localedir
786 libdir
787 psdir
788 pdfdir
789 dvidir
790 htmldir
791 infodir
792 docdir
793 oldincludedir
794 includedir
795 localstatedir
796 sharedstatedir
797 sysconfdir
798 datadir
799 datarootdir
800 libexecdir
801 sbindir
802 bindir
803 program_transform_name
804 prefix
805 exec_prefix
806 PACKAGE_URL
807 PACKAGE_BUGREPORT
808 PACKAGE_STRING
809 PACKAGE_VERSION
810 PACKAGE_TARNAME
811 PACKAGE_NAME
812 PATH_SEPARATOR
813 SHELL'
814 ac_subst_files=''
815 ac_user_opts='
816 enable_option_checking
817 with_x_app_defaults
818 with_pthread
819 enable_largefile
820 with_x
821 enable_nls
822 with_hackdir
823 enable_subdir
824 with_configdir
825 with_dpms_ext
826 with_xinerama_ext
827 with_xinput_ext
828 with_xf86vmode_ext
829 with_xf86gamma_ext
830 with_randr_ext
831 with_proc_interrupts
832 enable_locking
833 enable_root_passwd
834 with_pam
835 with_pam_service_name
836 enable_pam_check_account_type
837 with_kerberos
838 with_shadow
839 with_passwd_helper
840 with_login_manager
841 with_gtk
842 with_motif
843 with_gl
844 with_gle
845 with_gles
846 with_pixbuf
847 with_xpm
848 with_jpeg
849 with_xshm_ext
850 with_xdbe_ext
851 with_readdisplay
852 with_image_directory
853 with_text_file
854 with_browser
855 with_setuid_hacks
856 '
857       ac_precious_vars='build_alias
858 host_alias
859 target_alias
860 CC
861 CFLAGS
862 LDFLAGS
863 LIBS
864 CPPFLAGS
865 CPP
866 XMKMF'
867
868
869 # Initialize some variables set by options.
870 ac_init_help=
871 ac_init_version=false
872 ac_unrecognized_opts=
873 ac_unrecognized_sep=
874 # The variables have the same names as the options, with
875 # dashes changed to underlines.
876 cache_file=/dev/null
877 exec_prefix=NONE
878 no_create=
879 no_recursion=
880 prefix=NONE
881 program_prefix=NONE
882 program_suffix=NONE
883 program_transform_name=s,x,x,
884 silent=
885 site=
886 srcdir=
887 verbose=
888 x_includes=NONE
889 x_libraries=NONE
890
891 # Installation directory options.
892 # These are left unexpanded so users can "make install exec_prefix=/foo"
893 # and all the variables that are supposed to be based on exec_prefix
894 # by default will actually change.
895 # Use braces instead of parens because sh, perl, etc. also accept them.
896 # (The list follows the same order as the GNU Coding Standards.)
897 bindir='${exec_prefix}/bin'
898 sbindir='${exec_prefix}/sbin'
899 libexecdir='${exec_prefix}/libexec'
900 datarootdir='${prefix}/share'
901 datadir='${datarootdir}'
902 sysconfdir='${prefix}/etc'
903 sharedstatedir='${prefix}/com'
904 localstatedir='${prefix}/var'
905 includedir='${prefix}/include'
906 oldincludedir='/usr/include'
907 docdir='${datarootdir}/doc/${PACKAGE}'
908 infodir='${datarootdir}/info'
909 htmldir='${docdir}'
910 dvidir='${docdir}'
911 pdfdir='${docdir}'
912 psdir='${docdir}'
913 libdir='${exec_prefix}/lib'
914 localedir='${datarootdir}/locale'
915 mandir='${datarootdir}/man'
916
917 ac_prev=
918 ac_dashdash=
919 for ac_option
920 do
921   # If the previous option needs an argument, assign it.
922   if test -n "$ac_prev"; then
923     eval $ac_prev=\$ac_option
924     ac_prev=
925     continue
926   fi
927
928   case $ac_option in
929   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
930   *=)   ac_optarg= ;;
931   *)    ac_optarg=yes ;;
932   esac
933
934   # Accept the important Cygnus configure options, so we can diagnose typos.
935
936   case $ac_dashdash$ac_option in
937   --)
938     ac_dashdash=yes ;;
939
940   -bindir | --bindir | --bindi | --bind | --bin | --bi)
941     ac_prev=bindir ;;
942   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
943     bindir=$ac_optarg ;;
944
945   -build | --build | --buil | --bui | --bu)
946     ac_prev=build_alias ;;
947   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
948     build_alias=$ac_optarg ;;
949
950   -cache-file | --cache-file | --cache-fil | --cache-fi \
951   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
952     ac_prev=cache_file ;;
953   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
954   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
955     cache_file=$ac_optarg ;;
956
957   --config-cache | -C)
958     cache_file=config.cache ;;
959
960   -datadir | --datadir | --datadi | --datad)
961     ac_prev=datadir ;;
962   -datadir=* | --datadir=* | --datadi=* | --datad=*)
963     datadir=$ac_optarg ;;
964
965   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
966   | --dataroo | --dataro | --datar)
967     ac_prev=datarootdir ;;
968   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
969   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
970     datarootdir=$ac_optarg ;;
971
972   -disable-* | --disable-*)
973     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
974     # Reject names that are not valid shell variable names.
975     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
976       as_fn_error $? "invalid feature name: $ac_useropt"
977     ac_useropt_orig=$ac_useropt
978     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
979     case $ac_user_opts in
980       *"
981 "enable_$ac_useropt"
982 "*) ;;
983       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
984          ac_unrecognized_sep=', ';;
985     esac
986     eval enable_$ac_useropt=no ;;
987
988   -docdir | --docdir | --docdi | --doc | --do)
989     ac_prev=docdir ;;
990   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
991     docdir=$ac_optarg ;;
992
993   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
994     ac_prev=dvidir ;;
995   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
996     dvidir=$ac_optarg ;;
997
998   -enable-* | --enable-*)
999     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1000     # Reject names that are not valid shell variable names.
1001     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1002       as_fn_error $? "invalid feature name: $ac_useropt"
1003     ac_useropt_orig=$ac_useropt
1004     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1005     case $ac_user_opts in
1006       *"
1007 "enable_$ac_useropt"
1008 "*) ;;
1009       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1010          ac_unrecognized_sep=', ';;
1011     esac
1012     eval enable_$ac_useropt=\$ac_optarg ;;
1013
1014   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1015   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1016   | --exec | --exe | --ex)
1017     ac_prev=exec_prefix ;;
1018   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1019   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1020   | --exec=* | --exe=* | --ex=*)
1021     exec_prefix=$ac_optarg ;;
1022
1023   -gas | --gas | --ga | --g)
1024     # Obsolete; use --with-gas.
1025     with_gas=yes ;;
1026
1027   -help | --help | --hel | --he | -h)
1028     ac_init_help=long ;;
1029   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1030     ac_init_help=recursive ;;
1031   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1032     ac_init_help=short ;;
1033
1034   -host | --host | --hos | --ho)
1035     ac_prev=host_alias ;;
1036   -host=* | --host=* | --hos=* | --ho=*)
1037     host_alias=$ac_optarg ;;
1038
1039   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1040     ac_prev=htmldir ;;
1041   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1042   | --ht=*)
1043     htmldir=$ac_optarg ;;
1044
1045   -includedir | --includedir | --includedi | --included | --include \
1046   | --includ | --inclu | --incl | --inc)
1047     ac_prev=includedir ;;
1048   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1049   | --includ=* | --inclu=* | --incl=* | --inc=*)
1050     includedir=$ac_optarg ;;
1051
1052   -infodir | --infodir | --infodi | --infod | --info | --inf)
1053     ac_prev=infodir ;;
1054   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1055     infodir=$ac_optarg ;;
1056
1057   -libdir | --libdir | --libdi | --libd)
1058     ac_prev=libdir ;;
1059   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1060     libdir=$ac_optarg ;;
1061
1062   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1063   | --libexe | --libex | --libe)
1064     ac_prev=libexecdir ;;
1065   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1066   | --libexe=* | --libex=* | --libe=*)
1067     libexecdir=$ac_optarg ;;
1068
1069   -localedir | --localedir | --localedi | --localed | --locale)
1070     ac_prev=localedir ;;
1071   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1072     localedir=$ac_optarg ;;
1073
1074   -localstatedir | --localstatedir | --localstatedi | --localstated \
1075   | --localstate | --localstat | --localsta | --localst | --locals)
1076     ac_prev=localstatedir ;;
1077   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1078   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1079     localstatedir=$ac_optarg ;;
1080
1081   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1082     ac_prev=mandir ;;
1083   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1084     mandir=$ac_optarg ;;
1085
1086   -nfp | --nfp | --nf)
1087     # Obsolete; use --without-fp.
1088     with_fp=no ;;
1089
1090   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1091   | --no-cr | --no-c | -n)
1092     no_create=yes ;;
1093
1094   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1095   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1096     no_recursion=yes ;;
1097
1098   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1099   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1100   | --oldin | --oldi | --old | --ol | --o)
1101     ac_prev=oldincludedir ;;
1102   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1103   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1104   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1105     oldincludedir=$ac_optarg ;;
1106
1107   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1108     ac_prev=prefix ;;
1109   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1110     prefix=$ac_optarg ;;
1111
1112   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1113   | --program-pre | --program-pr | --program-p)
1114     ac_prev=program_prefix ;;
1115   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1116   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1117     program_prefix=$ac_optarg ;;
1118
1119   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1120   | --program-suf | --program-su | --program-s)
1121     ac_prev=program_suffix ;;
1122   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1123   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1124     program_suffix=$ac_optarg ;;
1125
1126   -program-transform-name | --program-transform-name \
1127   | --program-transform-nam | --program-transform-na \
1128   | --program-transform-n | --program-transform- \
1129   | --program-transform | --program-transfor \
1130   | --program-transfo | --program-transf \
1131   | --program-trans | --program-tran \
1132   | --progr-tra | --program-tr | --program-t)
1133     ac_prev=program_transform_name ;;
1134   -program-transform-name=* | --program-transform-name=* \
1135   | --program-transform-nam=* | --program-transform-na=* \
1136   | --program-transform-n=* | --program-transform-=* \
1137   | --program-transform=* | --program-transfor=* \
1138   | --program-transfo=* | --program-transf=* \
1139   | --program-trans=* | --program-tran=* \
1140   | --progr-tra=* | --program-tr=* | --program-t=*)
1141     program_transform_name=$ac_optarg ;;
1142
1143   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1144     ac_prev=pdfdir ;;
1145   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1146     pdfdir=$ac_optarg ;;
1147
1148   -psdir | --psdir | --psdi | --psd | --ps)
1149     ac_prev=psdir ;;
1150   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1151     psdir=$ac_optarg ;;
1152
1153   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1154   | -silent | --silent | --silen | --sile | --sil)
1155     silent=yes ;;
1156
1157   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1158     ac_prev=sbindir ;;
1159   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1160   | --sbi=* | --sb=*)
1161     sbindir=$ac_optarg ;;
1162
1163   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1164   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1165   | --sharedst | --shareds | --shared | --share | --shar \
1166   | --sha | --sh)
1167     ac_prev=sharedstatedir ;;
1168   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1169   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1170   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1171   | --sha=* | --sh=*)
1172     sharedstatedir=$ac_optarg ;;
1173
1174   -site | --site | --sit)
1175     ac_prev=site ;;
1176   -site=* | --site=* | --sit=*)
1177     site=$ac_optarg ;;
1178
1179   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1180     ac_prev=srcdir ;;
1181   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1182     srcdir=$ac_optarg ;;
1183
1184   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1185   | --syscon | --sysco | --sysc | --sys | --sy)
1186     ac_prev=sysconfdir ;;
1187   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1188   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1189     sysconfdir=$ac_optarg ;;
1190
1191   -target | --target | --targe | --targ | --tar | --ta | --t)
1192     ac_prev=target_alias ;;
1193   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1194     target_alias=$ac_optarg ;;
1195
1196   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1197     verbose=yes ;;
1198
1199   -version | --version | --versio | --versi | --vers | -V)
1200     ac_init_version=: ;;
1201
1202   -with-* | --with-*)
1203     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1204     # Reject names that are not valid shell variable names.
1205     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1206       as_fn_error $? "invalid package name: $ac_useropt"
1207     ac_useropt_orig=$ac_useropt
1208     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1209     case $ac_user_opts in
1210       *"
1211 "with_$ac_useropt"
1212 "*) ;;
1213       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1214          ac_unrecognized_sep=', ';;
1215     esac
1216     eval with_$ac_useropt=\$ac_optarg ;;
1217
1218   -without-* | --without-*)
1219     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1220     # Reject names that are not valid shell variable names.
1221     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1222       as_fn_error $? "invalid package name: $ac_useropt"
1223     ac_useropt_orig=$ac_useropt
1224     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1225     case $ac_user_opts in
1226       *"
1227 "with_$ac_useropt"
1228 "*) ;;
1229       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1230          ac_unrecognized_sep=', ';;
1231     esac
1232     eval with_$ac_useropt=no ;;
1233
1234   --x)
1235     # Obsolete; use --with-x.
1236     with_x=yes ;;
1237
1238   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1239   | --x-incl | --x-inc | --x-in | --x-i)
1240     ac_prev=x_includes ;;
1241   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1242   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1243     x_includes=$ac_optarg ;;
1244
1245   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1246   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1247     ac_prev=x_libraries ;;
1248   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1249   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1250     x_libraries=$ac_optarg ;;
1251
1252   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1253 Try \`$0 --help' for more information"
1254     ;;
1255
1256   *=*)
1257     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1258     # Reject names that are not valid shell variable names.
1259     case $ac_envvar in #(
1260       '' | [0-9]* | *[!_$as_cr_alnum]* )
1261       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1262     esac
1263     eval $ac_envvar=\$ac_optarg
1264     export $ac_envvar ;;
1265
1266   *)
1267     # FIXME: should be removed in autoconf 3.0.
1268     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1269     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1270       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1271     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1272     ;;
1273
1274   esac
1275 done
1276
1277 if test -n "$ac_prev"; then
1278   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1279   as_fn_error $? "missing argument to $ac_option"
1280 fi
1281
1282 if test -n "$ac_unrecognized_opts"; then
1283   case $enable_option_checking in
1284     no) ;;
1285     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1286     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1287   esac
1288 fi
1289
1290 # Check all directory arguments for consistency.
1291 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1292                 datadir sysconfdir sharedstatedir localstatedir includedir \
1293                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1294                 libdir localedir mandir
1295 do
1296   eval ac_val=\$$ac_var
1297   # Remove trailing slashes.
1298   case $ac_val in
1299     */ )
1300       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1301       eval $ac_var=\$ac_val;;
1302   esac
1303   # Be sure to have absolute directory names.
1304   case $ac_val in
1305     [\\/$]* | ?:[\\/]* )  continue;;
1306     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1307   esac
1308   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1309 done
1310
1311 # There might be people who depend on the old broken behavior: `$host'
1312 # used to hold the argument of --host etc.
1313 # FIXME: To remove some day.
1314 build=$build_alias
1315 host=$host_alias
1316 target=$target_alias
1317
1318 # FIXME: To remove some day.
1319 if test "x$host_alias" != x; then
1320   if test "x$build_alias" = x; then
1321     cross_compiling=maybe
1322   elif test "x$build_alias" != "x$host_alias"; then
1323     cross_compiling=yes
1324   fi
1325 fi
1326
1327 ac_tool_prefix=
1328 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1329
1330 test "$silent" = yes && exec 6>/dev/null
1331
1332
1333 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1334 ac_ls_di=`ls -di .` &&
1335 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1336   as_fn_error $? "working directory cannot be determined"
1337 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1338   as_fn_error $? "pwd does not report name of working directory"
1339
1340
1341 # Find the source files, if location was not specified.
1342 if test -z "$srcdir"; then
1343   ac_srcdir_defaulted=yes
1344   # Try the directory containing this script, then the parent directory.
1345   ac_confdir=`$as_dirname -- "$as_myself" ||
1346 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1347          X"$as_myself" : 'X\(//\)[^/]' \| \
1348          X"$as_myself" : 'X\(//\)$' \| \
1349          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1350 $as_echo X"$as_myself" |
1351     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1352             s//\1/
1353             q
1354           }
1355           /^X\(\/\/\)[^/].*/{
1356             s//\1/
1357             q
1358           }
1359           /^X\(\/\/\)$/{
1360             s//\1/
1361             q
1362           }
1363           /^X\(\/\).*/{
1364             s//\1/
1365             q
1366           }
1367           s/.*/./; q'`
1368   srcdir=$ac_confdir
1369   if test ! -r "$srcdir/$ac_unique_file"; then
1370     srcdir=..
1371   fi
1372 else
1373   ac_srcdir_defaulted=no
1374 fi
1375 if test ! -r "$srcdir/$ac_unique_file"; then
1376   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1377   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1378 fi
1379 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1380 ac_abs_confdir=`(
1381         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1382         pwd)`
1383 # When building in place, set srcdir=.
1384 if test "$ac_abs_confdir" = "$ac_pwd"; then
1385   srcdir=.
1386 fi
1387 # Remove unnecessary trailing slashes from srcdir.
1388 # Double slashes in file names in object file debugging info
1389 # mess up M-x gdb in Emacs.
1390 case $srcdir in
1391 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1392 esac
1393 for ac_var in $ac_precious_vars; do
1394   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1395   eval ac_env_${ac_var}_value=\$${ac_var}
1396   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1397   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1398 done
1399
1400 #
1401 # Report the --help message.
1402 #
1403 if test "$ac_init_help" = "long"; then
1404   # Omit some internal or obsolete options to make the list less imposing.
1405   # This message is too long to be a string in the A/UX 3.1 sh.
1406   cat <<_ACEOF
1407 \`configure' configures this package to adapt to many kinds of systems.
1408
1409 Usage: $0 [OPTION]... [VAR=VALUE]...
1410
1411 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1412 VAR=VALUE.  See below for descriptions of some of the useful variables.
1413
1414 Defaults for the options are specified in brackets.
1415
1416
1417 Configuration:
1418
1419   -h, --help              display this help and exit
1420       --help=short        display options specific to this package
1421       --help=recursive    display the short help of all the included packages
1422   -V, --version           display version information and exit
1423   -q, --quiet, --silent   do not print \`checking ...' messages
1424       --cache-file=FILE   cache test results in FILE [disabled]
1425   -C, --config-cache      alias for \`--cache-file=config.cache'
1426   -n, --no-create         do not create output files
1427       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1428
1429 Installation directories:
1430   --prefix=PREFIX         install architecture-independent files in PREFIX
1431                           [$ac_default_prefix]
1432   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1433                           [PREFIX]
1434
1435 By default, \`make install' will install all the files in
1436 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1437 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438 for instance \`--prefix=\$HOME'.
1439
1440 For better control, use the options below.
1441
1442 Fine tuning of the installation directories:
1443   --bindir=DIR            user executables [EPREFIX/bin]
1444   --libexecdir=DIR        program executables [EPREFIX/libexec]
1445   --libdir=DIR            object code libraries [EPREFIX/lib]
1446   --includedir=DIR        C header files [PREFIX/include]
1447   --x-includes=DIR        X include files are in DIR
1448   --x-libraries=DIR       X library files are in DIR
1449   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1450   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1451   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1452   --mandir=DIR            man documentation [DATAROOTDIR/man]
1453   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1454   --htmldir=DIR           html documentation [DOCDIR]
1455   --dvidir=DIR            dvi documentation [DOCDIR]
1456   --pdfdir=DIR            pdf documentation [DOCDIR]
1457   --psdir=DIR             ps documentation [DOCDIR]
1458 _ACEOF
1459
1460   cat <<\_ACEOF
1461
1462 X features:
1463   --x-includes=DIR    X include files are in DIR
1464   --x-libraries=DIR   X library files are in DIR
1465
1466 System types:
1467   --build=BUILD     configure for building on BUILD [guessed]
1468   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1469 _ACEOF
1470 fi
1471
1472 if test -n "$ac_init_help"; then
1473
1474   cat <<\_ACEOF
1475
1476 Optional Features:
1477   --disable-option-checking  ignore unrecognized --enable/--with options
1478   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1479   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1480   --disable-largefile     omit support for large files
1481   --disable-nls           do not use Native Language Support
1482
1483 Screen locking options:
1484   --enable-locking        Compile in support for locking the display.
1485   --disable-locking       Do not allow locking at all.
1486
1487   --enable-root-passwd        Allow root passwd to unlock screen.
1488   --disable-root-passwd       Do not allow that.
1489   --enable-pam-check-account-type
1490                           Whether PAM should check the result of account
1491                           modules when authenticating. Only do this if you
1492                           have account configured properly on your system.
1493
1494 Optional Packages:
1495   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1496   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1497
1498   --with-pthread          Enables POSIX threads, for SMP support.
1499
1500 Installation options:
1501   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1502                           Default: `PREFIX/libexec/xscreensaver/'
1503   --with-configdir=DIR    Where to install the data files that describe each
1504                           of the display modes to the GUI.
1505                           Default: `PREFIX/share/xscreensaver/config/'
1506   --with-x-app-defaults=DIR
1507                            Where to install xscreensaver configuration file.
1508
1509   --with-dpms-ext         Include support for the DPMS extension.
1510   --with-xinerama-ext     Include support for the XINERAMA extension.
1511   --with-xinput-ext       Include support for the XInput extension.
1512   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1513   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1514   --with-randr-ext        Include support for the X Resize+Rotate extension.
1515   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1516                           file to notice keyboard activity.
1517   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1518   --with-pam-service-name NAME arg is the name of the PAM service that
1519                           xscreensaver will authenticate as.
1520   --with-kerberos         Include support for Kerberos authentication.
1521   --with-shadow           Include support for shadow password authentication.
1522   --with-passwd-helper    Include support for an external password
1523                           verification helper program.
1524   --with-login-manager    Put a "New Login" button on the unlock dialog that
1525                           runs a login manager like gdmflexiserver or kdmctl.
1526
1527 User interface options:
1528
1529   --with-gtk              Use the Gtk toolkit for the user interface.
1530   --with-motif            Use the Motif toolkit for the user interface
1531                           (no longer supported.)
1532
1533 Graphics options:
1534
1535   --with-gl               Build those demos which depend on OpenGL.
1536   --with-gle              Build those demos which depend on GLE
1537                           (the OpenGL "extrusion" library.)
1538   --with-gles             Target OpenGL ES 1.x API instead of OpenGL 1.3.
1539   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1540                           demos, which will make it possible for them to read
1541                           GIF, JPEG, and PNG files as well.
1542   --with-xpm              Include support for XPM files in some demos.
1543                           (Not needed if Pixbuf is used.)
1544   --with-jpeg             Include support for the JPEG library.
1545   --with-xshm-ext         Include support for the Shared Memory extension.
1546   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1547   --with-readdisplay      Include support for the XReadDisplay extension.
1548   --with-image-directory  Arg is the default directory from which some demos
1549                           will choose random images to display.
1550   --with-text-file=FILE   By default, some demos may display this file.
1551   --with-browser=BROWSER  Specify the web browser used to show the help URL.
1552   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1553                           (which is needed in order to ping other hosts.)
1554
1555
1556 Some influential environment variables:
1557   CC          C compiler command
1558   CFLAGS      C compiler flags
1559   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1560               nonstandard directory <lib dir>
1561   LIBS        libraries to pass to the linker, e.g. -l<library>
1562   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1563               you have headers in a nonstandard directory <include dir>
1564   CPP         C preprocessor
1565   XMKMF       Path to xmkmf, Makefile generator for X Window System
1566
1567 Use these variables to override the choices made by `configure' or to help
1568 it to find libraries and programs with nonstandard names/locations.
1569
1570 Report bugs to the package provider.
1571 _ACEOF
1572 ac_status=$?
1573 fi
1574
1575 if test "$ac_init_help" = "recursive"; then
1576   # If there are subdirs, report their specific --help.
1577   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1578     test -d "$ac_dir" ||
1579       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1580       continue
1581     ac_builddir=.
1582
1583 case "$ac_dir" in
1584 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585 *)
1586   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1587   # A ".." for each directory in $ac_dir_suffix.
1588   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1589   case $ac_top_builddir_sub in
1590   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1591   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1592   esac ;;
1593 esac
1594 ac_abs_top_builddir=$ac_pwd
1595 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1596 # for backward compatibility:
1597 ac_top_builddir=$ac_top_build_prefix
1598
1599 case $srcdir in
1600   .)  # We are building in place.
1601     ac_srcdir=.
1602     ac_top_srcdir=$ac_top_builddir_sub
1603     ac_abs_top_srcdir=$ac_pwd ;;
1604   [\\/]* | ?:[\\/]* )  # Absolute name.
1605     ac_srcdir=$srcdir$ac_dir_suffix;
1606     ac_top_srcdir=$srcdir
1607     ac_abs_top_srcdir=$srcdir ;;
1608   *) # Relative name.
1609     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1610     ac_top_srcdir=$ac_top_build_prefix$srcdir
1611     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1612 esac
1613 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1614
1615     cd "$ac_dir" || { ac_status=$?; continue; }
1616     # Check for guested configure.
1617     if test -f "$ac_srcdir/configure.gnu"; then
1618       echo &&
1619       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1620     elif test -f "$ac_srcdir/configure"; then
1621       echo &&
1622       $SHELL "$ac_srcdir/configure" --help=recursive
1623     else
1624       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1625     fi || ac_status=$?
1626     cd "$ac_pwd" || { ac_status=$?; break; }
1627   done
1628 fi
1629
1630 test -n "$ac_init_help" && exit $ac_status
1631 if $ac_init_version; then
1632   cat <<\_ACEOF
1633 configure
1634 generated by GNU Autoconf 2.69
1635
1636 Copyright (C) 2012 Free Software Foundation, Inc.
1637 This configure script is free software; the Free Software Foundation
1638 gives unlimited permission to copy, distribute and modify it.
1639 _ACEOF
1640   exit
1641 fi
1642
1643 ## ------------------------ ##
1644 ## Autoconf initialization. ##
1645 ## ------------------------ ##
1646
1647 # ac_fn_c_try_compile LINENO
1648 # --------------------------
1649 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1650 ac_fn_c_try_compile ()
1651 {
1652   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1653   rm -rf conftest.$ac_objext
1654   if { { ac_try="$ac_compile"
1655 case "(($ac_try" in
1656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1657   *) ac_try_echo=$ac_try;;
1658 esac
1659 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1660 $as_echo "$ac_try_echo"; } >&5
1661   (eval "$ac_compile") 2>conftest.err
1662   ac_status=$?
1663   if test -s conftest.err; then
1664     grep -v '^ *+' conftest.err >conftest.er1
1665     cat conftest.er1 >&5
1666     mv -f conftest.er1 conftest.err
1667   fi
1668   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1669   test $ac_status = 0; } && {
1670          test -z "$ac_c_werror_flag" ||
1671          test ! -s conftest.err
1672        } && test -s conftest.$ac_objext; then :
1673   ac_retval=0
1674 else
1675   $as_echo "$as_me: failed program was:" >&5
1676 sed 's/^/| /' conftest.$ac_ext >&5
1677
1678         ac_retval=1
1679 fi
1680   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1681   as_fn_set_status $ac_retval
1682
1683 } # ac_fn_c_try_compile
1684
1685 # ac_fn_c_try_link LINENO
1686 # -----------------------
1687 # Try to link conftest.$ac_ext, and return whether this succeeded.
1688 ac_fn_c_try_link ()
1689 {
1690   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691   rm -rf conftest.$ac_objext conftest$ac_exeext
1692   if { { ac_try="$ac_link"
1693 case "(($ac_try" in
1694   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695   *) ac_try_echo=$ac_try;;
1696 esac
1697 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698 $as_echo "$ac_try_echo"; } >&5
1699   (eval "$ac_link") 2>conftest.err
1700   ac_status=$?
1701   if test -s conftest.err; then
1702     grep -v '^ *+' conftest.err >conftest.er1
1703     cat conftest.er1 >&5
1704     mv -f conftest.er1 conftest.err
1705   fi
1706   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707   test $ac_status = 0; } && {
1708          test -z "$ac_c_werror_flag" ||
1709          test ! -s conftest.err
1710        } && test -s conftest$ac_exeext && {
1711          test "$cross_compiling" = yes ||
1712          test -x conftest$ac_exeext
1713        }; then :
1714   ac_retval=0
1715 else
1716   $as_echo "$as_me: failed program was:" >&5
1717 sed 's/^/| /' conftest.$ac_ext >&5
1718
1719         ac_retval=1
1720 fi
1721   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1722   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1723   # interfere with the next link command; also delete a directory that is
1724   # left behind by Apple's compiler.  We do this before executing the actions.
1725   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1726   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1727   as_fn_set_status $ac_retval
1728
1729 } # ac_fn_c_try_link
1730
1731 # ac_fn_c_try_run LINENO
1732 # ----------------------
1733 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1734 # that executables *can* be run.
1735 ac_fn_c_try_run ()
1736 {
1737   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1738   if { { ac_try="$ac_link"
1739 case "(($ac_try" in
1740   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1741   *) ac_try_echo=$ac_try;;
1742 esac
1743 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1744 $as_echo "$ac_try_echo"; } >&5
1745   (eval "$ac_link") 2>&5
1746   ac_status=$?
1747   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1748   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1749   { { case "(($ac_try" in
1750   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1751   *) ac_try_echo=$ac_try;;
1752 esac
1753 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1754 $as_echo "$ac_try_echo"; } >&5
1755   (eval "$ac_try") 2>&5
1756   ac_status=$?
1757   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1758   test $ac_status = 0; }; }; then :
1759   ac_retval=0
1760 else
1761   $as_echo "$as_me: program exited with status $ac_status" >&5
1762        $as_echo "$as_me: failed program was:" >&5
1763 sed 's/^/| /' conftest.$ac_ext >&5
1764
1765        ac_retval=$ac_status
1766 fi
1767   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1768   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1769   as_fn_set_status $ac_retval
1770
1771 } # ac_fn_c_try_run
1772
1773 # ac_fn_c_try_cpp LINENO
1774 # ----------------------
1775 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1776 ac_fn_c_try_cpp ()
1777 {
1778   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1779   if { { ac_try="$ac_cpp conftest.$ac_ext"
1780 case "(($ac_try" in
1781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782   *) ac_try_echo=$ac_try;;
1783 esac
1784 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785 $as_echo "$ac_try_echo"; } >&5
1786   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1787   ac_status=$?
1788   if test -s conftest.err; then
1789     grep -v '^ *+' conftest.err >conftest.er1
1790     cat conftest.er1 >&5
1791     mv -f conftest.er1 conftest.err
1792   fi
1793   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794   test $ac_status = 0; } > conftest.i && {
1795          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1796          test ! -s conftest.err
1797        }; then :
1798   ac_retval=0
1799 else
1800   $as_echo "$as_me: failed program was:" >&5
1801 sed 's/^/| /' conftest.$ac_ext >&5
1802
1803     ac_retval=1
1804 fi
1805   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1806   as_fn_set_status $ac_retval
1807
1808 } # ac_fn_c_try_cpp
1809
1810 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1811 # -------------------------------------------------------
1812 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1813 # the include files in INCLUDES and setting the cache variable VAR
1814 # accordingly.
1815 ac_fn_c_check_header_mongrel ()
1816 {
1817   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818   if eval \${$3+:} false; then :
1819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820 $as_echo_n "checking for $2... " >&6; }
1821 if eval \${$3+:} false; then :
1822   $as_echo_n "(cached) " >&6
1823 fi
1824 eval ac_res=\$$3
1825                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1826 $as_echo "$ac_res" >&6; }
1827 else
1828   # Is the header compilable?
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1830 $as_echo_n "checking $2 usability... " >&6; }
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832 /* end confdefs.h.  */
1833 $4
1834 #include <$2>
1835 _ACEOF
1836 if ac_fn_c_try_compile "$LINENO"; then :
1837   ac_header_compiler=yes
1838 else
1839   ac_header_compiler=no
1840 fi
1841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1843 $as_echo "$ac_header_compiler" >&6; }
1844
1845 # Is the header present?
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1847 $as_echo_n "checking $2 presence... " >&6; }
1848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1849 /* end confdefs.h.  */
1850 #include <$2>
1851 _ACEOF
1852 if ac_fn_c_try_cpp "$LINENO"; then :
1853   ac_header_preproc=yes
1854 else
1855   ac_header_preproc=no
1856 fi
1857 rm -rf conftest.err conftest.i conftest.$ac_ext
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1859 $as_echo "$ac_header_preproc" >&6; }
1860
1861 # So?  What about this header?
1862 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1863   yes:no: )
1864     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1865 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1866     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868     ;;
1869   no:yes:* )
1870     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1871 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1872     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1873 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1874     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1875 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1876     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1877 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1878     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1879 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1880     ;;
1881 esac
1882   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1883 $as_echo_n "checking for $2... " >&6; }
1884 if eval \${$3+:} false; then :
1885   $as_echo_n "(cached) " >&6
1886 else
1887   eval "$3=\$ac_header_compiler"
1888 fi
1889 eval ac_res=\$$3
1890                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891 $as_echo "$ac_res" >&6; }
1892 fi
1893   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1894
1895 } # ac_fn_c_check_header_mongrel
1896
1897 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1898 # -------------------------------------------------------
1899 # Tests whether HEADER exists and can be compiled using the include files in
1900 # INCLUDES, setting the cache variable VAR accordingly.
1901 ac_fn_c_check_header_compile ()
1902 {
1903   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1905 $as_echo_n "checking for $2... " >&6; }
1906 if eval \${$3+:} false; then :
1907   $as_echo_n "(cached) " >&6
1908 else
1909   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1910 /* end confdefs.h.  */
1911 $4
1912 #include <$2>
1913 _ACEOF
1914 if ac_fn_c_try_compile "$LINENO"; then :
1915   eval "$3=yes"
1916 else
1917   eval "$3=no"
1918 fi
1919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1920 fi
1921 eval ac_res=\$$3
1922                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923 $as_echo "$ac_res" >&6; }
1924   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1925
1926 } # ac_fn_c_check_header_compile
1927
1928 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1929 # -------------------------------------------
1930 # Tests whether TYPE exists after having included INCLUDES, setting cache
1931 # variable VAR accordingly.
1932 ac_fn_c_check_type ()
1933 {
1934   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936 $as_echo_n "checking for $2... " >&6; }
1937 if eval \${$3+:} false; then :
1938   $as_echo_n "(cached) " >&6
1939 else
1940   eval "$3=no"
1941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942 /* end confdefs.h.  */
1943 $4
1944 int
1945 main ()
1946 {
1947 if (sizeof ($2))
1948          return 0;
1949   ;
1950   return 0;
1951 }
1952 _ACEOF
1953 if ac_fn_c_try_compile "$LINENO"; then :
1954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955 /* end confdefs.h.  */
1956 $4
1957 int
1958 main ()
1959 {
1960 if (sizeof (($2)))
1961             return 0;
1962   ;
1963   return 0;
1964 }
1965 _ACEOF
1966 if ac_fn_c_try_compile "$LINENO"; then :
1967
1968 else
1969   eval "$3=yes"
1970 fi
1971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972 fi
1973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974 fi
1975 eval ac_res=\$$3
1976                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977 $as_echo "$ac_res" >&6; }
1978   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1979
1980 } # ac_fn_c_check_type
1981
1982 # ac_fn_c_check_func LINENO FUNC VAR
1983 # ----------------------------------
1984 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1985 ac_fn_c_check_func ()
1986 {
1987   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1989 $as_echo_n "checking for $2... " >&6; }
1990 if eval \${$3+:} false; then :
1991   $as_echo_n "(cached) " >&6
1992 else
1993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1994 /* end confdefs.h.  */
1995 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1996    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1997 #define $2 innocuous_$2
1998
1999 /* System header to define __stub macros and hopefully few prototypes,
2000     which can conflict with char $2 (); below.
2001     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2002     <limits.h> exists even on freestanding compilers.  */
2003
2004 #ifdef __STDC__
2005 # include <limits.h>
2006 #else
2007 # include <assert.h>
2008 #endif
2009
2010 #undef $2
2011
2012 /* Override any GCC internal prototype to avoid an error.
2013    Use char because int might match the return type of a GCC
2014    builtin and then its argument prototype would still apply.  */
2015 #ifdef __cplusplus
2016 extern "C"
2017 #endif
2018 char $2 ();
2019 /* The GNU C library defines this for functions which it implements
2020     to always fail with ENOSYS.  Some functions are actually named
2021     something starting with __ and the normal name is an alias.  */
2022 #if defined __stub_$2 || defined __stub___$2
2023 choke me
2024 #endif
2025
2026 int
2027 main ()
2028 {
2029 return $2 ();
2030   ;
2031   return 0;
2032 }
2033 _ACEOF
2034 if ac_fn_c_try_link "$LINENO"; then :
2035   eval "$3=yes"
2036 else
2037   eval "$3=no"
2038 fi
2039 rm -f core conftest.err conftest.$ac_objext \
2040     conftest$ac_exeext conftest.$ac_ext
2041 fi
2042 eval ac_res=\$$3
2043                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2044 $as_echo "$ac_res" >&6; }
2045   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2046
2047 } # ac_fn_c_check_func
2048 cat >config.log <<_ACEOF
2049 This file contains any messages produced by compilers while
2050 running configure, to aid debugging if configure makes a mistake.
2051
2052 It was created by $as_me, which was
2053 generated by GNU Autoconf 2.69.  Invocation command line was
2054
2055   $ $0 $@
2056
2057 _ACEOF
2058 exec 5>>config.log
2059 {
2060 cat <<_ASUNAME
2061 ## --------- ##
2062 ## Platform. ##
2063 ## --------- ##
2064
2065 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2066 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2067 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2068 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2069 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2070
2071 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2072 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2073
2074 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2075 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2076 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2077 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2078 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2079 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2080 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2081
2082 _ASUNAME
2083
2084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2085 for as_dir in $PATH
2086 do
2087   IFS=$as_save_IFS
2088   test -z "$as_dir" && as_dir=.
2089     $as_echo "PATH: $as_dir"
2090   done
2091 IFS=$as_save_IFS
2092
2093 } >&5
2094
2095 cat >&5 <<_ACEOF
2096
2097
2098 ## ----------- ##
2099 ## Core tests. ##
2100 ## ----------- ##
2101
2102 _ACEOF
2103
2104
2105 # Keep a trace of the command line.
2106 # Strip out --no-create and --no-recursion so they do not pile up.
2107 # Strip out --silent because we don't want to record it for future runs.
2108 # Also quote any args containing shell meta-characters.
2109 # Make two passes to allow for proper duplicate-argument suppression.
2110 ac_configure_args=
2111 ac_configure_args0=
2112 ac_configure_args1=
2113 ac_must_keep_next=false
2114 for ac_pass in 1 2
2115 do
2116   for ac_arg
2117   do
2118     case $ac_arg in
2119     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2120     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2121     | -silent | --silent | --silen | --sile | --sil)
2122       continue ;;
2123     *\'*)
2124       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2125     esac
2126     case $ac_pass in
2127     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2128     2)
2129       as_fn_append ac_configure_args1 " '$ac_arg'"
2130       if test $ac_must_keep_next = true; then
2131         ac_must_keep_next=false # Got value, back to normal.
2132       else
2133         case $ac_arg in
2134           *=* | --config-cache | -C | -disable-* | --disable-* \
2135           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2136           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2137           | -with-* | --with-* | -without-* | --without-* | --x)
2138             case "$ac_configure_args0 " in
2139               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2140             esac
2141             ;;
2142           -* ) ac_must_keep_next=true ;;
2143         esac
2144       fi
2145       as_fn_append ac_configure_args " '$ac_arg'"
2146       ;;
2147     esac
2148   done
2149 done
2150 { ac_configure_args0=; unset ac_configure_args0;}
2151 { ac_configure_args1=; unset ac_configure_args1;}
2152
2153 # When interrupted or exit'd, cleanup temporary files, and complete
2154 # config.log.  We remove comments because anyway the quotes in there
2155 # would cause problems or look ugly.
2156 # WARNING: Use '\'' to represent an apostrophe within the trap.
2157 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2158 trap 'exit_status=$?
2159   # Save into config.log some information that might help in debugging.
2160   {
2161     echo
2162
2163     $as_echo "## ---------------- ##
2164 ## Cache variables. ##
2165 ## ---------------- ##"
2166     echo
2167     # The following way of writing the cache mishandles newlines in values,
2168 (
2169   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2170     eval ac_val=\$$ac_var
2171     case $ac_val in #(
2172     *${as_nl}*)
2173       case $ac_var in #(
2174       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2175 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2176       esac
2177       case $ac_var in #(
2178       _ | IFS | as_nl) ;; #(
2179       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2180       *) { eval $ac_var=; unset $ac_var;} ;;
2181       esac ;;
2182     esac
2183   done
2184   (set) 2>&1 |
2185     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2186     *${as_nl}ac_space=\ *)
2187       sed -n \
2188         "s/'\''/'\''\\\\'\'''\''/g;
2189           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2190       ;; #(
2191     *)
2192       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2193       ;;
2194     esac |
2195     sort
2196 )
2197     echo
2198
2199     $as_echo "## ----------------- ##
2200 ## Output variables. ##
2201 ## ----------------- ##"
2202     echo
2203     for ac_var in $ac_subst_vars
2204     do
2205       eval ac_val=\$$ac_var
2206       case $ac_val in
2207       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2208       esac
2209       $as_echo "$ac_var='\''$ac_val'\''"
2210     done | sort
2211     echo
2212
2213     if test -n "$ac_subst_files"; then
2214       $as_echo "## ------------------- ##
2215 ## File substitutions. ##
2216 ## ------------------- ##"
2217       echo
2218       for ac_var in $ac_subst_files
2219       do
2220         eval ac_val=\$$ac_var
2221         case $ac_val in
2222         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2223         esac
2224         $as_echo "$ac_var='\''$ac_val'\''"
2225       done | sort
2226       echo
2227     fi
2228
2229     if test -s confdefs.h; then
2230       $as_echo "## ----------- ##
2231 ## confdefs.h. ##
2232 ## ----------- ##"
2233       echo
2234       cat confdefs.h
2235       echo
2236     fi
2237     test "$ac_signal" != 0 &&
2238       $as_echo "$as_me: caught signal $ac_signal"
2239     $as_echo "$as_me: exit $exit_status"
2240   } >&5
2241   rm -f core *.core core.conftest.* &&
2242     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2243     exit $exit_status
2244 ' 0
2245 for ac_signal in 1 2 13 15; do
2246   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2247 done
2248 ac_signal=0
2249
2250 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2251 rm -f -r conftest* confdefs.h
2252
2253 $as_echo "/* confdefs.h */" > confdefs.h
2254
2255 # Predefined preprocessor variables.
2256
2257 cat >>confdefs.h <<_ACEOF
2258 #define PACKAGE_NAME "$PACKAGE_NAME"
2259 _ACEOF
2260
2261 cat >>confdefs.h <<_ACEOF
2262 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2263 _ACEOF
2264
2265 cat >>confdefs.h <<_ACEOF
2266 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2267 _ACEOF
2268
2269 cat >>confdefs.h <<_ACEOF
2270 #define PACKAGE_STRING "$PACKAGE_STRING"
2271 _ACEOF
2272
2273 cat >>confdefs.h <<_ACEOF
2274 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2275 _ACEOF
2276
2277 cat >>confdefs.h <<_ACEOF
2278 #define PACKAGE_URL "$PACKAGE_URL"
2279 _ACEOF
2280
2281
2282 # Let the site file select an alternate cache file if it wants to.
2283 # Prefer an explicitly selected file to automatically selected ones.
2284 ac_site_file1=NONE
2285 ac_site_file2=NONE
2286 if test -n "$CONFIG_SITE"; then
2287   # We do not want a PATH search for config.site.
2288   case $CONFIG_SITE in #((
2289     -*)  ac_site_file1=./$CONFIG_SITE;;
2290     */*) ac_site_file1=$CONFIG_SITE;;
2291     *)   ac_site_file1=./$CONFIG_SITE;;
2292   esac
2293 elif test "x$prefix" != xNONE; then
2294   ac_site_file1=$prefix/share/config.site
2295   ac_site_file2=$prefix/etc/config.site
2296 else
2297   ac_site_file1=$ac_default_prefix/share/config.site
2298   ac_site_file2=$ac_default_prefix/etc/config.site
2299 fi
2300 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2301 do
2302   test "x$ac_site_file" = xNONE && continue
2303   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2304     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2305 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2306     sed 's/^/| /' "$ac_site_file" >&5
2307     . "$ac_site_file" \
2308       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2309 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2310 as_fn_error $? "failed to load site script $ac_site_file
2311 See \`config.log' for more details" "$LINENO" 5; }
2312   fi
2313 done
2314
2315 if test -r "$cache_file"; then
2316   # Some versions of bash will fail to source /dev/null (special files
2317   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2318   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2319     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2320 $as_echo "$as_me: loading cache $cache_file" >&6;}
2321     case $cache_file in
2322       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2323       *)                      . "./$cache_file";;
2324     esac
2325   fi
2326 else
2327   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2328 $as_echo "$as_me: creating cache $cache_file" >&6;}
2329   >$cache_file
2330 fi
2331
2332 # Check that the precious variables saved in the cache have kept the same
2333 # value.
2334 ac_cache_corrupted=false
2335 for ac_var in $ac_precious_vars; do
2336   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2337   eval ac_new_set=\$ac_env_${ac_var}_set
2338   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2339   eval ac_new_val=\$ac_env_${ac_var}_value
2340   case $ac_old_set,$ac_new_set in
2341     set,)
2342       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2343 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2344       ac_cache_corrupted=: ;;
2345     ,set)
2346       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2347 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2348       ac_cache_corrupted=: ;;
2349     ,);;
2350     *)
2351       if test "x$ac_old_val" != "x$ac_new_val"; then
2352         # differences in whitespace do not lead to failure.
2353         ac_old_val_w=`echo x $ac_old_val`
2354         ac_new_val_w=`echo x $ac_new_val`
2355         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2356           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2357 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2358           ac_cache_corrupted=:
2359         else
2360           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2361 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2362           eval $ac_var=\$ac_old_val
2363         fi
2364         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2365 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2366         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2367 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2368       fi;;
2369   esac
2370   # Pass precious variables to config.status.
2371   if test "$ac_new_set" = set; then
2372     case $ac_new_val in
2373     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2374     *) ac_arg=$ac_var=$ac_new_val ;;
2375     esac
2376     case " $ac_configure_args " in
2377       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2378       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2379     esac
2380   fi
2381 done
2382 if $ac_cache_corrupted; then
2383   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2384 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2385   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2386 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2387   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2388 fi
2389 ## -------------------- ##
2390 ## Main body of script. ##
2391 ## -------------------- ##
2392
2393 ac_ext=c
2394 ac_cpp='$CPP $CPPFLAGS'
2395 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2396 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2397 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2398
2399
2400 ac_config_headers="$ac_config_headers config.h"
2401
2402
2403 echo "current directory: `pwd`"
2404 echo "command line was: $0 $@"
2405
2406 ###############################################################################
2407 #
2408 #       Autoheader stuff
2409 #
2410 ###############################################################################
2411
2412
2413
2414
2415
2416
2417
2418 # This only ever existed in X11R4 and X11R5.
2419 #AH_TEMPLATE([HAVE_XIDLE_EXTENSION],
2420 #           [Define this if you have the XIDLE extension installed. If you
2421 #           have the XIDLE extension, this is recommended.  (You have this
2422 #           extension if the file /usr/include/X11/extensions/xidle.h
2423 #           exists.) Turning on this flag lets XScreenSaver work better with
2424 #           servers which support this extension; but it will still work
2425 #           with servers which do not suport it, so it's a good idea to
2426 #           compile in support for it if you can.])
2427
2428 # Using this extension will crash your X server and make fading not work.
2429 #AH_TEMPLATE([HAVE_MIT_SAVER_EXTENSION],
2430 #           [Define this if you have the MIT-SCREEN-SAVER extension
2431 #            installed.  See the caveats about this extension, above.
2432 #            (It's available if /usr/include/X11/extensions/scrnsaver.h
2433 #            exists.)])
2434
2435 # This only ever existed on SGI hardware.
2436 #AH_TEMPLATE([HAVE_SGI_SAVER_EXTENSION],
2437 #           [Define this if you have the SGI SCREEN_SAVER extension.  This is
2438 #           standard on Irix systems, and not available elsewhere.])
2439
2440 # This only ever existed on SGI hardware.
2441 #AH_TEMPLATE([HAVE_SGI_VC_EXTENSION],
2442 #           [Define this if you have the SGI-VIDEO-CONTROL extension.  This
2443 #           is standard on Irix systems, and not available elsewhere.])
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
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556 # After checking to see that --srcdir is correct (which AC_INIT does)
2557 # check for some random other files that come later in the tar file,
2558 # to make sure everything is here.
2559 #
2560 for d in driver utils hacks hacks/glx ; do
2561   f=$srcdir/$d/Makefile.in
2562   if test \! -r $f ; then
2563     echo ""
2564     echo "ERROR: The package is incomplete: $f does not exist."
2565     echo "       This probably means that your download was truncated."
2566     echo ""
2567     exit 1
2568   fi
2569 done
2570
2571 ###############################################################################
2572 #
2573 #       Query AX_PTHREAD, and figure out which compiler gets used.
2574 #
2575 ###############################################################################
2576
2577
2578
2579
2580 ###############################################################################
2581 #
2582 #       Function to figure out how to run the compiler.
2583 #
2584 ###############################################################################
2585
2586
2587
2588
2589 ###############################################################################
2590 #
2591 #       Check for availability of various gcc command-line options.
2592 #
2593 ###############################################################################
2594
2595
2596
2597
2598
2599
2600
2601 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2602 # around an Apple-specific gcc bug.
2603 #
2604
2605
2606 ###############################################################################
2607 #
2608 #       Function to figure out how to disable // comments in ANSI C code.
2609 #
2610 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2611 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2612 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2613 #       so much for compatibility!)
2614 #
2615 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2616 #       declarations preceed statements, without resorting to "-pedantic".
2617 #       This means that there is no way to get gcc3 to issue warnings that
2618 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2619 #       also drowning in totally useless warnings.  Thank you master may I
2620 #       have another.
2621 #
2622 #       So, I give up, let's just use -pedantic.
2623 #
2624 ###############################################################################
2625
2626
2627
2628
2629
2630
2631 ###############################################################################
2632 #
2633 #       Function to figure out how to create directory trees.
2634 #
2635 ###############################################################################
2636
2637
2638
2639
2640 ###############################################################################
2641 #
2642 #       Function to check whether gettimeofday() exists, and how to call it.
2643 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2644 #
2645 ###############################################################################
2646
2647
2648
2649
2650 ###############################################################################
2651 #
2652 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2653 #
2654 ###############################################################################
2655
2656 # M4 sucks!!  perl sucks too!!
2657
2658 perl_version_cmd='print $]'
2659
2660
2661
2662
2663
2664 ###############################################################################
2665 #
2666 #       Function to demand "bc".  Losers.
2667 #
2668 ###############################################################################
2669
2670
2671
2672 ###############################################################################
2673 #
2674 #       Functions to check how to do ICMP PING requests.
2675 #
2676 ###############################################################################
2677
2678
2679
2680
2681
2682
2683 ###############################################################################
2684 #
2685 #       Functions to check for various X11 crap.
2686 #
2687 ###############################################################################
2688
2689 # Try and find the app-defaults directory.
2690 # It sucks that autoconf doesn't do this already...
2691 #
2692
2693
2694 ###############################################################################
2695 #
2696 #       Handle the --with-x-app-defaults option HERE
2697 #
2698 ###############################################################################
2699
2700
2701 # Check whether --with-x-app-defaults was given.
2702 if test "${with_x_app_defaults+set}" = set; then :
2703   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2704 else
2705   eval ac_x_app_defaults="$withval"
2706 fi
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718 # Random special-cases for X on certain pathological OSes.
2719 # You know who you are.
2720 #
2721
2722
2723
2724
2725
2726 ###############################################################################
2727 #
2728 #       Some utility functions to make checking for X things easier.
2729 #
2730 ###############################################################################
2731
2732 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2733 #
2734
2735
2736 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2737 #
2738
2739
2740 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2741 #
2742
2743
2744
2745 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2746 # Use this sparingly; it probably doesn't work very well on X programs.
2747 #
2748
2749
2750 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2751 # (But not the -L directories!)
2752 #
2753
2754
2755
2756
2757 # Usage: HANDLE_X_PATH_ARG([variable_name],
2758 #                          [--command-line-option],
2759 #                          [descriptive string])
2760 #
2761 # All of the --with options take three forms:
2762 #
2763 #   --with-foo (or --with-foo=yes)
2764 #   --without-foo (or --with-foo=no)
2765 #   --with-foo=/DIR
2766 #
2767 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2768 # a directory (string beginning with a slash) it checks to see whether
2769 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2770 # as appropriate.
2771 #
2772
2773
2774
2775
2776 ###############################################################################
2777 ###############################################################################
2778 #
2779 #       End of function definitions.  Now start actually executing stuff.
2780 #
2781 ###############################################################################
2782 ###############################################################################
2783
2784 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2785 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2786 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2787
2788
2789 # random compiler setup
2790 ac_aux_dir=
2791 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2792   if test -f "$ac_dir/install-sh"; then
2793     ac_aux_dir=$ac_dir
2794     ac_install_sh="$ac_aux_dir/install-sh -c"
2795     break
2796   elif test -f "$ac_dir/install.sh"; then
2797     ac_aux_dir=$ac_dir
2798     ac_install_sh="$ac_aux_dir/install.sh -c"
2799     break
2800   elif test -f "$ac_dir/shtool"; then
2801     ac_aux_dir=$ac_dir
2802     ac_install_sh="$ac_aux_dir/shtool install -c"
2803     break
2804   fi
2805 done
2806 if test -z "$ac_aux_dir"; then
2807   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2808 fi
2809
2810 # These three variables are undocumented and unsupported,
2811 # and are intended to be withdrawn in a future Autoconf release.
2812 # They can cause serious problems if a builder's source tree is in a directory
2813 # whose full name contains unusual characters.
2814 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2815 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2816 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2817
2818
2819 # Make sure we can run config.sub.
2820 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2821   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2822
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2824 $as_echo_n "checking build system type... " >&6; }
2825 if ${ac_cv_build+:} false; then :
2826   $as_echo_n "(cached) " >&6
2827 else
2828   ac_build_alias=$build_alias
2829 test "x$ac_build_alias" = x &&
2830   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2831 test "x$ac_build_alias" = x &&
2832   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2833 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2834   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2835
2836 fi
2837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2838 $as_echo "$ac_cv_build" >&6; }
2839 case $ac_cv_build in
2840 *-*-*) ;;
2841 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2842 esac
2843 build=$ac_cv_build
2844 ac_save_IFS=$IFS; IFS='-'
2845 set x $ac_cv_build
2846 shift
2847 build_cpu=$1
2848 build_vendor=$2
2849 shift; shift
2850 # Remember, the first character of IFS is used to create $*,
2851 # except with old shells:
2852 build_os=$*
2853 IFS=$ac_save_IFS
2854 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2855
2856
2857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2858 $as_echo_n "checking host system type... " >&6; }
2859 if ${ac_cv_host+:} false; then :
2860   $as_echo_n "(cached) " >&6
2861 else
2862   if test "x$host_alias" = x; then
2863   ac_cv_host=$ac_cv_build
2864 else
2865   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2866     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2867 fi
2868
2869 fi
2870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2871 $as_echo "$ac_cv_host" >&6; }
2872 case $ac_cv_host in
2873 *-*-*) ;;
2874 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2875 esac
2876 host=$ac_cv_host
2877 ac_save_IFS=$IFS; IFS='-'
2878 set x $ac_cv_host
2879 shift
2880 host_cpu=$1
2881 host_vendor=$2
2882 shift; shift
2883 # Remember, the first character of IFS is used to create $*,
2884 # except with old shells:
2885 host_os=$*
2886 IFS=$ac_save_IFS
2887 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2888
2889
2890
2891 ac_original_cc=$CC
2892 ac_ext=c
2893 ac_cpp='$CPP $CPPFLAGS'
2894 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2895 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2896 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2897 if test -n "$ac_tool_prefix"; then
2898   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2899 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2901 $as_echo_n "checking for $ac_word... " >&6; }
2902 if ${ac_cv_prog_CC+:} false; then :
2903   $as_echo_n "(cached) " >&6
2904 else
2905   if test -n "$CC"; then
2906   ac_cv_prog_CC="$CC" # Let the user override the test.
2907 else
2908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2909 for as_dir in $PATH
2910 do
2911   IFS=$as_save_IFS
2912   test -z "$as_dir" && as_dir=.
2913     for ac_exec_ext in '' $ac_executable_extensions; do
2914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2915     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2917     break 2
2918   fi
2919 done
2920   done
2921 IFS=$as_save_IFS
2922
2923 fi
2924 fi
2925 CC=$ac_cv_prog_CC
2926 if test -n "$CC"; then
2927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2928 $as_echo "$CC" >&6; }
2929 else
2930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2931 $as_echo "no" >&6; }
2932 fi
2933
2934
2935 fi
2936 if test -z "$ac_cv_prog_CC"; then
2937   ac_ct_CC=$CC
2938   # Extract the first word of "gcc", so it can be a program name with args.
2939 set dummy gcc; ac_word=$2
2940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2941 $as_echo_n "checking for $ac_word... " >&6; }
2942 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2943   $as_echo_n "(cached) " >&6
2944 else
2945   if test -n "$ac_ct_CC"; then
2946   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2947 else
2948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2949 for as_dir in $PATH
2950 do
2951   IFS=$as_save_IFS
2952   test -z "$as_dir" && as_dir=.
2953     for ac_exec_ext in '' $ac_executable_extensions; do
2954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2955     ac_cv_prog_ac_ct_CC="gcc"
2956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2957     break 2
2958   fi
2959 done
2960   done
2961 IFS=$as_save_IFS
2962
2963 fi
2964 fi
2965 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2966 if test -n "$ac_ct_CC"; then
2967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2968 $as_echo "$ac_ct_CC" >&6; }
2969 else
2970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2971 $as_echo "no" >&6; }
2972 fi
2973
2974   if test "x$ac_ct_CC" = x; then
2975     CC=""
2976   else
2977     case $cross_compiling:$ac_tool_warned in
2978 yes:)
2979 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2980 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2981 ac_tool_warned=yes ;;
2982 esac
2983     CC=$ac_ct_CC
2984   fi
2985 else
2986   CC="$ac_cv_prog_CC"
2987 fi
2988
2989 if test -z "$CC"; then
2990           if test -n "$ac_tool_prefix"; then
2991     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2992 set dummy ${ac_tool_prefix}cc; ac_word=$2
2993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2994 $as_echo_n "checking for $ac_word... " >&6; }
2995 if ${ac_cv_prog_CC+:} false; then :
2996   $as_echo_n "(cached) " >&6
2997 else
2998   if test -n "$CC"; then
2999   ac_cv_prog_CC="$CC" # Let the user override the test.
3000 else
3001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3002 for as_dir in $PATH
3003 do
3004   IFS=$as_save_IFS
3005   test -z "$as_dir" && as_dir=.
3006     for ac_exec_ext in '' $ac_executable_extensions; do
3007   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3008     ac_cv_prog_CC="${ac_tool_prefix}cc"
3009     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3010     break 2
3011   fi
3012 done
3013   done
3014 IFS=$as_save_IFS
3015
3016 fi
3017 fi
3018 CC=$ac_cv_prog_CC
3019 if test -n "$CC"; then
3020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3021 $as_echo "$CC" >&6; }
3022 else
3023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3024 $as_echo "no" >&6; }
3025 fi
3026
3027
3028   fi
3029 fi
3030 if test -z "$CC"; then
3031   # Extract the first word of "cc", so it can be a program name with args.
3032 set dummy cc; ac_word=$2
3033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3034 $as_echo_n "checking for $ac_word... " >&6; }
3035 if ${ac_cv_prog_CC+:} false; then :
3036   $as_echo_n "(cached) " >&6
3037 else
3038   if test -n "$CC"; then
3039   ac_cv_prog_CC="$CC" # Let the user override the test.
3040 else
3041   ac_prog_rejected=no
3042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3043 for as_dir in $PATH
3044 do
3045   IFS=$as_save_IFS
3046   test -z "$as_dir" && as_dir=.
3047     for ac_exec_ext in '' $ac_executable_extensions; do
3048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3049     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3050        ac_prog_rejected=yes
3051        continue
3052      fi
3053     ac_cv_prog_CC="cc"
3054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3055     break 2
3056   fi
3057 done
3058   done
3059 IFS=$as_save_IFS
3060
3061 if test $ac_prog_rejected = yes; then
3062   # We found a bogon in the path, so make sure we never use it.
3063   set dummy $ac_cv_prog_CC
3064   shift
3065   if test $# != 0; then
3066     # We chose a different compiler from the bogus one.
3067     # However, it has the same basename, so the bogon will be chosen
3068     # first if we set CC to just the basename; use the full file name.
3069     shift
3070     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3071   fi
3072 fi
3073 fi
3074 fi
3075 CC=$ac_cv_prog_CC
3076 if test -n "$CC"; then
3077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3078 $as_echo "$CC" >&6; }
3079 else
3080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3081 $as_echo "no" >&6; }
3082 fi
3083
3084
3085 fi
3086 if test -z "$CC"; then
3087   if test -n "$ac_tool_prefix"; then
3088   for ac_prog in cl.exe
3089   do
3090     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3091 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3093 $as_echo_n "checking for $ac_word... " >&6; }
3094 if ${ac_cv_prog_CC+:} false; then :
3095   $as_echo_n "(cached) " >&6
3096 else
3097   if test -n "$CC"; then
3098   ac_cv_prog_CC="$CC" # Let the user override the test.
3099 else
3100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3101 for as_dir in $PATH
3102 do
3103   IFS=$as_save_IFS
3104   test -z "$as_dir" && as_dir=.
3105     for ac_exec_ext in '' $ac_executable_extensions; do
3106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3107     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3109     break 2
3110   fi
3111 done
3112   done
3113 IFS=$as_save_IFS
3114
3115 fi
3116 fi
3117 CC=$ac_cv_prog_CC
3118 if test -n "$CC"; then
3119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3120 $as_echo "$CC" >&6; }
3121 else
3122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3123 $as_echo "no" >&6; }
3124 fi
3125
3126
3127     test -n "$CC" && break
3128   done
3129 fi
3130 if test -z "$CC"; then
3131   ac_ct_CC=$CC
3132   for ac_prog in cl.exe
3133 do
3134   # Extract the first word of "$ac_prog", so it can be a program name with args.
3135 set dummy $ac_prog; ac_word=$2
3136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3137 $as_echo_n "checking for $ac_word... " >&6; }
3138 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3139   $as_echo_n "(cached) " >&6
3140 else
3141   if test -n "$ac_ct_CC"; then
3142   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3143 else
3144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3145 for as_dir in $PATH
3146 do
3147   IFS=$as_save_IFS
3148   test -z "$as_dir" && as_dir=.
3149     for ac_exec_ext in '' $ac_executable_extensions; do
3150   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3151     ac_cv_prog_ac_ct_CC="$ac_prog"
3152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3153     break 2
3154   fi
3155 done
3156   done
3157 IFS=$as_save_IFS
3158
3159 fi
3160 fi
3161 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3162 if test -n "$ac_ct_CC"; then
3163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3164 $as_echo "$ac_ct_CC" >&6; }
3165 else
3166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3167 $as_echo "no" >&6; }
3168 fi
3169
3170
3171   test -n "$ac_ct_CC" && break
3172 done
3173
3174   if test "x$ac_ct_CC" = x; then
3175     CC=""
3176   else
3177     case $cross_compiling:$ac_tool_warned in
3178 yes:)
3179 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3180 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3181 ac_tool_warned=yes ;;
3182 esac
3183     CC=$ac_ct_CC
3184   fi
3185 fi
3186
3187 fi
3188
3189
3190 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3191 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3192 as_fn_error $? "no acceptable C compiler found in \$PATH
3193 See \`config.log' for more details" "$LINENO" 5; }
3194
3195 # Provide some information about the compiler.
3196 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3197 set X $ac_compile
3198 ac_compiler=$2
3199 for ac_option in --version -v -V -qversion; do
3200   { { ac_try="$ac_compiler $ac_option >&5"
3201 case "(($ac_try" in
3202   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3203   *) ac_try_echo=$ac_try;;
3204 esac
3205 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3206 $as_echo "$ac_try_echo"; } >&5
3207   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3208   ac_status=$?
3209   if test -s conftest.err; then
3210     sed '10a\
3211 ... rest of stderr output deleted ...
3212          10q' conftest.err >conftest.er1
3213     cat conftest.er1 >&5
3214   fi
3215   rm -rf conftest.er1 conftest.err
3216   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3217   test $ac_status = 0; }
3218 done
3219
3220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3221 /* end confdefs.h.  */
3222
3223 int
3224 main ()
3225 {
3226
3227   ;
3228   return 0;
3229 }
3230 _ACEOF
3231 ac_clean_files_save=$ac_clean_files
3232 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3233 # Try to create an executable without -o first, disregard a.out.
3234 # It will help us diagnose broken compilers, and finding out an intuition
3235 # of exeext.
3236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3237 $as_echo_n "checking whether the C compiler works... " >&6; }
3238 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3239
3240 # The possible output files:
3241 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3242
3243 ac_rmfiles=
3244 for ac_file in $ac_files
3245 do
3246   case $ac_file in
3247     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3248     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3249   esac
3250 done
3251 rm -f $ac_rmfiles
3252
3253 if { { ac_try="$ac_link_default"
3254 case "(($ac_try" in
3255   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3256   *) ac_try_echo=$ac_try;;
3257 esac
3258 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3259 $as_echo "$ac_try_echo"; } >&5
3260   (eval "$ac_link_default") 2>&5
3261   ac_status=$?
3262   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3263   test $ac_status = 0; }; then :
3264   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3265 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3266 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3267 # so that the user can short-circuit this test for compilers unknown to
3268 # Autoconf.
3269 for ac_file in $ac_files ''
3270 do
3271   test -f "$ac_file" || continue
3272   case $ac_file in
3273     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3274         ;;
3275     [ab].out )
3276         # We found the default executable, but exeext='' is most
3277         # certainly right.
3278         break;;
3279     *.* )
3280         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3281         then :; else
3282            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3283         fi
3284         # We set ac_cv_exeext here because the later test for it is not
3285         # safe: cross compilers may not add the suffix if given an `-o'
3286         # argument, so we may need to know it at that point already.
3287         # Even if this section looks crufty: it has the advantage of
3288         # actually working.
3289         break;;
3290     * )
3291         break;;
3292   esac
3293 done
3294 test "$ac_cv_exeext" = no && ac_cv_exeext=
3295
3296 else
3297   ac_file=''
3298 fi
3299 if test -z "$ac_file"; then :
3300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3301 $as_echo "no" >&6; }
3302 $as_echo "$as_me: failed program was:" >&5
3303 sed 's/^/| /' conftest.$ac_ext >&5
3304
3305 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3306 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3307 as_fn_error 77 "C compiler cannot create executables
3308 See \`config.log' for more details" "$LINENO" 5; }
3309 else
3310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3311 $as_echo "yes" >&6; }
3312 fi
3313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3314 $as_echo_n "checking for C compiler default output file name... " >&6; }
3315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3316 $as_echo "$ac_file" >&6; }
3317 ac_exeext=$ac_cv_exeext
3318
3319 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3320 ac_clean_files=$ac_clean_files_save
3321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3322 $as_echo_n "checking for suffix of executables... " >&6; }
3323 if { { ac_try="$ac_link"
3324 case "(($ac_try" in
3325   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3326   *) ac_try_echo=$ac_try;;
3327 esac
3328 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3329 $as_echo "$ac_try_echo"; } >&5
3330   (eval "$ac_link") 2>&5
3331   ac_status=$?
3332   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3333   test $ac_status = 0; }; then :
3334   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3335 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3336 # work properly (i.e., refer to `conftest.exe'), while it won't with
3337 # `rm'.
3338 for ac_file in conftest.exe conftest conftest.*; do
3339   test -f "$ac_file" || continue
3340   case $ac_file in
3341     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3342     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3343           break;;
3344     * ) break;;
3345   esac
3346 done
3347 else
3348   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3349 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3350 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3351 See \`config.log' for more details" "$LINENO" 5; }
3352 fi
3353 rm -rf conftest conftest$ac_cv_exeext
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3355 $as_echo "$ac_cv_exeext" >&6; }
3356
3357 rm -rf conftest.$ac_ext
3358 EXEEXT=$ac_cv_exeext
3359 ac_exeext=$EXEEXT
3360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3361 /* end confdefs.h.  */
3362 #include <stdio.h>
3363 int
3364 main ()
3365 {
3366 FILE *f = fopen ("conftest.out", "w");
3367  return ferror (f) || fclose (f) != 0;
3368
3369   ;
3370   return 0;
3371 }
3372 _ACEOF
3373 ac_clean_files="$ac_clean_files conftest.out"
3374 # Check that the compiler produces executables we can run.  If not, either
3375 # the compiler is broken, or we cross compile.
3376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3377 $as_echo_n "checking whether we are cross compiling... " >&6; }
3378 if test "$cross_compiling" != yes; then
3379   { { ac_try="$ac_link"
3380 case "(($ac_try" in
3381   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3382   *) ac_try_echo=$ac_try;;
3383 esac
3384 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3385 $as_echo "$ac_try_echo"; } >&5
3386   (eval "$ac_link") 2>&5
3387   ac_status=$?
3388   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3389   test $ac_status = 0; }
3390   if { ac_try='./conftest$ac_cv_exeext'
3391   { { case "(($ac_try" in
3392   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3393   *) ac_try_echo=$ac_try;;
3394 esac
3395 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3396 $as_echo "$ac_try_echo"; } >&5
3397   (eval "$ac_try") 2>&5
3398   ac_status=$?
3399   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3400   test $ac_status = 0; }; }; then
3401     cross_compiling=no
3402   else
3403     if test "$cross_compiling" = maybe; then
3404         cross_compiling=yes
3405     else
3406         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3407 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3408 as_fn_error $? "cannot run C compiled programs.
3409 If you meant to cross compile, use \`--host'.
3410 See \`config.log' for more details" "$LINENO" 5; }
3411     fi
3412   fi
3413 fi
3414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3415 $as_echo "$cross_compiling" >&6; }
3416
3417 rm -rf conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3418 ac_clean_files=$ac_clean_files_save
3419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3420 $as_echo_n "checking for suffix of object files... " >&6; }
3421 if ${ac_cv_objext+:} false; then :
3422   $as_echo_n "(cached) " >&6
3423 else
3424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3425 /* end confdefs.h.  */
3426
3427 int
3428 main ()
3429 {
3430
3431   ;
3432   return 0;
3433 }
3434 _ACEOF
3435 rm -rf conftest.o conftest.obj
3436 if { { ac_try="$ac_compile"
3437 case "(($ac_try" in
3438   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3439   *) ac_try_echo=$ac_try;;
3440 esac
3441 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3442 $as_echo "$ac_try_echo"; } >&5
3443   (eval "$ac_compile") 2>&5
3444   ac_status=$?
3445   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3446   test $ac_status = 0; }; then :
3447   for ac_file in conftest.o conftest.obj conftest.*; do
3448   test -f "$ac_file" || continue;
3449   case $ac_file in
3450     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3451     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3452        break;;
3453   esac
3454 done
3455 else
3456   $as_echo "$as_me: failed program was:" >&5
3457 sed 's/^/| /' conftest.$ac_ext >&5
3458
3459 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3460 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3461 as_fn_error $? "cannot compute suffix of object files: cannot compile
3462 See \`config.log' for more details" "$LINENO" 5; }
3463 fi
3464 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
3465 fi
3466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3467 $as_echo "$ac_cv_objext" >&6; }
3468 OBJEXT=$ac_cv_objext
3469 ac_objext=$OBJEXT
3470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3471 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3472 if ${ac_cv_c_compiler_gnu+:} false; then :
3473   $as_echo_n "(cached) " >&6
3474 else
3475   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3476 /* end confdefs.h.  */
3477
3478 int
3479 main ()
3480 {
3481 #ifndef __GNUC__
3482        choke me
3483 #endif
3484
3485   ;
3486   return 0;
3487 }
3488 _ACEOF
3489 if ac_fn_c_try_compile "$LINENO"; then :
3490   ac_compiler_gnu=yes
3491 else
3492   ac_compiler_gnu=no
3493 fi
3494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3495 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3496
3497 fi
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3499 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3500 if test $ac_compiler_gnu = yes; then
3501   GCC=yes
3502 else
3503   GCC=
3504 fi
3505 ac_test_CFLAGS=${CFLAGS+set}
3506 ac_save_CFLAGS=$CFLAGS
3507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3508 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3509 if ${ac_cv_prog_cc_g+:} false; then :
3510   $as_echo_n "(cached) " >&6
3511 else
3512   ac_save_c_werror_flag=$ac_c_werror_flag
3513    ac_c_werror_flag=yes
3514    ac_cv_prog_cc_g=no
3515    CFLAGS="-g"
3516    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3517 /* end confdefs.h.  */
3518
3519 int
3520 main ()
3521 {
3522
3523   ;
3524   return 0;
3525 }
3526 _ACEOF
3527 if ac_fn_c_try_compile "$LINENO"; then :
3528   ac_cv_prog_cc_g=yes
3529 else
3530   CFLAGS=""
3531       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3532 /* end confdefs.h.  */
3533
3534 int
3535 main ()
3536 {
3537
3538   ;
3539   return 0;
3540 }
3541 _ACEOF
3542 if ac_fn_c_try_compile "$LINENO"; then :
3543
3544 else
3545   ac_c_werror_flag=$ac_save_c_werror_flag
3546          CFLAGS="-g"
3547          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3548 /* end confdefs.h.  */
3549
3550 int
3551 main ()
3552 {
3553
3554   ;
3555   return 0;
3556 }
3557 _ACEOF
3558 if ac_fn_c_try_compile "$LINENO"; then :
3559   ac_cv_prog_cc_g=yes
3560 fi
3561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3562 fi
3563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3564 fi
3565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3566    ac_c_werror_flag=$ac_save_c_werror_flag
3567 fi
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3569 $as_echo "$ac_cv_prog_cc_g" >&6; }
3570 if test "$ac_test_CFLAGS" = set; then
3571   CFLAGS=$ac_save_CFLAGS
3572 elif test $ac_cv_prog_cc_g = yes; then
3573   if test "$GCC" = yes; then
3574     CFLAGS="-g -O2"
3575   else
3576     CFLAGS="-g"
3577   fi
3578 else
3579   if test "$GCC" = yes; then
3580     CFLAGS="-O2"
3581   else
3582     CFLAGS=
3583   fi
3584 fi
3585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3586 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3587 if ${ac_cv_prog_cc_c89+:} false; then :
3588   $as_echo_n "(cached) " >&6
3589 else
3590   ac_cv_prog_cc_c89=no
3591 ac_save_CC=$CC
3592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3593 /* end confdefs.h.  */
3594 #include <stdarg.h>
3595 #include <stdio.h>
3596 struct stat;
3597 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3598 struct buf { int x; };
3599 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3600 static char *e (p, i)
3601      char **p;
3602      int i;
3603 {
3604   return p[i];
3605 }
3606 static char *f (char * (*g) (char **, int), char **p, ...)
3607 {
3608   char *s;
3609   va_list v;
3610   va_start (v,p);
3611   s = g (p, va_arg (v,int));
3612   va_end (v);
3613   return s;
3614 }
3615
3616 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3617    function prototypes and stuff, but not '\xHH' hex character constants.
3618    These don't provoke an error unfortunately, instead are silently treated
3619    as 'x'.  The following induces an error, until -std is added to get
3620    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3621    array size at least.  It's necessary to write '\x00'==0 to get something
3622    that's true only with -std.  */
3623 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3624
3625 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3626    inside strings and character constants.  */
3627 #define FOO(x) 'x'
3628 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3629
3630 int test (int i, double x);
3631 struct s1 {int (*f) (int a);};
3632 struct s2 {int (*f) (double a);};
3633 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3634 int argc;
3635 char **argv;
3636 int
3637 main ()
3638 {
3639 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3640   ;
3641   return 0;
3642 }
3643 _ACEOF
3644 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3645         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3646 do
3647   CC="$ac_save_CC $ac_arg"
3648   if ac_fn_c_try_compile "$LINENO"; then :
3649   ac_cv_prog_cc_c89=$ac_arg
3650 fi
3651 rm -f core conftest.err conftest.$ac_objext
3652   test "x$ac_cv_prog_cc_c89" != "xno" && break
3653 done
3654 rm -rf conftest.$ac_ext
3655 CC=$ac_save_CC
3656
3657 fi
3658 # AC_CACHE_VAL
3659 case "x$ac_cv_prog_cc_c89" in
3660   x)
3661     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3662 $as_echo "none needed" >&6; } ;;
3663   xno)
3664     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3665 $as_echo "unsupported" >&6; } ;;
3666   *)
3667     CC="$CC $ac_cv_prog_cc_c89"
3668     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3669 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3670 esac
3671 if test "x$ac_cv_prog_cc_c89" != xno; then :
3672
3673 fi
3674
3675 ac_ext=c
3676 ac_cpp='$CPP $CPPFLAGS'
3677 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3678 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3679 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3680
3681
3682 have_pthread=no
3683   with_pthread_req=unspecified
3684
3685   # AX_PTHREAD is from the GNU Autoconf Archive.
3686   # https://savannah.gnu.org/projects/autoconf-archive/
3687   # ===========================================================================
3688 #        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
3689 # ===========================================================================
3690 #
3691 # SYNOPSIS
3692 #
3693 #   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
3694 #
3695 # DESCRIPTION
3696 #
3697 #   This macro figures out how to build C programs using POSIX threads. It
3698 #   sets the PTHREAD_LIBS output variable to the threads library and linker
3699 #   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
3700 #   flags that are needed. (The user can also force certain compiler
3701 #   flags/libs to be tested by setting these environment variables.)
3702 #
3703 #   Also sets PTHREAD_CC to any special C compiler that is needed for
3704 #   multi-threaded programs (defaults to the value of CC otherwise). (This
3705 #   is necessary on AIX to use the special cc_r compiler alias.)
3706 #
3707 #   NOTE: You are assumed to not only compile your program with these flags,
3708 #   but also link it with them as well. e.g. you should link with
3709 #   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
3710 #
3711 #   If you are only building threads programs, you may wish to use these
3712 #   variables in your default LIBS, CFLAGS, and CC:
3713 #
3714 #     LIBS="$PTHREAD_LIBS $LIBS"
3715 #     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
3716 #     CC="$PTHREAD_CC"
3717 #
3718 #   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
3719 #   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
3720 #   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
3721 #
3722 #   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
3723 #   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
3724 #   PTHREAD_CFLAGS.
3725 #
3726 #   ACTION-IF-FOUND is a list of shell commands to run if a threads library
3727 #   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
3728 #   is not found. If ACTION-IF-FOUND is not specified, the default action
3729 #   will define HAVE_PTHREAD.
3730 #
3731 #   Please let the authors know if this macro fails on any platform, or if
3732 #   you have any other suggestions or comments. This macro was based on work
3733 #   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
3734 #   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
3735 #   Alejandro Forero Cuervo to the autoconf macro repository. We are also
3736 #   grateful for the helpful feedback of numerous users.
3737 #
3738 #   Updated for Autoconf 2.68 by Daniel Richard G.
3739 #
3740 # LICENSE
3741 #
3742 #   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
3743 #   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
3744 #
3745 #   This program is free software: you can redistribute it and/or modify it
3746 #   under the terms of the GNU General Public License as published by the
3747 #   Free Software Foundation, either version 3 of the License, or (at your
3748 #   option) any later version.
3749 #
3750 #   This program is distributed in the hope that it will be useful, but
3751 #   WITHOUT ANY WARRANTY; without even the implied warranty of
3752 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
3753 #   Public License for more details.
3754 #
3755 #   You should have received a copy of the GNU General Public License along
3756 #   with this program. If not, see <http://www.gnu.org/licenses/>.
3757 #
3758 #   As a special exception, the respective Autoconf Macro's copyright owner
3759 #   gives unlimited permission to copy, distribute and modify the configure
3760 #   scripts that are the output of Autoconf when processing the Macro. You
3761 #   need not follow the terms of the GNU General Public License when using
3762 #   or distributing such scripts, even though portions of the text of the
3763 #   Macro appear in them. The GNU General Public License (GPL) does govern
3764 #   all other use of the material that constitutes the Autoconf Macro.
3765 #
3766 #   This special exception to the GPL applies to versions of the Autoconf
3767 #   Macro released by the Autoconf Archive. When you make and distribute a
3768 #   modified version of the Autoconf Macro, you may extend this special
3769 #   exception to the GPL to apply to your modified version as well.
3770
3771 #serial 21
3772
3773 # This is what autoupdate's m4 run will expand.  It fires
3774 # the warning (with _au_warn_XXX), outputs it into the
3775 # updated configure.ac (with AC_DIAGNOSE), and then outputs
3776 # the replacement expansion.
3777
3778
3779 # This is an auxiliary macro that is also run when
3780 # autoupdate runs m4.  It simply calls m4_warning, but
3781 # we need a wrapper so that each warning is emitted only
3782 # once.  We break the quoting in m4_warning's argument in
3783 # order to expand this macro's arguments, not AU_DEFUN's.
3784
3785
3786 # Finally, this is the expansion that is picked up by
3787 # autoconf.  It tells the user to run autoupdate, and
3788 # then outputs the replacement expansion.  We do not care
3789 # about autoupdate's warning because that contains
3790 # information on what to do *after* running autoupdate.
3791
3792
3793
3794   # This affects CC, LIBS, and CFLAGS, instead of defining new variables.
3795
3796
3797 # Check whether --with-pthread was given.
3798 if test "${with_pthread+set}" = set; then :
3799   withval=$with_pthread; with_pthread="$withval"; with_pthread_req="$withval"
3800 else
3801   with_pthread=yes
3802 fi
3803
3804
3805   if test "$with_pthread" = yes; then
3806     # AX_PTHREAD might want a different compiler.
3807
3808
3809 ac_ext=c
3810 ac_cpp='$CPP $CPPFLAGS'
3811 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3812 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3813 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3814
3815 ax_pthread_ok=no
3816
3817 # We used to check for pthread.h first, but this fails if pthread.h
3818 # requires special compiler flags (e.g. on True64 or Sequent).
3819 # It gets checked for in the link test anyway.
3820
3821 # First of all, check if the user has set any of the PTHREAD_LIBS,
3822 # etcetera environment variables, and if threads linking works using
3823 # them:
3824 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
3825         save_CFLAGS="$CFLAGS"
3826         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
3827         save_LIBS="$LIBS"
3828         LIBS="$PTHREAD_LIBS $LIBS"
3829         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
3830 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
3831         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3832 /* end confdefs.h.  */
3833
3834 /* Override any GCC internal prototype to avoid an error.
3835    Use char because int might match the return type of a GCC
3836    builtin and then its argument prototype would still apply.  */
3837 #ifdef __cplusplus
3838 extern "C"
3839 #endif
3840 char pthread_join ();
3841 int
3842 main ()
3843 {
3844 return pthread_join ();
3845   ;
3846   return 0;
3847 }
3848 _ACEOF
3849 if ac_fn_c_try_link "$LINENO"; then :
3850   ax_pthread_ok=yes
3851 fi
3852 rm -f core conftest.err conftest.$ac_objext \
3853     conftest$ac_exeext conftest.$ac_ext
3854         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
3855 $as_echo "$ax_pthread_ok" >&6; }
3856         if test x"$ax_pthread_ok" = xno; then
3857                 PTHREAD_LIBS=""
3858                 PTHREAD_CFLAGS=""
3859         fi
3860         LIBS="$save_LIBS"
3861         CFLAGS="$save_CFLAGS"
3862 fi
3863
3864 # We must check for the threads library under a number of different
3865 # names; the ordering is very important because some systems
3866 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
3867 # libraries is broken (non-POSIX).
3868
3869 # Create a list of thread flags to try.  Items starting with a "-" are
3870 # C compiler flags, and other items are library names, except for "none"
3871 # which indicates that we try without any flags at all, and "pthread-config"
3872 # which is a program returning the flags for the Pth emulation library.
3873
3874 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3875
3876 # The ordering *is* (sometimes) important.  Some notes on the
3877 # individual items follow:
3878
3879 # pthreads: AIX (must check this before -lpthread)
3880 # none: in case threads are in libc; should be tried before -Kthread and
3881 #       other compiler flags to prevent continual compiler warnings
3882 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
3883 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
3884 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3885 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
3886 # -pthreads: Solaris/gcc
3887 # -mthreads: Mingw32/gcc, Lynx/gcc
3888 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
3889 #      doesn't hurt to check since this sometimes defines pthreads too;
3890 #      also defines -D_REENTRANT)
3891 #      ... -mt is also the pthreads flag for HP/aCC
3892 # pthread: Linux, etcetera
3893 # --thread-safe: KAI C++
3894 # pthread-config: use pthread-config program (for GNU Pth library)
3895
3896 case ${host_os} in
3897         solaris*)
3898
3899         # On Solaris (at least, for some versions), libc contains stubbed
3900         # (non-functional) versions of the pthreads routines, so link-based
3901         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
3902         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
3903         # a function called by this macro, so we could check for that, but
3904         # who knows whether they'll stub that too in a future libc.)  So,
3905         # we'll just look for -pthreads and -lpthread first:
3906
3907         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
3908         ;;
3909
3910         darwin*)
3911         ax_pthread_flags="-pthread $ax_pthread_flags"
3912         ;;
3913 esac
3914
3915 # Clang doesn't consider unrecognized options an error unless we specify
3916 # -Werror. We throw in some extra Clang-specific options to ensure that
3917 # this doesn't happen for GCC, which also accepts -Werror.
3918
3919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
3920 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
3921 save_CFLAGS="$CFLAGS"
3922 ax_pthread_extra_flags="-Werror"
3923 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
3924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3925 /* end confdefs.h.  */
3926 int foo(void);
3927 int
3928 main ()
3929 {
3930 foo()
3931   ;
3932   return 0;
3933 }
3934 _ACEOF
3935 if ac_fn_c_try_compile "$LINENO"; then :
3936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3937 $as_echo "yes" >&6; }
3938 else
3939   ax_pthread_extra_flags=
3940                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3941 $as_echo "no" >&6; }
3942 fi
3943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3944 CFLAGS="$save_CFLAGS"
3945
3946 if test x"$ax_pthread_ok" = xno; then
3947 for flag in $ax_pthread_flags; do
3948
3949         case $flag in
3950                 none)
3951                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
3952 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
3953                 ;;
3954
3955                 -*)
3956                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
3957 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
3958                 PTHREAD_CFLAGS="$flag"
3959                 ;;
3960
3961                 pthread-config)
3962                 # Extract the first word of "pthread-config", so it can be a program name with args.
3963 set dummy pthread-config; ac_word=$2
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3965 $as_echo_n "checking for $ac_word... " >&6; }
3966 if ${ac_cv_prog_ax_pthread_config+:} false; then :
3967   $as_echo_n "(cached) " >&6
3968 else
3969   if test -n "$ax_pthread_config"; then
3970   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
3971 else
3972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3973 for as_dir in $PATH
3974 do
3975   IFS=$as_save_IFS
3976   test -z "$as_dir" && as_dir=.
3977     for ac_exec_ext in '' $ac_executable_extensions; do
3978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3979     ac_cv_prog_ax_pthread_config="yes"
3980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3981     break 2
3982   fi
3983 done
3984   done
3985 IFS=$as_save_IFS
3986
3987   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
3988 fi
3989 fi
3990 ax_pthread_config=$ac_cv_prog_ax_pthread_config
3991 if test -n "$ax_pthread_config"; then
3992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
3993 $as_echo "$ax_pthread_config" >&6; }
3994 else
3995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3996 $as_echo "no" >&6; }
3997 fi
3998
3999
4000                 if test x"$ax_pthread_config" = xno; then continue; fi
4001                 PTHREAD_CFLAGS="`pthread-config --cflags`"
4002                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
4003                 ;;
4004
4005                 *)
4006                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
4007 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
4008                 PTHREAD_LIBS="-l$flag"
4009                 ;;
4010         esac
4011
4012         save_LIBS="$LIBS"
4013         save_CFLAGS="$CFLAGS"
4014         LIBS="$PTHREAD_LIBS $LIBS"
4015         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
4016
4017         # Check for various functions.  We must include pthread.h,
4018         # since some functions may be macros.  (On the Sequent, we
4019         # need a special flag -Kthread to make this header compile.)
4020         # We check for pthread_join because it is in -lpthread on IRIX
4021         # while pthread_create is in libc.  We check for pthread_attr_init
4022         # due to DEC craziness with -lpthreads.  We check for
4023         # pthread_cleanup_push because it is one of the few pthread
4024         # functions on Solaris that doesn't have a non-functional libc stub.
4025         # We try pthread_create on general principles.
4026         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4027 /* end confdefs.h.  */
4028 #include <pthread.h>
4029                         static void routine(void *a) { a = 0; }
4030                         static void *start_routine(void *a) { return a; }
4031 int
4032 main ()
4033 {
4034 pthread_t th; pthread_attr_t attr;
4035                         pthread_create(&th, 0, start_routine, 0);
4036                         pthread_join(th, 0);
4037                         pthread_attr_init(&attr);
4038                         pthread_cleanup_push(routine, 0);
4039                         pthread_cleanup_pop(0) /* ; */
4040   ;
4041   return 0;
4042 }
4043 _ACEOF
4044 if ac_fn_c_try_link "$LINENO"; then :
4045   ax_pthread_ok=yes
4046 fi
4047 rm -f core conftest.err conftest.$ac_objext \
4048     conftest$ac_exeext conftest.$ac_ext
4049
4050         LIBS="$save_LIBS"
4051         CFLAGS="$save_CFLAGS"
4052
4053         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
4054 $as_echo "$ax_pthread_ok" >&6; }
4055         if test "x$ax_pthread_ok" = xyes; then
4056                 break;
4057         fi
4058
4059         PTHREAD_LIBS=""
4060         PTHREAD_CFLAGS=""
4061 done
4062 fi
4063
4064 # Various other checks:
4065 if test "x$ax_pthread_ok" = xyes; then
4066         save_LIBS="$LIBS"
4067         LIBS="$PTHREAD_LIBS $LIBS"
4068         save_CFLAGS="$CFLAGS"
4069         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
4070
4071         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
4072         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
4073 $as_echo_n "checking for joinable pthread attribute... " >&6; }
4074         attr_name=unknown
4075         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
4076             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4077 /* end confdefs.h.  */
4078 #include <pthread.h>
4079 int
4080 main ()
4081 {
4082 int attr = $attr; return attr /* ; */
4083   ;
4084   return 0;
4085 }
4086 _ACEOF
4087 if ac_fn_c_try_link "$LINENO"; then :
4088   attr_name=$attr; break
4089 fi
4090 rm -f core conftest.err conftest.$ac_objext \
4091     conftest$ac_exeext conftest.$ac_ext
4092         done
4093         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
4094 $as_echo "$attr_name" >&6; }
4095         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
4096
4097 cat >>confdefs.h <<_ACEOF
4098 #define PTHREAD_CREATE_JOINABLE $attr_name
4099 _ACEOF
4100
4101         fi
4102
4103         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
4104 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
4105         flag=no
4106         case ${host_os} in
4107             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
4108             osf* | hpux*) flag="-D_REENTRANT";;
4109             solaris*)
4110             if test "$GCC" = "yes"; then
4111                 flag="-D_REENTRANT"
4112             else
4113                 # TODO: What about Clang on Solaris?
4114                 flag="-mt -D_REENTRANT"
4115             fi
4116             ;;
4117         esac
4118         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
4119 $as_echo "$flag" >&6; }
4120         if test "x$flag" != xno; then
4121             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
4122         fi
4123
4124         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
4125 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
4126 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
4127   $as_echo_n "(cached) " >&6
4128 else
4129
4130                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4131 /* end confdefs.h.  */
4132 #include <pthread.h>
4133 int
4134 main ()
4135 {
4136 int i = PTHREAD_PRIO_INHERIT;
4137   ;
4138   return 0;
4139 }
4140 _ACEOF
4141 if ac_fn_c_try_link "$LINENO"; then :
4142   ax_cv_PTHREAD_PRIO_INHERIT=yes
4143 else
4144   ax_cv_PTHREAD_PRIO_INHERIT=no
4145 fi
4146 rm -f core conftest.err conftest.$ac_objext \
4147     conftest$ac_exeext conftest.$ac_ext
4148
4149 fi
4150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
4151 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
4152         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
4153
4154 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
4155
4156 fi
4157
4158         LIBS="$save_LIBS"
4159         CFLAGS="$save_CFLAGS"
4160
4161         # More AIX lossage: compile with *_r variant
4162         if test "x$GCC" != xyes; then
4163             case $host_os in
4164                 aix*)
4165                 case "x/$CC" in #(
4166   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
4167     #handle absolute path differently from PATH based program lookup
4168                    case "x$CC" in #(
4169   x/*) :
4170     if as_fn_executable_p ${CC}_r; then :
4171   PTHREAD_CC="${CC}_r"
4172 fi ;; #(
4173   *) :
4174     for ac_prog in ${CC}_r
4175 do
4176   # Extract the first word of "$ac_prog", so it can be a program name with args.
4177 set dummy $ac_prog; ac_word=$2
4178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4179 $as_echo_n "checking for $ac_word... " >&6; }
4180 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
4181   $as_echo_n "(cached) " >&6
4182 else
4183   if test -n "$PTHREAD_CC"; then
4184   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
4185 else
4186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187 for as_dir in $PATH
4188 do
4189   IFS=$as_save_IFS
4190   test -z "$as_dir" && as_dir=.
4191     for ac_exec_ext in '' $ac_executable_extensions; do
4192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4193     ac_cv_prog_PTHREAD_CC="$ac_prog"
4194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4195     break 2
4196   fi
4197 done
4198   done
4199 IFS=$as_save_IFS
4200
4201 fi
4202 fi
4203 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
4204 if test -n "$PTHREAD_CC"; then
4205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
4206 $as_echo "$PTHREAD_CC" >&6; }
4207 else
4208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4209 $as_echo "no" >&6; }
4210 fi
4211
4212
4213   test -n "$PTHREAD_CC" && break
4214 done
4215 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
4216  ;;
4217 esac ;; #(
4218   *) :
4219      ;;
4220 esac
4221                 ;;
4222             esac
4223         fi
4224 fi
4225
4226 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
4227
4228
4229
4230
4231
4232 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
4233 if test x"$ax_pthread_ok" = xyes; then
4234         if test "$CC" = "$PTHREAD_CC" -o -z "$ac_original_cc"; then
4235         have_pthread=yes
4236       else
4237         ac_prog_cc_no_pthread=yes
4238       fi
4239
4240         :
4241 else
4242         ax_pthread_ok=no
4243
4244 fi
4245 ac_ext=c
4246 ac_cpp='$CPP $CPPFLAGS'
4247 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4248 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4249 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4250
4251
4252
4253     if test "$have_pthread" = yes; then
4254       $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
4255
4256       CC=$PTHREAD_CC
4257     fi
4258   fi
4259  # Needs ac_original_cc.
4260
4261
4262
4263   if test -z "$GCC"; then
4264     # not using GCC
4265     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to request ANSI compilation" >&5
4266 $as_echo_n "checking how to request ANSI compilation... " >&6; }
4267     case "$host" in
4268       *-hpux* )
4269         { $as_echo "$as_me:${as_lineno-$LINENO}: result: HPUX: adding -Ae" >&5
4270 $as_echo "HPUX: adding -Ae" >&6; }
4271         CC="$CC -Ae"
4272       ;;
4273       *-aix* )
4274         { $as_echo "$as_me:${as_lineno-$LINENO}: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
4275 $as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
4276         CC="$CC -qlanglvl=ansi -qhalt=e"
4277       ;;
4278       *-dec-* )
4279         { $as_echo "$as_me:${as_lineno-$LINENO}: result: DEC: adding -std1 -ieee" >&5
4280 $as_echo "DEC: adding -std1 -ieee" >&6; }
4281         CC="$CC -std1"
4282       ;;
4283       *)
4284         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no idea" >&5
4285 $as_echo "no idea" >&6; }
4286       ;;
4287     esac
4288   else
4289     # using GCC
4290     case "$host" in
4291       *-solaris*)
4292         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris: adding -D__EXTENSIONS__" >&5
4293 $as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
4294         CC="$CC -D__EXTENSIONS__"
4295       ;;
4296     esac
4297   fi
4298
4299   OBJCC="$CC"
4300
4301   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler works on ANSI C" >&5
4302 $as_echo_n "checking whether the compiler works on ANSI C... " >&6; }
4303   if test "$cross_compiling" = yes; then :
4304   as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
4305 else
4306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4307 /* end confdefs.h.  */
4308  main(int ac, char **av) { return 0; }
4309 _ACEOF
4310 if ac_fn_c_try_run "$LINENO"; then :
4311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4312 $as_echo "yes" >&6; }
4313 else
4314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4315 $as_echo "no" >&6; }
4316      as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
4317 fi
4318 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4319   conftest.$ac_objext conftest.beam conftest.$ac_ext
4320 fi
4321
4322
4323   if test -n "$GCC"; then
4324     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on gcc compiler warnings." >&5
4325 $as_echo "Turning on gcc compiler warnings." >&6; }
4326     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
4327     OBJCC="$OBJCC -Wall"
4328     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
4329     # and so perhaps now we can do without -pedantic?
4330   else
4331     case "$host" in
4332       *-irix5* |*-irix6.0-3* )
4333         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on SGI compiler warnings." >&5
4334 $as_echo "Turning on SGI compiler warnings." >&6; }
4335         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
4336       ;;
4337 #     *-dec-osf* )
4338 #       if test -z "$GCC"; then
4339 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
4340 #         CC="$CC -migrate -w0 -verbose -warnprotos"
4341 #       fi
4342 #     ;;
4343     esac
4344   fi
4345
4346 if test -n "$GCC"; then
4347    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wno-overlength-strings" >&5
4348 $as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
4349 if ${ac_cv_gcc_accepts_no_overlength+:} false; then :
4350   $as_echo_n "(cached) " >&6
4351 else
4352   rm -rf conftest.$ac_ext
4353      touch conftest.$ac_ext
4354      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4355           grep unrecognized >/dev/null ); then
4356        ac_cv_gcc_accepts_no_overlength=no
4357      else
4358        ac_cv_gcc_accepts_no_overlength=yes
4359        CC="$CC -Wno-overlength-strings"
4360      fi
4361 fi
4362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_overlength" >&5
4363 $as_echo "$ac_cv_gcc_accepts_no_overlength" >&6; }
4364    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
4365   fi
4366
4367 if test -n "$GCC"; then
4368    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wdeclaration-after-statement" >&5
4369 $as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
4370 if ${ac_cv_gcc_accepts_no_decl_after+:} false; then :
4371   $as_echo_n "(cached) " >&6
4372 else
4373   rm -rf conftest.$ac_ext
4374      touch conftest.$ac_ext
4375      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4376           grep unrecognized >/dev/null ); then
4377        ac_cv_gcc_accepts_no_decl_after=no
4378      else
4379        ac_cv_gcc_accepts_no_decl_after=yes
4380        CC="$CC -Wdeclaration-after-statement"
4381      fi
4382 fi
4383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_decl_after" >&5
4384 $as_echo "$ac_cv_gcc_accepts_no_decl_after" >&6; }
4385    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
4386   fi
4387
4388 if test -n "$GCC"; then
4389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -no-cpp-precomp" >&5
4390 $as_echo_n "checking whether gcc accepts -no-cpp-precomp... " >&6; }
4391 if ${ac_cv_gcc_accepts_no_cpp_precomp+:} false; then :
4392   $as_echo_n "(cached) " >&6
4393 else
4394   rm -rf conftest.$ac_ext
4395      touch conftest.$ac_ext
4396      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4397           grep unrecognized >/dev/null ); then
4398        ac_cv_gcc_accepts_no_cpp_precomp=no
4399      else
4400        ac_cv_gcc_accepts_no_cpp_precomp=yes
4401        CC="$CC -no-cpp-precomp"
4402      fi
4403 fi
4404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
4405 $as_echo "$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
4406    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
4407   fi
4408
4409 if test -n "$GCC"; then
4410
4411   case "$host" in
4412     *-darwin* )
4413       # Fucking Apple let // comments sneak into OpenGL headers, so
4414       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
4415     ;;
4416    *)
4417      if test -n "$GCC"; then
4418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -std=c89" >&5
4419 $as_echo_n "checking whether gcc accepts -std=c89... " >&6; }
4420 if ${ac_cv_gcc_accepts_std+:} false; then :
4421   $as_echo_n "(cached) " >&6
4422 else
4423   rm -rf conftest.$ac_ext
4424      touch conftest.$ac_ext
4425      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4426           grep unrecognized >/dev/null ); then
4427        ac_cv_gcc_accepts_std=no
4428      else
4429        ac_cv_gcc_accepts_std=yes
4430        CC="$CC -std=c89"
4431      fi
4432 fi
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_std" >&5
4434 $as_echo "$ac_cv_gcc_accepts_std" >&6; }
4435    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
4436   fi
4437
4438    ;;
4439   esac
4440
4441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling C++ comments in ANSI C code." >&5
4442 $as_echo "Disabling C++ comments in ANSI C code." >&6; }
4443    #
4444    # The reason that // comments are banned from xscreensaver is that gcc is
4445    # basically the only compiler in the world that supports them in C code.
4446    # All other vendors support them only in their C++ compilers, not in their
4447    # ANSI C compilers.  This means that it's a portability problem: every time
4448    # these comments have snuck into the xscreensaver source code, I've gotten
4449    # complaints about it the next day.  So we turn off support for them in gcc
4450    # as well to prevent them from accidentially slipping in.
4451    #
4452    if test "$ac_gcc_accepts_std" = yes ; then
4453      #
4454      # -std=c89 defines __STRICT_ANSI__, which we don't want.
4455      # (That appears to be the only additional preprocessor symbol
4456      # it defines, in addition to the syntax changes it makes.)
4457      #
4458      # -std=gnu89 is no good, because // comments were a GNU extension
4459      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
4460      # with -std=gnu89 but not with -std=c89.)
4461      #
4462      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
4463      CC="$CC -U__STRICT_ANSI__"
4464 #   else
4465 #     # The old way:
4466 #     CC="$CC -Wp,-lang-c89"
4467    fi
4468   fi
4469
4470 ac_ext=c
4471 ac_cpp='$CPP $CPPFLAGS'
4472 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4473 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4474 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4476 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4477 # On Suns, sometimes $CPP names a directory.
4478 if test -n "$CPP" && test -d "$CPP"; then
4479   CPP=
4480 fi
4481 if test -z "$CPP"; then
4482   if ${ac_cv_prog_CPP+:} false; then :
4483   $as_echo_n "(cached) " >&6
4484 else
4485       # Double quotes because CPP needs to be expanded
4486     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4487     do
4488       ac_preproc_ok=false
4489 for ac_c_preproc_warn_flag in '' yes
4490 do
4491   # Use a header file that comes with gcc, so configuring glibc
4492   # with a fresh cross-compiler works.
4493   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4494   # <limits.h> exists even on freestanding compilers.
4495   # On the NeXT, cc -E runs the code through the compiler's parser,
4496   # not just through cpp. "Syntax error" is here to catch this case.
4497   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498 /* end confdefs.h.  */
4499 #ifdef __STDC__
4500 # include <limits.h>
4501 #else
4502 # include <assert.h>
4503 #endif
4504                      Syntax error
4505 _ACEOF
4506 if ac_fn_c_try_cpp "$LINENO"; then :
4507
4508 else
4509   # Broken: fails on valid input.
4510 continue
4511 fi
4512 rm -rf conftest.err conftest.i conftest.$ac_ext
4513
4514   # OK, works on sane cases.  Now check whether nonexistent headers
4515   # can be detected and how.
4516   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4517 /* end confdefs.h.  */
4518 #include <ac_nonexistent.h>
4519 _ACEOF
4520 if ac_fn_c_try_cpp "$LINENO"; then :
4521   # Broken: success on invalid input.
4522 continue
4523 else
4524   # Passes both tests.
4525 ac_preproc_ok=:
4526 break
4527 fi
4528 rm -rf conftest.err conftest.i conftest.$ac_ext
4529
4530 done
4531 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4532 rm -rf conftest.i conftest.err conftest.$ac_ext
4533 if $ac_preproc_ok; then :
4534   break
4535 fi
4536
4537     done
4538     ac_cv_prog_CPP=$CPP
4539
4540 fi
4541   CPP=$ac_cv_prog_CPP
4542 else
4543   ac_cv_prog_CPP=$CPP
4544 fi
4545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4546 $as_echo "$CPP" >&6; }
4547 ac_preproc_ok=false
4548 for ac_c_preproc_warn_flag in '' yes
4549 do
4550   # Use a header file that comes with gcc, so configuring glibc
4551   # with a fresh cross-compiler works.
4552   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4553   # <limits.h> exists even on freestanding compilers.
4554   # On the NeXT, cc -E runs the code through the compiler's parser,
4555   # not just through cpp. "Syntax error" is here to catch this case.
4556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4557 /* end confdefs.h.  */
4558 #ifdef __STDC__
4559 # include <limits.h>
4560 #else
4561 # include <assert.h>
4562 #endif
4563                      Syntax error
4564 _ACEOF
4565 if ac_fn_c_try_cpp "$LINENO"; then :
4566
4567 else
4568   # Broken: fails on valid input.
4569 continue
4570 fi
4571 rm -rf conftest.err conftest.i conftest.$ac_ext
4572
4573   # OK, works on sane cases.  Now check whether nonexistent headers
4574   # can be detected and how.
4575   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4576 /* end confdefs.h.  */
4577 #include <ac_nonexistent.h>
4578 _ACEOF
4579 if ac_fn_c_try_cpp "$LINENO"; then :
4580   # Broken: success on invalid input.
4581 continue
4582 else
4583   # Passes both tests.
4584 ac_preproc_ok=:
4585 break
4586 fi
4587 rm -rf conftest.err conftest.i conftest.$ac_ext
4588
4589 done
4590 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4591 rm -rf conftest.i conftest.err conftest.$ac_ext
4592 if $ac_preproc_ok; then :
4593
4594 else
4595   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4596 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4597 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4598 See \`config.log' for more details" "$LINENO" 5; }
4599 fi
4600
4601 ac_ext=c
4602 ac_cpp='$CPP $CPPFLAGS'
4603 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4604 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4605 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4606
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4608 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4609 if ${ac_cv_c_const+:} false; then :
4610   $as_echo_n "(cached) " >&6
4611 else
4612   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4613 /* end confdefs.h.  */
4614
4615 int
4616 main ()
4617 {
4618
4619 #ifndef __cplusplus
4620   /* Ultrix mips cc rejects this sort of thing.  */
4621   typedef int charset[2];
4622   const charset cs = { 0, 0 };
4623   /* SunOS 4.1.1 cc rejects this.  */
4624   char const *const *pcpcc;
4625   char **ppc;
4626   /* NEC SVR4.0.2 mips cc rejects this.  */
4627   struct point {int x, y;};
4628   static struct point const zero = {0,0};
4629   /* AIX XL C 1.02.0.0 rejects this.
4630      It does not let you subtract one const X* pointer from another in
4631      an arm of an if-expression whose if-part is not a constant
4632      expression */
4633   const char *g = "string";
4634   pcpcc = &g + (g ? g-g : 0);
4635   /* HPUX 7.0 cc rejects these. */
4636   ++pcpcc;
4637   ppc = (char**) pcpcc;
4638   pcpcc = (char const *const *) ppc;
4639   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4640     char tx;
4641     char *t = &tx;
4642     char const *s = 0 ? (char *) 0 : (char const *) 0;
4643
4644     *t++ = 0;
4645     if (s) return 0;
4646   }
4647   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4648     int x[] = {25, 17};
4649     const int *foo = &x[0];
4650     ++foo;
4651   }
4652   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4653     typedef const int *iptr;
4654     iptr p = 0;
4655     ++p;
4656   }
4657   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4658        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4659     struct s { int j; const int *ap[3]; } bx;
4660     struct s *b = &bx; b->j = 5;
4661   }
4662   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4663     const int foo = 10;
4664     if (!foo) return 0;
4665   }
4666   return !cs[0] && !zero.x;
4667 #endif
4668
4669   ;
4670   return 0;
4671 }
4672 _ACEOF
4673 if ac_fn_c_try_compile "$LINENO"; then :
4674   ac_cv_c_const=yes
4675 else
4676   ac_cv_c_const=no
4677 fi
4678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4679 fi
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4681 $as_echo "$ac_cv_c_const" >&6; }
4682 if test $ac_cv_c_const = no; then
4683
4684 $as_echo "#define const /**/" >>confdefs.h
4685
4686 fi
4687
4688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4689 $as_echo_n "checking for inline... " >&6; }
4690 if ${ac_cv_c_inline+:} false; then :
4691   $as_echo_n "(cached) " >&6
4692 else
4693   ac_cv_c_inline=no
4694 for ac_kw in inline __inline__ __inline; do
4695   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4696 /* end confdefs.h.  */
4697 #ifndef __cplusplus
4698 typedef int foo_t;
4699 static $ac_kw foo_t static_foo () {return 0; }
4700 $ac_kw foo_t foo () {return 0; }
4701 #endif
4702
4703 _ACEOF
4704 if ac_fn_c_try_compile "$LINENO"; then :
4705   ac_cv_c_inline=$ac_kw
4706 fi
4707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4708   test "$ac_cv_c_inline" != no && break
4709 done
4710
4711 fi
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4713 $as_echo "$ac_cv_c_inline" >&6; }
4714
4715 case $ac_cv_c_inline in
4716   inline | yes) ;;
4717   *)
4718     case $ac_cv_c_inline in
4719       no) ac_val=;;
4720       *) ac_val=$ac_cv_c_inline;;
4721     esac
4722     cat >>confdefs.h <<_ACEOF
4723 #ifndef __cplusplus
4724 #define inline $ac_val
4725 #endif
4726 _ACEOF
4727     ;;
4728 esac
4729
4730
4731 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4732   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bc" >&5
4733 $as_echo_n "checking for bc... " >&6; }
4734   if test "$ac_bc_result" = "15" ; then
4735     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4736 $as_echo "yes" >&6; }
4737   else
4738     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4739 $as_echo "no" >&6; }
4740     echo ''
4741     as_fn_error $? "Your system doesn't have \"bc\", which has been a standard
4742                   part of Unix since the 1970s.  Come back when your vendor
4743                   has grown a clue." "$LINENO" 5
4744   fi
4745
4746
4747 # stuff for Makefiles
4748 # Find a good install program.  We prefer a C program (faster),
4749 # so one script is as good as another.  But avoid the broken or
4750 # incompatible versions:
4751 # SysV /etc/install, /usr/sbin/install
4752 # SunOS /usr/etc/install
4753 # IRIX /sbin/install
4754 # AIX /bin/install
4755 # AmigaOS /C/install, which installs bootblocks on floppy discs
4756 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4757 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4758 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4759 # OS/2's system install, which has a completely different semantic
4760 # ./install, which can be erroneously created by make from ./install.sh.
4761 # Reject install programs that cannot install multiple files.
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4763 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4764 if test -z "$INSTALL"; then
4765 if ${ac_cv_path_install+:} false; then :
4766   $as_echo_n "(cached) " >&6
4767 else
4768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4769 for as_dir in $PATH
4770 do
4771   IFS=$as_save_IFS
4772   test -z "$as_dir" && as_dir=.
4773     # Account for people who put trailing slashes in PATH elements.
4774 case $as_dir/ in #((
4775   ./ | .// | /[cC]/* | \
4776   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4777   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4778   /usr/ucb/* ) ;;
4779   *)
4780     # OSF1 and SCO ODT 3.0 have their own names for install.
4781     # Don't use installbsd from OSF since it installs stuff as root
4782     # by default.
4783     for ac_prog in ginstall scoinst install; do
4784       for ac_exec_ext in '' $ac_executable_extensions; do
4785         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4786           if test $ac_prog = install &&
4787             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4788             # AIX install.  It has an incompatible calling convention.
4789             :
4790           elif test $ac_prog = install &&
4791             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4792             # program-specific install script used by HP pwplus--don't use.
4793             :
4794           else
4795             rm -rf conftest.one conftest.two conftest.dir
4796             echo one > conftest.one
4797             echo two > conftest.two
4798             mkdir conftest.dir
4799             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4800               test -s conftest.one && test -s conftest.two &&
4801               test -s conftest.dir/conftest.one &&
4802               test -s conftest.dir/conftest.two
4803             then
4804               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4805               break 3
4806             fi
4807           fi
4808         fi
4809       done
4810     done
4811     ;;
4812 esac
4813
4814   done
4815 IFS=$as_save_IFS
4816
4817 rm -rf conftest.one conftest.two conftest.dir
4818
4819 fi
4820   if test "${ac_cv_path_install+set}" = set; then
4821     INSTALL=$ac_cv_path_install
4822   else
4823     # As a last resort, use the slow shell script.  Don't cache a
4824     # value for INSTALL within a source directory, because that will
4825     # break other packages using the cache if that directory is
4826     # removed, or if the value is a relative name.
4827     INSTALL=$ac_install_sh
4828   fi
4829 fi
4830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4831 $as_echo "$INSTALL" >&6; }
4832
4833 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4834 # It thinks the first close brace ends the variable substitution.
4835 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4836
4837 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4838
4839 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4840
4841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4842 $as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4843 if ${ac_cv_install_d_creates_dirs+:} false; then :
4844   $as_echo_n "(cached) " >&6
4845 else
4846   ac_cv_install_d_creates_dirs=no
4847      rm -rf conftestdir
4848      if mkdir conftestdir; then
4849        cd conftestdir 2>/dev/null
4850        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4851        if test -d dir1/dir2/. ; then
4852          ac_cv_install_d_creates_dirs=yes
4853        fi
4854        cd .. 2>/dev/null
4855        rm -rf conftestdir
4856      fi
4857
4858 fi
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_install_d_creates_dirs" >&5
4860 $as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4861
4862   if test "$ac_cv_install_d_creates_dirs" = no ; then
4863     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"mkdir -p\" creates intermediate directories" >&5
4864 $as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4865 if ${ac_cv_mkdir_p_creates_dirs+:} false; then :
4866   $as_echo_n "(cached) " >&6
4867 else
4868   ac_cv_mkdir_p_creates_dirs=no
4869        rm -rf conftestdir
4870        if mkdir conftestdir; then
4871          cd conftestdir 2>/dev/null
4872          mkdir -p dir1/dir2 >/dev/null 2>&1
4873          if test -d dir1/dir2/. ; then
4874            ac_cv_mkdir_p_creates_dirs=yes
4875          fi
4876          cd .. 2>/dev/null
4877          rm -rf conftestdir
4878        fi
4879
4880 fi
4881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_p_creates_dirs" >&5
4882 $as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4883   fi
4884
4885   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4886     INSTALL_DIRS='${INSTALL} -d'
4887   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4888     INSTALL_DIRS='mkdir -p'
4889   else
4890     # any other ideas?
4891     INSTALL_DIRS='${INSTALL} -d'
4892   fi
4893
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4895 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4896 set x ${MAKE-make}
4897 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4898 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4899   $as_echo_n "(cached) " >&6
4900 else
4901   cat >conftest.make <<\_ACEOF
4902 SHELL = /bin/sh
4903 all:
4904         @echo '@@@%%%=$(MAKE)=@@@%%%'
4905 _ACEOF
4906 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4907 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4908   *@@@%%%=?*=@@@%%%*)
4909     eval ac_cv_prog_make_${ac_make}_set=yes;;
4910   *)
4911     eval ac_cv_prog_make_${ac_make}_set=no;;
4912 esac
4913 rm -rf conftest.make
4914 fi
4915 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4917 $as_echo "yes" >&6; }
4918   SET_MAKE=
4919 else
4920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4921 $as_echo "no" >&6; }
4922   SET_MAKE="MAKE=${MAKE-make}"
4923 fi
4924
4925
4926 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4927 # That's wrong: it should be set to '${INSTALL}', so that one can
4928 # implement the "install-strip" target properly (strip executables,
4929 # but do not try to strip scripts.)
4930 #
4931 INSTALL_SCRIPT='${INSTALL}'
4932
4933 # random libc stuff
4934
4935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4936 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4937 if ${ac_cv_path_GREP+:} false; then :
4938   $as_echo_n "(cached) " >&6
4939 else
4940   if test -z "$GREP"; then
4941   ac_path_GREP_found=false
4942   # Loop through the user's path and test for each of PROGNAME-LIST
4943   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4944 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4945 do
4946   IFS=$as_save_IFS
4947   test -z "$as_dir" && as_dir=.
4948     for ac_prog in grep ggrep; do
4949     for ac_exec_ext in '' $ac_executable_extensions; do
4950       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4951       as_fn_executable_p "$ac_path_GREP" || continue
4952 # Check for GNU ac_path_GREP and select it if it is found.
4953   # Check for GNU $ac_path_GREP
4954 case `"$ac_path_GREP" --version 2>&1` in
4955 *GNU*)
4956   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4957 *)
4958   ac_count=0
4959   $as_echo_n 0123456789 >"conftest.in"
4960   while :
4961   do
4962     cat "conftest.in" "conftest.in" >"conftest.tmp"
4963     mv "conftest.tmp" "conftest.in"
4964     cp "conftest.in" "conftest.nl"
4965     $as_echo 'GREP' >> "conftest.nl"
4966     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4967     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4968     as_fn_arith $ac_count + 1 && ac_count=$as_val
4969     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4970       # Best one so far, save it but keep looking for a better one
4971       ac_cv_path_GREP="$ac_path_GREP"
4972       ac_path_GREP_max=$ac_count
4973     fi
4974     # 10*(2^10) chars as input seems more than enough
4975     test $ac_count -gt 10 && break
4976   done
4977   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4978 esac
4979
4980       $ac_path_GREP_found && break 3
4981     done
4982   done
4983   done
4984 IFS=$as_save_IFS
4985   if test -z "$ac_cv_path_GREP"; then
4986     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4987   fi
4988 else
4989   ac_cv_path_GREP=$GREP
4990 fi
4991
4992 fi
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4994 $as_echo "$ac_cv_path_GREP" >&6; }
4995  GREP="$ac_cv_path_GREP"
4996
4997
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4999 $as_echo_n "checking for egrep... " >&6; }
5000 if ${ac_cv_path_EGREP+:} false; then :
5001   $as_echo_n "(cached) " >&6
5002 else
5003   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5004    then ac_cv_path_EGREP="$GREP -E"
5005    else
5006      if test -z "$EGREP"; then
5007   ac_path_EGREP_found=false
5008   # Loop through the user's path and test for each of PROGNAME-LIST
5009   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5011 do
5012   IFS=$as_save_IFS
5013   test -z "$as_dir" && as_dir=.
5014     for ac_prog in egrep; do
5015     for ac_exec_ext in '' $ac_executable_extensions; do
5016       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5017       as_fn_executable_p "$ac_path_EGREP" || continue
5018 # Check for GNU ac_path_EGREP and select it if it is found.
5019   # Check for GNU $ac_path_EGREP
5020 case `"$ac_path_EGREP" --version 2>&1` in
5021 *GNU*)
5022   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5023 *)
5024   ac_count=0
5025   $as_echo_n 0123456789 >"conftest.in"
5026   while :
5027   do
5028     cat "conftest.in" "conftest.in" >"conftest.tmp"
5029     mv "conftest.tmp" "conftest.in"
5030     cp "conftest.in" "conftest.nl"
5031     $as_echo 'EGREP' >> "conftest.nl"
5032     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5033     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5034     as_fn_arith $ac_count + 1 && ac_count=$as_val
5035     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5036       # Best one so far, save it but keep looking for a better one
5037       ac_cv_path_EGREP="$ac_path_EGREP"
5038       ac_path_EGREP_max=$ac_count
5039     fi
5040     # 10*(2^10) chars as input seems more than enough
5041     test $ac_count -gt 10 && break
5042   done
5043   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
5044 esac
5045
5046       $ac_path_EGREP_found && break 3
5047     done
5048   done
5049   done
5050 IFS=$as_save_IFS
5051   if test -z "$ac_cv_path_EGREP"; then
5052     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5053   fi
5054 else
5055   ac_cv_path_EGREP=$EGREP
5056 fi
5057
5058    fi
5059 fi
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5061 $as_echo "$ac_cv_path_EGREP" >&6; }
5062  EGREP="$ac_cv_path_EGREP"
5063
5064
5065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5066 $as_echo_n "checking for ANSI C header files... " >&6; }
5067 if ${ac_cv_header_stdc+:} false; then :
5068   $as_echo_n "(cached) " >&6
5069 else
5070   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5071 /* end confdefs.h.  */
5072 #include <stdlib.h>
5073 #include <stdarg.h>
5074 #include <string.h>
5075 #include <float.h>
5076
5077 int
5078 main ()
5079 {
5080
5081   ;
5082   return 0;
5083 }
5084 _ACEOF
5085 if ac_fn_c_try_compile "$LINENO"; then :
5086   ac_cv_header_stdc=yes
5087 else
5088   ac_cv_header_stdc=no
5089 fi
5090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5091
5092 if test $ac_cv_header_stdc = yes; then
5093   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5095 /* end confdefs.h.  */
5096 #include <string.h>
5097
5098 _ACEOF
5099 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5100   $EGREP "memchr" >/dev/null 2>&1; then :
5101
5102 else
5103   ac_cv_header_stdc=no
5104 fi
5105 rm -rf conftest*
5106
5107 fi
5108
5109 if test $ac_cv_header_stdc = yes; then
5110   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5112 /* end confdefs.h.  */
5113 #include <stdlib.h>
5114
5115 _ACEOF
5116 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5117   $EGREP "free" >/dev/null 2>&1; then :
5118
5119 else
5120   ac_cv_header_stdc=no
5121 fi
5122 rm -rf conftest*
5123
5124 fi
5125
5126 if test $ac_cv_header_stdc = yes; then
5127   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5128   if test "$cross_compiling" = yes; then :
5129   :
5130 else
5131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5132 /* end confdefs.h.  */
5133 #include <ctype.h>
5134 #include <stdlib.h>
5135 #if ((' ' & 0x0FF) == 0x020)
5136 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5137 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5138 #else
5139 # define ISLOWER(c) \
5140                    (('a' <= (c) && (c) <= 'i') \
5141                      || ('j' <= (c) && (c) <= 'r') \
5142                      || ('s' <= (c) && (c) <= 'z'))
5143 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5144 #endif
5145
5146 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5147 int
5148 main ()
5149 {
5150   int i;
5151   for (i = 0; i < 256; i++)
5152     if (XOR (islower (i), ISLOWER (i))
5153         || toupper (i) != TOUPPER (i))
5154       return 2;
5155   return 0;
5156 }
5157 _ACEOF
5158 if ac_fn_c_try_run "$LINENO"; then :
5159
5160 else
5161   ac_cv_header_stdc=no
5162 fi
5163 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5164   conftest.$ac_objext conftest.beam conftest.$ac_ext
5165 fi
5166
5167 fi
5168 fi
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5170 $as_echo "$ac_cv_header_stdc" >&6; }
5171 if test $ac_cv_header_stdc = yes; then
5172
5173 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5174
5175 fi
5176
5177 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5178 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5179                   inttypes.h stdint.h unistd.h
5180 do :
5181   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5182 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5183 "
5184 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5185   cat >>confdefs.h <<_ACEOF
5186 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5187 _ACEOF
5188
5189 fi
5190
5191 done
5192
5193
5194 for ac_header in unistd.h
5195 do :
5196   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
5197 if test "x$ac_cv_header_unistd_h" = xyes; then :
5198   cat >>confdefs.h <<_ACEOF
5199 #define HAVE_UNISTD_H 1
5200 _ACEOF
5201
5202 fi
5203
5204 done
5205
5206 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
5207 if test "x$ac_cv_type_mode_t" = xyes; then :
5208
5209 else
5210
5211 cat >>confdefs.h <<_ACEOF
5212 #define mode_t int
5213 _ACEOF
5214
5215 fi
5216
5217 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
5218 if test "x$ac_cv_type_pid_t" = xyes; then :
5219
5220 else
5221
5222 cat >>confdefs.h <<_ACEOF
5223 #define pid_t int
5224 _ACEOF
5225
5226 fi
5227
5228 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
5229 if test "x$ac_cv_type_size_t" = xyes; then :
5230
5231 else
5232
5233 cat >>confdefs.h <<_ACEOF
5234 #define size_t unsigned int
5235 _ACEOF
5236
5237 fi
5238
5239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
5240 $as_echo_n "checking return type of signal handlers... " >&6; }
5241 if ${ac_cv_type_signal+:} false; then :
5242   $as_echo_n "(cached) " >&6
5243 else
5244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5245 /* end confdefs.h.  */
5246 #include <sys/types.h>
5247 #include <signal.h>
5248
5249 int
5250 main ()
5251 {
5252 return *(signal (0, 0)) (0) == 1;
5253   ;
5254   return 0;
5255 }
5256 _ACEOF
5257 if ac_fn_c_try_compile "$LINENO"; then :
5258   ac_cv_type_signal=int
5259 else
5260   ac_cv_type_signal=void
5261 fi
5262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5263 fi
5264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
5265 $as_echo "$ac_cv_type_signal" >&6; }
5266
5267 cat >>confdefs.h <<_ACEOF
5268 #define RETSIGTYPE $ac_cv_type_signal
5269 _ACEOF
5270
5271
5272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
5273 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5274 if ${ac_cv_header_time+:} false; then :
5275   $as_echo_n "(cached) " >&6
5276 else
5277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5278 /* end confdefs.h.  */
5279 #include <sys/types.h>
5280 #include <sys/time.h>
5281 #include <time.h>
5282
5283 int
5284 main ()
5285 {
5286 if ((struct tm *) 0)
5287 return 0;
5288   ;
5289   return 0;
5290 }
5291 _ACEOF
5292 if ac_fn_c_try_compile "$LINENO"; then :
5293   ac_cv_header_time=yes
5294 else
5295   ac_cv_header_time=no
5296 fi
5297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5298 fi
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
5300 $as_echo "$ac_cv_header_time" >&6; }
5301 if test $ac_cv_header_time = yes; then
5302
5303 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
5304
5305 fi
5306
5307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
5308 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5309 if ${ac_cv_header_sys_wait_h+:} false; then :
5310   $as_echo_n "(cached) " >&6
5311 else
5312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5313 /* end confdefs.h.  */
5314 #include <sys/types.h>
5315 #include <sys/wait.h>
5316 #ifndef WEXITSTATUS
5317 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5318 #endif
5319 #ifndef WIFEXITED
5320 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5321 #endif
5322
5323 int
5324 main ()
5325 {
5326   int s;
5327   wait (&s);
5328   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5329   ;
5330   return 0;
5331 }
5332 _ACEOF
5333 if ac_fn_c_try_compile "$LINENO"; then :
5334   ac_cv_header_sys_wait_h=yes
5335 else
5336   ac_cv_header_sys_wait_h=no
5337 fi
5338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5339 fi
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
5341 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
5342 if test $ac_cv_header_sys_wait_h = yes; then
5343
5344 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
5345
5346 fi
5347
5348 ac_header_dirent=no
5349 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5350   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
5352 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5353 if eval \${$as_ac_Header+:} false; then :
5354   $as_echo_n "(cached) " >&6
5355 else
5356   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5357 /* end confdefs.h.  */
5358 #include <sys/types.h>
5359 #include <$ac_hdr>
5360
5361 int
5362 main ()
5363 {
5364 if ((DIR *) 0)
5365 return 0;
5366   ;
5367   return 0;
5368 }
5369 _ACEOF
5370 if ac_fn_c_try_compile "$LINENO"; then :
5371   eval "$as_ac_Header=yes"
5372 else
5373   eval "$as_ac_Header=no"
5374 fi
5375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5376 fi
5377 eval ac_res=\$$as_ac_Header
5378                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5379 $as_echo "$ac_res" >&6; }
5380 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5381   cat >>confdefs.h <<_ACEOF
5382 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5383 _ACEOF
5384
5385 ac_header_dirent=$ac_hdr; break
5386 fi
5387
5388 done
5389 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5390 if test $ac_header_dirent = dirent.h; then
5391   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
5392 $as_echo_n "checking for library containing opendir... " >&6; }
5393 if ${ac_cv_search_opendir+:} false; then :
5394   $as_echo_n "(cached) " >&6
5395 else
5396   ac_func_search_save_LIBS=$LIBS
5397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5398 /* end confdefs.h.  */
5399
5400 /* Override any GCC internal prototype to avoid an error.
5401    Use char because int might match the return type of a GCC
5402    builtin and then its argument prototype would still apply.  */
5403 #ifdef __cplusplus
5404 extern "C"
5405 #endif
5406 char opendir ();
5407 int
5408 main ()
5409 {
5410 return opendir ();
5411   ;
5412   return 0;
5413 }
5414 _ACEOF
5415 for ac_lib in '' dir; do
5416   if test -z "$ac_lib"; then
5417     ac_res="none required"
5418   else
5419     ac_res=-l$ac_lib
5420     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5421   fi
5422   if ac_fn_c_try_link "$LINENO"; then :
5423   ac_cv_search_opendir=$ac_res
5424 fi
5425 rm -f core conftest.err conftest.$ac_objext \
5426     conftest$ac_exeext
5427   if ${ac_cv_search_opendir+:} false; then :
5428   break
5429 fi
5430 done
5431 if ${ac_cv_search_opendir+:} false; then :
5432
5433 else
5434   ac_cv_search_opendir=no
5435 fi
5436 rm conftest.$ac_ext
5437 LIBS=$ac_func_search_save_LIBS
5438 fi
5439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
5440 $as_echo "$ac_cv_search_opendir" >&6; }
5441 ac_res=$ac_cv_search_opendir
5442 if test "$ac_res" != no; then :
5443   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5444
5445 fi
5446
5447 else
5448   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
5449 $as_echo_n "checking for library containing opendir... " >&6; }
5450 if ${ac_cv_search_opendir+:} false; then :
5451   $as_echo_n "(cached) " >&6
5452 else
5453   ac_func_search_save_LIBS=$LIBS
5454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5455 /* end confdefs.h.  */
5456
5457 /* Override any GCC internal prototype to avoid an error.
5458    Use char because int might match the return type of a GCC
5459    builtin and then its argument prototype would still apply.  */
5460 #ifdef __cplusplus
5461 extern "C"
5462 #endif
5463 char opendir ();
5464 int
5465 main ()
5466 {
5467 return opendir ();
5468   ;
5469   return 0;
5470 }
5471 _ACEOF
5472 for ac_lib in '' x; do
5473   if test -z "$ac_lib"; then
5474     ac_res="none required"
5475   else
5476     ac_res=-l$ac_lib
5477     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5478   fi
5479   if ac_fn_c_try_link "$LINENO"; then :
5480   ac_cv_search_opendir=$ac_res
5481 fi
5482 rm -f core conftest.err conftest.$ac_objext \
5483     conftest$ac_exeext
5484   if ${ac_cv_search_opendir+:} false; then :
5485   break
5486 fi
5487 done
5488 if ${ac_cv_search_opendir+:} false; then :
5489
5490 else
5491   ac_cv_search_opendir=no
5492 fi
5493 rm conftest.$ac_ext
5494 LIBS=$ac_func_search_save_LIBS
5495 fi
5496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
5497 $as_echo "$ac_cv_search_opendir" >&6; }
5498 ac_res=$ac_cv_search_opendir
5499 if test "$ac_res" != no; then :
5500   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5501
5502 fi
5503
5504 fi
5505
5506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call gettimeofday" >&5
5507 $as_echo_n "checking how to call gettimeofday... " >&6; }
5508   if ${ac_cv_gettimeofday_args+:} false; then :
5509   $as_echo_n "(cached) " >&6
5510 else
5511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5512 /* end confdefs.h.  */
5513 #include <stdlib.h>
5514                     #include <sys/time.h>
5515 int
5516 main ()
5517 {
5518 struct timeval tv; struct timezone tzp;
5519                     gettimeofday(&tv, &tzp);
5520   ;
5521   return 0;
5522 }
5523 _ACEOF
5524 if ac_fn_c_try_compile "$LINENO"; then :
5525   ac_gettimeofday_args=2
5526 else
5527   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5528 /* end confdefs.h.  */
5529 #include <stdlib.h>
5530                                     #include <sys/time.h>
5531 int
5532 main ()
5533 {
5534 struct timeval tv; gettimeofday(&tv);
5535   ;
5536   return 0;
5537 }
5538 _ACEOF
5539 if ac_fn_c_try_compile "$LINENO"; then :
5540   ac_gettimeofday_args=1
5541 else
5542   ac_gettimeofday_args=0
5543 fi
5544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5545 fi
5546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5547     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5548 fi
5549
5550   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5551   if test "$ac_gettimeofday_args" = 1 ; then
5552     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5553
5554     { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
5555 $as_echo "one argument" >&6; }
5556   elif test "$ac_gettimeofday_args" = 2 ; then
5557     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5558
5559     $as_echo "#define GETTIMEOFDAY_TWO_ARGS 1" >>confdefs.h
5560
5561     { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
5562 $as_echo "two arguments" >&6; }
5563   else
5564     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
5565 $as_echo "unknown" >&6; }
5566   fi
5567
5568 # Check whether --enable-largefile was given.
5569 if test "${enable_largefile+set}" = set; then :
5570   enableval=$enable_largefile;
5571 fi
5572
5573 if test "$enable_largefile" != no; then
5574
5575   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5576 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5577 if ${ac_cv_sys_largefile_CC+:} false; then :
5578   $as_echo_n "(cached) " >&6
5579 else
5580   ac_cv_sys_largefile_CC=no
5581      if test "$GCC" != yes; then
5582        ac_save_CC=$CC
5583        while :; do
5584          # IRIX 6.2 and later do not support large files by default,
5585          # so use the C compiler's -n32 option if that helps.
5586          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5587 /* end confdefs.h.  */
5588 #include <sys/types.h>
5589  /* Check that off_t can represent 2**63 - 1 correctly.
5590     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5591     since some C++ compilers masquerading as C compilers
5592     incorrectly reject 9223372036854775807.  */
5593 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5594   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5595                        && LARGE_OFF_T % 2147483647 == 1)
5596                       ? 1 : -1];
5597 int
5598 main ()
5599 {
5600
5601   ;
5602   return 0;
5603 }
5604 _ACEOF
5605          if ac_fn_c_try_compile "$LINENO"; then :
5606   break
5607 fi
5608 rm -f core conftest.err conftest.$ac_objext
5609          CC="$CC -n32"
5610          if ac_fn_c_try_compile "$LINENO"; then :
5611   ac_cv_sys_largefile_CC=' -n32'; break
5612 fi
5613 rm -f core conftest.err conftest.$ac_objext
5614          break
5615        done
5616        CC=$ac_save_CC
5617        rm -rf conftest.$ac_ext
5618     fi
5619 fi
5620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5621 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5622   if test "$ac_cv_sys_largefile_CC" != no; then
5623     CC=$CC$ac_cv_sys_largefile_CC
5624   fi
5625
5626   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5627 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5628 if ${ac_cv_sys_file_offset_bits+:} false; then :
5629   $as_echo_n "(cached) " >&6
5630 else
5631   while :; do
5632   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5633 /* end confdefs.h.  */
5634 #include <sys/types.h>
5635  /* Check that off_t can represent 2**63 - 1 correctly.
5636     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5637     since some C++ compilers masquerading as C compilers
5638     incorrectly reject 9223372036854775807.  */
5639 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5640   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5641                        && LARGE_OFF_T % 2147483647 == 1)
5642                       ? 1 : -1];
5643 int
5644 main ()
5645 {
5646
5647   ;
5648   return 0;
5649 }
5650 _ACEOF
5651 if ac_fn_c_try_compile "$LINENO"; then :
5652   ac_cv_sys_file_offset_bits=no; break
5653 fi
5654 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5656 /* end confdefs.h.  */
5657 #define _FILE_OFFSET_BITS 64
5658 #include <sys/types.h>
5659  /* Check that off_t can represent 2**63 - 1 correctly.
5660     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5661     since some C++ compilers masquerading as C compilers
5662     incorrectly reject 9223372036854775807.  */
5663 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5664   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5665                        && LARGE_OFF_T % 2147483647 == 1)
5666                       ? 1 : -1];
5667 int
5668 main ()
5669 {
5670
5671   ;
5672   return 0;
5673 }
5674 _ACEOF
5675 if ac_fn_c_try_compile "$LINENO"; then :
5676   ac_cv_sys_file_offset_bits=64; break
5677 fi
5678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5679   ac_cv_sys_file_offset_bits=unknown
5680   break
5681 done
5682 fi
5683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5684 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5685 case $ac_cv_sys_file_offset_bits in #(
5686   no | unknown) ;;
5687   *)
5688 cat >>confdefs.h <<_ACEOF
5689 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5690 _ACEOF
5691 ;;
5692 esac
5693 rm -rf conftest*
5694   if test $ac_cv_sys_file_offset_bits = unknown; then
5695     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5696 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5697 if ${ac_cv_sys_large_files+:} false; then :
5698   $as_echo_n "(cached) " >&6
5699 else
5700   while :; do
5701   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5702 /* end confdefs.h.  */
5703 #include <sys/types.h>
5704  /* Check that off_t can represent 2**63 - 1 correctly.
5705     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5706     since some C++ compilers masquerading as C compilers
5707     incorrectly reject 9223372036854775807.  */
5708 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5709   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5710                        && LARGE_OFF_T % 2147483647 == 1)
5711                       ? 1 : -1];
5712 int
5713 main ()
5714 {
5715
5716   ;
5717   return 0;
5718 }
5719 _ACEOF
5720 if ac_fn_c_try_compile "$LINENO"; then :
5721   ac_cv_sys_large_files=no; break
5722 fi
5723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5724   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5725 /* end confdefs.h.  */
5726 #define _LARGE_FILES 1
5727 #include <sys/types.h>
5728  /* Check that off_t can represent 2**63 - 1 correctly.
5729     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5730     since some C++ compilers masquerading as C compilers
5731     incorrectly reject 9223372036854775807.  */
5732 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5733   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5734                        && LARGE_OFF_T % 2147483647 == 1)
5735                       ? 1 : -1];
5736 int
5737 main ()
5738 {
5739
5740   ;
5741   return 0;
5742 }
5743 _ACEOF
5744 if ac_fn_c_try_compile "$LINENO"; then :
5745   ac_cv_sys_large_files=1; break
5746 fi
5747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5748   ac_cv_sys_large_files=unknown
5749   break
5750 done
5751 fi
5752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5753 $as_echo "$ac_cv_sys_large_files" >&6; }
5754 case $ac_cv_sys_large_files in #(
5755   no | unknown) ;;
5756   *)
5757 cat >>confdefs.h <<_ACEOF
5758 #define _LARGE_FILES $ac_cv_sys_large_files
5759 _ACEOF
5760 ;;
5761 esac
5762 rm -rf conftest*
5763   fi
5764
5765
5766 fi
5767
5768 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5769 do :
5770   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5771 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5772 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5773   cat >>confdefs.h <<_ACEOF
5774 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5775 _ACEOF
5776
5777 fi
5778 done
5779
5780 for ac_func in sigaction syslog realpath setrlimit
5781 do :
5782   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5783 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5784 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5785   cat >>confdefs.h <<_ACEOF
5786 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5787 _ACEOF
5788
5789 fi
5790 done
5791
5792 for ac_func in setlocale
5793 do :
5794   ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
5795 if test "x$ac_cv_func_setlocale" = xyes; then :
5796   cat >>confdefs.h <<_ACEOF
5797 #define HAVE_SETLOCALE 1
5798 _ACEOF
5799
5800 fi
5801 done
5802
5803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmp" >&5
5804 $as_echo_n "checking for struct icmp... " >&6; }
5805 if ${ac_cv_have_icmp+:} false; then :
5806   $as_echo_n "(cached) " >&6
5807 else
5808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5809 /* end confdefs.h.  */
5810 #include <stdlib.h>
5811                    #include <stdio.h>
5812                    #include <math.h>
5813                    #include <unistd.h>
5814                    #include <limits.h>
5815                    #include <signal.h>
5816                    #include <fcntl.h>
5817                    #include <sys/types.h>
5818                    #include <sys/time.h>
5819                    #include <sys/ipc.h>
5820                    #include <sys/shm.h>
5821                    #include <sys/socket.h>
5822                    #include <netinet/in_systm.h>
5823                    #include <netinet/in.h>
5824                    #include <netinet/ip.h>
5825                    #include <netinet/ip_icmp.h>
5826                    #include <netinet/udp.h>
5827                    #include <arpa/inet.h>
5828                    #include <netdb.h>
5829 int
5830 main ()
5831 {
5832 struct icmp i;
5833                    struct sockaddr s;
5834                    struct sockaddr_in si;
5835                    struct ip ip;
5836                    i.icmp_type = ICMP_ECHO;
5837                    i.icmp_code = 0;
5838                    i.icmp_cksum = 0;
5839                    i.icmp_id = 0;
5840                    i.icmp_seq = 0;
5841                    si.sin_family = AF_INET;
5842                    #if defined(__DECC) || defined(_IP_VHL)
5843                    ip.ip_vhl = 0;
5844                    #else
5845                    ip.ip_hl = 0;
5846                    #endif
5847
5848   ;
5849   return 0;
5850 }
5851 _ACEOF
5852 if ac_fn_c_try_compile "$LINENO"; then :
5853   ac_cv_have_icmp=yes
5854 else
5855   ac_cv_have_icmp=no
5856 fi
5857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5858 fi
5859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmp" >&5
5860 $as_echo "$ac_cv_have_icmp" >&6; }
5861  if test "$ac_cv_have_icmp" = yes ; then
5862    $as_echo "#define HAVE_ICMP 1" >>confdefs.h
5863
5864  fi
5865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmphdr" >&5
5866 $as_echo_n "checking for struct icmphdr... " >&6; }
5867 if ${ac_cv_have_icmphdr+:} false; then :
5868   $as_echo_n "(cached) " >&6
5869 else
5870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5871 /* end confdefs.h.  */
5872 #include <stdlib.h>
5873                    #include <stdio.h>
5874                    #include <math.h>
5875                    #include <unistd.h>
5876                    #include <limits.h>
5877                    #include <signal.h>
5878                    #include <fcntl.h>
5879                    #include <sys/types.h>
5880                    #include <sys/time.h>
5881                    #include <sys/ipc.h>
5882                    #include <sys/shm.h>
5883                    #include <sys/socket.h>
5884                    #include <netinet/in_systm.h>
5885                    #include <netinet/in.h>
5886                    #include <netinet/ip.h>
5887                    #include <netinet/ip_icmp.h>
5888                    #include <netinet/udp.h>
5889                    #include <arpa/inet.h>
5890                    #include <netdb.h>
5891 int
5892 main ()
5893 {
5894 struct icmphdr i;
5895                    struct sockaddr s;
5896                    struct sockaddr_in si;
5897                    struct ip ip;
5898                    i.type = ICMP_ECHO;
5899                    i.code = 0;
5900                    i.checksum = 0;
5901                    i.un.echo.id = 0;
5902                    i.un.echo.sequence = 0;
5903                    si.sin_family = AF_INET;
5904                    ip.ip_hl = 0;
5905   ;
5906   return 0;
5907 }
5908 _ACEOF
5909 if ac_fn_c_try_compile "$LINENO"; then :
5910   ac_cv_have_icmphdr=yes
5911 else
5912   ac_cv_have_icmphdr=no
5913 fi
5914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5915 fi
5916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmphdr" >&5
5917 $as_echo "$ac_cv_have_icmphdr" >&6; }
5918  if test "$ac_cv_have_icmphdr" = yes ; then
5919    $as_echo "#define HAVE_ICMPHDR 1" >>confdefs.h
5920
5921  fi
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs" >&5
5923 $as_echo_n "checking for getifaddrs... " >&6; }
5924 if ${ac_cv_have_getifaddrs+:} false; then :
5925   $as_echo_n "(cached) " >&6
5926 else
5927   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5928 /* end confdefs.h.  */
5929 #include <stdlib.h>
5930                    #include <unistd.h>
5931                    #include <arpa/inet.h>
5932                    #include <ifaddrs.h>
5933 int
5934 main ()
5935 {
5936 struct ifaddrs *ifa;
5937                    getifaddrs (&ifa);
5938                    ifa->ifa_next = 0;
5939                    ifa->ifa_addr->sa_family = 0;
5940   ;
5941   return 0;
5942 }
5943 _ACEOF
5944 if ac_fn_c_try_compile "$LINENO"; then :
5945   ac_cv_have_getifaddrs=yes
5946 else
5947   ac_cv_have_getifaddrs=no
5948 fi
5949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5950 fi
5951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getifaddrs" >&5
5952 $as_echo "$ac_cv_have_getifaddrs" >&6; }
5953  if test "$ac_cv_have_getifaddrs" = yes ; then
5954    $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
5955
5956  fi
5957 for ac_header in crypt.h sys/select.h
5958 do :
5959   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5960 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5961 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5962   cat >>confdefs.h <<_ACEOF
5963 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5964 _ACEOF
5965
5966 fi
5967
5968 done
5969
5970 for ac_prog in perl5 perl
5971 do
5972   # Extract the first word of "$ac_prog", so it can be a program name with args.
5973 set dummy $ac_prog; ac_word=$2
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5975 $as_echo_n "checking for $ac_word... " >&6; }
5976 if ${ac_cv_path_PERL+:} false; then :
5977   $as_echo_n "(cached) " >&6
5978 else
5979   case $PERL in
5980   [\\/]* | ?:[\\/]*)
5981   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5982   ;;
5983   *)
5984   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985 for as_dir in $PATH
5986 do
5987   IFS=$as_save_IFS
5988   test -z "$as_dir" && as_dir=.
5989     for ac_exec_ext in '' $ac_executable_extensions; do
5990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5991     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5993     break 2
5994   fi
5995 done
5996   done
5997 IFS=$as_save_IFS
5998
5999   ;;
6000 esac
6001 fi
6002 PERL=$ac_cv_path_PERL
6003 if test -n "$PERL"; then
6004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
6005 $as_echo "$PERL" >&6; }
6006 else
6007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6008 $as_echo "no" >&6; }
6009 fi
6010
6011
6012   test -n "$PERL" && break
6013 done
6014
6015   if test -z "$PERL" ; then
6016     PERL_VERSION=0
6017   else
6018     { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5
6019 $as_echo_n "checking perl version... " >&6; }
6020 if ${ac_cv_perl_version+:} false; then :
6021   $as_echo_n "(cached) " >&6
6022 else
6023   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6024 fi
6025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_perl_version" >&5
6026 $as_echo "$ac_cv_perl_version" >&6; }
6027     PERL_VERSION=$ac_cv_perl_version
6028   fi
6029
6030
6031 if test -z "$PERL" ; then
6032   # don't let it be blank...
6033   PERL=/usr/bin/perl
6034 fi
6035
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
6037 $as_echo_n "checking for X... " >&6; }
6038
6039
6040 # Check whether --with-x was given.
6041 if test "${with_x+set}" = set; then :
6042   withval=$with_x;
6043 fi
6044
6045 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6046 if test "x$with_x" = xno; then
6047   # The user explicitly disabled X.
6048   have_x=disabled
6049 else
6050   case $x_includes,$x_libraries in #(
6051     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
6052     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
6053   $as_echo_n "(cached) " >&6
6054 else
6055   # One or both of the vars are not set, and there is no cached value.
6056 ac_x_includes=no ac_x_libraries=no
6057 rm -f -r conftest.dir
6058 if mkdir conftest.dir; then
6059   cd conftest.dir
6060   cat >Imakefile <<'_ACEOF'
6061 incroot:
6062         @echo incroot='${INCROOT}'
6063 usrlibdir:
6064         @echo usrlibdir='${USRLIBDIR}'
6065 libdir:
6066         @echo libdir='${LIBDIR}'
6067 _ACEOF
6068   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6069     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6070     for ac_var in incroot usrlibdir libdir; do
6071       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6072     done
6073     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6074     for ac_extension in a so sl dylib la dll; do
6075       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6076          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6077         ac_im_usrlibdir=$ac_im_libdir; break
6078       fi
6079     done
6080     # Screen out bogus values from the imake configuration.  They are
6081     # bogus both because they are the default anyway, and because
6082     # using them would break gcc on systems where it needs fixed includes.
6083     case $ac_im_incroot in
6084         /usr/include) ac_x_includes= ;;
6085         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6086     esac
6087     case $ac_im_usrlibdir in
6088         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6089         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6090     esac
6091   fi
6092   cd ..
6093   rm -f -r conftest.dir
6094 fi
6095
6096 # Standard set of common directories for X headers.
6097 # Check X11 before X11Rn because it is often a symlink to the current release.
6098 ac_x_header_dirs='
6099 /usr/X11/include
6100 /usr/X11R7/include
6101 /usr/X11R6/include
6102 /usr/X11R5/include
6103 /usr/X11R4/include
6104
6105 /usr/include/X11
6106 /usr/include/X11R7
6107 /usr/include/X11R6
6108 /usr/include/X11R5
6109 /usr/include/X11R4
6110
6111 /usr/local/X11/include
6112 /usr/local/X11R7/include
6113 /usr/local/X11R6/include
6114 /usr/local/X11R5/include
6115 /usr/local/X11R4/include
6116
6117 /usr/local/include/X11
6118 /usr/local/include/X11R7
6119 /usr/local/include/X11R6
6120 /usr/local/include/X11R5
6121 /usr/local/include/X11R4
6122
6123 /usr/X386/include
6124 /usr/x386/include
6125 /usr/XFree86/include/X11
6126
6127 /usr/include
6128 /usr/local/include
6129 /usr/unsupported/include
6130 /usr/athena/include
6131 /usr/local/x11r5/include
6132 /usr/lpp/Xamples/include
6133
6134 /usr/openwin/include
6135 /usr/openwin/share/include'
6136
6137 if test "$ac_x_includes" = no; then
6138   # Guess where to find include files, by looking for Xlib.h.
6139   # First, try using that file with no special directory specified.
6140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6141 /* end confdefs.h.  */
6142 #include <X11/Xlib.h>
6143 _ACEOF
6144 if ac_fn_c_try_cpp "$LINENO"; then :
6145   # We can compile using X headers with no special include directory.
6146 ac_x_includes=
6147 else
6148   for ac_dir in $ac_x_header_dirs; do
6149   if test -r "$ac_dir/X11/Xlib.h"; then
6150     ac_x_includes=$ac_dir
6151     break
6152   fi
6153 done
6154 fi
6155 rm -rf conftest.err conftest.i conftest.$ac_ext
6156 fi # $ac_x_includes = no
6157
6158 if test "$ac_x_libraries" = no; then
6159   # Check for the libraries.
6160   # See if we find them without any special options.
6161   # Don't add to $LIBS permanently.
6162   ac_save_LIBS=$LIBS
6163   LIBS="-lX11 $LIBS"
6164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6165 /* end confdefs.h.  */
6166 #include <X11/Xlib.h>
6167 int
6168 main ()
6169 {
6170 XrmInitialize ()
6171   ;
6172   return 0;
6173 }
6174 _ACEOF
6175 if ac_fn_c_try_link "$LINENO"; then :
6176   LIBS=$ac_save_LIBS
6177 # We can link X programs with no special library path.
6178 ac_x_libraries=
6179 else
6180   LIBS=$ac_save_LIBS
6181 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6182 do
6183   # Don't even attempt the hair of trying to link an X program!
6184   for ac_extension in a so sl dylib la dll; do
6185     if test -r "$ac_dir/libX11.$ac_extension"; then
6186       ac_x_libraries=$ac_dir
6187       break 2
6188     fi
6189   done
6190 done
6191 fi
6192 rm -f core conftest.err conftest.$ac_objext \
6193     conftest$ac_exeext conftest.$ac_ext
6194 fi # $ac_x_libraries = no
6195
6196 case $ac_x_includes,$ac_x_libraries in #(
6197   no,* | *,no | *\'*)
6198     # Didn't find X, or a directory has "'" in its name.
6199     ac_cv_have_x="have_x=no";; #(
6200   *)
6201     # Record where we found X for the cache.
6202     ac_cv_have_x="have_x=yes\
6203         ac_x_includes='$ac_x_includes'\
6204         ac_x_libraries='$ac_x_libraries'"
6205 esac
6206 fi
6207 ;; #(
6208     *) have_x=yes;;
6209   esac
6210   eval "$ac_cv_have_x"
6211 fi # $with_x != no
6212
6213 if test "$have_x" != yes; then
6214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
6215 $as_echo "$have_x" >&6; }
6216   no_x=yes
6217 else
6218   # If each of the values was on the command line, it overrides each guess.
6219   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6220   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6221   # Update the cache value to reflect the command line values.
6222   ac_cv_have_x="have_x=yes\
6223         ac_x_includes='$x_includes'\
6224         ac_x_libraries='$x_libraries'"
6225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
6226 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
6227 fi
6228
6229 if test "$no_x" = yes; then
6230   # Not all programs may use this symbol, but it does not hurt to define it.
6231
6232 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
6233
6234   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6235 else
6236   if test -n "$x_includes"; then
6237     X_CFLAGS="$X_CFLAGS -I$x_includes"
6238   fi
6239
6240   # It would also be nice to do this for all -L options, not just this one.
6241   if test -n "$x_libraries"; then
6242     X_LIBS="$X_LIBS -L$x_libraries"
6243     # For Solaris; some versions of Sun CC require a space after -R and
6244     # others require no space.  Words are not sufficient . . . .
6245     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
6246 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
6247     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6248     ac_xsave_c_werror_flag=$ac_c_werror_flag
6249     ac_c_werror_flag=yes
6250     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6251 /* end confdefs.h.  */
6252
6253 int
6254 main ()
6255 {
6256
6257   ;
6258   return 0;
6259 }
6260 _ACEOF
6261 if ac_fn_c_try_link "$LINENO"; then :
6262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6263 $as_echo "no" >&6; }
6264        X_LIBS="$X_LIBS -R$x_libraries"
6265 else
6266   LIBS="$ac_xsave_LIBS -R $x_libraries"
6267        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6268 /* end confdefs.h.  */
6269
6270 int
6271 main ()
6272 {
6273
6274   ;
6275   return 0;
6276 }
6277 _ACEOF
6278 if ac_fn_c_try_link "$LINENO"; then :
6279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6280 $as_echo "yes" >&6; }
6281           X_LIBS="$X_LIBS -R $x_libraries"
6282 else
6283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
6284 $as_echo "neither works" >&6; }
6285 fi
6286 rm -f core conftest.err conftest.$ac_objext \
6287     conftest$ac_exeext conftest.$ac_ext
6288 fi
6289 rm -f core conftest.err conftest.$ac_objext \
6290     conftest$ac_exeext conftest.$ac_ext
6291     ac_c_werror_flag=$ac_xsave_c_werror_flag
6292     LIBS=$ac_xsave_LIBS
6293   fi
6294
6295   # Check for system-dependent libraries X programs must link with.
6296   # Do this before checking for the system-independent R6 libraries
6297   # (-lICE), since we may need -lsocket or whatever for X linking.
6298
6299   if test "$ISC" = yes; then
6300     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6301   else
6302     # Martyn Johnson says this is needed for Ultrix, if the X
6303     # libraries were built with DECnet support.  And Karl Berry says
6304     # the Alpha needs dnet_stub (dnet does not exist).
6305     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6306     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6307 /* end confdefs.h.  */
6308
6309 /* Override any GCC internal prototype to avoid an error.
6310    Use char because int might match the return type of a GCC
6311    builtin and then its argument prototype would still apply.  */
6312 #ifdef __cplusplus
6313 extern "C"
6314 #endif
6315 char XOpenDisplay ();
6316 int
6317 main ()
6318 {
6319 return XOpenDisplay ();
6320   ;
6321   return 0;
6322 }
6323 _ACEOF
6324 if ac_fn_c_try_link "$LINENO"; then :
6325
6326 else
6327   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
6328 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
6329 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
6330   $as_echo_n "(cached) " >&6
6331 else
6332   ac_check_lib_save_LIBS=$LIBS
6333 LIBS="-ldnet  $LIBS"
6334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6335 /* end confdefs.h.  */
6336
6337 /* Override any GCC internal prototype to avoid an error.
6338    Use char because int might match the return type of a GCC
6339    builtin and then its argument prototype would still apply.  */
6340 #ifdef __cplusplus
6341 extern "C"
6342 #endif
6343 char dnet_ntoa ();
6344 int
6345 main ()
6346 {
6347 return dnet_ntoa ();
6348   ;
6349   return 0;
6350 }
6351 _ACEOF
6352 if ac_fn_c_try_link "$LINENO"; then :
6353   ac_cv_lib_dnet_dnet_ntoa=yes
6354 else
6355   ac_cv_lib_dnet_dnet_ntoa=no
6356 fi
6357 rm -f core conftest.err conftest.$ac_objext \
6358     conftest$ac_exeext conftest.$ac_ext
6359 LIBS=$ac_check_lib_save_LIBS
6360 fi
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6362 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6363 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
6364   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6365 fi
6366
6367     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6368       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
6369 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
6370 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
6371   $as_echo_n "(cached) " >&6
6372 else
6373   ac_check_lib_save_LIBS=$LIBS
6374 LIBS="-ldnet_stub  $LIBS"
6375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6376 /* end confdefs.h.  */
6377
6378 /* Override any GCC internal prototype to avoid an error.
6379    Use char because int might match the return type of a GCC
6380    builtin and then its argument prototype would still apply.  */
6381 #ifdef __cplusplus
6382 extern "C"
6383 #endif
6384 char dnet_ntoa ();
6385 int
6386 main ()
6387 {
6388 return dnet_ntoa ();
6389   ;
6390   return 0;
6391 }
6392 _ACEOF
6393 if ac_fn_c_try_link "$LINENO"; then :
6394   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6395 else
6396   ac_cv_lib_dnet_stub_dnet_ntoa=no
6397 fi
6398 rm -f core conftest.err conftest.$ac_objext \
6399     conftest$ac_exeext conftest.$ac_ext
6400 LIBS=$ac_check_lib_save_LIBS
6401 fi
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6403 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6404 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
6405   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6406 fi
6407
6408     fi
6409 fi
6410 rm -f core conftest.err conftest.$ac_objext \
6411     conftest$ac_exeext conftest.$ac_ext
6412     LIBS="$ac_xsave_LIBS"
6413
6414     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6415     # to get the SysV transport functions.
6416     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6417     # needs -lnsl.
6418     # The nsl library prevents programs from opening the X display
6419     # on Irix 5.2, according to T.E. Dickey.
6420     # The functions gethostbyname, getservbyname, and inet_addr are
6421     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6422     ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
6423 if test "x$ac_cv_func_gethostbyname" = xyes; then :
6424
6425 fi
6426
6427     if test $ac_cv_func_gethostbyname = no; then
6428       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
6429 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
6430 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
6431   $as_echo_n "(cached) " >&6
6432 else
6433   ac_check_lib_save_LIBS=$LIBS
6434 LIBS="-lnsl  $LIBS"
6435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6436 /* end confdefs.h.  */
6437
6438 /* Override any GCC internal prototype to avoid an error.
6439    Use char because int might match the return type of a GCC
6440    builtin and then its argument prototype would still apply.  */
6441 #ifdef __cplusplus
6442 extern "C"
6443 #endif
6444 char gethostbyname ();
6445 int
6446 main ()
6447 {
6448 return gethostbyname ();
6449   ;
6450   return 0;
6451 }
6452 _ACEOF
6453 if ac_fn_c_try_link "$LINENO"; then :
6454   ac_cv_lib_nsl_gethostbyname=yes
6455 else
6456   ac_cv_lib_nsl_gethostbyname=no
6457 fi
6458 rm -f core conftest.err conftest.$ac_objext \
6459     conftest$ac_exeext conftest.$ac_ext
6460 LIBS=$ac_check_lib_save_LIBS
6461 fi
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
6463 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
6464 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
6465   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6466 fi
6467
6468       if test $ac_cv_lib_nsl_gethostbyname = no; then
6469         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
6470 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
6471 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
6472   $as_echo_n "(cached) " >&6
6473 else
6474   ac_check_lib_save_LIBS=$LIBS
6475 LIBS="-lbsd  $LIBS"
6476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6477 /* end confdefs.h.  */
6478
6479 /* Override any GCC internal prototype to avoid an error.
6480    Use char because int might match the return type of a GCC
6481    builtin and then its argument prototype would still apply.  */
6482 #ifdef __cplusplus
6483 extern "C"
6484 #endif
6485 char gethostbyname ();
6486 int
6487 main ()
6488 {
6489 return gethostbyname ();
6490   ;
6491   return 0;
6492 }
6493 _ACEOF
6494 if ac_fn_c_try_link "$LINENO"; then :
6495   ac_cv_lib_bsd_gethostbyname=yes
6496 else
6497   ac_cv_lib_bsd_gethostbyname=no
6498 fi
6499 rm -f core conftest.err conftest.$ac_objext \
6500     conftest$ac_exeext conftest.$ac_ext
6501 LIBS=$ac_check_lib_save_LIBS
6502 fi
6503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
6504 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
6505 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
6506   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6507 fi
6508
6509       fi
6510     fi
6511
6512     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6513     # socket/setsockopt and other routines are undefined under SCO ODT
6514     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6515     # on later versions), says Simon Leinen: it contains gethostby*
6516     # variants that don't use the name server (or something).  -lsocket
6517     # must be given before -lnsl if both are needed.  We assume that
6518     # if connect needs -lnsl, so does gethostbyname.
6519     ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
6520 if test "x$ac_cv_func_connect" = xyes; then :
6521
6522 fi
6523
6524     if test $ac_cv_func_connect = no; then
6525       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
6526 $as_echo_n "checking for connect in -lsocket... " >&6; }
6527 if ${ac_cv_lib_socket_connect+:} false; then :
6528   $as_echo_n "(cached) " >&6
6529 else
6530   ac_check_lib_save_LIBS=$LIBS
6531 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6533 /* end confdefs.h.  */
6534
6535 /* Override any GCC internal prototype to avoid an error.
6536    Use char because int might match the return type of a GCC
6537    builtin and then its argument prototype would still apply.  */
6538 #ifdef __cplusplus
6539 extern "C"
6540 #endif
6541 char connect ();
6542 int
6543 main ()
6544 {
6545 return connect ();
6546   ;
6547   return 0;
6548 }
6549 _ACEOF
6550 if ac_fn_c_try_link "$LINENO"; then :
6551   ac_cv_lib_socket_connect=yes
6552 else
6553   ac_cv_lib_socket_connect=no
6554 fi
6555 rm -f core conftest.err conftest.$ac_objext \
6556     conftest$ac_exeext conftest.$ac_ext
6557 LIBS=$ac_check_lib_save_LIBS
6558 fi
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
6560 $as_echo "$ac_cv_lib_socket_connect" >&6; }
6561 if test "x$ac_cv_lib_socket_connect" = xyes; then :
6562   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6563 fi
6564
6565     fi
6566
6567     # Guillermo Gomez says -lposix is necessary on A/UX.
6568     ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
6569 if test "x$ac_cv_func_remove" = xyes; then :
6570
6571 fi
6572
6573     if test $ac_cv_func_remove = no; then
6574       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
6575 $as_echo_n "checking for remove in -lposix... " >&6; }
6576 if ${ac_cv_lib_posix_remove+:} false; then :
6577   $as_echo_n "(cached) " >&6
6578 else
6579   ac_check_lib_save_LIBS=$LIBS
6580 LIBS="-lposix  $LIBS"
6581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6582 /* end confdefs.h.  */
6583
6584 /* Override any GCC internal prototype to avoid an error.
6585    Use char because int might match the return type of a GCC
6586    builtin and then its argument prototype would still apply.  */
6587 #ifdef __cplusplus
6588 extern "C"
6589 #endif
6590 char remove ();
6591 int
6592 main ()
6593 {
6594 return remove ();
6595   ;
6596   return 0;
6597 }
6598 _ACEOF
6599 if ac_fn_c_try_link "$LINENO"; then :
6600   ac_cv_lib_posix_remove=yes
6601 else
6602   ac_cv_lib_posix_remove=no
6603 fi
6604 rm -f core conftest.err conftest.$ac_objext \
6605     conftest$ac_exeext conftest.$ac_ext
6606 LIBS=$ac_check_lib_save_LIBS
6607 fi
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
6609 $as_echo "$ac_cv_lib_posix_remove" >&6; }
6610 if test "x$ac_cv_lib_posix_remove" = xyes; then :
6611   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6612 fi
6613
6614     fi
6615
6616     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6617     ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
6618 if test "x$ac_cv_func_shmat" = xyes; then :
6619
6620 fi
6621
6622     if test $ac_cv_func_shmat = no; then
6623       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
6624 $as_echo_n "checking for shmat in -lipc... " >&6; }
6625 if ${ac_cv_lib_ipc_shmat+:} false; then :
6626   $as_echo_n "(cached) " >&6
6627 else
6628   ac_check_lib_save_LIBS=$LIBS
6629 LIBS="-lipc  $LIBS"
6630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6631 /* end confdefs.h.  */
6632
6633 /* Override any GCC internal prototype to avoid an error.
6634    Use char because int might match the return type of a GCC
6635    builtin and then its argument prototype would still apply.  */
6636 #ifdef __cplusplus
6637 extern "C"
6638 #endif
6639 char shmat ();
6640 int
6641 main ()
6642 {
6643 return shmat ();
6644   ;
6645   return 0;
6646 }
6647 _ACEOF
6648 if ac_fn_c_try_link "$LINENO"; then :
6649   ac_cv_lib_ipc_shmat=yes
6650 else
6651   ac_cv_lib_ipc_shmat=no
6652 fi
6653 rm -f core conftest.err conftest.$ac_objext \
6654     conftest$ac_exeext conftest.$ac_ext
6655 LIBS=$ac_check_lib_save_LIBS
6656 fi
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
6658 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
6659 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
6660   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6661 fi
6662
6663     fi
6664   fi
6665
6666   # Check for libraries that X11R6 Xt/Xaw programs need.
6667   ac_save_LDFLAGS=$LDFLAGS
6668   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6669   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6670   # check for ICE first), but we must link in the order -lSM -lICE or
6671   # we get undefined symbols.  So assume we have SM if we have ICE.
6672   # These have to be linked with before -lX11, unlike the other
6673   # libraries we check for below, so use a different variable.
6674   # John Interrante, Karl Berry
6675   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
6676 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
6677 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
6678   $as_echo_n "(cached) " >&6
6679 else
6680   ac_check_lib_save_LIBS=$LIBS
6681 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6683 /* end confdefs.h.  */
6684
6685 /* Override any GCC internal prototype to avoid an error.
6686    Use char because int might match the return type of a GCC
6687    builtin and then its argument prototype would still apply.  */
6688 #ifdef __cplusplus
6689 extern "C"
6690 #endif
6691 char IceConnectionNumber ();
6692 int
6693 main ()
6694 {
6695 return IceConnectionNumber ();
6696   ;
6697   return 0;
6698 }
6699 _ACEOF
6700 if ac_fn_c_try_link "$LINENO"; then :
6701   ac_cv_lib_ICE_IceConnectionNumber=yes
6702 else
6703   ac_cv_lib_ICE_IceConnectionNumber=no
6704 fi
6705 rm -f core conftest.err conftest.$ac_objext \
6706     conftest$ac_exeext conftest.$ac_ext
6707 LIBS=$ac_check_lib_save_LIBS
6708 fi
6709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6710 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
6711 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
6712   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6713 fi
6714
6715   LDFLAGS=$ac_save_LDFLAGS
6716
6717 fi
6718
6719
6720 if test "$have_x" != yes; then
6721   as_fn_error $? "Couldn't find X11 headers/libs.  Try \`$0 --help'." "$LINENO" 5
6722 fi
6723
6724
6725     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X app-defaults directory" >&5
6726 $as_echo_n "checking for X app-defaults directory... " >&6; }
6727 if ${ac_cv_x_app_defaults+:} false; then :
6728   $as_echo_n "(cached) " >&6
6729 else
6730
6731   rm -fr conftestdir
6732   if mkdir conftestdir; then
6733     cd conftestdir 2>/dev/null
6734     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6735     cat > Imakefile <<'EOF'
6736 acfindx:
6737         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6738 EOF
6739     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6740       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6741       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6742     fi
6743     cd .. 2>/dev/null
6744     rm -fr conftestdir
6745   fi
6746       if test x"$ac_x_app_defaults" = x; then
6747
6748   # Look for the directory under a standard set of common directories.
6749   # Check X11 before X11Rn because it's often a symlink to the current release.
6750   for ac_dir in                                 \
6751     /usr/X11/lib/app-defaults                   \
6752     /usr/X11R6/lib/app-defaults                 \
6753     /usr/X11R6/lib/X11/app-defaults             \
6754     /usr/X11R5/lib/app-defaults                 \
6755     /usr/X11R5/lib/X11/app-defaults             \
6756     /usr/X11R4/lib/app-defaults                 \
6757     /usr/X11R4/lib/X11/app-defaults             \
6758                                                 \
6759     /usr/lib/X11/app-defaults                   \
6760     /usr/lib/X11R6/app-defaults                 \
6761     /usr/lib/X11R5/app-defaults                 \
6762     /usr/lib/X11R4/app-defaults                 \
6763                                                 \
6764     /usr/local/X11/lib/app-defaults             \
6765     /usr/local/X11R6/lib/app-defaults           \
6766     /usr/local/X11R5/lib/app-defaults           \
6767     /usr/local/X11R4/lib/app-defaults           \
6768                                                 \
6769     /usr/local/lib/X11/app-defaults             \
6770     /usr/local/lib/X11R6/app-defaults           \
6771     /usr/local/lib/X11R6/X11/app-defaults       \
6772     /usr/local/lib/X11R5/app-defaults           \
6773     /usr/local/lib/X11R5/X11/app-defaults       \
6774     /usr/local/lib/X11R4/app-defaults           \
6775     /usr/local/lib/X11R4/X11/app-defaults       \
6776                                                 \
6777     /usr/X386/lib/X11/app-defaults              \
6778     /usr/x386/lib/X11/app-defaults              \
6779     /usr/XFree86/lib/X11/app-defaults           \
6780                                                 \
6781     /usr/lib/X11/app-defaults                   \
6782     /usr/local/lib/X11/app-defaults             \
6783     /usr/unsupported/lib/X11/app-defaults       \
6784     /usr/athena/lib/X11/app-defaults            \
6785     /usr/local/x11r5/lib/X11/app-defaults       \
6786     /usr/lpp/Xamples/lib/X11/app-defaults       \
6787     /lib/usr/lib/X11/app-defaults               \
6788                                                 \
6789     /usr/openwin/lib/app-defaults               \
6790     /usr/openwin/lib/X11/app-defaults           \
6791     /usr/openwin/share/lib/app-defaults         \
6792     /usr/openwin/share/lib/X11/app-defaults     \
6793                                                 \
6794     /X11R6/lib/app-defaults                     \
6795     /X11R5/lib/app-defaults                     \
6796     /X11R4/lib/app-defaults                     \
6797     ; \
6798   do
6799     if test -d "$ac_dir"; then
6800       ac_x_app_defaults=$ac_dir
6801       break
6802     fi
6803   done
6804
6805       fi
6806       if test x"$ac_x_app_defaults" = x; then
6807         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6808       else
6809         # Record where we found app-defaults for the cache.
6810         ac_cv_x_app_defaults="$ac_x_app_defaults"
6811       fi
6812 fi
6813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x_app_defaults" >&5
6814 $as_echo "$ac_cv_x_app_defaults" >&6; }
6815     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6816 case "$host" in
6817     *-hpux*)
6818
6819       # The following arcana was gleaned from conversations with
6820       # Eric Schwartz <erics@col.hp.com>:
6821       #
6822       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6823       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6824       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6825       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6826       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6827       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6828       # you don't need any -I or -L arguments.
6829       #
6830       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6831       # are the same division as 10.x.  However, there are no symlinks to
6832       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6833       # arguments are always necessary.
6834       #
6835       # However, X11R6 was available on HPUX 9.x as a patch: if that
6836       # patch was installed, then all of X11R6 went in to
6837       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6838       #
6839       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6840       # whether R5 was available as a patch; R6 undoubtedly was not.)
6841       #
6842       # So.  We try and use the highest numbered pair of
6843       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6844       # that are available.  We do not mix and match different versions
6845       # of X.
6846       #
6847       # Question I still don't know the answer to: (do you?)
6848       #
6849       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6850       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6851       #     that contrib directory?  Did it contain so-called "standard"
6852       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6853       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6854       #     be a situation where one had to reach into the R5 headers and
6855       #     libs to find Xmu?  That is, must both R6 and R5 directories
6856       #     be on the -I and -L lists in that case?
6857       #
6858       for version in X11R6 X11R5 X11R4 ; do
6859         # if either pair of directories exists...
6860         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6861         then
6862            # if contrib exists, use it...
6863            if test -d /usr/contrib/$version/include ; then
6864              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6865              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6866            fi
6867            # if the "standard" one exists, use it.
6868            if test -d /usr/include/$version ; then
6869              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6870              X_LIBS="$X_LIBS -L/usr/lib/$version"
6871            fi
6872            # since at least one of the pair exists, go no farther.
6873            break
6874         fi
6875       done
6876
6877       # Now find Motif.  Thanks for not making xmkmf find this by
6878       # default, you losers.
6879       #
6880       if test -d /usr/include/Motif2.1 ; then
6881         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6882         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6883       elif test -d /usr/include/Motif1.2 ; then
6884         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6885         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6886       elif test -d /usr/include/Motif1.1 ; then
6887         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6888         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6889       fi
6890
6891       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6892       #
6893       if test -d /opt/graphics/OpenGL/include ; then
6894         # HP-UX 10.20 puts it here
6895         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6896         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6897       elif test -d /opt/Mesa/lib ; then
6898         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6899         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6900       fi
6901
6902
6903       if test -d /opt/xpm/lib/X11 ; then
6904         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6905         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6906       fi
6907
6908       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6909       # in /usr/local/, unless there is already an xscreensaver in
6910       # /usr/local/bin/.  This can be overridden with the --prefix arg
6911       # to configure.  I'm not sure this is the right thing to do, but
6912       # Richard Lloyd says so...
6913       #
6914       if test \! -x /usr/local/bin/xscreensaver ; then
6915         ac_default_prefix=/opt/xscreensaver
6916       fi
6917
6918     ;;
6919     *-solaris*)
6920
6921       # Thanks for not making xmkmf find this by default, pinheads.
6922       # And thanks for moving things around again, too.  Is this
6923       # really the standard location now?  What happened to the
6924       # joke that this kind of thing went in /opt?
6925       # cthomp says "answer: CDE (Common Disorganized Environment)"
6926       #
6927       if test -f /usr/dt/include/Xm/Xm.h ; then
6928         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6929         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6930
6931         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6932         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcmp in -lgen" >&5
6933 $as_echo_n "checking for regcmp in -lgen... " >&6; }
6934 if ${ac_cv_lib_gen_regcmp+:} false; then :
6935   $as_echo_n "(cached) " >&6
6936 else
6937   ac_check_lib_save_LIBS=$LIBS
6938 LIBS="-lgen  $LIBS"
6939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6940 /* end confdefs.h.  */
6941
6942 /* Override any GCC internal prototype to avoid an error.
6943    Use char because int might match the return type of a GCC
6944    builtin and then its argument prototype would still apply.  */
6945 #ifdef __cplusplus
6946 extern "C"
6947 #endif
6948 char regcmp ();
6949 int
6950 main ()
6951 {
6952 return regcmp ();
6953   ;
6954   return 0;
6955 }
6956 _ACEOF
6957 if ac_fn_c_try_link "$LINENO"; then :
6958   ac_cv_lib_gen_regcmp=yes
6959 else
6960   ac_cv_lib_gen_regcmp=no
6961 fi
6962 rm -f core conftest.err conftest.$ac_objext \
6963     conftest$ac_exeext conftest.$ac_ext
6964 LIBS=$ac_check_lib_save_LIBS
6965 fi
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_regcmp" >&5
6967 $as_echo "$ac_cv_lib_gen_regcmp" >&6; }
6968 if test "x$ac_cv_lib_gen_regcmp" = xyes; then :
6969   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6970 fi
6971
6972       fi
6973
6974     ;;
6975     *-darwin*)
6976
6977       # On MacOS X (10.x with "fink"), many things are under /sw/.
6978       #
6979       if test -d /sw/include ; then
6980         X_CFLAGS="-I/sw/include $X_CFLAGS"
6981         X_LIBS="-L/sw/lib $X_LIBS"
6982       fi
6983     ;;
6984   esac
6985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPointer" >&5
6986 $as_echo_n "checking for XPointer... " >&6; }
6987 if ${ac_cv_xpointer+:} false; then :
6988   $as_echo_n "(cached) " >&6
6989 else
6990
6991   ac_save_CPPFLAGS="$CPPFLAGS"
6992   if test \! -z "$includedir" ; then
6993     CPPFLAGS="$CPPFLAGS -I$includedir"
6994   fi
6995   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6996   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
6997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6998 /* end confdefs.h.  */
6999 #include <X11/Xlib.h>
7000 int
7001 main ()
7002 {
7003 XPointer foo = (XPointer) 0;
7004   ;
7005   return 0;
7006 }
7007 _ACEOF
7008 if ac_fn_c_try_compile "$LINENO"; then :
7009   ac_cv_xpointer=yes
7010 else
7011   ac_cv_xpointer=no
7012 fi
7013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7014   CPPFLAGS="$ac_save_CPPFLAGS"
7015 fi
7016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xpointer" >&5
7017 $as_echo "$ac_cv_xpointer" >&6; }
7018   if test "$ac_cv_xpointer" != yes; then
7019    $as_echo "#define XPointer char*" >>confdefs.h
7020
7021   fi
7022
7023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is MacOS X" >&5
7024 $as_echo_n "checking whether this is MacOS X... " >&6; }
7025   ac_macosx=no
7026   case "$host" in
7027     *-apple-darwin* )
7028       ac_macosx=yes
7029     ;;
7030   esac
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_macosx" >&5
7032 $as_echo "$ac_macosx" >&6; }
7033
7034
7035 ###############################################################################
7036 #
7037 #       Gettext support
7038 #
7039 ###############################################################################
7040
7041
7042   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
7043 $as_echo_n "checking whether NLS is requested... " >&6; }
7044     # Check whether --enable-nls was given.
7045 if test "${enable_nls+set}" = set; then :
7046   enableval=$enable_nls; USE_NLS=$enableval
7047 else
7048   USE_NLS=yes
7049 fi
7050
7051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
7052 $as_echo "$USE_NLS" >&6; }
7053
7054
7055
7056
7057 case "$am__api_version" in
7058     1.01234)
7059         as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5
7060     ;;
7061     *)
7062     ;;
7063 esac
7064
7065 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7066 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
7067 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7068 if test -n ""; then
7069     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= " >&5
7070 $as_echo_n "checking for intltool >= ... " >&6; }
7071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5
7072 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
7073     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
7074         as_fn_error $? "Your intltool is too old.  You need intltool  or later." "$LINENO" 5
7075 fi
7076
7077 # Extract the first word of "intltool-update", so it can be a program name with args.
7078 set dummy intltool-update; ac_word=$2
7079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7080 $as_echo_n "checking for $ac_word... " >&6; }
7081 if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then :
7082   $as_echo_n "(cached) " >&6
7083 else
7084   case $INTLTOOL_UPDATE in
7085   [\\/]* | ?:[\\/]*)
7086   ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
7087   ;;
7088   *)
7089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7090 for as_dir in $PATH
7091 do
7092   IFS=$as_save_IFS
7093   test -z "$as_dir" && as_dir=.
7094     for ac_exec_ext in '' $ac_executable_extensions; do
7095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7096     ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
7097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7098     break 2
7099   fi
7100 done
7101   done
7102 IFS=$as_save_IFS
7103
7104   ;;
7105 esac
7106 fi
7107 INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
7108 if test -n "$INTLTOOL_UPDATE"; then
7109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5
7110 $as_echo "$INTLTOOL_UPDATE" >&6; }
7111 else
7112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7113 $as_echo "no" >&6; }
7114 fi
7115
7116
7117 # Extract the first word of "intltool-merge", so it can be a program name with args.
7118 set dummy intltool-merge; ac_word=$2
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7120 $as_echo_n "checking for $ac_word... " >&6; }
7121 if ${ac_cv_path_INTLTOOL_MERGE+:} false; then :
7122   $as_echo_n "(cached) " >&6
7123 else
7124   case $INTLTOOL_MERGE in
7125   [\\/]* | ?:[\\/]*)
7126   ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
7127   ;;
7128   *)
7129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7130 for as_dir in $PATH
7131 do
7132   IFS=$as_save_IFS
7133   test -z "$as_dir" && as_dir=.
7134     for ac_exec_ext in '' $ac_executable_extensions; do
7135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7136     ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
7137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7138     break 2
7139   fi
7140 done
7141   done
7142 IFS=$as_save_IFS
7143
7144   ;;
7145 esac
7146 fi
7147 INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
7148 if test -n "$INTLTOOL_MERGE"; then
7149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5
7150 $as_echo "$INTLTOOL_MERGE" >&6; }
7151 else
7152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7153 $as_echo "no" >&6; }
7154 fi
7155
7156
7157 # Extract the first word of "intltool-extract", so it can be a program name with args.
7158 set dummy intltool-extract; ac_word=$2
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7160 $as_echo_n "checking for $ac_word... " >&6; }
7161 if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then :
7162   $as_echo_n "(cached) " >&6
7163 else
7164   case $INTLTOOL_EXTRACT in
7165   [\\/]* | ?:[\\/]*)
7166   ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
7167   ;;
7168   *)
7169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7170 for as_dir in $PATH
7171 do
7172   IFS=$as_save_IFS
7173   test -z "$as_dir" && as_dir=.
7174     for ac_exec_ext in '' $ac_executable_extensions; do
7175   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7176     ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
7177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7178     break 2
7179   fi
7180 done
7181   done
7182 IFS=$as_save_IFS
7183
7184   ;;
7185 esac
7186 fi
7187 INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
7188 if test -n "$INTLTOOL_EXTRACT"; then
7189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5
7190 $as_echo "$INTLTOOL_EXTRACT" >&6; }
7191 else
7192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7193 $as_echo "no" >&6; }
7194 fi
7195
7196
7197 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
7198     as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5
7199 fi
7200
7201 if test -z "$AM_DEFAULT_VERBOSITY"; then
7202   AM_DEFAULT_VERBOSITY=1
7203 fi
7204
7205
7206 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
7207 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
7208 INTLTOOL__v_MERGE_0='@echo "  ITMRG " $@;'
7209
7210
7211
7212
7213 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
7214 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
7215 intltool__v_merge_options_0='-q'
7216
7217
7218
7219
7220   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7221 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7222      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7223      INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7224       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< $@'
7225      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7226    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7227     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7228 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7229        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7230       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7231 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
7232       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< $@'
7233 else
7234       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.$$RANDOM && mkdir $$_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u $$_it_tmp_dir $< $@ && rmdir $$_it_tmp_dir'
7235 fi
7236       INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7237       INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7238     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7239   INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7240     INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7241     INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7242    INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340 # Check the gettext tools to make sure they are GNU
7341 # Extract the first word of "xgettext", so it can be a program name with args.
7342 set dummy xgettext; ac_word=$2
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7344 $as_echo_n "checking for $ac_word... " >&6; }
7345 if ${ac_cv_path_XGETTEXT+:} false; then :
7346   $as_echo_n "(cached) " >&6
7347 else
7348   case $XGETTEXT in
7349   [\\/]* | ?:[\\/]*)
7350   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7351   ;;
7352   *)
7353   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7354 for as_dir in $PATH
7355 do
7356   IFS=$as_save_IFS
7357   test -z "$as_dir" && as_dir=.
7358     for ac_exec_ext in '' $ac_executable_extensions; do
7359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7360     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
7361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7362     break 2
7363   fi
7364 done
7365   done
7366 IFS=$as_save_IFS
7367
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
7381 # Extract the first word of "msgmerge", so it can be a program name with args.
7382 set dummy msgmerge; ac_word=$2
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7384 $as_echo_n "checking for $ac_word... " >&6; }
7385 if ${ac_cv_path_MSGMERGE+:} false; then :
7386   $as_echo_n "(cached) " >&6
7387 else
7388   case $MSGMERGE in
7389   [\\/]* | ?:[\\/]*)
7390   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
7391   ;;
7392   *)
7393   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7394 for as_dir in $PATH
7395 do
7396   IFS=$as_save_IFS
7397   test -z "$as_dir" && as_dir=.
7398     for ac_exec_ext in '' $ac_executable_extensions; do
7399   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7400     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
7401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7402     break 2
7403   fi
7404 done
7405   done
7406 IFS=$as_save_IFS
7407
7408   ;;
7409 esac
7410 fi
7411 MSGMERGE=$ac_cv_path_MSGMERGE
7412 if test -n "$MSGMERGE"; then
7413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
7414 $as_echo "$MSGMERGE" >&6; }
7415 else
7416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417 $as_echo "no" >&6; }
7418 fi
7419
7420
7421 # Extract the first word of "msgfmt", so it can be a program name with args.
7422 set dummy msgfmt; ac_word=$2
7423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7424 $as_echo_n "checking for $ac_word... " >&6; }
7425 if ${ac_cv_path_MSGFMT+:} false; then :
7426   $as_echo_n "(cached) " >&6
7427 else
7428   case $MSGFMT in
7429   [\\/]* | ?:[\\/]*)
7430   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7431   ;;
7432   *)
7433   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7434 for as_dir in $PATH
7435 do
7436   IFS=$as_save_IFS
7437   test -z "$as_dir" && as_dir=.
7438     for ac_exec_ext in '' $ac_executable_extensions; do
7439   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7440     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
7441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7442     break 2
7443   fi
7444 done
7445   done
7446 IFS=$as_save_IFS
7447
7448   ;;
7449 esac
7450 fi
7451 MSGFMT=$ac_cv_path_MSGFMT
7452 if test -n "$MSGFMT"; then
7453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
7454 $as_echo "$MSGFMT" >&6; }
7455 else
7456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7457 $as_echo "no" >&6; }
7458 fi
7459
7460
7461 # Extract the first word of "gmsgfmt", so it can be a program name with args.
7462 set dummy gmsgfmt; ac_word=$2
7463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7464 $as_echo_n "checking for $ac_word... " >&6; }
7465 if ${ac_cv_path_GMSGFMT+:} false; then :
7466   $as_echo_n "(cached) " >&6
7467 else
7468   case $GMSGFMT in
7469   [\\/]* | ?:[\\/]*)
7470   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7471   ;;
7472   *)
7473   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7474 for as_dir in $PATH
7475 do
7476   IFS=$as_save_IFS
7477   test -z "$as_dir" && as_dir=.
7478     for ac_exec_ext in '' $ac_executable_extensions; do
7479   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7480     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7481     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7482     break 2
7483   fi
7484 done
7485   done
7486 IFS=$as_save_IFS
7487
7488   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7489   ;;
7490 esac
7491 fi
7492 GMSGFMT=$ac_cv_path_GMSGFMT
7493 if test -n "$GMSGFMT"; then
7494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
7495 $as_echo "$GMSGFMT" >&6; }
7496 else
7497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7498 $as_echo "no" >&6; }
7499 fi
7500
7501
7502 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
7503     as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
7504 fi
7505 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
7506 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
7507 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
7508 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
7509     as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
7510 fi
7511
7512 # Substitute ALL_LINGUAS so we can use it in po/Makefile
7513
7514
7515 # Set DATADIRNAME correctly if it is not set yet
7516 # (copied from glib-gettext.m4)
7517 if test -z "$DATADIRNAME"; then
7518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7519 /* end confdefs.h.  */
7520
7521 int
7522 main ()
7523 {
7524 extern int _nl_msg_cat_cntr;
7525                        return _nl_msg_cat_cntr
7526   ;
7527   return 0;
7528 }
7529 _ACEOF
7530 if ac_fn_c_try_link "$LINENO"; then :
7531   DATADIRNAME=share
7532 else
7533   case $host in
7534     *-*-solaris*)
7535                         ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7536 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7537   DATADIRNAME=share
7538 else
7539   DATADIRNAME=lib
7540 fi
7541
7542     ;;
7543     *)
7544     DATADIRNAME=lib
7545     ;;
7546     esac
7547 fi
7548 rm -f core conftest.err conftest.$ac_objext \
7549     conftest$ac_exeext conftest.$ac_ext
7550 fi
7551
7552
7553
7554
7555
7556 GETTEXT_PACKAGE=xscreensaver
7557
7558 cat >>confdefs.h <<_ACEOF
7559 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7560 _ACEOF
7561
7562
7563 cat >>confdefs.h <<_ACEOF
7564 #define PACKAGE "$GETTEXT_PACKAGE"
7565 _ACEOF
7566
7567
7568
7569 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"
7570
7571    for ac_header in locale.h
7572 do :
7573   ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
7574 if test "x$ac_cv_header_locale_h" = xyes; then :
7575   cat >>confdefs.h <<_ACEOF
7576 #define HAVE_LOCALE_H 1
7577 _ACEOF
7578
7579 fi
7580
7581 done
7582
7583     if test $ac_cv_header_locale_h = yes; then
7584     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
7585 $as_echo_n "checking for LC_MESSAGES... " >&6; }
7586 if ${am_cv_val_LC_MESSAGES+:} false; then :
7587   $as_echo_n "(cached) " >&6
7588 else
7589   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7590 /* end confdefs.h.  */
7591 #include <locale.h>
7592 int
7593 main ()
7594 {
7595 return LC_MESSAGES
7596   ;
7597   return 0;
7598 }
7599 _ACEOF
7600 if ac_fn_c_try_link "$LINENO"; then :
7601   am_cv_val_LC_MESSAGES=yes
7602 else
7603   am_cv_val_LC_MESSAGES=no
7604 fi
7605 rm -f core conftest.err conftest.$ac_objext \
7606     conftest$ac_exeext conftest.$ac_ext
7607 fi
7608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
7609 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
7610     if test $am_cv_val_LC_MESSAGES = yes; then
7611
7612 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
7613
7614     fi
7615   fi
7616      USE_NLS=yes
7617
7618
7619     gt_cv_have_gettext=no
7620
7621     CATOBJEXT=NONE
7622     XGETTEXT=:
7623     INTLLIBS=
7624
7625     ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
7626 if test "x$ac_cv_header_libintl_h" = xyes; then :
7627   gt_cv_func_dgettext_libintl="no"
7628       libintl_extra_libs=""
7629
7630       #
7631       # First check in libc
7632       #
7633       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
7634 $as_echo_n "checking for ngettext in libc... " >&6; }
7635 if ${gt_cv_func_ngettext_libc+:} false; then :
7636   $as_echo_n "(cached) " >&6
7637 else
7638   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7639 /* end confdefs.h.  */
7640
7641 #include <libintl.h>
7642
7643 int
7644 main ()
7645 {
7646 return !ngettext ("","", 1)
7647   ;
7648   return 0;
7649 }
7650 _ACEOF
7651 if ac_fn_c_try_link "$LINENO"; then :
7652   gt_cv_func_ngettext_libc=yes
7653 else
7654   gt_cv_func_ngettext_libc=no
7655 fi
7656 rm -f core conftest.err conftest.$ac_objext \
7657     conftest$ac_exeext conftest.$ac_ext
7658
7659 fi
7660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
7661 $as_echo "$gt_cv_func_ngettext_libc" >&6; }
7662
7663       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7664               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
7665 $as_echo_n "checking for dgettext in libc... " >&6; }
7666 if ${gt_cv_func_dgettext_libc+:} false; then :
7667   $as_echo_n "(cached) " >&6
7668 else
7669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7670 /* end confdefs.h.  */
7671
7672 #include <libintl.h>
7673
7674 int
7675 main ()
7676 {
7677 return !dgettext ("","")
7678   ;
7679   return 0;
7680 }
7681 _ACEOF
7682 if ac_fn_c_try_link "$LINENO"; then :
7683   gt_cv_func_dgettext_libc=yes
7684 else
7685   gt_cv_func_dgettext_libc=no
7686 fi
7687 rm -f core conftest.err conftest.$ac_objext \
7688     conftest$ac_exeext conftest.$ac_ext
7689
7690 fi
7691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
7692 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
7693       fi
7694
7695       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7696         for ac_func in bind_textdomain_codeset
7697 do :
7698   ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7699 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7700   cat >>confdefs.h <<_ACEOF
7701 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
7702 _ACEOF
7703
7704 fi
7705 done
7706
7707       fi
7708
7709       #
7710       # If we don't have everything we want, check in libintl
7711       #
7712       if test "$gt_cv_func_dgettext_libc" != "yes" \
7713          || test "$gt_cv_func_ngettext_libc" != "yes" \
7714          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7715
7716         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
7717 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
7718 if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
7719   $as_echo_n "(cached) " >&6
7720 else
7721   ac_check_lib_save_LIBS=$LIBS
7722 LIBS="-lintl  $LIBS"
7723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7724 /* end confdefs.h.  */
7725
7726 /* Override any GCC internal prototype to avoid an error.
7727    Use char because int might match the return type of a GCC
7728    builtin and then its argument prototype would still apply.  */
7729 #ifdef __cplusplus
7730 extern "C"
7731 #endif
7732 char bindtextdomain ();
7733 int
7734 main ()
7735 {
7736 return bindtextdomain ();
7737   ;
7738   return 0;
7739 }
7740 _ACEOF
7741 if ac_fn_c_try_link "$LINENO"; then :
7742   ac_cv_lib_intl_bindtextdomain=yes
7743 else
7744   ac_cv_lib_intl_bindtextdomain=no
7745 fi
7746 rm -f core conftest.err conftest.$ac_objext \
7747     conftest$ac_exeext conftest.$ac_ext
7748 LIBS=$ac_check_lib_save_LIBS
7749 fi
7750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
7751 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
7752 if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
7753   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
7754 $as_echo_n "checking for ngettext in -lintl... " >&6; }
7755 if ${ac_cv_lib_intl_ngettext+:} false; then :
7756   $as_echo_n "(cached) " >&6
7757 else
7758   ac_check_lib_save_LIBS=$LIBS
7759 LIBS="-lintl  $LIBS"
7760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7761 /* end confdefs.h.  */
7762
7763 /* Override any GCC internal prototype to avoid an error.
7764    Use char because int might match the return type of a GCC
7765    builtin and then its argument prototype would still apply.  */
7766 #ifdef __cplusplus
7767 extern "C"
7768 #endif
7769 char ngettext ();
7770 int
7771 main ()
7772 {
7773 return ngettext ();
7774   ;
7775   return 0;
7776 }
7777 _ACEOF
7778 if ac_fn_c_try_link "$LINENO"; then :
7779   ac_cv_lib_intl_ngettext=yes
7780 else
7781   ac_cv_lib_intl_ngettext=no
7782 fi
7783 rm -f core conftest.err conftest.$ac_objext \
7784     conftest$ac_exeext conftest.$ac_ext
7785 LIBS=$ac_check_lib_save_LIBS
7786 fi
7787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
7788 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
7789 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
7790   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
7791 $as_echo_n "checking for dgettext in -lintl... " >&6; }
7792 if ${ac_cv_lib_intl_dgettext+:} false; then :
7793   $as_echo_n "(cached) " >&6
7794 else
7795   ac_check_lib_save_LIBS=$LIBS
7796 LIBS="-lintl  $LIBS"
7797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7798 /* end confdefs.h.  */
7799
7800 /* Override any GCC internal prototype to avoid an error.
7801    Use char because int might match the return type of a GCC
7802    builtin and then its argument prototype would still apply.  */
7803 #ifdef __cplusplus
7804 extern "C"
7805 #endif
7806 char dgettext ();
7807 int
7808 main ()
7809 {
7810 return dgettext ();
7811   ;
7812   return 0;
7813 }
7814 _ACEOF
7815 if ac_fn_c_try_link "$LINENO"; then :
7816   ac_cv_lib_intl_dgettext=yes
7817 else
7818   ac_cv_lib_intl_dgettext=no
7819 fi
7820 rm -f core conftest.err conftest.$ac_objext \
7821     conftest$ac_exeext conftest.$ac_ext
7822 LIBS=$ac_check_lib_save_LIBS
7823 fi
7824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
7825 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
7826 if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
7827   gt_cv_func_dgettext_libintl=yes
7828 fi
7829
7830 fi
7831
7832 fi
7833
7834
7835         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7836           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
7837 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
7838           { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
7839 $as_echo "" >&6; }
7840           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
7841 $as_echo_n "checking for ngettext in -lintl... " >&6; }
7842 if ${ac_cv_lib_intl_ngettext+:} false; then :
7843   $as_echo_n "(cached) " >&6
7844 else
7845   ac_check_lib_save_LIBS=$LIBS
7846 LIBS="-lintl -liconv $LIBS"
7847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7848 /* end confdefs.h.  */
7849
7850 /* Override any GCC internal prototype to avoid an error.
7851    Use char because int might match the return type of a GCC
7852    builtin and then its argument prototype would still apply.  */
7853 #ifdef __cplusplus
7854 extern "C"
7855 #endif
7856 char ngettext ();
7857 int
7858 main ()
7859 {
7860 return ngettext ();
7861   ;
7862   return 0;
7863 }
7864 _ACEOF
7865 if ac_fn_c_try_link "$LINENO"; then :
7866   ac_cv_lib_intl_ngettext=yes
7867 else
7868   ac_cv_lib_intl_ngettext=no
7869 fi
7870 rm -f core conftest.err conftest.$ac_objext \
7871     conftest$ac_exeext conftest.$ac_ext
7872 LIBS=$ac_check_lib_save_LIBS
7873 fi
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
7875 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
7876 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
7877   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
7878 $as_echo_n "checking for dcgettext in -lintl... " >&6; }
7879 if ${ac_cv_lib_intl_dcgettext+:} false; then :
7880   $as_echo_n "(cached) " >&6
7881 else
7882   ac_check_lib_save_LIBS=$LIBS
7883 LIBS="-lintl -liconv $LIBS"
7884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7885 /* end confdefs.h.  */
7886
7887 /* Override any GCC internal prototype to avoid an error.
7888    Use char because int might match the return type of a GCC
7889    builtin and then its argument prototype would still apply.  */
7890 #ifdef __cplusplus
7891 extern "C"
7892 #endif
7893 char dcgettext ();
7894 int
7895 main ()
7896 {
7897 return dcgettext ();
7898   ;
7899   return 0;
7900 }
7901 _ACEOF
7902 if ac_fn_c_try_link "$LINENO"; then :
7903   ac_cv_lib_intl_dcgettext=yes
7904 else
7905   ac_cv_lib_intl_dcgettext=no
7906 fi
7907 rm -f core conftest.err conftest.$ac_objext \
7908     conftest$ac_exeext conftest.$ac_ext
7909 LIBS=$ac_check_lib_save_LIBS
7910 fi
7911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
7912 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
7913 if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
7914   gt_cv_func_dgettext_libintl=yes
7915                         libintl_extra_libs=-liconv
7916 else
7917   :
7918 fi
7919
7920 else
7921   :
7922 fi
7923
7924         fi
7925
7926         #
7927         # If we found libintl, then check in it for bind_textdomain_codeset();
7928         # we'll prefer libc if neither have bind_textdomain_codeset(),
7929         # and both have dgettext and ngettext
7930         #
7931         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7932           glib_save_LIBS="$LIBS"
7933           LIBS="$LIBS -lintl $libintl_extra_libs"
7934           unset ac_cv_func_bind_textdomain_codeset
7935           for ac_func in bind_textdomain_codeset
7936 do :
7937   ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7938 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7939   cat >>confdefs.h <<_ACEOF
7940 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
7941 _ACEOF
7942
7943 fi
7944 done
7945
7946           LIBS="$glib_save_LIBS"
7947
7948           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7949             gt_cv_func_dgettext_libc=no
7950           else
7951             if test "$gt_cv_func_dgettext_libc" = "yes" \
7952                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
7953               gt_cv_func_dgettext_libintl=no
7954             fi
7955           fi
7956         fi
7957       fi
7958
7959       if test "$gt_cv_func_dgettext_libc" = "yes" \
7960         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7961         gt_cv_have_gettext=yes
7962       fi
7963
7964       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7965         INTLLIBS="-lintl $libintl_extra_libs"
7966       fi
7967
7968       if test "$gt_cv_have_gettext" = "yes"; then
7969
7970 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
7971
7972         # Extract the first word of "msgfmt", so it can be a program name with args.
7973 set dummy msgfmt; ac_word=$2
7974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7975 $as_echo_n "checking for $ac_word... " >&6; }
7976 if ${ac_cv_path_MSGFMT+:} false; then :
7977   $as_echo_n "(cached) " >&6
7978 else
7979   case "$MSGFMT" in
7980   /*)
7981   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7982   ;;
7983   *)
7984   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7985   for ac_dir in $PATH; do
7986     test -z "$ac_dir" && ac_dir=.
7987     if test -f $ac_dir/$ac_word; then
7988       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7989         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7990         break
7991       fi
7992     fi
7993   done
7994   IFS="$ac_save_ifs"
7995   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7996   ;;
7997 esac
7998 fi
7999 MSGFMT="$ac_cv_path_MSGFMT"
8000 if test "$MSGFMT" != "no"; then
8001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
8002 $as_echo "$MSGFMT" >&6; }
8003 else
8004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8005 $as_echo "no" >&6; }
8006 fi
8007         if test "$MSGFMT" != "no"; then
8008           glib_save_LIBS="$LIBS"
8009           LIBS="$LIBS $INTLLIBS"
8010           for ac_func in dcgettext
8011 do :
8012   ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
8013 if test "x$ac_cv_func_dcgettext" = xyes; then :
8014   cat >>confdefs.h <<_ACEOF
8015 #define HAVE_DCGETTEXT 1
8016 _ACEOF
8017
8018 fi
8019 done
8020
8021           MSGFMT_OPTS=
8022           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
8023 $as_echo_n "checking if msgfmt accepts -c... " >&6; }
8024           cat >conftest.foo <<_ACEOF
8025
8026 msgid ""
8027 msgstr ""
8028 "Content-Type: text/plain; charset=UTF-8\n"
8029 "Project-Id-Version: test 1.0\n"
8030 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
8031 "Last-Translator: test <foo@bar.xx>\n"
8032 "Language-Team: C <LL@li.org>\n"
8033 "MIME-Version: 1.0\n"
8034 "Content-Transfer-Encoding: 8bit\n"
8035
8036 _ACEOF
8037 if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
8038   ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
8039   ac_status=$?
8040   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8041   test $ac_status = 0; }; then
8042   MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8043 $as_echo "yes" >&6; }
8044 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045 $as_echo "no" >&6; }
8046 echo "$as_me: failed input was:" >&5
8047 sed 's/^/| /' conftest.foo >&5
8048 fi
8049
8050           # Extract the first word of "gmsgfmt", so it can be a program name with args.
8051 set dummy gmsgfmt; ac_word=$2
8052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8053 $as_echo_n "checking for $ac_word... " >&6; }
8054 if ${ac_cv_path_GMSGFMT+:} false; then :
8055   $as_echo_n "(cached) " >&6
8056 else
8057   case $GMSGFMT in
8058   [\\/]* | ?:[\\/]*)
8059   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8060   ;;
8061   *)
8062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8063 for as_dir in $PATH
8064 do
8065   IFS=$as_save_IFS
8066   test -z "$as_dir" && as_dir=.
8067     for ac_exec_ext in '' $ac_executable_extensions; do
8068   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8069     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8070     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8071     break 2
8072   fi
8073 done
8074   done
8075 IFS=$as_save_IFS
8076
8077   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8078   ;;
8079 esac
8080 fi
8081 GMSGFMT=$ac_cv_path_GMSGFMT
8082 if test -n "$GMSGFMT"; then
8083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
8084 $as_echo "$GMSGFMT" >&6; }
8085 else
8086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8087 $as_echo "no" >&6; }
8088 fi
8089
8090
8091           # Extract the first word of "xgettext", so it can be a program name with args.
8092 set dummy xgettext; ac_word=$2
8093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8094 $as_echo_n "checking for $ac_word... " >&6; }
8095 if ${ac_cv_path_XGETTEXT+:} false; then :
8096   $as_echo_n "(cached) " >&6
8097 else
8098   case "$XGETTEXT" in
8099   /*)
8100   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8101   ;;
8102   *)
8103   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8104   for ac_dir in $PATH; do
8105     test -z "$ac_dir" && ac_dir=.
8106     if test -f $ac_dir/$ac_word; then
8107       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8108         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8109         break
8110       fi
8111     fi
8112   done
8113   IFS="$ac_save_ifs"
8114   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8115   ;;
8116 esac
8117 fi
8118 XGETTEXT="$ac_cv_path_XGETTEXT"
8119 if test "$XGETTEXT" != ":"; then
8120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
8121 $as_echo "$XGETTEXT" >&6; }
8122 else
8123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8124 $as_echo "no" >&6; }
8125 fi
8126
8127           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8128 /* end confdefs.h.  */
8129
8130 int
8131 main ()
8132 {
8133 extern int _nl_msg_cat_cntr;
8134                          return _nl_msg_cat_cntr
8135   ;
8136   return 0;
8137 }
8138 _ACEOF
8139 if ac_fn_c_try_link "$LINENO"; then :
8140   CATOBJEXT=.gmo
8141              DATADIRNAME=share
8142 else
8143   case $host in
8144             *-*-solaris*)
8145                                                                 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
8146 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
8147   CATOBJEXT=.gmo
8148                DATADIRNAME=share
8149 else
8150   CATOBJEXT=.mo
8151                DATADIRNAME=lib
8152 fi
8153
8154             ;;
8155             *-*-openbsd*)
8156             CATOBJEXT=.mo
8157             DATADIRNAME=share
8158             ;;
8159             *)
8160             CATOBJEXT=.mo
8161             DATADIRNAME=lib
8162             ;;
8163             esac
8164 fi
8165 rm -f core conftest.err conftest.$ac_objext \
8166     conftest$ac_exeext conftest.$ac_ext
8167           LIBS="$glib_save_LIBS"
8168           INSTOBJEXT=.mo
8169         else
8170           gt_cv_have_gettext=no
8171         fi
8172       fi
8173
8174 fi
8175
8176
8177
8178     if test "$gt_cv_have_gettext" = "yes" ; then
8179
8180 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
8181
8182     fi
8183
8184         if test "$XGETTEXT" != ":"; then
8185                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8186         : ;
8187       else
8188         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
8189 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
8190         XGETTEXT=":"
8191       fi
8192     fi
8193
8194     # We need to process the po/ directory.
8195     POSUB=po
8196
8197     ac_config_commands="$ac_config_commands default-1"
8198
8199
8200                 for lang in $ALL_LINGUAS; do
8201       GMOFILES="$GMOFILES $lang.gmo"
8202       POFILES="$POFILES $lang.po"
8203     done
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217    if test "$gt_cv_have_gettext" = "yes"; then
8218      if test "x$ALL_LINGUAS" = "x"; then
8219        LINGUAS=
8220      else
8221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
8222 $as_echo_n "checking for catalogs to be installed... " >&6; }
8223        NEW_LINGUAS=
8224        for presentlang in $ALL_LINGUAS; do
8225          useit=no
8226          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
8227            desiredlanguages="$LINGUAS"
8228          else
8229            desiredlanguages="$ALL_LINGUAS"
8230          fi
8231          for desiredlang in $desiredlanguages; do
8232            # Use the presentlang catalog if desiredlang is
8233            #   a. equal to presentlang, or
8234            #   b. a variant of presentlang (because in this case,
8235            #      presentlang can be used as a fallback for messages
8236            #      which are not translated in the desiredlang catalog).
8237            case "$desiredlang" in
8238              "$presentlang"*) useit=yes;;
8239            esac
8240          done
8241          if test $useit = yes; then
8242            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8243          fi
8244        done
8245        LINGUAS=$NEW_LINGUAS
8246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
8247 $as_echo "$LINGUAS" >&6; }
8248      fi
8249
8250           if test -n "$LINGUAS"; then
8251        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8252      fi
8253    fi
8254
8255             MKINSTALLDIRS=
8256    if test -n "$ac_aux_dir"; then
8257      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8258    fi
8259    if test -z "$MKINSTALLDIRS"; then
8260      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8261    fi
8262
8263
8264          test -d po || mkdir po
8265    if test "x$srcdir" != "x."; then
8266      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8267        posrcprefix="$srcdir/"
8268      else
8269        posrcprefix="../$srcdir/"
8270      fi
8271    else
8272      posrcprefix="../"
8273    fi
8274    rm -f po/POTFILES
8275    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8276         < $srcdir/po/POTFILES.in > po/POTFILES
8277
8278 MKINSTALLDIRS="$INSTALL_DIRS"
8279
8280
8281 ###############################################################################
8282 #
8283 #       Check for -lXmu (some fucked up vendors don't ship it...)
8284 #
8285 ###############################################################################
8286
8287 have_xmu=no
8288
8289   ac_save_CPPFLAGS="$CPPFLAGS"
8290   if test \! -z "$includedir" ; then
8291     CPPFLAGS="$CPPFLAGS -I$includedir"
8292   fi
8293   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8294   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8295   ac_fn_c_check_header_compile "$LINENO" "X11/Xmu/Error.h" "ac_cv_header_X11_Xmu_Error_h" "#include <stdlib.h>
8296                    #include <stdio.h>
8297                    #include <X11/Intrinsic.h>
8298 "
8299 if test "x$ac_cv_header_X11_Xmu_Error_h" = xyes; then :
8300   have_xmu=yes
8301 fi
8302
8303
8304   CPPFLAGS="$ac_save_CPPFLAGS"
8305 if test "$have_xmu" = no ; then
8306   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8307   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8308   XMU_LIBS=''
8309 else
8310   XMU_SRCS=''
8311   XMU_OBJS=''
8312   XMU_LIBS='-lXmu'
8313   $as_echo "#define HAVE_XMU 1" >>confdefs.h
8314
8315 fi
8316
8317
8318 ###############################################################################
8319 #
8320 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8321 #       See comp.windows.x FAQ question 124.  The right fix is to
8322 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8323 #
8324 ###############################################################################
8325
8326 if test "$have_xmu" = yes ; then
8327   case "$host" in
8328     *-sunos4*)
8329     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8330 $as_echo_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... " >&6; }
8331 if ${ac_cv_sunos_xmu_bug+:} false; then :
8332   $as_echo_n "(cached) " >&6
8333 else
8334   ac_save_LDFLAGS="$LDFLAGS"
8335                     if test \! -z "$x_libraries" ; then
8336                       LDFLAGS="$LDFLAGS -L$x_libraries"
8337                     fi
8338                     # Note: this trick never works!  (Generally.)
8339                     # We're only getting away with using AC_TRY_LINK
8340                     # with X libraries because we know it's SunOS.
8341                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8342                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8343 /* end confdefs.h.  */
8344
8345 int
8346 main ()
8347 {
8348
8349   ;
8350   return 0;
8351 }
8352 _ACEOF
8353 if ac_fn_c_try_link "$LINENO"; then :
8354   ac_cv_sunos_xmu_bug=no
8355 else
8356   ac_cv_sunos_xmu_bug=yes
8357 fi
8358 rm -f core conftest.err conftest.$ac_objext \
8359     conftest$ac_exeext conftest.$ac_ext
8360                     LDFLAGS="$ac_save_LDFLAGS"
8361 fi
8362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sunos_xmu_bug" >&5
8363 $as_echo "$ac_cv_sunos_xmu_bug" >&6; }
8364     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8365       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler understands -static" >&5
8366 $as_echo_n "checking whether the compiler understands -static... " >&6; }
8367 if ${ac_cv_ld_static+:} false; then :
8368   $as_echo_n "(cached) " >&6
8369 else
8370   ac_save_LDFLAGS="$LDFLAGS"
8371                       LDFLAGS="$LDFLAGS -static"
8372                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8373 /* end confdefs.h.  */
8374
8375 int
8376 main ()
8377 {
8378
8379   ;
8380   return 0;
8381 }
8382 _ACEOF
8383 if ac_fn_c_try_link "$LINENO"; then :
8384   ac_cv_ld_static=yes
8385 else
8386   ac_cv_ld_static=no
8387 fi
8388 rm -f core conftest.err conftest.$ac_objext \
8389     conftest$ac_exeext conftest.$ac_ext
8390                     LDFLAGS="$ac_save_LDFLAGS"
8391 fi
8392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ld_static" >&5
8393 $as_echo "$ac_cv_ld_static" >&6; }
8394       if test "$ac_cv_ld_static" = yes ; then
8395         LDFLAGS="$LDFLAGS -static"
8396       else
8397         LDFLAGS="$LDFLAGS -Bstatic"
8398       fi
8399     fi
8400     ;;
8401   esac
8402 fi
8403
8404
8405 ###############################################################################
8406 #
8407 #       Handle the --with-hackdir option
8408 #
8409 ###############################################################################
8410
8411 have_hackdir=yes
8412 with_hackdir_req=unspecified
8413
8414 # Check whether --with-hackdir was given.
8415 if test "${with_hackdir+set}" = set; then :
8416   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
8417 else
8418   with_hackdir=yes
8419 fi
8420
8421
8422 if test x"$with_hackdir" = xyes; then
8423   HACKDIR='${libexecdir}/xscreensaver'
8424 elif test x"$with_hackdir" = xno; then
8425   HACKDIR='${bindir}'
8426 else
8427   HACKDIR=$with_hackdir
8428 fi
8429
8430 # canonicalize slashes.
8431 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8432
8433 # Expand HACKDIR as HACKDIR_FULL
8434 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
8435
8436 # This option used to be called --enable-subdir; make sure that is no longer
8437 # used, since configure brain-damagedly ignores unknown --enable options.
8438
8439 obsolete_enable=
8440 # Check whether --enable-subdir was given.
8441 if test "${enable_subdir+set}" = set; then :
8442   enableval=$enable_subdir; obsolete_enable=yes
8443 fi
8444
8445 if test -n "$obsolete_enable"; then
8446   echo "error: the --enable-subdir option has been replaced with"
8447   echo "       the new --with-hackdir option; see \`configure --help'"
8448   echo "       for more information."
8449   exit 1
8450 fi
8451
8452
8453 ###############################################################################
8454 #
8455 #       Handle the --with-configdir option
8456 #       Help for --with-x-app-defaults option added.
8457 #
8458 ###############################################################################
8459
8460 have_configdir=yes
8461 with_configdir_req=unspecified
8462
8463 # Check whether --with-configdir was given.
8464 if test "${with_configdir+set}" = set; then :
8465   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
8466 else
8467   with_configdir=yes
8468 fi
8469
8470
8471 if test x"$with_configdir" = xyes; then
8472   HACK_CONF_DIR='${datadir}/xscreensaver/config'
8473 elif test x"$with_configdir" = xno; then
8474   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8475   exit 1
8476 else
8477   # there must be a better way than this...
8478   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8479     # absolute path
8480     HACK_CONF_DIR=$with_configdir
8481   else
8482     # relative path
8483     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8484   fi
8485 fi
8486
8487
8488
8489
8490 ###############################################################################
8491 #
8492 #       Check for the SGI SCREEN_SAVER server extension.
8493 #
8494 ###############################################################################
8495
8496 #have_sgi=no
8497 #with_sgi_req=unspecified
8498 #AC_ARG_WITH(sgi-ext,
8499 #[Except where noted, all of the --with options below can also take a
8500 #directory argument: for example, `--with-motif=/opt/Motif'.  That would
8501 #cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
8502 #to be added to the -L list, assuming those directories exist.
8503 #
8504 #By default, support for each of these options will be built in, if the
8505 #relevant library routines exist.  At run time, they will then be used
8506 #only if the X server being used supports them.  Each --with option has
8507 #a corresponding --without option, to override building support for them
8508 #at all.
8509 #
8510 #Screen blanking and idle-detection options:
8511 #
8512 #  --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.],
8513 #  [with_sgi="$withval"; with_sgi_req="$withval"],[with_sgi=yes])
8514 #
8515 #HANDLE_X_PATH_ARG(with_sgi, --with-sgi-ext, SGI SCREEN_SAVER)
8516 #
8517 #if test "$with_sgi" = yes; then
8518 #  AC_CHECK_X_HEADER(X11/extensions/XScreenSaver.h,
8519 #                    [have_sgi=yes
8520 #                     AC_DEFINE(HAVE_SGI_SAVER_EXTENSION)],,
8521 #                    [#include <X11/Xlib.h>])
8522 #
8523 #elif test "$with_sgi" != no; then
8524 #  echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8525 #  exit 1
8526 #fi
8527
8528
8529 ###############################################################################
8530 #
8531 #       Check for the XIDLE server extension.
8532 #
8533 ###############################################################################
8534
8535 #have_xidle=no
8536 #with_xidle_req=unspecified
8537 #AC_ARG_WITH(xidle-ext,
8538 #[  --with-xidle-ext        Include support for the XIDLE extension.],
8539 #  [with_xidle="$withval"; with_xidle_req="$withval"],[with_xidle=yes])
8540 #
8541 #HANDLE_X_PATH_ARG(with_xidle, --with-xidle-ext, XIDLE)
8542 #
8543 #if test "$with_xidle" = yes; then
8544 #  AC_CHECK_X_HEADER(X11/extensions/xidle.h,
8545 #                    [have_xidle=yes
8546 #                     AC_DEFINE(HAVE_XIDLE_EXTENSION)],,
8547 #                    [#include <X11/Xlib.h>])
8548 #elif test "$with_xidle" != no; then
8549 #  echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
8550 #  exit 1
8551 #fi
8552
8553
8554 ###############################################################################
8555 #
8556 #       Check for the SGI-VIDEO-CONTROL server extension.
8557 #
8558 ###############################################################################
8559
8560 #have_sgivc=no
8561 #with_sgivc_req=unspecified
8562 #AC_ARG_WITH(sgivc-ext,
8563 #[  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.],
8564 #  [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
8565 #
8566 #HANDLE_X_PATH_ARG(with_sgivc, --with-sgivc-ext, SGI-VIDEO-CONTROL)
8567 #
8568 #if test "$with_sgivc" = yes; then
8569 #
8570 #  # first check for XSGIvc.h
8571 #  AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes],,
8572 #                    [#include <X11/Xlib.h>])
8573 #
8574 #  # if that succeeded, then check for the -lXsgivc
8575 #  if test "$have_sgivc" = yes; then
8576 #    have_sgivc=no
8577 #    AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
8578 #                  [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [true],
8579 #                  -lXext -lX11)
8580 #  fi
8581 #
8582 #  # if that succeeded, then we've really got it.
8583 #  if test "$have_sgivc" = yes; then
8584 #    AC_DEFINE(HAVE_SGI_VC_EXTENSION)
8585 #  fi
8586 #
8587 #elif test "$with_sgivc" != no; then
8588 #  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
8589 #  exit 1
8590 #fi
8591
8592
8593 ###############################################################################
8594 #
8595 #       Check for the DPMS server extension.
8596 #
8597 ###############################################################################
8598
8599 have_dpms=no
8600 with_dpms_req=unspecified
8601
8602 # Check whether --with-dpms-ext was given.
8603 if test "${with_dpms_ext+set}" = set; then :
8604   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
8605 else
8606   with_dpms=yes
8607 fi
8608
8609
8610
8611    case "$with_dpms" in
8612     yes) ;;
8613     no)  ;;
8614
8615     /*)
8616      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS headers" >&5
8617 $as_echo_n "checking for DPMS headers... " >&6; }
8618      d=$with_dpms/include
8619      if test -d $d; then
8620        X_CFLAGS="-I$d $X_CFLAGS"
8621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8622 $as_echo "$d" >&6; }
8623      else
8624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8625 $as_echo "not found ($d: no such directory)" >&6; }
8626      fi
8627
8628      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS libs" >&5
8629 $as_echo_n "checking for DPMS libs... " >&6; }
8630      d=$with_dpms/lib
8631      if test -d $d; then
8632        X_LIBS="-L$d $X_LIBS"
8633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8634 $as_echo "$d" >&6; }
8635      else
8636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8637 $as_echo "not found ($d: no such directory)" >&6; }
8638      fi
8639
8640      # replace the directory string with "yes".
8641      with_dpms_req="yes"
8642      with_dpms=$with_dpms_req
8643      ;;
8644
8645     *)
8646      echo ""
8647      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
8648      echo "       If it is a directory, then \`DIR/include' will be added to"
8649      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8650      exit 1
8651      ;;
8652    esac
8653
8654
8655 if test "$with_dpms" = yes; then
8656
8657   # first check for dpms.h
8658
8659   ac_save_CPPFLAGS="$CPPFLAGS"
8660   if test \! -z "$includedir" ; then
8661     CPPFLAGS="$CPPFLAGS -I$includedir"
8662   fi
8663   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8664   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8665   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/dpms.h" "ac_cv_header_X11_extensions_dpms_h" "#include <X11/Xlib.h>
8666                      #include <X11/Xmd.h>
8667 "
8668 if test "x$ac_cv_header_X11_extensions_dpms_h" = xyes; then :
8669   have_dpms=yes
8670 fi
8671
8672
8673   CPPFLAGS="$ac_save_CPPFLAGS"
8674
8675   # if that succeeded, then check for the DPMS code in the libraries
8676   if test "$have_dpms" = yes; then
8677
8678     # first look in -lXext (this is where it is with XFree86 4.0)
8679     have_dpms=no
8680
8681   ac_save_CPPFLAGS="$CPPFLAGS"
8682   ac_save_LDFLAGS="$LDFLAGS"
8683 #  ac_save_LIBS="$LIBS"
8684
8685   if test \! -z "$includedir" ; then
8686     CPPFLAGS="$CPPFLAGS -I$includedir"
8687   fi
8688   # note: $X_CFLAGS includes $x_includes
8689   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8690
8691   if test \! -z "$libdir" ; then
8692     LDFLAGS="$LDFLAGS -L$libdir"
8693   fi
8694   # note: $X_LIBS includes $x_libraries
8695   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8696
8697   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8698   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8699   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXext" >&5
8700 $as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
8701 if ${ac_cv_lib_Xext_DPMSInfo+:} false; then :
8702   $as_echo_n "(cached) " >&6
8703 else
8704   ac_check_lib_save_LIBS=$LIBS
8705 LIBS="-lXext -lXext -lX11 $LIBS"
8706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8707 /* end confdefs.h.  */
8708
8709 /* Override any GCC internal prototype to avoid an error.
8710    Use char because int might match the return type of a GCC
8711    builtin and then its argument prototype would still apply.  */
8712 #ifdef __cplusplus
8713 extern "C"
8714 #endif
8715 char DPMSInfo ();
8716 int
8717 main ()
8718 {
8719 return DPMSInfo ();
8720   ;
8721   return 0;
8722 }
8723 _ACEOF
8724 if ac_fn_c_try_link "$LINENO"; then :
8725   ac_cv_lib_Xext_DPMSInfo=yes
8726 else
8727   ac_cv_lib_Xext_DPMSInfo=no
8728 fi
8729 rm -f core conftest.err conftest.$ac_objext \
8730     conftest$ac_exeext conftest.$ac_ext
8731 LIBS=$ac_check_lib_save_LIBS
8732 fi
8733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_DPMSInfo" >&5
8734 $as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
8735 if test "x$ac_cv_lib_Xext_DPMSInfo" = xyes; then :
8736   have_dpms=yes
8737 else
8738   true
8739 fi
8740
8741   CPPFLAGS="$ac_save_CPPFLAGS"
8742   LDFLAGS="$ac_save_LDFLAGS"
8743 #  LIBS="$ac_save_LIBS"
8744
8745
8746     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
8747     if test "$have_dpms" = no; then
8748
8749   ac_save_CPPFLAGS="$CPPFLAGS"
8750   ac_save_LDFLAGS="$LDFLAGS"
8751 #  ac_save_LIBS="$LIBS"
8752
8753   if test \! -z "$includedir" ; then
8754     CPPFLAGS="$CPPFLAGS -I$includedir"
8755   fi
8756   # note: $X_CFLAGS includes $x_includes
8757   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8758
8759   if test \! -z "$libdir" ; then
8760     LDFLAGS="$LDFLAGS -L$libdir"
8761   fi
8762   # note: $X_LIBS includes $x_libraries
8763   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8764
8765   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8766   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8767   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXdpms" >&5
8768 $as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
8769 if ${ac_cv_lib_Xdpms_DPMSInfo+:} false; then :
8770   $as_echo_n "(cached) " >&6
8771 else
8772   ac_check_lib_save_LIBS=$LIBS
8773 LIBS="-lXdpms -lXext -lX11 $LIBS"
8774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8775 /* end confdefs.h.  */
8776
8777 /* Override any GCC internal prototype to avoid an error.
8778    Use char because int might match the return type of a GCC
8779    builtin and then its argument prototype would still apply.  */
8780 #ifdef __cplusplus
8781 extern "C"
8782 #endif
8783 char DPMSInfo ();
8784 int
8785 main ()
8786 {
8787 return DPMSInfo ();
8788   ;
8789   return 0;
8790 }
8791 _ACEOF
8792 if ac_fn_c_try_link "$LINENO"; then :
8793   ac_cv_lib_Xdpms_DPMSInfo=yes
8794 else
8795   ac_cv_lib_Xdpms_DPMSInfo=no
8796 fi
8797 rm -f core conftest.err conftest.$ac_objext \
8798     conftest$ac_exeext conftest.$ac_ext
8799 LIBS=$ac_check_lib_save_LIBS
8800 fi
8801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
8802 $as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
8803 if test "x$ac_cv_lib_Xdpms_DPMSInfo" = xyes; then :
8804   have_dpms=yes; XDPMS_LIBS="-lXdpms"
8805 else
8806   true
8807 fi
8808
8809   CPPFLAGS="$ac_save_CPPFLAGS"
8810   LDFLAGS="$ac_save_LDFLAGS"
8811 #  LIBS="$ac_save_LIBS"
8812
8813     fi
8814   fi
8815
8816
8817   # if that succeeded, then we've really got it.
8818   if test "$have_dpms" = yes; then
8819     $as_echo "#define HAVE_DPMS_EXTENSION 1" >>confdefs.h
8820
8821   fi
8822
8823 elif test "$with_dpms" != no; then
8824   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
8825   exit 1
8826 fi
8827
8828
8829 ###############################################################################
8830 #
8831 #       Check for the XINERAMA server extension.
8832 #
8833 ###############################################################################
8834
8835 have_xinerama=no
8836 with_xinerama_req=unspecified
8837
8838 # Check whether --with-xinerama-ext was given.
8839 if test "${with_xinerama_ext+set}" = set; then :
8840   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
8841 else
8842   with_xinerama=yes
8843 fi
8844
8845
8846
8847    case "$with_xinerama" in
8848     yes) ;;
8849     no)  ;;
8850
8851     /*)
8852      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA headers" >&5
8853 $as_echo_n "checking for XINERAMA headers... " >&6; }
8854      d=$with_xinerama/include
8855      if test -d $d; then
8856        X_CFLAGS="-I$d $X_CFLAGS"
8857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8858 $as_echo "$d" >&6; }
8859      else
8860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8861 $as_echo "not found ($d: no such directory)" >&6; }
8862      fi
8863
8864      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA libs" >&5
8865 $as_echo_n "checking for XINERAMA libs... " >&6; }
8866      d=$with_xinerama/lib
8867      if test -d $d; then
8868        X_LIBS="-L$d $X_LIBS"
8869        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8870 $as_echo "$d" >&6; }
8871      else
8872        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8873 $as_echo "not found ($d: no such directory)" >&6; }
8874      fi
8875
8876      # replace the directory string with "yes".
8877      with_xinerama_req="yes"
8878      with_xinerama=$with_xinerama_req
8879      ;;
8880
8881     *)
8882      echo ""
8883      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
8884      echo "       If it is a directory, then \`DIR/include' will be added to"
8885      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8886      exit 1
8887      ;;
8888    esac
8889
8890
8891 if test "$with_xinerama" = yes; then
8892
8893   # first check for Xinerama.h
8894
8895   ac_save_CPPFLAGS="$CPPFLAGS"
8896   if test \! -z "$includedir" ; then
8897     CPPFLAGS="$CPPFLAGS -I$includedir"
8898   fi
8899   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8900   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8901   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "#include <X11/Xlib.h>
8902 "
8903 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = xyes; then :
8904   have_xinerama=yes
8905 fi
8906
8907
8908   CPPFLAGS="$ac_save_CPPFLAGS"
8909
8910   # if that succeeded, then check for the XINERAMA code in the libraries
8911   if test "$have_xinerama" = yes; then
8912
8913     # first look in -lXext
8914     have_xinerama=no
8915
8916   ac_save_CPPFLAGS="$CPPFLAGS"
8917   ac_save_LDFLAGS="$LDFLAGS"
8918 #  ac_save_LIBS="$LIBS"
8919
8920   if test \! -z "$includedir" ; then
8921     CPPFLAGS="$CPPFLAGS -I$includedir"
8922   fi
8923   # note: $X_CFLAGS includes $x_includes
8924   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8925
8926   if test \! -z "$libdir" ; then
8927     LDFLAGS="$LDFLAGS -L$libdir"
8928   fi
8929   # note: $X_LIBS includes $x_libraries
8930   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8931
8932   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8933   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8934   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXext" >&5
8935 $as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
8936 if ${ac_cv_lib_Xext_XineramaQueryScreens+:} false; then :
8937   $as_echo_n "(cached) " >&6
8938 else
8939   ac_check_lib_save_LIBS=$LIBS
8940 LIBS="-lXext -lXext -lX11 $LIBS"
8941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8942 /* end confdefs.h.  */
8943
8944 /* Override any GCC internal prototype to avoid an error.
8945    Use char because int might match the return type of a GCC
8946    builtin and then its argument prototype would still apply.  */
8947 #ifdef __cplusplus
8948 extern "C"
8949 #endif
8950 char XineramaQueryScreens ();
8951 int
8952 main ()
8953 {
8954 return XineramaQueryScreens ();
8955   ;
8956   return 0;
8957 }
8958 _ACEOF
8959 if ac_fn_c_try_link "$LINENO"; then :
8960   ac_cv_lib_Xext_XineramaQueryScreens=yes
8961 else
8962   ac_cv_lib_Xext_XineramaQueryScreens=no
8963 fi
8964 rm -f core conftest.err conftest.$ac_objext \
8965     conftest$ac_exeext conftest.$ac_ext
8966 LIBS=$ac_check_lib_save_LIBS
8967 fi
8968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
8969 $as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
8970 if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = xyes; then :
8971   have_xinerama=yes
8972 else
8973   true
8974 fi
8975
8976   CPPFLAGS="$ac_save_CPPFLAGS"
8977   LDFLAGS="$ac_save_LDFLAGS"
8978 #  LIBS="$ac_save_LIBS"
8979
8980
8981     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
8982     if test "$have_xinerama" = no; then
8983
8984   ac_save_CPPFLAGS="$CPPFLAGS"
8985   ac_save_LDFLAGS="$LDFLAGS"
8986 #  ac_save_LIBS="$LIBS"
8987
8988   if test \! -z "$includedir" ; then
8989     CPPFLAGS="$CPPFLAGS -I$includedir"
8990   fi
8991   # note: $X_CFLAGS includes $x_includes
8992   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8993
8994   if test \! -z "$libdir" ; then
8995     LDFLAGS="$LDFLAGS -L$libdir"
8996   fi
8997   # note: $X_LIBS includes $x_libraries
8998   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8999
9000   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9001   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXinerama" >&5
9003 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
9004 if ${ac_cv_lib_Xinerama_XineramaQueryScreens+:} false; then :
9005   $as_echo_n "(cached) " >&6
9006 else
9007   ac_check_lib_save_LIBS=$LIBS
9008 LIBS="-lXinerama -lXext -lX11 $LIBS"
9009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9010 /* end confdefs.h.  */
9011
9012 /* Override any GCC internal prototype to avoid an error.
9013    Use char because int might match the return type of a GCC
9014    builtin and then its argument prototype would still apply.  */
9015 #ifdef __cplusplus
9016 extern "C"
9017 #endif
9018 char XineramaQueryScreens ();
9019 int
9020 main ()
9021 {
9022 return XineramaQueryScreens ();
9023   ;
9024   return 0;
9025 }
9026 _ACEOF
9027 if ac_fn_c_try_link "$LINENO"; then :
9028   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
9029 else
9030   ac_cv_lib_Xinerama_XineramaQueryScreens=no
9031 fi
9032 rm -f core conftest.err conftest.$ac_objext \
9033     conftest$ac_exeext conftest.$ac_ext
9034 LIBS=$ac_check_lib_save_LIBS
9035 fi
9036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
9037 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
9038 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = xyes; then :
9039   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
9040 else
9041   true
9042 fi
9043
9044   CPPFLAGS="$ac_save_CPPFLAGS"
9045   LDFLAGS="$ac_save_LDFLAGS"
9046 #  LIBS="$ac_save_LIBS"
9047
9048     fi
9049   fi
9050
9051   # if that succeeded, then we've really got it.
9052   if test "$have_xinerama" = yes; then
9053     $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
9054
9055   fi
9056
9057 elif test "$with_xinerama" != no; then
9058   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
9059   exit 1
9060 fi
9061
9062
9063 ###############################################################################
9064 #
9065 #       Check for the XINPUT server extension.
9066 #
9067 ###############################################################################
9068
9069 have_xinput=no
9070 with_xinput_req=unspecified
9071
9072 # Check whether --with-xinput-ext was given.
9073 if test "${with_xinput_ext+set}" = set; then :
9074   withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
9075 else
9076   with_xinput=yes
9077 fi
9078
9079
9080
9081    case "$with_xinput" in
9082     yes) ;;
9083     no)  ;;
9084
9085     /*)
9086      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT headers" >&5
9087 $as_echo_n "checking for XINPUT headers... " >&6; }
9088      d=$with_xinput/include
9089      if test -d $d; then
9090        X_CFLAGS="-I$d $X_CFLAGS"
9091        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9092 $as_echo "$d" >&6; }
9093      else
9094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9095 $as_echo "not found ($d: no such directory)" >&6; }
9096      fi
9097
9098      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT libs" >&5
9099 $as_echo_n "checking for XINPUT libs... " >&6; }
9100      d=$with_xinput/lib
9101      if test -d $d; then
9102        X_LIBS="-L$d $X_LIBS"
9103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9104 $as_echo "$d" >&6; }
9105      else
9106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9107 $as_echo "not found ($d: no such directory)" >&6; }
9108      fi
9109
9110      # replace the directory string with "yes".
9111      with_xinput_req="yes"
9112      with_xinput=$with_xinput_req
9113      ;;
9114
9115     *)
9116      echo ""
9117      echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
9118      echo "       If it is a directory, then \`DIR/include' will be added to"
9119      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9120      exit 1
9121      ;;
9122    esac
9123
9124
9125 if test "$with_xinput" = yes; then
9126
9127   # first check for Xinput.h
9128
9129   ac_save_CPPFLAGS="$CPPFLAGS"
9130   if test \! -z "$includedir" ; then
9131     CPPFLAGS="$CPPFLAGS -I$includedir"
9132   fi
9133   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9134   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9135   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XInput.h" "ac_cv_header_X11_extensions_XInput_h" "#include <X11/Xlib.h>
9136 "
9137 if test "x$ac_cv_header_X11_extensions_XInput_h" = xyes; then :
9138   have_xinput=yes
9139 fi
9140
9141
9142   CPPFLAGS="$ac_save_CPPFLAGS"
9143
9144   # if that succeeded, then check for libXi
9145   if test "$have_xinput" = yes; then
9146     have_xinput=no
9147
9148   ac_save_CPPFLAGS="$CPPFLAGS"
9149   ac_save_LDFLAGS="$LDFLAGS"
9150 #  ac_save_LIBS="$LIBS"
9151
9152   if test \! -z "$includedir" ; then
9153     CPPFLAGS="$CPPFLAGS -I$includedir"
9154   fi
9155   # note: $X_CFLAGS includes $x_includes
9156   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9157
9158   if test \! -z "$libdir" ; then
9159     LDFLAGS="$LDFLAGS -L$libdir"
9160   fi
9161   # note: $X_LIBS includes $x_libraries
9162   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9163
9164   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9165   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9166   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XListInputDevices in -lXi" >&5
9167 $as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
9168 if ${ac_cv_lib_Xi_XListInputDevices+:} false; then :
9169   $as_echo_n "(cached) " >&6
9170 else
9171   ac_check_lib_save_LIBS=$LIBS
9172 LIBS="-lXi -lXext -lX11 $LIBS"
9173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9174 /* end confdefs.h.  */
9175
9176 /* Override any GCC internal prototype to avoid an error.
9177    Use char because int might match the return type of a GCC
9178    builtin and then its argument prototype would still apply.  */
9179 #ifdef __cplusplus
9180 extern "C"
9181 #endif
9182 char XListInputDevices ();
9183 int
9184 main ()
9185 {
9186 return XListInputDevices ();
9187   ;
9188   return 0;
9189 }
9190 _ACEOF
9191 if ac_fn_c_try_link "$LINENO"; then :
9192   ac_cv_lib_Xi_XListInputDevices=yes
9193 else
9194   ac_cv_lib_Xi_XListInputDevices=no
9195 fi
9196 rm -f core conftest.err conftest.$ac_objext \
9197     conftest$ac_exeext conftest.$ac_ext
9198 LIBS=$ac_check_lib_save_LIBS
9199 fi
9200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xi_XListInputDevices" >&5
9201 $as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
9202 if test "x$ac_cv_lib_Xi_XListInputDevices" = xyes; then :
9203   have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
9204 else
9205   true
9206 fi
9207
9208   CPPFLAGS="$ac_save_CPPFLAGS"
9209   LDFLAGS="$ac_save_LDFLAGS"
9210 #  LIBS="$ac_save_LIBS"
9211
9212   fi
9213
9214   # if that succeeded, then we've really got it.
9215   if test "$have_xinput" = yes; then
9216     $as_echo "#define HAVE_XINPUT 1" >>confdefs.h
9217
9218   fi
9219
9220 elif test "$with_xinput" != no; then
9221   echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
9222   exit 1
9223 fi
9224
9225
9226 ###############################################################################
9227 #
9228 #       Check for the XF86VMODE server extension (for virtual screens.)
9229 #
9230 ###############################################################################
9231
9232 have_xf86vmode=no
9233 with_xf86vmode_req=unspecified
9234
9235 # Check whether --with-xf86vmode-ext was given.
9236 if test "${with_xf86vmode_ext+set}" = set; then :
9237   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
9238 else
9239   with_xf86vmode=yes
9240 fi
9241
9242
9243
9244    case "$with_xf86vmode" in
9245     yes) ;;
9246     no)  ;;
9247
9248     /*)
9249      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode headers" >&5
9250 $as_echo_n "checking for xf86vmode headers... " >&6; }
9251      d=$with_xf86vmode/include
9252      if test -d $d; then
9253        X_CFLAGS="-I$d $X_CFLAGS"
9254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9255 $as_echo "$d" >&6; }
9256      else
9257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9258 $as_echo "not found ($d: no such directory)" >&6; }
9259      fi
9260
9261      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode libs" >&5
9262 $as_echo_n "checking for xf86vmode libs... " >&6; }
9263      d=$with_xf86vmode/lib
9264      if test -d $d; then
9265        X_LIBS="-L$d $X_LIBS"
9266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9267 $as_echo "$d" >&6; }
9268      else
9269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9270 $as_echo "not found ($d: no such directory)" >&6; }
9271      fi
9272
9273      # replace the directory string with "yes".
9274      with_xf86vmode_req="yes"
9275      with_xf86vmode=$with_xf86vmode_req
9276      ;;
9277
9278     *)
9279      echo ""
9280      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
9281      echo "       If it is a directory, then \`DIR/include' will be added to"
9282      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9283      exit 1
9284      ;;
9285    esac
9286
9287
9288 VIDMODE_LIBS=""
9289
9290 if test "$with_xf86vmode" = yes; then
9291
9292   # first check for xf86vmode.h
9293
9294   ac_save_CPPFLAGS="$CPPFLAGS"
9295   if test \! -z "$includedir" ; then
9296     CPPFLAGS="$CPPFLAGS -I$includedir"
9297   fi
9298   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9299   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9300   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9301 "
9302 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9303   have_xf86vmode=yes
9304 fi
9305
9306
9307   CPPFLAGS="$ac_save_CPPFLAGS"
9308
9309   # if that succeeded, then check for the -lXxf86vm
9310   if test "$have_xf86vmode" = yes; then
9311     have_xf86vmode=no
9312
9313   ac_save_CPPFLAGS="$CPPFLAGS"
9314   ac_save_LDFLAGS="$LDFLAGS"
9315 #  ac_save_LIBS="$LIBS"
9316
9317   if test \! -z "$includedir" ; then
9318     CPPFLAGS="$CPPFLAGS -I$includedir"
9319   fi
9320   # note: $X_CFLAGS includes $x_includes
9321   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9322
9323   if test \! -z "$libdir" ; then
9324     LDFLAGS="$LDFLAGS -L$libdir"
9325   fi
9326   # note: $X_LIBS includes $x_libraries
9327   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9328
9329   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9330   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9331   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
9332 $as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
9333 if ${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+:} false; then :
9334   $as_echo_n "(cached) " >&6
9335 else
9336   ac_check_lib_save_LIBS=$LIBS
9337 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9339 /* end confdefs.h.  */
9340
9341 /* Override any GCC internal prototype to avoid an error.
9342    Use char because int might match the return type of a GCC
9343    builtin and then its argument prototype would still apply.  */
9344 #ifdef __cplusplus
9345 extern "C"
9346 #endif
9347 char XF86VidModeGetViewPort ();
9348 int
9349 main ()
9350 {
9351 return XF86VidModeGetViewPort ();
9352   ;
9353   return 0;
9354 }
9355 _ACEOF
9356 if ac_fn_c_try_link "$LINENO"; then :
9357   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
9358 else
9359   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
9360 fi
9361 rm -f core conftest.err conftest.$ac_objext \
9362     conftest$ac_exeext conftest.$ac_ext
9363 LIBS=$ac_check_lib_save_LIBS
9364 fi
9365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
9366 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
9367 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = xyes; then :
9368   have_xf86vmode=yes;
9369                    VIDMODE_LIBS="-lXxf86vm";
9370                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
9371 else
9372   true
9373 fi
9374
9375   CPPFLAGS="$ac_save_CPPFLAGS"
9376   LDFLAGS="$ac_save_LDFLAGS"
9377 #  LIBS="$ac_save_LIBS"
9378
9379   fi
9380
9381   # if that succeeded, then we've really got it.
9382   if test "$have_xf86vmode" = yes; then
9383     $as_echo "#define HAVE_XF86VMODE 1" >>confdefs.h
9384
9385   fi
9386
9387 elif test "$with_xf86vmode" != no; then
9388   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
9389   exit 1
9390 fi
9391
9392
9393 ###############################################################################
9394 #
9395 #       Check for the XF86VMODE server extension (for gamma fading.)
9396 #
9397 ###############################################################################
9398
9399 have_xf86gamma=no
9400 have_xf86gamma_ramp=no
9401 with_xf86gamma_req=unspecified
9402
9403 # Check whether --with-xf86gamma-ext was given.
9404 if test "${with_xf86gamma_ext+set}" = set; then :
9405   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
9406 else
9407   with_xf86gamma=yes
9408 fi
9409
9410
9411
9412    case "$with_xf86gamma" in
9413     yes) ;;
9414     no)  ;;
9415
9416     /*)
9417      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma headers" >&5
9418 $as_echo_n "checking for xf86gamma headers... " >&6; }
9419      d=$with_xf86gamma/include
9420      if test -d $d; then
9421        X_CFLAGS="-I$d $X_CFLAGS"
9422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9423 $as_echo "$d" >&6; }
9424      else
9425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9426 $as_echo "not found ($d: no such directory)" >&6; }
9427      fi
9428
9429      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma libs" >&5
9430 $as_echo_n "checking for xf86gamma libs... " >&6; }
9431      d=$with_xf86gamma/lib
9432      if test -d $d; then
9433        X_LIBS="-L$d $X_LIBS"
9434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9435 $as_echo "$d" >&6; }
9436      else
9437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9438 $as_echo "not found ($d: no such directory)" >&6; }
9439      fi
9440
9441      # replace the directory string with "yes".
9442      with_xf86gamma_req="yes"
9443      with_xf86gamma=$with_xf86gamma_req
9444      ;;
9445
9446     *)
9447      echo ""
9448      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
9449      echo "       If it is a directory, then \`DIR/include' will be added to"
9450      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9451      exit 1
9452      ;;
9453    esac
9454
9455
9456 if test "$with_xf86gamma" = yes; then
9457
9458   # first check for xf86vmode.h, if we haven't already
9459   if test "$have_xf86vmode" = yes; then
9460     have_xf86gamma=yes
9461   else
9462
9463   ac_save_CPPFLAGS="$CPPFLAGS"
9464   if test \! -z "$includedir" ; then
9465     CPPFLAGS="$CPPFLAGS -I$includedir"
9466   fi
9467   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9468   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9469   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9470 "
9471 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9472   have_xf86gamma=yes
9473 fi
9474
9475
9476   CPPFLAGS="$ac_save_CPPFLAGS"
9477   fi
9478
9479   # if that succeeded, then check for the -lXxf86vm
9480   if test "$have_xf86gamma" = yes; then
9481     have_xf86gamma=no
9482
9483   ac_save_CPPFLAGS="$CPPFLAGS"
9484   ac_save_LDFLAGS="$LDFLAGS"
9485 #  ac_save_LIBS="$LIBS"
9486
9487   if test \! -z "$includedir" ; then
9488     CPPFLAGS="$CPPFLAGS -I$includedir"
9489   fi
9490   # note: $X_CFLAGS includes $x_includes
9491   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9492
9493   if test \! -z "$libdir" ; then
9494     LDFLAGS="$LDFLAGS -L$libdir"
9495   fi
9496   # note: $X_LIBS includes $x_libraries
9497   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9498
9499   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9500   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9501   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
9502 $as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
9503 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+:} false; then :
9504   $as_echo_n "(cached) " >&6
9505 else
9506   ac_check_lib_save_LIBS=$LIBS
9507 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9509 /* end confdefs.h.  */
9510
9511 /* Override any GCC internal prototype to avoid an error.
9512    Use char because int might match the return type of a GCC
9513    builtin and then its argument prototype would still apply.  */
9514 #ifdef __cplusplus
9515 extern "C"
9516 #endif
9517 char XF86VidModeSetGamma ();
9518 int
9519 main ()
9520 {
9521 return XF86VidModeSetGamma ();
9522   ;
9523   return 0;
9524 }
9525 _ACEOF
9526 if ac_fn_c_try_link "$LINENO"; then :
9527   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
9528 else
9529   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
9530 fi
9531 rm -f core conftest.err conftest.$ac_objext \
9532     conftest$ac_exeext conftest.$ac_ext
9533 LIBS=$ac_check_lib_save_LIBS
9534 fi
9535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
9536 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
9537 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = xyes; then :
9538   have_xf86gamma=yes
9539 else
9540   true
9541 fi
9542
9543   CPPFLAGS="$ac_save_CPPFLAGS"
9544   LDFLAGS="$ac_save_LDFLAGS"
9545 #  LIBS="$ac_save_LIBS"
9546
9547   fi
9548
9549   # check for the Ramp versions of the functions too.
9550   if test "$have_xf86gamma" = yes; then
9551     have_xf86gamma_ramp=no
9552
9553   ac_save_CPPFLAGS="$CPPFLAGS"
9554   ac_save_LDFLAGS="$LDFLAGS"
9555 #  ac_save_LIBS="$LIBS"
9556
9557   if test \! -z "$includedir" ; then
9558     CPPFLAGS="$CPPFLAGS -I$includedir"
9559   fi
9560   # note: $X_CFLAGS includes $x_includes
9561   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9562
9563   if test \! -z "$libdir" ; then
9564     LDFLAGS="$LDFLAGS -L$libdir"
9565   fi
9566   # note: $X_LIBS includes $x_libraries
9567   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9568
9569   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9570   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9571   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
9572 $as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
9573 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+:} false; then :
9574   $as_echo_n "(cached) " >&6
9575 else
9576   ac_check_lib_save_LIBS=$LIBS
9577 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9579 /* end confdefs.h.  */
9580
9581 /* Override any GCC internal prototype to avoid an error.
9582    Use char because int might match the return type of a GCC
9583    builtin and then its argument prototype would still apply.  */
9584 #ifdef __cplusplus
9585 extern "C"
9586 #endif
9587 char XF86VidModeSetGammaRamp ();
9588 int
9589 main ()
9590 {
9591 return XF86VidModeSetGammaRamp ();
9592   ;
9593   return 0;
9594 }
9595 _ACEOF
9596 if ac_fn_c_try_link "$LINENO"; then :
9597   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
9598 else
9599   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
9600 fi
9601 rm -f core conftest.err conftest.$ac_objext \
9602     conftest$ac_exeext conftest.$ac_ext
9603 LIBS=$ac_check_lib_save_LIBS
9604 fi
9605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
9606 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
9607 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = xyes; then :
9608   have_xf86gamma_ramp=yes
9609 else
9610   true
9611 fi
9612
9613   CPPFLAGS="$ac_save_CPPFLAGS"
9614   LDFLAGS="$ac_save_LDFLAGS"
9615 #  LIBS="$ac_save_LIBS"
9616
9617   fi
9618
9619   # if those tests succeeded, then we've really got the functions.
9620   if test "$have_xf86gamma" = yes; then
9621     $as_echo "#define HAVE_XF86VMODE_GAMMA 1" >>confdefs.h
9622
9623   fi
9624
9625   if test "$have_xf86gamma_ramp" = yes; then
9626     $as_echo "#define HAVE_XF86VMODE_GAMMA_RAMP 1" >>confdefs.h
9627
9628   fi
9629
9630   # pull in the lib, if we haven't already
9631   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
9632     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
9633   fi
9634
9635 elif test "$with_xf86gamma" != no; then
9636   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
9637   exit 1
9638 fi
9639
9640
9641 ###############################################################################
9642 #
9643 #       Check for the RANDR (Resize and Rotate) server extension.
9644 #
9645 #       We need this to detect when the resolution of the desktop
9646 #       has changed out from under us (this is a newer, different
9647 #       mechanism than the XF86VMODE virtual viewports.)
9648 #
9649 ###############################################################################
9650
9651 have_randr=no
9652 with_randr_req=unspecified
9653
9654 # Check whether --with-randr-ext was given.
9655 if test "${with_randr_ext+set}" = set; then :
9656   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
9657 else
9658   with_randr=yes
9659 fi
9660
9661
9662
9663    case "$with_randr" in
9664     yes) ;;
9665     no)  ;;
9666
9667     /*)
9668      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR headers" >&5
9669 $as_echo_n "checking for RANDR headers... " >&6; }
9670      d=$with_randr/include
9671      if test -d $d; then
9672        X_CFLAGS="-I$d $X_CFLAGS"
9673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9674 $as_echo "$d" >&6; }
9675      else
9676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9677 $as_echo "not found ($d: no such directory)" >&6; }
9678      fi
9679
9680      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR libs" >&5
9681 $as_echo_n "checking for RANDR libs... " >&6; }
9682      d=$with_randr/lib
9683      if test -d $d; then
9684        X_LIBS="-L$d $X_LIBS"
9685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9686 $as_echo "$d" >&6; }
9687      else
9688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9689 $as_echo "not found ($d: no such directory)" >&6; }
9690      fi
9691
9692      # replace the directory string with "yes".
9693      with_randr_req="yes"
9694      with_randr=$with_randr_req
9695      ;;
9696
9697     *)
9698      echo ""
9699      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
9700      echo "       If it is a directory, then \`DIR/include' will be added to"
9701      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9702      exit 1
9703      ;;
9704    esac
9705
9706
9707 if test "$with_randr" = yes; then
9708
9709   # first check for Xrandr.h
9710
9711   ac_save_CPPFLAGS="$CPPFLAGS"
9712   if test \! -z "$includedir" ; then
9713     CPPFLAGS="$CPPFLAGS -I$includedir"
9714   fi
9715   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9716   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9717   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "#include <X11/Xlib.h>
9718 "
9719 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = xyes; then :
9720   have_randr=yes
9721 fi
9722
9723
9724   CPPFLAGS="$ac_save_CPPFLAGS"
9725
9726   # if that succeeded, then check for the XRR code in the libraries
9727   if test "$have_randr" = yes; then
9728
9729     # RANDR probably needs -lXrender
9730     xrender_libs=
9731
9732   ac_save_CPPFLAGS="$CPPFLAGS"
9733   ac_save_LDFLAGS="$LDFLAGS"
9734 #  ac_save_LIBS="$LIBS"
9735
9736   if test \! -z "$includedir" ; then
9737     CPPFLAGS="$CPPFLAGS -I$includedir"
9738   fi
9739   # note: $X_CFLAGS includes $x_includes
9740   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9741
9742   if test \! -z "$libdir" ; then
9743     LDFLAGS="$LDFLAGS -L$libdir"
9744   fi
9745   # note: $X_LIBS includes $x_libraries
9746   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9747
9748   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9749   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderSetSubpixelOrder in -lXrender" >&5
9751 $as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
9752 if ${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+:} false; then :
9753   $as_echo_n "(cached) " >&6
9754 else
9755   ac_check_lib_save_LIBS=$LIBS
9756 LIBS="-lXrender -lXext -lX11 $LIBS"
9757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9758 /* end confdefs.h.  */
9759
9760 /* Override any GCC internal prototype to avoid an error.
9761    Use char because int might match the return type of a GCC
9762    builtin and then its argument prototype would still apply.  */
9763 #ifdef __cplusplus
9764 extern "C"
9765 #endif
9766 char XRenderSetSubpixelOrder ();
9767 int
9768 main ()
9769 {
9770 return XRenderSetSubpixelOrder ();
9771   ;
9772   return 0;
9773 }
9774 _ACEOF
9775 if ac_fn_c_try_link "$LINENO"; then :
9776   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
9777 else
9778   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
9779 fi
9780 rm -f core conftest.err conftest.$ac_objext \
9781     conftest$ac_exeext conftest.$ac_ext
9782 LIBS=$ac_check_lib_save_LIBS
9783 fi
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
9785 $as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
9786 if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = xyes; then :
9787   xrender_libs="-lXrender"
9788 else
9789   true
9790 fi
9791
9792   CPPFLAGS="$ac_save_CPPFLAGS"
9793   LDFLAGS="$ac_save_LDFLAGS"
9794 #  LIBS="$ac_save_LIBS"
9795
9796
9797     # first look for RANDR in -lXext
9798     have_randr=no
9799
9800   ac_save_CPPFLAGS="$CPPFLAGS"
9801   ac_save_LDFLAGS="$LDFLAGS"
9802 #  ac_save_LIBS="$LIBS"
9803
9804   if test \! -z "$includedir" ; then
9805     CPPFLAGS="$CPPFLAGS -I$includedir"
9806   fi
9807   # note: $X_CFLAGS includes $x_includes
9808   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9809
9810   if test \! -z "$libdir" ; then
9811     LDFLAGS="$LDFLAGS -L$libdir"
9812   fi
9813   # note: $X_LIBS includes $x_libraries
9814   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9815
9816   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9817   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXext" >&5
9819 $as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
9820 if ${ac_cv_lib_Xext_XRRGetScreenInfo+:} false; then :
9821   $as_echo_n "(cached) " >&6
9822 else
9823   ac_check_lib_save_LIBS=$LIBS
9824 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
9825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9826 /* end confdefs.h.  */
9827
9828 /* Override any GCC internal prototype to avoid an error.
9829    Use char because int might match the return type of a GCC
9830    builtin and then its argument prototype would still apply.  */
9831 #ifdef __cplusplus
9832 extern "C"
9833 #endif
9834 char XRRGetScreenInfo ();
9835 int
9836 main ()
9837 {
9838 return XRRGetScreenInfo ();
9839   ;
9840   return 0;
9841 }
9842 _ACEOF
9843 if ac_fn_c_try_link "$LINENO"; then :
9844   ac_cv_lib_Xext_XRRGetScreenInfo=yes
9845 else
9846   ac_cv_lib_Xext_XRRGetScreenInfo=no
9847 fi
9848 rm -f core conftest.err conftest.$ac_objext \
9849     conftest$ac_exeext conftest.$ac_ext
9850 LIBS=$ac_check_lib_save_LIBS
9851 fi
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
9853 $as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
9854 if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = xyes; then :
9855   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
9856 else
9857   true
9858 fi
9859
9860   CPPFLAGS="$ac_save_CPPFLAGS"
9861   LDFLAGS="$ac_save_LDFLAGS"
9862 #  LIBS="$ac_save_LIBS"
9863
9864
9865     # if that failed, look in -lXrandr
9866     if test "$have_randr" = no; then
9867
9868   ac_save_CPPFLAGS="$CPPFLAGS"
9869   ac_save_LDFLAGS="$LDFLAGS"
9870 #  ac_save_LIBS="$LIBS"
9871
9872   if test \! -z "$includedir" ; then
9873     CPPFLAGS="$CPPFLAGS -I$includedir"
9874   fi
9875   # note: $X_CFLAGS includes $x_includes
9876   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9877
9878   if test \! -z "$libdir" ; then
9879     LDFLAGS="$LDFLAGS -L$libdir"
9880   fi
9881   # note: $X_LIBS includes $x_libraries
9882   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9883
9884   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9885   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9886   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
9887 $as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
9888 if ${ac_cv_lib_Xrandr_XRRGetScreenInfo+:} false; then :
9889   $as_echo_n "(cached) " >&6
9890 else
9891   ac_check_lib_save_LIBS=$LIBS
9892 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
9893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9894 /* end confdefs.h.  */
9895
9896 /* Override any GCC internal prototype to avoid an error.
9897    Use char because int might match the return type of a GCC
9898    builtin and then its argument prototype would still apply.  */
9899 #ifdef __cplusplus
9900 extern "C"
9901 #endif
9902 char XRRGetScreenInfo ();
9903 int
9904 main ()
9905 {
9906 return XRRGetScreenInfo ();
9907   ;
9908   return 0;
9909 }
9910 _ACEOF
9911 if ac_fn_c_try_link "$LINENO"; then :
9912   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
9913 else
9914   ac_cv_lib_Xrandr_XRRGetScreenInfo=no
9915 fi
9916 rm -f core conftest.err conftest.$ac_objext \
9917     conftest$ac_exeext conftest.$ac_ext
9918 LIBS=$ac_check_lib_save_LIBS
9919 fi
9920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
9921 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
9922 if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = xyes; then :
9923   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
9924 else
9925   true
9926 fi
9927
9928   CPPFLAGS="$ac_save_CPPFLAGS"
9929   LDFLAGS="$ac_save_LDFLAGS"
9930 #  LIBS="$ac_save_LIBS"
9931
9932     fi
9933   fi
9934
9935   # if that succeeded, then we've really got it.
9936   if test "$have_randr" = yes; then
9937     $as_echo "#define HAVE_RANDR 1" >>confdefs.h
9938
9939
9940     # Now check for version 1.2 in the same libs.
9941     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
9942     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources" >&5
9943 $as_echo_n "checking for XRRGetScreenResources... " >&6; }
9944 if ${ac_cv_randr_12+:} false; then :
9945   $as_echo_n "(cached) " >&6
9946 else
9947   ac_cv_randr_12=no
9948
9949   ac_save_CPPFLAGS="$CPPFLAGS"
9950   if test \! -z "$includedir" ; then
9951     CPPFLAGS="$CPPFLAGS -I$includedir"
9952   fi
9953   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9954   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9956 /* end confdefs.h.  */
9957 #include <stdlib.h>
9958                          #include <X11/Xlib.h>
9959                          #include <X11/extensions/Xrandr.h>
9960 int
9961 main ()
9962 {
9963 XRRScreenResources *res =
9964                            XRRGetScreenResources (0, 0);
9965   ;
9966   return 0;
9967 }
9968 _ACEOF
9969 if ac_fn_c_try_compile "$LINENO"; then :
9970   ac_cv_randr_12=yes
9971 else
9972   ac_cv_randr_12=no
9973 fi
9974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9975   CPPFLAGS="$ac_save_CPPFLAGS"
9976 fi
9977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_randr_12" >&5
9978 $as_echo "$ac_cv_randr_12" >&6; }
9979     if test "$ac_cv_randr_12" = yes ; then
9980       $as_echo "#define HAVE_RANDR_12 1" >>confdefs.h
9981
9982     fi
9983 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
9984 #                  [true], $SAVER_LIBS)
9985   fi
9986
9987
9988 elif test "$with_randr" != no; then
9989   echo "error: must be yes or no: --with-randr-ext=$with_randr"
9990   exit 1
9991 fi
9992
9993
9994 ###############################################################################
9995 #
9996 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
9997 #       using other XF86 stuff.)
9998 #
9999 ###############################################################################
10000
10001 have_xf86miscsetgrabkeysstate=no
10002 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
10003
10004   ac_save_CPPFLAGS="$CPPFLAGS"
10005   ac_save_LDFLAGS="$LDFLAGS"
10006 #  ac_save_LIBS="$LIBS"
10007
10008   if test \! -z "$includedir" ; then
10009     CPPFLAGS="$CPPFLAGS -I$includedir"
10010   fi
10011   # note: $X_CFLAGS includes $x_includes
10012   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10013
10014   if test \! -z "$libdir" ; then
10015     LDFLAGS="$LDFLAGS -L$libdir"
10016   fi
10017   # note: $X_LIBS includes $x_libraries
10018   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10019
10020   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10021   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
10023 $as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
10024 if ${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+:} false; then :
10025   $as_echo_n "(cached) " >&6
10026 else
10027   ac_check_lib_save_LIBS=$LIBS
10028 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
10029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10030 /* end confdefs.h.  */
10031
10032 /* Override any GCC internal prototype to avoid an error.
10033    Use char because int might match the return type of a GCC
10034    builtin and then its argument prototype would still apply.  */
10035 #ifdef __cplusplus
10036 extern "C"
10037 #endif
10038 char XF86MiscSetGrabKeysState ();
10039 int
10040 main ()
10041 {
10042 return XF86MiscSetGrabKeysState ();
10043   ;
10044   return 0;
10045 }
10046 _ACEOF
10047 if ac_fn_c_try_link "$LINENO"; then :
10048   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
10049 else
10050   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
10051 fi
10052 rm -f core conftest.err conftest.$ac_objext \
10053     conftest$ac_exeext conftest.$ac_ext
10054 LIBS=$ac_check_lib_save_LIBS
10055 fi
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
10057 $as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
10058 if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = xyes; then :
10059   have_xf86miscsetgrabkeysstate=yes
10060 else
10061   true
10062 fi
10063
10064   CPPFLAGS="$ac_save_CPPFLAGS"
10065   LDFLAGS="$ac_save_LDFLAGS"
10066 #  LIBS="$ac_save_LIBS"
10067
10068   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
10069     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
10070     $as_echo "#define HAVE_XF86MISCSETGRABKEYSSTATE 1" >>confdefs.h
10071
10072   fi
10073 fi
10074
10075
10076 ###############################################################################
10077 #
10078 #       Check for HP XHPDisableReset and XHPEnableReset.
10079 #
10080 ###############################################################################
10081
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XHPDisableReset in X11/XHPlib.h" >&5
10083 $as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
10084
10085   ac_save_CPPFLAGS="$CPPFLAGS"
10086   if test \! -z "$includedir" ; then
10087     CPPFLAGS="$CPPFLAGS -I$includedir"
10088   fi
10089   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10090   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10092 /* end confdefs.h.  */
10093 #include <X11/XHPlib.h>
10094
10095 _ACEOF
10096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10097   $EGREP "XHPDisableReset" >/dev/null 2>&1; then :
10098   $as_echo "#define HAVE_XHPDISABLERESET 1" >>confdefs.h
10099
10100                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10101                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10102 $as_echo "yes" >&6; }
10103 else
10104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10105 $as_echo "no" >&6; }
10106 fi
10107 rm -rf conftest*
10108
10109   CPPFLAGS="$ac_save_CPPFLAGS"
10110
10111
10112 ###############################################################################
10113 #
10114 #       Check for /proc/interrupts.
10115 #
10116 ###############################################################################
10117
10118 have_proc_interrupts=no
10119 with_proc_interrupts_req=unspecified
10120
10121 # Check whether --with-proc-interrupts was given.
10122 if test "${with_proc_interrupts+set}" = set; then :
10123   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
10124 else
10125   with_proc_interrupts=yes
10126 fi
10127
10128
10129 if test "$with_proc_interrupts" = yes; then
10130
10131   # Note that we may be building in an environment (e.g. Debian buildd chroot)
10132   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
10133   # check that it has the bits we need, but otherwise we'll just go on faith.
10134   #
10135   have_proc_interrupts=yes
10136
10137   if test -f /proc/interrupts; then
10138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /proc/interrupts contains keyboard data" >&5
10139 $as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
10140 if ${ac_cv_have_proc_interrupts+:} false; then :
10141   $as_echo_n "(cached) " >&6
10142 else
10143   ac_cv_have_proc_interrupts=no
10144      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
10145        ac_cv_have_proc_interrupts=yes
10146      fi
10147
10148 fi
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_proc_interrupts" >&5
10150 $as_echo "$ac_cv_have_proc_interrupts" >&6; }
10151    have_proc_interrupts=$ac_cv_have_proc_interrupts
10152   fi
10153
10154   if test "$have_proc_interrupts" = yes; then
10155     $as_echo "#define HAVE_PROC_INTERRUPTS 1" >>confdefs.h
10156
10157   fi
10158
10159 elif test "$with_proc_interrupts" != no; then
10160   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
10161   exit 1
10162 fi
10163
10164
10165 ###############################################################################
10166 #
10167 #       The --enable-locking option
10168 #
10169 ###############################################################################
10170
10171 # Check whether --enable-locking was given.
10172 if test "${enable_locking+set}" = set; then :
10173   enableval=$enable_locking; enable_locking="$enableval"
10174 else
10175   if test "$ac_macosx" = yes; then
10176     # We can't lock on MacOS X, so default to not compiling in support for it.
10177     # But allow --enable-locking to override that, so I can debug Linux locking
10178     # under MacOS X11.
10179     enable_locking=no
10180    else
10181     enable_locking=yes
10182    fi
10183 fi
10184
10185 if test "$enable_locking" = yes; then
10186   true
10187 elif test "$enable_locking" = no; then
10188   $as_echo "#define NO_LOCKING 1" >>confdefs.h
10189
10190 else
10191   echo "error: must be yes or no: --enable-locking=$enable_locking"
10192   exit 1
10193 fi
10194
10195
10196 ###############################################################################
10197 #
10198 #       Whether to allow root password to unblank.
10199 #
10200 ###############################################################################
10201 # Check whether --enable-root-passwd was given.
10202 if test "${enable_root_passwd+set}" = set; then :
10203   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
10204 else
10205   enable_root_passwd=yes
10206 fi
10207
10208 if test "$enable_root_passwd" = yes; then
10209   $as_echo "#define ALLOW_ROOT_PASSWD 1" >>confdefs.h
10210
10211   true
10212 elif test "$enable_root_passwd" != no; then
10213   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
10214   exit 1
10215 fi
10216
10217 ###############################################################################
10218 #
10219 #       Check for PAM.
10220 #
10221 ###############################################################################
10222
10223 case "$host" in
10224   *-solaris*)
10225    # Solaris systems tend to come with PAM misconfigured.
10226    #  Don't build it by default, even if the headers exist.
10227    with_pam_default=no
10228    ;;
10229   *)
10230    # Default to building PAM support on all other systems, if it exists.
10231    with_pam_default=yes
10232   ;;
10233 esac
10234
10235 have_pam=no
10236 with_pam_req=unspecified
10237
10238
10239 # Check whether --with-pam was given.
10240 if test "${with_pam+set}" = set; then :
10241   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
10242 else
10243   with_pam=$with_pam_default
10244 fi
10245
10246
10247
10248 # Check whether --with-pam_service_name was given.
10249 if test "${with_pam_service_name+set}" = set; then :
10250   withval=$with_pam_service_name; pam_service_name="$withval"
10251 else
10252   pam_service_name="xscreensaver"
10253 fi
10254
10255
10256 # Check whether --enable-pam-check-account-type was given.
10257 if test "${enable_pam_check_account_type+set}" = set; then :
10258   enableval=$enable_pam_check_account_type; enable_pam_check_account_type="$enableval"
10259 else
10260   enable_pam_check_account_type=no
10261 fi
10262
10263 if test "$enable_pam_check_account_type" = yes ; then
10264   $as_echo "#define PAM_CHECK_ACCOUNT_TYPE 1" >>confdefs.h
10265
10266   true
10267 elif test "$enable_pam_check_account_type" != no ; then
10268   echo "error: must be yes or no: --enable-pam-check-account-type=$enable_pam_check_account_type"
10269   exit 1
10270 fi
10271
10272
10273    case "$with_pam" in
10274     yes) ;;
10275     no)  ;;
10276
10277     /*)
10278      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM headers" >&5
10279 $as_echo_n "checking for PAM headers... " >&6; }
10280      d=$with_pam/include
10281      if test -d $d; then
10282        X_CFLAGS="-I$d $X_CFLAGS"
10283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10284 $as_echo "$d" >&6; }
10285      else
10286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10287 $as_echo "not found ($d: no such directory)" >&6; }
10288      fi
10289
10290      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM libs" >&5
10291 $as_echo_n "checking for PAM libs... " >&6; }
10292      d=$with_pam/lib
10293      if test -d $d; then
10294        X_LIBS="-L$d $X_LIBS"
10295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10296 $as_echo "$d" >&6; }
10297      else
10298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10299 $as_echo "not found ($d: no such directory)" >&6; }
10300      fi
10301
10302      # replace the directory string with "yes".
10303      with_pam_req="yes"
10304      with_pam=$with_pam_req
10305      ;;
10306
10307     *)
10308      echo ""
10309      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
10310      echo "       If it is a directory, then \`DIR/include' will be added to"
10311      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10312      exit 1
10313      ;;
10314    esac
10315
10316
10317 if test "$enable_locking" = yes -a "$with_pam" = yes; then
10318   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM" >&5
10319 $as_echo_n "checking for PAM... " >&6; }
10320 if ${ac_cv_pam+:} false; then :
10321   $as_echo_n "(cached) " >&6
10322 else
10323
10324   ac_save_CPPFLAGS="$CPPFLAGS"
10325   if test \! -z "$includedir" ; then
10326     CPPFLAGS="$CPPFLAGS -I$includedir"
10327   fi
10328   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10329   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10330   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10331 /* end confdefs.h.  */
10332 #include <security/pam_appl.h>
10333 int
10334 main ()
10335 {
10336
10337   ;
10338   return 0;
10339 }
10340 _ACEOF
10341 if ac_fn_c_try_compile "$LINENO"; then :
10342   ac_cv_pam=yes
10343 else
10344   ac_cv_pam=no
10345 fi
10346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10347   CPPFLAGS="$ac_save_CPPFLAGS"
10348 fi
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pam" >&5
10350 $as_echo "$ac_cv_pam" >&6; }
10351   if test "$ac_cv_pam" = yes ; then
10352     have_pam=yes
10353     $as_echo "#define HAVE_PAM 1" >>confdefs.h
10354
10355     cat >>confdefs.h <<_ACEOF
10356 #define PAM_SERVICE_NAME "$pam_service_name"
10357 _ACEOF
10358
10359
10360     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
10361
10362     # libpam typically requires dlopen and dlsym.  On FreeBSD,
10363     # those are in libc.  On Linux and Solaris, they're in libdl.
10364     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10365 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10366 if ${ac_cv_lib_dl_dlopen+:} false; then :
10367   $as_echo_n "(cached) " >&6
10368 else
10369   ac_check_lib_save_LIBS=$LIBS
10370 LIBS="-ldl  $LIBS"
10371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10372 /* end confdefs.h.  */
10373
10374 /* Override any GCC internal prototype to avoid an error.
10375    Use char because int might match the return type of a GCC
10376    builtin and then its argument prototype would still apply.  */
10377 #ifdef __cplusplus
10378 extern "C"
10379 #endif
10380 char dlopen ();
10381 int
10382 main ()
10383 {
10384 return dlopen ();
10385   ;
10386   return 0;
10387 }
10388 _ACEOF
10389 if ac_fn_c_try_link "$LINENO"; then :
10390   ac_cv_lib_dl_dlopen=yes
10391 else
10392   ac_cv_lib_dl_dlopen=no
10393 fi
10394 rm -f core conftest.err conftest.$ac_objext \
10395     conftest$ac_exeext conftest.$ac_ext
10396 LIBS=$ac_check_lib_save_LIBS
10397 fi
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10399 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10400 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10401   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
10402 fi
10403
10404
10405     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
10406     have_timedwait=no
10407     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lc" >&5
10408 $as_echo_n "checking for sigtimedwait in -lc... " >&6; }
10409 if ${ac_cv_lib_c_sigtimedwait+:} false; then :
10410   $as_echo_n "(cached) " >&6
10411 else
10412   ac_check_lib_save_LIBS=$LIBS
10413 LIBS="-lc  $LIBS"
10414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10415 /* end confdefs.h.  */
10416
10417 /* Override any GCC internal prototype to avoid an error.
10418    Use char because int might match the return type of a GCC
10419    builtin and then its argument prototype would still apply.  */
10420 #ifdef __cplusplus
10421 extern "C"
10422 #endif
10423 char sigtimedwait ();
10424 int
10425 main ()
10426 {
10427 return sigtimedwait ();
10428   ;
10429   return 0;
10430 }
10431 _ACEOF
10432 if ac_fn_c_try_link "$LINENO"; then :
10433   ac_cv_lib_c_sigtimedwait=yes
10434 else
10435   ac_cv_lib_c_sigtimedwait=no
10436 fi
10437 rm -f core conftest.err conftest.$ac_objext \
10438     conftest$ac_exeext conftest.$ac_ext
10439 LIBS=$ac_check_lib_save_LIBS
10440 fi
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigtimedwait" >&5
10442 $as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
10443 if test "x$ac_cv_lib_c_sigtimedwait" = xyes; then :
10444   have_timedwait=yes
10445                   $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
10446
10447 fi
10448
10449     if test "$have_timedwait" = no ; then
10450       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lrt" >&5
10451 $as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
10452 if ${ac_cv_lib_rt_sigtimedwait+:} false; then :
10453   $as_echo_n "(cached) " >&6
10454 else
10455   ac_check_lib_save_LIBS=$LIBS
10456 LIBS="-lrt  $LIBS"
10457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10458 /* end confdefs.h.  */
10459
10460 /* Override any GCC internal prototype to avoid an error.
10461    Use char because int might match the return type of a GCC
10462    builtin and then its argument prototype would still apply.  */
10463 #ifdef __cplusplus
10464 extern "C"
10465 #endif
10466 char sigtimedwait ();
10467 int
10468 main ()
10469 {
10470 return sigtimedwait ();
10471   ;
10472   return 0;
10473 }
10474 _ACEOF
10475 if ac_fn_c_try_link "$LINENO"; then :
10476   ac_cv_lib_rt_sigtimedwait=yes
10477 else
10478   ac_cv_lib_rt_sigtimedwait=no
10479 fi
10480 rm -f core conftest.err conftest.$ac_objext \
10481     conftest$ac_exeext conftest.$ac_ext
10482 LIBS=$ac_check_lib_save_LIBS
10483 fi
10484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sigtimedwait" >&5
10485 $as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
10486 if test "x$ac_cv_lib_rt_sigtimedwait" = xyes; then :
10487   have_timedwait=yes
10488                                       $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
10489
10490                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
10491 fi
10492
10493     fi
10494
10495     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call pam_strerror" >&5
10496 $as_echo_n "checking how to call pam_strerror... " >&6; }
10497     if ${ac_cv_pam_strerror_args+:} false; then :
10498   $as_echo_n "(cached) " >&6
10499 else
10500
10501   ac_save_CPPFLAGS="$CPPFLAGS"
10502   if test \! -z "$includedir" ; then
10503     CPPFLAGS="$CPPFLAGS -I$includedir"
10504   fi
10505   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10506   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10507   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10508 /* end confdefs.h.  */
10509 #include <stdio.h>
10510                         #include <stdlib.h>
10511                         #include <security/pam_appl.h>
10512 int
10513 main ()
10514 {
10515 pam_handle_t *pamh = 0;
10516                         char *s = pam_strerror(pamh, PAM_SUCCESS);
10517   ;
10518   return 0;
10519 }
10520 _ACEOF
10521 if ac_fn_c_try_compile "$LINENO"; then :
10522   ac_pam_strerror_args=2
10523 else
10524
10525   ac_save_CPPFLAGS="$CPPFLAGS"
10526   if test \! -z "$includedir" ; then
10527     CPPFLAGS="$CPPFLAGS -I$includedir"
10528   fi
10529   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10530   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10531   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10532 /* end confdefs.h.  */
10533 #include <stdio.h>
10534                                           #include <stdlib.h>
10535                                           #include <security/pam_appl.h>
10536 int
10537 main ()
10538 {
10539 char *s =
10540                                            pam_strerror(PAM_SUCCESS);
10541   ;
10542   return 0;
10543 }
10544 _ACEOF
10545 if ac_fn_c_try_compile "$LINENO"; then :
10546   ac_pam_strerror_args=1
10547 else
10548   ac_pam_strerror_args=0
10549 fi
10550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10551   CPPFLAGS="$ac_save_CPPFLAGS"
10552 fi
10553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10554   CPPFLAGS="$ac_save_CPPFLAGS"
10555       ac_cv_pam_strerror_args=$ac_pam_strerror_args
10556 fi
10557
10558     ac_pam_strerror_args=$ac_cv_pam_strerror_args
10559     if test "$ac_pam_strerror_args" = 1 ; then
10560       { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
10561 $as_echo "one argument" >&6; }
10562     elif test "$ac_pam_strerror_args" = 2 ; then
10563       $as_echo "#define PAM_STRERROR_TWO_ARGS 1" >>confdefs.h
10564
10565       { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
10566 $as_echo "two arguments" >&6; }
10567     else
10568       { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
10569 $as_echo "unknown" >&6; }
10570     fi
10571
10572 # Check pam_fail_delay
10573     { $as_echo "$as_me:${as_lineno-$LINENO}: checking pam_fail_delay in -lpam" >&5
10574 $as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
10575     if ${ac_cv_pam_fail_delay+:} false; then :
10576   $as_echo_n "(cached) " >&6
10577 else
10578   ac_save_LDFLAGS="$LDFLAGS"
10579       LDFLAGS="-lpam"
10580       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10581 /* end confdefs.h.  */
10582 #include <security/pam_appl.h>
10583 int
10584 main ()
10585 {
10586 pam_handle_t *pamh = 0;
10587                    unsigned int usec = 1;
10588                    int status = pam_fail_delay (pamh, usec);
10589   ;
10590   return 0;
10591 }
10592 _ACEOF
10593 if ac_fn_c_try_link "$LINENO"; then :
10594   ac_pam_fail_delay=yes
10595 else
10596   ac_pam_fail_delay=no
10597 fi
10598 rm -f core conftest.err conftest.$ac_objext \
10599     conftest$ac_exeext conftest.$ac_ext
10600       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
10601       LDFLAGS=$ac_save_LDFLAGS
10602 fi
10603
10604
10605       if test "$ac_pam_fail_delay" = yes ; then
10606         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10607 $as_echo "yes" >&6; }
10608         $as_echo "#define HAVE_PAM_FAIL_DELAY 1" >>confdefs.h
10609
10610       else
10611         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10612 $as_echo "no" >&6; }
10613       fi
10614
10615   fi
10616 fi
10617
10618
10619 ###############################################################################
10620 #
10621 #       Check for Kerberos.
10622 #
10623 ###############################################################################
10624
10625 have_kerberos=no
10626 have_kerberos5=no
10627 with_kerberos_req=unspecified
10628
10629
10630 # Check whether --with-kerberos was given.
10631 if test "${with_kerberos+set}" = set; then :
10632   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
10633 else
10634   with_kerberos=yes
10635 fi
10636
10637
10638
10639    case "$with_kerberos" in
10640     yes) ;;
10641     no)  ;;
10642
10643     /*)
10644      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos headers" >&5
10645 $as_echo_n "checking for Kerberos headers... " >&6; }
10646      d=$with_kerberos/include
10647      if test -d $d; then
10648        X_CFLAGS="-I$d $X_CFLAGS"
10649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10650 $as_echo "$d" >&6; }
10651      else
10652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10653 $as_echo "not found ($d: no such directory)" >&6; }
10654      fi
10655
10656      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos libs" >&5
10657 $as_echo_n "checking for Kerberos libs... " >&6; }
10658      d=$with_kerberos/lib
10659      if test -d $d; then
10660        X_LIBS="-L$d $X_LIBS"
10661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10662 $as_echo "$d" >&6; }
10663      else
10664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10665 $as_echo "not found ($d: no such directory)" >&6; }
10666      fi
10667
10668      # replace the directory string with "yes".
10669      with_kerberos_req="yes"
10670      with_kerberos=$with_kerberos_req
10671      ;;
10672
10673     *)
10674      echo ""
10675      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
10676      echo "       If it is a directory, then \`DIR/include' will be added to"
10677      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10678      exit 1
10679      ;;
10680    esac
10681
10682
10683 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
10684   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 4" >&5
10685 $as_echo_n "checking for Kerberos 4... " >&6; }
10686 if ${ac_cv_kerberos+:} false; then :
10687   $as_echo_n "(cached) " >&6
10688 else
10689
10690   ac_save_CPPFLAGS="$CPPFLAGS"
10691   if test \! -z "$includedir" ; then
10692     CPPFLAGS="$CPPFLAGS -I$includedir"
10693   fi
10694   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10695   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10697 /* end confdefs.h.  */
10698 #include <krb.h>
10699 int
10700 main ()
10701 {
10702
10703   ;
10704   return 0;
10705 }
10706 _ACEOF
10707 if ac_fn_c_try_compile "$LINENO"; then :
10708   ac_cv_kerberos=yes
10709 else
10710   ac_cv_kerberos=no
10711 fi
10712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10713   CPPFLAGS="$ac_save_CPPFLAGS"
10714 fi
10715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos" >&5
10716 $as_echo "$ac_cv_kerberos" >&6; }
10717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 5" >&5
10718 $as_echo_n "checking for Kerberos 5... " >&6; }
10719 if ${ac_cv_kerberos5+:} false; then :
10720   $as_echo_n "(cached) " >&6
10721 else
10722
10723   ac_save_CPPFLAGS="$CPPFLAGS"
10724   if test \! -z "$includedir" ; then
10725     CPPFLAGS="$CPPFLAGS -I$includedir"
10726   fi
10727   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10728   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10730 /* end confdefs.h.  */
10731 #include <kerberosIV/krb.h>
10732 int
10733 main ()
10734 {
10735
10736   ;
10737   return 0;
10738 }
10739 _ACEOF
10740 if ac_fn_c_try_compile "$LINENO"; then :
10741   ac_cv_kerberos5=yes
10742 else
10743   ac_cv_kerberos5=no
10744 fi
10745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10746   CPPFLAGS="$ac_save_CPPFLAGS"
10747 fi
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos5" >&5
10749 $as_echo "$ac_cv_kerberos5" >&6; }
10750
10751   if test "$ac_cv_kerberos" = yes ; then
10752     have_kerberos=yes
10753     $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10754
10755   fi
10756
10757   if test "$ac_cv_kerberos5" = yes ; then
10758
10759     # Andrew Snare <ajs@pigpond.com> wrote:
10760     #
10761     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
10762     # (krb4) was also available.  This turns out not to be the case with
10763     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
10764     # is optional.
10765     #
10766     # So, disable kerberosV support if libkrb4 can't be found.
10767     # This is not the best solution, but it makes the compile not fail.
10768     #
10769
10770   ac_save_CPPFLAGS="$CPPFLAGS"
10771   ac_save_LDFLAGS="$LDFLAGS"
10772 #  ac_save_LIBS="$LIBS"
10773
10774   if test \! -z "$includedir" ; then
10775     CPPFLAGS="$CPPFLAGS -I$includedir"
10776   fi
10777   # note: $X_CFLAGS includes $x_includes
10778   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10779
10780   if test \! -z "$libdir" ; then
10781     LDFLAGS="$LDFLAGS -L$libdir"
10782   fi
10783   # note: $X_LIBS includes $x_libraries
10784   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10785
10786   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10787   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10788   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_tf_realm in -lkrb4" >&5
10789 $as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
10790 if ${ac_cv_lib_krb4_krb_get_tf_realm+:} false; then :
10791   $as_echo_n "(cached) " >&6
10792 else
10793   ac_check_lib_save_LIBS=$LIBS
10794 LIBS="-lkrb4  $LIBS"
10795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10796 /* end confdefs.h.  */
10797
10798 /* Override any GCC internal prototype to avoid an error.
10799    Use char because int might match the return type of a GCC
10800    builtin and then its argument prototype would still apply.  */
10801 #ifdef __cplusplus
10802 extern "C"
10803 #endif
10804 char krb_get_tf_realm ();
10805 int
10806 main ()
10807 {
10808 return krb_get_tf_realm ();
10809   ;
10810   return 0;
10811 }
10812 _ACEOF
10813 if ac_fn_c_try_link "$LINENO"; then :
10814   ac_cv_lib_krb4_krb_get_tf_realm=yes
10815 else
10816   ac_cv_lib_krb4_krb_get_tf_realm=no
10817 fi
10818 rm -f core conftest.err conftest.$ac_objext \
10819     conftest$ac_exeext conftest.$ac_ext
10820 LIBS=$ac_check_lib_save_LIBS
10821 fi
10822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
10823 $as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
10824 if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = xyes; then :
10825   have_kerberos=yes
10826 else
10827   have_kerberos=no
10828 fi
10829
10830   CPPFLAGS="$ac_save_CPPFLAGS"
10831   LDFLAGS="$ac_save_LDFLAGS"
10832 #  LIBS="$ac_save_LIBS"
10833
10834     if test "$have_kerberos" = yes ; then
10835       have_kerberos5=yes
10836       $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10837
10838       $as_echo "#define HAVE_KERBEROS5 1" >>confdefs.h
10839
10840     else
10841       have_kerberos5=no
10842       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
10843 $as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
10844     fi
10845
10846   fi
10847
10848   if test "$have_kerberos5" = yes ; then
10849     # from Matt Knopp <mhat@infocalypse.netlag.com>
10850     # (who got it from amu@mit.edu)
10851
10852     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
10853
10854     # jwz: MacOS X uses -lkrb5, but not -lcrypt
10855
10856   ac_save_CPPFLAGS="$CPPFLAGS"
10857   ac_save_LDFLAGS="$LDFLAGS"
10858 #  ac_save_LIBS="$LIBS"
10859
10860   if test \! -z "$includedir" ; then
10861     CPPFLAGS="$CPPFLAGS -I$includedir"
10862   fi
10863   # note: $X_CFLAGS includes $x_includes
10864   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10865
10866   if test \! -z "$libdir" ; then
10867     LDFLAGS="$LDFLAGS -L$libdir"
10868   fi
10869   # note: $X_LIBS includes $x_libraries
10870   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10871
10872   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10873   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10874   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
10875 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
10876 if ${ac_cv_lib_crypt_crypt+:} false; then :
10877   $as_echo_n "(cached) " >&6
10878 else
10879   ac_check_lib_save_LIBS=$LIBS
10880 LIBS="-lcrypt  $LIBS"
10881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10882 /* end confdefs.h.  */
10883
10884 /* Override any GCC internal prototype to avoid an error.
10885    Use char because int might match the return type of a GCC
10886    builtin and then its argument prototype would still apply.  */
10887 #ifdef __cplusplus
10888 extern "C"
10889 #endif
10890 char crypt ();
10891 int
10892 main ()
10893 {
10894 return crypt ();
10895   ;
10896   return 0;
10897 }
10898 _ACEOF
10899 if ac_fn_c_try_link "$LINENO"; then :
10900   ac_cv_lib_crypt_crypt=yes
10901 else
10902   ac_cv_lib_crypt_crypt=no
10903 fi
10904 rm -f core conftest.err conftest.$ac_objext \
10905     conftest$ac_exeext conftest.$ac_ext
10906 LIBS=$ac_check_lib_save_LIBS
10907 fi
10908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
10909 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
10910 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
10911   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
10912 fi
10913
10914   CPPFLAGS="$ac_save_CPPFLAGS"
10915   LDFLAGS="$ac_save_LDFLAGS"
10916 #  LIBS="$ac_save_LIBS"
10917
10918
10919   elif test "$have_kerberos" = yes ; then
10920     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
10921     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
10922   fi
10923
10924   if test "$have_kerberos" = yes ; then
10925     ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
10926 if test "x$ac_cv_func_res_search" = xyes; then :
10927
10928 else
10929   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
10930 $as_echo_n "checking for res_search in -lresolv... " >&6; }
10931 if ${ac_cv_lib_resolv_res_search+:} false; then :
10932   $as_echo_n "(cached) " >&6
10933 else
10934   ac_check_lib_save_LIBS=$LIBS
10935 LIBS="-lresolv  $LIBS"
10936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10937 /* end confdefs.h.  */
10938
10939 /* Override any GCC internal prototype to avoid an error.
10940    Use char because int might match the return type of a GCC
10941    builtin and then its argument prototype would still apply.  */
10942 #ifdef __cplusplus
10943 extern "C"
10944 #endif
10945 char res_search ();
10946 int
10947 main ()
10948 {
10949 return res_search ();
10950   ;
10951   return 0;
10952 }
10953 _ACEOF
10954 if ac_fn_c_try_link "$LINENO"; then :
10955   ac_cv_lib_resolv_res_search=yes
10956 else
10957   ac_cv_lib_resolv_res_search=no
10958 fi
10959 rm -f core conftest.err conftest.$ac_objext \
10960     conftest$ac_exeext conftest.$ac_ext
10961 LIBS=$ac_check_lib_save_LIBS
10962 fi
10963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
10964 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
10965 if test "x$ac_cv_lib_resolv_res_search" = xyes; then :
10966   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
10967 else
10968   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
10969 $as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
10970
10971 fi
10972
10973 fi
10974
10975   fi
10976 fi
10977
10978
10979 ###############################################################################
10980 #
10981 #       Check for the nine billion variants of shadow passwords...
10982 #
10983 ###############################################################################
10984
10985 need_setuid=no
10986
10987 have_shadow=no
10988 with_shadow_req=unspecified
10989
10990
10991 # Check whether --with-shadow was given.
10992 if test "${with_shadow+set}" = set; then :
10993   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
10994 else
10995   with_shadow=yes
10996 fi
10997
10998
10999
11000    case "$with_shadow" in
11001     yes) ;;
11002     no)  ;;
11003
11004     /*)
11005      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password headers" >&5
11006 $as_echo_n "checking for shadow password headers... " >&6; }
11007      d=$with_shadow/include
11008      if test -d $d; then
11009        X_CFLAGS="-I$d $X_CFLAGS"
11010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11011 $as_echo "$d" >&6; }
11012      else
11013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11014 $as_echo "not found ($d: no such directory)" >&6; }
11015      fi
11016
11017      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password libs" >&5
11018 $as_echo_n "checking for shadow password libs... " >&6; }
11019      d=$with_shadow/lib
11020      if test -d $d; then
11021        X_LIBS="-L$d $X_LIBS"
11022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11023 $as_echo "$d" >&6; }
11024      else
11025        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11026 $as_echo "not found ($d: no such directory)" >&6; }
11027      fi
11028
11029      # replace the directory string with "yes".
11030      with_shadow_req="yes"
11031      with_shadow=$with_shadow_req
11032      ;;
11033
11034     *)
11035      echo ""
11036      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
11037      echo "       If it is a directory, then \`DIR/include' will be added to"
11038      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11039      exit 1
11040      ;;
11041    esac
11042
11043
11044 if test "$enable_locking" = no ; then
11045   with_shadow_req=no
11046   with_shadow=no
11047 fi
11048
11049
11050 ###############################################################################
11051 #
11052 #       Check for Sun "adjunct" passwords.
11053 #
11054 ###############################################################################
11055
11056 if test "$with_shadow" = yes ; then
11057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sun-style shadow passwords" >&5
11058 $as_echo_n "checking for Sun-style shadow passwords... " >&6; }
11059 if ${ac_cv_sun_adjunct+:} false; then :
11060   $as_echo_n "(cached) " >&6
11061 else
11062
11063   ac_save_CPPFLAGS="$CPPFLAGS"
11064   if test \! -z "$includedir" ; then
11065     CPPFLAGS="$CPPFLAGS -I$includedir"
11066   fi
11067   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11068   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11070 /* end confdefs.h.  */
11071 #include <stdlib.h>
11072                                     #include <unistd.h>
11073                                     #include <sys/types.h>
11074                                     #include <sys/label.h>
11075                                     #include <sys/audit.h>
11076                                     #include <pwdadj.h>
11077 int
11078 main ()
11079 {
11080 struct passwd_adjunct *p = getpwanam("nobody");
11081                        const char *pw = p->pwa_passwd;
11082   ;
11083   return 0;
11084 }
11085 _ACEOF
11086 if ac_fn_c_try_compile "$LINENO"; then :
11087   ac_cv_sun_adjunct=yes
11088 else
11089   ac_cv_sun_adjunct=no
11090 fi
11091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11092   CPPFLAGS="$ac_save_CPPFLAGS"
11093 fi
11094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sun_adjunct" >&5
11095 $as_echo "$ac_cv_sun_adjunct" >&6; }
11096   if test "$ac_cv_sun_adjunct" = yes; then
11097     have_shadow_adjunct=yes
11098     have_shadow=yes
11099     need_setuid=yes
11100   fi
11101 fi
11102
11103
11104 ###############################################################################
11105 #
11106 #       Check for DEC and SCO so-called "enhanced" security.
11107 #
11108 ###############################################################################
11109
11110 if test "$with_shadow" = yes ; then
11111   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DEC-style shadow passwords" >&5
11112 $as_echo_n "checking for DEC-style shadow passwords... " >&6; }
11113 if ${ac_cv_enhanced_passwd+:} false; then :
11114   $as_echo_n "(cached) " >&6
11115 else
11116
11117   ac_save_CPPFLAGS="$CPPFLAGS"
11118   if test \! -z "$includedir" ; then
11119     CPPFLAGS="$CPPFLAGS -I$includedir"
11120   fi
11121   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11122   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11124 /* end confdefs.h.  */
11125 #include <stdlib.h>
11126                                     #include <unistd.h>
11127                                     #include <sys/types.h>
11128                                     #include <pwd.h>
11129                                     #include <sys/security.h>
11130                                     #include <prot.h>
11131 int
11132 main ()
11133 {
11134 struct pr_passwd *p;
11135                        const char *pw;
11136                        set_auth_parameters(0, 0);
11137                        check_auth_parameters();
11138                        p = getprpwnam("nobody");
11139                        pw = p->ufld.fd_encrypt;
11140   ;
11141   return 0;
11142 }
11143 _ACEOF
11144 if ac_fn_c_try_compile "$LINENO"; then :
11145   ac_cv_enhanced_passwd=yes
11146 else
11147   ac_cv_enhanced_passwd=no
11148 fi
11149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11150   CPPFLAGS="$ac_save_CPPFLAGS"
11151 fi
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enhanced_passwd" >&5
11153 $as_echo "$ac_cv_enhanced_passwd" >&6; }
11154   if test $ac_cv_enhanced_passwd = yes; then
11155     have_shadow_enhanced=yes
11156     have_shadow=yes
11157     need_setuid=yes
11158
11159     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
11160     # (I'm told it needs -lcurses too, but I don't understand why.)
11161     # But on DEC, it's in -lsecurity.
11162     #
11163     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lprot" >&5
11164 $as_echo_n "checking for getprpwnam in -lprot... " >&6; }
11165 if ${ac_cv_lib_prot_getprpwnam+:} false; then :
11166   $as_echo_n "(cached) " >&6
11167 else
11168   ac_check_lib_save_LIBS=$LIBS
11169 LIBS="-lprot -lx $LIBS"
11170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11171 /* end confdefs.h.  */
11172
11173 /* Override any GCC internal prototype to avoid an error.
11174    Use char because int might match the return type of a GCC
11175    builtin and then its argument prototype would still apply.  */
11176 #ifdef __cplusplus
11177 extern "C"
11178 #endif
11179 char getprpwnam ();
11180 int
11181 main ()
11182 {
11183 return getprpwnam ();
11184   ;
11185   return 0;
11186 }
11187 _ACEOF
11188 if ac_fn_c_try_link "$LINENO"; then :
11189   ac_cv_lib_prot_getprpwnam=yes
11190 else
11191   ac_cv_lib_prot_getprpwnam=no
11192 fi
11193 rm -f core conftest.err conftest.$ac_objext \
11194     conftest$ac_exeext conftest.$ac_ext
11195 LIBS=$ac_check_lib_save_LIBS
11196 fi
11197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getprpwnam" >&5
11198 $as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
11199 if test "x$ac_cv_lib_prot_getprpwnam" = xyes; then :
11200   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
11201 else
11202   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lsecurity" >&5
11203 $as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
11204 if ${ac_cv_lib_security_getprpwnam+:} false; then :
11205   $as_echo_n "(cached) " >&6
11206 else
11207   ac_check_lib_save_LIBS=$LIBS
11208 LIBS="-lsecurity  $LIBS"
11209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11210 /* end confdefs.h.  */
11211
11212 /* Override any GCC internal prototype to avoid an error.
11213    Use char because int might match the return type of a GCC
11214    builtin and then its argument prototype would still apply.  */
11215 #ifdef __cplusplus
11216 extern "C"
11217 #endif
11218 char getprpwnam ();
11219 int
11220 main ()
11221 {
11222 return getprpwnam ();
11223   ;
11224   return 0;
11225 }
11226 _ACEOF
11227 if ac_fn_c_try_link "$LINENO"; then :
11228   ac_cv_lib_security_getprpwnam=yes
11229 else
11230   ac_cv_lib_security_getprpwnam=no
11231 fi
11232 rm -f core conftest.err conftest.$ac_objext \
11233     conftest$ac_exeext conftest.$ac_ext
11234 LIBS=$ac_check_lib_save_LIBS
11235 fi
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_getprpwnam" >&5
11237 $as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
11238 if test "x$ac_cv_lib_security_getprpwnam" = xyes; then :
11239   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
11240 fi
11241
11242 fi
11243
11244   fi
11245 fi
11246
11247 ###############################################################################
11248 #
11249 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
11250 #
11251 ###############################################################################
11252
11253 if test "$with_shadow" = yes ; then
11254   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HP-style shadow passwords" >&5
11255 $as_echo_n "checking for HP-style shadow passwords... " >&6; }
11256 if ${ac_cv_hpux_passwd+:} false; then :
11257   $as_echo_n "(cached) " >&6
11258 else
11259
11260   ac_save_CPPFLAGS="$CPPFLAGS"
11261   if test \! -z "$includedir" ; then
11262     CPPFLAGS="$CPPFLAGS -I$includedir"
11263   fi
11264   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11265   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11267 /* end confdefs.h.  */
11268 #include <stdlib.h>
11269                                     #include <unistd.h>
11270                                     #include <sys/types.h>
11271                                     #include <pwd.h>
11272                                     #include <hpsecurity.h>
11273                                     #include <prot.h>
11274 int
11275 main ()
11276 {
11277 struct s_passwd *p = getspwnam("nobody");
11278                        const char *pw = p->pw_passwd;
11279   ;
11280   return 0;
11281 }
11282 _ACEOF
11283 if ac_fn_c_try_compile "$LINENO"; then :
11284   ac_cv_hpux_passwd=yes
11285 else
11286   ac_cv_hpux_passwd=no
11287 fi
11288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11289   CPPFLAGS="$ac_save_CPPFLAGS"
11290 fi
11291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_hpux_passwd" >&5
11292 $as_echo "$ac_cv_hpux_passwd" >&6; }
11293   if test "$ac_cv_hpux_passwd" = yes; then
11294     have_shadow_hpux=yes
11295     have_shadow=yes
11296     need_setuid=yes
11297
11298     # on HPUX, bigcrypt is in -lsec
11299     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsec" >&5
11300 $as_echo_n "checking for bigcrypt in -lsec... " >&6; }
11301 if ${ac_cv_lib_sec_bigcrypt+:} false; then :
11302   $as_echo_n "(cached) " >&6
11303 else
11304   ac_check_lib_save_LIBS=$LIBS
11305 LIBS="-lsec  $LIBS"
11306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11307 /* end confdefs.h.  */
11308
11309 /* Override any GCC internal prototype to avoid an error.
11310    Use char because int might match the return type of a GCC
11311    builtin and then its argument prototype would still apply.  */
11312 #ifdef __cplusplus
11313 extern "C"
11314 #endif
11315 char bigcrypt ();
11316 int
11317 main ()
11318 {
11319 return bigcrypt ();
11320   ;
11321   return 0;
11322 }
11323 _ACEOF
11324 if ac_fn_c_try_link "$LINENO"; then :
11325   ac_cv_lib_sec_bigcrypt=yes
11326 else
11327   ac_cv_lib_sec_bigcrypt=no
11328 fi
11329 rm -f core conftest.err conftest.$ac_objext \
11330     conftest$ac_exeext conftest.$ac_ext
11331 LIBS=$ac_check_lib_save_LIBS
11332 fi
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_bigcrypt" >&5
11334 $as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
11335 if test "x$ac_cv_lib_sec_bigcrypt" = xyes; then :
11336   PASSWD_LIBS="$PASSWD_LIBS -lsec"
11337 fi
11338
11339   fi
11340 fi
11341
11342
11343 ###############################################################################
11344 #
11345 #       Check for FreeBSD-style shadow passwords.
11346 #
11347 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
11348 #       password systems -- except you only get stuff in the pw_passwd field
11349 #       if the running program is setuid.  So, guess that we've got this
11350 #       lossage to contend with if /etc/master.passwd exists, and default to
11351 #       a setuid installation.
11352 #
11353 ###############################################################################
11354
11355 if test "$with_shadow" = yes ; then
11356   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeBSD-style shadow passwords" >&5
11357 $as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
11358 if ${ac_cv_master_passwd+:} false; then :
11359   $as_echo_n "(cached) " >&6
11360 else
11361   if test -f /etc/master.passwd ; then
11362                     ac_cv_master_passwd=yes
11363                   else
11364                     ac_cv_master_passwd=no
11365                   fi
11366 fi
11367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_master_passwd" >&5
11368 $as_echo "$ac_cv_master_passwd" >&6; }
11369   if test "$ac_cv_master_passwd" = yes; then
11370     need_setuid=yes
11371   fi
11372 fi
11373
11374
11375 ###############################################################################
11376 #
11377 #       Check for traditional (ha!) shadow passwords.
11378 #
11379 ###############################################################################
11380
11381 if test "$with_shadow" = yes ; then
11382   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic shadow passwords" >&5
11383 $as_echo_n "checking for generic shadow passwords... " >&6; }
11384 if ${ac_cv_shadow+:} false; then :
11385   $as_echo_n "(cached) " >&6
11386 else
11387
11388   ac_save_CPPFLAGS="$CPPFLAGS"
11389   if test \! -z "$includedir" ; then
11390     CPPFLAGS="$CPPFLAGS -I$includedir"
11391   fi
11392   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11393   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11395 /* end confdefs.h.  */
11396 #include <stdlib.h>
11397                                     #include <unistd.h>
11398                                     #include <sys/types.h>
11399                                     #include <pwd.h>
11400                                     #include <shadow.h>
11401 int
11402 main ()
11403 {
11404 struct spwd *p = getspnam("nobody");
11405                        const char *pw = p->sp_pwdp;
11406   ;
11407   return 0;
11408 }
11409 _ACEOF
11410 if ac_fn_c_try_compile "$LINENO"; then :
11411   ac_cv_shadow=yes
11412 else
11413   ac_cv_shadow=no
11414 fi
11415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11416   CPPFLAGS="$ac_save_CPPFLAGS"
11417 fi
11418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_shadow" >&5
11419 $as_echo "$ac_cv_shadow" >&6; }
11420   if test "$ac_cv_shadow" = yes; then
11421     have_shadow=yes
11422     need_setuid=yes
11423
11424     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
11425     have_getspnam=no
11426     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lc" >&5
11427 $as_echo_n "checking for getspnam in -lc... " >&6; }
11428 if ${ac_cv_lib_c_getspnam+:} false; then :
11429   $as_echo_n "(cached) " >&6
11430 else
11431   ac_check_lib_save_LIBS=$LIBS
11432 LIBS="-lc  $LIBS"
11433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11434 /* end confdefs.h.  */
11435
11436 /* Override any GCC internal prototype to avoid an error.
11437    Use char because int might match the return type of a GCC
11438    builtin and then its argument prototype would still apply.  */
11439 #ifdef __cplusplus
11440 extern "C"
11441 #endif
11442 char getspnam ();
11443 int
11444 main ()
11445 {
11446 return getspnam ();
11447   ;
11448   return 0;
11449 }
11450 _ACEOF
11451 if ac_fn_c_try_link "$LINENO"; then :
11452   ac_cv_lib_c_getspnam=yes
11453 else
11454   ac_cv_lib_c_getspnam=no
11455 fi
11456 rm -f core conftest.err conftest.$ac_objext \
11457     conftest$ac_exeext conftest.$ac_ext
11458 LIBS=$ac_check_lib_save_LIBS
11459 fi
11460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_getspnam" >&5
11461 $as_echo "$ac_cv_lib_c_getspnam" >&6; }
11462 if test "x$ac_cv_lib_c_getspnam" = xyes; then :
11463   have_getspnam=yes
11464 fi
11465
11466     if test "$have_getspnam" = no ; then
11467       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
11468 $as_echo_n "checking for getspnam in -lgen... " >&6; }
11469 if ${ac_cv_lib_gen_getspnam+:} false; then :
11470   $as_echo_n "(cached) " >&6
11471 else
11472   ac_check_lib_save_LIBS=$LIBS
11473 LIBS="-lgen  $LIBS"
11474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11475 /* end confdefs.h.  */
11476
11477 /* Override any GCC internal prototype to avoid an error.
11478    Use char because int might match the return type of a GCC
11479    builtin and then its argument prototype would still apply.  */
11480 #ifdef __cplusplus
11481 extern "C"
11482 #endif
11483 char getspnam ();
11484 int
11485 main ()
11486 {
11487 return getspnam ();
11488   ;
11489   return 0;
11490 }
11491 _ACEOF
11492 if ac_fn_c_try_link "$LINENO"; then :
11493   ac_cv_lib_gen_getspnam=yes
11494 else
11495   ac_cv_lib_gen_getspnam=no
11496 fi
11497 rm -f core conftest.err conftest.$ac_objext \
11498     conftest$ac_exeext conftest.$ac_ext
11499 LIBS=$ac_check_lib_save_LIBS
11500 fi
11501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
11502 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
11503 if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
11504   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
11505 fi
11506
11507     fi
11508   fi
11509 fi
11510
11511
11512 ###############################################################################
11513 #
11514 #       Check for other libraries needed for non-shadow passwords.
11515 #
11516 ###############################################################################
11517
11518 if test "$enable_locking" = yes ; then
11519
11520   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
11521   have_crypt=no
11522   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lc" >&5
11523 $as_echo_n "checking for crypt in -lc... " >&6; }
11524 if ${ac_cv_lib_c_crypt+:} false; then :
11525   $as_echo_n "(cached) " >&6
11526 else
11527   ac_check_lib_save_LIBS=$LIBS
11528 LIBS="-lc  $LIBS"
11529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11530 /* end confdefs.h.  */
11531
11532 /* Override any GCC internal prototype to avoid an error.
11533    Use char because int might match the return type of a GCC
11534    builtin and then its argument prototype would still apply.  */
11535 #ifdef __cplusplus
11536 extern "C"
11537 #endif
11538 char crypt ();
11539 int
11540 main ()
11541 {
11542 return crypt ();
11543   ;
11544   return 0;
11545 }
11546 _ACEOF
11547 if ac_fn_c_try_link "$LINENO"; then :
11548   ac_cv_lib_c_crypt=yes
11549 else
11550   ac_cv_lib_c_crypt=no
11551 fi
11552 rm -f core conftest.err conftest.$ac_objext \
11553     conftest$ac_exeext conftest.$ac_ext
11554 LIBS=$ac_check_lib_save_LIBS
11555 fi
11556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_crypt" >&5
11557 $as_echo "$ac_cv_lib_c_crypt" >&6; }
11558 if test "x$ac_cv_lib_c_crypt" = xyes; then :
11559   have_crypt=yes
11560 fi
11561
11562   if test "$have_crypt" = no ; then
11563     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11564 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
11565 if ${ac_cv_lib_crypt_crypt+:} false; then :
11566   $as_echo_n "(cached) " >&6
11567 else
11568   ac_check_lib_save_LIBS=$LIBS
11569 LIBS="-lcrypt  $LIBS"
11570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11571 /* end confdefs.h.  */
11572
11573 /* Override any GCC internal prototype to avoid an error.
11574    Use char because int might match the return type of a GCC
11575    builtin and then its argument prototype would still apply.  */
11576 #ifdef __cplusplus
11577 extern "C"
11578 #endif
11579 char crypt ();
11580 int
11581 main ()
11582 {
11583 return crypt ();
11584   ;
11585   return 0;
11586 }
11587 _ACEOF
11588 if ac_fn_c_try_link "$LINENO"; then :
11589   ac_cv_lib_crypt_crypt=yes
11590 else
11591   ac_cv_lib_crypt_crypt=no
11592 fi
11593 rm -f core conftest.err conftest.$ac_objext \
11594     conftest$ac_exeext conftest.$ac_ext
11595 LIBS=$ac_check_lib_save_LIBS
11596 fi
11597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
11598 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11599 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
11600   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11601 fi
11602
11603   fi
11604 fi
11605
11606
11607 # Most of the above shadow mechanisms will have set need_setuid to yes,
11608 # if they were found.  But, on some systems, we need setuid even when
11609 # using plain old vanilla passwords.
11610 #
11611 if test "$enable_locking" = yes ; then
11612   case "$host" in
11613     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
11614       need_setuid=yes
11615     ;;
11616   esac
11617 fi
11618
11619
11620 if test "$have_shadow_adjunct" = yes ; then
11621   $as_echo "#define HAVE_ADJUNCT_PASSWD 1" >>confdefs.h
11622
11623 elif test "$have_shadow_enhanced" = yes ; then
11624   $as_echo "#define HAVE_ENHANCED_PASSWD 1" >>confdefs.h
11625
11626 elif test "$have_shadow_hpux" = yes ; then
11627   $as_echo "#define HAVE_HPUX_PASSWD 1" >>confdefs.h
11628
11629 elif test "$have_shadow" = yes ; then
11630   $as_echo "#define HAVE_SHADOW_PASSWD 1" >>confdefs.h
11631
11632 fi
11633
11634
11635 ###############################################################################
11636 #
11637 #       Check for external password helper
11638 #       On SuSE, instead of having xscreensaver be a setuid program, they
11639 #       fork an external program that takes the password on stdin, and
11640 #       returns true if that password is a valid one.  Then only that
11641 #       smaller program needs to be setuid.
11642 #
11643 #       (Note that this external program is not a GUI: the GUI is still
11644 #       all in xscreensaver itself; the external program just does auth.)
11645 #
11646 ###############################################################################
11647
11648 have_passwd_helper=no
11649 with_passwd_helper_req=unspecified
11650
11651
11652 # Check whether --with-passwd-helper was given.
11653 if test "${with_passwd_helper+set}" = set; then :
11654   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
11655 else
11656   with_passwd_helper=no
11657 fi
11658
11659 # no HANDLE_X_PATH_ARG for this one
11660
11661 if test "$enable_locking" = no ; then
11662   with_passwd_helper_req=no
11663   with_passwd_helper=no
11664 fi
11665
11666 case "$with_passwd_helper" in
11667   ""|no) : ;;
11668   /*)
11669     cat >>confdefs.h <<_ACEOF
11670 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
11671 _ACEOF
11672
11673     have_passwd_helper=yes;;
11674   *)
11675     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
11676     exit 1
11677 esac
11678
11679
11680 ###############################################################################
11681 #
11682 #       Check for a login manager for a "New Login" button on the lock dialog.
11683 #       Usually this will be "/usr/bin/gdmflexiserver".
11684 #
11685 ###############################################################################
11686
11687 with_login_manager_req=unspecified
11688 default_login_manager_1='gdmflexiserver -ls'
11689 default_login_manager_2='kdmctl reserve'
11690
11691
11692 # Check whether --with-login-manager was given.
11693 if test "${with_login_manager+set}" = set; then :
11694   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
11695 else
11696   with_login_manager=yes
11697 fi
11698
11699 # no HANDLE_X_PATH_ARG for this one
11700
11701 if test "$enable_locking" = no ; then
11702   with_login_manager_req=no
11703   with_login_manager=no
11704 fi
11705
11706 case "$with_login_manager_req" in
11707   no)
11708     with_login_manager=""
11709   ;;
11710
11711   yes|unspecified)
11712     # Try both defaults, use the one that exists.
11713
11714     set dummy $default_login_manager_1 ; login_manager_tmp=$2
11715     unset ac_cv_path_login_manager_tmp  # don't cache
11716     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11717 set dummy $login_manager_tmp; ac_word=$2
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11719 $as_echo_n "checking for $ac_word... " >&6; }
11720 if ${ac_cv_path_login_manager_tmp+:} false; then :
11721   $as_echo_n "(cached) " >&6
11722 else
11723   case $login_manager_tmp in
11724   [\\/]* | ?:[\\/]*)
11725   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11726   ;;
11727   *)
11728   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11729 for as_dir in $PATH
11730 do
11731   IFS=$as_save_IFS
11732   test -z "$as_dir" && as_dir=.
11733     for ac_exec_ext in '' $ac_executable_extensions; do
11734   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11735     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11737     break 2
11738   fi
11739 done
11740   done
11741 IFS=$as_save_IFS
11742
11743   ;;
11744 esac
11745 fi
11746 login_manager_tmp=$ac_cv_path_login_manager_tmp
11747 if test -n "$login_manager_tmp"; then
11748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11749 $as_echo "$login_manager_tmp" >&6; }
11750 else
11751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11752 $as_echo "no" >&6; }
11753 fi
11754
11755
11756     if test ! -z "$login_manager_tmp" ; then
11757       with_login_manager="$default_login_manager_1"
11758     else
11759       set dummy $default_login_manager_2 ; login_manager_tmp=$2
11760       unset ac_cv_path_login_manager_tmp  # don't cache
11761       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11762 set dummy $login_manager_tmp; ac_word=$2
11763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11764 $as_echo_n "checking for $ac_word... " >&6; }
11765 if ${ac_cv_path_login_manager_tmp+:} false; then :
11766   $as_echo_n "(cached) " >&6
11767 else
11768   case $login_manager_tmp in
11769   [\\/]* | ?:[\\/]*)
11770   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11771   ;;
11772   *)
11773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11774 for as_dir in $PATH
11775 do
11776   IFS=$as_save_IFS
11777   test -z "$as_dir" && as_dir=.
11778     for ac_exec_ext in '' $ac_executable_extensions; do
11779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11780     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11782     break 2
11783   fi
11784 done
11785   done
11786 IFS=$as_save_IFS
11787
11788   ;;
11789 esac
11790 fi
11791 login_manager_tmp=$ac_cv_path_login_manager_tmp
11792 if test -n "$login_manager_tmp"; then
11793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11794 $as_echo "$login_manager_tmp" >&6; }
11795 else
11796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11797 $as_echo "no" >&6; }
11798 fi
11799
11800
11801       if test ! -z "$login_manager_tmp" ; then
11802         with_login_manager="$default_login_manager_2"
11803       else
11804         with_login_manager=""
11805       fi
11806     fi
11807   ;;
11808
11809   /*)
11810     # absolute path specified on cmd line
11811     set dummy $with_login_manager_req ; login_manager_tmp=$2
11812     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $login_manager_tmp" >&5
11813 $as_echo_n "checking for $login_manager_tmp... " >&6; }
11814     if test -x "$login_manager_tmp" ; then
11815       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11816 $as_echo "yes" >&6; }
11817     else
11818       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11819 $as_echo "no" >&6; }
11820       with_login_manager=""
11821     fi
11822   ;;
11823
11824   *)
11825     # relative path specified on cmd line
11826     set dummy $with_login_manager_req ; login_manager_tmp=$2
11827     unset ac_cv_path_login_manager_tmp    # don't cache
11828     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11829 set dummy $login_manager_tmp; ac_word=$2
11830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11831 $as_echo_n "checking for $ac_word... " >&6; }
11832 if ${ac_cv_path_login_manager_tmp+:} false; then :
11833   $as_echo_n "(cached) " >&6
11834 else
11835   case $login_manager_tmp in
11836   [\\/]* | ?:[\\/]*)
11837   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11838   ;;
11839   *)
11840   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11841 for as_dir in $PATH
11842 do
11843   IFS=$as_save_IFS
11844   test -z "$as_dir" && as_dir=.
11845     for ac_exec_ext in '' $ac_executable_extensions; do
11846   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11847     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11848     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11849     break 2
11850   fi
11851 done
11852   done
11853 IFS=$as_save_IFS
11854
11855   ;;
11856 esac
11857 fi
11858 login_manager_tmp=$ac_cv_path_login_manager_tmp
11859 if test -n "$login_manager_tmp"; then
11860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11861 $as_echo "$login_manager_tmp" >&6; }
11862 else
11863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11864 $as_echo "no" >&6; }
11865 fi
11866
11867
11868     if test -z "$login_manager_tmp" ; then
11869       with_login_manager=""
11870     else
11871       with_login_manager="$login_manager_tmp"
11872     fi
11873   ;;
11874 esac
11875 ac_cv_login_manager_program="$with_login_manager"
11876
11877 NEW_LOGIN_COMMAND_P=''
11878 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
11879
11880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for login manager" >&5
11881 $as_echo_n "checking for login manager... " >&6; }
11882 if test -z "$NEW_LOGIN_COMMAND" ; then
11883   NEW_LOGIN_COMMAND="$default_login_manager_1"
11884   NEW_LOGIN_COMMAND_P='! '
11885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND (disabled)" >&5
11886 $as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
11887 else
11888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND" >&5
11889 $as_echo "$NEW_LOGIN_COMMAND" >&6; }
11890 fi
11891
11892
11893 ###############################################################################
11894 #
11895 #       Check for -lgtk (and Gnome stuff)
11896 #
11897 ###############################################################################
11898
11899 have_gtk=no
11900 with_gtk_req=unspecified
11901
11902 # Check whether --with-gtk was given.
11903 if test "${with_gtk+set}" = set; then :
11904   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
11905 else
11906   with_gtk=yes
11907 fi
11908
11909
11910 # if --with-gtk=/directory/ was specified, remember that directory so that
11911 # we can also look for the `gtk-config' program in that directory.
11912 case "$with_gtk" in
11913   /*)
11914     gtk_dir="$with_gtk"
11915     ;;
11916   *)
11917     gtk_dir=""
11918     ;;
11919 esac
11920
11921
11922    case "$with_gtk" in
11923     yes) ;;
11924     no)  ;;
11925
11926     /*)
11927      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk headers" >&5
11928 $as_echo_n "checking for Gtk headers... " >&6; }
11929      d=$with_gtk/include
11930      if test -d $d; then
11931        X_CFLAGS="-I$d $X_CFLAGS"
11932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11933 $as_echo "$d" >&6; }
11934      else
11935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11936 $as_echo "not found ($d: no such directory)" >&6; }
11937      fi
11938
11939      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
11940 $as_echo_n "checking for Gtk libs... " >&6; }
11941      d=$with_gtk/lib
11942      if test -d $d; then
11943        X_LIBS="-L$d $X_LIBS"
11944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11945 $as_echo "$d" >&6; }
11946      else
11947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11948 $as_echo "not found ($d: no such directory)" >&6; }
11949      fi
11950
11951      # replace the directory string with "yes".
11952      with_gtk_req="yes"
11953      with_gtk=$with_gtk_req
11954      ;;
11955
11956     *)
11957      echo ""
11958      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
11959      echo "       If it is a directory, then \`DIR/include' will be added to"
11960      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11961      exit 1
11962      ;;
11963    esac
11964
11965
11966 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
11967   echo "error: must be yes or no: --with-gtk=$with_gtk"
11968   exit 1
11969 fi
11970
11971
11972 parse_gtk_version_string() {
11973   # M4 sucks!!
11974
11975   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
11976   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
11977
11978   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
11979   if test -z "$ac_gtk_version"; then
11980     ac_gtk_version=unknown
11981     ac_gtk_version_string=unknown
11982   fi
11983 }
11984
11985 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
11986 # if the user specified --with-gtk=/foo/ then look there.
11987 #
11988 gtk_path="$PATH"
11989 if test ! -z "$gtk_dir"; then
11990   # canonicalize slashes.
11991   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
11992   gtk_path="$foo:$gtk_path"
11993 fi
11994
11995 for ac_prog in pkg-config
11996 do
11997   # Extract the first word of "$ac_prog", so it can be a program name with args.
11998 set dummy $ac_prog; ac_word=$2
11999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12000 $as_echo_n "checking for $ac_word... " >&6; }
12001 if ${ac_cv_path_pkg_config+:} false; then :
12002   $as_echo_n "(cached) " >&6
12003 else
12004   case $pkg_config in
12005   [\\/]* | ?:[\\/]*)
12006   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
12007   ;;
12008   *)
12009   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12010 for as_dir in $gtk_path
12011 do
12012   IFS=$as_save_IFS
12013   test -z "$as_dir" && as_dir=.
12014     for ac_exec_ext in '' $ac_executable_extensions; do
12015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12016     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
12017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12018     break 2
12019   fi
12020 done
12021   done
12022 IFS=$as_save_IFS
12023
12024   ;;
12025 esac
12026 fi
12027 pkg_config=$ac_cv_path_pkg_config
12028 if test -n "$pkg_config"; then
12029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config" >&5
12030 $as_echo "$pkg_config" >&6; }
12031 else
12032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12033 $as_echo "no" >&6; }
12034 fi
12035
12036
12037   test -n "$pkg_config" && break
12038 done
12039
12040
12041 if test -z "$pkg_config" ; then
12042   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found!" >&5
12043 $as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
12044   pkg_config="false"
12045 fi
12046
12047
12048 # Utility function for running pkg-config-based tests...
12049 #
12050 pkgs=''
12051 pkg_check_version() {
12052   if test "$ok" = yes ; then
12053     req="$1"
12054     min="$2"
12055     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $req" >&5
12056 $as_echo_n "checking for $req... " >&6; }
12057     if $pkg_config --exists "$req" ; then
12058       vers=`$pkg_config --modversion "$req"`
12059       if $pkg_config --exists "$req >= $min" ; then
12060         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers" >&5
12061 $as_echo "$vers" >&6; }
12062         pkgs="$pkgs $req"
12063         return 1
12064       else
12065         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers (wanted >= $min)" >&5
12066 $as_echo "$vers (wanted >= $min)" >&6; }
12067         ok=no
12068         return 0
12069       fi
12070     else
12071       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12072 $as_echo "no" >&6; }
12073       ok=no
12074       return 0
12075     fi
12076   fi
12077 }
12078
12079
12080 jurassic_gtk=no
12081 gtk_halfassed=no
12082 have_gtk_2_22_or_higher=no
12083 COMMENT_DEMO_GLADE2_GTK_2_22_HEAD=""
12084 COMMENT_DEMO_GLADE2_GTK_2_22_TAIL=""
12085
12086 if test "$with_gtk" = yes; then
12087   have_gtk=no
12088
12089   ok="yes"
12090   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
12091   pkg_check_version         gmodule-2.0  2.0.0
12092   pkg_check_version          libxml-2.0  2.4.6
12093   pkg_check_version        libglade-2.0  1.99.0
12094   pkg_check_version      gdk-pixbuf-2.0  2.0.0
12095   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
12096   have_gtk="$ok"
12097
12098   if test "$have_gtk" = no; then
12099     if test -n "$ac_gtk_version_string" ; then
12100       gtk_halfassed="$ac_gtk_version_string"
12101       gtk_halfassed_lib="$req"
12102     fi
12103   fi
12104
12105   if test "$have_gtk" = yes; then
12106     parse_gtk_version_string
12107     jurassic_gtk=no
12108   fi
12109
12110   if test "$have_gtk" = yes; then
12111     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk includes" >&5
12112 $as_echo_n "checking for Gtk includes... " >&6; }
12113 if ${ac_cv_gtk_config_cflags+:} false; then :
12114   $as_echo_n "(cached) " >&6
12115 else
12116   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
12117 fi
12118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_cflags" >&5
12119 $as_echo "$ac_cv_gtk_config_cflags" >&6; }
12120     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
12121 $as_echo_n "checking for Gtk libs... " >&6; }
12122 if ${ac_cv_gtk_config_libs+:} false; then :
12123   $as_echo_n "(cached) " >&6
12124 else
12125   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
12126 fi
12127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_libs" >&5
12128 $as_echo "$ac_cv_gtk_config_libs" >&6; }
12129   fi
12130
12131   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12132   ac_gtk_config_libs=$ac_cv_gtk_config_libs
12133
12134   GTK_EXTRA_OBJS=""
12135   GTK_DATADIR=""
12136   if test "$have_gtk" = yes; then
12137     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
12138     GTK_DATADIR="$GTK_DATADIR/share"
12139   fi
12140
12141   if test "$have_gtk" = yes; then
12142     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
12143     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
12144     $as_echo "#define HAVE_GTK 1" >>confdefs.h
12145
12146     $as_echo "#define HAVE_GTK2 1" >>confdefs.h
12147
12148     $as_echo "#define HAVE_XML 1" >>confdefs.h
12149
12150   fi
12151
12152   if test "$have_gtk" = yes; then
12153     ok="yes"
12154     pkg_check_version gtk+-2.0 2.22
12155     have_gtk_2_22_or_higher="$ok"
12156     if test "$have_gtk_2_22_or_higher" = yes; then
12157       COMMENT_DEMO_GLADE2_GTK_2_22_HEAD="<!-- comment>"
12158       COMMENT_DEMO_GLADE2_GTK_2_22_TAIL="</comment -->"
12159     fi
12160   fi
12161 fi
12162
12163
12164 # Check for the various Gnome help and URL loading programs.
12165 #
12166 WITH_BROWSER=gnome-open
12167 if test "$have_gtk" = yes; then
12168   for ac_prog in gnome-open
12169 do
12170   # Extract the first word of "$ac_prog", so it can be a program name with args.
12171 set dummy $ac_prog; ac_word=$2
12172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12173 $as_echo_n "checking for $ac_word... " >&6; }
12174 if ${ac_cv_prog_gnome_open_program+:} false; then :
12175   $as_echo_n "(cached) " >&6
12176 else
12177   if test -n "$gnome_open_program"; then
12178   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
12179 else
12180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12181 for as_dir in $PATH
12182 do
12183   IFS=$as_save_IFS
12184   test -z "$as_dir" && as_dir=.
12185     for ac_exec_ext in '' $ac_executable_extensions; do
12186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12187     ac_cv_prog_gnome_open_program="$ac_prog"
12188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12189     break 2
12190   fi
12191 done
12192   done
12193 IFS=$as_save_IFS
12194
12195 fi
12196 fi
12197 gnome_open_program=$ac_cv_prog_gnome_open_program
12198 if test -n "$gnome_open_program"; then
12199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_open_program" >&5
12200 $as_echo "$gnome_open_program" >&6; }
12201 else
12202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12203 $as_echo "no" >&6; }
12204 fi
12205
12206
12207   test -n "$gnome_open_program" && break
12208 done
12209
12210   for ac_prog in gnome-url-show
12211 do
12212   # Extract the first word of "$ac_prog", so it can be a program name with args.
12213 set dummy $ac_prog; ac_word=$2
12214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12215 $as_echo_n "checking for $ac_word... " >&6; }
12216 if ${ac_cv_prog_gnome_url_show_program+:} false; then :
12217   $as_echo_n "(cached) " >&6
12218 else
12219   if test -n "$gnome_url_show_program"; then
12220   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
12221 else
12222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12223 for as_dir in $PATH
12224 do
12225   IFS=$as_save_IFS
12226   test -z "$as_dir" && as_dir=.
12227     for ac_exec_ext in '' $ac_executable_extensions; do
12228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12229     ac_cv_prog_gnome_url_show_program="$ac_prog"
12230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12231     break 2
12232   fi
12233 done
12234   done
12235 IFS=$as_save_IFS
12236
12237 fi
12238 fi
12239 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
12240 if test -n "$gnome_url_show_program"; then
12241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_url_show_program" >&5
12242 $as_echo "$gnome_url_show_program" >&6; }
12243 else
12244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12245 $as_echo "no" >&6; }
12246 fi
12247
12248
12249   test -n "$gnome_url_show_program" && break
12250 done
12251
12252 fi
12253
12254
12255 ###############################################################################
12256 #
12257 #       Check for -lXm.
12258 #
12259 ###############################################################################
12260
12261 have_motif=no
12262 with_motif_req=unspecified
12263
12264 # Check whether --with-motif was given.
12265 if test "${with_motif+set}" = set; then :
12266   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
12267 else
12268   with_motif=no
12269 fi
12270
12271
12272
12273    case "$with_motif" in
12274     yes) ;;
12275     no)  ;;
12276
12277     /*)
12278      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif headers" >&5
12279 $as_echo_n "checking for Motif headers... " >&6; }
12280      d=$with_motif/include
12281      if test -d $d; then
12282        X_CFLAGS="-I$d $X_CFLAGS"
12283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12284 $as_echo "$d" >&6; }
12285      else
12286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12287 $as_echo "not found ($d: no such directory)" >&6; }
12288      fi
12289
12290      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif libs" >&5
12291 $as_echo_n "checking for Motif libs... " >&6; }
12292      d=$with_motif/lib
12293      if test -d $d; then
12294        X_LIBS="-L$d $X_LIBS"
12295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12296 $as_echo "$d" >&6; }
12297      else
12298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12299 $as_echo "not found ($d: no such directory)" >&6; }
12300      fi
12301
12302      # replace the directory string with "yes".
12303      with_motif_req="yes"
12304      with_motif=$with_motif_req
12305      ;;
12306
12307     *)
12308      echo ""
12309      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12310      echo "       If it is a directory, then \`DIR/include' will be added to"
12311      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12312      exit 1
12313      ;;
12314    esac
12315
12316
12317 if test "$with_motif" != yes -a "$with_motif" != no ; then
12318   echo "error: must be yes or no: --with-motif=$with_motif"
12319   exit 1
12320 fi
12321
12322 if test "$with_motif" = yes; then
12323   have_motif=no
12324
12325   ac_save_CPPFLAGS="$CPPFLAGS"
12326   if test \! -z "$includedir" ; then
12327     CPPFLAGS="$CPPFLAGS -I$includedir"
12328   fi
12329   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12330   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12331   ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "#include <stdlib.h>
12332                      #include <stdio.h>
12333                      #include <X11/Intrinsic.h>
12334 "
12335 if test "x$ac_cv_header_Xm_Xm_h" = xyes; then :
12336   have_motif=yes
12337                      $as_echo "#define HAVE_MOTIF 1" >>confdefs.h
12338
12339                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12340 fi
12341
12342
12343   CPPFLAGS="$ac_save_CPPFLAGS"
12344 fi
12345
12346
12347 if test "$have_motif" = yes; then
12348
12349   ac_save_CPPFLAGS="$CPPFLAGS"
12350   if test \! -z "$includedir" ; then
12351     CPPFLAGS="$CPPFLAGS -I$includedir"
12352   fi
12353   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12354   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12355   ac_fn_c_check_header_compile "$LINENO" "Xm/ComboBox.h" "ac_cv_header_Xm_ComboBox_h" "#include <stdlib.h>
12356                      #include <stdio.h>
12357                      #include <X11/Intrinsic.h>
12358 "
12359 if test "x$ac_cv_header_Xm_ComboBox_h" = xyes; then :
12360   $as_echo "#define HAVE_XMCOMBOBOX 1" >>confdefs.h
12361
12362 fi
12363
12364
12365   CPPFLAGS="$ac_save_CPPFLAGS"
12366 fi
12367
12368
12369 ###############################################################################
12370 #
12371 #       Checking whether Motif is really Lesstif.
12372 #
12373 ###############################################################################
12374
12375 have_lesstif=no
12376 if test "$have_motif" = yes ; then
12377   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif is really LessTif" >&5
12378 $as_echo_n "checking whether Motif is really LessTif... " >&6; }
12379 if ${ac_cv_have_lesstif+:} false; then :
12380   $as_echo_n "(cached) " >&6
12381 else
12382
12383   ac_save_CPPFLAGS="$CPPFLAGS"
12384   if test \! -z "$includedir" ; then
12385     CPPFLAGS="$CPPFLAGS -I$includedir"
12386   fi
12387   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12388   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12389   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12390 /* end confdefs.h.  */
12391 #include <Xm/Xm.h>
12392 int
12393 main ()
12394 {
12395 long vers = LesstifVersion;
12396   ;
12397   return 0;
12398 }
12399 _ACEOF
12400 if ac_fn_c_try_compile "$LINENO"; then :
12401   ac_cv_have_lesstif=yes
12402 else
12403   ac_cv_have_lesstif=no
12404 fi
12405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12406   CPPFLAGS="$ac_save_CPPFLAGS"
12407 fi
12408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lesstif" >&5
12409 $as_echo "$ac_cv_have_lesstif" >&6; }
12410   have_lesstif=$ac_cv_have_lesstif
12411 fi
12412
12413
12414 lesstif_version=unknown
12415 lesstif_version_string=unknown
12416
12417 if test "$have_lesstif" = yes ; then
12418   ltv=unknown
12419   echo unknown > conftest-lt
12420   { $as_echo "$as_me:${as_lineno-$LINENO}: checking LessTif version number" >&5
12421 $as_echo_n "checking LessTif version number... " >&6; }
12422 if ${ac_cv_lesstif_version_string+:} false; then :
12423   $as_echo_n "(cached) " >&6
12424 else
12425
12426   ac_save_CPPFLAGS="$CPPFLAGS"
12427   if test \! -z "$includedir" ; then
12428     CPPFLAGS="$CPPFLAGS -I$includedir"
12429   fi
12430   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12431   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12432   if test "$cross_compiling" = yes; then :
12433   ac_cv_lesstif_version=unknown
12434                      ac_cv_lesstif_version_string=unknown
12435 else
12436   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12437 /* end confdefs.h.  */
12438 #include <stdio.h>
12439                      #include <Xm/Xm.h>
12440                      int main() {
12441                        FILE *f = fopen("conftest-lt", "w");
12442                        if (!f) exit(1);
12443                        fprintf(f, "%d %d.%d\n", LesstifVersion,
12444                           LESSTIF_VERSION, LESSTIF_REVISION);
12445                        fclose(f);
12446                        exit(0);
12447                      }
12448 _ACEOF
12449 if ac_fn_c_try_run "$LINENO"; then :
12450   ltv=`cat conftest-lt`
12451                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
12452                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
12453 else
12454   ac_cv_lesstif_version=unknown
12455                      ac_cv_lesstif_version_string=unknown
12456 fi
12457 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12458   conftest.$ac_objext conftest.beam conftest.$ac_ext
12459 fi
12460
12461   CPPFLAGS="$ac_save_CPPFLAGS"
12462 fi
12463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lesstif_version_string" >&5
12464 $as_echo "$ac_cv_lesstif_version_string" >&6; }
12465   rm -rf conftest-lt
12466   lesstif_version=$ac_cv_lesstif_version
12467   lesstif_version_string=$ac_cv_lesstif_version_string
12468
12469 fi
12470
12471
12472 if test "$have_motif" = yes ; then
12473   mtv=unknown
12474   echo unknown > conftest-mt
12475   { $as_echo "$as_me:${as_lineno-$LINENO}: checking Motif version number" >&5
12476 $as_echo_n "checking Motif version number... " >&6; }
12477 if ${ac_cv_motif_version_string+:} false; then :
12478   $as_echo_n "(cached) " >&6
12479 else
12480
12481   ac_save_CPPFLAGS="$CPPFLAGS"
12482   if test \! -z "$includedir" ; then
12483     CPPFLAGS="$CPPFLAGS -I$includedir"
12484   fi
12485   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12486   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12487   if test "$cross_compiling" = yes; then :
12488   ac_cv_motif_version=unknown
12489                      ac_cv_motif_version_string=unknown
12490 else
12491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12492 /* end confdefs.h.  */
12493 #include <stdio.h>
12494                      #include <Xm/Xm.h>
12495                      int main() {
12496                        FILE *f = fopen("conftest-mt", "w");
12497                        if (!f) exit(1);
12498                        fprintf(f, "%d %d.%d\n", XmVersion,
12499                           XmVERSION, XmREVISION);
12500                        fclose(f);
12501                        exit(0);
12502                      }
12503 _ACEOF
12504 if ac_fn_c_try_run "$LINENO"; then :
12505   mtv=`cat conftest-mt`
12506                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
12507                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
12508 else
12509   ac_cv_motif_version=unknown
12510                      ac_cv_motif_version_string=unknown
12511 fi
12512 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12513   conftest.$ac_objext conftest.beam conftest.$ac_ext
12514 fi
12515
12516   CPPFLAGS="$ac_save_CPPFLAGS"
12517 fi
12518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_motif_version_string" >&5
12519 $as_echo "$ac_cv_motif_version_string" >&6; }
12520   rm -rf conftest-mt
12521   motif_version=$ac_cv_motif_version
12522   motif_version_string=$ac_cv_motif_version_string
12523
12524 fi
12525
12526
12527 ###############################################################################
12528 #
12529 #       Checking whether Motif requires -lXpm.
12530 #
12531 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
12532 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
12533 #       of the library whether to build the XPM code into libXm, or whether
12534 #       to rely on an external libXm.  So the only way to tell whether XPM is
12535 #       a link-time requirement is to examine libXm.a, which is very
12536 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
12537 #       always link against XPM if the XPM lib exists (and this will be a
12538 #       no-op if libXm happens to already have the XPM code in it.)
12539 #
12540 ###############################################################################
12541
12542 motif_requires_xpm=no
12543 if test "$have_motif" = yes ; then
12544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif requires XPM" >&5
12545 $as_echo_n "checking whether Motif requires XPM... " >&6; }
12546    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
12547    then
12548      motif_requires_xpm=yes
12549      { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
12550 $as_echo "maybe" >&6; }
12551    else
12552      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12553 $as_echo "no" >&6; }
12554    fi
12555 fi
12556
12557
12558 ###############################################################################
12559 #
12560 #       Checking whether Motif requires -lXp.
12561 #
12562 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
12563 #       Extension".   Why this extension isn't in -lXext with all the others,
12564 #       I have no idea.
12565 #
12566 ###############################################################################
12567
12568 have_xp_ext=no
12569 if test "$have_motif" = yes ; then
12570    have_xp_ext=no
12571
12572   ac_save_CPPFLAGS="$CPPFLAGS"
12573   ac_save_LDFLAGS="$LDFLAGS"
12574 #  ac_save_LIBS="$LIBS"
12575
12576   if test \! -z "$includedir" ; then
12577     CPPFLAGS="$CPPFLAGS -I$includedir"
12578   fi
12579   # note: $X_CFLAGS includes $x_includes
12580   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12581
12582   if test \! -z "$libdir" ; then
12583     LDFLAGS="$LDFLAGS -L$libdir"
12584   fi
12585   # note: $X_LIBS includes $x_libraries
12586   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12587
12588   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12589   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpQueryExtension in -lXp" >&5
12591 $as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
12592 if ${ac_cv_lib_Xp_XpQueryExtension+:} false; then :
12593   $as_echo_n "(cached) " >&6
12594 else
12595   ac_check_lib_save_LIBS=$LIBS
12596 LIBS="-lXp -lX11 -lXext -lm $LIBS"
12597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12598 /* end confdefs.h.  */
12599
12600 /* Override any GCC internal prototype to avoid an error.
12601    Use char because int might match the return type of a GCC
12602    builtin and then its argument prototype would still apply.  */
12603 #ifdef __cplusplus
12604 extern "C"
12605 #endif
12606 char XpQueryExtension ();
12607 int
12608 main ()
12609 {
12610 return XpQueryExtension ();
12611   ;
12612   return 0;
12613 }
12614 _ACEOF
12615 if ac_fn_c_try_link "$LINENO"; then :
12616   ac_cv_lib_Xp_XpQueryExtension=yes
12617 else
12618   ac_cv_lib_Xp_XpQueryExtension=no
12619 fi
12620 rm -f core conftest.err conftest.$ac_objext \
12621     conftest$ac_exeext conftest.$ac_ext
12622 LIBS=$ac_check_lib_save_LIBS
12623 fi
12624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
12625 $as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
12626 if test "x$ac_cv_lib_Xp_XpQueryExtension" = xyes; then :
12627   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
12628 else
12629   true
12630 fi
12631
12632   CPPFLAGS="$ac_save_CPPFLAGS"
12633   LDFLAGS="$ac_save_LDFLAGS"
12634 #  LIBS="$ac_save_LIBS"
12635
12636 fi
12637
12638
12639 ###############################################################################
12640 #
12641 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
12642 #
12643 ###############################################################################
12644
12645 have_xintl=no
12646 if test "$have_motif" = yes ; then
12647
12648   ac_save_CPPFLAGS="$CPPFLAGS"
12649   ac_save_LDFLAGS="$LDFLAGS"
12650 #  ac_save_LIBS="$LIBS"
12651
12652   if test \! -z "$includedir" ; then
12653     CPPFLAGS="$CPPFLAGS -I$includedir"
12654   fi
12655   # note: $X_CFLAGS includes $x_includes
12656   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12657
12658   if test \! -z "$libdir" ; then
12659     LDFLAGS="$LDFLAGS -L$libdir"
12660   fi
12661   # note: $X_LIBS includes $x_libraries
12662   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12663
12664   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12665   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12666   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Xsetlocale in -lXintl" >&5
12667 $as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
12668 if ${ac_cv_lib_Xintl__Xsetlocale+:} false; then :
12669   $as_echo_n "(cached) " >&6
12670 else
12671   ac_check_lib_save_LIBS=$LIBS
12672 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
12673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12674 /* end confdefs.h.  */
12675
12676 /* Override any GCC internal prototype to avoid an error.
12677    Use char because int might match the return type of a GCC
12678    builtin and then its argument prototype would still apply.  */
12679 #ifdef __cplusplus
12680 extern "C"
12681 #endif
12682 char _Xsetlocale ();
12683 int
12684 main ()
12685 {
12686 return _Xsetlocale ();
12687   ;
12688   return 0;
12689 }
12690 _ACEOF
12691 if ac_fn_c_try_link "$LINENO"; then :
12692   ac_cv_lib_Xintl__Xsetlocale=yes
12693 else
12694   ac_cv_lib_Xintl__Xsetlocale=no
12695 fi
12696 rm -f core conftest.err conftest.$ac_objext \
12697     conftest$ac_exeext conftest.$ac_ext
12698 LIBS=$ac_check_lib_save_LIBS
12699 fi
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
12701 $as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
12702 if test "x$ac_cv_lib_Xintl__Xsetlocale" = xyes; then :
12703   have_xintl=yes
12704 else
12705   have_xintl=no
12706 fi
12707
12708   CPPFLAGS="$ac_save_CPPFLAGS"
12709   LDFLAGS="$ac_save_LDFLAGS"
12710 #  LIBS="$ac_save_LIBS"
12711
12712   if test "$have_xintl" = yes; then
12713     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
12714   fi
12715 fi
12716
12717
12718 ###############################################################################
12719 #
12720 #       Check for -lGL or -lMesaGL.
12721 #
12722 ###############################################################################
12723
12724 have_gl=no
12725 ac_have_mesa_gl=no
12726 with_gl_req=unspecified
12727 gl_halfassed=no
12728
12729 # Check whether --with-gl was given.
12730 if test "${with_gl+set}" = set; then :
12731   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
12732 else
12733   with_gl=yes
12734 fi
12735
12736
12737
12738    case "$with_gl" in
12739     yes) ;;
12740     no)  ;;
12741
12742     /*)
12743      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL headers" >&5
12744 $as_echo_n "checking for GL headers... " >&6; }
12745      d=$with_gl/include
12746      if test -d $d; then
12747        X_CFLAGS="-I$d $X_CFLAGS"
12748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12749 $as_echo "$d" >&6; }
12750      else
12751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12752 $as_echo "not found ($d: no such directory)" >&6; }
12753      fi
12754
12755      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL libs" >&5
12756 $as_echo_n "checking for GL libs... " >&6; }
12757      d=$with_gl/lib
12758      if test -d $d; then
12759        X_LIBS="-L$d $X_LIBS"
12760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12761 $as_echo "$d" >&6; }
12762      else
12763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12764 $as_echo "not found ($d: no such directory)" >&6; }
12765      fi
12766
12767      # replace the directory string with "yes".
12768      with_gl_req="yes"
12769      with_gl=$with_gl_req
12770      ;;
12771
12772     *)
12773      echo ""
12774      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
12775      echo "       If it is a directory, then \`DIR/include' will be added to"
12776      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12777      exit 1
12778      ;;
12779    esac
12780
12781
12782 ac_mesagl_version=unknown
12783 ac_mesagl_version_string=unknown
12784
12785 if test "$with_gl" = yes; then
12786
12787   ac_save_CPPFLAGS="$CPPFLAGS"
12788   if test \! -z "$includedir" ; then
12789     CPPFLAGS="$CPPFLAGS -I$includedir"
12790   fi
12791   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12792   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12793   ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
12794 if test "x$ac_cv_header_GL_gl_h" = xyes; then :
12795   have_gl=yes
12796 else
12797   have_gl=no
12798 fi
12799
12800
12801   CPPFLAGS="$ac_save_CPPFLAGS"
12802   if test "$have_gl" = yes ; then
12803
12804   ac_save_CPPFLAGS="$CPPFLAGS"
12805   if test \! -z "$includedir" ; then
12806     CPPFLAGS="$CPPFLAGS -I$includedir"
12807   fi
12808   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12809   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12810   ac_fn_c_check_header_compile "$LINENO" "GL/glx.h" "ac_cv_header_GL_glx_h" "#include <GL/gl.h>
12811 "
12812 if test "x$ac_cv_header_GL_glx_h" = xyes; then :
12813   have_gl=yes
12814 else
12815   have_gl=no
12816 fi
12817
12818
12819   CPPFLAGS="$ac_save_CPPFLAGS"
12820   fi
12821
12822   # If we have the headers, try and figure out which vendor it's from.
12823   #
12824   if test "$have_gl" = yes ; then
12825
12826     # We need to know whether it's MesaGL so that we know which libraries
12827     # to link against.
12828     #
12829     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GL is really MesaGL" >&5
12830 $as_echo_n "checking whether GL is really MesaGL... " >&6; }
12831 if ${ac_cv_have_mesa_gl+:} false; then :
12832   $as_echo_n "(cached) " >&6
12833 else
12834   ac_cv_have_mesa_gl=no
12835        if test "$ac_macosx" = no; then
12836          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
12837          # It's not really Mesa, is it?
12838
12839   ac_save_CPPFLAGS="$CPPFLAGS"
12840   if test \! -z "$includedir" ; then
12841     CPPFLAGS="$CPPFLAGS -I$includedir"
12842   fi
12843   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12844   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12845   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12846 /* end confdefs.h.  */
12847 #include <GL/glx.h>
12848
12849 _ACEOF
12850 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12851   $EGREP "Mesa|MESA" >/dev/null 2>&1; then :
12852   ac_cv_have_mesa_gl=yes
12853 fi
12854 rm -rf conftest*
12855
12856   CPPFLAGS="$ac_save_CPPFLAGS"
12857        fi
12858 fi
12859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mesa_gl" >&5
12860 $as_echo "$ac_cv_have_mesa_gl" >&6; }
12861     ac_have_mesa_gl=$ac_cv_have_mesa_gl
12862
12863     gl_lib_1=""
12864     GL_LIBS=""
12865
12866     if test "$ac_macosx" = yes; then
12867
12868       # Without these, every link against libGL gets a bunch of useless
12869       # warnings.
12870       #
12871       osx_crud="-bind_at_load -multiply_defined suppress"
12872       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
12873 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
12874       GL_LIBS="$GL_LIBS $osx_crud"
12875       unset osx_crud
12876
12877       # New lossage in 10.5.0: without this, we get:
12878       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
12879       #
12880       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
12881       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
12882
12883       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
12884 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
12885       GL_LIBS="$GL_LIBS $osx_crud"
12886       unset osx_crud
12887
12888       # New lossage in 10.6.8: we can't allow -L/opt/local/lib to be in the
12889       # link line, or at runtime XQueryExtension gets a segv due to some kind
12890       # of library version skew.  Libs must come from /usr/X11/lib even if
12891       # $prefix and/or $exec_prefix are set to /opt/local/.
12892       #
12893       { $as_echo "$as_me:${as_lineno-$LINENO}: result: omitting \"$libdir\" from LDFLAGS" >&5
12894 $as_echo "omitting \"$libdir\" from LDFLAGS" >&6; }
12895       libdir=''
12896
12897     fi
12898
12899
12900     # Some versions of MesaGL are compiled to require -lpthread.
12901     # So if the Mesa headers exist, and -lpthread exists, then always
12902     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
12903     #
12904     # Oftentimes, AX_PTHREAD will bring in -lpthread as well; but that ends
12905     # up before -l(Mesa)GL, instead of after where it would belong.
12906     #
12907     if test "$ac_have_mesa_gl" = yes; then
12908       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
12909 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
12910 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
12911   $as_echo_n "(cached) " >&6
12912 else
12913   ac_check_lib_save_LIBS=$LIBS
12914 LIBS="-lpthread  $LIBS"
12915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12916 /* end confdefs.h.  */
12917
12918 /* Override any GCC internal prototype to avoid an error.
12919    Use char because int might match the return type of a GCC
12920    builtin and then its argument prototype would still apply.  */
12921 #ifdef __cplusplus
12922 extern "C"
12923 #endif
12924 char pthread_create ();
12925 int
12926 main ()
12927 {
12928 return pthread_create ();
12929   ;
12930   return 0;
12931 }
12932 _ACEOF
12933 if ac_fn_c_try_link "$LINENO"; then :
12934   ac_cv_lib_pthread_pthread_create=yes
12935 else
12936   ac_cv_lib_pthread_pthread_create=no
12937 fi
12938 rm -f core conftest.err conftest.$ac_objext \
12939     conftest$ac_exeext conftest.$ac_ext
12940 LIBS=$ac_check_lib_save_LIBS
12941 fi
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
12943 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
12944 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
12945   GL_LIBS="-lpthread"
12946 fi
12947
12948     fi
12949
12950
12951     # If we have Mesa headers, check to see if we can link against -lMesaGL.
12952     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
12953     # Else, warn that GL is busted.  (We have the headers, but no libs.)
12954     #
12955
12956     if test "$ac_have_mesa_gl" = yes ; then
12957
12958   ac_save_CPPFLAGS="$CPPFLAGS"
12959   ac_save_LDFLAGS="$LDFLAGS"
12960 #  ac_save_LIBS="$LIBS"
12961
12962   if test \! -z "$includedir" ; then
12963     CPPFLAGS="$CPPFLAGS -I$includedir"
12964   fi
12965   # note: $X_CFLAGS includes $x_includes
12966   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12967
12968   if test \! -z "$libdir" ; then
12969     LDFLAGS="$LDFLAGS -L$libdir"
12970   fi
12971   # note: $X_LIBS includes $x_libraries
12972   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12973
12974   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12975   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lMesaGL" >&5
12977 $as_echo_n "checking for glXCreateContext in -lMesaGL... " >&6; }
12978 if ${ac_cv_lib_MesaGL_glXCreateContext+:} false; then :
12979   $as_echo_n "(cached) " >&6
12980 else
12981   ac_check_lib_save_LIBS=$LIBS
12982 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
12983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12984 /* end confdefs.h.  */
12985
12986 /* Override any GCC internal prototype to avoid an error.
12987    Use char because int might match the return type of a GCC
12988    builtin and then its argument prototype would still apply.  */
12989 #ifdef __cplusplus
12990 extern "C"
12991 #endif
12992 char glXCreateContext ();
12993 int
12994 main ()
12995 {
12996 return glXCreateContext ();
12997   ;
12998   return 0;
12999 }
13000 _ACEOF
13001 if ac_fn_c_try_link "$LINENO"; then :
13002   ac_cv_lib_MesaGL_glXCreateContext=yes
13003 else
13004   ac_cv_lib_MesaGL_glXCreateContext=no
13005 fi
13006 rm -f core conftest.err conftest.$ac_objext \
13007     conftest$ac_exeext conftest.$ac_ext
13008 LIBS=$ac_check_lib_save_LIBS
13009 fi
13010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
13011 $as_echo "$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
13012 if test "x$ac_cv_lib_MesaGL_glXCreateContext" = xyes; then :
13013   gl_lib_1="MesaGL"
13014                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
13015 fi
13016
13017   CPPFLAGS="$ac_save_CPPFLAGS"
13018   LDFLAGS="$ac_save_LDFLAGS"
13019 #  LIBS="$ac_save_LIBS"
13020
13021     fi
13022
13023     if test "$gl_lib_1" = "" ; then
13024
13025   ac_save_CPPFLAGS="$CPPFLAGS"
13026   ac_save_LDFLAGS="$LDFLAGS"
13027 #  ac_save_LIBS="$LIBS"
13028
13029   if test \! -z "$includedir" ; then
13030     CPPFLAGS="$CPPFLAGS -I$includedir"
13031   fi
13032   # note: $X_CFLAGS includes $x_includes
13033   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13034
13035   if test \! -z "$libdir" ; then
13036     LDFLAGS="$LDFLAGS -L$libdir"
13037   fi
13038   # note: $X_LIBS includes $x_libraries
13039   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13040
13041   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13042   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13043   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lGL" >&5
13044 $as_echo_n "checking for glXCreateContext in -lGL... " >&6; }
13045 if ${ac_cv_lib_GL_glXCreateContext+:} false; then :
13046   $as_echo_n "(cached) " >&6
13047 else
13048   ac_check_lib_save_LIBS=$LIBS
13049 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
13050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13051 /* end confdefs.h.  */
13052
13053 /* Override any GCC internal prototype to avoid an error.
13054    Use char because int might match the return type of a GCC
13055    builtin and then its argument prototype would still apply.  */
13056 #ifdef __cplusplus
13057 extern "C"
13058 #endif
13059 char glXCreateContext ();
13060 int
13061 main ()
13062 {
13063 return glXCreateContext ();
13064   ;
13065   return 0;
13066 }
13067 _ACEOF
13068 if ac_fn_c_try_link "$LINENO"; then :
13069   ac_cv_lib_GL_glXCreateContext=yes
13070 else
13071   ac_cv_lib_GL_glXCreateContext=no
13072 fi
13073 rm -f core conftest.err conftest.$ac_objext \
13074     conftest$ac_exeext conftest.$ac_ext
13075 LIBS=$ac_check_lib_save_LIBS
13076 fi
13077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_glXCreateContext" >&5
13078 $as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; }
13079 if test "x$ac_cv_lib_GL_glXCreateContext" = xyes; then :
13080   gl_lib_1="GL"
13081                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
13082 fi
13083
13084   CPPFLAGS="$ac_save_CPPFLAGS"
13085   LDFLAGS="$ac_save_LDFLAGS"
13086 #  LIBS="$ac_save_LIBS"
13087
13088     fi
13089
13090     if test "$gl_lib_1" = "" ; then
13091       # we have headers, but no libs -- bail.
13092       have_gl=no
13093       ac_have_mesa_gl=no
13094       gl_halfassed=yes
13095     else
13096       # linking works -- we can build the GL hacks.
13097       $as_echo "#define HAVE_GL 1" >>confdefs.h
13098
13099       if test "$ac_have_mesa_gl" = yes ; then
13100         $as_echo "#define HAVE_MESA_GL 1" >>confdefs.h
13101
13102       fi
13103     fi
13104   fi
13105
13106
13107   # Now that we know we have GL headers and libs, do some more GL testing.
13108   #
13109
13110   if test "$have_gl" = yes ; then
13111     # If it's MesaGL, we'd like to issue a warning if the version number
13112     # is less than or equal to 2.6, because that version had a security bug.
13113     #
13114     if test "$ac_have_mesa_gl" = yes; then
13115
13116       { $as_echo "$as_me:${as_lineno-$LINENO}: checking MesaGL version number" >&5
13117 $as_echo_n "checking MesaGL version number... " >&6; }
13118 if ${ac_cv_mesagl_version_string+:} false; then :
13119   $as_echo_n "(cached) " >&6
13120 else
13121   cat > conftest.$ac_ext <<EOF
13122 #line 13126 "configure"
13123 #include "confdefs.h"
13124 #include <GL/gl.h>
13125 #ifndef MESA_MAJOR_VERSION
13126 # include <GL/xmesa.h>
13127 # ifdef XMESA_MAJOR_VERSION
13128    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
13129       we have to check the XMesa version number (the number of the X protocol
13130       support, which seems to be the same as the Mesa version number.)
13131     */
13132 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
13133 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
13134 # else
13135    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
13136       so we have no way of telling what version of Mesa this is at all.
13137       So, we'll guess that the osmesa version (the "offscreen protocol")
13138       is less than or equal to the real mesa version number.  Except that
13139       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
13140       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
13141     */
13142 # include <GL/osmesa.h>
13143 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
13144 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
13145 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
13146 #   undef MESA_MINOR_VERSION
13147 #   define MESA_MINOR_VERSION 4 or newer, probably?
13148 #  endif
13149 # endif
13150 #endif
13151 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
13152 EOF
13153
13154          ac_save_CPPFLAGS="$CPPFLAGS"
13155          if test \! -z "$includedir" ; then
13156            CPPFLAGS="$CPPFLAGS -I$includedir"
13157          fi
13158          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13159
13160          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
13161
13162          # M4 sucks!!
13163
13164           mglv=`echo "$mglv" | sed -n \
13165              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
13166
13167
13168          rm -rf conftest.$ac_ext
13169
13170          CPPFLAGS="$ac_save_CPPFLAGS"
13171
13172          if test "$mglv" = ""; then
13173            ac_mesagl_version=unknown
13174            ac_mesagl_version_string=unknown
13175          else
13176            ac_mesagl_version_string="$mglv"
13177            # M4 sucks!!
13178
13179            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
13180            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
13181
13182            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
13183            if test -z "$ac_mesagl_version"; then
13184              ac_mesagl_version=unknown
13185              ac_mesagl_version_string=unknown
13186            fi
13187          fi
13188          ac_cv_mesagl_version=$ac_mesagl_version
13189          ac_cv_mesagl_version_string=$ac_mesagl_version_string
13190
13191 fi
13192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mesagl_version_string" >&5
13193 $as_echo "$ac_cv_mesagl_version_string" >&6; }
13194       ac_mesagl_version=$ac_cv_mesagl_version
13195       ac_mesagl_version_string=$ac_cv_mesagl_version_string
13196     fi
13197
13198
13199     # Check for OpenGL 1.1 features.
13200     #
13201
13202   ac_save_CPPFLAGS="$CPPFLAGS"
13203   ac_save_LDFLAGS="$LDFLAGS"
13204 #  ac_save_LIBS="$LIBS"
13205
13206   if test \! -z "$includedir" ; then
13207     CPPFLAGS="$CPPFLAGS -I$includedir"
13208   fi
13209   # note: $X_CFLAGS includes $x_includes
13210   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13211
13212   if test \! -z "$libdir" ; then
13213     LDFLAGS="$LDFLAGS -L$libdir"
13214   fi
13215   # note: $X_LIBS includes $x_libraries
13216   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13217
13218   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13219   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13220   as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
13221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBindTexture in -l$gl_lib_1" >&5
13222 $as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
13223 if eval \${$as_ac_Lib+:} false; then :
13224   $as_echo_n "(cached) " >&6
13225 else
13226   ac_check_lib_save_LIBS=$LIBS
13227 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
13228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13229 /* end confdefs.h.  */
13230
13231 /* Override any GCC internal prototype to avoid an error.
13232    Use char because int might match the return type of a GCC
13233    builtin and then its argument prototype would still apply.  */
13234 #ifdef __cplusplus
13235 extern "C"
13236 #endif
13237 char glBindTexture ();
13238 int
13239 main ()
13240 {
13241 return glBindTexture ();
13242   ;
13243   return 0;
13244 }
13245 _ACEOF
13246 if ac_fn_c_try_link "$LINENO"; then :
13247   eval "$as_ac_Lib=yes"
13248 else
13249   eval "$as_ac_Lib=no"
13250 fi
13251 rm -f core conftest.err conftest.$ac_objext \
13252     conftest$ac_exeext conftest.$ac_ext
13253 LIBS=$ac_check_lib_save_LIBS
13254 fi
13255 eval ac_res=\$$as_ac_Lib
13256                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13257 $as_echo "$ac_res" >&6; }
13258 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13259   $as_echo "#define HAVE_GLBINDTEXTURE 1" >>confdefs.h
13260
13261 else
13262   true
13263 fi
13264
13265   CPPFLAGS="$ac_save_CPPFLAGS"
13266   LDFLAGS="$ac_save_LDFLAGS"
13267 #  LIBS="$ac_save_LIBS"
13268
13269   fi
13270
13271 elif test "$with_gl" != no; then
13272   echo "error: must be yes or no: --with-gl=$with_gl"
13273   exit 1
13274 fi
13275
13276
13277 ###############################################################################
13278 #
13279 #       Check for -lgle.
13280 #
13281 ###############################################################################
13282
13283 have_gle=no
13284 with_gle_req=unspecified
13285 gle_halfassed=no
13286
13287 # Check whether --with-gle was given.
13288 if test "${with_gle+set}" = set; then :
13289   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
13290 else
13291   with_gle=yes
13292 fi
13293
13294
13295
13296    case "$with_gle" in
13297     yes) ;;
13298     no)  ;;
13299
13300     /*)
13301      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE headers" >&5
13302 $as_echo_n "checking for GLE headers... " >&6; }
13303      d=$with_gle/include
13304      if test -d $d; then
13305        X_CFLAGS="-I$d $X_CFLAGS"
13306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13307 $as_echo "$d" >&6; }
13308      else
13309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13310 $as_echo "not found ($d: no such directory)" >&6; }
13311      fi
13312
13313      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE libs" >&5
13314 $as_echo_n "checking for GLE libs... " >&6; }
13315      d=$with_gle/lib
13316      if test -d $d; then
13317        X_LIBS="-L$d $X_LIBS"
13318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13319 $as_echo "$d" >&6; }
13320      else
13321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13322 $as_echo "not found ($d: no such directory)" >&6; }
13323      fi
13324
13325      # replace the directory string with "yes".
13326      with_gle_req="yes"
13327      with_gle=$with_gle_req
13328      ;;
13329
13330     *)
13331      echo ""
13332      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
13333      echo "       If it is a directory, then \`DIR/include' will be added to"
13334      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13335      exit 1
13336      ;;
13337    esac
13338
13339
13340 GLE_LIBS=""
13341
13342 if test "$have_gl" = no ; then
13343  true
13344 elif test "$with_gle" = yes; then
13345
13346
13347   ac_save_CPPFLAGS="$CPPFLAGS"
13348   if test \! -z "$includedir" ; then
13349     CPPFLAGS="$CPPFLAGS -I$includedir"
13350   fi
13351   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13352   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13353   ac_fn_c_check_header_compile "$LINENO" "GL/gle.h" "ac_cv_header_GL_gle_h" "#include <GL/gl.h>
13354 "
13355 if test "x$ac_cv_header_GL_gle_h" = xyes; then :
13356   have_gle3=yes
13357 else
13358   have_gle3=no
13359 fi
13360
13361
13362   CPPFLAGS="$ac_save_CPPFLAGS"
13363   if test "$have_gle3" = yes ; then
13364     have_gle=yes;
13365   else
13366
13367   ac_save_CPPFLAGS="$CPPFLAGS"
13368   if test \! -z "$includedir" ; then
13369     CPPFLAGS="$CPPFLAGS -I$includedir"
13370   fi
13371   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13372   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13373   ac_fn_c_check_header_compile "$LINENO" "GL/gutil.h" "ac_cv_header_GL_gutil_h" "#include <GL/gl.h>
13374 "
13375 if test "x$ac_cv_header_GL_gutil_h" = xyes; then :
13376   have_gle=yes
13377 else
13378   have_gle=no
13379 fi
13380
13381
13382   CPPFLAGS="$ac_save_CPPFLAGS"
13383     if test "$have_gle" = yes ; then
13384
13385   ac_save_CPPFLAGS="$CPPFLAGS"
13386   if test \! -z "$includedir" ; then
13387     CPPFLAGS="$CPPFLAGS -I$includedir"
13388   fi
13389   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13390   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13391   ac_fn_c_check_header_compile "$LINENO" "GL/tube.h" "ac_cv_header_GL_tube_h" "#include <GL/gl.h>
13392 "
13393 if test "x$ac_cv_header_GL_tube_h" = xyes; then :
13394   have_gle=yes
13395 else
13396   have_gle=no
13397 fi
13398
13399
13400   CPPFLAGS="$ac_save_CPPFLAGS"
13401     fi
13402   fi
13403
13404   if test "$have_gle" = yes ; then
13405     have_gle=no
13406     gle_halfassed=yes
13407
13408   ac_save_CPPFLAGS="$CPPFLAGS"
13409   ac_save_LDFLAGS="$LDFLAGS"
13410 #  ac_save_LIBS="$LIBS"
13411
13412   if test \! -z "$includedir" ; then
13413     CPPFLAGS="$CPPFLAGS -I$includedir"
13414   fi
13415   # note: $X_CFLAGS includes $x_includes
13416   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13417
13418   if test \! -z "$libdir" ; then
13419     LDFLAGS="$LDFLAGS -L$libdir"
13420   fi
13421   # note: $X_LIBS includes $x_libraries
13422   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13423
13424   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13425   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13426   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gleCreateGC in -lgle" >&5
13427 $as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
13428 if ${ac_cv_lib_gle_gleCreateGC+:} false; then :
13429   $as_echo_n "(cached) " >&6
13430 else
13431   ac_check_lib_save_LIBS=$LIBS
13432 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
13433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13434 /* end confdefs.h.  */
13435
13436 /* Override any GCC internal prototype to avoid an error.
13437    Use char because int might match the return type of a GCC
13438    builtin and then its argument prototype would still apply.  */
13439 #ifdef __cplusplus
13440 extern "C"
13441 #endif
13442 char gleCreateGC ();
13443 int
13444 main ()
13445 {
13446 return gleCreateGC ();
13447   ;
13448   return 0;
13449 }
13450 _ACEOF
13451 if ac_fn_c_try_link "$LINENO"; then :
13452   ac_cv_lib_gle_gleCreateGC=yes
13453 else
13454   ac_cv_lib_gle_gleCreateGC=no
13455 fi
13456 rm -f core conftest.err conftest.$ac_objext \
13457     conftest$ac_exeext conftest.$ac_ext
13458 LIBS=$ac_check_lib_save_LIBS
13459 fi
13460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_gleCreateGC" >&5
13461 $as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
13462 if test "x$ac_cv_lib_gle_gleCreateGC" = xyes; then :
13463   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
13464 fi
13465
13466   CPPFLAGS="$ac_save_CPPFLAGS"
13467   LDFLAGS="$ac_save_LDFLAGS"
13468 #  LIBS="$ac_save_LIBS"
13469
13470   fi
13471   if test "$have_gle" = yes ; then
13472     have_gle=no
13473     gle_halfassed=yes
13474
13475     # sometimes the libmatrix stuff is included in libgle.  look there first.
13476 #
13477 # I don't get it.  For some reason, this test passes on SGI, as if
13478 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
13479 # Yet the link is succeeding.  Why???
13480 #
13481 #    AC_CHECK_X_LIB(gle, uview_direction_d,
13482 #                   [have_gle=yes; gle_halfassed=no],
13483 #                   [], $GL_LIBS -lX11 -lXext -lm)
13484
13485     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
13486     # *sigh*
13487     if test "$have_gle3" = yes ; then
13488
13489   ac_save_CPPFLAGS="$CPPFLAGS"
13490   ac_save_LDFLAGS="$LDFLAGS"
13491 #  ac_save_LIBS="$LIBS"
13492
13493   if test \! -z "$includedir" ; then
13494     CPPFLAGS="$CPPFLAGS -I$includedir"
13495   fi
13496   # note: $X_CFLAGS includes $x_includes
13497   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13498
13499   if test \! -z "$libdir" ; then
13500     LDFLAGS="$LDFLAGS -L$libdir"
13501   fi
13502   # note: $X_LIBS includes $x_libraries
13503   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13504
13505   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13506   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13507   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction in -lgle" >&5
13508 $as_echo_n "checking for uview_direction in -lgle... " >&6; }
13509 if ${ac_cv_lib_gle_uview_direction+:} false; then :
13510   $as_echo_n "(cached) " >&6
13511 else
13512   ac_check_lib_save_LIBS=$LIBS
13513 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
13514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13515 /* end confdefs.h.  */
13516
13517 /* Override any GCC internal prototype to avoid an error.
13518    Use char because int might match the return type of a GCC
13519    builtin and then its argument prototype would still apply.  */
13520 #ifdef __cplusplus
13521 extern "C"
13522 #endif
13523 char uview_direction ();
13524 int
13525 main ()
13526 {
13527 return uview_direction ();
13528   ;
13529   return 0;
13530 }
13531 _ACEOF
13532 if ac_fn_c_try_link "$LINENO"; then :
13533   ac_cv_lib_gle_uview_direction=yes
13534 else
13535   ac_cv_lib_gle_uview_direction=no
13536 fi
13537 rm -f core conftest.err conftest.$ac_objext \
13538     conftest$ac_exeext conftest.$ac_ext
13539 LIBS=$ac_check_lib_save_LIBS
13540 fi
13541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_uview_direction" >&5
13542 $as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
13543 if test "x$ac_cv_lib_gle_uview_direction" = xyes; then :
13544   have_gle=yes; gle_halfassed=no
13545 fi
13546
13547   CPPFLAGS="$ac_save_CPPFLAGS"
13548   LDFLAGS="$ac_save_LDFLAGS"
13549 #  LIBS="$ac_save_LIBS"
13550
13551     fi
13552     # if it wasn't in libgle, then look in libmatrix.
13553     if test "$have_gle" = no ; then
13554
13555   ac_save_CPPFLAGS="$CPPFLAGS"
13556   ac_save_LDFLAGS="$LDFLAGS"
13557 #  ac_save_LIBS="$LIBS"
13558
13559   if test \! -z "$includedir" ; then
13560     CPPFLAGS="$CPPFLAGS -I$includedir"
13561   fi
13562   # note: $X_CFLAGS includes $x_includes
13563   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13564
13565   if test \! -z "$libdir" ; then
13566     LDFLAGS="$LDFLAGS -L$libdir"
13567   fi
13568   # note: $X_LIBS includes $x_libraries
13569   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13570
13571   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13572   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13573   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction_d in -lmatrix" >&5
13574 $as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
13575 if ${ac_cv_lib_matrix_uview_direction_d+:} false; then :
13576   $as_echo_n "(cached) " >&6
13577 else
13578   ac_check_lib_save_LIBS=$LIBS
13579 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
13580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13581 /* end confdefs.h.  */
13582
13583 /* Override any GCC internal prototype to avoid an error.
13584    Use char because int might match the return type of a GCC
13585    builtin and then its argument prototype would still apply.  */
13586 #ifdef __cplusplus
13587 extern "C"
13588 #endif
13589 char uview_direction_d ();
13590 int
13591 main ()
13592 {
13593 return uview_direction_d ();
13594   ;
13595   return 0;
13596 }
13597 _ACEOF
13598 if ac_fn_c_try_link "$LINENO"; then :
13599   ac_cv_lib_matrix_uview_direction_d=yes
13600 else
13601   ac_cv_lib_matrix_uview_direction_d=no
13602 fi
13603 rm -f core conftest.err conftest.$ac_objext \
13604     conftest$ac_exeext conftest.$ac_ext
13605 LIBS=$ac_check_lib_save_LIBS
13606 fi
13607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_matrix_uview_direction_d" >&5
13608 $as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
13609 if test "x$ac_cv_lib_matrix_uview_direction_d" = xyes; then :
13610   have_gle=yes; gle_halfassed=no;
13611                       GLE_LIBS="$GLE_LIBS -lmatrix"
13612 fi
13613
13614   CPPFLAGS="$ac_save_CPPFLAGS"
13615   LDFLAGS="$ac_save_LDFLAGS"
13616 #  LIBS="$ac_save_LIBS"
13617
13618     fi
13619   fi
13620
13621   if test "$have_gle" = yes ; then
13622     $as_echo "#define HAVE_GLE 1" >>confdefs.h
13623
13624     if test "$have_gle3" = yes ; then
13625       $as_echo "#define HAVE_GLE3 1" >>confdefs.h
13626
13627     fi
13628   fi
13629
13630 elif test "$with_gle" != no; then
13631   echo "error: must be yes or no: --with-gle=$with_gle"
13632   exit 1
13633
13634 fi
13635
13636
13637 ###############################################################################
13638 #
13639 #       Handle --with-gles
13640 #
13641 ###############################################################################
13642
13643 with_gles_req=unspecified
13644
13645 # Check whether --with-gles was given.
13646 if test "${with_gles+set}" = set; then :
13647   withval=$with_gles; with_gles="$withval"; with_gles_req="$withval"
13648 else
13649   with_gles=no
13650 fi
13651
13652
13653
13654    case "$with_gles" in
13655     yes) ;;
13656     no)  ;;
13657
13658     /*)
13659      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES headers" >&5
13660 $as_echo_n "checking for JWZGLES headers... " >&6; }
13661      d=$with_gles/include
13662      if test -d $d; then
13663        X_CFLAGS="-I$d $X_CFLAGS"
13664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13665 $as_echo "$d" >&6; }
13666      else
13667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13668 $as_echo "not found ($d: no such directory)" >&6; }
13669      fi
13670
13671      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES libs" >&5
13672 $as_echo_n "checking for JWZGLES libs... " >&6; }
13673      d=$with_gles/lib
13674      if test -d $d; then
13675        X_LIBS="-L$d $X_LIBS"
13676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13677 $as_echo "$d" >&6; }
13678      else
13679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13680 $as_echo "not found ($d: no such directory)" >&6; }
13681      fi
13682
13683      # replace the directory string with "yes".
13684      with_gles_req="yes"
13685      with_gles=$with_gles_req
13686      ;;
13687
13688     *)
13689      echo ""
13690      echo "error: argument to --with-gles must be \"yes\", \"no\", or a directory."
13691      echo "       If it is a directory, then \`DIR/include' will be added to"
13692      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13693      exit 1
13694      ;;
13695    esac
13696
13697
13698 if test "$with_gles" = yes; then
13699   have_gles=yes
13700   $as_echo "#define HAVE_JWZGLES 1" >>confdefs.h
13701
13702   JWZGLES_OBJS="jwzgles.o"
13703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OpenGL ES compatiblity shim" >&5
13704 $as_echo "using OpenGL ES compatiblity shim" >&6; }
13705 elif test "$with_gles" != no; then
13706   echo "error: must be yes or no: --with-gles=$with_xpm"
13707   exit 1
13708 fi
13709
13710 ###############################################################################
13711 #
13712 #       Check for -lgdk_pixbuf.
13713 #       These tests are for gdk_pixbuf usage of the hacks,
13714 #       not xscreensaver-demo (thus we have to test again to get
13715 #       the libraries right: don't want to pull in all of GTK
13716 #       for the hacks.)
13717 #
13718 ###############################################################################
13719
13720 have_gdk_pixbuf=no
13721 with_gdk_pixbuf_req=unspecified
13722
13723 # Check whether --with-pixbuf was given.
13724 if test "${with_pixbuf+set}" = set; then :
13725   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
13726 else
13727   with_gdk_pixbuf=yes
13728 fi
13729
13730
13731 # if --with-pixbuf=/directory/ was specified, remember that directory so that
13732 # we can also look for the `gdk-pixbuf-config' program in that directory.
13733 case "$with_gdk_pixbuf" in
13734   /*)
13735     gdk_pixbuf_dir="$with_gdk_pixbuf"
13736     ;;
13737   *)
13738     gdk_pixbuf_dir=""
13739     ;;
13740 esac
13741
13742
13743    case "$with_gdk_pixbuf" in
13744     yes) ;;
13745     no)  ;;
13746
13747     /*)
13748      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF headers" >&5
13749 $as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
13750      d=$with_gdk_pixbuf/include
13751      if test -d $d; then
13752        X_CFLAGS="-I$d $X_CFLAGS"
13753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13754 $as_echo "$d" >&6; }
13755      else
13756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13757 $as_echo "not found ($d: no such directory)" >&6; }
13758      fi
13759
13760      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF libs" >&5
13761 $as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
13762      d=$with_gdk_pixbuf/lib
13763      if test -d $d; then
13764        X_LIBS="-L$d $X_LIBS"
13765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13766 $as_echo "$d" >&6; }
13767      else
13768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13769 $as_echo "not found ($d: no such directory)" >&6; }
13770      fi
13771
13772      # replace the directory string with "yes".
13773      with_gdk_pixbuf_req="yes"
13774      with_gdk_pixbuf=$with_gdk_pixbuf_req
13775      ;;
13776
13777     *)
13778      echo ""
13779      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
13780      echo "       If it is a directory, then \`DIR/include' will be added to"
13781      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13782      exit 1
13783      ;;
13784    esac
13785
13786
13787 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
13788   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
13789   exit 1
13790 fi
13791
13792 if test "$with_gdk_pixbuf" = yes; then
13793   have_gdk_pixbuf=no
13794
13795   pkgs=''
13796   ok="yes"
13797
13798   pkg_check_version gdk-pixbuf-2.0      2.0.0
13799   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
13800   have_gdk_pixbuf="$ok"
13801
13802   if test "$have_gdk_pixbuf" = yes; then
13803     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf includes" >&5
13804 $as_echo_n "checking for gdk-pixbuf includes... " >&6; }
13805 if ${ac_cv_gdk_pixbuf_config_cflags+:} false; then :
13806   $as_echo_n "(cached) " >&6
13807 else
13808   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
13809 fi
13810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
13811 $as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
13812     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf libs" >&5
13813 $as_echo_n "checking for gdk-pixbuf libs... " >&6; }
13814 if ${ac_cv_gdk_pixbuf_config_libs+:} false; then :
13815   $as_echo_n "(cached) " >&6
13816 else
13817   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
13818 fi
13819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_libs" >&5
13820 $as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
13821   fi
13822
13823   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
13824   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
13825
13826
13827   if test "$have_gdk_pixbuf" = yes; then
13828     #
13829     # we appear to have pixbuf; check for headers/libs to be sure.
13830     #
13831     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
13832     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
13833
13834     have_gdk_pixbuf=no
13835
13836     # check for header A...
13837
13838   ac_save_CPPFLAGS="$CPPFLAGS"
13839   if test \! -z "$includedir" ; then
13840     CPPFLAGS="$CPPFLAGS -I$includedir"
13841   fi
13842   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13843   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13844   ac_fn_c_check_header_mongrel "$LINENO" "gdk-pixbuf/gdk-pixbuf.h" "ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" "$ac_includes_default"
13845 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = xyes; then :
13846   have_gdk_pixbuf=yes
13847 fi
13848
13849
13850   CPPFLAGS="$ac_save_CPPFLAGS"
13851
13852     # if that worked, check for header B...
13853     if test "$have_gdk_pixbuf" = yes; then
13854       have_gdk_pixbuf=no
13855       gdk_pixbuf_halfassed=yes
13856
13857   ac_save_CPPFLAGS="$CPPFLAGS"
13858   if test \! -z "$includedir" ; then
13859     CPPFLAGS="$CPPFLAGS -I$includedir"
13860   fi
13861   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13862   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13863   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"
13864 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = xyes; then :
13865   have_gdk_pixbuf=yes
13866                          gdk_pixbuf_halfassed=no
13867 fi
13868
13869
13870   CPPFLAGS="$ac_save_CPPFLAGS"
13871
13872       # yay, it has a new name in Gtk 2.x...
13873       if test "$have_gdk_pixbuf" = no; then
13874         have_gdk_pixbuf=no
13875         gdk_pixbuf_halfassed=yes
13876
13877   ac_save_CPPFLAGS="$CPPFLAGS"
13878   if test \! -z "$includedir" ; then
13879     CPPFLAGS="$CPPFLAGS -I$includedir"
13880   fi
13881   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13882   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13883   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"
13884 if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = xyes; then :
13885   have_gdk_pixbuf=yes
13886                            gdk_pixbuf_halfassed=no
13887 fi
13888
13889
13890   CPPFLAGS="$ac_save_CPPFLAGS"
13891       fi
13892     fi
13893     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
13894   fi
13895
13896   if test "$have_gdk_pixbuf" = yes; then
13897     # we have the headers, now check for the libraries
13898     have_gdk_pixbuf=no
13899     gdk_pixbuf_halfassed=yes
13900
13901     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability..." >&5
13902 $as_echo "checking for gdk_pixbuf usability..." >&6; }
13903
13904     # library A...
13905
13906   ac_save_CPPFLAGS="$CPPFLAGS"
13907   ac_save_LDFLAGS="$LDFLAGS"
13908 #  ac_save_LIBS="$LIBS"
13909
13910   if test \! -z "$includedir" ; then
13911     CPPFLAGS="$CPPFLAGS -I$includedir"
13912   fi
13913   # note: $X_CFLAGS includes $x_includes
13914   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13915
13916   if test \! -z "$libdir" ; then
13917     LDFLAGS="$LDFLAGS -L$libdir"
13918   fi
13919   # note: $X_LIBS includes $x_libraries
13920   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13921
13922   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13923   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_new_from_file in -lc" >&5
13925 $as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
13926 if ${ac_cv_lib_c_gdk_pixbuf_new_from_file+:} false; then :
13927   $as_echo_n "(cached) " >&6
13928 else
13929   ac_check_lib_save_LIBS=$LIBS
13930 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
13931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13932 /* end confdefs.h.  */
13933
13934 /* Override any GCC internal prototype to avoid an error.
13935    Use char because int might match the return type of a GCC
13936    builtin and then its argument prototype would still apply.  */
13937 #ifdef __cplusplus
13938 extern "C"
13939 #endif
13940 char gdk_pixbuf_new_from_file ();
13941 int
13942 main ()
13943 {
13944 return gdk_pixbuf_new_from_file ();
13945   ;
13946   return 0;
13947 }
13948 _ACEOF
13949 if ac_fn_c_try_link "$LINENO"; then :
13950   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
13951 else
13952   ac_cv_lib_c_gdk_pixbuf_new_from_file=no
13953 fi
13954 rm -f core conftest.err conftest.$ac_objext \
13955     conftest$ac_exeext conftest.$ac_ext
13956 LIBS=$ac_check_lib_save_LIBS
13957 fi
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
13959 $as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
13960 if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = xyes; then :
13961   have_gdk_pixbuf=yes
13962 fi
13963
13964   CPPFLAGS="$ac_save_CPPFLAGS"
13965   LDFLAGS="$ac_save_LDFLAGS"
13966 #  LIBS="$ac_save_LIBS"
13967
13968     # library B...
13969     if test "$have_gdk_pixbuf" = yes; then
13970       have_gdk_pixbuf=no
13971
13972   ac_save_CPPFLAGS="$CPPFLAGS"
13973   ac_save_LDFLAGS="$LDFLAGS"
13974 #  ac_save_LIBS="$LIBS"
13975
13976   if test \! -z "$includedir" ; then
13977     CPPFLAGS="$CPPFLAGS -I$includedir"
13978   fi
13979   # note: $X_CFLAGS includes $x_includes
13980   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13981
13982   if test \! -z "$libdir" ; then
13983     LDFLAGS="$LDFLAGS -L$libdir"
13984   fi
13985   # note: $X_LIBS includes $x_libraries
13986   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13987
13988   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13989   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13990   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_xlib_init in -lc" >&5
13991 $as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
13992 if ${ac_cv_lib_c_gdk_pixbuf_xlib_init+:} false; then :
13993   $as_echo_n "(cached) " >&6
13994 else
13995   ac_check_lib_save_LIBS=$LIBS
13996 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
13997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13998 /* end confdefs.h.  */
13999
14000 /* Override any GCC internal prototype to avoid an error.
14001    Use char because int might match the return type of a GCC
14002    builtin and then its argument prototype would still apply.  */
14003 #ifdef __cplusplus
14004 extern "C"
14005 #endif
14006 char gdk_pixbuf_xlib_init ();
14007 int
14008 main ()
14009 {
14010 return gdk_pixbuf_xlib_init ();
14011   ;
14012   return 0;
14013 }
14014 _ACEOF
14015 if ac_fn_c_try_link "$LINENO"; then :
14016   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
14017 else
14018   ac_cv_lib_c_gdk_pixbuf_xlib_init=no
14019 fi
14020 rm -f core conftest.err conftest.$ac_objext \
14021     conftest$ac_exeext conftest.$ac_ext
14022 LIBS=$ac_check_lib_save_LIBS
14023 fi
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
14025 $as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
14026 if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = xyes; then :
14027   have_gdk_pixbuf=yes
14028                       gdk_pixbuf_halfassed=no
14029 fi
14030
14031   CPPFLAGS="$ac_save_CPPFLAGS"
14032   LDFLAGS="$ac_save_LDFLAGS"
14033 #  LIBS="$ac_save_LIBS"
14034
14035     fi
14036   fi
14037
14038   if test "$have_gdk_pixbuf" = yes; then
14039     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
14040     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
14041     $as_echo "#define HAVE_GDK_PIXBUF 1" >>confdefs.h
14042
14043   else
14044     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability... no" >&5
14045 $as_echo "checking for gdk_pixbuf usability... no" >&6; }
14046   fi
14047
14048   if test "$have_gdk_pixbuf" = yes; then
14049
14050   ac_save_CPPFLAGS="$CPPFLAGS"
14051   ac_save_LDFLAGS="$LDFLAGS"
14052 #  ac_save_LIBS="$LIBS"
14053
14054   if test \! -z "$includedir" ; then
14055     CPPFLAGS="$CPPFLAGS -I$includedir"
14056   fi
14057   # note: $X_CFLAGS includes $x_includes
14058   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14059
14060   if test \! -z "$libdir" ; then
14061     LDFLAGS="$LDFLAGS -L$libdir"
14062   fi
14063   # note: $X_LIBS includes $x_libraries
14064   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14065
14066   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14067   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
14069 $as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
14070 if ${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+:} false; then :
14071   $as_echo_n "(cached) " >&6
14072 else
14073   ac_check_lib_save_LIBS=$LIBS
14074 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
14075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14076 /* end confdefs.h.  */
14077
14078 /* Override any GCC internal prototype to avoid an error.
14079    Use char because int might match the return type of a GCC
14080    builtin and then its argument prototype would still apply.  */
14081 #ifdef __cplusplus
14082 extern "C"
14083 #endif
14084 char gdk_pixbuf_apply_embedded_orientation ();
14085 int
14086 main ()
14087 {
14088 return gdk_pixbuf_apply_embedded_orientation ();
14089   ;
14090   return 0;
14091 }
14092 _ACEOF
14093 if ac_fn_c_try_link "$LINENO"; then :
14094   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
14095 else
14096   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
14097 fi
14098 rm -f core conftest.err conftest.$ac_objext \
14099     conftest$ac_exeext conftest.$ac_ext
14100 LIBS=$ac_check_lib_save_LIBS
14101 fi
14102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
14103 $as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
14104 if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = xyes; then :
14105   $as_echo "#define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1" >>confdefs.h
14106
14107 fi
14108
14109   CPPFLAGS="$ac_save_CPPFLAGS"
14110   LDFLAGS="$ac_save_LDFLAGS"
14111 #  LIBS="$ac_save_LIBS"
14112
14113   fi
14114 fi
14115
14116
14117 ###############################################################################
14118 #
14119 #       Check for -lXpm.
14120 #
14121 ###############################################################################
14122
14123 have_xpm=no
14124 with_xpm_req=unspecified
14125
14126 # Check whether --with-xpm was given.
14127 if test "${with_xpm+set}" = set; then :
14128   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
14129 else
14130   with_xpm=yes
14131 fi
14132
14133
14134
14135    case "$with_xpm" in
14136     yes) ;;
14137     no)  ;;
14138
14139     /*)
14140      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM headers" >&5
14141 $as_echo_n "checking for XPM headers... " >&6; }
14142      d=$with_xpm/include
14143      if test -d $d; then
14144        X_CFLAGS="-I$d $X_CFLAGS"
14145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14146 $as_echo "$d" >&6; }
14147      else
14148        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14149 $as_echo "not found ($d: no such directory)" >&6; }
14150      fi
14151
14152      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM libs" >&5
14153 $as_echo_n "checking for XPM libs... " >&6; }
14154      d=$with_xpm/lib
14155      if test -d $d; then
14156        X_LIBS="-L$d $X_LIBS"
14157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14158 $as_echo "$d" >&6; }
14159      else
14160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14161 $as_echo "not found ($d: no such directory)" >&6; }
14162      fi
14163
14164      # replace the directory string with "yes".
14165      with_xpm_req="yes"
14166      with_xpm=$with_xpm_req
14167      ;;
14168
14169     *)
14170      echo ""
14171      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
14172      echo "       If it is a directory, then \`DIR/include' will be added to"
14173      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14174      exit 1
14175      ;;
14176    esac
14177
14178
14179 if test "$with_xpm" = yes; then
14180
14181   ac_save_CPPFLAGS="$CPPFLAGS"
14182   if test \! -z "$includedir" ; then
14183     CPPFLAGS="$CPPFLAGS -I$includedir"
14184   fi
14185   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14186   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14187   ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "#include <X11/Xlib.h>
14188 "
14189 if test "x$ac_cv_header_X11_xpm_h" = xyes; then :
14190   have_xpm=yes
14191                     $as_echo "#define HAVE_XPM 1" >>confdefs.h
14192
14193                     XPM_LIBS="-lXpm $XPM_LIBS"
14194 fi
14195
14196
14197   CPPFLAGS="$ac_save_CPPFLAGS"
14198 elif test "$with_xpm" != no; then
14199   echo "error: must be yes or no: --with-xpm=$with_xpm"
14200   exit 1
14201 fi
14202
14203 # See comment near $motif_requires_xpm, above.
14204 # Need to do this here, after both Motif and XPM have been checked for.
14205 #
14206 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
14207   if test "$motif_requires_xpm" = yes ; then
14208     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
14209   fi
14210 fi
14211
14212 if test "$XPM_LIBS" = "" ; then
14213   XPM_LIBS=$(MINIXPM)
14214 fi
14215
14216
14217 ###############################################################################
14218 #
14219 #       Check for -ljpeg
14220 #
14221 ###############################################################################
14222
14223 have_jpeg=no
14224 with_jpeg_req=unspecified
14225 jpeg_halfassed=no
14226
14227 # Check whether --with-jpeg was given.
14228 if test "${with_jpeg+set}" = set; then :
14229   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
14230 else
14231   with_jpeg=yes
14232 fi
14233
14234
14235
14236    case "$with_jpeg" in
14237     yes) ;;
14238     no)  ;;
14239
14240     /*)
14241      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG headers" >&5
14242 $as_echo_n "checking for JPEG headers... " >&6; }
14243      d=$with_jpeg/include
14244      if test -d $d; then
14245        X_CFLAGS="-I$d $X_CFLAGS"
14246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14247 $as_echo "$d" >&6; }
14248      else
14249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14250 $as_echo "not found ($d: no such directory)" >&6; }
14251      fi
14252
14253      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG libs" >&5
14254 $as_echo_n "checking for JPEG libs... " >&6; }
14255      d=$with_jpeg/lib
14256      if test -d $d; then
14257        X_LIBS="-L$d $X_LIBS"
14258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14259 $as_echo "$d" >&6; }
14260      else
14261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14262 $as_echo "not found ($d: no such directory)" >&6; }
14263      fi
14264
14265      # replace the directory string with "yes".
14266      with_jpeg_req="yes"
14267      with_jpeg=$with_jpeg_req
14268      ;;
14269
14270     *)
14271      echo ""
14272      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
14273      echo "       If it is a directory, then \`DIR/include' will be added to"
14274      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14275      exit 1
14276      ;;
14277    esac
14278
14279
14280 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
14281   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
14282   exit 1
14283 fi
14284
14285 if test "$with_jpeg" = yes; then
14286
14287   have_jpeg=no
14288
14289   ac_save_CPPFLAGS="$CPPFLAGS"
14290   if test \! -z "$includedir" ; then
14291     CPPFLAGS="$CPPFLAGS -I$includedir"
14292   fi
14293   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14294   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14295   ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
14296 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
14297   have_jpeg=yes
14298 fi
14299
14300
14301   CPPFLAGS="$ac_save_CPPFLAGS"
14302
14303   if test "$have_jpeg" = yes; then
14304     # we have the header, now check for the library
14305     have_jpeg=no
14306     jpeg_halfassed=yes
14307
14308   ac_save_CPPFLAGS="$CPPFLAGS"
14309   ac_save_LDFLAGS="$LDFLAGS"
14310 #  ac_save_LIBS="$LIBS"
14311
14312   if test \! -z "$includedir" ; then
14313     CPPFLAGS="$CPPFLAGS -I$includedir"
14314   fi
14315   # note: $X_CFLAGS includes $x_includes
14316   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14317
14318   if test \! -z "$libdir" ; then
14319     LDFLAGS="$LDFLAGS -L$libdir"
14320   fi
14321   # note: $X_LIBS includes $x_libraries
14322   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14323
14324   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14325   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14326   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_start_compress in -ljpeg" >&5
14327 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
14328 if ${ac_cv_lib_jpeg_jpeg_start_compress+:} false; then :
14329   $as_echo_n "(cached) " >&6
14330 else
14331   ac_check_lib_save_LIBS=$LIBS
14332 LIBS="-ljpeg  $LIBS"
14333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14334 /* end confdefs.h.  */
14335
14336 /* Override any GCC internal prototype to avoid an error.
14337    Use char because int might match the return type of a GCC
14338    builtin and then its argument prototype would still apply.  */
14339 #ifdef __cplusplus
14340 extern "C"
14341 #endif
14342 char jpeg_start_compress ();
14343 int
14344 main ()
14345 {
14346 return jpeg_start_compress ();
14347   ;
14348   return 0;
14349 }
14350 _ACEOF
14351 if ac_fn_c_try_link "$LINENO"; then :
14352   ac_cv_lib_jpeg_jpeg_start_compress=yes
14353 else
14354   ac_cv_lib_jpeg_jpeg_start_compress=no
14355 fi
14356 rm -f core conftest.err conftest.$ac_objext \
14357     conftest$ac_exeext conftest.$ac_ext
14358 LIBS=$ac_check_lib_save_LIBS
14359 fi
14360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
14361 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
14362 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = xyes; then :
14363   have_jpeg=yes
14364                     jpeg_halfassed=no
14365                     JPEG_LIBS="-ljpeg"
14366                     $as_echo "#define HAVE_JPEGLIB 1" >>confdefs.h
14367
14368 fi
14369
14370   CPPFLAGS="$ac_save_CPPFLAGS"
14371   LDFLAGS="$ac_save_LDFLAGS"
14372 #  LIBS="$ac_save_LIBS"
14373
14374   fi
14375 fi
14376
14377
14378 ###############################################################################
14379 #
14380 #       Check for pty support: this allows 'phosphor' and 'apple2'
14381 #       to run curses-based programs, or be used as terminal windows.
14382 #
14383 ###############################################################################
14384
14385 PTY_LIBS=
14386 for ac_header in pty.h util.h
14387 do :
14388   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14389 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14390 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14391   cat >>confdefs.h <<_ACEOF
14392 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14393 _ACEOF
14394
14395 fi
14396
14397 done
14398
14399
14400   ac_save_CPPFLAGS="$CPPFLAGS"
14401   ac_save_LDFLAGS="$LDFLAGS"
14402 #  ac_save_LIBS="$LIBS"
14403
14404   if test \! -z "$includedir" ; then
14405     CPPFLAGS="$CPPFLAGS -I$includedir"
14406   fi
14407   # note: $X_CFLAGS includes $x_includes
14408   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14409
14410   if test \! -z "$libdir" ; then
14411     LDFLAGS="$LDFLAGS -L$libdir"
14412   fi
14413   # note: $X_LIBS includes $x_libraries
14414   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14415
14416   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14417   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
14419 $as_echo_n "checking for forkpty in -lutil... " >&6; }
14420 if ${ac_cv_lib_util_forkpty+:} false; then :
14421   $as_echo_n "(cached) " >&6
14422 else
14423   ac_check_lib_save_LIBS=$LIBS
14424 LIBS="-lutil  $LIBS"
14425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14426 /* end confdefs.h.  */
14427
14428 /* Override any GCC internal prototype to avoid an error.
14429    Use char because int might match the return type of a GCC
14430    builtin and then its argument prototype would still apply.  */
14431 #ifdef __cplusplus
14432 extern "C"
14433 #endif
14434 char forkpty ();
14435 int
14436 main ()
14437 {
14438 return forkpty ();
14439   ;
14440   return 0;
14441 }
14442 _ACEOF
14443 if ac_fn_c_try_link "$LINENO"; then :
14444   ac_cv_lib_util_forkpty=yes
14445 else
14446   ac_cv_lib_util_forkpty=no
14447 fi
14448 rm -f core conftest.err conftest.$ac_objext \
14449     conftest$ac_exeext conftest.$ac_ext
14450 LIBS=$ac_check_lib_save_LIBS
14451 fi
14452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
14453 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
14454 if test "x$ac_cv_lib_util_forkpty" = xyes; then :
14455   PTY_LIBS="-lutil"
14456                 ac_have_forkpty=yes
14457                 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
14458
14459 fi
14460
14461   CPPFLAGS="$ac_save_CPPFLAGS"
14462   LDFLAGS="$ac_save_LDFLAGS"
14463 #  LIBS="$ac_save_LIBS"
14464
14465
14466 if test "$ac_have_forkpty" != yes ; then
14467   # we don't need (or have) -lutil on MacOS 10.4.2...
14468
14469   ac_save_CPPFLAGS="$CPPFLAGS"
14470   ac_save_LDFLAGS="$LDFLAGS"
14471 #  ac_save_LIBS="$LIBS"
14472
14473   if test \! -z "$includedir" ; then
14474     CPPFLAGS="$CPPFLAGS -I$includedir"
14475   fi
14476   # note: $X_CFLAGS includes $x_includes
14477   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14478
14479   if test \! -z "$libdir" ; then
14480     LDFLAGS="$LDFLAGS -L$libdir"
14481   fi
14482   # note: $X_LIBS includes $x_libraries
14483   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14484
14485   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14486   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14487   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lc" >&5
14488 $as_echo_n "checking for forkpty in -lc... " >&6; }
14489 if ${ac_cv_lib_c_forkpty+:} false; then :
14490   $as_echo_n "(cached) " >&6
14491 else
14492   ac_check_lib_save_LIBS=$LIBS
14493 LIBS="-lc  $LIBS"
14494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14495 /* end confdefs.h.  */
14496
14497 /* Override any GCC internal prototype to avoid an error.
14498    Use char because int might match the return type of a GCC
14499    builtin and then its argument prototype would still apply.  */
14500 #ifdef __cplusplus
14501 extern "C"
14502 #endif
14503 char forkpty ();
14504 int
14505 main ()
14506 {
14507 return forkpty ();
14508   ;
14509   return 0;
14510 }
14511 _ACEOF
14512 if ac_fn_c_try_link "$LINENO"; then :
14513   ac_cv_lib_c_forkpty=yes
14514 else
14515   ac_cv_lib_c_forkpty=no
14516 fi
14517 rm -f core conftest.err conftest.$ac_objext \
14518     conftest$ac_exeext conftest.$ac_ext
14519 LIBS=$ac_check_lib_save_LIBS
14520 fi
14521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_forkpty" >&5
14522 $as_echo "$ac_cv_lib_c_forkpty" >&6; }
14523 if test "x$ac_cv_lib_c_forkpty" = xyes; then :
14524   PTY_LIBS=""
14525                   $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
14526
14527 fi
14528
14529   CPPFLAGS="$ac_save_CPPFLAGS"
14530   LDFLAGS="$ac_save_LDFLAGS"
14531 #  LIBS="$ac_save_LIBS"
14532
14533 fi
14534
14535 ###############################################################################
14536 #
14537 #       Check for the XSHM server extension.
14538 #
14539 ###############################################################################
14540
14541 have_xshm=no
14542 with_xshm_req=unspecified
14543
14544 # Check whether --with-xshm-ext was given.
14545 if test "${with_xshm_ext+set}" = set; then :
14546   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
14547 else
14548   with_xshm=yes
14549 fi
14550
14551
14552
14553    case "$with_xshm" in
14554     yes) ;;
14555     no)  ;;
14556
14557     /*)
14558      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM headers" >&5
14559 $as_echo_n "checking for XSHM headers... " >&6; }
14560      d=$with_xshm/include
14561      if test -d $d; then
14562        X_CFLAGS="-I$d $X_CFLAGS"
14563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14564 $as_echo "$d" >&6; }
14565      else
14566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14567 $as_echo "not found ($d: no such directory)" >&6; }
14568      fi
14569
14570      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM libs" >&5
14571 $as_echo_n "checking for XSHM libs... " >&6; }
14572      d=$with_xshm/lib
14573      if test -d $d; then
14574        X_LIBS="-L$d $X_LIBS"
14575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14576 $as_echo "$d" >&6; }
14577      else
14578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14579 $as_echo "not found ($d: no such directory)" >&6; }
14580      fi
14581
14582      # replace the directory string with "yes".
14583      with_xshm_req="yes"
14584      with_xshm=$with_xshm_req
14585      ;;
14586
14587     *)
14588      echo ""
14589      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
14590      echo "       If it is a directory, then \`DIR/include' will be added to"
14591      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14592      exit 1
14593      ;;
14594    esac
14595
14596
14597 if test "$with_xshm" = yes; then
14598
14599   # first check for Xshm.h.
14600
14601   ac_save_CPPFLAGS="$CPPFLAGS"
14602   if test \! -z "$includedir" ; then
14603     CPPFLAGS="$CPPFLAGS -I$includedir"
14604   fi
14605   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14606   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14607   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XShm.h" "ac_cv_header_X11_extensions_XShm_h" "#include <X11/Xlib.h>
14608 "
14609 if test "x$ac_cv_header_X11_extensions_XShm_h" = xyes; then :
14610   have_xshm=yes
14611 fi
14612
14613
14614   CPPFLAGS="$ac_save_CPPFLAGS"
14615
14616   # if that succeeded, then check for sys/ipc.h.
14617   if test "$have_xshm" = yes; then
14618     have_xshm=no
14619
14620   ac_save_CPPFLAGS="$CPPFLAGS"
14621   if test \! -z "$includedir" ; then
14622     CPPFLAGS="$CPPFLAGS -I$includedir"
14623   fi
14624   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14625   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14626   ac_fn_c_check_header_mongrel "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
14627 if test "x$ac_cv_header_sys_ipc_h" = xyes; then :
14628   have_xshm=yes
14629 fi
14630
14631
14632   CPPFLAGS="$ac_save_CPPFLAGS"
14633   fi
14634
14635   # if that succeeded, then check for sys/shm.h.
14636   if test "$have_xshm" = yes; then
14637     have_xshm=no
14638
14639   ac_save_CPPFLAGS="$CPPFLAGS"
14640   if test \! -z "$includedir" ; then
14641     CPPFLAGS="$CPPFLAGS -I$includedir"
14642   fi
14643   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14644   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14645   ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
14646 if test "x$ac_cv_header_sys_shm_h" = xyes; then :
14647   have_xshm=yes
14648 fi
14649
14650
14651   CPPFLAGS="$ac_save_CPPFLAGS"
14652   fi
14653
14654   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
14655   # to exist, but the library code to not exist.  And even better, the library
14656   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
14657   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
14658   # that's not quite right, but close enough.)
14659   #
14660   case "$host" in
14661     *-aix*)
14662       if  `uname -v` -eq 3 ; then
14663         have_xshm=no
14664
14665   ac_save_CPPFLAGS="$CPPFLAGS"
14666   ac_save_LDFLAGS="$LDFLAGS"
14667 #  ac_save_LIBS="$LIBS"
14668
14669   if test \! -z "$includedir" ; then
14670     CPPFLAGS="$CPPFLAGS -I$includedir"
14671   fi
14672   # note: $X_CFLAGS includes $x_includes
14673   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14674
14675   if test \! -z "$libdir" ; then
14676     LDFLAGS="$LDFLAGS -L$libdir"
14677   fi
14678   # note: $X_LIBS includes $x_libraries
14679   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14680
14681   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14682   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14683   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryExtension in -lXextSam" >&5
14684 $as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
14685 if ${ac_cv_lib_XextSam_XShmQueryExtension+:} false; then :
14686   $as_echo_n "(cached) " >&6
14687 else
14688   ac_check_lib_save_LIBS=$LIBS
14689 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
14690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14691 /* end confdefs.h.  */
14692
14693 /* Override any GCC internal prototype to avoid an error.
14694    Use char because int might match the return type of a GCC
14695    builtin and then its argument prototype would still apply.  */
14696 #ifdef __cplusplus
14697 extern "C"
14698 #endif
14699 char XShmQueryExtension ();
14700 int
14701 main ()
14702 {
14703 return XShmQueryExtension ();
14704   ;
14705   return 0;
14706 }
14707 _ACEOF
14708 if ac_fn_c_try_link "$LINENO"; then :
14709   ac_cv_lib_XextSam_XShmQueryExtension=yes
14710 else
14711   ac_cv_lib_XextSam_XShmQueryExtension=no
14712 fi
14713 rm -f core conftest.err conftest.$ac_objext \
14714     conftest$ac_exeext conftest.$ac_ext
14715 LIBS=$ac_check_lib_save_LIBS
14716 fi
14717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
14718 $as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
14719 if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = xyes; then :
14720   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
14721 else
14722   true
14723 fi
14724
14725   CPPFLAGS="$ac_save_CPPFLAGS"
14726   LDFLAGS="$ac_save_LDFLAGS"
14727 #  LIBS="$ac_save_LIBS"
14728
14729       fi
14730     ;;
14731   esac
14732
14733   # if that succeeded, then we've really got it.
14734   if test "$have_xshm" = yes; then
14735     $as_echo "#define HAVE_XSHM_EXTENSION 1" >>confdefs.h
14736
14737   fi
14738
14739 elif test "$with_xshm" != no; then
14740   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
14741   exit 1
14742 fi
14743
14744
14745 ###############################################################################
14746 #
14747 #       Check for the DOUBLE-BUFFER server extension.
14748 #
14749 ###############################################################################
14750
14751 have_xdbe=no
14752 with_xdbe_req=unspecified
14753
14754 # Check whether --with-xdbe-ext was given.
14755 if test "${with_xdbe_ext+set}" = set; then :
14756   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
14757 else
14758   with_xdbe=yes
14759 fi
14760
14761
14762
14763    case "$with_xdbe" in
14764     yes) ;;
14765     no)  ;;
14766
14767     /*)
14768      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER headers" >&5
14769 $as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
14770      d=$with_xdbe/include
14771      if test -d $d; then
14772        X_CFLAGS="-I$d $X_CFLAGS"
14773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14774 $as_echo "$d" >&6; }
14775      else
14776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14777 $as_echo "not found ($d: no such directory)" >&6; }
14778      fi
14779
14780      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER libs" >&5
14781 $as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
14782      d=$with_xdbe/lib
14783      if test -d $d; then
14784        X_LIBS="-L$d $X_LIBS"
14785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14786 $as_echo "$d" >&6; }
14787      else
14788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14789 $as_echo "not found ($d: no such directory)" >&6; }
14790      fi
14791
14792      # replace the directory string with "yes".
14793      with_xdbe_req="yes"
14794      with_xdbe=$with_xdbe_req
14795      ;;
14796
14797     *)
14798      echo ""
14799      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
14800      echo "       If it is a directory, then \`DIR/include' will be added to"
14801      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14802      exit 1
14803      ;;
14804    esac
14805
14806
14807 if test "$with_xdbe" = yes; then
14808
14809
14810   ac_save_CPPFLAGS="$CPPFLAGS"
14811   if test \! -z "$includedir" ; then
14812     CPPFLAGS="$CPPFLAGS -I$includedir"
14813   fi
14814   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14815   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14816   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xdbe.h" "ac_cv_header_X11_extensions_Xdbe_h" "#include <X11/Xlib.h>
14817 "
14818 if test "x$ac_cv_header_X11_extensions_Xdbe_h" = xyes; then :
14819   have_xdbe=yes
14820 fi
14821
14822
14823   CPPFLAGS="$ac_save_CPPFLAGS"
14824   if test "$have_xdbe" = yes; then
14825     $as_echo "#define HAVE_DOUBLE_BUFFER_EXTENSION 1" >>confdefs.h
14826
14827   fi
14828
14829 elif test "$with_xdbe" != no; then
14830   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
14831   exit 1
14832 fi
14833
14834
14835 ###############################################################################
14836 #
14837 #       Check for the SGI XReadDisplay server extension.
14838 #
14839 #       Note: this has to be down here, rather than up with the other server
14840 #       extension tests, so that the output of `configure --help' is in the
14841 #       right order.  Arrgh!
14842 #
14843 ###############################################################################
14844
14845 have_readdisplay=no
14846 with_readdisplay_req=unspecified
14847
14848 # Check whether --with-readdisplay was given.
14849 if test "${with_readdisplay+set}" = set; then :
14850   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
14851 else
14852   with_readdisplay=yes
14853 fi
14854
14855
14856
14857    case "$with_readdisplay" in
14858     yes) ;;
14859     no)  ;;
14860
14861     /*)
14862      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay headers" >&5
14863 $as_echo_n "checking for XReadDisplay headers... " >&6; }
14864      d=$with_readdisplay/include
14865      if test -d $d; then
14866        X_CFLAGS="-I$d $X_CFLAGS"
14867        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14868 $as_echo "$d" >&6; }
14869      else
14870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14871 $as_echo "not found ($d: no such directory)" >&6; }
14872      fi
14873
14874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay libs" >&5
14875 $as_echo_n "checking for XReadDisplay libs... " >&6; }
14876      d=$with_readdisplay/lib
14877      if test -d $d; then
14878        X_LIBS="-L$d $X_LIBS"
14879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14880 $as_echo "$d" >&6; }
14881      else
14882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14883 $as_echo "not found ($d: no such directory)" >&6; }
14884      fi
14885
14886      # replace the directory string with "yes".
14887      with_readdisplay_req="yes"
14888      with_readdisplay=$with_readdisplay_req
14889      ;;
14890
14891     *)
14892      echo ""
14893      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
14894      echo "       If it is a directory, then \`DIR/include' will be added to"
14895      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14896      exit 1
14897      ;;
14898    esac
14899
14900
14901 if test "$with_readdisplay" = yes; then
14902
14903   ac_save_CPPFLAGS="$CPPFLAGS"
14904   if test \! -z "$includedir" ; then
14905     CPPFLAGS="$CPPFLAGS -I$includedir"
14906   fi
14907   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14908   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14909   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/readdisplay.h" "ac_cv_header_X11_extensions_readdisplay_h" "#include <X11/Xlib.h>
14910 "
14911 if test "x$ac_cv_header_X11_extensions_readdisplay_h" = xyes; then :
14912   $as_echo "#define HAVE_READ_DISPLAY_EXTENSION 1" >>confdefs.h
14913
14914 fi
14915
14916
14917   CPPFLAGS="$ac_save_CPPFLAGS"
14918 elif test "$with_readdisplay" != no; then
14919   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
14920   exit 1
14921 fi
14922
14923
14924 ###############################################################################
14925 #
14926 #       Check for a directory full of images to use as the default value
14927 #       of the "imageDirectory" preference.
14928 #
14929 ###############################################################################
14930
14931 have_imagedir=no
14932 with_imagedir_req=unspecified
14933
14934
14935 # Check whether --with-image-directory was given.
14936 if test "${with_image_directory+set}" = set; then :
14937   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
14938 else
14939   with_imagedir=yes
14940 fi
14941
14942 # no HANDLE_X_PATH_ARG for this one
14943
14944 case "$with_imagedir" in
14945   /*)
14946     # absolute path
14947     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $with_imagedir" >&5
14948 $as_echo_n "checking for image directory $with_imagedir... " >&6; }
14949     if test -d "$with_imagedir" ; then
14950       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14951 $as_echo "yes" >&6; }
14952     else
14953       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14954 $as_echo "no" >&6; }
14955       with_imagedir=""
14956     fi
14957   ;;
14958   yes)
14959     with_imagedir=""
14960
14961     #### Could use some more defaults here...
14962     for dd in \
14963       "/usr/share/backgrounds/images/"          \
14964       "/usr/share/wallpapers/"                  \
14965       "/Library/Desktop Pictures/"              \
14966     ; do
14967       if test -z "$with_imagedir"; then
14968         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $dd" >&5
14969 $as_echo_n "checking for image directory $dd... " >&6; }
14970         if test -d "$dd" ; then
14971           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14972 $as_echo "yes" >&6; }
14973           with_imagedir="$dd"
14974         else
14975           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14976 $as_echo "no" >&6; }
14977         fi
14978       fi
14979     done
14980
14981   ;;
14982   no)
14983     with_imagedir=""
14984   ;;
14985
14986   *)
14987     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
14988     exit 1
14989   ;;
14990 esac
14991 ac_cv_imagedir="$with_imagedir"
14992
14993 DEFAULT_IMAGES_P='True'
14994 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
14995
14996 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
14997   DEFAULT_IMAGES_P='False'
14998 fi
14999
15000
15001 ###############################################################################
15002 #
15003 #       Pick a text file to use as the default of the "textFile" preference.
15004 #       Any old file will do, but preferably one that will make interesting
15005 #       shapes when displayed by "starwars" and "fontglide".
15006 #
15007 ###############################################################################
15008
15009 have_textfile=no
15010 with_textfile_req=unspecified
15011
15012
15013 # Check whether --with-text-file was given.
15014 if test "${with_text_file+set}" = set; then :
15015   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
15016 else
15017   with_textfile=yes
15018 fi
15019
15020 # no HANDLE_X_PATH_ARG for this one
15021
15022 case "$with_textfile" in
15023   /*)
15024     # absolute path
15025     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $with_textfile" >&5
15026 $as_echo_n "checking for text file $with_textfile... " >&6; }
15027     if test -f "$with_textfile" ; then
15028       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15029 $as_echo "yes" >&6; }
15030     else
15031       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15032 $as_echo "no" >&6; }
15033       with_textfile=""
15034     fi
15035   ;;
15036   yes)
15037     with_textfile=""
15038
15039     #### Could use some more defaults here...
15040     for f in \
15041       "/usr/X11R6/lib/X11/doc/README"              \
15042       "/usr/share/doc/xserver-common/copyright"    \
15043       "/usr/share/doc/xserver-xorg-core/copyright" \
15044       "/usr/X11R6/README"                          \
15045       "/usr/share/doc/libX11*/COPYING"             \
15046       "/usr/X11/share/X11/doc/README*"             \
15047       "/usr/share/doc/debian/debian-manifesto"     \
15048     ; do
15049       if test -z "$with_textfile"; then
15050         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $f" >&5
15051 $as_echo_n "checking for text file $f... " >&6; }
15052         f=`/bin/ls $f 2>&- | head -1`
15053         if test -f "$f" ; then
15054           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15055 $as_echo "yes" >&6; }
15056           with_textfile="$f"
15057         else
15058           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15059 $as_echo "no" >&6; }
15060         fi
15061       fi
15062     done
15063
15064   ;;
15065   no)
15066     with_textfile=""
15067   ;;
15068
15069   *)
15070     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
15071     exit 1
15072   ;;
15073 esac
15074 ac_cv_textfile="$with_textfile"
15075
15076 DEFAULT_TEXT_FILE="$ac_cv_textfile"
15077
15078
15079 ###############################################################################
15080 #
15081 #       Check the browser to see help URL
15082 #
15083 ###############################################################################
15084
15085 have_browser=no
15086 with_browser_req=unspecified
15087
15088
15089 # Check whether --with-browser was given.
15090 if test "${with_browser+set}" = set; then :
15091   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
15092 else
15093   with_browser=no
15094 fi
15095
15096 # no HANDLE_X_PATH_ARG for this one
15097
15098 case "$with_browser" in
15099   no )
15100   ;;
15101   * )
15102     WITH_BROWSER=$with_browser
15103     gnome_open_program=$with_browser
15104     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for browser $with_browser" >&5
15105 $as_echo_n "checking for browser $with_browser... " >&6; }
15106     with_browser_fullpath=`which $with_browser 2>/dev/null`
15107     case $with_browser_fullpath in
15108          /* )
15109                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15110 $as_echo "yes" >&6; }
15111                  have_browser=yes
15112                  ;;
15113         * )
15114                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15115 $as_echo "no" >&6; }
15116 # Only warning: we don't want to install all packages for the
15117 # dependency of the browser in building stage...
15118                echo "WARNING: browser not found: --with-browser=$with_browser"
15119                ;;
15120     esac
15121   ;;
15122 esac
15123 ac_cv_browser="$with_browser"
15124
15125 ###############################################################################
15126 #
15127 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
15128 #       This should be safe, but let's give people the option.
15129 #
15130 ###############################################################################
15131
15132 setuid_hacks_default=no
15133 setuid_hacks="$setuid_hacks_default"
15134
15135 # Check whether --with-setuid-hacks was given.
15136 if test "${with_setuid_hacks+set}" = set; then :
15137   withval=$with_setuid_hacks; setuid_hacks="$withval"
15138 else
15139   setuid_hacks="$setuid_hacks_default"
15140 fi
15141
15142
15143
15144    case "$setuid_hacks" in
15145     yes) ;;
15146     no)  ;;
15147
15148     /*)
15149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks headers" >&5
15150 $as_echo_n "checking for setuid hacks headers... " >&6; }
15151      d=$setuid_hacks/include
15152      if test -d $d; then
15153        X_CFLAGS="-I$d $X_CFLAGS"
15154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15155 $as_echo "$d" >&6; }
15156      else
15157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15158 $as_echo "not found ($d: no such directory)" >&6; }
15159      fi
15160
15161      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks libs" >&5
15162 $as_echo_n "checking for setuid hacks libs... " >&6; }
15163      d=$setuid_hacks/lib
15164      if test -d $d; then
15165        X_LIBS="-L$d $X_LIBS"
15166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15167 $as_echo "$d" >&6; }
15168      else
15169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15170 $as_echo "not found ($d: no such directory)" >&6; }
15171      fi
15172
15173      # replace the directory string with "yes".
15174      setuid_hacks_req="yes"
15175      setuid_hacks=$setuid_hacks_req
15176      ;;
15177
15178     *)
15179      echo ""
15180      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
15181      echo "       If it is a directory, then \`DIR/include' will be added to"
15182      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15183      exit 1
15184      ;;
15185    esac
15186
15187
15188 if test "$setuid_hacks" = yes; then
15189   true
15190 elif test "$setuid_hacks" != no; then
15191   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
15192   exit 1
15193 fi
15194
15195
15196 ###############################################################################
15197 #
15198 #       Done testing.  Now, set up the various -I and -L variables,
15199 #       and decide which GUI program to build by default.
15200 #
15201 ###############################################################################
15202
15203 DEPEND=makedepend
15204 DEPEND_FLAGS=
15205 DEPEND_DEFINES=
15206
15207
15208 if test \! -z "$includedir" ; then
15209   INCLUDES="$INCLUDES -I$includedir"
15210 fi
15211
15212 if test \! -z "$libdir" ; then
15213   LDFLAGS="$LDFLAGS -L$libdir"
15214 fi
15215
15216
15217 PREFERRED_DEMO_PROGRAM=''
15218 ALL_DEMO_PROGRAMS=
15219 if test "$have_motif" = yes; then
15220   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
15221   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
15222 fi
15223 if test "$have_gtk" = yes; then
15224   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
15225   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
15226 fi
15227
15228
15229 if test "$have_kerberos" = yes; then
15230   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
15231   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
15232 fi
15233 if test "$have_pam" = yes; then
15234   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
15235   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
15236   INSTALL_PAM="install-pam"
15237 fi
15238 if test "$enable_pam_check_account_type" = yes; then
15239   COMMENT_PAM_CHECK_ACCOUNT=""
15240 else
15241   COMMENT_PAM_CHECK_ACCOUNT="#"
15242 fi
15243 if test "$have_passwd_helper" = yes; then
15244   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
15245   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
15246 fi
15247   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
15248   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
15249
15250
15251 if test "$enable_locking" = yes; then
15252   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
15253   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
15254 else
15255   LOCK_SRCS='$(NOLOCK_SRCS_1)'
15256   LOCK_OBJS='$(NOLOCK_OBJS_1)'
15257 fi
15258
15259 if test "$ac_macosx" = yes; then
15260   EXES_OSX='$(EXES_OSX)'
15261   SCRIPTS_OSX='$(SCRIPTS_OSX)'
15262   MEN_OSX='$(MEN_OSX)'
15263 else
15264   EXES_OSX=
15265   SCRIPTS_OSX=
15266   MEN_OSX=
15267 fi
15268
15269
15270 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
15271
15272 if test "$need_setuid" = yes; then
15273   NEED_SETUID=yes
15274 else
15275   NEED_SETUID=no
15276 fi
15277
15278 if test "$setuid_hacks" = yes; then
15279   SETUID_HACKS=yes
15280 else
15281   SETUID_HACKS=no
15282 fi
15283
15284 tab='   '
15285 if test "$have_gl" = yes; then
15286   GL_EXES='$(GL_EXES)'
15287   SUID_EXES='$(SUID_EXES)'
15288   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
15289   GL_UTIL_EXES='$(GL_UTIL_EXES)'
15290   GL_MEN='$(GL_MEN)'
15291   GL_KLUDGE=" "
15292 else
15293   GL_KLUDGE="-"
15294 fi
15295
15296 if test "$have_gle" = yes; then
15297   GLE_EXES='$(GLE_EXES)'
15298   GLE_KLUDGE=" "
15299 else
15300   GLE_KLUDGE="-"
15301 fi
15302
15303 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
15304  JPEG_EXES='$(JPEG_EXES)'
15305 fi
15306
15307
15308 # Another substitution in the XScreenSaver.ad.in file:
15309 #
15310 if test "$gnome_open_program" != ''; then
15311   GNOME24=''
15312   GNOME22='!    '
15313   NOGNOME='!    '
15314 elif test "$gnome_url_show_program" != ''; then
15315   GNOME24='!    '
15316   GNOME22=''
15317   NOGNOME='!    '
15318 else
15319   GNOME24='!    '
15320   GNOME22='!    '
15321   NOGNOME=''
15322 fi
15323
15324
15325 # Set PO_DATADIR to something sensible.
15326 #
15327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale directory" >&5
15328 $as_echo_n "checking for locale directory... " >&6; }
15329 if test -n "$GTK_DATADIR" ; then
15330   PO_DATADIR="$GTK_DATADIR"
15331 elif test "$have_gtk" = yes; then
15332   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15333   PO_DATADIR="$PO_DATADIR/share"
15334 fi
15335
15336 if test -z "$PO_DATADIR" ; then
15337   #
15338   # #### Total fucking kludge --
15339   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
15340   # but of course we need to expand all the nested variables to do that...
15341   #
15342   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
15343   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
15344 fi
15345
15346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PO_DATADIR/locale" >&5
15347 $as_echo "$PO_DATADIR/locale" >&6; }
15348
15349
15350 # canonicalize slashes.
15351 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
15352
15353 # gcc 3.0 likes to issue this warning for every file:
15354 #
15355 # cc1: warning: changing search order for system directory "/usr/local/include"
15356 # cc1: warning:   as it has already been specified as a non-system directory
15357 #
15358 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
15359 # Which *should* be totally redundant, and thus an ok thing to delete?
15360 #
15361 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
15362
15363
15364 ###############################################################################
15365 #
15366 #       Perform substitutions and write Makefiles.
15367 #
15368 ###############################################################################
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439 APPDEFAULTS=$ac_x_app_defaults
15440
15441
15442
15443
15444
15445
15446
15447 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile driver/xscreensaver.pam driver/xscreensaver-demo.glade2 hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
15448
15449 cat >confcache <<\_ACEOF
15450 # This file is a shell script that caches the results of configure
15451 # tests run on this system so they can be shared between configure
15452 # scripts and configure runs, see configure's option --config-cache.
15453 # It is not useful on other systems.  If it contains results you don't
15454 # want to keep, you may remove or edit it.
15455 #
15456 # config.status only pays attention to the cache file if you give it
15457 # the --recheck option to rerun configure.
15458 #
15459 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15460 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15461 # following values.
15462
15463 _ACEOF
15464
15465 # The following way of writing the cache mishandles newlines in values,
15466 # but we know of no workaround that is simple, portable, and efficient.
15467 # So, we kill variables containing newlines.
15468 # Ultrix sh set writes to stderr and can't be redirected directly,
15469 # and sets the high bit in the cache file unless we assign to the vars.
15470 (
15471   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15472     eval ac_val=\$$ac_var
15473     case $ac_val in #(
15474     *${as_nl}*)
15475       case $ac_var in #(
15476       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15477 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15478       esac
15479       case $ac_var in #(
15480       _ | IFS | as_nl) ;; #(
15481       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15482       *) { eval $ac_var=; unset $ac_var;} ;;
15483       esac ;;
15484     esac
15485   done
15486
15487   (set) 2>&1 |
15488     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15489     *${as_nl}ac_space=\ *)
15490       # `set' does not quote correctly, so add quotes: double-quote
15491       # substitution turns \\\\ into \\, and sed turns \\ into \.
15492       sed -n \
15493         "s/'/'\\\\''/g;
15494           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15495       ;; #(
15496     *)
15497       # `set' quotes correctly as required by POSIX, so do not add quotes.
15498       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15499       ;;
15500     esac |
15501     sort
15502 ) |
15503   sed '
15504      /^ac_cv_env_/b end
15505      t clear
15506      :clear
15507      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15508      t end
15509      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15510      :end' >>confcache
15511 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15512   if test -w "$cache_file"; then
15513     if test "x$cache_file" != "x/dev/null"; then
15514       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15515 $as_echo "$as_me: updating cache $cache_file" >&6;}
15516       if test ! -f "$cache_file" || test -h "$cache_file"; then
15517         cat confcache >"$cache_file"
15518       else
15519         case $cache_file in #(
15520         */* | ?:*)
15521           mv -f confcache "$cache_file"$$ &&
15522           mv -f "$cache_file"$$ "$cache_file" ;; #(
15523         *)
15524           mv -f confcache "$cache_file" ;;
15525         esac
15526       fi
15527     fi
15528   else
15529     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15530 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15531   fi
15532 fi
15533 rm -f confcache
15534
15535 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15536 # Let make expand exec_prefix.
15537 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15538
15539 DEFS=-DHAVE_CONFIG_H
15540
15541 ac_libobjs=
15542 ac_ltlibobjs=
15543 U=
15544 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15545   # 1. Remove the extension, and $U if already installed.
15546   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15547   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15548   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15549   #    will be set to the directory where LIBOBJS objects are built.
15550   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15551   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15552 done
15553 LIBOBJS=$ac_libobjs
15554
15555 LTLIBOBJS=$ac_ltlibobjs
15556
15557
15558
15559   ac_config_commands="$ac_config_commands po/stamp-it"
15560
15561
15562
15563 : "${CONFIG_STATUS=./config.status}"
15564 ac_write_fail=0
15565 ac_clean_files_save=$ac_clean_files
15566 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15567 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15568 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15569 as_write_fail=0
15570 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15571 #! $SHELL
15572 # Generated by $as_me.
15573 # Run this file to recreate the current configuration.
15574 # Compiler output produced by configure, useful for debugging
15575 # configure, is in config.log if it exists.
15576
15577 debug=false
15578 ac_cs_recheck=false
15579 ac_cs_silent=false
15580
15581 SHELL=\${CONFIG_SHELL-$SHELL}
15582 export SHELL
15583 _ASEOF
15584 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15585 ## -------------------- ##
15586 ## M4sh Initialization. ##
15587 ## -------------------- ##
15588
15589 # Be more Bourne compatible
15590 DUALCASE=1; export DUALCASE # for MKS sh
15591 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15592   emulate sh
15593   NULLCMD=:
15594   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15595   # is contrary to our usage.  Disable this feature.
15596   alias -g '${1+"$@"}'='"$@"'
15597   setopt NO_GLOB_SUBST
15598 else
15599   case `(set -o) 2>/dev/null` in #(
15600   *posix*) :
15601     set -o posix ;; #(
15602   *) :
15603      ;;
15604 esac
15605 fi
15606
15607
15608 as_nl='
15609 '
15610 export as_nl
15611 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15612 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15613 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15614 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15615 # Prefer a ksh shell builtin over an external printf program on Solaris,
15616 # but without wasting forks for bash or zsh.
15617 if test -z "$BASH_VERSION$ZSH_VERSION" \
15618     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15619   as_echo='print -r --'
15620   as_echo_n='print -rn --'
15621 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15622   as_echo='printf %s\n'
15623   as_echo_n='printf %s'
15624 else
15625   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15626     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15627     as_echo_n='/usr/ucb/echo -n'
15628   else
15629     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15630     as_echo_n_body='eval
15631       arg=$1;
15632       case $arg in #(
15633       *"$as_nl"*)
15634         expr "X$arg" : "X\\(.*\\)$as_nl";
15635         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15636       esac;
15637       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15638     '
15639     export as_echo_n_body
15640     as_echo_n='sh -c $as_echo_n_body as_echo'
15641   fi
15642   export as_echo_body
15643   as_echo='sh -c $as_echo_body as_echo'
15644 fi
15645
15646 # The user is always right.
15647 if test "${PATH_SEPARATOR+set}" != set; then
15648   PATH_SEPARATOR=:
15649   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15650     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15651       PATH_SEPARATOR=';'
15652   }
15653 fi
15654
15655
15656 # IFS
15657 # We need space, tab and new line, in precisely that order.  Quoting is
15658 # there to prevent editors from complaining about space-tab.
15659 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15660 # splitting by setting IFS to empty value.)
15661 IFS=" ""        $as_nl"
15662
15663 # Find who we are.  Look in the path if we contain no directory separator.
15664 as_myself=
15665 case $0 in #((
15666   *[\\/]* ) as_myself=$0 ;;
15667   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15668 for as_dir in $PATH
15669 do
15670   IFS=$as_save_IFS
15671   test -z "$as_dir" && as_dir=.
15672     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15673   done
15674 IFS=$as_save_IFS
15675
15676      ;;
15677 esac
15678 # We did not find ourselves, most probably we were run as `sh COMMAND'
15679 # in which case we are not to be found in the path.
15680 if test "x$as_myself" = x; then
15681   as_myself=$0
15682 fi
15683 if test ! -f "$as_myself"; then
15684   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15685   exit 1
15686 fi
15687
15688 # Unset variables that we do not need and which cause bugs (e.g. in
15689 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15690 # suppresses any "Segmentation fault" message there.  '((' could
15691 # trigger a bug in pdksh 5.2.14.
15692 for as_var in BASH_ENV ENV MAIL MAILPATH
15693 do eval test x\${$as_var+set} = xset \
15694   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15695 done
15696 PS1='$ '
15697 PS2='> '
15698 PS4='+ '
15699
15700 # NLS nuisances.
15701 LC_ALL=C
15702 export LC_ALL
15703 LANGUAGE=C
15704 export LANGUAGE
15705
15706 # CDPATH.
15707 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15708
15709
15710 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15711 # ----------------------------------------
15712 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15713 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15714 # script with STATUS, using 1 if that was 0.
15715 as_fn_error ()
15716 {
15717   as_status=$1; test $as_status -eq 0 && as_status=1
15718   if test "$4"; then
15719     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15720     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15721   fi
15722   $as_echo "$as_me: error: $2" >&2
15723   as_fn_exit $as_status
15724 } # as_fn_error
15725
15726
15727 # as_fn_set_status STATUS
15728 # -----------------------
15729 # Set $? to STATUS, without forking.
15730 as_fn_set_status ()
15731 {
15732   return $1
15733 } # as_fn_set_status
15734
15735 # as_fn_exit STATUS
15736 # -----------------
15737 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15738 as_fn_exit ()
15739 {
15740   set +e
15741   as_fn_set_status $1
15742   exit $1
15743 } # as_fn_exit
15744
15745 # as_fn_unset VAR
15746 # ---------------
15747 # Portably unset VAR.
15748 as_fn_unset ()
15749 {
15750   { eval $1=; unset $1;}
15751 }
15752 as_unset=as_fn_unset
15753 # as_fn_append VAR VALUE
15754 # ----------------------
15755 # Append the text in VALUE to the end of the definition contained in VAR. Take
15756 # advantage of any shell optimizations that allow amortized linear growth over
15757 # repeated appends, instead of the typical quadratic growth present in naive
15758 # implementations.
15759 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15760   eval 'as_fn_append ()
15761   {
15762     eval $1+=\$2
15763   }'
15764 else
15765   as_fn_append ()
15766   {
15767     eval $1=\$$1\$2
15768   }
15769 fi # as_fn_append
15770
15771 # as_fn_arith ARG...
15772 # ------------------
15773 # Perform arithmetic evaluation on the ARGs, and store the result in the
15774 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15775 # must be portable across $(()) and expr.
15776 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15777   eval 'as_fn_arith ()
15778   {
15779     as_val=$(( $* ))
15780   }'
15781 else
15782   as_fn_arith ()
15783   {
15784     as_val=`expr "$@" || test $? -eq 1`
15785   }
15786 fi # as_fn_arith
15787
15788
15789 if expr a : '\(a\)' >/dev/null 2>&1 &&
15790    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15791   as_expr=expr
15792 else
15793   as_expr=false
15794 fi
15795
15796 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15797   as_basename=basename
15798 else
15799   as_basename=false
15800 fi
15801
15802 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15803   as_dirname=dirname
15804 else
15805   as_dirname=false
15806 fi
15807
15808 as_me=`$as_basename -- "$0" ||
15809 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15810          X"$0" : 'X\(//\)$' \| \
15811          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15812 $as_echo X/"$0" |
15813     sed '/^.*\/\([^/][^/]*\)\/*$/{
15814             s//\1/
15815             q
15816           }
15817           /^X\/\(\/\/\)$/{
15818             s//\1/
15819             q
15820           }
15821           /^X\/\(\/\).*/{
15822             s//\1/
15823             q
15824           }
15825           s/.*/./; q'`
15826
15827 # Avoid depending upon Character Ranges.
15828 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15829 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15830 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15831 as_cr_digits='0123456789'
15832 as_cr_alnum=$as_cr_Letters$as_cr_digits
15833
15834 ECHO_C= ECHO_N= ECHO_T=
15835 case `echo -n x` in #(((((
15836 -n*)
15837   case `echo 'xy\c'` in
15838   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15839   xy)  ECHO_C='\c';;
15840   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15841        ECHO_T=' ';;
15842   esac;;
15843 *)
15844   ECHO_N='-n';;
15845 esac
15846
15847 rm -f conf$$ conf$$.exe conf$$.file
15848 if test -d conf$$.dir; then
15849   rm -f conf$$.dir/conf$$.file
15850 else
15851   rm -f conf$$.dir
15852   mkdir conf$$.dir 2>/dev/null
15853 fi
15854 if (echo >conf$$.file) 2>/dev/null; then
15855   if ln -s conf$$.file conf$$ 2>/dev/null; then
15856     as_ln_s='ln -s'
15857     # ... but there are two gotchas:
15858     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15859     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15860     # In both cases, we have to default to `cp -pR'.
15861     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15862       as_ln_s='cp -pR'
15863   elif ln conf$$.file conf$$ 2>/dev/null; then
15864     as_ln_s=ln
15865   else
15866     as_ln_s='cp -pR'
15867   fi
15868 else
15869   as_ln_s='cp -pR'
15870 fi
15871 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15872 rmdir conf$$.dir 2>/dev/null
15873
15874
15875 # as_fn_mkdir_p
15876 # -------------
15877 # Create "$as_dir" as a directory, including parents if necessary.
15878 as_fn_mkdir_p ()
15879 {
15880
15881   case $as_dir in #(
15882   -*) as_dir=./$as_dir;;
15883   esac
15884   test -d "$as_dir" || eval $as_mkdir_p || {
15885     as_dirs=
15886     while :; do
15887       case $as_dir in #(
15888       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15889       *) as_qdir=$as_dir;;
15890       esac
15891       as_dirs="'$as_qdir' $as_dirs"
15892       as_dir=`$as_dirname -- "$as_dir" ||
15893 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15894          X"$as_dir" : 'X\(//\)[^/]' \| \
15895          X"$as_dir" : 'X\(//\)$' \| \
15896          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15897 $as_echo X"$as_dir" |
15898     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15899             s//\1/
15900             q
15901           }
15902           /^X\(\/\/\)[^/].*/{
15903             s//\1/
15904             q
15905           }
15906           /^X\(\/\/\)$/{
15907             s//\1/
15908             q
15909           }
15910           /^X\(\/\).*/{
15911             s//\1/
15912             q
15913           }
15914           s/.*/./; q'`
15915       test -d "$as_dir" && break
15916     done
15917     test -z "$as_dirs" || eval "mkdir $as_dirs"
15918   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15919
15920
15921 } # as_fn_mkdir_p
15922 if mkdir -p . 2>/dev/null; then
15923   as_mkdir_p='mkdir -p "$as_dir"'
15924 else
15925   test -d ./-p && rmdir ./-p
15926   as_mkdir_p=false
15927 fi
15928
15929
15930 # as_fn_executable_p FILE
15931 # -----------------------
15932 # Test if FILE is an executable regular file.
15933 as_fn_executable_p ()
15934 {
15935   test -f "$1" && test -x "$1"
15936 } # as_fn_executable_p
15937 as_test_x='test -x'
15938 as_executable_p=as_fn_executable_p
15939
15940 # Sed expression to map a string onto a valid CPP name.
15941 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15942
15943 # Sed expression to map a string onto a valid variable name.
15944 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15945
15946
15947 exec 6>&1
15948 ## ----------------------------------- ##
15949 ## Main body of $CONFIG_STATUS script. ##
15950 ## ----------------------------------- ##
15951 _ASEOF
15952 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15953
15954 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15955 # Save the log message, to keep $0 and so on meaningful, and to
15956 # report actual input values of CONFIG_FILES etc. instead of their
15957 # values after options handling.
15958 ac_log="
15959 This file was extended by $as_me, which was
15960 generated by GNU Autoconf 2.69.  Invocation command line was
15961
15962   CONFIG_FILES    = $CONFIG_FILES
15963   CONFIG_HEADERS  = $CONFIG_HEADERS
15964   CONFIG_LINKS    = $CONFIG_LINKS
15965   CONFIG_COMMANDS = $CONFIG_COMMANDS
15966   $ $0 $@
15967
15968 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15969 "
15970
15971 _ACEOF
15972
15973 case $ac_config_files in *"
15974 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15975 esac
15976
15977 case $ac_config_headers in *"
15978 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15979 esac
15980
15981
15982 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15983 # Files that config.status was made for.
15984 config_files="$ac_config_files"
15985 config_headers="$ac_config_headers"
15986 config_commands="$ac_config_commands"
15987
15988 _ACEOF
15989
15990 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15991 ac_cs_usage="\
15992 \`$as_me' instantiates files and other configuration actions
15993 from templates according to the current configuration.  Unless the files
15994 and actions are specified as TAGs, all are instantiated by default.
15995
15996 Usage: $0 [OPTION]... [TAG]...
15997
15998   -h, --help       print this help, then exit
15999   -V, --version    print version number and configuration settings, then exit
16000       --config     print configuration, then exit
16001   -q, --quiet, --silent
16002                    do not print progress messages
16003   -d, --debug      don't remove temporary files
16004       --recheck    update $as_me by reconfiguring in the same conditions
16005       --file=FILE[:TEMPLATE]
16006                    instantiate the configuration file FILE
16007       --header=FILE[:TEMPLATE]
16008                    instantiate the configuration header FILE
16009
16010 Configuration files:
16011 $config_files
16012
16013 Configuration headers:
16014 $config_headers
16015
16016 Configuration commands:
16017 $config_commands
16018
16019 Report bugs to the package provider."
16020
16021 _ACEOF
16022 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16023 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16024 ac_cs_version="\\
16025 config.status
16026 configured by $0, generated by GNU Autoconf 2.69,
16027   with options \\"\$ac_cs_config\\"
16028
16029 Copyright (C) 2012 Free Software Foundation, Inc.
16030 This config.status script is free software; the Free Software Foundation
16031 gives unlimited permission to copy, distribute and modify it."
16032
16033 ac_pwd='$ac_pwd'
16034 srcdir='$srcdir'
16035 INSTALL='$INSTALL'
16036 test -n "\$AWK" || AWK=awk
16037 _ACEOF
16038
16039 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16040 # The default lists apply if the user does not specify any file.
16041 ac_need_defaults=:
16042 while test $# != 0
16043 do
16044   case $1 in
16045   --*=?*)
16046     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16047     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16048     ac_shift=:
16049     ;;
16050   --*=)
16051     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16052     ac_optarg=
16053     ac_shift=:
16054     ;;
16055   *)
16056     ac_option=$1
16057     ac_optarg=$2
16058     ac_shift=shift
16059     ;;
16060   esac
16061
16062   case $ac_option in
16063   # Handling of the options.
16064   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16065     ac_cs_recheck=: ;;
16066   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16067     $as_echo "$ac_cs_version"; exit ;;
16068   --config | --confi | --conf | --con | --co | --c )
16069     $as_echo "$ac_cs_config"; exit ;;
16070   --debug | --debu | --deb | --de | --d | -d )
16071     debug=: ;;
16072   --file | --fil | --fi | --f )
16073     $ac_shift
16074     case $ac_optarg in
16075     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16076     '') as_fn_error $? "missing file argument" ;;
16077     esac
16078     as_fn_append CONFIG_FILES " '$ac_optarg'"
16079     ac_need_defaults=false;;
16080   --header | --heade | --head | --hea )
16081     $ac_shift
16082     case $ac_optarg in
16083     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16084     esac
16085     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16086     ac_need_defaults=false;;
16087   --he | --h)
16088     # Conflict between --help and --header
16089     as_fn_error $? "ambiguous option: \`$1'
16090 Try \`$0 --help' for more information.";;
16091   --help | --hel | -h )
16092     $as_echo "$ac_cs_usage"; exit ;;
16093   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16094   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16095     ac_cs_silent=: ;;
16096
16097   # This is an error.
16098   -*) as_fn_error $? "unrecognized option: \`$1'
16099 Try \`$0 --help' for more information." ;;
16100
16101   *) as_fn_append ac_config_targets " $1"
16102      ac_need_defaults=false ;;
16103
16104   esac
16105   shift
16106 done
16107
16108 ac_configure_extra_args=
16109
16110 if $ac_cs_silent; then
16111   exec 6>/dev/null
16112   ac_configure_extra_args="$ac_configure_extra_args --silent"
16113 fi
16114
16115 _ACEOF
16116 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16117 if \$ac_cs_recheck; then
16118   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16119   shift
16120   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16121   CONFIG_SHELL='$SHELL'
16122   export CONFIG_SHELL
16123   exec "\$@"
16124 fi
16125
16126 _ACEOF
16127 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16128 exec 5>>config.log
16129 {
16130   echo
16131   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16132 ## Running $as_me. ##
16133 _ASBOX
16134   $as_echo "$ac_log"
16135 } >&5
16136
16137 _ACEOF
16138 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16139 #
16140 # INIT-COMMANDS
16141 #
16142
16143
16144 _ACEOF
16145
16146 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16147
16148 # Handling of arguments.
16149 for ac_config_target in $ac_config_targets
16150 do
16151   case $ac_config_target in
16152     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
16153     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
16154     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16155     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
16156     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
16157     "driver/xscreensaver.pam") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.pam" ;;
16158     "driver/xscreensaver-demo.glade2") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver-demo.glade2" ;;
16159     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
16160     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
16161     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
16162     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
16163     "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
16164
16165   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16166   esac
16167 done
16168
16169
16170 # If the user did not use the arguments to specify the items to instantiate,
16171 # then the envvar interface is used.  Set only those that are not.
16172 # We use the long form for the default assignment because of an extremely
16173 # bizarre bug on SunOS 4.1.3.
16174 if $ac_need_defaults; then
16175   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16176   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16177   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16178 fi
16179
16180 # Have a temporary directory for convenience.  Make it in the build tree
16181 # simply because there is no reason against having it here, and in addition,
16182 # creating and moving files from /tmp can sometimes cause problems.
16183 # Hook for its removal unless debugging.
16184 # Note that there is a small window in which the directory will not be cleaned:
16185 # after its creation but before its name has been assigned to `$tmp'.
16186 $debug ||
16187 {
16188   tmp= ac_tmp=
16189   trap 'exit_status=$?
16190   : "${ac_tmp:=$tmp}"
16191   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16192 ' 0
16193   trap 'as_fn_exit 1' 1 2 13 15
16194 }
16195 # Create a (secure) tmp directory for tmp files.
16196
16197 {
16198   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16199   test -d "$tmp"
16200 }  ||
16201 {
16202   tmp=./conf$$-$RANDOM
16203   (umask 077 && mkdir "$tmp")
16204 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16205 ac_tmp=$tmp
16206
16207 # Set up the scripts for CONFIG_FILES section.
16208 # No need to generate them if there are no CONFIG_FILES.
16209 # This happens for instance with `./config.status config.h'.
16210 if test -n "$CONFIG_FILES"; then
16211
16212
16213 ac_cr=`echo X | tr X '\015'`
16214 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16215 # But we know of no other shell where ac_cr would be empty at this
16216 # point, so we can use a bashism as a fallback.
16217 if test "x$ac_cr" = x; then
16218   eval ac_cr=\$\'\\r\'
16219 fi
16220 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16221 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16222   ac_cs_awk_cr='\\r'
16223 else
16224   ac_cs_awk_cr=$ac_cr
16225 fi
16226
16227 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16228 _ACEOF
16229
16230
16231 {
16232   echo "cat >conf$$subs.awk <<_ACEOF" &&
16233   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16234   echo "_ACEOF"
16235 } >conf$$subs.sh ||
16236   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16237 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16238 ac_delim='%!_!# '
16239 for ac_last_try in false false false false false :; do
16240   . ./conf$$subs.sh ||
16241     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16242
16243   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16244   if test $ac_delim_n = $ac_delim_num; then
16245     break
16246   elif $ac_last_try; then
16247     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16248   else
16249     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16250   fi
16251 done
16252 rm -f conf$$subs.sh
16253
16254 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16255 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16256 _ACEOF
16257 sed -n '
16258 h
16259 s/^/S["/; s/!.*/"]=/
16260 p
16261 g
16262 s/^[^!]*!//
16263 :repl
16264 t repl
16265 s/'"$ac_delim"'$//
16266 t delim
16267 :nl
16268 h
16269 s/\(.\{148\}\)..*/\1/
16270 t more1
16271 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16272 p
16273 n
16274 b repl
16275 :more1
16276 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16277 p
16278 g
16279 s/.\{148\}//
16280 t nl
16281 :delim
16282 h
16283 s/\(.\{148\}\)..*/\1/
16284 t more2
16285 s/["\\]/\\&/g; s/^/"/; s/$/"/
16286 p
16287 b
16288 :more2
16289 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16290 p
16291 g
16292 s/.\{148\}//
16293 t delim
16294 ' <conf$$subs.awk | sed '
16295 /^[^""]/{
16296   N
16297   s/\n//
16298 }
16299 ' >>$CONFIG_STATUS || ac_write_fail=1
16300 rm -f conf$$subs.awk
16301 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16302 _ACAWK
16303 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16304   for (key in S) S_is_set[key] = 1
16305   FS = "\a"
16306
16307 }
16308 {
16309   line = $ 0
16310   nfields = split(line, field, "@")
16311   substed = 0
16312   len = length(field[1])
16313   for (i = 2; i < nfields; i++) {
16314     key = field[i]
16315     keylen = length(key)
16316     if (S_is_set[key]) {
16317       value = S[key]
16318       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16319       len += length(value) + length(field[++i])
16320       substed = 1
16321     } else
16322       len += 1 + keylen
16323   }
16324
16325   print line
16326 }
16327
16328 _ACAWK
16329 _ACEOF
16330 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16331 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16332   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16333 else
16334   cat
16335 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16336   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16337 _ACEOF
16338
16339 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16340 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16341 # trailing colons and then remove the whole line if VPATH becomes empty
16342 # (actually we leave an empty line to preserve line numbers).
16343 if test "x$srcdir" = x.; then
16344   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16345 h
16346 s///
16347 s/^/:/
16348 s/[      ]*$/:/
16349 s/:\$(srcdir):/:/g
16350 s/:\${srcdir}:/:/g
16351 s/:@srcdir@:/:/g
16352 s/^:*//
16353 s/:*$//
16354 x
16355 s/\(=[   ]*\).*/\1/
16356 G
16357 s/\n//
16358 s/^[^=]*=[       ]*$//
16359 }'
16360 fi
16361
16362 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16363 fi # test -n "$CONFIG_FILES"
16364
16365 # Set up the scripts for CONFIG_HEADERS section.
16366 # No need to generate them if there are no CONFIG_HEADERS.
16367 # This happens for instance with `./config.status Makefile'.
16368 if test -n "$CONFIG_HEADERS"; then
16369 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16370 BEGIN {
16371 _ACEOF
16372
16373 # Transform confdefs.h into an awk script `defines.awk', embedded as
16374 # here-document in config.status, that substitutes the proper values into
16375 # config.h.in to produce config.h.
16376
16377 # Create a delimiter string that does not exist in confdefs.h, to ease
16378 # handling of long lines.
16379 ac_delim='%!_!# '
16380 for ac_last_try in false false :; do
16381   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16382   if test -z "$ac_tt"; then
16383     break
16384   elif $ac_last_try; then
16385     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16386   else
16387     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16388   fi
16389 done
16390
16391 # For the awk script, D is an array of macro values keyed by name,
16392 # likewise P contains macro parameters if any.  Preserve backslash
16393 # newline sequences.
16394
16395 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16396 sed -n '
16397 s/.\{148\}/&'"$ac_delim"'/g
16398 t rset
16399 :rset
16400 s/^[     ]*#[    ]*define[       ][      ]*/ /
16401 t def
16402 d
16403 :def
16404 s/\\$//
16405 t bsnl
16406 s/["\\]/\\&/g
16407 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16408 D["\1"]=" \3"/p
16409 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16410 d
16411 :bsnl
16412 s/["\\]/\\&/g
16413 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16414 D["\1"]=" \3\\\\\\n"\\/p
16415 t cont
16416 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16417 t cont
16418 d
16419 :cont
16420 n
16421 s/.\{148\}/&'"$ac_delim"'/g
16422 t clear
16423 :clear
16424 s/\\$//
16425 t bsnlc
16426 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16427 d
16428 :bsnlc
16429 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16430 b cont
16431 ' <confdefs.h | sed '
16432 s/'"$ac_delim"'/"\\\
16433 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16434
16435 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16436   for (key in D) D_is_set[key] = 1
16437   FS = "\a"
16438 }
16439 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16440   line = \$ 0
16441   split(line, arg, " ")
16442   if (arg[1] == "#") {
16443     defundef = arg[2]
16444     mac1 = arg[3]
16445   } else {
16446     defundef = substr(arg[1], 2)
16447     mac1 = arg[2]
16448   }
16449   split(mac1, mac2, "(") #)
16450   macro = mac2[1]
16451   prefix = substr(line, 1, index(line, defundef) - 1)
16452   if (D_is_set[macro]) {
16453     # Preserve the white space surrounding the "#".
16454     print prefix "define", macro P[macro] D[macro]
16455     next
16456   } else {
16457     # Replace #undef with comments.  This is necessary, for example,
16458     # in the case of _POSIX_SOURCE, which is predefined and required
16459     # on some systems where configure will not decide to define it.
16460     if (defundef == "undef") {
16461       print "/*", prefix defundef, macro, "*/"
16462       next
16463     }
16464   }
16465 }
16466 { print }
16467 _ACAWK
16468 _ACEOF
16469 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16470   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16471 fi # test -n "$CONFIG_HEADERS"
16472
16473
16474 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
16475 shift
16476 for ac_tag
16477 do
16478   case $ac_tag in
16479   :[FHLC]) ac_mode=$ac_tag; continue;;
16480   esac
16481   case $ac_mode$ac_tag in
16482   :[FHL]*:*);;
16483   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16484   :[FH]-) ac_tag=-:-;;
16485   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16486   esac
16487   ac_save_IFS=$IFS
16488   IFS=:
16489   set x $ac_tag
16490   IFS=$ac_save_IFS
16491   shift
16492   ac_file=$1
16493   shift
16494
16495   case $ac_mode in
16496   :L) ac_source=$1;;
16497   :[FH])
16498     ac_file_inputs=
16499     for ac_f
16500     do
16501       case $ac_f in
16502       -) ac_f="$ac_tmp/stdin";;
16503       *) # Look for the file first in the build tree, then in the source tree
16504          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16505          # because $ac_f cannot contain `:'.
16506          test -f "$ac_f" ||
16507            case $ac_f in
16508            [\\/$]*) false;;
16509            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16510            esac ||
16511            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16512       esac
16513       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16514       as_fn_append ac_file_inputs " '$ac_f'"
16515     done
16516
16517     # Let's still pretend it is `configure' which instantiates (i.e., don't
16518     # use $as_me), people would be surprised to read:
16519     #    /* config.h.  Generated by config.status.  */
16520     configure_input='Generated from '`
16521           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16522         `' by configure.'
16523     if test x"$ac_file" != x-; then
16524       configure_input="$ac_file.  $configure_input"
16525       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16526 $as_echo "$as_me: creating $ac_file" >&6;}
16527     fi
16528     # Neutralize special characters interpreted by sed in replacement strings.
16529     case $configure_input in #(
16530     *\&* | *\|* | *\\* )
16531        ac_sed_conf_input=`$as_echo "$configure_input" |
16532        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16533     *) ac_sed_conf_input=$configure_input;;
16534     esac
16535
16536     case $ac_tag in
16537     *:-:* | *:-) cat >"$ac_tmp/stdin" \
16538       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16539     esac
16540     ;;
16541   esac
16542
16543   ac_dir=`$as_dirname -- "$ac_file" ||
16544 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16545          X"$ac_file" : 'X\(//\)[^/]' \| \
16546          X"$ac_file" : 'X\(//\)$' \| \
16547          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16548 $as_echo X"$ac_file" |
16549     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16550             s//\1/
16551             q
16552           }
16553           /^X\(\/\/\)[^/].*/{
16554             s//\1/
16555             q
16556           }
16557           /^X\(\/\/\)$/{
16558             s//\1/
16559             q
16560           }
16561           /^X\(\/\).*/{
16562             s//\1/
16563             q
16564           }
16565           s/.*/./; q'`
16566   as_dir="$ac_dir"; as_fn_mkdir_p
16567   ac_builddir=.
16568
16569 case "$ac_dir" in
16570 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16571 *)
16572   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16573   # A ".." for each directory in $ac_dir_suffix.
16574   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16575   case $ac_top_builddir_sub in
16576   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16577   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16578   esac ;;
16579 esac
16580 ac_abs_top_builddir=$ac_pwd
16581 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16582 # for backward compatibility:
16583 ac_top_builddir=$ac_top_build_prefix
16584
16585 case $srcdir in
16586   .)  # We are building in place.
16587     ac_srcdir=.
16588     ac_top_srcdir=$ac_top_builddir_sub
16589     ac_abs_top_srcdir=$ac_pwd ;;
16590   [\\/]* | ?:[\\/]* )  # Absolute name.
16591     ac_srcdir=$srcdir$ac_dir_suffix;
16592     ac_top_srcdir=$srcdir
16593     ac_abs_top_srcdir=$srcdir ;;
16594   *) # Relative name.
16595     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16596     ac_top_srcdir=$ac_top_build_prefix$srcdir
16597     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16598 esac
16599 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16600
16601
16602   case $ac_mode in
16603   :F)
16604   #
16605   # CONFIG_FILE
16606   #
16607
16608   case $INSTALL in
16609   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16610   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16611   esac
16612 _ACEOF
16613
16614 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16615 # If the template does not know about datarootdir, expand it.
16616 # FIXME: This hack should be removed a few years after 2.60.
16617 ac_datarootdir_hack=; ac_datarootdir_seen=
16618 ac_sed_dataroot='
16619 /datarootdir/ {
16620   p
16621   q
16622 }
16623 /@datadir@/p
16624 /@docdir@/p
16625 /@infodir@/p
16626 /@localedir@/p
16627 /@mandir@/p'
16628 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16629 *datarootdir*) ac_datarootdir_seen=yes;;
16630 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16631   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16632 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16633 _ACEOF
16634 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16635   ac_datarootdir_hack='
16636   s&@datadir@&$datadir&g
16637   s&@docdir@&$docdir&g
16638   s&@infodir@&$infodir&g
16639   s&@localedir@&$localedir&g
16640   s&@mandir@&$mandir&g
16641   s&\\\${datarootdir}&$datarootdir&g' ;;
16642 esac
16643 _ACEOF
16644
16645 # Neutralize VPATH when `$srcdir' = `.'.
16646 # Shell code in configure.ac might set extrasub.
16647 # FIXME: do we really want to maintain this feature?
16648 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16649 ac_sed_extra="$ac_vpsub
16650 $extrasub
16651 _ACEOF
16652 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16653 :t
16654 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16655 s|@configure_input@|$ac_sed_conf_input|;t t
16656 s&@top_builddir@&$ac_top_builddir_sub&;t t
16657 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16658 s&@srcdir@&$ac_srcdir&;t t
16659 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16660 s&@top_srcdir@&$ac_top_srcdir&;t t
16661 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16662 s&@builddir@&$ac_builddir&;t t
16663 s&@abs_builddir@&$ac_abs_builddir&;t t
16664 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16665 s&@INSTALL@&$ac_INSTALL&;t t
16666 $ac_datarootdir_hack
16667 "
16668 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16669   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16670
16671 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16672   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16673   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16674       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16675   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16676 which seems to be undefined.  Please make sure it is defined" >&5
16677 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16678 which seems to be undefined.  Please make sure it is defined" >&2;}
16679
16680   rm -f "$ac_tmp/stdin"
16681   case $ac_file in
16682   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16683   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16684   esac \
16685   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16686  ;;
16687   :H)
16688   #
16689   # CONFIG_HEADER
16690   #
16691   if test x"$ac_file" != x-; then
16692     {
16693       $as_echo "/* $configure_input  */" \
16694       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16695     } >"$ac_tmp/config.h" \
16696       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16697     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16698       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16699 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16700     else
16701       rm -f "$ac_file"
16702       mv "$ac_tmp/config.h" "$ac_file" \
16703         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16704     fi
16705   else
16706     $as_echo "/* $configure_input  */" \
16707       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16708       || as_fn_error $? "could not create -" "$LINENO" 5
16709   fi
16710  ;;
16711
16712   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16713 $as_echo "$as_me: executing $ac_file commands" >&6;}
16714  ;;
16715   esac
16716
16717
16718   case $ac_file$ac_mode in
16719     "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
16720         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
16721       esac ;;
16722     "po/stamp-it":C)
16723     if  ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
16724        as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5
16725     fi
16726     rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
16727     >"po/stamp-it.tmp"
16728     sed '/^#/d
16729          s/^[[].*] *//
16730          /^[    ]*$/d
16731         '"s|^|  $ac_top_srcdir/|" \
16732       "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
16733
16734     sed '/^POTFILES =/,/[^\\]$/ {
16735                 /^POTFILES =/!d
16736                 r po/POTFILES
16737           }
16738          ' "po/Makefile.in" >"po/Makefile"
16739     rm -f "po/Makefile.tmp"
16740     mv "po/stamp-it.tmp" "po/stamp-it"
16741    ;;
16742
16743   esac
16744 done # for ac_tag
16745
16746
16747 as_fn_exit 0
16748 _ACEOF
16749 ac_clean_files=$ac_clean_files_save
16750
16751 test $ac_write_fail = 0 ||
16752   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16753
16754
16755 # configure is writing to config.log, and then calls config.status.
16756 # config.status does its own redirection, appending to config.log.
16757 # Unfortunately, on DOS this fails, as config.log is still kept open
16758 # by configure, so config.status won't be able to write to it; its
16759 # output is simply discarded.  So we exec the FD to /dev/null,
16760 # effectively closing config.log, so it can be properly (re)opened and
16761 # appended to by config.status.  When coming back to configure, we
16762 # need to make the FD available again.
16763 if test "$no_create" != yes; then
16764   ac_cs_success=:
16765   ac_config_status_args=
16766   test "$silent" = yes &&
16767     ac_config_status_args="$ac_config_status_args --quiet"
16768   exec 5>/dev/null
16769   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16770   exec 5>>config.log
16771   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16772   # would make configure fail if this is the last instruction.
16773   $ac_cs_success || as_fn_exit 1
16774 fi
16775 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16776   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16777 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16778 fi
16779
16780
16781 ###############################################################################
16782 #
16783 #       Print some warnings at the end.
16784 #
16785 ###############################################################################
16786
16787 warn_prefix_1="    Warning:"
16788 warn_prefix_2="       Note:"
16789 warn_prefix="$warn_prefix_1"
16790
16791 warning=no
16792 warnsep='    #################################################################'
16793
16794 warnpre() {
16795   if test "$warning" = no ; then
16796     echo '' ; echo "$warnsep" ; echo ''
16797     warning=yes
16798   fi
16799 }
16800
16801 warn() {
16802   warnpre
16803   if test "$warning" = long ; then echo '' ; fi
16804   warning=yes
16805   rest="$@"
16806   echo "$warn_prefix $rest"
16807 }
16808
16809 warnL() {
16810   was=$warning
16811   warnpre
16812   warning=yes
16813   if test "$was" != no ; then echo '' ; fi
16814   rest="$@"
16815   echo "$warn_prefix $rest"
16816 }
16817
16818 warn2() {
16819   rest="$@"
16820   echo "             $rest"
16821   warning=long
16822 }
16823
16824 note() {
16825   warn_prefix="$warn_prefix_2"
16826   warn $@
16827   warn_prefix="$warn_prefix_1"
16828 }
16829
16830 noteL() {
16831   warn_prefix="$warn_prefix_2"
16832   warnL $@
16833   warn_prefix="$warn_prefix_1"
16834 }
16835
16836
16837 # ac_prog_cc_no_pthread normally only happens on AIX, because according
16838 # to AX_PTHREAD, AIX needs CC=xlc_r or CC=cc_r to do threads.
16839 # If CC is specified, it takes precedence over --with-pthread.
16840 if test "$ac_prog_cc_no_pthread" ; then
16841   warnL "You requested $ac_original_cc for the C compiler, but it doesn't"
16842   warn2 "support POSIX threads."
16843   echo ""
16844   warn2 "If you have multiple CPU cores, try CC=$PTHREAD_CC."
16845 elif test "$with_pthread_req" = yes -a "$have_pthread" = no ; then
16846   warn 'POSIX threads were requested, but were not found.'
16847 fi
16848
16849 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
16850   warn 'The SGI saver extension was requested, but was not found.'
16851 fi
16852
16853 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
16854   warn 'The XIdle extension was requested, but was not found.'
16855 fi
16856
16857 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
16858   warn 'The XSHM extension was requested, but was not found.'
16859 fi
16860
16861 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
16862   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
16863 fi
16864
16865 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
16866   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
16867 fi
16868
16869 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
16870   warn 'The DPMS extension was requested, but was not found.'
16871 fi
16872
16873 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
16874   warn 'The Xinerama extension was requested, but was not found.'
16875 fi
16876
16877 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
16878   warn 'The XF86VMODE extension was requested, but was not found.'
16879 fi
16880
16881 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
16882   warn 'The RANDR extension was requested, but was not found.'
16883 fi
16884
16885 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
16886   warn "Checking of /proc/interrupts was requested, but it's bogus."
16887 fi
16888
16889 if test "$pkg_config" = false ; then
16890   warnL 'The "pkg-config" program was not found.  Without that,'
16891   warn2 "detection of the various GTK libraries won't work."
16892 else
16893   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
16894   if test "x$pkgerr" != "x" ; then
16895     warnL 'The "pkg-config" program produces errors.  This often causes'
16896     warn2 "detection of the various GTK libraries to malfunction."
16897     warn2 "The errors are:"
16898     echo ''
16899     echo "$pkgerr" | sed 's/^/             > /g'
16900   fi
16901 fi
16902
16903 if test "$gtk_halfassed" != no ; then
16904   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
16905   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
16906   warn2 "Perhaps some of the development packages are not installed?"
16907   if test "$have_gtk" = yes ; then
16908     v="$ac_gtk_version_string"
16909     warn2 "GTK $v is also installed, so it will be used instead."
16910     warn2 "Please read the above output and the \`config.log' file"
16911     warn2 "for more details."
16912   fi
16913 fi
16914
16915 motif_warn2() {
16916   warn2 'Though the Motif front-end to xscreensaver is still'
16917   warn2 'maintained, it is no longer being updated with new'
16918   warn2 'features: all new development on the xscreensaver-demo'
16919   warn2 'program is happening in the GTK version, and not in the'
16920   warn2 'Motif version.  It is recommended that you build against'
16921   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
16922 }
16923
16924 if test "$have_motif" = no -a "$have_gtk" = no; then
16925
16926   if test "$with_motif" = yes; then
16927     warnL "Neither the GTK nor Motif libraries were found; the"
16928     warn2 "\`xscreensaver-demo' program requires one of these."
16929     echo ''
16930     motif_warn2
16931   else
16932     warnL "The GTK libraries do not seem to be available; the"
16933     warn2 "\`xscreensaver-demo' program requires them."
16934 #   echo ''
16935 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
16936 #   warn2 "\`--with-motif' option) but that is NOT recommended."
16937 #   motif_warn2
16938   fi
16939
16940 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
16941   warnL "Use of Motif was requested, but it wasn't found;"
16942   warn2 "Gtk will be used instead."
16943
16944 elif test "$jurassic_gtk" = yes ; then
16945
16946   pref_gtk=2.0
16947
16948   v="$ac_gtk_version_string"
16949   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
16950     warnL "Use of Gtk was requested, but its version number is unknown;"
16951   elif test "$with_gtk_req" = yes ; then
16952     warnL "Use of Gtk was requested, but it is version $v;"
16953   else
16954     warnL "Gtk was found on this system, but it is version $v;"
16955   fi
16956
16957   warn2 "Gtk $pref_gtk or newer is required."
16958
16959 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
16960   warnL "Use of Gtk was requested, but it wasn't found."
16961 fi
16962
16963
16964 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
16965   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
16966   warn2 "headers were not found.  That can't be good.  Please"
16967   warn2 "install the GDK-Pixbuf development kit and re-configure."
16968 fi
16969
16970 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
16971
16972   preferred_lesstif=0.92
16973
16974   if test "$lesstif_version" = unknown; then
16975     warnL "Unable to determine the LessTif version number!"
16976     warn2 "Make sure you are using version $preferred_lesstif or newer."
16977     warn2 "See <http://www.lesstif.org/>."
16978
16979   elif test \! $lesstif_version -gt 82; then
16980     warnL "LessTif version $lesstif_version_string is being used."
16981     warn2 "LessTif versions 0.82 and earlier are too buggy to"
16982     warn2 "use with XScreenSaver; it is strongly recommended"
16983     warn2 "that you upgrade to at least version $preferred_lesstif!"
16984     warn2 "See <http://www.lesstif.org/>."
16985   fi
16986 fi
16987
16988
16989 if test "$have_motif" = yes -a "$have_gtk" = no ; then
16990   warn  'Motif is being used, and GTK is not.'
16991   echo  ''
16992   motif_warn2
16993 fi
16994
16995
16996 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
16997   warnL 'Use of XPM was requested, but it was not found.'
16998 fi
16999
17000 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
17001   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
17002 fi
17003
17004 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
17005    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
17006
17007   if test "$with_gdk_pixbuf_req" = yes ; then
17008     true
17009   elif test "$with_gdk_pixbuf_req" = no ; then
17010     warnL 'The GDK-Pixbuf library is not being used.'
17011   else
17012     warnL 'The GDK-Pixbuf library was not found.'
17013   fi
17014
17015   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
17016     true
17017   elif test "$with_xpm_req" = no ; then
17018     warnL 'The XPM library is not being used.'
17019   else
17020     warnL 'The XPM library was not found.'
17021   fi
17022
17023   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
17024     warn2 'The XPM library is being used instead.'
17025   fi
17026
17027   if test "$gdk_pixbuf_halfassed" = yes ; then
17028     echo ''
17029     warn2 'More specifically, we found the headers, but not the'
17030     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
17031     warn2 "system, or something else went wrong.  The \`config.log'"
17032     warn2 'file might contain some clues.'
17033   fi
17034
17035   echo ''
17036   warn2 'Some of the demos will not use images as much as they could.'
17037   warn2 'You should consider installing GDK-Pixbuf and re-running'
17038   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
17039   warn2 'provides support for more image formats.)'
17040 fi
17041
17042
17043 if test "$have_jpeg" = no ; then
17044   if test "$with_jpeg_req" = yes ; then
17045     warnL 'Use of libjpeg was requested, but it was not found.'
17046   elif test "$with_jpeg_req" = no ; then
17047     noteL 'The JPEG library is not being used.'
17048   else
17049     noteL 'The JPEG library was not found.'
17050   fi
17051
17052   if test "$jpeg_halfassed" = yes ; then
17053     echo ''
17054     warn2 'More specifically, we found the headers, but not the'
17055     warn2 'library; so either JPEG is half-installed on this'
17056     warn2 "system, or something else went wrong.  The \`config.log'"
17057     warn2 'file might contain some clues.'
17058     echo ''
17059   fi
17060
17061   if test "$have_gdk_pixbuf" = no ; then
17062     warn2 "This means that it won't be possible for the image-manipulating"
17063     warn2 "display modes to load files from disk; and it also means that"
17064     warn2 "the \`webcollage' program will be much slower."
17065   else
17066     warn2 "This means the \`webcollage' program will be much slower."
17067   fi
17068 fi
17069
17070
17071 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
17072   preferred_mesagl=3.4
17073   mgv="$ac_mesagl_version_string"
17074   pgl="$preferred_mesagl"
17075
17076   if test "$ac_mesagl_version" = unknown; then
17077     true
17078     # warnL "Unable to determine the MesaGL version number!"
17079     # warn2 "Make sure you are using version $preferred_mesagl or newer."
17080
17081   elif test \! "$ac_mesagl_version" -gt 2006; then
17082     warnL "MesaGL version number is $mgv --"
17083     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
17084     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
17085
17086   elif test \! "$ac_mesagl_version" -gt 3003; then
17087     warnL "MesaGL version number is $mgv --"
17088     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
17089     warn2 "that you upgrade to $pgl or newer."
17090   fi
17091 fi
17092
17093 if test "$have_gl" = no ; then
17094   if test "$with_gl_req" = yes ; then
17095     warnL 'Use of GL was requested, but it was not found.'
17096   elif test "$with_gl_req" = no ; then
17097     noteL 'The OpenGL 3D library is not being used.'
17098   else
17099     noteL 'The OpenGL 3D library was not found.'
17100   fi
17101
17102   if test "$gl_halfassed" = yes ; then
17103     echo ''
17104     warn2 'More specifically, we found the headers, but not the'
17105     warn2 'libraries; so either GL is half-installed on this'
17106     warn2 "system, or something else went wrong.  The \`config.log'"
17107     warn2 'file might contain some clues.'
17108   fi
17109
17110   echo ''
17111   warn2 'Those demos which use 3D will not be built or installed.'
17112   warn2 'You might want to consider installing OpenGL and'
17113   warn2 're-running configure.'
17114
17115 fi
17116
17117
17118 if test "$have_gl" = yes -a "$have_gle" = no ; then
17119
17120  # nobody cares about this; don't print the warning unless it was
17121  # requested and not found, or halfway-found.
17122  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
17123
17124   if test "$with_gle_req" = yes ; then
17125     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
17126     warn2 'it was not found (though the OpenGL library was found, and'
17127     warn2 'is being used.)'
17128   elif test "$with_gle_req" = no ; then
17129     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
17130     warn2 'library is not.'
17131   else
17132     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
17133     warn2 'library was not.'
17134   fi
17135
17136   if test "$gle_halfassed" = yes ; then
17137     echo ''
17138     warn2 'More specifically, we found the headers, but not the'
17139     warn2 'libraries; so either GLE is half-installed on this'
17140     warn2 "system, or something else went wrong.  The \`config.log'"
17141     warn2 'file might contain some clues.'
17142   fi
17143
17144   echo ''
17145   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
17146   warn2 'will not be built or installed.  You might want to consider'
17147   warn2 'installing GLE and re-running configure.  You can find the'
17148   warn2 'GLE library at <http://www.linas.org/gle/>'
17149
17150  fi
17151 fi
17152
17153
17154 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
17155   warn 'Use of XReadDisplay was requested, but it was not found.'
17156 fi
17157
17158 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
17159   warn 'Use of Kerberos was requested, but it was not found.'
17160 fi
17161
17162 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
17163   warn 'Use of PAM was requested, but it was not found.'
17164 fi
17165
17166 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
17167   warn 'Use of shadow passwords was requested, but they were not found.'
17168 fi
17169
17170 if test "$ac_macosx" = yes ; then
17171   if test "$enable_locking" = yes ; then
17172     warn  "You have specified --enable-locking on MacOS X."
17173     warn2 "THIS DOES NOT WORK!  Don't do this!"
17174   fi
17175 fi
17176
17177
17178 # You are in a twisty maze of namespaces and syntaxes, all alike.
17179 # Fuck the skull of Unix.
17180 #
17181 bindir=`eval eval eval eval eval eval eval echo $bindir`
17182 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
17183 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
17184
17185 # canonicalize slashes.
17186 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
17187 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
17188 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
17189
17190
17191 # Sanity check the hackdir
17192 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
17193   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
17194     echo ""
17195     as_fn_error $? "\"--with-hackdir=${bindir}/${bad_choice}\" won't work.
17196                    There will be an executable installed with that name, so
17197                    that can't be the name of a directory as well.  Please
17198                    re-configure with a different directory name." "$LINENO" 5
17199   fi
17200 done
17201
17202
17203 do_dir_warning=no
17204
17205 # Now let's warn if there's a previous RPM version already installed.
17206 # But don't bother with this test if we are currently *building* an RPM.
17207
17208 if test -z "$RPM_PACKAGE_VERSION" ; then
17209
17210   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
17211
17212   # M4 sucks!!
17213
17214   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
17215         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
17216         head -1`
17217
17218
17219   if test \! -z "$rpmv" ; then
17220     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
17221     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
17222
17223     warning=no
17224     warnL "There is already an installed RPM of xscreensaver $rpmv"
17225     warn2 'on this system.  You might want to remove it ("rpm -ve")'
17226     warn2 'before running "make install" in this directory.'
17227     echo ""
17228     warn2 "Alternately, you could build this version of xscreensaver"
17229     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
17230     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
17231     warn2 "See the RPM documentation for more info."
17232     echo ""
17233
17234     if test "$rpmbdir" = "$rpmhdir" ; then
17235       warn2 "The RPM version was installed in $rpmbdir/."
17236       do_dir_warning=yes
17237     else
17238       warn2 "The RPM version was installed in $rpmbdir/,"
17239       warn2 "with demos in $rpmhdir/."
17240     fi
17241   fi
17242 fi
17243
17244 # Also warn if there's a Debian package installed.
17245 #
17246 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
17247 debv=''
17248 for dpkg in $debnames ; do
17249   if test -z "$debv"; then
17250     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
17251   fi
17252 done
17253
17254 if test \! -z "$debv" ; then
17255   debbdir=`dpkg -L $debnames 2>/dev/null | \
17256             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
17257   debhdir=`dpkg -L $debnames 2>/dev/null | \
17258             sed -n 's@^\(.*/\)popsquares$@\1@p'`
17259   if test -z "$debbdir" ; then debbdir='???'; fi
17260   if test -z "$debhdir" ; then debhdir='???'; fi
17261
17262   warning=no
17263   warnL "There is already an installed dpkg of xscreensaver"
17264   warn2 "version \"$debv\" on this system."
17265   echo ""
17266   warn2 "The dpkg was installed in $debbdir,"
17267   warn2 "with demos in $debhdir."
17268 fi
17269
17270
17271 if test "${bindir}" = "${HACKDIR}" ; then
17272   do_dir_warning=yes
17273 fi
17274
17275 if test "$do_dir_warning" = yes; then
17276   echo ""
17277   echo "$warnsep"
17278   echo ""
17279   echo '      When you run "make install", the "xscreensaver",'
17280   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
17281   echo "      will be installed in ${bindir}/."
17282   echo ""
17283   echo "      The various graphics demos (200+ different executables) will"
17284   echo "      be installed in ${HACKDIR}/."
17285   echo ""
17286   echo "      If you would prefer the demos to be installed elsewhere,"
17287   echo "      you should re-run configure with the --with-hackdir=DIR"
17288   echo "      option.  For more information, run \`./configure --help'."
17289   warning=yes
17290 fi
17291
17292 if test "$warning" != no; then
17293   echo '' ; echo "$warnsep" ; echo ''
17294 fi
17295
17296 if test "$do_dir_warning" = no; then
17297   if test "$warning" = no; then
17298     echo ''
17299   fi
17300   echo "User programs will be installed in ${bindir}/"
17301   echo "Screen savers will be installed in ${HACKDIR}/"
17302   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
17303   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
17304   echo ''
17305 fi