From http://www.jwz.org/xscreensaver/xscreensaver-5.38.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 ANIM_LIBS
629 ANIM_OBJS
630 GTK_EXTRA_OBJS
631 HACK_CONF_DIR
632 PO_DATADIR
633 GTK_DATADIR
634 HACKDIR_FULL
635 HACKDIR
636 NOGNOME
637 GNOME22
638 GNOME24
639 JWZGLES_OBJS
640 GLE_KLUDGE
641 GLE_EXES
642 GL_KLUDGE
643 GL_MEN
644 GL_UTIL_EXES
645 SUID_EXES
646 RETIRED_GL_EXES
647 GL_EXES
648 JPEG_EXES
649 LOCK_OBJS
650 LOCK_SRCS
651 SAVER_GL_LIBS
652 SAVER_GL_OBJS
653 SAVER_GL_SRCS
654 XFT_LIBS
655 XFT_OBJS
656 XFT_SRCS
657 XMU_LIBS
658 XMU_OBJS
659 XMU_SRCS
660 PASSWD_OBJS
661 PASSWD_SRCS
662 MEN_OSX
663 SCRIPTS_OSX
664 EXES_OSX
665 OBJCC
666 COMMENT_DEMO_GLADE2_GTK_2_22_TAIL
667 COMMENT_DEMO_GLADE2_GTK_2_22_HEAD
668 WITH_BROWSER
669 DEFAULT_TEXT_FILE
670 DEFAULT_IMAGE_DIRECTORY
671 DEFAULT_IMAGES_P
672 NEW_LOGIN_COMMAND_P
673 NEW_LOGIN_COMMAND
674 COMMENT_PAM_CHECK_ACCOUNT
675 HAVE_PAM_FAIL_DELAY
676 INSTALL_PAM
677 NEED_SETUID
678 INSTALL_DIRS
679 SETUID_HACKS
680 INSTALL_SETUID
681 PASSWD_LIBS
682 XINERAMA_LIBS
683 XDPMS_LIBS
684 GLE_LIBS
685 GL_LIBS
686 PTY_LIBS
687 XPM_LIBS
688 HACK_LIBS
689 JPEG_LIBS
690 XML_LIBS
691 GTK_LIBS
692 MOTIF_LIBS
693 SAVER_LIBS
694 ALL_DEMO_PROGRAMS
695 PREFERRED_DEMO_PROGRAM
696 INCLUDES
697 gnome_url_show_program
698 gnome_open_program
699 pkg_config
700 login_manager_tmp
701 MKINSTALLDIRS
702 POSUB
703 POFILES
704 PO_IN_DATADIR_FALSE
705 PO_IN_DATADIR_TRUE
706 INTLLIBS
707 INSTOBJEXT
708 GMOFILES
709 DATADIRNAME
710 CATOBJEXT
711 CATALOGS
712 MSGFMT_OPTS
713 INTL_MACOSX_LIBS
714 GETTEXT_PACKAGE
715 ALL_LINGUAS
716 GMSGFMT
717 MSGFMT
718 MSGMERGE
719 XGETTEXT
720 INTLTOOL_POLICY_RULE
721 INTLTOOL_SERVICE_RULE
722 INTLTOOL_THEME_RULE
723 INTLTOOL_SCHEMAS_RULE
724 INTLTOOL_CAVES_RULE
725 INTLTOOL_XML_NOMERGE_RULE
726 INTLTOOL_XML_RULE
727 INTLTOOL_KBD_RULE
728 INTLTOOL_XAM_RULE
729 INTLTOOL_UI_RULE
730 INTLTOOL_SOUNDLIST_RULE
731 INTLTOOL_SHEET_RULE
732 INTLTOOL_SERVER_RULE
733 INTLTOOL_PONG_RULE
734 INTLTOOL_OAF_RULE
735 INTLTOOL_PROP_RULE
736 INTLTOOL_KEYS_RULE
737 INTLTOOL_DIRECTORY_RULE
738 INTLTOOL_DESKTOP_RULE
739 intltool__v_merge_options_0
740 intltool__v_merge_options_
741 INTLTOOL_V_MERGE_OPTIONS
742 INTLTOOL__v_MERGE_0
743 INTLTOOL__v_MERGE_
744 INTLTOOL_V_MERGE
745 AM_DEFAULT_VERBOSITY
746 INTLTOOL_EXTRACT
747 INTLTOOL_MERGE
748 INTLTOOL_UPDATE
749 USE_NLS
750 X_EXTRA_LIBS
751 X_LIBS
752 X_PRE_LIBS
753 X_CFLAGS
754 XMKMF
755 PERL
756 EGREP
757 GREP
758 SET_MAKE
759 INSTALL_DATA
760 INSTALL_SCRIPT
761 INSTALL_PROGRAM
762 CPP
763 PTHREAD_CFLAGS
764 PTHREAD_LIBS
765 PTHREAD_CC
766 ax_pthread_config
767 OBJEXT
768 EXEEXT
769 ac_ct_CC
770 CPPFLAGS
771 LDFLAGS
772 CFLAGS
773 CC
774 host_os
775 host_vendor
776 host_cpu
777 host
778 build_os
779 build_vendor
780 build_cpu
781 build
782 target_alias
783 host_alias
784 build_alias
785 LIBS
786 ECHO_T
787 ECHO_N
788 ECHO_C
789 DEFS
790 mandir
791 localedir
792 libdir
793 psdir
794 pdfdir
795 dvidir
796 htmldir
797 infodir
798 docdir
799 oldincludedir
800 includedir
801 localstatedir
802 sharedstatedir
803 sysconfdir
804 datadir
805 datarootdir
806 libexecdir
807 sbindir
808 bindir
809 program_transform_name
810 prefix
811 exec_prefix
812 PACKAGE_URL
813 PACKAGE_BUGREPORT
814 PACKAGE_STRING
815 PACKAGE_VERSION
816 PACKAGE_TARNAME
817 PACKAGE_NAME
818 PATH_SEPARATOR
819 SHELL'
820 ac_subst_files=''
821 ac_user_opts='
822 enable_option_checking
823 with_x_app_defaults
824 with_pthread
825 enable_largefile
826 with_x
827 enable_nls
828 with_hackdir
829 enable_subdir
830 with_configdir
831 with_dpms_ext
832 with_xinerama_ext
833 with_xinput_ext
834 with_xf86vmode_ext
835 with_xf86gamma_ext
836 with_randr_ext
837 with_proc_interrupts
838 enable_locking
839 enable_root_passwd
840 with_pam
841 with_pam_service_name
842 enable_pam_check_account_type
843 with_kerberos
844 with_shadow
845 with_passwd_helper
846 with_login_manager
847 with_gtk
848 with_motif
849 with_gl
850 with_gle
851 with_gles
852 with_pixbuf
853 with_xpm
854 with_jpeg
855 with_xft
856 with_xshm_ext
857 with_xdbe_ext
858 with_readdisplay
859 with_image_directory
860 with_text_file
861 with_browser
862 with_setuid_hacks
863 with_record_animation
864 '
865       ac_precious_vars='build_alias
866 host_alias
867 target_alias
868 CC
869 CFLAGS
870 LDFLAGS
871 LIBS
872 CPPFLAGS
873 CPP
874 XMKMF'
875
876
877 # Initialize some variables set by options.
878 ac_init_help=
879 ac_init_version=false
880 ac_unrecognized_opts=
881 ac_unrecognized_sep=
882 # The variables have the same names as the options, with
883 # dashes changed to underlines.
884 cache_file=/dev/null
885 exec_prefix=NONE
886 no_create=
887 no_recursion=
888 prefix=NONE
889 program_prefix=NONE
890 program_suffix=NONE
891 program_transform_name=s,x,x,
892 silent=
893 site=
894 srcdir=
895 verbose=
896 x_includes=NONE
897 x_libraries=NONE
898
899 # Installation directory options.
900 # These are left unexpanded so users can "make install exec_prefix=/foo"
901 # and all the variables that are supposed to be based on exec_prefix
902 # by default will actually change.
903 # Use braces instead of parens because sh, perl, etc. also accept them.
904 # (The list follows the same order as the GNU Coding Standards.)
905 bindir='${exec_prefix}/bin'
906 sbindir='${exec_prefix}/sbin'
907 libexecdir='${exec_prefix}/libexec'
908 datarootdir='${prefix}/share'
909 datadir='${datarootdir}'
910 sysconfdir='${prefix}/etc'
911 sharedstatedir='${prefix}/com'
912 localstatedir='${prefix}/var'
913 includedir='${prefix}/include'
914 oldincludedir='/usr/include'
915 docdir='${datarootdir}/doc/${PACKAGE}'
916 infodir='${datarootdir}/info'
917 htmldir='${docdir}'
918 dvidir='${docdir}'
919 pdfdir='${docdir}'
920 psdir='${docdir}'
921 libdir='${exec_prefix}/lib'
922 localedir='${datarootdir}/locale'
923 mandir='${datarootdir}/man'
924
925 ac_prev=
926 ac_dashdash=
927 for ac_option
928 do
929   # If the previous option needs an argument, assign it.
930   if test -n "$ac_prev"; then
931     eval $ac_prev=\$ac_option
932     ac_prev=
933     continue
934   fi
935
936   case $ac_option in
937   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
938   *=)   ac_optarg= ;;
939   *)    ac_optarg=yes ;;
940   esac
941
942   # Accept the important Cygnus configure options, so we can diagnose typos.
943
944   case $ac_dashdash$ac_option in
945   --)
946     ac_dashdash=yes ;;
947
948   -bindir | --bindir | --bindi | --bind | --bin | --bi)
949     ac_prev=bindir ;;
950   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
951     bindir=$ac_optarg ;;
952
953   -build | --build | --buil | --bui | --bu)
954     ac_prev=build_alias ;;
955   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
956     build_alias=$ac_optarg ;;
957
958   -cache-file | --cache-file | --cache-fil | --cache-fi \
959   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
960     ac_prev=cache_file ;;
961   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
962   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
963     cache_file=$ac_optarg ;;
964
965   --config-cache | -C)
966     cache_file=config.cache ;;
967
968   -datadir | --datadir | --datadi | --datad)
969     ac_prev=datadir ;;
970   -datadir=* | --datadir=* | --datadi=* | --datad=*)
971     datadir=$ac_optarg ;;
972
973   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
974   | --dataroo | --dataro | --datar)
975     ac_prev=datarootdir ;;
976   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
977   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
978     datarootdir=$ac_optarg ;;
979
980   -disable-* | --disable-*)
981     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
982     # Reject names that are not valid shell variable names.
983     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
984       as_fn_error $? "invalid feature name: $ac_useropt"
985     ac_useropt_orig=$ac_useropt
986     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
987     case $ac_user_opts in
988       *"
989 "enable_$ac_useropt"
990 "*) ;;
991       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
992          ac_unrecognized_sep=', ';;
993     esac
994     eval enable_$ac_useropt=no ;;
995
996   -docdir | --docdir | --docdi | --doc | --do)
997     ac_prev=docdir ;;
998   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
999     docdir=$ac_optarg ;;
1000
1001   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1002     ac_prev=dvidir ;;
1003   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1004     dvidir=$ac_optarg ;;
1005
1006   -enable-* | --enable-*)
1007     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1008     # Reject names that are not valid shell variable names.
1009     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1010       as_fn_error $? "invalid feature name: $ac_useropt"
1011     ac_useropt_orig=$ac_useropt
1012     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1013     case $ac_user_opts in
1014       *"
1015 "enable_$ac_useropt"
1016 "*) ;;
1017       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1018          ac_unrecognized_sep=', ';;
1019     esac
1020     eval enable_$ac_useropt=\$ac_optarg ;;
1021
1022   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1023   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1024   | --exec | --exe | --ex)
1025     ac_prev=exec_prefix ;;
1026   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1027   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1028   | --exec=* | --exe=* | --ex=*)
1029     exec_prefix=$ac_optarg ;;
1030
1031   -gas | --gas | --ga | --g)
1032     # Obsolete; use --with-gas.
1033     with_gas=yes ;;
1034
1035   -help | --help | --hel | --he | -h)
1036     ac_init_help=long ;;
1037   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1038     ac_init_help=recursive ;;
1039   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1040     ac_init_help=short ;;
1041
1042   -host | --host | --hos | --ho)
1043     ac_prev=host_alias ;;
1044   -host=* | --host=* | --hos=* | --ho=*)
1045     host_alias=$ac_optarg ;;
1046
1047   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1048     ac_prev=htmldir ;;
1049   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1050   | --ht=*)
1051     htmldir=$ac_optarg ;;
1052
1053   -includedir | --includedir | --includedi | --included | --include \
1054   | --includ | --inclu | --incl | --inc)
1055     ac_prev=includedir ;;
1056   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1057   | --includ=* | --inclu=* | --incl=* | --inc=*)
1058     includedir=$ac_optarg ;;
1059
1060   -infodir | --infodir | --infodi | --infod | --info | --inf)
1061     ac_prev=infodir ;;
1062   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1063     infodir=$ac_optarg ;;
1064
1065   -libdir | --libdir | --libdi | --libd)
1066     ac_prev=libdir ;;
1067   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1068     libdir=$ac_optarg ;;
1069
1070   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1071   | --libexe | --libex | --libe)
1072     ac_prev=libexecdir ;;
1073   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1074   | --libexe=* | --libex=* | --libe=*)
1075     libexecdir=$ac_optarg ;;
1076
1077   -localedir | --localedir | --localedi | --localed | --locale)
1078     ac_prev=localedir ;;
1079   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1080     localedir=$ac_optarg ;;
1081
1082   -localstatedir | --localstatedir | --localstatedi | --localstated \
1083   | --localstate | --localstat | --localsta | --localst | --locals)
1084     ac_prev=localstatedir ;;
1085   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1086   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1087     localstatedir=$ac_optarg ;;
1088
1089   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1090     ac_prev=mandir ;;
1091   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1092     mandir=$ac_optarg ;;
1093
1094   -nfp | --nfp | --nf)
1095     # Obsolete; use --without-fp.
1096     with_fp=no ;;
1097
1098   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1099   | --no-cr | --no-c | -n)
1100     no_create=yes ;;
1101
1102   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1103   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1104     no_recursion=yes ;;
1105
1106   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1107   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1108   | --oldin | --oldi | --old | --ol | --o)
1109     ac_prev=oldincludedir ;;
1110   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1111   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1112   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1113     oldincludedir=$ac_optarg ;;
1114
1115   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1116     ac_prev=prefix ;;
1117   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1118     prefix=$ac_optarg ;;
1119
1120   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1121   | --program-pre | --program-pr | --program-p)
1122     ac_prev=program_prefix ;;
1123   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1124   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1125     program_prefix=$ac_optarg ;;
1126
1127   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1128   | --program-suf | --program-su | --program-s)
1129     ac_prev=program_suffix ;;
1130   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1131   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1132     program_suffix=$ac_optarg ;;
1133
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     ac_prev=program_transform_name ;;
1142   -program-transform-name=* | --program-transform-name=* \
1143   | --program-transform-nam=* | --program-transform-na=* \
1144   | --program-transform-n=* | --program-transform-=* \
1145   | --program-transform=* | --program-transfor=* \
1146   | --program-transfo=* | --program-transf=* \
1147   | --program-trans=* | --program-tran=* \
1148   | --progr-tra=* | --program-tr=* | --program-t=*)
1149     program_transform_name=$ac_optarg ;;
1150
1151   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1152     ac_prev=pdfdir ;;
1153   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1154     pdfdir=$ac_optarg ;;
1155
1156   -psdir | --psdir | --psdi | --psd | --ps)
1157     ac_prev=psdir ;;
1158   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1159     psdir=$ac_optarg ;;
1160
1161   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1162   | -silent | --silent | --silen | --sile | --sil)
1163     silent=yes ;;
1164
1165   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1166     ac_prev=sbindir ;;
1167   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1168   | --sbi=* | --sb=*)
1169     sbindir=$ac_optarg ;;
1170
1171   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1172   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1173   | --sharedst | --shareds | --shared | --share | --shar \
1174   | --sha | --sh)
1175     ac_prev=sharedstatedir ;;
1176   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1177   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1178   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1179   | --sha=* | --sh=*)
1180     sharedstatedir=$ac_optarg ;;
1181
1182   -site | --site | --sit)
1183     ac_prev=site ;;
1184   -site=* | --site=* | --sit=*)
1185     site=$ac_optarg ;;
1186
1187   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1188     ac_prev=srcdir ;;
1189   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1190     srcdir=$ac_optarg ;;
1191
1192   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1193   | --syscon | --sysco | --sysc | --sys | --sy)
1194     ac_prev=sysconfdir ;;
1195   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1196   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1197     sysconfdir=$ac_optarg ;;
1198
1199   -target | --target | --targe | --targ | --tar | --ta | --t)
1200     ac_prev=target_alias ;;
1201   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1202     target_alias=$ac_optarg ;;
1203
1204   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1205     verbose=yes ;;
1206
1207   -version | --version | --versio | --versi | --vers | -V)
1208     ac_init_version=: ;;
1209
1210   -with-* | --with-*)
1211     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1212     # Reject names that are not valid shell variable names.
1213     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1214       as_fn_error $? "invalid package name: $ac_useropt"
1215     ac_useropt_orig=$ac_useropt
1216     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217     case $ac_user_opts in
1218       *"
1219 "with_$ac_useropt"
1220 "*) ;;
1221       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1222          ac_unrecognized_sep=', ';;
1223     esac
1224     eval with_$ac_useropt=\$ac_optarg ;;
1225
1226   -without-* | --without-*)
1227     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1228     # Reject names that are not valid shell variable names.
1229     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1230       as_fn_error $? "invalid package name: $ac_useropt"
1231     ac_useropt_orig=$ac_useropt
1232     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1233     case $ac_user_opts in
1234       *"
1235 "with_$ac_useropt"
1236 "*) ;;
1237       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1238          ac_unrecognized_sep=', ';;
1239     esac
1240     eval with_$ac_useropt=no ;;
1241
1242   --x)
1243     # Obsolete; use --with-x.
1244     with_x=yes ;;
1245
1246   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1247   | --x-incl | --x-inc | --x-in | --x-i)
1248     ac_prev=x_includes ;;
1249   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1250   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1251     x_includes=$ac_optarg ;;
1252
1253   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1254   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1255     ac_prev=x_libraries ;;
1256   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1257   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1258     x_libraries=$ac_optarg ;;
1259
1260   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1261 Try \`$0 --help' for more information"
1262     ;;
1263
1264   *=*)
1265     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1266     # Reject names that are not valid shell variable names.
1267     case $ac_envvar in #(
1268       '' | [0-9]* | *[!_$as_cr_alnum]* )
1269       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1270     esac
1271     eval $ac_envvar=\$ac_optarg
1272     export $ac_envvar ;;
1273
1274   *)
1275     # FIXME: should be removed in autoconf 3.0.
1276     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1277     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1278       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1279     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1280     ;;
1281
1282   esac
1283 done
1284
1285 if test -n "$ac_prev"; then
1286   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1287   as_fn_error $? "missing argument to $ac_option"
1288 fi
1289
1290 if test -n "$ac_unrecognized_opts"; then
1291   case $enable_option_checking in
1292     no) ;;
1293     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1294     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1295   esac
1296 fi
1297
1298 # Check all directory arguments for consistency.
1299 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1300                 datadir sysconfdir sharedstatedir localstatedir includedir \
1301                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1302                 libdir localedir mandir
1303 do
1304   eval ac_val=\$$ac_var
1305   # Remove trailing slashes.
1306   case $ac_val in
1307     */ )
1308       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1309       eval $ac_var=\$ac_val;;
1310   esac
1311   # Be sure to have absolute directory names.
1312   case $ac_val in
1313     [\\/$]* | ?:[\\/]* )  continue;;
1314     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1315   esac
1316   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1317 done
1318
1319 # There might be people who depend on the old broken behavior: `$host'
1320 # used to hold the argument of --host etc.
1321 # FIXME: To remove some day.
1322 build=$build_alias
1323 host=$host_alias
1324 target=$target_alias
1325
1326 # FIXME: To remove some day.
1327 if test "x$host_alias" != x; then
1328   if test "x$build_alias" = x; then
1329     cross_compiling=maybe
1330   elif test "x$build_alias" != "x$host_alias"; then
1331     cross_compiling=yes
1332   fi
1333 fi
1334
1335 ac_tool_prefix=
1336 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1337
1338 test "$silent" = yes && exec 6>/dev/null
1339
1340
1341 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1342 ac_ls_di=`ls -di .` &&
1343 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1344   as_fn_error $? "working directory cannot be determined"
1345 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1346   as_fn_error $? "pwd does not report name of working directory"
1347
1348
1349 # Find the source files, if location was not specified.
1350 if test -z "$srcdir"; then
1351   ac_srcdir_defaulted=yes
1352   # Try the directory containing this script, then the parent directory.
1353   ac_confdir=`$as_dirname -- "$as_myself" ||
1354 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1355          X"$as_myself" : 'X\(//\)[^/]' \| \
1356          X"$as_myself" : 'X\(//\)$' \| \
1357          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1358 $as_echo X"$as_myself" |
1359     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1360             s//\1/
1361             q
1362           }
1363           /^X\(\/\/\)[^/].*/{
1364             s//\1/
1365             q
1366           }
1367           /^X\(\/\/\)$/{
1368             s//\1/
1369             q
1370           }
1371           /^X\(\/\).*/{
1372             s//\1/
1373             q
1374           }
1375           s/.*/./; q'`
1376   srcdir=$ac_confdir
1377   if test ! -r "$srcdir/$ac_unique_file"; then
1378     srcdir=..
1379   fi
1380 else
1381   ac_srcdir_defaulted=no
1382 fi
1383 if test ! -r "$srcdir/$ac_unique_file"; then
1384   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1385   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1386 fi
1387 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1388 ac_abs_confdir=`(
1389         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1390         pwd)`
1391 # When building in place, set srcdir=.
1392 if test "$ac_abs_confdir" = "$ac_pwd"; then
1393   srcdir=.
1394 fi
1395 # Remove unnecessary trailing slashes from srcdir.
1396 # Double slashes in file names in object file debugging info
1397 # mess up M-x gdb in Emacs.
1398 case $srcdir in
1399 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1400 esac
1401 for ac_var in $ac_precious_vars; do
1402   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1403   eval ac_env_${ac_var}_value=\$${ac_var}
1404   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1405   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1406 done
1407
1408 #
1409 # Report the --help message.
1410 #
1411 if test "$ac_init_help" = "long"; then
1412   # Omit some internal or obsolete options to make the list less imposing.
1413   # This message is too long to be a string in the A/UX 3.1 sh.
1414   cat <<_ACEOF
1415 \`configure' configures this package to adapt to many kinds of systems.
1416
1417 Usage: $0 [OPTION]... [VAR=VALUE]...
1418
1419 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1420 VAR=VALUE.  See below for descriptions of some of the useful variables.
1421
1422 Defaults for the options are specified in brackets.
1423
1424
1425 Configuration:
1426
1427   -h, --help              display this help and exit
1428       --help=short        display options specific to this package
1429       --help=recursive    display the short help of all the included packages
1430   -V, --version           display version information and exit
1431   -q, --quiet, --silent   do not print \`checking ...' messages
1432       --cache-file=FILE   cache test results in FILE [disabled]
1433   -C, --config-cache      alias for \`--cache-file=config.cache'
1434   -n, --no-create         do not create output files
1435       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1436
1437 Installation directories:
1438   --prefix=PREFIX         install architecture-independent files in PREFIX
1439                           [$ac_default_prefix]
1440   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1441                           [PREFIX]
1442
1443 By default, \`make install' will install all the files in
1444 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1445 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1446 for instance \`--prefix=\$HOME'.
1447
1448 For better control, use the options below.
1449
1450 Fine tuning of the installation directories:
1451   --bindir=DIR            user executables [EPREFIX/bin]
1452   --libexecdir=DIR        program executables [EPREFIX/libexec]
1453   --libdir=DIR            object code libraries [EPREFIX/lib]
1454   --includedir=DIR        C header files [PREFIX/include]
1455   --x-includes=DIR        X include files are in DIR
1456   --x-libraries=DIR       X library files are in DIR
1457   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1458   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1459   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1460   --mandir=DIR            man documentation [DATAROOTDIR/man]
1461   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1462   --htmldir=DIR           html documentation [DOCDIR]
1463   --dvidir=DIR            dvi documentation [DOCDIR]
1464   --pdfdir=DIR            pdf documentation [DOCDIR]
1465   --psdir=DIR             ps documentation [DOCDIR]
1466 _ACEOF
1467
1468   cat <<\_ACEOF
1469
1470 X features:
1471   --x-includes=DIR    X include files are in DIR
1472   --x-libraries=DIR   X library files are in DIR
1473
1474 System types:
1475   --build=BUILD     configure for building on BUILD [guessed]
1476   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1477 _ACEOF
1478 fi
1479
1480 if test -n "$ac_init_help"; then
1481
1482   cat <<\_ACEOF
1483
1484 Optional Features:
1485   --disable-option-checking  ignore unrecognized --enable/--with options
1486   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1487   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1488   --disable-largefile     omit support for large files
1489   --disable-nls           do not use Native Language Support
1490
1491 Screen locking options:
1492   --enable-locking        Compile in support for locking the display.
1493   --disable-locking       Do not allow locking at all.
1494
1495   --enable-root-passwd        Allow root passwd to unlock screen.
1496   --disable-root-passwd       Do not allow that.
1497   --enable-pam-check-account-type
1498                           Whether PAM should check the result of account
1499                           modules when authenticating. Only do this if you
1500                           have account configured properly on your system.
1501
1502 Optional Packages:
1503   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1504   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1505
1506   --with-pthread          Enables POSIX threads, for SMP support.
1507
1508 Installation options:
1509   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1510                           Default: `PREFIX/libexec/xscreensaver/'
1511   --with-configdir=DIR    Where to install the data files that describe each
1512                           of the display modes to the GUI.
1513                           Default: `PREFIX/share/xscreensaver/config/'
1514   --with-x-app-defaults=DIR
1515                            Where to install xscreensaver configuration file.
1516
1517   --with-dpms-ext         Include support for the DPMS extension.
1518   --with-xinerama-ext     Include support for the XINERAMA extension.
1519   --with-xinput-ext       Include support for the XInput extension.
1520   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1521   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1522   --with-randr-ext        Include support for the X Resize+Rotate extension.
1523   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1524                           file to notice keyboard activity.
1525   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1526   --with-pam-service-name NAME arg is the name of the PAM service that
1527                           xscreensaver will authenticate as.
1528   --with-kerberos         Include support for Kerberos authentication.
1529   --with-shadow           Include support for shadow password authentication.
1530   --with-passwd-helper    Include support for an external password
1531                           verification helper program.
1532   --with-login-manager    Put a "New Login" button on the unlock dialog that
1533                           runs a login manager like gdmflexiserver or kdmctl.
1534
1535 User interface options:
1536
1537   --with-gtk              Use the Gtk toolkit for the user interface.
1538   --with-motif            Use the Motif toolkit for the user interface
1539                           (no longer supported.)
1540
1541 Graphics options:
1542
1543   --with-gl               Build those demos which depend on OpenGL.
1544   --with-gle              Build those demos which depend on GLE
1545                           (the OpenGL "extrusion" library.)
1546   --with-gles             Target OpenGL ES 1.x API instead of OpenGL 1.3.
1547   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1548                           demos, which will make it possible for them to read
1549                           GIF, JPEG, and PNG files as well.
1550   --with-xpm              Include support for XPM files in some demos.
1551                           (Not needed if Pixbuf is used.)
1552   --with-jpeg             Include support for the JPEG library.
1553   --with-xft              Include support for the X Freetype library.
1554   --with-xshm-ext         Include support for the Shared Memory extension.
1555   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1556   --with-readdisplay      Include support for the XReadDisplay extension.
1557   --with-image-directory  Arg is the default directory from which some demos
1558                           will choose random images to display.
1559   --with-text-file=FILE   By default, some demos may display this file.
1560   --with-browser=BROWSER  Specify the web browser used to show the help URL.
1561   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1562                           (which is needed in order to ping other hosts.)
1563
1564   --with-record-animation Include code for generating MP4 videos.
1565
1566
1567 Some influential environment variables:
1568   CC          C compiler command
1569   CFLAGS      C compiler flags
1570   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1571               nonstandard directory <lib dir>
1572   LIBS        libraries to pass to the linker, e.g. -l<library>
1573   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1574               you have headers in a nonstandard directory <include dir>
1575   CPP         C preprocessor
1576   XMKMF       Path to xmkmf, Makefile generator for X Window System
1577
1578 Use these variables to override the choices made by `configure' or to help
1579 it to find libraries and programs with nonstandard names/locations.
1580
1581 Report bugs to the package provider.
1582 _ACEOF
1583 ac_status=$?
1584 fi
1585
1586 if test "$ac_init_help" = "recursive"; then
1587   # If there are subdirs, report their specific --help.
1588   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1589     test -d "$ac_dir" ||
1590       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1591       continue
1592     ac_builddir=.
1593
1594 case "$ac_dir" in
1595 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1596 *)
1597   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1598   # A ".." for each directory in $ac_dir_suffix.
1599   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1600   case $ac_top_builddir_sub in
1601   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1602   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1603   esac ;;
1604 esac
1605 ac_abs_top_builddir=$ac_pwd
1606 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1607 # for backward compatibility:
1608 ac_top_builddir=$ac_top_build_prefix
1609
1610 case $srcdir in
1611   .)  # We are building in place.
1612     ac_srcdir=.
1613     ac_top_srcdir=$ac_top_builddir_sub
1614     ac_abs_top_srcdir=$ac_pwd ;;
1615   [\\/]* | ?:[\\/]* )  # Absolute name.
1616     ac_srcdir=$srcdir$ac_dir_suffix;
1617     ac_top_srcdir=$srcdir
1618     ac_abs_top_srcdir=$srcdir ;;
1619   *) # Relative name.
1620     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1621     ac_top_srcdir=$ac_top_build_prefix$srcdir
1622     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1623 esac
1624 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1625
1626     cd "$ac_dir" || { ac_status=$?; continue; }
1627     # Check for guested configure.
1628     if test -f "$ac_srcdir/configure.gnu"; then
1629       echo &&
1630       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1631     elif test -f "$ac_srcdir/configure"; then
1632       echo &&
1633       $SHELL "$ac_srcdir/configure" --help=recursive
1634     else
1635       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1636     fi || ac_status=$?
1637     cd "$ac_pwd" || { ac_status=$?; break; }
1638   done
1639 fi
1640
1641 test -n "$ac_init_help" && exit $ac_status
1642 if $ac_init_version; then
1643   cat <<\_ACEOF
1644 configure
1645 generated by GNU Autoconf 2.69
1646
1647 Copyright (C) 2012 Free Software Foundation, Inc.
1648 This configure script is free software; the Free Software Foundation
1649 gives unlimited permission to copy, distribute and modify it.
1650 _ACEOF
1651   exit
1652 fi
1653
1654 ## ------------------------ ##
1655 ## Autoconf initialization. ##
1656 ## ------------------------ ##
1657
1658 # ac_fn_c_try_compile LINENO
1659 # --------------------------
1660 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1661 ac_fn_c_try_compile ()
1662 {
1663   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1664   rm -rf conftest.$ac_objext
1665   if { { ac_try="$ac_compile"
1666 case "(($ac_try" in
1667   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1668   *) ac_try_echo=$ac_try;;
1669 esac
1670 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1671 $as_echo "$ac_try_echo"; } >&5
1672   (eval "$ac_compile") 2>conftest.err
1673   ac_status=$?
1674   if test -s conftest.err; then
1675     grep -v '^ *+' conftest.err >conftest.er1
1676     cat conftest.er1 >&5
1677     mv -f conftest.er1 conftest.err
1678   fi
1679   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1680   test $ac_status = 0; } && {
1681          test -z "$ac_c_werror_flag" ||
1682          test ! -s conftest.err
1683        } && test -s conftest.$ac_objext; then :
1684   ac_retval=0
1685 else
1686   $as_echo "$as_me: failed program was:" >&5
1687 sed 's/^/| /' conftest.$ac_ext >&5
1688
1689         ac_retval=1
1690 fi
1691   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1692   as_fn_set_status $ac_retval
1693
1694 } # ac_fn_c_try_compile
1695
1696 # ac_fn_c_try_link LINENO
1697 # -----------------------
1698 # Try to link conftest.$ac_ext, and return whether this succeeded.
1699 ac_fn_c_try_link ()
1700 {
1701   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1702   rm -rf conftest.$ac_objext conftest$ac_exeext
1703   if { { ac_try="$ac_link"
1704 case "(($ac_try" in
1705   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706   *) ac_try_echo=$ac_try;;
1707 esac
1708 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709 $as_echo "$ac_try_echo"; } >&5
1710   (eval "$ac_link") 2>conftest.err
1711   ac_status=$?
1712   if test -s conftest.err; then
1713     grep -v '^ *+' conftest.err >conftest.er1
1714     cat conftest.er1 >&5
1715     mv -f conftest.er1 conftest.err
1716   fi
1717   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718   test $ac_status = 0; } && {
1719          test -z "$ac_c_werror_flag" ||
1720          test ! -s conftest.err
1721        } && test -s conftest$ac_exeext && {
1722          test "$cross_compiling" = yes ||
1723          test -x conftest$ac_exeext
1724        }; then :
1725   ac_retval=0
1726 else
1727   $as_echo "$as_me: failed program was:" >&5
1728 sed 's/^/| /' conftest.$ac_ext >&5
1729
1730         ac_retval=1
1731 fi
1732   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1733   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1734   # interfere with the next link command; also delete a directory that is
1735   # left behind by Apple's compiler.  We do this before executing the actions.
1736   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1737   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1738   as_fn_set_status $ac_retval
1739
1740 } # ac_fn_c_try_link
1741
1742 # ac_fn_c_try_run LINENO
1743 # ----------------------
1744 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1745 # that executables *can* be run.
1746 ac_fn_c_try_run ()
1747 {
1748   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1749   if { { ac_try="$ac_link"
1750 case "(($ac_try" in
1751   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1752   *) ac_try_echo=$ac_try;;
1753 esac
1754 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1755 $as_echo "$ac_try_echo"; } >&5
1756   (eval "$ac_link") 2>&5
1757   ac_status=$?
1758   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1759   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1760   { { case "(($ac_try" in
1761   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1762   *) ac_try_echo=$ac_try;;
1763 esac
1764 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1765 $as_echo "$ac_try_echo"; } >&5
1766   (eval "$ac_try") 2>&5
1767   ac_status=$?
1768   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1769   test $ac_status = 0; }; }; then :
1770   ac_retval=0
1771 else
1772   $as_echo "$as_me: program exited with status $ac_status" >&5
1773        $as_echo "$as_me: failed program was:" >&5
1774 sed 's/^/| /' conftest.$ac_ext >&5
1775
1776        ac_retval=$ac_status
1777 fi
1778   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1779   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1780   as_fn_set_status $ac_retval
1781
1782 } # ac_fn_c_try_run
1783
1784 # ac_fn_c_try_cpp LINENO
1785 # ----------------------
1786 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1787 ac_fn_c_try_cpp ()
1788 {
1789   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1790   if { { ac_try="$ac_cpp conftest.$ac_ext"
1791 case "(($ac_try" in
1792   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1793   *) ac_try_echo=$ac_try;;
1794 esac
1795 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1796 $as_echo "$ac_try_echo"; } >&5
1797   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1798   ac_status=$?
1799   if test -s conftest.err; then
1800     grep -v '^ *+' conftest.err >conftest.er1
1801     cat conftest.er1 >&5
1802     mv -f conftest.er1 conftest.err
1803   fi
1804   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1805   test $ac_status = 0; } > conftest.i && {
1806          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1807          test ! -s conftest.err
1808        }; then :
1809   ac_retval=0
1810 else
1811   $as_echo "$as_me: failed program was:" >&5
1812 sed 's/^/| /' conftest.$ac_ext >&5
1813
1814     ac_retval=1
1815 fi
1816   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1817   as_fn_set_status $ac_retval
1818
1819 } # ac_fn_c_try_cpp
1820
1821 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1822 # -------------------------------------------------------
1823 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1824 # the include files in INCLUDES and setting the cache variable VAR
1825 # accordingly.
1826 ac_fn_c_check_header_mongrel ()
1827 {
1828   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1829   if eval \${$3+:} false; then :
1830   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1831 $as_echo_n "checking for $2... " >&6; }
1832 if eval \${$3+:} false; then :
1833   $as_echo_n "(cached) " >&6
1834 fi
1835 eval ac_res=\$$3
1836                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1837 $as_echo "$ac_res" >&6; }
1838 else
1839   # Is the header compilable?
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1841 $as_echo_n "checking $2 usability... " >&6; }
1842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1843 /* end confdefs.h.  */
1844 $4
1845 #include <$2>
1846 _ACEOF
1847 if ac_fn_c_try_compile "$LINENO"; then :
1848   ac_header_compiler=yes
1849 else
1850   ac_header_compiler=no
1851 fi
1852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1854 $as_echo "$ac_header_compiler" >&6; }
1855
1856 # Is the header present?
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1858 $as_echo_n "checking $2 presence... " >&6; }
1859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1860 /* end confdefs.h.  */
1861 #include <$2>
1862 _ACEOF
1863 if ac_fn_c_try_cpp "$LINENO"; then :
1864   ac_header_preproc=yes
1865 else
1866   ac_header_preproc=no
1867 fi
1868 rm -rf conftest.err conftest.i conftest.$ac_ext
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1870 $as_echo "$ac_header_preproc" >&6; }
1871
1872 # So?  What about this header?
1873 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1874   yes:no: )
1875     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1876 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1877     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1878 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1879     ;;
1880   no:yes:* )
1881     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1882 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1883     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1884 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1885     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1886 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1887     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1888 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1889     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1890 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1891     ;;
1892 esac
1893   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1894 $as_echo_n "checking for $2... " >&6; }
1895 if eval \${$3+:} false; then :
1896   $as_echo_n "(cached) " >&6
1897 else
1898   eval "$3=\$ac_header_compiler"
1899 fi
1900 eval ac_res=\$$3
1901                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1902 $as_echo "$ac_res" >&6; }
1903 fi
1904   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1905
1906 } # ac_fn_c_check_header_mongrel
1907
1908 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1909 # -------------------------------------------------------
1910 # Tests whether HEADER exists and can be compiled using the include files in
1911 # INCLUDES, setting the cache variable VAR accordingly.
1912 ac_fn_c_check_header_compile ()
1913 {
1914   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1915   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1916 $as_echo_n "checking for $2... " >&6; }
1917 if eval \${$3+:} false; then :
1918   $as_echo_n "(cached) " >&6
1919 else
1920   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1921 /* end confdefs.h.  */
1922 $4
1923 #include <$2>
1924 _ACEOF
1925 if ac_fn_c_try_compile "$LINENO"; then :
1926   eval "$3=yes"
1927 else
1928   eval "$3=no"
1929 fi
1930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1931 fi
1932 eval ac_res=\$$3
1933                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1934 $as_echo "$ac_res" >&6; }
1935   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1936
1937 } # ac_fn_c_check_header_compile
1938
1939 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1940 # -------------------------------------------
1941 # Tests whether TYPE exists after having included INCLUDES, setting cache
1942 # variable VAR accordingly.
1943 ac_fn_c_check_type ()
1944 {
1945   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1947 $as_echo_n "checking for $2... " >&6; }
1948 if eval \${$3+:} false; then :
1949   $as_echo_n "(cached) " >&6
1950 else
1951   eval "$3=no"
1952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953 /* end confdefs.h.  */
1954 $4
1955 int
1956 main ()
1957 {
1958 if (sizeof ($2))
1959          return 0;
1960   ;
1961   return 0;
1962 }
1963 _ACEOF
1964 if ac_fn_c_try_compile "$LINENO"; then :
1965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1966 /* end confdefs.h.  */
1967 $4
1968 int
1969 main ()
1970 {
1971 if (sizeof (($2)))
1972             return 0;
1973   ;
1974   return 0;
1975 }
1976 _ACEOF
1977 if ac_fn_c_try_compile "$LINENO"; then :
1978
1979 else
1980   eval "$3=yes"
1981 fi
1982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1983 fi
1984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1985 fi
1986 eval ac_res=\$$3
1987                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1988 $as_echo "$ac_res" >&6; }
1989   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1990
1991 } # ac_fn_c_check_type
1992
1993 # ac_fn_c_check_func LINENO FUNC VAR
1994 # ----------------------------------
1995 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1996 ac_fn_c_check_func ()
1997 {
1998   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1999   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2000 $as_echo_n "checking for $2... " >&6; }
2001 if eval \${$3+:} false; then :
2002   $as_echo_n "(cached) " >&6
2003 else
2004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005 /* end confdefs.h.  */
2006 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2007    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2008 #define $2 innocuous_$2
2009
2010 /* System header to define __stub macros and hopefully few prototypes,
2011     which can conflict with char $2 (); below.
2012     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2013     <limits.h> exists even on freestanding compilers.  */
2014
2015 #ifdef __STDC__
2016 # include <limits.h>
2017 #else
2018 # include <assert.h>
2019 #endif
2020
2021 #undef $2
2022
2023 /* Override any GCC internal prototype to avoid an error.
2024    Use char because int might match the return type of a GCC
2025    builtin and then its argument prototype would still apply.  */
2026 #ifdef __cplusplus
2027 extern "C"
2028 #endif
2029 char $2 ();
2030 /* The GNU C library defines this for functions which it implements
2031     to always fail with ENOSYS.  Some functions are actually named
2032     something starting with __ and the normal name is an alias.  */
2033 #if defined __stub_$2 || defined __stub___$2
2034 choke me
2035 #endif
2036
2037 int
2038 main ()
2039 {
2040 return $2 ();
2041   ;
2042   return 0;
2043 }
2044 _ACEOF
2045 if ac_fn_c_try_link "$LINENO"; then :
2046   eval "$3=yes"
2047 else
2048   eval "$3=no"
2049 fi
2050 rm -f core conftest.err conftest.$ac_objext \
2051     conftest$ac_exeext conftest.$ac_ext
2052 fi
2053 eval ac_res=\$$3
2054                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2055 $as_echo "$ac_res" >&6; }
2056   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2057
2058 } # ac_fn_c_check_func
2059
2060 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2061 # ----------------------------------------------------
2062 # Tries to find if the field MEMBER exists in type AGGR, after including
2063 # INCLUDES, setting cache variable VAR accordingly.
2064 ac_fn_c_check_member ()
2065 {
2066   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2067   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2068 $as_echo_n "checking for $2.$3... " >&6; }
2069 if eval \${$4+:} false; then :
2070   $as_echo_n "(cached) " >&6
2071 else
2072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2073 /* end confdefs.h.  */
2074 $5
2075 int
2076 main ()
2077 {
2078 static $2 ac_aggr;
2079 if (ac_aggr.$3)
2080 return 0;
2081   ;
2082   return 0;
2083 }
2084 _ACEOF
2085 if ac_fn_c_try_compile "$LINENO"; then :
2086   eval "$4=yes"
2087 else
2088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089 /* end confdefs.h.  */
2090 $5
2091 int
2092 main ()
2093 {
2094 static $2 ac_aggr;
2095 if (sizeof ac_aggr.$3)
2096 return 0;
2097   ;
2098   return 0;
2099 }
2100 _ACEOF
2101 if ac_fn_c_try_compile "$LINENO"; then :
2102   eval "$4=yes"
2103 else
2104   eval "$4=no"
2105 fi
2106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2107 fi
2108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109 fi
2110 eval ac_res=\$$4
2111                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2112 $as_echo "$ac_res" >&6; }
2113   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2114
2115 } # ac_fn_c_check_member
2116 cat >config.log <<_ACEOF
2117 This file contains any messages produced by compilers while
2118 running configure, to aid debugging if configure makes a mistake.
2119
2120 It was created by $as_me, which was
2121 generated by GNU Autoconf 2.69.  Invocation command line was
2122
2123   $ $0 $@
2124
2125 _ACEOF
2126 exec 5>>config.log
2127 {
2128 cat <<_ASUNAME
2129 ## --------- ##
2130 ## Platform. ##
2131 ## --------- ##
2132
2133 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2134 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2135 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2136 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2137 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2138
2139 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2140 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2141
2142 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2143 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2144 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2145 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2146 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2147 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2148 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2149
2150 _ASUNAME
2151
2152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2153 for as_dir in $PATH
2154 do
2155   IFS=$as_save_IFS
2156   test -z "$as_dir" && as_dir=.
2157     $as_echo "PATH: $as_dir"
2158   done
2159 IFS=$as_save_IFS
2160
2161 } >&5
2162
2163 cat >&5 <<_ACEOF
2164
2165
2166 ## ----------- ##
2167 ## Core tests. ##
2168 ## ----------- ##
2169
2170 _ACEOF
2171
2172
2173 # Keep a trace of the command line.
2174 # Strip out --no-create and --no-recursion so they do not pile up.
2175 # Strip out --silent because we don't want to record it for future runs.
2176 # Also quote any args containing shell meta-characters.
2177 # Make two passes to allow for proper duplicate-argument suppression.
2178 ac_configure_args=
2179 ac_configure_args0=
2180 ac_configure_args1=
2181 ac_must_keep_next=false
2182 for ac_pass in 1 2
2183 do
2184   for ac_arg
2185   do
2186     case $ac_arg in
2187     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2188     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2189     | -silent | --silent | --silen | --sile | --sil)
2190       continue ;;
2191     *\'*)
2192       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2193     esac
2194     case $ac_pass in
2195     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2196     2)
2197       as_fn_append ac_configure_args1 " '$ac_arg'"
2198       if test $ac_must_keep_next = true; then
2199         ac_must_keep_next=false # Got value, back to normal.
2200       else
2201         case $ac_arg in
2202           *=* | --config-cache | -C | -disable-* | --disable-* \
2203           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2204           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2205           | -with-* | --with-* | -without-* | --without-* | --x)
2206             case "$ac_configure_args0 " in
2207               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2208             esac
2209             ;;
2210           -* ) ac_must_keep_next=true ;;
2211         esac
2212       fi
2213       as_fn_append ac_configure_args " '$ac_arg'"
2214       ;;
2215     esac
2216   done
2217 done
2218 { ac_configure_args0=; unset ac_configure_args0;}
2219 { ac_configure_args1=; unset ac_configure_args1;}
2220
2221 # When interrupted or exit'd, cleanup temporary files, and complete
2222 # config.log.  We remove comments because anyway the quotes in there
2223 # would cause problems or look ugly.
2224 # WARNING: Use '\'' to represent an apostrophe within the trap.
2225 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2226 trap 'exit_status=$?
2227   # Save into config.log some information that might help in debugging.
2228   {
2229     echo
2230
2231     $as_echo "## ---------------- ##
2232 ## Cache variables. ##
2233 ## ---------------- ##"
2234     echo
2235     # The following way of writing the cache mishandles newlines in values,
2236 (
2237   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2238     eval ac_val=\$$ac_var
2239     case $ac_val in #(
2240     *${as_nl}*)
2241       case $ac_var in #(
2242       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2243 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2244       esac
2245       case $ac_var in #(
2246       _ | IFS | as_nl) ;; #(
2247       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2248       *) { eval $ac_var=; unset $ac_var;} ;;
2249       esac ;;
2250     esac
2251   done
2252   (set) 2>&1 |
2253     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2254     *${as_nl}ac_space=\ *)
2255       sed -n \
2256         "s/'\''/'\''\\\\'\'''\''/g;
2257           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2258       ;; #(
2259     *)
2260       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2261       ;;
2262     esac |
2263     sort
2264 )
2265     echo
2266
2267     $as_echo "## ----------------- ##
2268 ## Output variables. ##
2269 ## ----------------- ##"
2270     echo
2271     for ac_var in $ac_subst_vars
2272     do
2273       eval ac_val=\$$ac_var
2274       case $ac_val in
2275       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2276       esac
2277       $as_echo "$ac_var='\''$ac_val'\''"
2278     done | sort
2279     echo
2280
2281     if test -n "$ac_subst_files"; then
2282       $as_echo "## ------------------- ##
2283 ## File substitutions. ##
2284 ## ------------------- ##"
2285       echo
2286       for ac_var in $ac_subst_files
2287       do
2288         eval ac_val=\$$ac_var
2289         case $ac_val in
2290         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2291         esac
2292         $as_echo "$ac_var='\''$ac_val'\''"
2293       done | sort
2294       echo
2295     fi
2296
2297     if test -s confdefs.h; then
2298       $as_echo "## ----------- ##
2299 ## confdefs.h. ##
2300 ## ----------- ##"
2301       echo
2302       cat confdefs.h
2303       echo
2304     fi
2305     test "$ac_signal" != 0 &&
2306       $as_echo "$as_me: caught signal $ac_signal"
2307     $as_echo "$as_me: exit $exit_status"
2308   } >&5
2309   rm -f core *.core core.conftest.* &&
2310     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2311     exit $exit_status
2312 ' 0
2313 for ac_signal in 1 2 13 15; do
2314   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2315 done
2316 ac_signal=0
2317
2318 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2319 rm -f -r conftest* confdefs.h
2320
2321 $as_echo "/* confdefs.h */" > confdefs.h
2322
2323 # Predefined preprocessor variables.
2324
2325 cat >>confdefs.h <<_ACEOF
2326 #define PACKAGE_NAME "$PACKAGE_NAME"
2327 _ACEOF
2328
2329 cat >>confdefs.h <<_ACEOF
2330 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2331 _ACEOF
2332
2333 cat >>confdefs.h <<_ACEOF
2334 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2335 _ACEOF
2336
2337 cat >>confdefs.h <<_ACEOF
2338 #define PACKAGE_STRING "$PACKAGE_STRING"
2339 _ACEOF
2340
2341 cat >>confdefs.h <<_ACEOF
2342 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2343 _ACEOF
2344
2345 cat >>confdefs.h <<_ACEOF
2346 #define PACKAGE_URL "$PACKAGE_URL"
2347 _ACEOF
2348
2349
2350 # Let the site file select an alternate cache file if it wants to.
2351 # Prefer an explicitly selected file to automatically selected ones.
2352 ac_site_file1=NONE
2353 ac_site_file2=NONE
2354 if test -n "$CONFIG_SITE"; then
2355   # We do not want a PATH search for config.site.
2356   case $CONFIG_SITE in #((
2357     -*)  ac_site_file1=./$CONFIG_SITE;;
2358     */*) ac_site_file1=$CONFIG_SITE;;
2359     *)   ac_site_file1=./$CONFIG_SITE;;
2360   esac
2361 elif test "x$prefix" != xNONE; then
2362   ac_site_file1=$prefix/share/config.site
2363   ac_site_file2=$prefix/etc/config.site
2364 else
2365   ac_site_file1=$ac_default_prefix/share/config.site
2366   ac_site_file2=$ac_default_prefix/etc/config.site
2367 fi
2368 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2369 do
2370   test "x$ac_site_file" = xNONE && continue
2371   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2372     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2373 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2374     sed 's/^/| /' "$ac_site_file" >&5
2375     . "$ac_site_file" \
2376       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2377 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2378 as_fn_error $? "failed to load site script $ac_site_file
2379 See \`config.log' for more details" "$LINENO" 5; }
2380   fi
2381 done
2382
2383 if test -r "$cache_file"; then
2384   # Some versions of bash will fail to source /dev/null (special files
2385   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2386   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2387     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2388 $as_echo "$as_me: loading cache $cache_file" >&6;}
2389     case $cache_file in
2390       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2391       *)                      . "./$cache_file";;
2392     esac
2393   fi
2394 else
2395   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2396 $as_echo "$as_me: creating cache $cache_file" >&6;}
2397   >$cache_file
2398 fi
2399
2400 # Check that the precious variables saved in the cache have kept the same
2401 # value.
2402 ac_cache_corrupted=false
2403 for ac_var in $ac_precious_vars; do
2404   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2405   eval ac_new_set=\$ac_env_${ac_var}_set
2406   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2407   eval ac_new_val=\$ac_env_${ac_var}_value
2408   case $ac_old_set,$ac_new_set in
2409     set,)
2410       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2411 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2412       ac_cache_corrupted=: ;;
2413     ,set)
2414       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2415 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2416       ac_cache_corrupted=: ;;
2417     ,);;
2418     *)
2419       if test "x$ac_old_val" != "x$ac_new_val"; then
2420         # differences in whitespace do not lead to failure.
2421         ac_old_val_w=`echo x $ac_old_val`
2422         ac_new_val_w=`echo x $ac_new_val`
2423         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2424           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2425 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2426           ac_cache_corrupted=:
2427         else
2428           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2429 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2430           eval $ac_var=\$ac_old_val
2431         fi
2432         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2433 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2434         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2435 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2436       fi;;
2437   esac
2438   # Pass precious variables to config.status.
2439   if test "$ac_new_set" = set; then
2440     case $ac_new_val in
2441     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2442     *) ac_arg=$ac_var=$ac_new_val ;;
2443     esac
2444     case " $ac_configure_args " in
2445       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2446       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2447     esac
2448   fi
2449 done
2450 if $ac_cache_corrupted; then
2451   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2452 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2453   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2454 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2455   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2456 fi
2457 ## -------------------- ##
2458 ## Main body of script. ##
2459 ## -------------------- ##
2460
2461 ac_ext=c
2462 ac_cpp='$CPP $CPPFLAGS'
2463 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2464 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2466
2467
2468 ac_config_headers="$ac_config_headers config.h"
2469
2470
2471 echo "current directory: `pwd`"
2472 echo "command line was: $0 $@"
2473
2474 ###############################################################################
2475 #
2476 #       Autoheader stuff
2477 #
2478 ###############################################################################
2479
2480
2481
2482
2483
2484
2485
2486 # This only ever existed in X11R4 and X11R5.
2487 #AH_TEMPLATE([HAVE_XIDLE_EXTENSION],
2488 #           [Define this if you have the XIDLE extension installed. If you
2489 #           have the XIDLE extension, this is recommended.  (You have this
2490 #           extension if the file /usr/include/X11/extensions/xidle.h
2491 #           exists.) Turning on this flag lets XScreenSaver work better with
2492 #           servers which support this extension; but it will still work
2493 #           with servers which do not suport it, so it's a good idea to
2494 #           compile in support for it if you can.])
2495
2496 # Using this extension will crash your X server and make fading not work.
2497 #AH_TEMPLATE([HAVE_MIT_SAVER_EXTENSION],
2498 #           [Define this if you have the MIT-SCREEN-SAVER extension
2499 #            installed.  See the caveats about this extension, above.
2500 #            (It's available if /usr/include/X11/extensions/scrnsaver.h
2501 #            exists.)])
2502
2503 # This only ever existed on SGI hardware.
2504 #AH_TEMPLATE([HAVE_SGI_SAVER_EXTENSION],
2505 #           [Define this if you have the SGI SCREEN_SAVER extension.  This is
2506 #           standard on Irix systems, and not available elsewhere.])
2507
2508 # This only ever existed on SGI hardware.
2509 #AH_TEMPLATE([HAVE_SGI_VC_EXTENSION],
2510 #           [Define this if you have the SGI-VIDEO-CONTROL extension.  This
2511 #           is standard on Irix systems, and not available elsewhere.])
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
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630 # After checking to see that --srcdir is correct (which AC_INIT does)
2631 # check for some random other files that come later in the tar file,
2632 # to make sure everything is here.
2633 #
2634 for d in utils jwxyz hacks hacks/glx driver ; do
2635   f=$srcdir/$d/Makefile.in
2636   if test \! -r $f ; then
2637     echo ""
2638     echo "ERROR: The package is incomplete: $f does not exist."
2639     echo "       This probably means that your download was truncated."
2640     echo ""
2641     exit 1
2642   fi
2643 done
2644
2645 ###############################################################################
2646 #
2647 #       Query AX_PTHREAD, and figure out which compiler gets used.
2648 #
2649 ###############################################################################
2650
2651
2652
2653
2654 ###############################################################################
2655 #
2656 #       Function to figure out how to run the compiler.
2657 #
2658 ###############################################################################
2659
2660
2661
2662
2663 ###############################################################################
2664 #
2665 #       Check for availability of various gcc command-line options.
2666 #
2667 ###############################################################################
2668
2669
2670
2671
2672
2673
2674
2675 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2676 # around an Apple-specific gcc bug.
2677 #
2678
2679
2680 ###############################################################################
2681 #
2682 #       Function to figure out how to disable // comments in ANSI C code.
2683 #
2684 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2685 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2686 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2687 #       so much for compatibility!)
2688 #
2689 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2690 #       declarations preceed statements, without resorting to "-pedantic".
2691 #       This means that there is no way to get gcc3 to issue warnings that
2692 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2693 #       also drowning in totally useless warnings.  Thank you master may I
2694 #       have another.
2695 #
2696 #       So, I give up, let's just use -pedantic.
2697 #
2698 ###############################################################################
2699
2700
2701
2702
2703
2704
2705 ###############################################################################
2706 #
2707 #       Function to figure out how to create directory trees.
2708 #
2709 ###############################################################################
2710
2711
2712
2713
2714 ###############################################################################
2715 #
2716 #       Function to check whether gettimeofday() exists, and how to call it.
2717 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2718 #
2719 ###############################################################################
2720
2721
2722
2723
2724 ###############################################################################
2725 #
2726 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2727 #
2728 ###############################################################################
2729
2730 # M4 sucks!!  perl sucks too!!
2731
2732 perl_version_cmd='print $]'
2733
2734
2735
2736
2737
2738 ###############################################################################
2739 #
2740 #       Function to demand "bc".  Losers.
2741 #
2742 ###############################################################################
2743
2744
2745
2746 ###############################################################################
2747 #
2748 #       Functions to check how to do ICMP PING requests.
2749 #
2750 ###############################################################################
2751
2752
2753
2754
2755
2756
2757 ###############################################################################
2758 #
2759 #       Functions to check for various X11 crap.
2760 #
2761 ###############################################################################
2762
2763 # Try and find the app-defaults directory.
2764 # It sucks that autoconf doesn't do this already...
2765 #
2766
2767
2768 ###############################################################################
2769 #
2770 #       Handle the --with-x-app-defaults option HERE
2771 #
2772 ###############################################################################
2773
2774
2775 # Check whether --with-x-app-defaults was given.
2776 if test "${with_x_app_defaults+set}" = set; then :
2777   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2778 else
2779   eval ac_x_app_defaults="$withval"
2780 fi
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792 # Random special-cases for X on certain pathological OSes.
2793 # You know who you are.
2794 #
2795
2796
2797
2798
2799
2800
2801 ###############################################################################
2802 #
2803 #       Some utility functions to make checking for X things easier.
2804 #
2805 ###############################################################################
2806
2807 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2808 #
2809
2810
2811 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2812 #
2813
2814
2815 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2816 #
2817
2818
2819
2820 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2821 # Use this sparingly; it probably doesn't work very well on X programs.
2822 #
2823
2824
2825 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2826 # (But not the -L directories!)
2827 #
2828
2829
2830
2831
2832 # Usage: HANDLE_X_PATH_ARG([variable_name],
2833 #                          [--command-line-option],
2834 #                          [descriptive string])
2835 #
2836 # All of the --with options take three forms:
2837 #
2838 #   --with-foo (or --with-foo=yes)
2839 #   --without-foo (or --with-foo=no)
2840 #   --with-foo=/DIR
2841 #
2842 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2843 # a directory (string beginning with a slash) it checks to see whether
2844 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2845 # as appropriate.
2846 #
2847
2848
2849
2850
2851 ###############################################################################
2852 ###############################################################################
2853 #
2854 #       End of function definitions.  Now start actually executing stuff.
2855 #
2856 ###############################################################################
2857 ###############################################################################
2858
2859 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2860 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2861 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2862
2863
2864 # random compiler setup
2865 ac_aux_dir=
2866 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2867   if test -f "$ac_dir/install-sh"; then
2868     ac_aux_dir=$ac_dir
2869     ac_install_sh="$ac_aux_dir/install-sh -c"
2870     break
2871   elif test -f "$ac_dir/install.sh"; then
2872     ac_aux_dir=$ac_dir
2873     ac_install_sh="$ac_aux_dir/install.sh -c"
2874     break
2875   elif test -f "$ac_dir/shtool"; then
2876     ac_aux_dir=$ac_dir
2877     ac_install_sh="$ac_aux_dir/shtool install -c"
2878     break
2879   fi
2880 done
2881 if test -z "$ac_aux_dir"; then
2882   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2883 fi
2884
2885 # These three variables are undocumented and unsupported,
2886 # and are intended to be withdrawn in a future Autoconf release.
2887 # They can cause serious problems if a builder's source tree is in a directory
2888 # whose full name contains unusual characters.
2889 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2890 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2891 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2892
2893
2894 # Make sure we can run config.sub.
2895 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2896   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2897
2898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2899 $as_echo_n "checking build system type... " >&6; }
2900 if ${ac_cv_build+:} false; then :
2901   $as_echo_n "(cached) " >&6
2902 else
2903   ac_build_alias=$build_alias
2904 test "x$ac_build_alias" = x &&
2905   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2906 test "x$ac_build_alias" = x &&
2907   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2908 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2909   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2910
2911 fi
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2913 $as_echo "$ac_cv_build" >&6; }
2914 case $ac_cv_build in
2915 *-*-*) ;;
2916 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2917 esac
2918 build=$ac_cv_build
2919 ac_save_IFS=$IFS; IFS='-'
2920 set x $ac_cv_build
2921 shift
2922 build_cpu=$1
2923 build_vendor=$2
2924 shift; shift
2925 # Remember, the first character of IFS is used to create $*,
2926 # except with old shells:
2927 build_os=$*
2928 IFS=$ac_save_IFS
2929 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2930
2931
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2933 $as_echo_n "checking host system type... " >&6; }
2934 if ${ac_cv_host+:} false; then :
2935   $as_echo_n "(cached) " >&6
2936 else
2937   if test "x$host_alias" = x; then
2938   ac_cv_host=$ac_cv_build
2939 else
2940   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2941     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2942 fi
2943
2944 fi
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2946 $as_echo "$ac_cv_host" >&6; }
2947 case $ac_cv_host in
2948 *-*-*) ;;
2949 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2950 esac
2951 host=$ac_cv_host
2952 ac_save_IFS=$IFS; IFS='-'
2953 set x $ac_cv_host
2954 shift
2955 host_cpu=$1
2956 host_vendor=$2
2957 shift; shift
2958 # Remember, the first character of IFS is used to create $*,
2959 # except with old shells:
2960 host_os=$*
2961 IFS=$ac_save_IFS
2962 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2963
2964
2965
2966 ac_original_cc=$CC
2967 ac_ext=c
2968 ac_cpp='$CPP $CPPFLAGS'
2969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2972 if test -n "$ac_tool_prefix"; then
2973   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2974 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2976 $as_echo_n "checking for $ac_word... " >&6; }
2977 if ${ac_cv_prog_CC+:} false; then :
2978   $as_echo_n "(cached) " >&6
2979 else
2980   if test -n "$CC"; then
2981   ac_cv_prog_CC="$CC" # Let the user override the test.
2982 else
2983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2984 for as_dir in $PATH
2985 do
2986   IFS=$as_save_IFS
2987   test -z "$as_dir" && as_dir=.
2988     for ac_exec_ext in '' $ac_executable_extensions; do
2989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2990     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2992     break 2
2993   fi
2994 done
2995   done
2996 IFS=$as_save_IFS
2997
2998 fi
2999 fi
3000 CC=$ac_cv_prog_CC
3001 if test -n "$CC"; then
3002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3003 $as_echo "$CC" >&6; }
3004 else
3005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3006 $as_echo "no" >&6; }
3007 fi
3008
3009
3010 fi
3011 if test -z "$ac_cv_prog_CC"; then
3012   ac_ct_CC=$CC
3013   # Extract the first word of "gcc", so it can be a program name with args.
3014 set dummy gcc; ac_word=$2
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3016 $as_echo_n "checking for $ac_word... " >&6; }
3017 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3018   $as_echo_n "(cached) " >&6
3019 else
3020   if test -n "$ac_ct_CC"; then
3021   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3022 else
3023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3024 for as_dir in $PATH
3025 do
3026   IFS=$as_save_IFS
3027   test -z "$as_dir" && as_dir=.
3028     for ac_exec_ext in '' $ac_executable_extensions; do
3029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3030     ac_cv_prog_ac_ct_CC="gcc"
3031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3032     break 2
3033   fi
3034 done
3035   done
3036 IFS=$as_save_IFS
3037
3038 fi
3039 fi
3040 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3041 if test -n "$ac_ct_CC"; then
3042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3043 $as_echo "$ac_ct_CC" >&6; }
3044 else
3045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3046 $as_echo "no" >&6; }
3047 fi
3048
3049   if test "x$ac_ct_CC" = x; then
3050     CC=""
3051   else
3052     case $cross_compiling:$ac_tool_warned in
3053 yes:)
3054 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3055 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3056 ac_tool_warned=yes ;;
3057 esac
3058     CC=$ac_ct_CC
3059   fi
3060 else
3061   CC="$ac_cv_prog_CC"
3062 fi
3063
3064 if test -z "$CC"; then
3065           if test -n "$ac_tool_prefix"; then
3066     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3067 set dummy ${ac_tool_prefix}cc; ac_word=$2
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3069 $as_echo_n "checking for $ac_word... " >&6; }
3070 if ${ac_cv_prog_CC+:} false; then :
3071   $as_echo_n "(cached) " >&6
3072 else
3073   if test -n "$CC"; then
3074   ac_cv_prog_CC="$CC" # Let the user override the test.
3075 else
3076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3077 for as_dir in $PATH
3078 do
3079   IFS=$as_save_IFS
3080   test -z "$as_dir" && as_dir=.
3081     for ac_exec_ext in '' $ac_executable_extensions; do
3082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3083     ac_cv_prog_CC="${ac_tool_prefix}cc"
3084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3085     break 2
3086   fi
3087 done
3088   done
3089 IFS=$as_save_IFS
3090
3091 fi
3092 fi
3093 CC=$ac_cv_prog_CC
3094 if test -n "$CC"; then
3095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3096 $as_echo "$CC" >&6; }
3097 else
3098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3099 $as_echo "no" >&6; }
3100 fi
3101
3102
3103   fi
3104 fi
3105 if test -z "$CC"; then
3106   # Extract the first word of "cc", so it can be a program name with args.
3107 set dummy cc; ac_word=$2
3108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3109 $as_echo_n "checking for $ac_word... " >&6; }
3110 if ${ac_cv_prog_CC+:} false; then :
3111   $as_echo_n "(cached) " >&6
3112 else
3113   if test -n "$CC"; then
3114   ac_cv_prog_CC="$CC" # Let the user override the test.
3115 else
3116   ac_prog_rejected=no
3117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3118 for as_dir in $PATH
3119 do
3120   IFS=$as_save_IFS
3121   test -z "$as_dir" && as_dir=.
3122     for ac_exec_ext in '' $ac_executable_extensions; do
3123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3124     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3125        ac_prog_rejected=yes
3126        continue
3127      fi
3128     ac_cv_prog_CC="cc"
3129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3130     break 2
3131   fi
3132 done
3133   done
3134 IFS=$as_save_IFS
3135
3136 if test $ac_prog_rejected = yes; then
3137   # We found a bogon in the path, so make sure we never use it.
3138   set dummy $ac_cv_prog_CC
3139   shift
3140   if test $# != 0; then
3141     # We chose a different compiler from the bogus one.
3142     # However, it has the same basename, so the bogon will be chosen
3143     # first if we set CC to just the basename; use the full file name.
3144     shift
3145     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3146   fi
3147 fi
3148 fi
3149 fi
3150 CC=$ac_cv_prog_CC
3151 if test -n "$CC"; then
3152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3153 $as_echo "$CC" >&6; }
3154 else
3155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3156 $as_echo "no" >&6; }
3157 fi
3158
3159
3160 fi
3161 if test -z "$CC"; then
3162   if test -n "$ac_tool_prefix"; then
3163   for ac_prog in cl.exe
3164   do
3165     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3166 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3168 $as_echo_n "checking for $ac_word... " >&6; }
3169 if ${ac_cv_prog_CC+:} false; then :
3170   $as_echo_n "(cached) " >&6
3171 else
3172   if test -n "$CC"; then
3173   ac_cv_prog_CC="$CC" # Let the user override the test.
3174 else
3175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3176 for as_dir in $PATH
3177 do
3178   IFS=$as_save_IFS
3179   test -z "$as_dir" && as_dir=.
3180     for ac_exec_ext in '' $ac_executable_extensions; do
3181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3182     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3184     break 2
3185   fi
3186 done
3187   done
3188 IFS=$as_save_IFS
3189
3190 fi
3191 fi
3192 CC=$ac_cv_prog_CC
3193 if test -n "$CC"; then
3194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3195 $as_echo "$CC" >&6; }
3196 else
3197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3198 $as_echo "no" >&6; }
3199 fi
3200
3201
3202     test -n "$CC" && break
3203   done
3204 fi
3205 if test -z "$CC"; then
3206   ac_ct_CC=$CC
3207   for ac_prog in cl.exe
3208 do
3209   # Extract the first word of "$ac_prog", so it can be a program name with args.
3210 set dummy $ac_prog; ac_word=$2
3211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3212 $as_echo_n "checking for $ac_word... " >&6; }
3213 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3214   $as_echo_n "(cached) " >&6
3215 else
3216   if test -n "$ac_ct_CC"; then
3217   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3218 else
3219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3220 for as_dir in $PATH
3221 do
3222   IFS=$as_save_IFS
3223   test -z "$as_dir" && as_dir=.
3224     for ac_exec_ext in '' $ac_executable_extensions; do
3225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3226     ac_cv_prog_ac_ct_CC="$ac_prog"
3227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3228     break 2
3229   fi
3230 done
3231   done
3232 IFS=$as_save_IFS
3233
3234 fi
3235 fi
3236 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3237 if test -n "$ac_ct_CC"; then
3238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3239 $as_echo "$ac_ct_CC" >&6; }
3240 else
3241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3242 $as_echo "no" >&6; }
3243 fi
3244
3245
3246   test -n "$ac_ct_CC" && break
3247 done
3248
3249   if test "x$ac_ct_CC" = x; then
3250     CC=""
3251   else
3252     case $cross_compiling:$ac_tool_warned in
3253 yes:)
3254 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3255 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3256 ac_tool_warned=yes ;;
3257 esac
3258     CC=$ac_ct_CC
3259   fi
3260 fi
3261
3262 fi
3263
3264
3265 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3266 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3267 as_fn_error $? "no acceptable C compiler found in \$PATH
3268 See \`config.log' for more details" "$LINENO" 5; }
3269
3270 # Provide some information about the compiler.
3271 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3272 set X $ac_compile
3273 ac_compiler=$2
3274 for ac_option in --version -v -V -qversion; do
3275   { { ac_try="$ac_compiler $ac_option >&5"
3276 case "(($ac_try" in
3277   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3278   *) ac_try_echo=$ac_try;;
3279 esac
3280 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3281 $as_echo "$ac_try_echo"; } >&5
3282   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3283   ac_status=$?
3284   if test -s conftest.err; then
3285     sed '10a\
3286 ... rest of stderr output deleted ...
3287          10q' conftest.err >conftest.er1
3288     cat conftest.er1 >&5
3289   fi
3290   rm -rf conftest.er1 conftest.err
3291   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3292   test $ac_status = 0; }
3293 done
3294
3295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3296 /* end confdefs.h.  */
3297
3298 int
3299 main ()
3300 {
3301
3302   ;
3303   return 0;
3304 }
3305 _ACEOF
3306 ac_clean_files_save=$ac_clean_files
3307 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3308 # Try to create an executable without -o first, disregard a.out.
3309 # It will help us diagnose broken compilers, and finding out an intuition
3310 # of exeext.
3311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3312 $as_echo_n "checking whether the C compiler works... " >&6; }
3313 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3314
3315 # The possible output files:
3316 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3317
3318 ac_rmfiles=
3319 for ac_file in $ac_files
3320 do
3321   case $ac_file in
3322     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3323     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3324   esac
3325 done
3326 rm -f $ac_rmfiles
3327
3328 if { { ac_try="$ac_link_default"
3329 case "(($ac_try" in
3330   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3331   *) ac_try_echo=$ac_try;;
3332 esac
3333 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3334 $as_echo "$ac_try_echo"; } >&5
3335   (eval "$ac_link_default") 2>&5
3336   ac_status=$?
3337   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3338   test $ac_status = 0; }; then :
3339   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3340 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3341 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3342 # so that the user can short-circuit this test for compilers unknown to
3343 # Autoconf.
3344 for ac_file in $ac_files ''
3345 do
3346   test -f "$ac_file" || continue
3347   case $ac_file in
3348     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3349         ;;
3350     [ab].out )
3351         # We found the default executable, but exeext='' is most
3352         # certainly right.
3353         break;;
3354     *.* )
3355         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3356         then :; else
3357            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3358         fi
3359         # We set ac_cv_exeext here because the later test for it is not
3360         # safe: cross compilers may not add the suffix if given an `-o'
3361         # argument, so we may need to know it at that point already.
3362         # Even if this section looks crufty: it has the advantage of
3363         # actually working.
3364         break;;
3365     * )
3366         break;;
3367   esac
3368 done
3369 test "$ac_cv_exeext" = no && ac_cv_exeext=
3370
3371 else
3372   ac_file=''
3373 fi
3374 if test -z "$ac_file"; then :
3375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3376 $as_echo "no" >&6; }
3377 $as_echo "$as_me: failed program was:" >&5
3378 sed 's/^/| /' conftest.$ac_ext >&5
3379
3380 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3381 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3382 as_fn_error 77 "C compiler cannot create executables
3383 See \`config.log' for more details" "$LINENO" 5; }
3384 else
3385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3386 $as_echo "yes" >&6; }
3387 fi
3388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3389 $as_echo_n "checking for C compiler default output file name... " >&6; }
3390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3391 $as_echo "$ac_file" >&6; }
3392 ac_exeext=$ac_cv_exeext
3393
3394 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3395 ac_clean_files=$ac_clean_files_save
3396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3397 $as_echo_n "checking for suffix of executables... " >&6; }
3398 if { { ac_try="$ac_link"
3399 case "(($ac_try" in
3400   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3401   *) ac_try_echo=$ac_try;;
3402 esac
3403 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3404 $as_echo "$ac_try_echo"; } >&5
3405   (eval "$ac_link") 2>&5
3406   ac_status=$?
3407   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3408   test $ac_status = 0; }; then :
3409   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3410 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3411 # work properly (i.e., refer to `conftest.exe'), while it won't with
3412 # `rm'.
3413 for ac_file in conftest.exe conftest conftest.*; do
3414   test -f "$ac_file" || continue
3415   case $ac_file in
3416     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3417     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3418           break;;
3419     * ) break;;
3420   esac
3421 done
3422 else
3423   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3424 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3425 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3426 See \`config.log' for more details" "$LINENO" 5; }
3427 fi
3428 rm -rf conftest conftest$ac_cv_exeext
3429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3430 $as_echo "$ac_cv_exeext" >&6; }
3431
3432 rm -rf conftest.$ac_ext
3433 EXEEXT=$ac_cv_exeext
3434 ac_exeext=$EXEEXT
3435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3436 /* end confdefs.h.  */
3437 #include <stdio.h>
3438 int
3439 main ()
3440 {
3441 FILE *f = fopen ("conftest.out", "w");
3442  return ferror (f) || fclose (f) != 0;
3443
3444   ;
3445   return 0;
3446 }
3447 _ACEOF
3448 ac_clean_files="$ac_clean_files conftest.out"
3449 # Check that the compiler produces executables we can run.  If not, either
3450 # the compiler is broken, or we cross compile.
3451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3452 $as_echo_n "checking whether we are cross compiling... " >&6; }
3453 if test "$cross_compiling" != yes; then
3454   { { ac_try="$ac_link"
3455 case "(($ac_try" in
3456   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3457   *) ac_try_echo=$ac_try;;
3458 esac
3459 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3460 $as_echo "$ac_try_echo"; } >&5
3461   (eval "$ac_link") 2>&5
3462   ac_status=$?
3463   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3464   test $ac_status = 0; }
3465   if { ac_try='./conftest$ac_cv_exeext'
3466   { { case "(($ac_try" in
3467   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3468   *) ac_try_echo=$ac_try;;
3469 esac
3470 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3471 $as_echo "$ac_try_echo"; } >&5
3472   (eval "$ac_try") 2>&5
3473   ac_status=$?
3474   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3475   test $ac_status = 0; }; }; then
3476     cross_compiling=no
3477   else
3478     if test "$cross_compiling" = maybe; then
3479         cross_compiling=yes
3480     else
3481         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3482 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3483 as_fn_error $? "cannot run C compiled programs.
3484 If you meant to cross compile, use \`--host'.
3485 See \`config.log' for more details" "$LINENO" 5; }
3486     fi
3487   fi
3488 fi
3489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3490 $as_echo "$cross_compiling" >&6; }
3491
3492 rm -rf conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3493 ac_clean_files=$ac_clean_files_save
3494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3495 $as_echo_n "checking for suffix of object files... " >&6; }
3496 if ${ac_cv_objext+:} false; then :
3497   $as_echo_n "(cached) " >&6
3498 else
3499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3500 /* end confdefs.h.  */
3501
3502 int
3503 main ()
3504 {
3505
3506   ;
3507   return 0;
3508 }
3509 _ACEOF
3510 rm -rf conftest.o conftest.obj
3511 if { { ac_try="$ac_compile"
3512 case "(($ac_try" in
3513   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3514   *) ac_try_echo=$ac_try;;
3515 esac
3516 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3517 $as_echo "$ac_try_echo"; } >&5
3518   (eval "$ac_compile") 2>&5
3519   ac_status=$?
3520   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3521   test $ac_status = 0; }; then :
3522   for ac_file in conftest.o conftest.obj conftest.*; do
3523   test -f "$ac_file" || continue;
3524   case $ac_file in
3525     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3526     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3527        break;;
3528   esac
3529 done
3530 else
3531   $as_echo "$as_me: failed program was:" >&5
3532 sed 's/^/| /' conftest.$ac_ext >&5
3533
3534 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3535 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3536 as_fn_error $? "cannot compute suffix of object files: cannot compile
3537 See \`config.log' for more details" "$LINENO" 5; }
3538 fi
3539 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
3540 fi
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3542 $as_echo "$ac_cv_objext" >&6; }
3543 OBJEXT=$ac_cv_objext
3544 ac_objext=$OBJEXT
3545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3546 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3547 if ${ac_cv_c_compiler_gnu+:} false; then :
3548   $as_echo_n "(cached) " >&6
3549 else
3550   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3551 /* end confdefs.h.  */
3552
3553 int
3554 main ()
3555 {
3556 #ifndef __GNUC__
3557        choke me
3558 #endif
3559
3560   ;
3561   return 0;
3562 }
3563 _ACEOF
3564 if ac_fn_c_try_compile "$LINENO"; then :
3565   ac_compiler_gnu=yes
3566 else
3567   ac_compiler_gnu=no
3568 fi
3569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3570 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3571
3572 fi
3573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3574 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3575 if test $ac_compiler_gnu = yes; then
3576   GCC=yes
3577 else
3578   GCC=
3579 fi
3580 ac_test_CFLAGS=${CFLAGS+set}
3581 ac_save_CFLAGS=$CFLAGS
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3583 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3584 if ${ac_cv_prog_cc_g+:} false; then :
3585   $as_echo_n "(cached) " >&6
3586 else
3587   ac_save_c_werror_flag=$ac_c_werror_flag
3588    ac_c_werror_flag=yes
3589    ac_cv_prog_cc_g=no
3590    CFLAGS="-g"
3591    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3592 /* end confdefs.h.  */
3593
3594 int
3595 main ()
3596 {
3597
3598   ;
3599   return 0;
3600 }
3601 _ACEOF
3602 if ac_fn_c_try_compile "$LINENO"; then :
3603   ac_cv_prog_cc_g=yes
3604 else
3605   CFLAGS=""
3606       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3607 /* end confdefs.h.  */
3608
3609 int
3610 main ()
3611 {
3612
3613   ;
3614   return 0;
3615 }
3616 _ACEOF
3617 if ac_fn_c_try_compile "$LINENO"; then :
3618
3619 else
3620   ac_c_werror_flag=$ac_save_c_werror_flag
3621          CFLAGS="-g"
3622          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3623 /* end confdefs.h.  */
3624
3625 int
3626 main ()
3627 {
3628
3629   ;
3630   return 0;
3631 }
3632 _ACEOF
3633 if ac_fn_c_try_compile "$LINENO"; then :
3634   ac_cv_prog_cc_g=yes
3635 fi
3636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3637 fi
3638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3639 fi
3640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3641    ac_c_werror_flag=$ac_save_c_werror_flag
3642 fi
3643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3644 $as_echo "$ac_cv_prog_cc_g" >&6; }
3645 if test "$ac_test_CFLAGS" = set; then
3646   CFLAGS=$ac_save_CFLAGS
3647 elif test $ac_cv_prog_cc_g = yes; then
3648   if test "$GCC" = yes; then
3649     CFLAGS="-g -O2"
3650   else
3651     CFLAGS="-g"
3652   fi
3653 else
3654   if test "$GCC" = yes; then
3655     CFLAGS="-O2"
3656   else
3657     CFLAGS=
3658   fi
3659 fi
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3661 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3662 if ${ac_cv_prog_cc_c89+:} false; then :
3663   $as_echo_n "(cached) " >&6
3664 else
3665   ac_cv_prog_cc_c89=no
3666 ac_save_CC=$CC
3667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3668 /* end confdefs.h.  */
3669 #include <stdarg.h>
3670 #include <stdio.h>
3671 struct stat;
3672 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3673 struct buf { int x; };
3674 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3675 static char *e (p, i)
3676      char **p;
3677      int i;
3678 {
3679   return p[i];
3680 }
3681 static char *f (char * (*g) (char **, int), char **p, ...)
3682 {
3683   char *s;
3684   va_list v;
3685   va_start (v,p);
3686   s = g (p, va_arg (v,int));
3687   va_end (v);
3688   return s;
3689 }
3690
3691 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3692    function prototypes and stuff, but not '\xHH' hex character constants.
3693    These don't provoke an error unfortunately, instead are silently treated
3694    as 'x'.  The following induces an error, until -std is added to get
3695    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3696    array size at least.  It's necessary to write '\x00'==0 to get something
3697    that's true only with -std.  */
3698 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3699
3700 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3701    inside strings and character constants.  */
3702 #define FOO(x) 'x'
3703 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3704
3705 int test (int i, double x);
3706 struct s1 {int (*f) (int a);};
3707 struct s2 {int (*f) (double a);};
3708 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3709 int argc;
3710 char **argv;
3711 int
3712 main ()
3713 {
3714 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3715   ;
3716   return 0;
3717 }
3718 _ACEOF
3719 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3720         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3721 do
3722   CC="$ac_save_CC $ac_arg"
3723   if ac_fn_c_try_compile "$LINENO"; then :
3724   ac_cv_prog_cc_c89=$ac_arg
3725 fi
3726 rm -f core conftest.err conftest.$ac_objext
3727   test "x$ac_cv_prog_cc_c89" != "xno" && break
3728 done
3729 rm -rf conftest.$ac_ext
3730 CC=$ac_save_CC
3731
3732 fi
3733 # AC_CACHE_VAL
3734 case "x$ac_cv_prog_cc_c89" in
3735   x)
3736     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3737 $as_echo "none needed" >&6; } ;;
3738   xno)
3739     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3740 $as_echo "unsupported" >&6; } ;;
3741   *)
3742     CC="$CC $ac_cv_prog_cc_c89"
3743     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3744 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3745 esac
3746 if test "x$ac_cv_prog_cc_c89" != xno; then :
3747
3748 fi
3749
3750 ac_ext=c
3751 ac_cpp='$CPP $CPPFLAGS'
3752 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3753 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3754 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3755
3756
3757 have_pthread=no
3758   with_pthread_req=unspecified
3759
3760   # AX_PTHREAD is from the GNU Autoconf Archive.
3761   # https://savannah.gnu.org/projects/autoconf-archive/
3762   # ===========================================================================
3763 #        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
3764 # ===========================================================================
3765 #
3766 # SYNOPSIS
3767 #
3768 #   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
3769 #
3770 # DESCRIPTION
3771 #
3772 #   This macro figures out how to build C programs using POSIX threads. It
3773 #   sets the PTHREAD_LIBS output variable to the threads library and linker
3774 #   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
3775 #   flags that are needed. (The user can also force certain compiler
3776 #   flags/libs to be tested by setting these environment variables.)
3777 #
3778 #   Also sets PTHREAD_CC to any special C compiler that is needed for
3779 #   multi-threaded programs (defaults to the value of CC otherwise). (This
3780 #   is necessary on AIX to use the special cc_r compiler alias.)
3781 #
3782 #   NOTE: You are assumed to not only compile your program with these flags,
3783 #   but also link it with them as well. e.g. you should link with
3784 #   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
3785 #
3786 #   If you are only building threads programs, you may wish to use these
3787 #   variables in your default LIBS, CFLAGS, and CC:
3788 #
3789 #     LIBS="$PTHREAD_LIBS $LIBS"
3790 #     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
3791 #     CC="$PTHREAD_CC"
3792 #
3793 #   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
3794 #   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
3795 #   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
3796 #
3797 #   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
3798 #   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
3799 #   PTHREAD_CFLAGS.
3800 #
3801 #   ACTION-IF-FOUND is a list of shell commands to run if a threads library
3802 #   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
3803 #   is not found. If ACTION-IF-FOUND is not specified, the default action
3804 #   will define HAVE_PTHREAD.
3805 #
3806 #   Please let the authors know if this macro fails on any platform, or if
3807 #   you have any other suggestions or comments. This macro was based on work
3808 #   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
3809 #   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
3810 #   Alejandro Forero Cuervo to the autoconf macro repository. We are also
3811 #   grateful for the helpful feedback of numerous users.
3812 #
3813 #   Updated for Autoconf 2.68 by Daniel Richard G.
3814 #
3815 # LICENSE
3816 #
3817 #   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
3818 #   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
3819 #
3820 #   This program is free software: you can redistribute it and/or modify it
3821 #   under the terms of the GNU General Public License as published by the
3822 #   Free Software Foundation, either version 3 of the License, or (at your
3823 #   option) any later version.
3824 #
3825 #   This program is distributed in the hope that it will be useful, but
3826 #   WITHOUT ANY WARRANTY; without even the implied warranty of
3827 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
3828 #   Public License for more details.
3829 #
3830 #   You should have received a copy of the GNU General Public License along
3831 #   with this program. If not, see <http://www.gnu.org/licenses/>.
3832 #
3833 #   As a special exception, the respective Autoconf Macro's copyright owner
3834 #   gives unlimited permission to copy, distribute and modify the configure
3835 #   scripts that are the output of Autoconf when processing the Macro. You
3836 #   need not follow the terms of the GNU General Public License when using
3837 #   or distributing such scripts, even though portions of the text of the
3838 #   Macro appear in them. The GNU General Public License (GPL) does govern
3839 #   all other use of the material that constitutes the Autoconf Macro.
3840 #
3841 #   This special exception to the GPL applies to versions of the Autoconf
3842 #   Macro released by the Autoconf Archive. When you make and distribute a
3843 #   modified version of the Autoconf Macro, you may extend this special
3844 #   exception to the GPL to apply to your modified version as well.
3845
3846 #serial 21
3847
3848 # This is what autoupdate's m4 run will expand.  It fires
3849 # the warning (with _au_warn_XXX), outputs it into the
3850 # updated configure.ac (with AC_DIAGNOSE), and then outputs
3851 # the replacement expansion.
3852
3853
3854 # This is an auxiliary macro that is also run when
3855 # autoupdate runs m4.  It simply calls m4_warning, but
3856 # we need a wrapper so that each warning is emitted only
3857 # once.  We break the quoting in m4_warning's argument in
3858 # order to expand this macro's arguments, not AU_DEFUN's.
3859
3860
3861 # Finally, this is the expansion that is picked up by
3862 # autoconf.  It tells the user to run autoupdate, and
3863 # then outputs the replacement expansion.  We do not care
3864 # about autoupdate's warning because that contains
3865 # information on what to do *after* running autoupdate.
3866
3867
3868
3869   # This affects CC, LIBS, and CFLAGS, instead of defining new variables.
3870
3871
3872 # Check whether --with-pthread was given.
3873 if test "${with_pthread+set}" = set; then :
3874   withval=$with_pthread; with_pthread="$withval"; with_pthread_req="$withval"
3875 else
3876   with_pthread=yes
3877 fi
3878
3879
3880   if test "$with_pthread" = yes; then
3881     # AX_PTHREAD might want a different compiler.
3882
3883
3884 ac_ext=c
3885 ac_cpp='$CPP $CPPFLAGS'
3886 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3887 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3888 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3889
3890 ax_pthread_ok=no
3891
3892 # We used to check for pthread.h first, but this fails if pthread.h
3893 # requires special compiler flags (e.g. on True64 or Sequent).
3894 # It gets checked for in the link test anyway.
3895
3896 # First of all, check if the user has set any of the PTHREAD_LIBS,
3897 # etcetera environment variables, and if threads linking works using
3898 # them:
3899 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
3900         save_CFLAGS="$CFLAGS"
3901         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
3902         save_LIBS="$LIBS"
3903         LIBS="$PTHREAD_LIBS $LIBS"
3904         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
3905 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
3906         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3907 /* end confdefs.h.  */
3908
3909 /* Override any GCC internal prototype to avoid an error.
3910    Use char because int might match the return type of a GCC
3911    builtin and then its argument prototype would still apply.  */
3912 #ifdef __cplusplus
3913 extern "C"
3914 #endif
3915 char pthread_join ();
3916 int
3917 main ()
3918 {
3919 return pthread_join ();
3920   ;
3921   return 0;
3922 }
3923 _ACEOF
3924 if ac_fn_c_try_link "$LINENO"; then :
3925   ax_pthread_ok=yes
3926 fi
3927 rm -f core conftest.err conftest.$ac_objext \
3928     conftest$ac_exeext conftest.$ac_ext
3929         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
3930 $as_echo "$ax_pthread_ok" >&6; }
3931         if test x"$ax_pthread_ok" = xno; then
3932                 PTHREAD_LIBS=""
3933                 PTHREAD_CFLAGS=""
3934         fi
3935         LIBS="$save_LIBS"
3936         CFLAGS="$save_CFLAGS"
3937 fi
3938
3939 # We must check for the threads library under a number of different
3940 # names; the ordering is very important because some systems
3941 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
3942 # libraries is broken (non-POSIX).
3943
3944 # Create a list of thread flags to try.  Items starting with a "-" are
3945 # C compiler flags, and other items are library names, except for "none"
3946 # which indicates that we try without any flags at all, and "pthread-config"
3947 # which is a program returning the flags for the Pth emulation library.
3948
3949 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3950
3951 # The ordering *is* (sometimes) important.  Some notes on the
3952 # individual items follow:
3953
3954 # pthreads: AIX (must check this before -lpthread)
3955 # none: in case threads are in libc; should be tried before -Kthread and
3956 #       other compiler flags to prevent continual compiler warnings
3957 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
3958 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
3959 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3960 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
3961 # -pthreads: Solaris/gcc
3962 # -mthreads: Mingw32/gcc, Lynx/gcc
3963 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
3964 #      doesn't hurt to check since this sometimes defines pthreads too;
3965 #      also defines -D_REENTRANT)
3966 #      ... -mt is also the pthreads flag for HP/aCC
3967 # pthread: Linux, etcetera
3968 # --thread-safe: KAI C++
3969 # pthread-config: use pthread-config program (for GNU Pth library)
3970
3971 case ${host_os} in
3972         solaris*)
3973
3974         # On Solaris (at least, for some versions), libc contains stubbed
3975         # (non-functional) versions of the pthreads routines, so link-based
3976         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
3977         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
3978         # a function called by this macro, so we could check for that, but
3979         # who knows whether they'll stub that too in a future libc.)  So,
3980         # we'll just look for -pthreads and -lpthread first:
3981
3982         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
3983         ;;
3984
3985         darwin*)
3986         ax_pthread_flags="-pthread $ax_pthread_flags"
3987         ;;
3988 esac
3989
3990 # Clang doesn't consider unrecognized options an error unless we specify
3991 # -Werror. We throw in some extra Clang-specific options to ensure that
3992 # this doesn't happen for GCC, which also accepts -Werror.
3993
3994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
3995 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
3996 save_CFLAGS="$CFLAGS"
3997 ax_pthread_extra_flags="-Werror"
3998 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
3999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4000 /* end confdefs.h.  */
4001 int foo(void);
4002 int
4003 main ()
4004 {
4005 foo()
4006   ;
4007   return 0;
4008 }
4009 _ACEOF
4010 if ac_fn_c_try_compile "$LINENO"; then :
4011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4012 $as_echo "yes" >&6; }
4013 else
4014   ax_pthread_extra_flags=
4015                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4016 $as_echo "no" >&6; }
4017 fi
4018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4019 CFLAGS="$save_CFLAGS"
4020
4021 if test x"$ax_pthread_ok" = xno; then
4022 for flag in $ax_pthread_flags; do
4023
4024         case $flag in
4025                 none)
4026                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
4027 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
4028                 ;;
4029
4030                 -*)
4031                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
4032 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
4033                 PTHREAD_CFLAGS="$flag"
4034                 ;;
4035
4036                 pthread-config)
4037                 # Extract the first word of "pthread-config", so it can be a program name with args.
4038 set dummy pthread-config; ac_word=$2
4039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4040 $as_echo_n "checking for $ac_word... " >&6; }
4041 if ${ac_cv_prog_ax_pthread_config+:} false; then :
4042   $as_echo_n "(cached) " >&6
4043 else
4044   if test -n "$ax_pthread_config"; then
4045   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
4046 else
4047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4048 for as_dir in $PATH
4049 do
4050   IFS=$as_save_IFS
4051   test -z "$as_dir" && as_dir=.
4052     for ac_exec_ext in '' $ac_executable_extensions; do
4053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4054     ac_cv_prog_ax_pthread_config="yes"
4055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4056     break 2
4057   fi
4058 done
4059   done
4060 IFS=$as_save_IFS
4061
4062   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
4063 fi
4064 fi
4065 ax_pthread_config=$ac_cv_prog_ax_pthread_config
4066 if test -n "$ax_pthread_config"; then
4067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
4068 $as_echo "$ax_pthread_config" >&6; }
4069 else
4070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4071 $as_echo "no" >&6; }
4072 fi
4073
4074
4075                 if test x"$ax_pthread_config" = xno; then continue; fi
4076                 PTHREAD_CFLAGS="`pthread-config --cflags`"
4077                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
4078                 ;;
4079
4080                 *)
4081                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
4082 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
4083                 PTHREAD_LIBS="-l$flag"
4084                 ;;
4085         esac
4086
4087         save_LIBS="$LIBS"
4088         save_CFLAGS="$CFLAGS"
4089         LIBS="$PTHREAD_LIBS $LIBS"
4090         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
4091
4092         # Check for various functions.  We must include pthread.h,
4093         # since some functions may be macros.  (On the Sequent, we
4094         # need a special flag -Kthread to make this header compile.)
4095         # We check for pthread_join because it is in -lpthread on IRIX
4096         # while pthread_create is in libc.  We check for pthread_attr_init
4097         # due to DEC craziness with -lpthreads.  We check for
4098         # pthread_cleanup_push because it is one of the few pthread
4099         # functions on Solaris that doesn't have a non-functional libc stub.
4100         # We try pthread_create on general principles.
4101         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4102 /* end confdefs.h.  */
4103 #include <pthread.h>
4104                         static void routine(void *a) { a = 0; }
4105                         static void *start_routine(void *a) { return a; }
4106 int
4107 main ()
4108 {
4109 pthread_t th; pthread_attr_t attr;
4110                         pthread_create(&th, 0, start_routine, 0);
4111                         pthread_join(th, 0);
4112                         pthread_attr_init(&attr);
4113                         pthread_cleanup_push(routine, 0);
4114                         pthread_cleanup_pop(0) /* ; */
4115   ;
4116   return 0;
4117 }
4118 _ACEOF
4119 if ac_fn_c_try_link "$LINENO"; then :
4120   ax_pthread_ok=yes
4121 fi
4122 rm -f core conftest.err conftest.$ac_objext \
4123     conftest$ac_exeext conftest.$ac_ext
4124
4125         LIBS="$save_LIBS"
4126         CFLAGS="$save_CFLAGS"
4127
4128         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
4129 $as_echo "$ax_pthread_ok" >&6; }
4130         if test "x$ax_pthread_ok" = xyes; then
4131                 break;
4132         fi
4133
4134         PTHREAD_LIBS=""
4135         PTHREAD_CFLAGS=""
4136 done
4137 fi
4138
4139 # Various other checks:
4140 if test "x$ax_pthread_ok" = xyes; then
4141         save_LIBS="$LIBS"
4142         LIBS="$PTHREAD_LIBS $LIBS"
4143         save_CFLAGS="$CFLAGS"
4144         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
4145
4146         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
4147         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
4148 $as_echo_n "checking for joinable pthread attribute... " >&6; }
4149         attr_name=unknown
4150         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
4151             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4152 /* end confdefs.h.  */
4153 #include <pthread.h>
4154 int
4155 main ()
4156 {
4157 int attr = $attr; return attr /* ; */
4158   ;
4159   return 0;
4160 }
4161 _ACEOF
4162 if ac_fn_c_try_link "$LINENO"; then :
4163   attr_name=$attr; break
4164 fi
4165 rm -f core conftest.err conftest.$ac_objext \
4166     conftest$ac_exeext conftest.$ac_ext
4167         done
4168         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
4169 $as_echo "$attr_name" >&6; }
4170         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
4171
4172 cat >>confdefs.h <<_ACEOF
4173 #define PTHREAD_CREATE_JOINABLE $attr_name
4174 _ACEOF
4175
4176         fi
4177
4178         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
4179 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
4180         flag=no
4181         case ${host_os} in
4182             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
4183             osf* | hpux*) flag="-D_REENTRANT";;
4184             solaris*)
4185             if test "$GCC" = "yes"; then
4186                 flag="-D_REENTRANT"
4187             else
4188                 # TODO: What about Clang on Solaris?
4189                 flag="-mt -D_REENTRANT"
4190             fi
4191             ;;
4192         esac
4193         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
4194 $as_echo "$flag" >&6; }
4195         if test "x$flag" != xno; then
4196             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
4197         fi
4198
4199         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
4200 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
4201 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
4202   $as_echo_n "(cached) " >&6
4203 else
4204
4205                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4206 /* end confdefs.h.  */
4207 #include <pthread.h>
4208 int
4209 main ()
4210 {
4211 int i = PTHREAD_PRIO_INHERIT;
4212   ;
4213   return 0;
4214 }
4215 _ACEOF
4216 if ac_fn_c_try_link "$LINENO"; then :
4217   ax_cv_PTHREAD_PRIO_INHERIT=yes
4218 else
4219   ax_cv_PTHREAD_PRIO_INHERIT=no
4220 fi
4221 rm -f core conftest.err conftest.$ac_objext \
4222     conftest$ac_exeext conftest.$ac_ext
4223
4224 fi
4225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
4226 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
4227         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
4228
4229 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
4230
4231 fi
4232
4233         LIBS="$save_LIBS"
4234         CFLAGS="$save_CFLAGS"
4235
4236         # More AIX lossage: compile with *_r variant
4237         if test "x$GCC" != xyes; then
4238             case $host_os in
4239                 aix*)
4240                 case "x/$CC" in #(
4241   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
4242     #handle absolute path differently from PATH based program lookup
4243                    case "x$CC" in #(
4244   x/*) :
4245     if as_fn_executable_p ${CC}_r; then :
4246   PTHREAD_CC="${CC}_r"
4247 fi ;; #(
4248   *) :
4249     for ac_prog in ${CC}_r
4250 do
4251   # Extract the first word of "$ac_prog", so it can be a program name with args.
4252 set dummy $ac_prog; ac_word=$2
4253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4254 $as_echo_n "checking for $ac_word... " >&6; }
4255 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
4256   $as_echo_n "(cached) " >&6
4257 else
4258   if test -n "$PTHREAD_CC"; then
4259   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
4260 else
4261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4262 for as_dir in $PATH
4263 do
4264   IFS=$as_save_IFS
4265   test -z "$as_dir" && as_dir=.
4266     for ac_exec_ext in '' $ac_executable_extensions; do
4267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4268     ac_cv_prog_PTHREAD_CC="$ac_prog"
4269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4270     break 2
4271   fi
4272 done
4273   done
4274 IFS=$as_save_IFS
4275
4276 fi
4277 fi
4278 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
4279 if test -n "$PTHREAD_CC"; then
4280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
4281 $as_echo "$PTHREAD_CC" >&6; }
4282 else
4283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4284 $as_echo "no" >&6; }
4285 fi
4286
4287
4288   test -n "$PTHREAD_CC" && break
4289 done
4290 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
4291  ;;
4292 esac ;; #(
4293   *) :
4294      ;;
4295 esac
4296                 ;;
4297             esac
4298         fi
4299 fi
4300
4301 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
4302
4303
4304
4305
4306
4307 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
4308 if test x"$ax_pthread_ok" = xyes; then
4309         if test "$CC" = "$PTHREAD_CC" -o -z "$ac_original_cc"; then
4310         have_pthread=yes
4311       else
4312         ac_prog_cc_no_pthread=yes
4313       fi
4314
4315         :
4316 else
4317         ax_pthread_ok=no
4318
4319 fi
4320 ac_ext=c
4321 ac_cpp='$CPP $CPPFLAGS'
4322 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4323 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4324 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4325
4326
4327
4328     if test "$have_pthread" = yes; then
4329       $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
4330
4331       CC=$PTHREAD_CC
4332     fi
4333   fi
4334  # Needs ac_original_cc.
4335
4336
4337
4338   if test -z "$GCC"; then
4339     # not using GCC
4340     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to request ANSI compilation" >&5
4341 $as_echo_n "checking how to request ANSI compilation... " >&6; }
4342     case "$host" in
4343       *-hpux* )
4344         { $as_echo "$as_me:${as_lineno-$LINENO}: result: HPUX: adding -Ae" >&5
4345 $as_echo "HPUX: adding -Ae" >&6; }
4346         CC="$CC -Ae"
4347       ;;
4348       *-aix* )
4349         { $as_echo "$as_me:${as_lineno-$LINENO}: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
4350 $as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
4351         CC="$CC -qlanglvl=ansi -qhalt=e"
4352       ;;
4353       *-dec-* )
4354         { $as_echo "$as_me:${as_lineno-$LINENO}: result: DEC: adding -std1 -ieee" >&5
4355 $as_echo "DEC: adding -std1 -ieee" >&6; }
4356         CC="$CC -std1"
4357       ;;
4358       *)
4359         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no idea" >&5
4360 $as_echo "no idea" >&6; }
4361       ;;
4362     esac
4363   else
4364     # using GCC
4365     case "$host" in
4366       *-solaris*)
4367         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris: adding -D__EXTENSIONS__" >&5
4368 $as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
4369         CC="$CC -D__EXTENSIONS__"
4370       ;;
4371     esac
4372   fi
4373
4374   OBJCC="$CC"
4375
4376   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler works on ANSI C" >&5
4377 $as_echo_n "checking whether the compiler works on ANSI C... " >&6; }
4378   if test "$cross_compiling" = yes; then :
4379   as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
4380 else
4381   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4382 /* end confdefs.h.  */
4383  main(int ac, char **av) { return 0; }
4384 _ACEOF
4385 if ac_fn_c_try_run "$LINENO"; then :
4386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4387 $as_echo "yes" >&6; }
4388 else
4389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4390 $as_echo "no" >&6; }
4391      as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
4392 fi
4393 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4394   conftest.$ac_objext conftest.beam conftest.$ac_ext
4395 fi
4396
4397
4398   if test -n "$GCC"; then
4399     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on gcc compiler warnings." >&5
4400 $as_echo "Turning on gcc compiler warnings." >&6; }
4401     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
4402     OBJCC="$OBJCC -Wall"
4403     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
4404     # and so perhaps now we can do without -pedantic?
4405   else
4406     case "$host" in
4407       *-irix5* |*-irix6.0-3* )
4408         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on SGI compiler warnings." >&5
4409 $as_echo "Turning on SGI compiler warnings." >&6; }
4410         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
4411       ;;
4412 #     *-dec-osf* )
4413 #       if test -z "$GCC"; then
4414 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
4415 #         CC="$CC -migrate -w0 -verbose -warnprotos"
4416 #       fi
4417 #     ;;
4418     esac
4419   fi
4420
4421 if test -n "$GCC"; then
4422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wno-overlength-strings" >&5
4423 $as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
4424 if ${ac_cv_gcc_accepts_no_overlength+:} false; then :
4425   $as_echo_n "(cached) " >&6
4426 else
4427   rm -rf conftest.$ac_ext
4428      touch conftest.$ac_ext
4429      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4430           grep unrecognized >/dev/null ); then
4431        ac_cv_gcc_accepts_no_overlength=no
4432      else
4433        ac_cv_gcc_accepts_no_overlength=yes
4434        CC="$CC -Wno-overlength-strings"
4435      fi
4436 fi
4437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_overlength" >&5
4438 $as_echo "$ac_cv_gcc_accepts_no_overlength" >&6; }
4439    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
4440   fi
4441
4442 if test -n "$GCC"; then
4443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wdeclaration-after-statement" >&5
4444 $as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
4445 if ${ac_cv_gcc_accepts_no_decl_after+:} false; then :
4446   $as_echo_n "(cached) " >&6
4447 else
4448   rm -rf conftest.$ac_ext
4449      touch conftest.$ac_ext
4450      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4451           grep unrecognized >/dev/null ); then
4452        ac_cv_gcc_accepts_no_decl_after=no
4453      else
4454        ac_cv_gcc_accepts_no_decl_after=yes
4455        CC="$CC -Wdeclaration-after-statement"
4456      fi
4457 fi
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_decl_after" >&5
4459 $as_echo "$ac_cv_gcc_accepts_no_decl_after" >&6; }
4460    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
4461   fi
4462
4463 if test -n "$GCC"; then
4464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -no-cpp-precomp" >&5
4465 $as_echo_n "checking whether gcc accepts -no-cpp-precomp... " >&6; }
4466 if ${ac_cv_gcc_accepts_no_cpp_precomp+:} false; then :
4467   $as_echo_n "(cached) " >&6
4468 else
4469   rm -rf conftest.$ac_ext
4470      touch conftest.$ac_ext
4471      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4472           grep unrecognized >/dev/null ); then
4473        ac_cv_gcc_accepts_no_cpp_precomp=no
4474      else
4475        ac_cv_gcc_accepts_no_cpp_precomp=yes
4476        CC="$CC -no-cpp-precomp"
4477      fi
4478 fi
4479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
4480 $as_echo "$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
4481    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
4482   fi
4483
4484 if test -n "$GCC"; then
4485
4486   case "$host" in
4487     *-darwin* )
4488       # Fucking Apple let // comments sneak into OpenGL headers, so
4489       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
4490     ;;
4491    *)
4492      if test -n "$GCC"; then
4493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -std=c89" >&5
4494 $as_echo_n "checking whether gcc accepts -std=c89... " >&6; }
4495 if ${ac_cv_gcc_accepts_std+:} false; then :
4496   $as_echo_n "(cached) " >&6
4497 else
4498   rm -rf conftest.$ac_ext
4499      touch conftest.$ac_ext
4500      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4501           grep unrecognized >/dev/null ); then
4502        ac_cv_gcc_accepts_std=no
4503      else
4504        ac_cv_gcc_accepts_std=yes
4505        CC="$CC -std=c89"
4506      fi
4507 fi
4508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_std" >&5
4509 $as_echo "$ac_cv_gcc_accepts_std" >&6; }
4510    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
4511   fi
4512
4513    ;;
4514   esac
4515
4516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling C++ comments in ANSI C code." >&5
4517 $as_echo "Disabling C++ comments in ANSI C code." >&6; }
4518    #
4519    # The reason that // comments are banned from xscreensaver is that gcc is
4520    # basically the only compiler in the world that supports them in C code.
4521    # All other vendors support them only in their C++ compilers, not in their
4522    # ANSI C compilers.  This means that it's a portability problem: every time
4523    # these comments have snuck into the xscreensaver source code, I've gotten
4524    # complaints about it the next day.  So we turn off support for them in gcc
4525    # as well to prevent them from accidentially slipping in.
4526    #
4527    if test "$ac_gcc_accepts_std" = yes ; then
4528      #
4529      # -std=c89 defines __STRICT_ANSI__, which we don't want.
4530      # (That appears to be the only additional preprocessor symbol
4531      # it defines, in addition to the syntax changes it makes.)
4532      #
4533      # -std=gnu89 is no good, because // comments were a GNU extension
4534      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
4535      # with -std=gnu89 but not with -std=c89.)
4536      #
4537      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
4538      CC="$CC -U__STRICT_ANSI__"
4539 #   else
4540 #     # The old way:
4541 #     CC="$CC -Wp,-lang-c89"
4542    fi
4543   fi
4544
4545 ac_ext=c
4546 ac_cpp='$CPP $CPPFLAGS'
4547 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4548 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4549 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4551 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4552 # On Suns, sometimes $CPP names a directory.
4553 if test -n "$CPP" && test -d "$CPP"; then
4554   CPP=
4555 fi
4556 if test -z "$CPP"; then
4557   if ${ac_cv_prog_CPP+:} false; then :
4558   $as_echo_n "(cached) " >&6
4559 else
4560       # Double quotes because CPP needs to be expanded
4561     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4562     do
4563       ac_preproc_ok=false
4564 for ac_c_preproc_warn_flag in '' yes
4565 do
4566   # Use a header file that comes with gcc, so configuring glibc
4567   # with a fresh cross-compiler works.
4568   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4569   # <limits.h> exists even on freestanding compilers.
4570   # On the NeXT, cc -E runs the code through the compiler's parser,
4571   # not just through cpp. "Syntax error" is here to catch this case.
4572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4573 /* end confdefs.h.  */
4574 #ifdef __STDC__
4575 # include <limits.h>
4576 #else
4577 # include <assert.h>
4578 #endif
4579                      Syntax error
4580 _ACEOF
4581 if ac_fn_c_try_cpp "$LINENO"; then :
4582
4583 else
4584   # Broken: fails on valid input.
4585 continue
4586 fi
4587 rm -rf conftest.err conftest.i conftest.$ac_ext
4588
4589   # OK, works on sane cases.  Now check whether nonexistent headers
4590   # can be detected and how.
4591   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4592 /* end confdefs.h.  */
4593 #include <ac_nonexistent.h>
4594 _ACEOF
4595 if ac_fn_c_try_cpp "$LINENO"; then :
4596   # Broken: success on invalid input.
4597 continue
4598 else
4599   # Passes both tests.
4600 ac_preproc_ok=:
4601 break
4602 fi
4603 rm -rf conftest.err conftest.i conftest.$ac_ext
4604
4605 done
4606 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4607 rm -rf conftest.i conftest.err conftest.$ac_ext
4608 if $ac_preproc_ok; then :
4609   break
4610 fi
4611
4612     done
4613     ac_cv_prog_CPP=$CPP
4614
4615 fi
4616   CPP=$ac_cv_prog_CPP
4617 else
4618   ac_cv_prog_CPP=$CPP
4619 fi
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4621 $as_echo "$CPP" >&6; }
4622 ac_preproc_ok=false
4623 for ac_c_preproc_warn_flag in '' yes
4624 do
4625   # Use a header file that comes with gcc, so configuring glibc
4626   # with a fresh cross-compiler works.
4627   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4628   # <limits.h> exists even on freestanding compilers.
4629   # On the NeXT, cc -E runs the code through the compiler's parser,
4630   # not just through cpp. "Syntax error" is here to catch this case.
4631   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4632 /* end confdefs.h.  */
4633 #ifdef __STDC__
4634 # include <limits.h>
4635 #else
4636 # include <assert.h>
4637 #endif
4638                      Syntax error
4639 _ACEOF
4640 if ac_fn_c_try_cpp "$LINENO"; then :
4641
4642 else
4643   # Broken: fails on valid input.
4644 continue
4645 fi
4646 rm -rf conftest.err conftest.i conftest.$ac_ext
4647
4648   # OK, works on sane cases.  Now check whether nonexistent headers
4649   # can be detected and how.
4650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4651 /* end confdefs.h.  */
4652 #include <ac_nonexistent.h>
4653 _ACEOF
4654 if ac_fn_c_try_cpp "$LINENO"; then :
4655   # Broken: success on invalid input.
4656 continue
4657 else
4658   # Passes both tests.
4659 ac_preproc_ok=:
4660 break
4661 fi
4662 rm -rf conftest.err conftest.i conftest.$ac_ext
4663
4664 done
4665 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4666 rm -rf conftest.i conftest.err conftest.$ac_ext
4667 if $ac_preproc_ok; then :
4668
4669 else
4670   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4671 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4672 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4673 See \`config.log' for more details" "$LINENO" 5; }
4674 fi
4675
4676 ac_ext=c
4677 ac_cpp='$CPP $CPPFLAGS'
4678 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4679 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4680 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4681
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4683 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4684 if ${ac_cv_c_const+:} false; then :
4685   $as_echo_n "(cached) " >&6
4686 else
4687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4688 /* end confdefs.h.  */
4689
4690 int
4691 main ()
4692 {
4693
4694 #ifndef __cplusplus
4695   /* Ultrix mips cc rejects this sort of thing.  */
4696   typedef int charset[2];
4697   const charset cs = { 0, 0 };
4698   /* SunOS 4.1.1 cc rejects this.  */
4699   char const *const *pcpcc;
4700   char **ppc;
4701   /* NEC SVR4.0.2 mips cc rejects this.  */
4702   struct point {int x, y;};
4703   static struct point const zero = {0,0};
4704   /* AIX XL C 1.02.0.0 rejects this.
4705      It does not let you subtract one const X* pointer from another in
4706      an arm of an if-expression whose if-part is not a constant
4707      expression */
4708   const char *g = "string";
4709   pcpcc = &g + (g ? g-g : 0);
4710   /* HPUX 7.0 cc rejects these. */
4711   ++pcpcc;
4712   ppc = (char**) pcpcc;
4713   pcpcc = (char const *const *) ppc;
4714   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4715     char tx;
4716     char *t = &tx;
4717     char const *s = 0 ? (char *) 0 : (char const *) 0;
4718
4719     *t++ = 0;
4720     if (s) return 0;
4721   }
4722   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4723     int x[] = {25, 17};
4724     const int *foo = &x[0];
4725     ++foo;
4726   }
4727   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4728     typedef const int *iptr;
4729     iptr p = 0;
4730     ++p;
4731   }
4732   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4733        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4734     struct s { int j; const int *ap[3]; } bx;
4735     struct s *b = &bx; b->j = 5;
4736   }
4737   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4738     const int foo = 10;
4739     if (!foo) return 0;
4740   }
4741   return !cs[0] && !zero.x;
4742 #endif
4743
4744   ;
4745   return 0;
4746 }
4747 _ACEOF
4748 if ac_fn_c_try_compile "$LINENO"; then :
4749   ac_cv_c_const=yes
4750 else
4751   ac_cv_c_const=no
4752 fi
4753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4754 fi
4755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4756 $as_echo "$ac_cv_c_const" >&6; }
4757 if test $ac_cv_c_const = no; then
4758
4759 $as_echo "#define const /**/" >>confdefs.h
4760
4761 fi
4762
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4764 $as_echo_n "checking for inline... " >&6; }
4765 if ${ac_cv_c_inline+:} false; then :
4766   $as_echo_n "(cached) " >&6
4767 else
4768   ac_cv_c_inline=no
4769 for ac_kw in inline __inline__ __inline; do
4770   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4771 /* end confdefs.h.  */
4772 #ifndef __cplusplus
4773 typedef int foo_t;
4774 static $ac_kw foo_t static_foo () {return 0; }
4775 $ac_kw foo_t foo () {return 0; }
4776 #endif
4777
4778 _ACEOF
4779 if ac_fn_c_try_compile "$LINENO"; then :
4780   ac_cv_c_inline=$ac_kw
4781 fi
4782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4783   test "$ac_cv_c_inline" != no && break
4784 done
4785
4786 fi
4787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4788 $as_echo "$ac_cv_c_inline" >&6; }
4789
4790 case $ac_cv_c_inline in
4791   inline | yes) ;;
4792   *)
4793     case $ac_cv_c_inline in
4794       no) ac_val=;;
4795       *) ac_val=$ac_cv_c_inline;;
4796     esac
4797     cat >>confdefs.h <<_ACEOF
4798 #ifndef __cplusplus
4799 #define inline $ac_val
4800 #endif
4801 _ACEOF
4802     ;;
4803 esac
4804
4805
4806 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4807   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bc" >&5
4808 $as_echo_n "checking for bc... " >&6; }
4809   if test "$ac_bc_result" = "15" ; then
4810     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4811 $as_echo "yes" >&6; }
4812   else
4813     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4814 $as_echo "no" >&6; }
4815     echo ''
4816     as_fn_error $? "Your system doesn't have \"bc\", which has been a standard
4817                   part of Unix since the 1970s.  Come back when your vendor
4818                   has grown a clue." "$LINENO" 5
4819   fi
4820
4821
4822 # stuff for Makefiles
4823 # Find a good install program.  We prefer a C program (faster),
4824 # so one script is as good as another.  But avoid the broken or
4825 # incompatible versions:
4826 # SysV /etc/install, /usr/sbin/install
4827 # SunOS /usr/etc/install
4828 # IRIX /sbin/install
4829 # AIX /bin/install
4830 # AmigaOS /C/install, which installs bootblocks on floppy discs
4831 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4832 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4833 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4834 # OS/2's system install, which has a completely different semantic
4835 # ./install, which can be erroneously created by make from ./install.sh.
4836 # Reject install programs that cannot install multiple files.
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4838 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4839 if test -z "$INSTALL"; then
4840 if ${ac_cv_path_install+:} false; then :
4841   $as_echo_n "(cached) " >&6
4842 else
4843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4844 for as_dir in $PATH
4845 do
4846   IFS=$as_save_IFS
4847   test -z "$as_dir" && as_dir=.
4848     # Account for people who put trailing slashes in PATH elements.
4849 case $as_dir/ in #((
4850   ./ | .// | /[cC]/* | \
4851   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4852   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4853   /usr/ucb/* ) ;;
4854   *)
4855     # OSF1 and SCO ODT 3.0 have their own names for install.
4856     # Don't use installbsd from OSF since it installs stuff as root
4857     # by default.
4858     for ac_prog in ginstall scoinst install; do
4859       for ac_exec_ext in '' $ac_executable_extensions; do
4860         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4861           if test $ac_prog = install &&
4862             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4863             # AIX install.  It has an incompatible calling convention.
4864             :
4865           elif test $ac_prog = install &&
4866             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4867             # program-specific install script used by HP pwplus--don't use.
4868             :
4869           else
4870             rm -rf conftest.one conftest.two conftest.dir
4871             echo one > conftest.one
4872             echo two > conftest.two
4873             mkdir conftest.dir
4874             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4875               test -s conftest.one && test -s conftest.two &&
4876               test -s conftest.dir/conftest.one &&
4877               test -s conftest.dir/conftest.two
4878             then
4879               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4880               break 3
4881             fi
4882           fi
4883         fi
4884       done
4885     done
4886     ;;
4887 esac
4888
4889   done
4890 IFS=$as_save_IFS
4891
4892 rm -rf conftest.one conftest.two conftest.dir
4893
4894 fi
4895   if test "${ac_cv_path_install+set}" = set; then
4896     INSTALL=$ac_cv_path_install
4897   else
4898     # As a last resort, use the slow shell script.  Don't cache a
4899     # value for INSTALL within a source directory, because that will
4900     # break other packages using the cache if that directory is
4901     # removed, or if the value is a relative name.
4902     INSTALL=$ac_install_sh
4903   fi
4904 fi
4905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4906 $as_echo "$INSTALL" >&6; }
4907
4908 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4909 # It thinks the first close brace ends the variable substitution.
4910 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4911
4912 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4913
4914 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4915
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4917 $as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4918 if ${ac_cv_install_d_creates_dirs+:} false; then :
4919   $as_echo_n "(cached) " >&6
4920 else
4921   ac_cv_install_d_creates_dirs=no
4922      rm -rf conftestdir
4923      if mkdir conftestdir; then
4924        cd conftestdir 2>/dev/null
4925        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4926        if test -d dir1/dir2/. ; then
4927          ac_cv_install_d_creates_dirs=yes
4928        fi
4929        cd .. 2>/dev/null
4930        rm -rf conftestdir
4931      fi
4932
4933 fi
4934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_install_d_creates_dirs" >&5
4935 $as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4936
4937   if test "$ac_cv_install_d_creates_dirs" = no ; then
4938     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"mkdir -p\" creates intermediate directories" >&5
4939 $as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4940 if ${ac_cv_mkdir_p_creates_dirs+:} false; then :
4941   $as_echo_n "(cached) " >&6
4942 else
4943   ac_cv_mkdir_p_creates_dirs=no
4944        rm -rf conftestdir
4945        if mkdir conftestdir; then
4946          cd conftestdir 2>/dev/null
4947          mkdir -p dir1/dir2 >/dev/null 2>&1
4948          if test -d dir1/dir2/. ; then
4949            ac_cv_mkdir_p_creates_dirs=yes
4950          fi
4951          cd .. 2>/dev/null
4952          rm -rf conftestdir
4953        fi
4954
4955 fi
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_p_creates_dirs" >&5
4957 $as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4958   fi
4959
4960   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4961     INSTALL_DIRS='${INSTALL} -d'
4962   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4963     INSTALL_DIRS='mkdir -p'
4964   else
4965     # any other ideas?
4966     INSTALL_DIRS='${INSTALL} -d'
4967   fi
4968
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4970 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4971 set x ${MAKE-make}
4972 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4973 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4974   $as_echo_n "(cached) " >&6
4975 else
4976   cat >conftest.make <<\_ACEOF
4977 SHELL = /bin/sh
4978 all:
4979         @echo '@@@%%%=$(MAKE)=@@@%%%'
4980 _ACEOF
4981 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4982 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4983   *@@@%%%=?*=@@@%%%*)
4984     eval ac_cv_prog_make_${ac_make}_set=yes;;
4985   *)
4986     eval ac_cv_prog_make_${ac_make}_set=no;;
4987 esac
4988 rm -rf conftest.make
4989 fi
4990 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4992 $as_echo "yes" >&6; }
4993   SET_MAKE=
4994 else
4995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4996 $as_echo "no" >&6; }
4997   SET_MAKE="MAKE=${MAKE-make}"
4998 fi
4999
5000
5001 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
5002 # That's wrong: it should be set to '${INSTALL}', so that one can
5003 # implement the "install-strip" target properly (strip executables,
5004 # but do not try to strip scripts.)
5005 #
5006 INSTALL_SCRIPT='${INSTALL}'
5007
5008 # random libc stuff
5009
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5011 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5012 if ${ac_cv_path_GREP+:} false; then :
5013   $as_echo_n "(cached) " >&6
5014 else
5015   if test -z "$GREP"; then
5016   ac_path_GREP_found=false
5017   # Loop through the user's path and test for each of PROGNAME-LIST
5018   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5019 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5020 do
5021   IFS=$as_save_IFS
5022   test -z "$as_dir" && as_dir=.
5023     for ac_prog in grep ggrep; do
5024     for ac_exec_ext in '' $ac_executable_extensions; do
5025       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5026       as_fn_executable_p "$ac_path_GREP" || continue
5027 # Check for GNU ac_path_GREP and select it if it is found.
5028   # Check for GNU $ac_path_GREP
5029 case `"$ac_path_GREP" --version 2>&1` in
5030 *GNU*)
5031   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5032 *)
5033   ac_count=0
5034   $as_echo_n 0123456789 >"conftest.in"
5035   while :
5036   do
5037     cat "conftest.in" "conftest.in" >"conftest.tmp"
5038     mv "conftest.tmp" "conftest.in"
5039     cp "conftest.in" "conftest.nl"
5040     $as_echo 'GREP' >> "conftest.nl"
5041     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5042     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5043     as_fn_arith $ac_count + 1 && ac_count=$as_val
5044     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5045       # Best one so far, save it but keep looking for a better one
5046       ac_cv_path_GREP="$ac_path_GREP"
5047       ac_path_GREP_max=$ac_count
5048     fi
5049     # 10*(2^10) chars as input seems more than enough
5050     test $ac_count -gt 10 && break
5051   done
5052   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
5053 esac
5054
5055       $ac_path_GREP_found && break 3
5056     done
5057   done
5058   done
5059 IFS=$as_save_IFS
5060   if test -z "$ac_cv_path_GREP"; then
5061     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5062   fi
5063 else
5064   ac_cv_path_GREP=$GREP
5065 fi
5066
5067 fi
5068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5069 $as_echo "$ac_cv_path_GREP" >&6; }
5070  GREP="$ac_cv_path_GREP"
5071
5072
5073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5074 $as_echo_n "checking for egrep... " >&6; }
5075 if ${ac_cv_path_EGREP+:} false; then :
5076   $as_echo_n "(cached) " >&6
5077 else
5078   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5079    then ac_cv_path_EGREP="$GREP -E"
5080    else
5081      if test -z "$EGREP"; then
5082   ac_path_EGREP_found=false
5083   # Loop through the user's path and test for each of PROGNAME-LIST
5084   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5086 do
5087   IFS=$as_save_IFS
5088   test -z "$as_dir" && as_dir=.
5089     for ac_prog in egrep; do
5090     for ac_exec_ext in '' $ac_executable_extensions; do
5091       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5092       as_fn_executable_p "$ac_path_EGREP" || continue
5093 # Check for GNU ac_path_EGREP and select it if it is found.
5094   # Check for GNU $ac_path_EGREP
5095 case `"$ac_path_EGREP" --version 2>&1` in
5096 *GNU*)
5097   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5098 *)
5099   ac_count=0
5100   $as_echo_n 0123456789 >"conftest.in"
5101   while :
5102   do
5103     cat "conftest.in" "conftest.in" >"conftest.tmp"
5104     mv "conftest.tmp" "conftest.in"
5105     cp "conftest.in" "conftest.nl"
5106     $as_echo 'EGREP' >> "conftest.nl"
5107     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5108     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5109     as_fn_arith $ac_count + 1 && ac_count=$as_val
5110     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5111       # Best one so far, save it but keep looking for a better one
5112       ac_cv_path_EGREP="$ac_path_EGREP"
5113       ac_path_EGREP_max=$ac_count
5114     fi
5115     # 10*(2^10) chars as input seems more than enough
5116     test $ac_count -gt 10 && break
5117   done
5118   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
5119 esac
5120
5121       $ac_path_EGREP_found && break 3
5122     done
5123   done
5124   done
5125 IFS=$as_save_IFS
5126   if test -z "$ac_cv_path_EGREP"; then
5127     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5128   fi
5129 else
5130   ac_cv_path_EGREP=$EGREP
5131 fi
5132
5133    fi
5134 fi
5135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5136 $as_echo "$ac_cv_path_EGREP" >&6; }
5137  EGREP="$ac_cv_path_EGREP"
5138
5139
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5141 $as_echo_n "checking for ANSI C header files... " >&6; }
5142 if ${ac_cv_header_stdc+:} false; then :
5143   $as_echo_n "(cached) " >&6
5144 else
5145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5146 /* end confdefs.h.  */
5147 #include <stdlib.h>
5148 #include <stdarg.h>
5149 #include <string.h>
5150 #include <float.h>
5151
5152 int
5153 main ()
5154 {
5155
5156   ;
5157   return 0;
5158 }
5159 _ACEOF
5160 if ac_fn_c_try_compile "$LINENO"; then :
5161   ac_cv_header_stdc=yes
5162 else
5163   ac_cv_header_stdc=no
5164 fi
5165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5166
5167 if test $ac_cv_header_stdc = yes; then
5168   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5169   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5170 /* end confdefs.h.  */
5171 #include <string.h>
5172
5173 _ACEOF
5174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5175   $EGREP "memchr" >/dev/null 2>&1; then :
5176
5177 else
5178   ac_cv_header_stdc=no
5179 fi
5180 rm -rf conftest*
5181
5182 fi
5183
5184 if test $ac_cv_header_stdc = yes; then
5185   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5187 /* end confdefs.h.  */
5188 #include <stdlib.h>
5189
5190 _ACEOF
5191 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5192   $EGREP "free" >/dev/null 2>&1; then :
5193
5194 else
5195   ac_cv_header_stdc=no
5196 fi
5197 rm -rf conftest*
5198
5199 fi
5200
5201 if test $ac_cv_header_stdc = yes; then
5202   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5203   if test "$cross_compiling" = yes; then :
5204   :
5205 else
5206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5207 /* end confdefs.h.  */
5208 #include <ctype.h>
5209 #include <stdlib.h>
5210 #if ((' ' & 0x0FF) == 0x020)
5211 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5212 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5213 #else
5214 # define ISLOWER(c) \
5215                    (('a' <= (c) && (c) <= 'i') \
5216                      || ('j' <= (c) && (c) <= 'r') \
5217                      || ('s' <= (c) && (c) <= 'z'))
5218 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5219 #endif
5220
5221 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5222 int
5223 main ()
5224 {
5225   int i;
5226   for (i = 0; i < 256; i++)
5227     if (XOR (islower (i), ISLOWER (i))
5228         || toupper (i) != TOUPPER (i))
5229       return 2;
5230   return 0;
5231 }
5232 _ACEOF
5233 if ac_fn_c_try_run "$LINENO"; then :
5234
5235 else
5236   ac_cv_header_stdc=no
5237 fi
5238 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5239   conftest.$ac_objext conftest.beam conftest.$ac_ext
5240 fi
5241
5242 fi
5243 fi
5244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5245 $as_echo "$ac_cv_header_stdc" >&6; }
5246 if test $ac_cv_header_stdc = yes; then
5247
5248 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5249
5250 fi
5251
5252 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5253 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5254                   inttypes.h stdint.h unistd.h
5255 do :
5256   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5257 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5258 "
5259 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5260   cat >>confdefs.h <<_ACEOF
5261 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5262 _ACEOF
5263
5264 fi
5265
5266 done
5267
5268
5269 for ac_header in unistd.h inttypes.h
5270 do :
5271   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5272 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5273 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5274   cat >>confdefs.h <<_ACEOF
5275 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5276 _ACEOF
5277
5278 fi
5279
5280 done
5281
5282 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
5283 if test "x$ac_cv_type_mode_t" = xyes; then :
5284
5285 else
5286
5287 cat >>confdefs.h <<_ACEOF
5288 #define mode_t int
5289 _ACEOF
5290
5291 fi
5292
5293 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
5294 if test "x$ac_cv_type_pid_t" = xyes; then :
5295
5296 else
5297
5298 cat >>confdefs.h <<_ACEOF
5299 #define pid_t int
5300 _ACEOF
5301
5302 fi
5303
5304 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
5305 if test "x$ac_cv_type_size_t" = xyes; then :
5306
5307 else
5308
5309 cat >>confdefs.h <<_ACEOF
5310 #define size_t unsigned int
5311 _ACEOF
5312
5313 fi
5314
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
5316 $as_echo_n "checking return type of signal handlers... " >&6; }
5317 if ${ac_cv_type_signal+:} false; then :
5318   $as_echo_n "(cached) " >&6
5319 else
5320   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5321 /* end confdefs.h.  */
5322 #include <sys/types.h>
5323 #include <signal.h>
5324
5325 int
5326 main ()
5327 {
5328 return *(signal (0, 0)) (0) == 1;
5329   ;
5330   return 0;
5331 }
5332 _ACEOF
5333 if ac_fn_c_try_compile "$LINENO"; then :
5334   ac_cv_type_signal=int
5335 else
5336   ac_cv_type_signal=void
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_type_signal" >&5
5341 $as_echo "$ac_cv_type_signal" >&6; }
5342
5343 cat >>confdefs.h <<_ACEOF
5344 #define RETSIGTYPE $ac_cv_type_signal
5345 _ACEOF
5346
5347
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
5349 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5350 if ${ac_cv_header_time+:} false; then :
5351   $as_echo_n "(cached) " >&6
5352 else
5353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5354 /* end confdefs.h.  */
5355 #include <sys/types.h>
5356 #include <sys/time.h>
5357 #include <time.h>
5358
5359 int
5360 main ()
5361 {
5362 if ((struct tm *) 0)
5363 return 0;
5364   ;
5365   return 0;
5366 }
5367 _ACEOF
5368 if ac_fn_c_try_compile "$LINENO"; then :
5369   ac_cv_header_time=yes
5370 else
5371   ac_cv_header_time=no
5372 fi
5373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5374 fi
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
5376 $as_echo "$ac_cv_header_time" >&6; }
5377 if test $ac_cv_header_time = yes; then
5378
5379 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
5380
5381 fi
5382
5383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
5384 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5385 if ${ac_cv_header_sys_wait_h+:} false; then :
5386   $as_echo_n "(cached) " >&6
5387 else
5388   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5389 /* end confdefs.h.  */
5390 #include <sys/types.h>
5391 #include <sys/wait.h>
5392 #ifndef WEXITSTATUS
5393 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5394 #endif
5395 #ifndef WIFEXITED
5396 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5397 #endif
5398
5399 int
5400 main ()
5401 {
5402   int s;
5403   wait (&s);
5404   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5405   ;
5406   return 0;
5407 }
5408 _ACEOF
5409 if ac_fn_c_try_compile "$LINENO"; then :
5410   ac_cv_header_sys_wait_h=yes
5411 else
5412   ac_cv_header_sys_wait_h=no
5413 fi
5414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5415 fi
5416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
5417 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
5418 if test $ac_cv_header_sys_wait_h = yes; then
5419
5420 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
5421
5422 fi
5423
5424 ac_header_dirent=no
5425 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5426   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
5428 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5429 if eval \${$as_ac_Header+:} false; then :
5430   $as_echo_n "(cached) " >&6
5431 else
5432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5433 /* end confdefs.h.  */
5434 #include <sys/types.h>
5435 #include <$ac_hdr>
5436
5437 int
5438 main ()
5439 {
5440 if ((DIR *) 0)
5441 return 0;
5442   ;
5443   return 0;
5444 }
5445 _ACEOF
5446 if ac_fn_c_try_compile "$LINENO"; then :
5447   eval "$as_ac_Header=yes"
5448 else
5449   eval "$as_ac_Header=no"
5450 fi
5451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5452 fi
5453 eval ac_res=\$$as_ac_Header
5454                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5455 $as_echo "$ac_res" >&6; }
5456 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5457   cat >>confdefs.h <<_ACEOF
5458 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5459 _ACEOF
5460
5461 ac_header_dirent=$ac_hdr; break
5462 fi
5463
5464 done
5465 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5466 if test $ac_header_dirent = dirent.h; then
5467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
5468 $as_echo_n "checking for library containing opendir... " >&6; }
5469 if ${ac_cv_search_opendir+:} false; then :
5470   $as_echo_n "(cached) " >&6
5471 else
5472   ac_func_search_save_LIBS=$LIBS
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474 /* end confdefs.h.  */
5475
5476 /* Override any GCC internal prototype to avoid an error.
5477    Use char because int might match the return type of a GCC
5478    builtin and then its argument prototype would still apply.  */
5479 #ifdef __cplusplus
5480 extern "C"
5481 #endif
5482 char opendir ();
5483 int
5484 main ()
5485 {
5486 return opendir ();
5487   ;
5488   return 0;
5489 }
5490 _ACEOF
5491 for ac_lib in '' dir; do
5492   if test -z "$ac_lib"; then
5493     ac_res="none required"
5494   else
5495     ac_res=-l$ac_lib
5496     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5497   fi
5498   if ac_fn_c_try_link "$LINENO"; then :
5499   ac_cv_search_opendir=$ac_res
5500 fi
5501 rm -f core conftest.err conftest.$ac_objext \
5502     conftest$ac_exeext
5503   if ${ac_cv_search_opendir+:} false; then :
5504   break
5505 fi
5506 done
5507 if ${ac_cv_search_opendir+:} false; then :
5508
5509 else
5510   ac_cv_search_opendir=no
5511 fi
5512 rm conftest.$ac_ext
5513 LIBS=$ac_func_search_save_LIBS
5514 fi
5515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
5516 $as_echo "$ac_cv_search_opendir" >&6; }
5517 ac_res=$ac_cv_search_opendir
5518 if test "$ac_res" != no; then :
5519   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5520
5521 fi
5522
5523 else
5524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
5525 $as_echo_n "checking for library containing opendir... " >&6; }
5526 if ${ac_cv_search_opendir+:} false; then :
5527   $as_echo_n "(cached) " >&6
5528 else
5529   ac_func_search_save_LIBS=$LIBS
5530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5531 /* end confdefs.h.  */
5532
5533 /* Override any GCC internal prototype to avoid an error.
5534    Use char because int might match the return type of a GCC
5535    builtin and then its argument prototype would still apply.  */
5536 #ifdef __cplusplus
5537 extern "C"
5538 #endif
5539 char opendir ();
5540 int
5541 main ()
5542 {
5543 return opendir ();
5544   ;
5545   return 0;
5546 }
5547 _ACEOF
5548 for ac_lib in '' x; do
5549   if test -z "$ac_lib"; then
5550     ac_res="none required"
5551   else
5552     ac_res=-l$ac_lib
5553     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5554   fi
5555   if ac_fn_c_try_link "$LINENO"; then :
5556   ac_cv_search_opendir=$ac_res
5557 fi
5558 rm -f core conftest.err conftest.$ac_objext \
5559     conftest$ac_exeext
5560   if ${ac_cv_search_opendir+:} false; then :
5561   break
5562 fi
5563 done
5564 if ${ac_cv_search_opendir+:} false; then :
5565
5566 else
5567   ac_cv_search_opendir=no
5568 fi
5569 rm conftest.$ac_ext
5570 LIBS=$ac_func_search_save_LIBS
5571 fi
5572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
5573 $as_echo "$ac_cv_search_opendir" >&6; }
5574 ac_res=$ac_cv_search_opendir
5575 if test "$ac_res" != no; then :
5576   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5577
5578 fi
5579
5580 fi
5581
5582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call gettimeofday" >&5
5583 $as_echo_n "checking how to call gettimeofday... " >&6; }
5584   if ${ac_cv_gettimeofday_args+:} false; then :
5585   $as_echo_n "(cached) " >&6
5586 else
5587   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5588 /* end confdefs.h.  */
5589 #include <stdlib.h>
5590                     #include <sys/time.h>
5591 int
5592 main ()
5593 {
5594 struct timeval tv; struct timezone tzp;
5595                     gettimeofday(&tv, &tzp);
5596   ;
5597   return 0;
5598 }
5599 _ACEOF
5600 if ac_fn_c_try_compile "$LINENO"; then :
5601   ac_gettimeofday_args=2
5602 else
5603   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5604 /* end confdefs.h.  */
5605 #include <stdlib.h>
5606                                     #include <sys/time.h>
5607 int
5608 main ()
5609 {
5610 struct timeval tv; gettimeofday(&tv);
5611   ;
5612   return 0;
5613 }
5614 _ACEOF
5615 if ac_fn_c_try_compile "$LINENO"; then :
5616   ac_gettimeofday_args=1
5617 else
5618   ac_gettimeofday_args=0
5619 fi
5620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5621 fi
5622 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5623     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5624 fi
5625
5626   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5627   if test "$ac_gettimeofday_args" = 1 ; then
5628     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5629
5630     { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
5631 $as_echo "one argument" >&6; }
5632   elif test "$ac_gettimeofday_args" = 2 ; then
5633     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5634
5635     $as_echo "#define GETTIMEOFDAY_TWO_ARGS 1" >>confdefs.h
5636
5637     { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
5638 $as_echo "two arguments" >&6; }
5639   else
5640     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
5641 $as_echo "unknown" >&6; }
5642   fi
5643
5644 # Check whether --enable-largefile was given.
5645 if test "${enable_largefile+set}" = set; then :
5646   enableval=$enable_largefile;
5647 fi
5648
5649 if test "$enable_largefile" != no; then
5650
5651   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5652 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5653 if ${ac_cv_sys_largefile_CC+:} false; then :
5654   $as_echo_n "(cached) " >&6
5655 else
5656   ac_cv_sys_largefile_CC=no
5657      if test "$GCC" != yes; then
5658        ac_save_CC=$CC
5659        while :; do
5660          # IRIX 6.2 and later do not support large files by default,
5661          # so use the C compiler's -n32 option if that helps.
5662          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5663 /* end confdefs.h.  */
5664 #include <sys/types.h>
5665  /* Check that off_t can represent 2**63 - 1 correctly.
5666     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5667     since some C++ compilers masquerading as C compilers
5668     incorrectly reject 9223372036854775807.  */
5669 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5670   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5671                        && LARGE_OFF_T % 2147483647 == 1)
5672                       ? 1 : -1];
5673 int
5674 main ()
5675 {
5676
5677   ;
5678   return 0;
5679 }
5680 _ACEOF
5681          if ac_fn_c_try_compile "$LINENO"; then :
5682   break
5683 fi
5684 rm -f core conftest.err conftest.$ac_objext
5685          CC="$CC -n32"
5686          if ac_fn_c_try_compile "$LINENO"; then :
5687   ac_cv_sys_largefile_CC=' -n32'; break
5688 fi
5689 rm -f core conftest.err conftest.$ac_objext
5690          break
5691        done
5692        CC=$ac_save_CC
5693        rm -rf conftest.$ac_ext
5694     fi
5695 fi
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5697 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5698   if test "$ac_cv_sys_largefile_CC" != no; then
5699     CC=$CC$ac_cv_sys_largefile_CC
5700   fi
5701
5702   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5703 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5704 if ${ac_cv_sys_file_offset_bits+:} false; then :
5705   $as_echo_n "(cached) " >&6
5706 else
5707   while :; do
5708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5709 /* end confdefs.h.  */
5710 #include <sys/types.h>
5711  /* Check that off_t can represent 2**63 - 1 correctly.
5712     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5713     since some C++ compilers masquerading as C compilers
5714     incorrectly reject 9223372036854775807.  */
5715 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5716   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5717                        && LARGE_OFF_T % 2147483647 == 1)
5718                       ? 1 : -1];
5719 int
5720 main ()
5721 {
5722
5723   ;
5724   return 0;
5725 }
5726 _ACEOF
5727 if ac_fn_c_try_compile "$LINENO"; then :
5728   ac_cv_sys_file_offset_bits=no; break
5729 fi
5730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5731   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5732 /* end confdefs.h.  */
5733 #define _FILE_OFFSET_BITS 64
5734 #include <sys/types.h>
5735  /* Check that off_t can represent 2**63 - 1 correctly.
5736     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5737     since some C++ compilers masquerading as C compilers
5738     incorrectly reject 9223372036854775807.  */
5739 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5740   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5741                        && LARGE_OFF_T % 2147483647 == 1)
5742                       ? 1 : -1];
5743 int
5744 main ()
5745 {
5746
5747   ;
5748   return 0;
5749 }
5750 _ACEOF
5751 if ac_fn_c_try_compile "$LINENO"; then :
5752   ac_cv_sys_file_offset_bits=64; break
5753 fi
5754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5755   ac_cv_sys_file_offset_bits=unknown
5756   break
5757 done
5758 fi
5759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5760 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5761 case $ac_cv_sys_file_offset_bits in #(
5762   no | unknown) ;;
5763   *)
5764 cat >>confdefs.h <<_ACEOF
5765 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5766 _ACEOF
5767 ;;
5768 esac
5769 rm -rf conftest*
5770   if test $ac_cv_sys_file_offset_bits = unknown; then
5771     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5772 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5773 if ${ac_cv_sys_large_files+:} false; then :
5774   $as_echo_n "(cached) " >&6
5775 else
5776   while :; do
5777   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5778 /* end confdefs.h.  */
5779 #include <sys/types.h>
5780  /* Check that off_t can represent 2**63 - 1 correctly.
5781     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5782     since some C++ compilers masquerading as C compilers
5783     incorrectly reject 9223372036854775807.  */
5784 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5785   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5786                        && LARGE_OFF_T % 2147483647 == 1)
5787                       ? 1 : -1];
5788 int
5789 main ()
5790 {
5791
5792   ;
5793   return 0;
5794 }
5795 _ACEOF
5796 if ac_fn_c_try_compile "$LINENO"; then :
5797   ac_cv_sys_large_files=no; break
5798 fi
5799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5800   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5801 /* end confdefs.h.  */
5802 #define _LARGE_FILES 1
5803 #include <sys/types.h>
5804  /* Check that off_t can represent 2**63 - 1 correctly.
5805     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5806     since some C++ compilers masquerading as C compilers
5807     incorrectly reject 9223372036854775807.  */
5808 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5809   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5810                        && LARGE_OFF_T % 2147483647 == 1)
5811                       ? 1 : -1];
5812 int
5813 main ()
5814 {
5815
5816   ;
5817   return 0;
5818 }
5819 _ACEOF
5820 if ac_fn_c_try_compile "$LINENO"; then :
5821   ac_cv_sys_large_files=1; break
5822 fi
5823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5824   ac_cv_sys_large_files=unknown
5825   break
5826 done
5827 fi
5828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5829 $as_echo "$ac_cv_sys_large_files" >&6; }
5830 case $ac_cv_sys_large_files in #(
5831   no | unknown) ;;
5832   *)
5833 cat >>confdefs.h <<_ACEOF
5834 #define _LARGE_FILES $ac_cv_sys_large_files
5835 _ACEOF
5836 ;;
5837 esac
5838 rm -rf conftest*
5839   fi
5840
5841
5842 fi
5843
5844 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5845 do :
5846   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5847 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5848 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5849   cat >>confdefs.h <<_ACEOF
5850 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5851 _ACEOF
5852
5853 fi
5854 done
5855
5856 for ac_func in sigaction syslog realpath setrlimit
5857 do :
5858   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5859 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5860 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5861   cat >>confdefs.h <<_ACEOF
5862 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5863 _ACEOF
5864
5865 fi
5866 done
5867
5868 for ac_func in setlocale sqrtf
5869 do :
5870   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5871 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5872 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5873   cat >>confdefs.h <<_ACEOF
5874 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5875 _ACEOF
5876
5877 fi
5878 done
5879
5880 for ac_func in getaddrinfo
5881 do :
5882   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
5883 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
5884   cat >>confdefs.h <<_ACEOF
5885 #define HAVE_GETADDRINFO 1
5886 _ACEOF
5887
5888 fi
5889 done
5890
5891 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
5892 "
5893 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
5894
5895 cat >>confdefs.h <<_ACEOF
5896 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
5897 _ACEOF
5898
5899
5900 fi
5901
5902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmp" >&5
5903 $as_echo_n "checking for struct icmp... " >&6; }
5904 if ${ac_cv_have_icmp+:} false; then :
5905   $as_echo_n "(cached) " >&6
5906 else
5907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5908 /* end confdefs.h.  */
5909 #include <stdlib.h>
5910                    #include <stdio.h>
5911                    #include <math.h>
5912                    #include <unistd.h>
5913                    #include <limits.h>
5914                    #include <signal.h>
5915                    #include <fcntl.h>
5916                    #include <sys/types.h>
5917                    #include <sys/time.h>
5918                    #include <sys/ipc.h>
5919                    #include <sys/shm.h>
5920                    #include <sys/socket.h>
5921                    #include <netinet/in_systm.h>
5922                    #include <netinet/in.h>
5923                    #include <netinet/ip.h>
5924                    #include <netinet/ip_icmp.h>
5925                    #include <netinet/udp.h>
5926                    #include <arpa/inet.h>
5927                    #include <netdb.h>
5928 int
5929 main ()
5930 {
5931 struct icmp i;
5932                    struct sockaddr s;
5933                    struct sockaddr_in si;
5934                    struct ip ip;
5935                    i.icmp_type = ICMP_ECHO;
5936                    i.icmp_code = 0;
5937                    i.icmp_cksum = 0;
5938                    i.icmp_id = 0;
5939                    i.icmp_seq = 0;
5940                    si.sin_family = AF_INET;
5941                    #if defined(__DECC) || defined(_IP_VHL)
5942                    ip.ip_vhl = 0;
5943                    #else
5944                    ip.ip_hl = 0;
5945                    #endif
5946
5947   ;
5948   return 0;
5949 }
5950 _ACEOF
5951 if ac_fn_c_try_compile "$LINENO"; then :
5952   ac_cv_have_icmp=yes
5953 else
5954   ac_cv_have_icmp=no
5955 fi
5956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5957 fi
5958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmp" >&5
5959 $as_echo "$ac_cv_have_icmp" >&6; }
5960  if test "$ac_cv_have_icmp" = yes ; then
5961    $as_echo "#define HAVE_ICMP 1" >>confdefs.h
5962
5963  fi
5964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmphdr" >&5
5965 $as_echo_n "checking for struct icmphdr... " >&6; }
5966 if ${ac_cv_have_icmphdr+:} false; then :
5967   $as_echo_n "(cached) " >&6
5968 else
5969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5970 /* end confdefs.h.  */
5971 #include <stdlib.h>
5972                    #include <stdio.h>
5973                    #include <math.h>
5974                    #include <unistd.h>
5975                    #include <limits.h>
5976                    #include <signal.h>
5977                    #include <fcntl.h>
5978                    #include <sys/types.h>
5979                    #include <sys/time.h>
5980                    #include <sys/ipc.h>
5981                    #include <sys/shm.h>
5982                    #include <sys/socket.h>
5983                    #include <netinet/in_systm.h>
5984                    #include <netinet/in.h>
5985                    #include <netinet/ip.h>
5986                    #include <netinet/ip_icmp.h>
5987                    #include <netinet/udp.h>
5988                    #include <arpa/inet.h>
5989                    #include <netdb.h>
5990 int
5991 main ()
5992 {
5993 struct icmphdr i;
5994                    struct sockaddr s;
5995                    struct sockaddr_in si;
5996                    struct ip ip;
5997                    i.type = ICMP_ECHO;
5998                    i.code = 0;
5999                    i.checksum = 0;
6000                    i.un.echo.id = 0;
6001                    i.un.echo.sequence = 0;
6002                    si.sin_family = AF_INET;
6003                    ip.ip_hl = 0;
6004   ;
6005   return 0;
6006 }
6007 _ACEOF
6008 if ac_fn_c_try_compile "$LINENO"; then :
6009   ac_cv_have_icmphdr=yes
6010 else
6011   ac_cv_have_icmphdr=no
6012 fi
6013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6014 fi
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmphdr" >&5
6016 $as_echo "$ac_cv_have_icmphdr" >&6; }
6017  if test "$ac_cv_have_icmphdr" = yes ; then
6018    $as_echo "#define HAVE_ICMPHDR 1" >>confdefs.h
6019
6020  fi
6021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs" >&5
6022 $as_echo_n "checking for getifaddrs... " >&6; }
6023 if ${ac_cv_have_getifaddrs+:} false; then :
6024   $as_echo_n "(cached) " >&6
6025 else
6026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6027 /* end confdefs.h.  */
6028 #include <stdlib.h>
6029                    #include <unistd.h>
6030                    #include <arpa/inet.h>
6031                    #include <ifaddrs.h>
6032 int
6033 main ()
6034 {
6035 struct ifaddrs *ifa;
6036                    getifaddrs (&ifa);
6037                    ifa->ifa_next = 0;
6038                    ifa->ifa_addr->sa_family = 0;
6039   ;
6040   return 0;
6041 }
6042 _ACEOF
6043 if ac_fn_c_try_compile "$LINENO"; then :
6044   ac_cv_have_getifaddrs=yes
6045 else
6046   ac_cv_have_getifaddrs=no
6047 fi
6048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6049 fi
6050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getifaddrs" >&5
6051 $as_echo "$ac_cv_have_getifaddrs" >&6; }
6052  if test "$ac_cv_have_getifaddrs" = yes ; then
6053    $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
6054
6055  fi
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
6057 $as_echo_n "checking for socklen_t... " >&6; }
6058 if ${ac_cv_type_socklen_t+:} false; then :
6059   $as_echo_n "(cached) " >&6
6060 else
6061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6062 /* end confdefs.h.  */
6063
6064    #include <sys/types.h>
6065    #include <sys/socket.h>
6066 int
6067 main ()
6068 {
6069
6070    socklen_t socklen;
6071
6072   ;
6073   return 0;
6074 }
6075 _ACEOF
6076 if ac_fn_c_try_compile "$LINENO"; then :
6077   ac_cv_type_socklen_t=yes
6078 else
6079   ac_cv_type_socklen_t=no
6080 fi
6081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6082 fi
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_socklen_t" >&5
6084 $as_echo "$ac_cv_type_socklen_t" >&6; }
6085   if test "$ac_cv_type_socklen_t" != yes; then
6086
6087 $as_echo "#define socklen_t int" >>confdefs.h
6088
6089   fi
6090 for ac_header in crypt.h sys/select.h
6091 do :
6092   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6093 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6094 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6095   cat >>confdefs.h <<_ACEOF
6096 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6097 _ACEOF
6098
6099 fi
6100
6101 done
6102
6103 for ac_prog in perl5 perl
6104 do
6105   # Extract the first word of "$ac_prog", so it can be a program name with args.
6106 set dummy $ac_prog; ac_word=$2
6107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6108 $as_echo_n "checking for $ac_word... " >&6; }
6109 if ${ac_cv_path_PERL+:} false; then :
6110   $as_echo_n "(cached) " >&6
6111 else
6112   case $PERL in
6113   [\\/]* | ?:[\\/]*)
6114   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6115   ;;
6116   *)
6117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6118 for as_dir in $PATH
6119 do
6120   IFS=$as_save_IFS
6121   test -z "$as_dir" && as_dir=.
6122     for ac_exec_ext in '' $ac_executable_extensions; do
6123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6124     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6126     break 2
6127   fi
6128 done
6129   done
6130 IFS=$as_save_IFS
6131
6132   ;;
6133 esac
6134 fi
6135 PERL=$ac_cv_path_PERL
6136 if test -n "$PERL"; then
6137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
6138 $as_echo "$PERL" >&6; }
6139 else
6140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141 $as_echo "no" >&6; }
6142 fi
6143
6144
6145   test -n "$PERL" && break
6146 done
6147
6148   if test -z "$PERL" ; then
6149     PERL_VERSION=0
6150   else
6151     { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5
6152 $as_echo_n "checking perl version... " >&6; }
6153 if ${ac_cv_perl_version+:} false; then :
6154   $as_echo_n "(cached) " >&6
6155 else
6156   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6157 fi
6158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_perl_version" >&5
6159 $as_echo "$ac_cv_perl_version" >&6; }
6160     PERL_VERSION=$ac_cv_perl_version
6161   fi
6162
6163
6164 if test -z "$PERL" ; then
6165   # don't let it be blank...
6166   PERL=/usr/bin/perl
6167 fi
6168
6169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
6170 $as_echo_n "checking for X... " >&6; }
6171
6172
6173 # Check whether --with-x was given.
6174 if test "${with_x+set}" = set; then :
6175   withval=$with_x;
6176 fi
6177
6178 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6179 if test "x$with_x" = xno; then
6180   # The user explicitly disabled X.
6181   have_x=disabled
6182 else
6183   case $x_includes,$x_libraries in #(
6184     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
6185     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
6186   $as_echo_n "(cached) " >&6
6187 else
6188   # One or both of the vars are not set, and there is no cached value.
6189 ac_x_includes=no ac_x_libraries=no
6190 rm -f -r conftest.dir
6191 if mkdir conftest.dir; then
6192   cd conftest.dir
6193   cat >Imakefile <<'_ACEOF'
6194 incroot:
6195         @echo incroot='${INCROOT}'
6196 usrlibdir:
6197         @echo usrlibdir='${USRLIBDIR}'
6198 libdir:
6199         @echo libdir='${LIBDIR}'
6200 _ACEOF
6201   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6202     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6203     for ac_var in incroot usrlibdir libdir; do
6204       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6205     done
6206     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6207     for ac_extension in a so sl dylib la dll; do
6208       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6209          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6210         ac_im_usrlibdir=$ac_im_libdir; break
6211       fi
6212     done
6213     # Screen out bogus values from the imake configuration.  They are
6214     # bogus both because they are the default anyway, and because
6215     # using them would break gcc on systems where it needs fixed includes.
6216     case $ac_im_incroot in
6217         /usr/include) ac_x_includes= ;;
6218         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6219     esac
6220     case $ac_im_usrlibdir in
6221         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6222         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6223     esac
6224   fi
6225   cd ..
6226   rm -f -r conftest.dir
6227 fi
6228
6229 # Standard set of common directories for X headers.
6230 # Check X11 before X11Rn because it is often a symlink to the current release.
6231 ac_x_header_dirs='
6232 /usr/X11/include
6233 /usr/X11R7/include
6234 /usr/X11R6/include
6235 /usr/X11R5/include
6236 /usr/X11R4/include
6237
6238 /usr/include/X11
6239 /usr/include/X11R7
6240 /usr/include/X11R6
6241 /usr/include/X11R5
6242 /usr/include/X11R4
6243
6244 /usr/local/X11/include
6245 /usr/local/X11R7/include
6246 /usr/local/X11R6/include
6247 /usr/local/X11R5/include
6248 /usr/local/X11R4/include
6249
6250 /usr/local/include/X11
6251 /usr/local/include/X11R7
6252 /usr/local/include/X11R6
6253 /usr/local/include/X11R5
6254 /usr/local/include/X11R4
6255
6256 /usr/X386/include
6257 /usr/x386/include
6258 /usr/XFree86/include/X11
6259
6260 /usr/include
6261 /usr/local/include
6262 /usr/unsupported/include
6263 /usr/athena/include
6264 /usr/local/x11r5/include
6265 /usr/lpp/Xamples/include
6266
6267 /usr/openwin/include
6268 /usr/openwin/share/include'
6269
6270 if test "$ac_x_includes" = no; then
6271   # Guess where to find include files, by looking for Xlib.h.
6272   # First, try using that file with no special directory specified.
6273   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6274 /* end confdefs.h.  */
6275 #include <X11/Xlib.h>
6276 _ACEOF
6277 if ac_fn_c_try_cpp "$LINENO"; then :
6278   # We can compile using X headers with no special include directory.
6279 ac_x_includes=
6280 else
6281   for ac_dir in $ac_x_header_dirs; do
6282   if test -r "$ac_dir/X11/Xlib.h"; then
6283     ac_x_includes=$ac_dir
6284     break
6285   fi
6286 done
6287 fi
6288 rm -rf conftest.err conftest.i conftest.$ac_ext
6289 fi # $ac_x_includes = no
6290
6291 if test "$ac_x_libraries" = no; then
6292   # Check for the libraries.
6293   # See if we find them without any special options.
6294   # Don't add to $LIBS permanently.
6295   ac_save_LIBS=$LIBS
6296   LIBS="-lX11 $LIBS"
6297   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6298 /* end confdefs.h.  */
6299 #include <X11/Xlib.h>
6300 int
6301 main ()
6302 {
6303 XrmInitialize ()
6304   ;
6305   return 0;
6306 }
6307 _ACEOF
6308 if ac_fn_c_try_link "$LINENO"; then :
6309   LIBS=$ac_save_LIBS
6310 # We can link X programs with no special library path.
6311 ac_x_libraries=
6312 else
6313   LIBS=$ac_save_LIBS
6314 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6315 do
6316   # Don't even attempt the hair of trying to link an X program!
6317   for ac_extension in a so sl dylib la dll; do
6318     if test -r "$ac_dir/libX11.$ac_extension"; then
6319       ac_x_libraries=$ac_dir
6320       break 2
6321     fi
6322   done
6323 done
6324 fi
6325 rm -f core conftest.err conftest.$ac_objext \
6326     conftest$ac_exeext conftest.$ac_ext
6327 fi # $ac_x_libraries = no
6328
6329 case $ac_x_includes,$ac_x_libraries in #(
6330   no,* | *,no | *\'*)
6331     # Didn't find X, or a directory has "'" in its name.
6332     ac_cv_have_x="have_x=no";; #(
6333   *)
6334     # Record where we found X for the cache.
6335     ac_cv_have_x="have_x=yes\
6336         ac_x_includes='$ac_x_includes'\
6337         ac_x_libraries='$ac_x_libraries'"
6338 esac
6339 fi
6340 ;; #(
6341     *) have_x=yes;;
6342   esac
6343   eval "$ac_cv_have_x"
6344 fi # $with_x != no
6345
6346 if test "$have_x" != yes; then
6347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
6348 $as_echo "$have_x" >&6; }
6349   no_x=yes
6350 else
6351   # If each of the values was on the command line, it overrides each guess.
6352   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6353   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6354   # Update the cache value to reflect the command line values.
6355   ac_cv_have_x="have_x=yes\
6356         ac_x_includes='$x_includes'\
6357         ac_x_libraries='$x_libraries'"
6358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
6359 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
6360 fi
6361
6362 if test "$no_x" = yes; then
6363   # Not all programs may use this symbol, but it does not hurt to define it.
6364
6365 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
6366
6367   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6368 else
6369   if test -n "$x_includes"; then
6370     X_CFLAGS="$X_CFLAGS -I$x_includes"
6371   fi
6372
6373   # It would also be nice to do this for all -L options, not just this one.
6374   if test -n "$x_libraries"; then
6375     X_LIBS="$X_LIBS -L$x_libraries"
6376     # For Solaris; some versions of Sun CC require a space after -R and
6377     # others require no space.  Words are not sufficient . . . .
6378     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
6379 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
6380     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6381     ac_xsave_c_werror_flag=$ac_c_werror_flag
6382     ac_c_werror_flag=yes
6383     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6384 /* end confdefs.h.  */
6385
6386 int
6387 main ()
6388 {
6389
6390   ;
6391   return 0;
6392 }
6393 _ACEOF
6394 if ac_fn_c_try_link "$LINENO"; then :
6395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396 $as_echo "no" >&6; }
6397        X_LIBS="$X_LIBS -R$x_libraries"
6398 else
6399   LIBS="$ac_xsave_LIBS -R $x_libraries"
6400        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6401 /* end confdefs.h.  */
6402
6403 int
6404 main ()
6405 {
6406
6407   ;
6408   return 0;
6409 }
6410 _ACEOF
6411 if ac_fn_c_try_link "$LINENO"; then :
6412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6413 $as_echo "yes" >&6; }
6414           X_LIBS="$X_LIBS -R $x_libraries"
6415 else
6416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
6417 $as_echo "neither works" >&6; }
6418 fi
6419 rm -f core conftest.err conftest.$ac_objext \
6420     conftest$ac_exeext conftest.$ac_ext
6421 fi
6422 rm -f core conftest.err conftest.$ac_objext \
6423     conftest$ac_exeext conftest.$ac_ext
6424     ac_c_werror_flag=$ac_xsave_c_werror_flag
6425     LIBS=$ac_xsave_LIBS
6426   fi
6427
6428   # Check for system-dependent libraries X programs must link with.
6429   # Do this before checking for the system-independent R6 libraries
6430   # (-lICE), since we may need -lsocket or whatever for X linking.
6431
6432   if test "$ISC" = yes; then
6433     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6434   else
6435     # Martyn Johnson says this is needed for Ultrix, if the X
6436     # libraries were built with DECnet support.  And Karl Berry says
6437     # the Alpha needs dnet_stub (dnet does not exist).
6438     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6439     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6440 /* end confdefs.h.  */
6441
6442 /* Override any GCC internal prototype to avoid an error.
6443    Use char because int might match the return type of a GCC
6444    builtin and then its argument prototype would still apply.  */
6445 #ifdef __cplusplus
6446 extern "C"
6447 #endif
6448 char XOpenDisplay ();
6449 int
6450 main ()
6451 {
6452 return XOpenDisplay ();
6453   ;
6454   return 0;
6455 }
6456 _ACEOF
6457 if ac_fn_c_try_link "$LINENO"; then :
6458
6459 else
6460   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
6461 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
6462 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
6463   $as_echo_n "(cached) " >&6
6464 else
6465   ac_check_lib_save_LIBS=$LIBS
6466 LIBS="-ldnet  $LIBS"
6467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6468 /* end confdefs.h.  */
6469
6470 /* Override any GCC internal prototype to avoid an error.
6471    Use char because int might match the return type of a GCC
6472    builtin and then its argument prototype would still apply.  */
6473 #ifdef __cplusplus
6474 extern "C"
6475 #endif
6476 char dnet_ntoa ();
6477 int
6478 main ()
6479 {
6480 return dnet_ntoa ();
6481   ;
6482   return 0;
6483 }
6484 _ACEOF
6485 if ac_fn_c_try_link "$LINENO"; then :
6486   ac_cv_lib_dnet_dnet_ntoa=yes
6487 else
6488   ac_cv_lib_dnet_dnet_ntoa=no
6489 fi
6490 rm -f core conftest.err conftest.$ac_objext \
6491     conftest$ac_exeext conftest.$ac_ext
6492 LIBS=$ac_check_lib_save_LIBS
6493 fi
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6495 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6496 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
6497   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6498 fi
6499
6500     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6501       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
6502 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
6503 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
6504   $as_echo_n "(cached) " >&6
6505 else
6506   ac_check_lib_save_LIBS=$LIBS
6507 LIBS="-ldnet_stub  $LIBS"
6508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6509 /* end confdefs.h.  */
6510
6511 /* Override any GCC internal prototype to avoid an error.
6512    Use char because int might match the return type of a GCC
6513    builtin and then its argument prototype would still apply.  */
6514 #ifdef __cplusplus
6515 extern "C"
6516 #endif
6517 char dnet_ntoa ();
6518 int
6519 main ()
6520 {
6521 return dnet_ntoa ();
6522   ;
6523   return 0;
6524 }
6525 _ACEOF
6526 if ac_fn_c_try_link "$LINENO"; then :
6527   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6528 else
6529   ac_cv_lib_dnet_stub_dnet_ntoa=no
6530 fi
6531 rm -f core conftest.err conftest.$ac_objext \
6532     conftest$ac_exeext conftest.$ac_ext
6533 LIBS=$ac_check_lib_save_LIBS
6534 fi
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6536 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6537 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
6538   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6539 fi
6540
6541     fi
6542 fi
6543 rm -f core conftest.err conftest.$ac_objext \
6544     conftest$ac_exeext conftest.$ac_ext
6545     LIBS="$ac_xsave_LIBS"
6546
6547     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6548     # to get the SysV transport functions.
6549     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6550     # needs -lnsl.
6551     # The nsl library prevents programs from opening the X display
6552     # on Irix 5.2, according to T.E. Dickey.
6553     # The functions gethostbyname, getservbyname, and inet_addr are
6554     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6555     ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
6556 if test "x$ac_cv_func_gethostbyname" = xyes; then :
6557
6558 fi
6559
6560     if test $ac_cv_func_gethostbyname = no; then
6561       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
6562 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
6563 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
6564   $as_echo_n "(cached) " >&6
6565 else
6566   ac_check_lib_save_LIBS=$LIBS
6567 LIBS="-lnsl  $LIBS"
6568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6569 /* end confdefs.h.  */
6570
6571 /* Override any GCC internal prototype to avoid an error.
6572    Use char because int might match the return type of a GCC
6573    builtin and then its argument prototype would still apply.  */
6574 #ifdef __cplusplus
6575 extern "C"
6576 #endif
6577 char gethostbyname ();
6578 int
6579 main ()
6580 {
6581 return gethostbyname ();
6582   ;
6583   return 0;
6584 }
6585 _ACEOF
6586 if ac_fn_c_try_link "$LINENO"; then :
6587   ac_cv_lib_nsl_gethostbyname=yes
6588 else
6589   ac_cv_lib_nsl_gethostbyname=no
6590 fi
6591 rm -f core conftest.err conftest.$ac_objext \
6592     conftest$ac_exeext conftest.$ac_ext
6593 LIBS=$ac_check_lib_save_LIBS
6594 fi
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
6596 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
6597 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
6598   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6599 fi
6600
6601       if test $ac_cv_lib_nsl_gethostbyname = no; then
6602         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
6603 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
6604 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
6605   $as_echo_n "(cached) " >&6
6606 else
6607   ac_check_lib_save_LIBS=$LIBS
6608 LIBS="-lbsd  $LIBS"
6609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6610 /* end confdefs.h.  */
6611
6612 /* Override any GCC internal prototype to avoid an error.
6613    Use char because int might match the return type of a GCC
6614    builtin and then its argument prototype would still apply.  */
6615 #ifdef __cplusplus
6616 extern "C"
6617 #endif
6618 char gethostbyname ();
6619 int
6620 main ()
6621 {
6622 return gethostbyname ();
6623   ;
6624   return 0;
6625 }
6626 _ACEOF
6627 if ac_fn_c_try_link "$LINENO"; then :
6628   ac_cv_lib_bsd_gethostbyname=yes
6629 else
6630   ac_cv_lib_bsd_gethostbyname=no
6631 fi
6632 rm -f core conftest.err conftest.$ac_objext \
6633     conftest$ac_exeext conftest.$ac_ext
6634 LIBS=$ac_check_lib_save_LIBS
6635 fi
6636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
6637 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
6638 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
6639   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6640 fi
6641
6642       fi
6643     fi
6644
6645     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6646     # socket/setsockopt and other routines are undefined under SCO ODT
6647     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6648     # on later versions), says Simon Leinen: it contains gethostby*
6649     # variants that don't use the name server (or something).  -lsocket
6650     # must be given before -lnsl if both are needed.  We assume that
6651     # if connect needs -lnsl, so does gethostbyname.
6652     ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
6653 if test "x$ac_cv_func_connect" = xyes; then :
6654
6655 fi
6656
6657     if test $ac_cv_func_connect = no; then
6658       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
6659 $as_echo_n "checking for connect in -lsocket... " >&6; }
6660 if ${ac_cv_lib_socket_connect+:} false; then :
6661   $as_echo_n "(cached) " >&6
6662 else
6663   ac_check_lib_save_LIBS=$LIBS
6664 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6666 /* end confdefs.h.  */
6667
6668 /* Override any GCC internal prototype to avoid an error.
6669    Use char because int might match the return type of a GCC
6670    builtin and then its argument prototype would still apply.  */
6671 #ifdef __cplusplus
6672 extern "C"
6673 #endif
6674 char connect ();
6675 int
6676 main ()
6677 {
6678 return connect ();
6679   ;
6680   return 0;
6681 }
6682 _ACEOF
6683 if ac_fn_c_try_link "$LINENO"; then :
6684   ac_cv_lib_socket_connect=yes
6685 else
6686   ac_cv_lib_socket_connect=no
6687 fi
6688 rm -f core conftest.err conftest.$ac_objext \
6689     conftest$ac_exeext conftest.$ac_ext
6690 LIBS=$ac_check_lib_save_LIBS
6691 fi
6692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
6693 $as_echo "$ac_cv_lib_socket_connect" >&6; }
6694 if test "x$ac_cv_lib_socket_connect" = xyes; then :
6695   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6696 fi
6697
6698     fi
6699
6700     # Guillermo Gomez says -lposix is necessary on A/UX.
6701     ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
6702 if test "x$ac_cv_func_remove" = xyes; then :
6703
6704 fi
6705
6706     if test $ac_cv_func_remove = no; then
6707       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
6708 $as_echo_n "checking for remove in -lposix... " >&6; }
6709 if ${ac_cv_lib_posix_remove+:} false; then :
6710   $as_echo_n "(cached) " >&6
6711 else
6712   ac_check_lib_save_LIBS=$LIBS
6713 LIBS="-lposix  $LIBS"
6714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6715 /* end confdefs.h.  */
6716
6717 /* Override any GCC internal prototype to avoid an error.
6718    Use char because int might match the return type of a GCC
6719    builtin and then its argument prototype would still apply.  */
6720 #ifdef __cplusplus
6721 extern "C"
6722 #endif
6723 char remove ();
6724 int
6725 main ()
6726 {
6727 return remove ();
6728   ;
6729   return 0;
6730 }
6731 _ACEOF
6732 if ac_fn_c_try_link "$LINENO"; then :
6733   ac_cv_lib_posix_remove=yes
6734 else
6735   ac_cv_lib_posix_remove=no
6736 fi
6737 rm -f core conftest.err conftest.$ac_objext \
6738     conftest$ac_exeext conftest.$ac_ext
6739 LIBS=$ac_check_lib_save_LIBS
6740 fi
6741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
6742 $as_echo "$ac_cv_lib_posix_remove" >&6; }
6743 if test "x$ac_cv_lib_posix_remove" = xyes; then :
6744   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6745 fi
6746
6747     fi
6748
6749     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6750     ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
6751 if test "x$ac_cv_func_shmat" = xyes; then :
6752
6753 fi
6754
6755     if test $ac_cv_func_shmat = no; then
6756       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
6757 $as_echo_n "checking for shmat in -lipc... " >&6; }
6758 if ${ac_cv_lib_ipc_shmat+:} false; then :
6759   $as_echo_n "(cached) " >&6
6760 else
6761   ac_check_lib_save_LIBS=$LIBS
6762 LIBS="-lipc  $LIBS"
6763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6764 /* end confdefs.h.  */
6765
6766 /* Override any GCC internal prototype to avoid an error.
6767    Use char because int might match the return type of a GCC
6768    builtin and then its argument prototype would still apply.  */
6769 #ifdef __cplusplus
6770 extern "C"
6771 #endif
6772 char shmat ();
6773 int
6774 main ()
6775 {
6776 return shmat ();
6777   ;
6778   return 0;
6779 }
6780 _ACEOF
6781 if ac_fn_c_try_link "$LINENO"; then :
6782   ac_cv_lib_ipc_shmat=yes
6783 else
6784   ac_cv_lib_ipc_shmat=no
6785 fi
6786 rm -f core conftest.err conftest.$ac_objext \
6787     conftest$ac_exeext conftest.$ac_ext
6788 LIBS=$ac_check_lib_save_LIBS
6789 fi
6790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
6791 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
6792 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
6793   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6794 fi
6795
6796     fi
6797   fi
6798
6799   # Check for libraries that X11R6 Xt/Xaw programs need.
6800   ac_save_LDFLAGS=$LDFLAGS
6801   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6802   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6803   # check for ICE first), but we must link in the order -lSM -lICE or
6804   # we get undefined symbols.  So assume we have SM if we have ICE.
6805   # These have to be linked with before -lX11, unlike the other
6806   # libraries we check for below, so use a different variable.
6807   # John Interrante, Karl Berry
6808   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
6809 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
6810 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
6811   $as_echo_n "(cached) " >&6
6812 else
6813   ac_check_lib_save_LIBS=$LIBS
6814 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6816 /* end confdefs.h.  */
6817
6818 /* Override any GCC internal prototype to avoid an error.
6819    Use char because int might match the return type of a GCC
6820    builtin and then its argument prototype would still apply.  */
6821 #ifdef __cplusplus
6822 extern "C"
6823 #endif
6824 char IceConnectionNumber ();
6825 int
6826 main ()
6827 {
6828 return IceConnectionNumber ();
6829   ;
6830   return 0;
6831 }
6832 _ACEOF
6833 if ac_fn_c_try_link "$LINENO"; then :
6834   ac_cv_lib_ICE_IceConnectionNumber=yes
6835 else
6836   ac_cv_lib_ICE_IceConnectionNumber=no
6837 fi
6838 rm -f core conftest.err conftest.$ac_objext \
6839     conftest$ac_exeext conftest.$ac_ext
6840 LIBS=$ac_check_lib_save_LIBS
6841 fi
6842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6843 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
6844 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
6845   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6846 fi
6847
6848   LDFLAGS=$ac_save_LDFLAGS
6849
6850 fi
6851
6852
6853 if test "$have_x" != yes; then
6854   as_fn_error $? "Couldn't find X11 headers/libs.  Try \`$0 --help'." "$LINENO" 5
6855 fi
6856
6857
6858     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X app-defaults directory" >&5
6859 $as_echo_n "checking for X app-defaults directory... " >&6; }
6860 if ${ac_cv_x_app_defaults+:} false; then :
6861   $as_echo_n "(cached) " >&6
6862 else
6863   # skip this, it's always wrong these days.
6864       #  AC_PATH_X_APP_DEFAULTS_XMKMF
6865       if test x"$ac_x_app_defaults" = x; then
6866         true
6867   # Look for the directory under a standard set of common directories.
6868   # Check X11 before X11Rn because it's often a symlink to the current release.
6869   for ac_dir in                                 \
6870                                                 \
6871     /usr/share/X11/app-defaults                 \
6872                                                 \
6873     /usr/X11/lib/app-defaults                   \
6874     /usr/X11R6/lib/app-defaults                 \
6875     /usr/X11R6/lib/X11/app-defaults             \
6876     /usr/X11R5/lib/app-defaults                 \
6877     /usr/X11R5/lib/X11/app-defaults             \
6878     /usr/X11R4/lib/app-defaults                 \
6879     /usr/X11R4/lib/X11/app-defaults             \
6880                                                 \
6881     /usr/lib/X11/app-defaults                   \
6882     /usr/lib/X11R6/app-defaults                 \
6883     /usr/lib/X11R5/app-defaults                 \
6884     /usr/lib/X11R4/app-defaults                 \
6885                                                 \
6886     /etc/X11/app-defaults                       \
6887                                                 \
6888     /usr/local/X11/lib/app-defaults             \
6889     /usr/local/X11R6/lib/app-defaults           \
6890     /usr/local/X11R5/lib/app-defaults           \
6891     /usr/local/X11R4/lib/app-defaults           \
6892                                                 \
6893     /usr/local/lib/X11/app-defaults             \
6894     /usr/local/lib/X11R6/app-defaults           \
6895     /usr/local/lib/X11R6/X11/app-defaults       \
6896     /usr/local/lib/X11R5/app-defaults           \
6897     /usr/local/lib/X11R5/X11/app-defaults       \
6898     /usr/local/lib/X11R4/app-defaults           \
6899     /usr/local/lib/X11R4/X11/app-defaults       \
6900                                                 \
6901     /usr/X386/lib/X11/app-defaults              \
6902     /usr/x386/lib/X11/app-defaults              \
6903     /usr/XFree86/lib/X11/app-defaults           \
6904                                                 \
6905     /usr/lib/X11/app-defaults                   \
6906     /usr/local/lib/X11/app-defaults             \
6907     /usr/unsupported/lib/X11/app-defaults       \
6908     /usr/athena/lib/X11/app-defaults            \
6909     /usr/local/x11r5/lib/X11/app-defaults       \
6910     /usr/lpp/Xamples/lib/X11/app-defaults       \
6911     /lib/usr/lib/X11/app-defaults               \
6912                                                 \
6913     /usr/openwin/lib/app-defaults               \
6914     /usr/openwin/lib/X11/app-defaults           \
6915     /usr/openwin/share/lib/app-defaults         \
6916     /usr/openwin/share/lib/X11/app-defaults     \
6917                                                 \
6918     /X11R6/lib/app-defaults                     \
6919     /X11R5/lib/app-defaults                     \
6920     /X11R4/lib/app-defaults                     \
6921     ; \
6922   do
6923     if test -d "$ac_dir"; then
6924       ac_x_app_defaults=$ac_dir
6925       break
6926     fi
6927   done
6928
6929       fi
6930       if test x"$ac_x_app_defaults" = x; then
6931         /bin/echo -n 'fallback: '
6932         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6933       else
6934         # Record where we found app-defaults for the cache.
6935         ac_cv_x_app_defaults="$ac_x_app_defaults"
6936       fi
6937 fi
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x_app_defaults" >&5
6939 $as_echo "$ac_cv_x_app_defaults" >&6; }
6940     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6941 case "$host" in
6942     *-hpux*)
6943
6944       # The following arcana was gleaned from conversations with
6945       # Eric Schwartz <erics@col.hp.com>:
6946       #
6947       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6948       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6949       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6950       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6951       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6952       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6953       # you don't need any -I or -L arguments.
6954       #
6955       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6956       # are the same division as 10.x.  However, there are no symlinks to
6957       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6958       # arguments are always necessary.
6959       #
6960       # However, X11R6 was available on HPUX 9.x as a patch: if that
6961       # patch was installed, then all of X11R6 went in to
6962       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6963       #
6964       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6965       # whether R5 was available as a patch; R6 undoubtedly was not.)
6966       #
6967       # So.  We try and use the highest numbered pair of
6968       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6969       # that are available.  We do not mix and match different versions
6970       # of X.
6971       #
6972       # Question I still don't know the answer to: (do you?)
6973       #
6974       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6975       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6976       #     that contrib directory?  Did it contain so-called "standard"
6977       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6978       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6979       #     be a situation where one had to reach into the R5 headers and
6980       #     libs to find Xmu?  That is, must both R6 and R5 directories
6981       #     be on the -I and -L lists in that case?
6982       #
6983       for version in X11R6 X11R5 X11R4 ; do
6984         # if either pair of directories exists...
6985         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6986         then
6987            # if contrib exists, use it...
6988            if test -d /usr/contrib/$version/include ; then
6989              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6990              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6991            fi
6992            # if the "standard" one exists, use it.
6993            if test -d /usr/include/$version ; then
6994              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6995              X_LIBS="$X_LIBS -L/usr/lib/$version"
6996            fi
6997            # since at least one of the pair exists, go no farther.
6998            break
6999         fi
7000       done
7001
7002       # Now find Motif.  Thanks for not making xmkmf find this by
7003       # default, you losers.
7004       #
7005       if test -d /usr/include/Motif2.1 ; then
7006         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7007         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7008       elif test -d /usr/include/Motif1.2 ; then
7009         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7010         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7011       elif test -d /usr/include/Motif1.1 ; then
7012         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7013         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7014       fi
7015
7016       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7017       #
7018       if test -d /opt/graphics/OpenGL/include ; then
7019         # HP-UX 10.20 puts it here
7020         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7021         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7022       elif test -d /opt/Mesa/lib ; then
7023         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
7024         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
7025       fi
7026
7027
7028       if test -d /opt/xpm/lib/X11 ; then
7029         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
7030         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
7031       fi
7032
7033       # On HPUX, default to installing in /opt/xscreensaver/ instead of
7034       # in /usr/local/, unless there is already an xscreensaver in
7035       # /usr/local/bin/.  This can be overridden with the --prefix arg
7036       # to configure.  I'm not sure this is the right thing to do, but
7037       # Richard Lloyd says so...
7038       #
7039       if test \! -x /usr/local/bin/xscreensaver ; then
7040         ac_default_prefix=/opt/xscreensaver
7041       fi
7042
7043     ;;
7044     *-solaris*)
7045
7046       # Thanks for not making xmkmf find this by default, pinheads.
7047       # And thanks for moving things around again, too.  Is this
7048       # really the standard location now?  What happened to the
7049       # joke that this kind of thing went in /opt?
7050       # cthomp says "answer: CDE (Common Disorganized Environment)"
7051       #
7052       if test -f /usr/dt/include/Xm/Xm.h ; then
7053         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7054         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7055
7056         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7057         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcmp in -lgen" >&5
7058 $as_echo_n "checking for regcmp in -lgen... " >&6; }
7059 if ${ac_cv_lib_gen_regcmp+:} false; then :
7060   $as_echo_n "(cached) " >&6
7061 else
7062   ac_check_lib_save_LIBS=$LIBS
7063 LIBS="-lgen  $LIBS"
7064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7065 /* end confdefs.h.  */
7066
7067 /* Override any GCC internal prototype to avoid an error.
7068    Use char because int might match the return type of a GCC
7069    builtin and then its argument prototype would still apply.  */
7070 #ifdef __cplusplus
7071 extern "C"
7072 #endif
7073 char regcmp ();
7074 int
7075 main ()
7076 {
7077 return regcmp ();
7078   ;
7079   return 0;
7080 }
7081 _ACEOF
7082 if ac_fn_c_try_link "$LINENO"; then :
7083   ac_cv_lib_gen_regcmp=yes
7084 else
7085   ac_cv_lib_gen_regcmp=no
7086 fi
7087 rm -f core conftest.err conftest.$ac_objext \
7088     conftest$ac_exeext conftest.$ac_ext
7089 LIBS=$ac_check_lib_save_LIBS
7090 fi
7091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_regcmp" >&5
7092 $as_echo "$ac_cv_lib_gen_regcmp" >&6; }
7093 if test "x$ac_cv_lib_gen_regcmp" = xyes; then :
7094   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7095 fi
7096
7097       fi
7098
7099     ;;
7100     *-darwin*)
7101
7102       # On MacOS X (10.x with "fink"), many things are under /sw/.
7103       #
7104       if test -d /sw/include ; then
7105         X_CFLAGS="-I/sw/include $X_CFLAGS"
7106         X_LIBS="-L/sw/lib $X_LIBS"
7107       fi
7108     ;;
7109   esac
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPointer" >&5
7111 $as_echo_n "checking for XPointer... " >&6; }
7112 if ${ac_cv_xpointer+:} false; then :
7113   $as_echo_n "(cached) " >&6
7114 else
7115
7116   ac_save_CPPFLAGS="$CPPFLAGS"
7117   if test \! -z "$includedir" ; then
7118     CPPFLAGS="$CPPFLAGS -I$includedir"
7119   fi
7120   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7121   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7123 /* end confdefs.h.  */
7124 #include <X11/Xlib.h>
7125 int
7126 main ()
7127 {
7128 XPointer foo = (XPointer) 0;
7129   ;
7130   return 0;
7131 }
7132 _ACEOF
7133 if ac_fn_c_try_compile "$LINENO"; then :
7134   ac_cv_xpointer=yes
7135 else
7136   ac_cv_xpointer=no
7137 fi
7138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7139   CPPFLAGS="$ac_save_CPPFLAGS"
7140 fi
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xpointer" >&5
7142 $as_echo "$ac_cv_xpointer" >&6; }
7143   if test "$ac_cv_xpointer" != yes; then
7144    $as_echo "#define XPointer char*" >>confdefs.h
7145
7146   fi
7147
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is MacOS X" >&5
7149 $as_echo_n "checking whether this is MacOS X... " >&6; }
7150   ac_macosx=no
7151   case "$host" in
7152     *-apple-darwin* )
7153       ac_macosx=yes
7154     ;;
7155   esac
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_macosx" >&5
7157 $as_echo "$ac_macosx" >&6; }
7158
7159
7160 ###############################################################################
7161 #
7162 #       Gettext support
7163 #
7164 ###############################################################################
7165
7166
7167   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
7168 $as_echo_n "checking whether NLS is requested... " >&6; }
7169     # Check whether --enable-nls was given.
7170 if test "${enable_nls+set}" = set; then :
7171   enableval=$enable_nls; USE_NLS=$enableval
7172 else
7173   USE_NLS=yes
7174 fi
7175
7176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
7177 $as_echo "$USE_NLS" >&6; }
7178
7179
7180
7181
7182 case "$am__api_version" in
7183     1.01234)
7184         as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5
7185     ;;
7186     *)
7187     ;;
7188 esac
7189
7190 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7191 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
7192 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7193 if test -n ""; then
7194     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= " >&5
7195 $as_echo_n "checking for intltool >= ... " >&6; }
7196     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5
7197 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
7198     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
7199         as_fn_error $? "Your intltool is too old.  You need intltool  or later." "$LINENO" 5
7200 fi
7201
7202 # Extract the first word of "intltool-update", so it can be a program name with args.
7203 set dummy intltool-update; ac_word=$2
7204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7205 $as_echo_n "checking for $ac_word... " >&6; }
7206 if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then :
7207   $as_echo_n "(cached) " >&6
7208 else
7209   case $INTLTOOL_UPDATE in
7210   [\\/]* | ?:[\\/]*)
7211   ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
7212   ;;
7213   *)
7214   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7215 for as_dir in $PATH
7216 do
7217   IFS=$as_save_IFS
7218   test -z "$as_dir" && as_dir=.
7219     for ac_exec_ext in '' $ac_executable_extensions; do
7220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7221     ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
7222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7223     break 2
7224   fi
7225 done
7226   done
7227 IFS=$as_save_IFS
7228
7229   ;;
7230 esac
7231 fi
7232 INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
7233 if test -n "$INTLTOOL_UPDATE"; then
7234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5
7235 $as_echo "$INTLTOOL_UPDATE" >&6; }
7236 else
7237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7238 $as_echo "no" >&6; }
7239 fi
7240
7241
7242 # Extract the first word of "intltool-merge", so it can be a program name with args.
7243 set dummy intltool-merge; ac_word=$2
7244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7245 $as_echo_n "checking for $ac_word... " >&6; }
7246 if ${ac_cv_path_INTLTOOL_MERGE+:} false; then :
7247   $as_echo_n "(cached) " >&6
7248 else
7249   case $INTLTOOL_MERGE in
7250   [\\/]* | ?:[\\/]*)
7251   ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
7252   ;;
7253   *)
7254   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7255 for as_dir in $PATH
7256 do
7257   IFS=$as_save_IFS
7258   test -z "$as_dir" && as_dir=.
7259     for ac_exec_ext in '' $ac_executable_extensions; do
7260   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7261     ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
7262     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7263     break 2
7264   fi
7265 done
7266   done
7267 IFS=$as_save_IFS
7268
7269   ;;
7270 esac
7271 fi
7272 INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
7273 if test -n "$INTLTOOL_MERGE"; then
7274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5
7275 $as_echo "$INTLTOOL_MERGE" >&6; }
7276 else
7277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7278 $as_echo "no" >&6; }
7279 fi
7280
7281
7282 # Extract the first word of "intltool-extract", so it can be a program name with args.
7283 set dummy intltool-extract; ac_word=$2
7284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7285 $as_echo_n "checking for $ac_word... " >&6; }
7286 if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then :
7287   $as_echo_n "(cached) " >&6
7288 else
7289   case $INTLTOOL_EXTRACT in
7290   [\\/]* | ?:[\\/]*)
7291   ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
7292   ;;
7293   *)
7294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7295 for as_dir in $PATH
7296 do
7297   IFS=$as_save_IFS
7298   test -z "$as_dir" && as_dir=.
7299     for ac_exec_ext in '' $ac_executable_extensions; do
7300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7301     ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
7302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7303     break 2
7304   fi
7305 done
7306   done
7307 IFS=$as_save_IFS
7308
7309   ;;
7310 esac
7311 fi
7312 INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
7313 if test -n "$INTLTOOL_EXTRACT"; then
7314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5
7315 $as_echo "$INTLTOOL_EXTRACT" >&6; }
7316 else
7317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7318 $as_echo "no" >&6; }
7319 fi
7320
7321
7322 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
7323     as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5
7324 fi
7325
7326 if test -z "$AM_DEFAULT_VERBOSITY"; then
7327   AM_DEFAULT_VERBOSITY=1
7328 fi
7329
7330
7331 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
7332 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
7333 INTLTOOL__v_MERGE_0='@echo "  ITMRG " $@;'
7334
7335
7336
7337
7338 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
7339 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
7340 intltool__v_merge_options_0='-q'
7341
7342
7343
7344
7345   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 $< $@'
7346 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 $< $@'
7347      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 $< $@'
7348      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 $< $@'
7349       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 $< $@'
7350      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 $< $@'
7351    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 $< $@'
7352     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 $< $@'
7353 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 $< $@'
7354        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 $< $@'
7355       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 $< $@'
7356 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
7357       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 $< $@'
7358 else
7359       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'
7360 fi
7361       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 $< $@'
7362       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 $< $@'
7363     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 $< $@'
7364   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 $< $@'
7365     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 $< $@'
7366     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 $< $@'
7367    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 $< $@'
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465 # Check the gettext tools to make sure they are GNU
7466 # Extract the first word of "xgettext", so it can be a program name with args.
7467 set dummy xgettext; ac_word=$2
7468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7469 $as_echo_n "checking for $ac_word... " >&6; }
7470 if ${ac_cv_path_XGETTEXT+:} false; then :
7471   $as_echo_n "(cached) " >&6
7472 else
7473   case $XGETTEXT in
7474   [\\/]* | ?:[\\/]*)
7475   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7476   ;;
7477   *)
7478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7479 for as_dir in $PATH
7480 do
7481   IFS=$as_save_IFS
7482   test -z "$as_dir" && as_dir=.
7483     for ac_exec_ext in '' $ac_executable_extensions; do
7484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7485     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
7486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7487     break 2
7488   fi
7489 done
7490   done
7491 IFS=$as_save_IFS
7492
7493   ;;
7494 esac
7495 fi
7496 XGETTEXT=$ac_cv_path_XGETTEXT
7497 if test -n "$XGETTEXT"; then
7498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
7499 $as_echo "$XGETTEXT" >&6; }
7500 else
7501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502 $as_echo "no" >&6; }
7503 fi
7504
7505
7506 # Extract the first word of "msgmerge", so it can be a program name with args.
7507 set dummy msgmerge; ac_word=$2
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7509 $as_echo_n "checking for $ac_word... " >&6; }
7510 if ${ac_cv_path_MSGMERGE+:} false; then :
7511   $as_echo_n "(cached) " >&6
7512 else
7513   case $MSGMERGE in
7514   [\\/]* | ?:[\\/]*)
7515   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
7516   ;;
7517   *)
7518   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7519 for as_dir in $PATH
7520 do
7521   IFS=$as_save_IFS
7522   test -z "$as_dir" && as_dir=.
7523     for ac_exec_ext in '' $ac_executable_extensions; do
7524   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7525     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
7526     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7527     break 2
7528   fi
7529 done
7530   done
7531 IFS=$as_save_IFS
7532
7533   ;;
7534 esac
7535 fi
7536 MSGMERGE=$ac_cv_path_MSGMERGE
7537 if test -n "$MSGMERGE"; then
7538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
7539 $as_echo "$MSGMERGE" >&6; }
7540 else
7541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7542 $as_echo "no" >&6; }
7543 fi
7544
7545
7546 # Extract the first word of "msgfmt", so it can be a program name with args.
7547 set dummy msgfmt; ac_word=$2
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7549 $as_echo_n "checking for $ac_word... " >&6; }
7550 if ${ac_cv_path_MSGFMT+:} false; then :
7551   $as_echo_n "(cached) " >&6
7552 else
7553   case $MSGFMT in
7554   [\\/]* | ?:[\\/]*)
7555   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7556   ;;
7557   *)
7558   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7559 for as_dir in $PATH
7560 do
7561   IFS=$as_save_IFS
7562   test -z "$as_dir" && as_dir=.
7563     for ac_exec_ext in '' $ac_executable_extensions; do
7564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7565     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
7566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7567     break 2
7568   fi
7569 done
7570   done
7571 IFS=$as_save_IFS
7572
7573   ;;
7574 esac
7575 fi
7576 MSGFMT=$ac_cv_path_MSGFMT
7577 if test -n "$MSGFMT"; then
7578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
7579 $as_echo "$MSGFMT" >&6; }
7580 else
7581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7582 $as_echo "no" >&6; }
7583 fi
7584
7585
7586 # Extract the first word of "gmsgfmt", so it can be a program name with args.
7587 set dummy gmsgfmt; ac_word=$2
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7589 $as_echo_n "checking for $ac_word... " >&6; }
7590 if ${ac_cv_path_GMSGFMT+:} false; then :
7591   $as_echo_n "(cached) " >&6
7592 else
7593   case $GMSGFMT in
7594   [\\/]* | ?:[\\/]*)
7595   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7596   ;;
7597   *)
7598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7599 for as_dir in $PATH
7600 do
7601   IFS=$as_save_IFS
7602   test -z "$as_dir" && as_dir=.
7603     for ac_exec_ext in '' $ac_executable_extensions; do
7604   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7605     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7607     break 2
7608   fi
7609 done
7610   done
7611 IFS=$as_save_IFS
7612
7613   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7614   ;;
7615 esac
7616 fi
7617 GMSGFMT=$ac_cv_path_GMSGFMT
7618 if test -n "$GMSGFMT"; then
7619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
7620 $as_echo "$GMSGFMT" >&6; }
7621 else
7622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7623 $as_echo "no" >&6; }
7624 fi
7625
7626
7627 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
7628     as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
7629 fi
7630 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
7631 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
7632 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
7633 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
7634     as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
7635 fi
7636
7637 # Substitute ALL_LINGUAS so we can use it in po/Makefile
7638
7639
7640
7641
7642
7643 GETTEXT_PACKAGE=xscreensaver
7644
7645 cat >>confdefs.h <<_ACEOF
7646 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7647 _ACEOF
7648
7649
7650 cat >>confdefs.h <<_ACEOF
7651 #define PACKAGE "$GETTEXT_PACKAGE"
7652 _ACEOF
7653
7654
7655
7656 ALL_LINGUAS="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"
7657
7658    for ac_header in locale.h
7659 do :
7660   ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
7661 if test "x$ac_cv_header_locale_h" = xyes; then :
7662   cat >>confdefs.h <<_ACEOF
7663 #define HAVE_LOCALE_H 1
7664 _ACEOF
7665
7666 fi
7667
7668 done
7669
7670     if test $ac_cv_header_locale_h = yes; then
7671     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
7672 $as_echo_n "checking for LC_MESSAGES... " >&6; }
7673 if ${am_cv_val_LC_MESSAGES+:} false; then :
7674   $as_echo_n "(cached) " >&6
7675 else
7676   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7677 /* end confdefs.h.  */
7678 #include <locale.h>
7679 int
7680 main ()
7681 {
7682 return LC_MESSAGES
7683   ;
7684   return 0;
7685 }
7686 _ACEOF
7687 if ac_fn_c_try_link "$LINENO"; then :
7688   am_cv_val_LC_MESSAGES=yes
7689 else
7690   am_cv_val_LC_MESSAGES=no
7691 fi
7692 rm -f core conftest.err conftest.$ac_objext \
7693     conftest$ac_exeext conftest.$ac_ext
7694 fi
7695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
7696 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
7697     if test $am_cv_val_LC_MESSAGES = yes; then
7698
7699 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
7700
7701     fi
7702   fi
7703      USE_NLS=yes
7704
7705
7706     gt_cv_have_gettext=no
7707
7708     CATOBJEXT=NONE
7709     XGETTEXT=:
7710     INTLLIBS=
7711
7712
7713     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
7714 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
7715 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
7716   $as_echo_n "(cached) " >&6
7717 else
7718   gt_save_LIBS="$LIBS"
7719      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
7720      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7721 /* end confdefs.h.  */
7722 #include <CoreFoundation/CFPreferences.h>
7723 int
7724 main ()
7725 {
7726 CFPreferencesCopyAppValue(NULL, NULL)
7727   ;
7728   return 0;
7729 }
7730 _ACEOF
7731 if ac_fn_c_try_link "$LINENO"; then :
7732   gt_cv_func_CFPreferencesCopyAppValue=yes
7733 else
7734   gt_cv_func_CFPreferencesCopyAppValue=no
7735 fi
7736 rm -f core conftest.err conftest.$ac_objext \
7737     conftest$ac_exeext conftest.$ac_ext
7738      LIBS="$gt_save_LIBS"
7739 fi
7740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
7741 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
7742   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
7743
7744 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
7745
7746   fi
7747     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
7748 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
7749 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
7750   $as_echo_n "(cached) " >&6
7751 else
7752   gt_save_LIBS="$LIBS"
7753      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
7754      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7755 /* end confdefs.h.  */
7756 #include <CoreFoundation/CFLocale.h>
7757 int
7758 main ()
7759 {
7760 CFLocaleCopyCurrent();
7761   ;
7762   return 0;
7763 }
7764 _ACEOF
7765 if ac_fn_c_try_link "$LINENO"; then :
7766   gt_cv_func_CFLocaleCopyCurrent=yes
7767 else
7768   gt_cv_func_CFLocaleCopyCurrent=no
7769 fi
7770 rm -f core conftest.err conftest.$ac_objext \
7771     conftest$ac_exeext conftest.$ac_ext
7772      LIBS="$gt_save_LIBS"
7773 fi
7774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
7775 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
7776   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7777
7778 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
7779
7780   fi
7781   INTL_MACOSX_LIBS=
7782   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7783     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
7784   fi
7785
7786
7787
7788     ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
7789 if test "x$ac_cv_header_libintl_h" = xyes; then :
7790   gt_cv_func_dgettext_libintl="no"
7791       libintl_extra_libs=""
7792
7793       #
7794       # First check in libc
7795       #
7796       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
7797 $as_echo_n "checking for ngettext in libc... " >&6; }
7798 if ${gt_cv_func_ngettext_libc+:} false; then :
7799   $as_echo_n "(cached) " >&6
7800 else
7801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7802 /* end confdefs.h.  */
7803
7804 #include <libintl.h>
7805
7806 int
7807 main ()
7808 {
7809 return !ngettext ("","", 1)
7810   ;
7811   return 0;
7812 }
7813 _ACEOF
7814 if ac_fn_c_try_link "$LINENO"; then :
7815   gt_cv_func_ngettext_libc=yes
7816 else
7817   gt_cv_func_ngettext_libc=no
7818 fi
7819 rm -f core conftest.err conftest.$ac_objext \
7820     conftest$ac_exeext conftest.$ac_ext
7821
7822 fi
7823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
7824 $as_echo "$gt_cv_func_ngettext_libc" >&6; }
7825
7826       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7827               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
7828 $as_echo_n "checking for dgettext in libc... " >&6; }
7829 if ${gt_cv_func_dgettext_libc+:} false; then :
7830   $as_echo_n "(cached) " >&6
7831 else
7832   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7833 /* end confdefs.h.  */
7834
7835 #include <libintl.h>
7836
7837 int
7838 main ()
7839 {
7840 return !dgettext ("","")
7841   ;
7842   return 0;
7843 }
7844 _ACEOF
7845 if ac_fn_c_try_link "$LINENO"; then :
7846   gt_cv_func_dgettext_libc=yes
7847 else
7848   gt_cv_func_dgettext_libc=no
7849 fi
7850 rm -f core conftest.err conftest.$ac_objext \
7851     conftest$ac_exeext conftest.$ac_ext
7852
7853 fi
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
7855 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
7856       fi
7857
7858       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7859         for ac_func in bind_textdomain_codeset
7860 do :
7861   ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7862 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7863   cat >>confdefs.h <<_ACEOF
7864 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
7865 _ACEOF
7866
7867 fi
7868 done
7869
7870       fi
7871
7872       #
7873       # If we don't have everything we want, check in libintl
7874       #
7875       if test "$gt_cv_func_dgettext_libc" != "yes" \
7876          || test "$gt_cv_func_ngettext_libc" != "yes" \
7877          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7878
7879         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
7880 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
7881 if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
7882   $as_echo_n "(cached) " >&6
7883 else
7884   ac_check_lib_save_LIBS=$LIBS
7885 LIBS="-lintl  $LIBS"
7886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7887 /* end confdefs.h.  */
7888
7889 /* Override any GCC internal prototype to avoid an error.
7890    Use char because int might match the return type of a GCC
7891    builtin and then its argument prototype would still apply.  */
7892 #ifdef __cplusplus
7893 extern "C"
7894 #endif
7895 char bindtextdomain ();
7896 int
7897 main ()
7898 {
7899 return bindtextdomain ();
7900   ;
7901   return 0;
7902 }
7903 _ACEOF
7904 if ac_fn_c_try_link "$LINENO"; then :
7905   ac_cv_lib_intl_bindtextdomain=yes
7906 else
7907   ac_cv_lib_intl_bindtextdomain=no
7908 fi
7909 rm -f core conftest.err conftest.$ac_objext \
7910     conftest$ac_exeext conftest.$ac_ext
7911 LIBS=$ac_check_lib_save_LIBS
7912 fi
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
7914 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
7915 if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
7916   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
7917 $as_echo_n "checking for ngettext in -lintl... " >&6; }
7918 if ${ac_cv_lib_intl_ngettext+:} false; then :
7919   $as_echo_n "(cached) " >&6
7920 else
7921   ac_check_lib_save_LIBS=$LIBS
7922 LIBS="-lintl  $LIBS"
7923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7924 /* end confdefs.h.  */
7925
7926 /* Override any GCC internal prototype to avoid an error.
7927    Use char because int might match the return type of a GCC
7928    builtin and then its argument prototype would still apply.  */
7929 #ifdef __cplusplus
7930 extern "C"
7931 #endif
7932 char ngettext ();
7933 int
7934 main ()
7935 {
7936 return ngettext ();
7937   ;
7938   return 0;
7939 }
7940 _ACEOF
7941 if ac_fn_c_try_link "$LINENO"; then :
7942   ac_cv_lib_intl_ngettext=yes
7943 else
7944   ac_cv_lib_intl_ngettext=no
7945 fi
7946 rm -f core conftest.err conftest.$ac_objext \
7947     conftest$ac_exeext conftest.$ac_ext
7948 LIBS=$ac_check_lib_save_LIBS
7949 fi
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
7951 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
7952 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
7953   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
7954 $as_echo_n "checking for dgettext in -lintl... " >&6; }
7955 if ${ac_cv_lib_intl_dgettext+:} false; then :
7956   $as_echo_n "(cached) " >&6
7957 else
7958   ac_check_lib_save_LIBS=$LIBS
7959 LIBS="-lintl  $LIBS"
7960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7961 /* end confdefs.h.  */
7962
7963 /* Override any GCC internal prototype to avoid an error.
7964    Use char because int might match the return type of a GCC
7965    builtin and then its argument prototype would still apply.  */
7966 #ifdef __cplusplus
7967 extern "C"
7968 #endif
7969 char dgettext ();
7970 int
7971 main ()
7972 {
7973 return dgettext ();
7974   ;
7975   return 0;
7976 }
7977 _ACEOF
7978 if ac_fn_c_try_link "$LINENO"; then :
7979   ac_cv_lib_intl_dgettext=yes
7980 else
7981   ac_cv_lib_intl_dgettext=no
7982 fi
7983 rm -f core conftest.err conftest.$ac_objext \
7984     conftest$ac_exeext conftest.$ac_ext
7985 LIBS=$ac_check_lib_save_LIBS
7986 fi
7987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
7988 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
7989 if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
7990   gt_cv_func_dgettext_libintl=yes
7991 fi
7992
7993 fi
7994
7995 fi
7996
7997
7998         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7999           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
8000 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
8001           { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
8002 $as_echo "" >&6; }
8003           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
8004 $as_echo_n "checking for ngettext in -lintl... " >&6; }
8005 if ${ac_cv_lib_intl_ngettext+:} false; then :
8006   $as_echo_n "(cached) " >&6
8007 else
8008   ac_check_lib_save_LIBS=$LIBS
8009 LIBS="-lintl -liconv $LIBS"
8010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8011 /* end confdefs.h.  */
8012
8013 /* Override any GCC internal prototype to avoid an error.
8014    Use char because int might match the return type of a GCC
8015    builtin and then its argument prototype would still apply.  */
8016 #ifdef __cplusplus
8017 extern "C"
8018 #endif
8019 char ngettext ();
8020 int
8021 main ()
8022 {
8023 return ngettext ();
8024   ;
8025   return 0;
8026 }
8027 _ACEOF
8028 if ac_fn_c_try_link "$LINENO"; then :
8029   ac_cv_lib_intl_ngettext=yes
8030 else
8031   ac_cv_lib_intl_ngettext=no
8032 fi
8033 rm -f core conftest.err conftest.$ac_objext \
8034     conftest$ac_exeext conftest.$ac_ext
8035 LIBS=$ac_check_lib_save_LIBS
8036 fi
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
8038 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
8039 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
8040   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
8041 $as_echo_n "checking for dcgettext in -lintl... " >&6; }
8042 if ${ac_cv_lib_intl_dcgettext+:} false; then :
8043   $as_echo_n "(cached) " >&6
8044 else
8045   ac_check_lib_save_LIBS=$LIBS
8046 LIBS="-lintl -liconv $LIBS"
8047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8048 /* end confdefs.h.  */
8049
8050 /* Override any GCC internal prototype to avoid an error.
8051    Use char because int might match the return type of a GCC
8052    builtin and then its argument prototype would still apply.  */
8053 #ifdef __cplusplus
8054 extern "C"
8055 #endif
8056 char dcgettext ();
8057 int
8058 main ()
8059 {
8060 return dcgettext ();
8061   ;
8062   return 0;
8063 }
8064 _ACEOF
8065 if ac_fn_c_try_link "$LINENO"; then :
8066   ac_cv_lib_intl_dcgettext=yes
8067 else
8068   ac_cv_lib_intl_dcgettext=no
8069 fi
8070 rm -f core conftest.err conftest.$ac_objext \
8071     conftest$ac_exeext conftest.$ac_ext
8072 LIBS=$ac_check_lib_save_LIBS
8073 fi
8074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
8075 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
8076 if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
8077   gt_cv_func_dgettext_libintl=yes
8078                         libintl_extra_libs=-liconv
8079 else
8080   :
8081 fi
8082
8083 else
8084   :
8085 fi
8086
8087         fi
8088
8089         #
8090         # If we found libintl, then check in it for bind_textdomain_codeset();
8091         # we'll prefer libc if neither have bind_textdomain_codeset(),
8092         # and both have dgettext and ngettext
8093         #
8094         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
8095           glib_save_LIBS="$LIBS"
8096           LIBS="$LIBS -lintl $libintl_extra_libs"
8097           unset ac_cv_func_bind_textdomain_codeset
8098           for ac_func in bind_textdomain_codeset
8099 do :
8100   ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
8101 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
8102   cat >>confdefs.h <<_ACEOF
8103 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
8104 _ACEOF
8105
8106 fi
8107 done
8108
8109           LIBS="$glib_save_LIBS"
8110
8111           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
8112             gt_cv_func_dgettext_libc=no
8113           else
8114             if test "$gt_cv_func_dgettext_libc" = "yes" \
8115                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
8116               gt_cv_func_dgettext_libintl=no
8117             fi
8118           fi
8119         fi
8120       fi
8121
8122       if test "$gt_cv_func_dgettext_libc" = "yes" \
8123         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
8124         gt_cv_have_gettext=yes
8125       fi
8126
8127       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
8128         INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS"
8129       fi
8130
8131       if test "$gt_cv_have_gettext" = "yes"; then
8132
8133 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
8134
8135         # Extract the first word of "msgfmt", so it can be a program name with args.
8136 set dummy msgfmt; ac_word=$2
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8138 $as_echo_n "checking for $ac_word... " >&6; }
8139 if ${ac_cv_path_MSGFMT+:} false; then :
8140   $as_echo_n "(cached) " >&6
8141 else
8142   case "$MSGFMT" in
8143   /*)
8144   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8145   ;;
8146   *)
8147   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8148   for ac_dir in $PATH; do
8149     test -z "$ac_dir" && ac_dir=.
8150     if test -f $ac_dir/$ac_word; then
8151       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
8152         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
8153         break
8154       fi
8155     fi
8156   done
8157   IFS="$ac_save_ifs"
8158   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
8159   ;;
8160 esac
8161 fi
8162 MSGFMT="$ac_cv_path_MSGFMT"
8163 if test "$MSGFMT" != "no"; then
8164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
8165 $as_echo "$MSGFMT" >&6; }
8166 else
8167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8168 $as_echo "no" >&6; }
8169 fi
8170         if test "$MSGFMT" != "no"; then
8171           glib_save_LIBS="$LIBS"
8172           LIBS="$LIBS $INTLLIBS"
8173           for ac_func in dcgettext
8174 do :
8175   ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
8176 if test "x$ac_cv_func_dcgettext" = xyes; then :
8177   cat >>confdefs.h <<_ACEOF
8178 #define HAVE_DCGETTEXT 1
8179 _ACEOF
8180
8181 fi
8182 done
8183
8184           MSGFMT_OPTS=
8185           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
8186 $as_echo_n "checking if msgfmt accepts -c... " >&6; }
8187           cat >conftest.foo <<_ACEOF
8188
8189 msgid ""
8190 msgstr ""
8191 "Content-Type: text/plain; charset=UTF-8\n"
8192 "Project-Id-Version: test 1.0\n"
8193 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
8194 "Last-Translator: test <foo@bar.xx>\n"
8195 "Language-Team: C <LL@li.org>\n"
8196 "MIME-Version: 1.0\n"
8197 "Content-Transfer-Encoding: 8bit\n"
8198
8199 _ACEOF
8200 if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
8201   ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
8202   ac_status=$?
8203   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8204   test $ac_status = 0; }; then
8205   MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8206 $as_echo "yes" >&6; }
8207 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8208 $as_echo "no" >&6; }
8209 echo "$as_me: failed input was:" >&5
8210 sed 's/^/| /' conftest.foo >&5
8211 fi
8212
8213           # Extract the first word of "gmsgfmt", so it can be a program name with args.
8214 set dummy gmsgfmt; ac_word=$2
8215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216 $as_echo_n "checking for $ac_word... " >&6; }
8217 if ${ac_cv_path_GMSGFMT+:} false; then :
8218   $as_echo_n "(cached) " >&6
8219 else
8220   case $GMSGFMT in
8221   [\\/]* | ?:[\\/]*)
8222   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8223   ;;
8224   *)
8225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8226 for as_dir in $PATH
8227 do
8228   IFS=$as_save_IFS
8229   test -z "$as_dir" && as_dir=.
8230     for ac_exec_ext in '' $ac_executable_extensions; do
8231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8232     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8234     break 2
8235   fi
8236 done
8237   done
8238 IFS=$as_save_IFS
8239
8240   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8241   ;;
8242 esac
8243 fi
8244 GMSGFMT=$ac_cv_path_GMSGFMT
8245 if test -n "$GMSGFMT"; then
8246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
8247 $as_echo "$GMSGFMT" >&6; }
8248 else
8249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8250 $as_echo "no" >&6; }
8251 fi
8252
8253
8254           # Extract the first word of "xgettext", so it can be a program name with args.
8255 set dummy xgettext; ac_word=$2
8256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8257 $as_echo_n "checking for $ac_word... " >&6; }
8258 if ${ac_cv_path_XGETTEXT+:} false; then :
8259   $as_echo_n "(cached) " >&6
8260 else
8261   case "$XGETTEXT" in
8262   /*)
8263   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8264   ;;
8265   *)
8266   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8267   for ac_dir in $PATH; do
8268     test -z "$ac_dir" && ac_dir=.
8269     if test -f $ac_dir/$ac_word; then
8270       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8271         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8272         break
8273       fi
8274     fi
8275   done
8276   IFS="$ac_save_ifs"
8277   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8278   ;;
8279 esac
8280 fi
8281 XGETTEXT="$ac_cv_path_XGETTEXT"
8282 if test "$XGETTEXT" != ":"; then
8283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
8284 $as_echo "$XGETTEXT" >&6; }
8285 else
8286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8287 $as_echo "no" >&6; }
8288 fi
8289
8290           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8291 /* end confdefs.h.  */
8292
8293 int
8294 main ()
8295 {
8296 extern int _nl_msg_cat_cntr;
8297                          return _nl_msg_cat_cntr
8298   ;
8299   return 0;
8300 }
8301 _ACEOF
8302 if ac_fn_c_try_link "$LINENO"; then :
8303   CATOBJEXT=.gmo
8304              DATADIRNAME=share
8305 else
8306   case $host in
8307             *-*-solaris*)
8308                                                                 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
8309 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
8310   CATOBJEXT=.gmo
8311                DATADIRNAME=share
8312 else
8313   CATOBJEXT=.mo
8314                DATADIRNAME=lib
8315 fi
8316
8317             ;;
8318             *-*-openbsd*)
8319             CATOBJEXT=.mo
8320             DATADIRNAME=share
8321             ;;
8322             *)
8323             CATOBJEXT=.mo
8324             DATADIRNAME=lib
8325             ;;
8326             esac
8327 fi
8328 rm -f core conftest.err conftest.$ac_objext \
8329     conftest$ac_exeext conftest.$ac_ext
8330           LIBS="$glib_save_LIBS"
8331           INSTOBJEXT=.mo
8332         else
8333           gt_cv_have_gettext=no
8334         fi
8335       fi
8336
8337 fi
8338
8339
8340
8341     if test "$gt_cv_have_gettext" = "yes" ; then
8342
8343 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
8344
8345     fi
8346
8347         if test "$XGETTEXT" != ":"; then
8348                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8349         : ;
8350       else
8351         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
8352 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
8353         XGETTEXT=":"
8354       fi
8355     fi
8356
8357     # We need to process the po/ directory.
8358     POSUB=po
8359
8360     ac_config_commands="$ac_config_commands default-1"
8361
8362
8363                 for lang in $ALL_LINGUAS; do
8364       GMOFILES="$GMOFILES $lang.gmo"
8365       POFILES="$POFILES $lang.po"
8366     done
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380    if test "$gt_cv_have_gettext" = "yes"; then
8381      if test "x$ALL_LINGUAS" = "x"; then
8382        LINGUAS=
8383      else
8384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
8385 $as_echo_n "checking for catalogs to be installed... " >&6; }
8386        NEW_LINGUAS=
8387        for presentlang in $ALL_LINGUAS; do
8388          useit=no
8389          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
8390            desiredlanguages="$LINGUAS"
8391          else
8392            desiredlanguages="$ALL_LINGUAS"
8393          fi
8394          for desiredlang in $desiredlanguages; do
8395            # Use the presentlang catalog if desiredlang is
8396            #   a. equal to presentlang, or
8397            #   b. a variant of presentlang (because in this case,
8398            #      presentlang can be used as a fallback for messages
8399            #      which are not translated in the desiredlang catalog).
8400            case "$desiredlang" in
8401              "$presentlang"*) useit=yes;;
8402            esac
8403          done
8404          if test $useit = yes; then
8405            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8406          fi
8407        done
8408        LINGUAS=$NEW_LINGUAS
8409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
8410 $as_echo "$LINGUAS" >&6; }
8411      fi
8412
8413           if test -n "$LINGUAS"; then
8414        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8415      fi
8416    fi
8417
8418             MKINSTALLDIRS=
8419    if test -n "$ac_aux_dir"; then
8420      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8421    fi
8422    if test -z "$MKINSTALLDIRS"; then
8423      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8424    fi
8425
8426
8427          test -d po || mkdir po
8428    if test "x$srcdir" != "x."; then
8429      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8430        posrcprefix="$srcdir/"
8431      else
8432        posrcprefix="../$srcdir/"
8433      fi
8434    else
8435      posrcprefix="../"
8436    fi
8437    rm -f po/POTFILES
8438    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8439         < $srcdir/po/POTFILES.in > po/POTFILES
8440
8441 MKINSTALLDIRS="$INSTALL_DIRS"
8442
8443
8444 ###############################################################################
8445 #
8446 #       Check for -lXmu (some fucked up vendors don't ship it...)
8447 #
8448 ###############################################################################
8449
8450 have_xmu=no
8451
8452   ac_save_CPPFLAGS="$CPPFLAGS"
8453   if test \! -z "$includedir" ; then
8454     CPPFLAGS="$CPPFLAGS -I$includedir"
8455   fi
8456   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8457   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8458   ac_fn_c_check_header_compile "$LINENO" "X11/Xmu/Error.h" "ac_cv_header_X11_Xmu_Error_h" "#include <stdlib.h>
8459                    #include <stdio.h>
8460                    #include <X11/Intrinsic.h>
8461 "
8462 if test "x$ac_cv_header_X11_Xmu_Error_h" = xyes; then :
8463   have_xmu=yes
8464 fi
8465
8466
8467   CPPFLAGS="$ac_save_CPPFLAGS"
8468 if test "$have_xmu" = no ; then
8469   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8470   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8471   XMU_LIBS=''
8472 else
8473   XMU_SRCS=''
8474   XMU_OBJS=''
8475   XMU_LIBS='-lXmu'
8476   $as_echo "#define HAVE_XMU 1" >>confdefs.h
8477
8478 fi
8479
8480
8481 ###############################################################################
8482 #
8483 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8484 #       See comp.windows.x FAQ question 124.  The right fix is to
8485 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8486 #
8487 ###############################################################################
8488
8489 if test "$have_xmu" = yes ; then
8490   case "$host" in
8491     *-sunos4*)
8492     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8493 $as_echo_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... " >&6; }
8494 if ${ac_cv_sunos_xmu_bug+:} false; then :
8495   $as_echo_n "(cached) " >&6
8496 else
8497   ac_save_LDFLAGS="$LDFLAGS"
8498                     if test \! -z "$x_libraries" ; then
8499                       LDFLAGS="$LDFLAGS -L$x_libraries"
8500                     fi
8501                     # Note: this trick never works!  (Generally.)
8502                     # We're only getting away with using AC_TRY_LINK
8503                     # with X libraries because we know it's SunOS.
8504                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8505                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8506 /* end confdefs.h.  */
8507
8508 int
8509 main ()
8510 {
8511
8512   ;
8513   return 0;
8514 }
8515 _ACEOF
8516 if ac_fn_c_try_link "$LINENO"; then :
8517   ac_cv_sunos_xmu_bug=no
8518 else
8519   ac_cv_sunos_xmu_bug=yes
8520 fi
8521 rm -f core conftest.err conftest.$ac_objext \
8522     conftest$ac_exeext conftest.$ac_ext
8523                     LDFLAGS="$ac_save_LDFLAGS"
8524 fi
8525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sunos_xmu_bug" >&5
8526 $as_echo "$ac_cv_sunos_xmu_bug" >&6; }
8527     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8528       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler understands -static" >&5
8529 $as_echo_n "checking whether the compiler understands -static... " >&6; }
8530 if ${ac_cv_ld_static+:} false; then :
8531   $as_echo_n "(cached) " >&6
8532 else
8533   ac_save_LDFLAGS="$LDFLAGS"
8534                       LDFLAGS="$LDFLAGS -static"
8535                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8536 /* end confdefs.h.  */
8537
8538 int
8539 main ()
8540 {
8541
8542   ;
8543   return 0;
8544 }
8545 _ACEOF
8546 if ac_fn_c_try_link "$LINENO"; then :
8547   ac_cv_ld_static=yes
8548 else
8549   ac_cv_ld_static=no
8550 fi
8551 rm -f core conftest.err conftest.$ac_objext \
8552     conftest$ac_exeext conftest.$ac_ext
8553                     LDFLAGS="$ac_save_LDFLAGS"
8554 fi
8555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ld_static" >&5
8556 $as_echo "$ac_cv_ld_static" >&6; }
8557       if test "$ac_cv_ld_static" = yes ; then
8558         LDFLAGS="$LDFLAGS -static"
8559       else
8560         LDFLAGS="$LDFLAGS -Bstatic"
8561       fi
8562     fi
8563     ;;
8564   esac
8565 fi
8566
8567
8568 ###############################################################################
8569 #
8570 #       Handle the --with-hackdir option
8571 #
8572 ###############################################################################
8573
8574 have_hackdir=yes
8575 with_hackdir_req=unspecified
8576
8577 # Check whether --with-hackdir was given.
8578 if test "${with_hackdir+set}" = set; then :
8579   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
8580 else
8581   with_hackdir=yes
8582 fi
8583
8584
8585 if test x"$with_hackdir" = xyes; then
8586   HACKDIR='${libexecdir}/xscreensaver'
8587 elif test x"$with_hackdir" = xno; then
8588   HACKDIR='${bindir}'
8589 else
8590   HACKDIR=$with_hackdir
8591 fi
8592
8593 # canonicalize slashes.
8594 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8595
8596 # Expand HACKDIR as HACKDIR_FULL
8597 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
8598
8599 # This option used to be called --enable-subdir; make sure that is no longer
8600 # used, since configure brain-damagedly ignores unknown --enable options.
8601
8602 obsolete_enable=
8603 # Check whether --enable-subdir was given.
8604 if test "${enable_subdir+set}" = set; then :
8605   enableval=$enable_subdir; obsolete_enable=yes
8606 fi
8607
8608 if test -n "$obsolete_enable"; then
8609   echo "error: the --enable-subdir option has been replaced with"
8610   echo "       the new --with-hackdir option; see \`configure --help'"
8611   echo "       for more information."
8612   exit 1
8613 fi
8614
8615
8616 ###############################################################################
8617 #
8618 #       Handle the --with-configdir option
8619 #       Help for --with-x-app-defaults option added.
8620 #
8621 ###############################################################################
8622
8623 have_configdir=yes
8624 with_configdir_req=unspecified
8625
8626 # Check whether --with-configdir was given.
8627 if test "${with_configdir+set}" = set; then :
8628   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
8629 else
8630   with_configdir=yes
8631 fi
8632
8633
8634 if test x"$with_configdir" = xyes; then
8635   HACK_CONF_DIR='${datadir}/xscreensaver/config'
8636 elif test x"$with_configdir" = xno; then
8637   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8638   exit 1
8639 else
8640   # there must be a better way than this...
8641   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8642     # absolute path
8643     HACK_CONF_DIR=$with_configdir
8644   else
8645     # relative path
8646     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8647   fi
8648 fi
8649
8650
8651
8652
8653 ###############################################################################
8654 #
8655 #       Check for the SGI SCREEN_SAVER server extension.
8656 #
8657 ###############################################################################
8658
8659 #have_sgi=no
8660 #with_sgi_req=unspecified
8661 #AC_ARG_WITH(sgi-ext,
8662 #[Except where noted, all of the --with options below can also take a
8663 #directory argument: for example, `--with-motif=/opt/Motif'.  That would
8664 #cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
8665 #to be added to the -L list, assuming those directories exist.
8666 #
8667 #By default, support for each of these options will be built in, if the
8668 #relevant library routines exist.  At run time, they will then be used
8669 #only if the X server being used supports them.  Each --with option has
8670 #a corresponding --without option, to override building support for them
8671 #at all.
8672 #
8673 #Screen blanking and idle-detection options:
8674 #
8675 #  --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.],
8676 #  [with_sgi="$withval"; with_sgi_req="$withval"],[with_sgi=yes])
8677 #
8678 #HANDLE_X_PATH_ARG(with_sgi, --with-sgi-ext, SGI SCREEN_SAVER)
8679 #
8680 #if test "$with_sgi" = yes; then
8681 #  AC_CHECK_X_HEADER(X11/extensions/XScreenSaver.h,
8682 #                    [have_sgi=yes
8683 #                     AC_DEFINE(HAVE_SGI_SAVER_EXTENSION)],,
8684 #                    [#include <X11/Xlib.h>])
8685 #
8686 #elif test "$with_sgi" != no; then
8687 #  echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8688 #  exit 1
8689 #fi
8690
8691
8692 ###############################################################################
8693 #
8694 #       Check for the XIDLE server extension.
8695 #
8696 ###############################################################################
8697
8698 #have_xidle=no
8699 #with_xidle_req=unspecified
8700 #AC_ARG_WITH(xidle-ext,
8701 #[  --with-xidle-ext        Include support for the XIDLE extension.],
8702 #  [with_xidle="$withval"; with_xidle_req="$withval"],[with_xidle=yes])
8703 #
8704 #HANDLE_X_PATH_ARG(with_xidle, --with-xidle-ext, XIDLE)
8705 #
8706 #if test "$with_xidle" = yes; then
8707 #  AC_CHECK_X_HEADER(X11/extensions/xidle.h,
8708 #                    [have_xidle=yes
8709 #                     AC_DEFINE(HAVE_XIDLE_EXTENSION)],,
8710 #                    [#include <X11/Xlib.h>])
8711 #elif test "$with_xidle" != no; then
8712 #  echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
8713 #  exit 1
8714 #fi
8715
8716
8717 ###############################################################################
8718 #
8719 #       Check for the SGI-VIDEO-CONTROL server extension.
8720 #
8721 ###############################################################################
8722
8723 #have_sgivc=no
8724 #with_sgivc_req=unspecified
8725 #AC_ARG_WITH(sgivc-ext,
8726 #[  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.],
8727 #  [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
8728 #
8729 #HANDLE_X_PATH_ARG(with_sgivc, --with-sgivc-ext, SGI-VIDEO-CONTROL)
8730 #
8731 #if test "$with_sgivc" = yes; then
8732 #
8733 #  # first check for XSGIvc.h
8734 #  AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes],,
8735 #                    [#include <X11/Xlib.h>])
8736 #
8737 #  # if that succeeded, then check for the -lXsgivc
8738 #  if test "$have_sgivc" = yes; then
8739 #    have_sgivc=no
8740 #    AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
8741 #                  [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [true],
8742 #                  -lXext -lX11)
8743 #  fi
8744 #
8745 #  # if that succeeded, then we've really got it.
8746 #  if test "$have_sgivc" = yes; then
8747 #    AC_DEFINE(HAVE_SGI_VC_EXTENSION)
8748 #  fi
8749 #
8750 #elif test "$with_sgivc" != no; then
8751 #  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
8752 #  exit 1
8753 #fi
8754
8755
8756 ###############################################################################
8757 #
8758 #       Check for the DPMS server extension.
8759 #
8760 ###############################################################################
8761
8762 have_dpms=no
8763 with_dpms_req=unspecified
8764
8765 # Check whether --with-dpms-ext was given.
8766 if test "${with_dpms_ext+set}" = set; then :
8767   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
8768 else
8769   with_dpms=yes
8770 fi
8771
8772
8773
8774    case "$with_dpms" in
8775     yes) ;;
8776     no)  ;;
8777
8778     /*)
8779      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS headers" >&5
8780 $as_echo_n "checking for DPMS headers... " >&6; }
8781      d=$with_dpms/include
8782      if test -d $d; then
8783        X_CFLAGS="-I$d $X_CFLAGS"
8784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8785 $as_echo "$d" >&6; }
8786      else
8787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8788 $as_echo "not found ($d: no such directory)" >&6; }
8789      fi
8790
8791      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS libs" >&5
8792 $as_echo_n "checking for DPMS libs... " >&6; }
8793      d=$with_dpms/lib
8794      if test -d $d; then
8795        X_LIBS="-L$d $X_LIBS"
8796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8797 $as_echo "$d" >&6; }
8798      else
8799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8800 $as_echo "not found ($d: no such directory)" >&6; }
8801      fi
8802
8803      # replace the directory string with "yes".
8804      with_dpms_req="yes"
8805      with_dpms=$with_dpms_req
8806      ;;
8807
8808     *)
8809      echo ""
8810      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
8811      echo "       If it is a directory, then \`DIR/include' will be added to"
8812      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8813      exit 1
8814      ;;
8815    esac
8816
8817
8818 if test "$with_dpms" = yes; then
8819
8820   # first check for dpms.h
8821
8822   ac_save_CPPFLAGS="$CPPFLAGS"
8823   if test \! -z "$includedir" ; then
8824     CPPFLAGS="$CPPFLAGS -I$includedir"
8825   fi
8826   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8827   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8828   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/dpms.h" "ac_cv_header_X11_extensions_dpms_h" "#include <X11/Xlib.h>
8829                      #include <X11/Xmd.h>
8830 "
8831 if test "x$ac_cv_header_X11_extensions_dpms_h" = xyes; then :
8832   have_dpms=yes
8833 fi
8834
8835
8836   CPPFLAGS="$ac_save_CPPFLAGS"
8837
8838   # if that succeeded, then check for the DPMS code in the libraries
8839   if test "$have_dpms" = yes; then
8840
8841     # first look in -lXext (this is where it is with XFree86 4.0)
8842     have_dpms=no
8843
8844   ac_save_CPPFLAGS="$CPPFLAGS"
8845   ac_save_LDFLAGS="$LDFLAGS"
8846 #  ac_save_LIBS="$LIBS"
8847
8848   if test \! -z "$includedir" ; then
8849     CPPFLAGS="$CPPFLAGS -I$includedir"
8850   fi
8851   # note: $X_CFLAGS includes $x_includes
8852   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8853
8854   if test \! -z "$libdir" ; then
8855     LDFLAGS="$LDFLAGS -L$libdir"
8856   fi
8857   # note: $X_LIBS includes $x_libraries
8858   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8859
8860   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8861   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8862   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXext" >&5
8863 $as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
8864 if ${ac_cv_lib_Xext_DPMSInfo+:} false; then :
8865   $as_echo_n "(cached) " >&6
8866 else
8867   ac_check_lib_save_LIBS=$LIBS
8868 LIBS="-lXext -lXext -lX11 $LIBS"
8869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8870 /* end confdefs.h.  */
8871
8872 /* Override any GCC internal prototype to avoid an error.
8873    Use char because int might match the return type of a GCC
8874    builtin and then its argument prototype would still apply.  */
8875 #ifdef __cplusplus
8876 extern "C"
8877 #endif
8878 char DPMSInfo ();
8879 int
8880 main ()
8881 {
8882 return DPMSInfo ();
8883   ;
8884   return 0;
8885 }
8886 _ACEOF
8887 if ac_fn_c_try_link "$LINENO"; then :
8888   ac_cv_lib_Xext_DPMSInfo=yes
8889 else
8890   ac_cv_lib_Xext_DPMSInfo=no
8891 fi
8892 rm -f core conftest.err conftest.$ac_objext \
8893     conftest$ac_exeext conftest.$ac_ext
8894 LIBS=$ac_check_lib_save_LIBS
8895 fi
8896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_DPMSInfo" >&5
8897 $as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
8898 if test "x$ac_cv_lib_Xext_DPMSInfo" = xyes; then :
8899   have_dpms=yes
8900 else
8901   true
8902 fi
8903
8904   CPPFLAGS="$ac_save_CPPFLAGS"
8905   LDFLAGS="$ac_save_LDFLAGS"
8906 #  LIBS="$ac_save_LIBS"
8907
8908
8909     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
8910     if test "$have_dpms" = no; then
8911
8912   ac_save_CPPFLAGS="$CPPFLAGS"
8913   ac_save_LDFLAGS="$LDFLAGS"
8914 #  ac_save_LIBS="$LIBS"
8915
8916   if test \! -z "$includedir" ; then
8917     CPPFLAGS="$CPPFLAGS -I$includedir"
8918   fi
8919   # note: $X_CFLAGS includes $x_includes
8920   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8921
8922   if test \! -z "$libdir" ; then
8923     LDFLAGS="$LDFLAGS -L$libdir"
8924   fi
8925   # note: $X_LIBS includes $x_libraries
8926   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8927
8928   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8929   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8930   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXdpms" >&5
8931 $as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
8932 if ${ac_cv_lib_Xdpms_DPMSInfo+:} false; then :
8933   $as_echo_n "(cached) " >&6
8934 else
8935   ac_check_lib_save_LIBS=$LIBS
8936 LIBS="-lXdpms -lXext -lX11 $LIBS"
8937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8938 /* end confdefs.h.  */
8939
8940 /* Override any GCC internal prototype to avoid an error.
8941    Use char because int might match the return type of a GCC
8942    builtin and then its argument prototype would still apply.  */
8943 #ifdef __cplusplus
8944 extern "C"
8945 #endif
8946 char DPMSInfo ();
8947 int
8948 main ()
8949 {
8950 return DPMSInfo ();
8951   ;
8952   return 0;
8953 }
8954 _ACEOF
8955 if ac_fn_c_try_link "$LINENO"; then :
8956   ac_cv_lib_Xdpms_DPMSInfo=yes
8957 else
8958   ac_cv_lib_Xdpms_DPMSInfo=no
8959 fi
8960 rm -f core conftest.err conftest.$ac_objext \
8961     conftest$ac_exeext conftest.$ac_ext
8962 LIBS=$ac_check_lib_save_LIBS
8963 fi
8964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
8965 $as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
8966 if test "x$ac_cv_lib_Xdpms_DPMSInfo" = xyes; then :
8967   have_dpms=yes; XDPMS_LIBS="-lXdpms"
8968 else
8969   true
8970 fi
8971
8972   CPPFLAGS="$ac_save_CPPFLAGS"
8973   LDFLAGS="$ac_save_LDFLAGS"
8974 #  LIBS="$ac_save_LIBS"
8975
8976     fi
8977   fi
8978
8979
8980   # if that succeeded, then we've really got it.
8981   if test "$have_dpms" = yes; then
8982     $as_echo "#define HAVE_DPMS_EXTENSION 1" >>confdefs.h
8983
8984   fi
8985
8986 elif test "$with_dpms" != no; then
8987   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
8988   exit 1
8989 fi
8990
8991
8992 ###############################################################################
8993 #
8994 #       Check for the XINERAMA server extension.
8995 #
8996 ###############################################################################
8997
8998 have_xinerama=no
8999 with_xinerama_req=unspecified
9000
9001 # Check whether --with-xinerama-ext was given.
9002 if test "${with_xinerama_ext+set}" = set; then :
9003   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
9004 else
9005   with_xinerama=yes
9006 fi
9007
9008
9009
9010    case "$with_xinerama" in
9011     yes) ;;
9012     no)  ;;
9013
9014     /*)
9015      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA headers" >&5
9016 $as_echo_n "checking for XINERAMA headers... " >&6; }
9017      d=$with_xinerama/include
9018      if test -d $d; then
9019        X_CFLAGS="-I$d $X_CFLAGS"
9020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9021 $as_echo "$d" >&6; }
9022      else
9023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9024 $as_echo "not found ($d: no such directory)" >&6; }
9025      fi
9026
9027      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA libs" >&5
9028 $as_echo_n "checking for XINERAMA libs... " >&6; }
9029      d=$with_xinerama/lib
9030      if test -d $d; then
9031        X_LIBS="-L$d $X_LIBS"
9032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9033 $as_echo "$d" >&6; }
9034      else
9035        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9036 $as_echo "not found ($d: no such directory)" >&6; }
9037      fi
9038
9039      # replace the directory string with "yes".
9040      with_xinerama_req="yes"
9041      with_xinerama=$with_xinerama_req
9042      ;;
9043
9044     *)
9045      echo ""
9046      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
9047      echo "       If it is a directory, then \`DIR/include' will be added to"
9048      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9049      exit 1
9050      ;;
9051    esac
9052
9053
9054 if test "$with_xinerama" = yes; then
9055
9056   # first check for Xinerama.h
9057
9058   ac_save_CPPFLAGS="$CPPFLAGS"
9059   if test \! -z "$includedir" ; then
9060     CPPFLAGS="$CPPFLAGS -I$includedir"
9061   fi
9062   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9063   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9064   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "#include <X11/Xlib.h>
9065 "
9066 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = xyes; then :
9067   have_xinerama=yes
9068 fi
9069
9070
9071   CPPFLAGS="$ac_save_CPPFLAGS"
9072
9073   # if that succeeded, then check for the XINERAMA code in the libraries
9074   if test "$have_xinerama" = yes; then
9075
9076     # first look in -lXext
9077     have_xinerama=no
9078
9079   ac_save_CPPFLAGS="$CPPFLAGS"
9080   ac_save_LDFLAGS="$LDFLAGS"
9081 #  ac_save_LIBS="$LIBS"
9082
9083   if test \! -z "$includedir" ; then
9084     CPPFLAGS="$CPPFLAGS -I$includedir"
9085   fi
9086   # note: $X_CFLAGS includes $x_includes
9087   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9088
9089   if test \! -z "$libdir" ; then
9090     LDFLAGS="$LDFLAGS -L$libdir"
9091   fi
9092   # note: $X_LIBS includes $x_libraries
9093   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9094
9095   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9096   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXext" >&5
9098 $as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
9099 if ${ac_cv_lib_Xext_XineramaQueryScreens+:} false; then :
9100   $as_echo_n "(cached) " >&6
9101 else
9102   ac_check_lib_save_LIBS=$LIBS
9103 LIBS="-lXext -lXext -lX11 $LIBS"
9104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9105 /* end confdefs.h.  */
9106
9107 /* Override any GCC internal prototype to avoid an error.
9108    Use char because int might match the return type of a GCC
9109    builtin and then its argument prototype would still apply.  */
9110 #ifdef __cplusplus
9111 extern "C"
9112 #endif
9113 char XineramaQueryScreens ();
9114 int
9115 main ()
9116 {
9117 return XineramaQueryScreens ();
9118   ;
9119   return 0;
9120 }
9121 _ACEOF
9122 if ac_fn_c_try_link "$LINENO"; then :
9123   ac_cv_lib_Xext_XineramaQueryScreens=yes
9124 else
9125   ac_cv_lib_Xext_XineramaQueryScreens=no
9126 fi
9127 rm -f core conftest.err conftest.$ac_objext \
9128     conftest$ac_exeext conftest.$ac_ext
9129 LIBS=$ac_check_lib_save_LIBS
9130 fi
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
9132 $as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
9133 if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = xyes; then :
9134   have_xinerama=yes
9135 else
9136   true
9137 fi
9138
9139   CPPFLAGS="$ac_save_CPPFLAGS"
9140   LDFLAGS="$ac_save_LDFLAGS"
9141 #  LIBS="$ac_save_LIBS"
9142
9143
9144     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
9145     if test "$have_xinerama" = no; then
9146
9147   ac_save_CPPFLAGS="$CPPFLAGS"
9148   ac_save_LDFLAGS="$LDFLAGS"
9149 #  ac_save_LIBS="$LIBS"
9150
9151   if test \! -z "$includedir" ; then
9152     CPPFLAGS="$CPPFLAGS -I$includedir"
9153   fi
9154   # note: $X_CFLAGS includes $x_includes
9155   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9156
9157   if test \! -z "$libdir" ; then
9158     LDFLAGS="$LDFLAGS -L$libdir"
9159   fi
9160   # note: $X_LIBS includes $x_libraries
9161   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9162
9163   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9164   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9165   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXinerama" >&5
9166 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
9167 if ${ac_cv_lib_Xinerama_XineramaQueryScreens+:} false; then :
9168   $as_echo_n "(cached) " >&6
9169 else
9170   ac_check_lib_save_LIBS=$LIBS
9171 LIBS="-lXinerama -lXext -lX11 $LIBS"
9172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9173 /* end confdefs.h.  */
9174
9175 /* Override any GCC internal prototype to avoid an error.
9176    Use char because int might match the return type of a GCC
9177    builtin and then its argument prototype would still apply.  */
9178 #ifdef __cplusplus
9179 extern "C"
9180 #endif
9181 char XineramaQueryScreens ();
9182 int
9183 main ()
9184 {
9185 return XineramaQueryScreens ();
9186   ;
9187   return 0;
9188 }
9189 _ACEOF
9190 if ac_fn_c_try_link "$LINENO"; then :
9191   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
9192 else
9193   ac_cv_lib_Xinerama_XineramaQueryScreens=no
9194 fi
9195 rm -f core conftest.err conftest.$ac_objext \
9196     conftest$ac_exeext conftest.$ac_ext
9197 LIBS=$ac_check_lib_save_LIBS
9198 fi
9199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
9200 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
9201 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = xyes; then :
9202   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
9203 else
9204   true
9205 fi
9206
9207   CPPFLAGS="$ac_save_CPPFLAGS"
9208   LDFLAGS="$ac_save_LDFLAGS"
9209 #  LIBS="$ac_save_LIBS"
9210
9211     fi
9212   fi
9213
9214   # if that succeeded, then we've really got it.
9215   if test "$have_xinerama" = yes; then
9216     $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
9217
9218   fi
9219
9220 elif test "$with_xinerama" != no; then
9221   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
9222   exit 1
9223 fi
9224
9225
9226 ###############################################################################
9227 #
9228 #       Check for the XINPUT server extension.
9229 #
9230 ###############################################################################
9231
9232 have_xinput=no
9233 with_xinput_req=unspecified
9234
9235 # Check whether --with-xinput-ext was given.
9236 if test "${with_xinput_ext+set}" = set; then :
9237   withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
9238 else
9239   with_xinput=yes
9240 fi
9241
9242
9243
9244    case "$with_xinput" in
9245     yes) ;;
9246     no)  ;;
9247
9248     /*)
9249      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT headers" >&5
9250 $as_echo_n "checking for XINPUT headers... " >&6; }
9251      d=$with_xinput/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 XINPUT libs" >&5
9262 $as_echo_n "checking for XINPUT libs... " >&6; }
9263      d=$with_xinput/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_xinput_req="yes"
9275      with_xinput=$with_xinput_req
9276      ;;
9277
9278     *)
9279      echo ""
9280      echo "error: argument to --with-xinput-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 if test "$with_xinput" = yes; then
9289
9290   # first check for Xinput.h
9291
9292   ac_save_CPPFLAGS="$CPPFLAGS"
9293   if test \! -z "$includedir" ; then
9294     CPPFLAGS="$CPPFLAGS -I$includedir"
9295   fi
9296   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9297   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9298   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XInput.h" "ac_cv_header_X11_extensions_XInput_h" "#include <X11/Xlib.h>
9299 "
9300 if test "x$ac_cv_header_X11_extensions_XInput_h" = xyes; then :
9301   have_xinput=yes
9302 fi
9303
9304
9305   CPPFLAGS="$ac_save_CPPFLAGS"
9306
9307   # if that succeeded, then check for libXi
9308   if test "$have_xinput" = yes; then
9309     have_xinput=no
9310
9311   ac_save_CPPFLAGS="$CPPFLAGS"
9312   ac_save_LDFLAGS="$LDFLAGS"
9313 #  ac_save_LIBS="$LIBS"
9314
9315   if test \! -z "$includedir" ; then
9316     CPPFLAGS="$CPPFLAGS -I$includedir"
9317   fi
9318   # note: $X_CFLAGS includes $x_includes
9319   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9320
9321   if test \! -z "$libdir" ; then
9322     LDFLAGS="$LDFLAGS -L$libdir"
9323   fi
9324   # note: $X_LIBS includes $x_libraries
9325   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9326
9327   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9328   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9329   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XListInputDevices in -lXi" >&5
9330 $as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
9331 if ${ac_cv_lib_Xi_XListInputDevices+:} false; then :
9332   $as_echo_n "(cached) " >&6
9333 else
9334   ac_check_lib_save_LIBS=$LIBS
9335 LIBS="-lXi -lXext -lX11 $LIBS"
9336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9337 /* end confdefs.h.  */
9338
9339 /* Override any GCC internal prototype to avoid an error.
9340    Use char because int might match the return type of a GCC
9341    builtin and then its argument prototype would still apply.  */
9342 #ifdef __cplusplus
9343 extern "C"
9344 #endif
9345 char XListInputDevices ();
9346 int
9347 main ()
9348 {
9349 return XListInputDevices ();
9350   ;
9351   return 0;
9352 }
9353 _ACEOF
9354 if ac_fn_c_try_link "$LINENO"; then :
9355   ac_cv_lib_Xi_XListInputDevices=yes
9356 else
9357   ac_cv_lib_Xi_XListInputDevices=no
9358 fi
9359 rm -f core conftest.err conftest.$ac_objext \
9360     conftest$ac_exeext conftest.$ac_ext
9361 LIBS=$ac_check_lib_save_LIBS
9362 fi
9363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xi_XListInputDevices" >&5
9364 $as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
9365 if test "x$ac_cv_lib_Xi_XListInputDevices" = xyes; then :
9366   have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
9367 else
9368   true
9369 fi
9370
9371   CPPFLAGS="$ac_save_CPPFLAGS"
9372   LDFLAGS="$ac_save_LDFLAGS"
9373 #  LIBS="$ac_save_LIBS"
9374
9375   fi
9376
9377   # if that succeeded, then we've really got it.
9378   if test "$have_xinput" = yes; then
9379     $as_echo "#define HAVE_XINPUT 1" >>confdefs.h
9380
9381   fi
9382
9383 elif test "$with_xinput" != no; then
9384   echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
9385   exit 1
9386 fi
9387
9388
9389 ###############################################################################
9390 #
9391 #       Check for the XF86VMODE server extension (for virtual screens.)
9392 #
9393 ###############################################################################
9394
9395 have_xf86vmode=no
9396 with_xf86vmode_req=unspecified
9397
9398 # Check whether --with-xf86vmode-ext was given.
9399 if test "${with_xf86vmode_ext+set}" = set; then :
9400   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
9401 else
9402   with_xf86vmode=yes
9403 fi
9404
9405
9406
9407    case "$with_xf86vmode" in
9408     yes) ;;
9409     no)  ;;
9410
9411     /*)
9412      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode headers" >&5
9413 $as_echo_n "checking for xf86vmode headers... " >&6; }
9414      d=$with_xf86vmode/include
9415      if test -d $d; then
9416        X_CFLAGS="-I$d $X_CFLAGS"
9417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9418 $as_echo "$d" >&6; }
9419      else
9420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9421 $as_echo "not found ($d: no such directory)" >&6; }
9422      fi
9423
9424      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode libs" >&5
9425 $as_echo_n "checking for xf86vmode libs... " >&6; }
9426      d=$with_xf86vmode/lib
9427      if test -d $d; then
9428        X_LIBS="-L$d $X_LIBS"
9429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9430 $as_echo "$d" >&6; }
9431      else
9432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9433 $as_echo "not found ($d: no such directory)" >&6; }
9434      fi
9435
9436      # replace the directory string with "yes".
9437      with_xf86vmode_req="yes"
9438      with_xf86vmode=$with_xf86vmode_req
9439      ;;
9440
9441     *)
9442      echo ""
9443      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
9444      echo "       If it is a directory, then \`DIR/include' will be added to"
9445      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9446      exit 1
9447      ;;
9448    esac
9449
9450
9451 VIDMODE_LIBS=""
9452
9453 if test "$with_xf86vmode" = yes; then
9454
9455   # first check for xf86vmode.h
9456
9457   ac_save_CPPFLAGS="$CPPFLAGS"
9458   if test \! -z "$includedir" ; then
9459     CPPFLAGS="$CPPFLAGS -I$includedir"
9460   fi
9461   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9462   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9463   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9464 "
9465 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9466   have_xf86vmode=yes
9467 fi
9468
9469
9470   CPPFLAGS="$ac_save_CPPFLAGS"
9471
9472   # if that succeeded, then check for the -lXxf86vm
9473   if test "$have_xf86vmode" = yes; then
9474     have_xf86vmode=no
9475
9476   ac_save_CPPFLAGS="$CPPFLAGS"
9477   ac_save_LDFLAGS="$LDFLAGS"
9478 #  ac_save_LIBS="$LIBS"
9479
9480   if test \! -z "$includedir" ; then
9481     CPPFLAGS="$CPPFLAGS -I$includedir"
9482   fi
9483   # note: $X_CFLAGS includes $x_includes
9484   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9485
9486   if test \! -z "$libdir" ; then
9487     LDFLAGS="$LDFLAGS -L$libdir"
9488   fi
9489   # note: $X_LIBS includes $x_libraries
9490   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9491
9492   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9493   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9494   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
9495 $as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
9496 if ${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+:} false; then :
9497   $as_echo_n "(cached) " >&6
9498 else
9499   ac_check_lib_save_LIBS=$LIBS
9500 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9502 /* end confdefs.h.  */
9503
9504 /* Override any GCC internal prototype to avoid an error.
9505    Use char because int might match the return type of a GCC
9506    builtin and then its argument prototype would still apply.  */
9507 #ifdef __cplusplus
9508 extern "C"
9509 #endif
9510 char XF86VidModeGetViewPort ();
9511 int
9512 main ()
9513 {
9514 return XF86VidModeGetViewPort ();
9515   ;
9516   return 0;
9517 }
9518 _ACEOF
9519 if ac_fn_c_try_link "$LINENO"; then :
9520   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
9521 else
9522   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
9523 fi
9524 rm -f core conftest.err conftest.$ac_objext \
9525     conftest$ac_exeext conftest.$ac_ext
9526 LIBS=$ac_check_lib_save_LIBS
9527 fi
9528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
9529 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
9530 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = xyes; then :
9531   have_xf86vmode=yes;
9532                    VIDMODE_LIBS="-lXxf86vm";
9533                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
9534 else
9535   true
9536 fi
9537
9538   CPPFLAGS="$ac_save_CPPFLAGS"
9539   LDFLAGS="$ac_save_LDFLAGS"
9540 #  LIBS="$ac_save_LIBS"
9541
9542   fi
9543
9544   # if that succeeded, then we've really got it.
9545   if test "$have_xf86vmode" = yes; then
9546     $as_echo "#define HAVE_XF86VMODE 1" >>confdefs.h
9547
9548   fi
9549
9550 elif test "$with_xf86vmode" != no; then
9551   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
9552   exit 1
9553 fi
9554
9555
9556 ###############################################################################
9557 #
9558 #       Check for the XF86VMODE server extension (for gamma fading.)
9559 #
9560 ###############################################################################
9561
9562 have_xf86gamma=no
9563 have_xf86gamma_ramp=no
9564 with_xf86gamma_req=unspecified
9565
9566 # Check whether --with-xf86gamma-ext was given.
9567 if test "${with_xf86gamma_ext+set}" = set; then :
9568   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
9569 else
9570   with_xf86gamma=yes
9571 fi
9572
9573
9574
9575    case "$with_xf86gamma" in
9576     yes) ;;
9577     no)  ;;
9578
9579     /*)
9580      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma headers" >&5
9581 $as_echo_n "checking for xf86gamma headers... " >&6; }
9582      d=$with_xf86gamma/include
9583      if test -d $d; then
9584        X_CFLAGS="-I$d $X_CFLAGS"
9585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9586 $as_echo "$d" >&6; }
9587      else
9588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9589 $as_echo "not found ($d: no such directory)" >&6; }
9590      fi
9591
9592      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma libs" >&5
9593 $as_echo_n "checking for xf86gamma libs... " >&6; }
9594      d=$with_xf86gamma/lib
9595      if test -d $d; then
9596        X_LIBS="-L$d $X_LIBS"
9597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9598 $as_echo "$d" >&6; }
9599      else
9600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9601 $as_echo "not found ($d: no such directory)" >&6; }
9602      fi
9603
9604      # replace the directory string with "yes".
9605      with_xf86gamma_req="yes"
9606      with_xf86gamma=$with_xf86gamma_req
9607      ;;
9608
9609     *)
9610      echo ""
9611      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
9612      echo "       If it is a directory, then \`DIR/include' will be added to"
9613      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9614      exit 1
9615      ;;
9616    esac
9617
9618
9619 if test "$with_xf86gamma" = yes; then
9620
9621   # first check for xf86vmode.h, if we haven't already
9622   if test "$have_xf86vmode" = yes; then
9623     have_xf86gamma=yes
9624   else
9625
9626   ac_save_CPPFLAGS="$CPPFLAGS"
9627   if test \! -z "$includedir" ; then
9628     CPPFLAGS="$CPPFLAGS -I$includedir"
9629   fi
9630   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9631   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9632   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9633 "
9634 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9635   have_xf86gamma=yes
9636 fi
9637
9638
9639   CPPFLAGS="$ac_save_CPPFLAGS"
9640   fi
9641
9642   # if that succeeded, then check for the -lXxf86vm
9643   if test "$have_xf86gamma" = yes; then
9644     have_xf86gamma=no
9645
9646   ac_save_CPPFLAGS="$CPPFLAGS"
9647   ac_save_LDFLAGS="$LDFLAGS"
9648 #  ac_save_LIBS="$LIBS"
9649
9650   if test \! -z "$includedir" ; then
9651     CPPFLAGS="$CPPFLAGS -I$includedir"
9652   fi
9653   # note: $X_CFLAGS includes $x_includes
9654   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9655
9656   if test \! -z "$libdir" ; then
9657     LDFLAGS="$LDFLAGS -L$libdir"
9658   fi
9659   # note: $X_LIBS includes $x_libraries
9660   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9661
9662   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9663   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
9665 $as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
9666 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+:} false; then :
9667   $as_echo_n "(cached) " >&6
9668 else
9669   ac_check_lib_save_LIBS=$LIBS
9670 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9672 /* end confdefs.h.  */
9673
9674 /* Override any GCC internal prototype to avoid an error.
9675    Use char because int might match the return type of a GCC
9676    builtin and then its argument prototype would still apply.  */
9677 #ifdef __cplusplus
9678 extern "C"
9679 #endif
9680 char XF86VidModeSetGamma ();
9681 int
9682 main ()
9683 {
9684 return XF86VidModeSetGamma ();
9685   ;
9686   return 0;
9687 }
9688 _ACEOF
9689 if ac_fn_c_try_link "$LINENO"; then :
9690   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
9691 else
9692   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
9693 fi
9694 rm -f core conftest.err conftest.$ac_objext \
9695     conftest$ac_exeext conftest.$ac_ext
9696 LIBS=$ac_check_lib_save_LIBS
9697 fi
9698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
9699 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
9700 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = xyes; then :
9701   have_xf86gamma=yes
9702 else
9703   true
9704 fi
9705
9706   CPPFLAGS="$ac_save_CPPFLAGS"
9707   LDFLAGS="$ac_save_LDFLAGS"
9708 #  LIBS="$ac_save_LIBS"
9709
9710   fi
9711
9712   # check for the Ramp versions of the functions too.
9713   if test "$have_xf86gamma" = yes; then
9714     have_xf86gamma_ramp=no
9715
9716   ac_save_CPPFLAGS="$CPPFLAGS"
9717   ac_save_LDFLAGS="$LDFLAGS"
9718 #  ac_save_LIBS="$LIBS"
9719
9720   if test \! -z "$includedir" ; then
9721     CPPFLAGS="$CPPFLAGS -I$includedir"
9722   fi
9723   # note: $X_CFLAGS includes $x_includes
9724   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9725
9726   if test \! -z "$libdir" ; then
9727     LDFLAGS="$LDFLAGS -L$libdir"
9728   fi
9729   # note: $X_LIBS includes $x_libraries
9730   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9731
9732   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9733   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9734   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
9735 $as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
9736 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+:} false; then :
9737   $as_echo_n "(cached) " >&6
9738 else
9739   ac_check_lib_save_LIBS=$LIBS
9740 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9742 /* end confdefs.h.  */
9743
9744 /* Override any GCC internal prototype to avoid an error.
9745    Use char because int might match the return type of a GCC
9746    builtin and then its argument prototype would still apply.  */
9747 #ifdef __cplusplus
9748 extern "C"
9749 #endif
9750 char XF86VidModeSetGammaRamp ();
9751 int
9752 main ()
9753 {
9754 return XF86VidModeSetGammaRamp ();
9755   ;
9756   return 0;
9757 }
9758 _ACEOF
9759 if ac_fn_c_try_link "$LINENO"; then :
9760   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
9761 else
9762   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
9763 fi
9764 rm -f core conftest.err conftest.$ac_objext \
9765     conftest$ac_exeext conftest.$ac_ext
9766 LIBS=$ac_check_lib_save_LIBS
9767 fi
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
9769 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
9770 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = xyes; then :
9771   have_xf86gamma_ramp=yes
9772 else
9773   true
9774 fi
9775
9776   CPPFLAGS="$ac_save_CPPFLAGS"
9777   LDFLAGS="$ac_save_LDFLAGS"
9778 #  LIBS="$ac_save_LIBS"
9779
9780   fi
9781
9782   # if those tests succeeded, then we've really got the functions.
9783   if test "$have_xf86gamma" = yes; then
9784     $as_echo "#define HAVE_XF86VMODE_GAMMA 1" >>confdefs.h
9785
9786   fi
9787
9788   if test "$have_xf86gamma_ramp" = yes; then
9789     $as_echo "#define HAVE_XF86VMODE_GAMMA_RAMP 1" >>confdefs.h
9790
9791   fi
9792
9793   # pull in the lib, if we haven't already
9794   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
9795     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
9796   fi
9797
9798 elif test "$with_xf86gamma" != no; then
9799   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
9800   exit 1
9801 fi
9802
9803
9804 ###############################################################################
9805 #
9806 #       Check for the RANDR (Resize and Rotate) server extension.
9807 #
9808 #       We need this to detect when the resolution of the desktop
9809 #       has changed out from under us (this is a newer, different
9810 #       mechanism than the XF86VMODE virtual viewports.)
9811 #
9812 ###############################################################################
9813
9814 have_randr=no
9815 with_randr_req=unspecified
9816
9817 # Check whether --with-randr-ext was given.
9818 if test "${with_randr_ext+set}" = set; then :
9819   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
9820 else
9821   with_randr=yes
9822 fi
9823
9824
9825
9826    case "$with_randr" in
9827     yes) ;;
9828     no)  ;;
9829
9830     /*)
9831      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR headers" >&5
9832 $as_echo_n "checking for RANDR headers... " >&6; }
9833      d=$with_randr/include
9834      if test -d $d; then
9835        X_CFLAGS="-I$d $X_CFLAGS"
9836        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9837 $as_echo "$d" >&6; }
9838      else
9839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9840 $as_echo "not found ($d: no such directory)" >&6; }
9841      fi
9842
9843      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR libs" >&5
9844 $as_echo_n "checking for RANDR libs... " >&6; }
9845      d=$with_randr/lib
9846      if test -d $d; then
9847        X_LIBS="-L$d $X_LIBS"
9848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9849 $as_echo "$d" >&6; }
9850      else
9851        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9852 $as_echo "not found ($d: no such directory)" >&6; }
9853      fi
9854
9855      # replace the directory string with "yes".
9856      with_randr_req="yes"
9857      with_randr=$with_randr_req
9858      ;;
9859
9860     *)
9861      echo ""
9862      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
9863      echo "       If it is a directory, then \`DIR/include' will be added to"
9864      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9865      exit 1
9866      ;;
9867    esac
9868
9869
9870 if test "$with_randr" = yes; then
9871
9872   # first check for Xrandr.h
9873
9874   ac_save_CPPFLAGS="$CPPFLAGS"
9875   if test \! -z "$includedir" ; then
9876     CPPFLAGS="$CPPFLAGS -I$includedir"
9877   fi
9878   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9879   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9880   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "#include <X11/Xlib.h>
9881 "
9882 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = xyes; then :
9883   have_randr=yes
9884 fi
9885
9886
9887   CPPFLAGS="$ac_save_CPPFLAGS"
9888
9889   # if that succeeded, then check for the XRR code in the libraries
9890   if test "$have_randr" = yes; then
9891
9892     # RANDR probably needs -lXrender
9893     xrender_libs=
9894
9895   ac_save_CPPFLAGS="$CPPFLAGS"
9896   ac_save_LDFLAGS="$LDFLAGS"
9897 #  ac_save_LIBS="$LIBS"
9898
9899   if test \! -z "$includedir" ; then
9900     CPPFLAGS="$CPPFLAGS -I$includedir"
9901   fi
9902   # note: $X_CFLAGS includes $x_includes
9903   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9904
9905   if test \! -z "$libdir" ; then
9906     LDFLAGS="$LDFLAGS -L$libdir"
9907   fi
9908   # note: $X_LIBS includes $x_libraries
9909   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9910
9911   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9912   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9913   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderSetSubpixelOrder in -lXrender" >&5
9914 $as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
9915 if ${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+:} false; then :
9916   $as_echo_n "(cached) " >&6
9917 else
9918   ac_check_lib_save_LIBS=$LIBS
9919 LIBS="-lXrender -lXext -lX11 $LIBS"
9920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9921 /* end confdefs.h.  */
9922
9923 /* Override any GCC internal prototype to avoid an error.
9924    Use char because int might match the return type of a GCC
9925    builtin and then its argument prototype would still apply.  */
9926 #ifdef __cplusplus
9927 extern "C"
9928 #endif
9929 char XRenderSetSubpixelOrder ();
9930 int
9931 main ()
9932 {
9933 return XRenderSetSubpixelOrder ();
9934   ;
9935   return 0;
9936 }
9937 _ACEOF
9938 if ac_fn_c_try_link "$LINENO"; then :
9939   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
9940 else
9941   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
9942 fi
9943 rm -f core conftest.err conftest.$ac_objext \
9944     conftest$ac_exeext conftest.$ac_ext
9945 LIBS=$ac_check_lib_save_LIBS
9946 fi
9947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
9948 $as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
9949 if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = xyes; then :
9950   xrender_libs="-lXrender"
9951 else
9952   true
9953 fi
9954
9955   CPPFLAGS="$ac_save_CPPFLAGS"
9956   LDFLAGS="$ac_save_LDFLAGS"
9957 #  LIBS="$ac_save_LIBS"
9958
9959
9960     # first look for RANDR in -lXext
9961     have_randr=no
9962
9963   ac_save_CPPFLAGS="$CPPFLAGS"
9964   ac_save_LDFLAGS="$LDFLAGS"
9965 #  ac_save_LIBS="$LIBS"
9966
9967   if test \! -z "$includedir" ; then
9968     CPPFLAGS="$CPPFLAGS -I$includedir"
9969   fi
9970   # note: $X_CFLAGS includes $x_includes
9971   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9972
9973   if test \! -z "$libdir" ; then
9974     LDFLAGS="$LDFLAGS -L$libdir"
9975   fi
9976   # note: $X_LIBS includes $x_libraries
9977   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9978
9979   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9980   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9981   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXext" >&5
9982 $as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
9983 if ${ac_cv_lib_Xext_XRRGetScreenInfo+:} false; then :
9984   $as_echo_n "(cached) " >&6
9985 else
9986   ac_check_lib_save_LIBS=$LIBS
9987 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
9988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9989 /* end confdefs.h.  */
9990
9991 /* Override any GCC internal prototype to avoid an error.
9992    Use char because int might match the return type of a GCC
9993    builtin and then its argument prototype would still apply.  */
9994 #ifdef __cplusplus
9995 extern "C"
9996 #endif
9997 char XRRGetScreenInfo ();
9998 int
9999 main ()
10000 {
10001 return XRRGetScreenInfo ();
10002   ;
10003   return 0;
10004 }
10005 _ACEOF
10006 if ac_fn_c_try_link "$LINENO"; then :
10007   ac_cv_lib_Xext_XRRGetScreenInfo=yes
10008 else
10009   ac_cv_lib_Xext_XRRGetScreenInfo=no
10010 fi
10011 rm -f core conftest.err conftest.$ac_objext \
10012     conftest$ac_exeext conftest.$ac_ext
10013 LIBS=$ac_check_lib_save_LIBS
10014 fi
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
10016 $as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
10017 if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = xyes; then :
10018   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
10019 else
10020   true
10021 fi
10022
10023   CPPFLAGS="$ac_save_CPPFLAGS"
10024   LDFLAGS="$ac_save_LDFLAGS"
10025 #  LIBS="$ac_save_LIBS"
10026
10027
10028     # if that failed, look in -lXrandr
10029     if test "$have_randr" = no; then
10030
10031   ac_save_CPPFLAGS="$CPPFLAGS"
10032   ac_save_LDFLAGS="$LDFLAGS"
10033 #  ac_save_LIBS="$LIBS"
10034
10035   if test \! -z "$includedir" ; then
10036     CPPFLAGS="$CPPFLAGS -I$includedir"
10037   fi
10038   # note: $X_CFLAGS includes $x_includes
10039   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10040
10041   if test \! -z "$libdir" ; then
10042     LDFLAGS="$LDFLAGS -L$libdir"
10043   fi
10044   # note: $X_LIBS includes $x_libraries
10045   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10046
10047   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10048   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
10050 $as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
10051 if ${ac_cv_lib_Xrandr_XRRGetScreenInfo+:} false; then :
10052   $as_echo_n "(cached) " >&6
10053 else
10054   ac_check_lib_save_LIBS=$LIBS
10055 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
10056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10057 /* end confdefs.h.  */
10058
10059 /* Override any GCC internal prototype to avoid an error.
10060    Use char because int might match the return type of a GCC
10061    builtin and then its argument prototype would still apply.  */
10062 #ifdef __cplusplus
10063 extern "C"
10064 #endif
10065 char XRRGetScreenInfo ();
10066 int
10067 main ()
10068 {
10069 return XRRGetScreenInfo ();
10070   ;
10071   return 0;
10072 }
10073 _ACEOF
10074 if ac_fn_c_try_link "$LINENO"; then :
10075   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
10076 else
10077   ac_cv_lib_Xrandr_XRRGetScreenInfo=no
10078 fi
10079 rm -f core conftest.err conftest.$ac_objext \
10080     conftest$ac_exeext conftest.$ac_ext
10081 LIBS=$ac_check_lib_save_LIBS
10082 fi
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
10084 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
10085 if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = xyes; then :
10086   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
10087 else
10088   true
10089 fi
10090
10091   CPPFLAGS="$ac_save_CPPFLAGS"
10092   LDFLAGS="$ac_save_LDFLAGS"
10093 #  LIBS="$ac_save_LIBS"
10094
10095     fi
10096   fi
10097
10098   # if that succeeded, then we've really got it.
10099   if test "$have_randr" = yes; then
10100     $as_echo "#define HAVE_RANDR 1" >>confdefs.h
10101
10102
10103     # Now check for version 1.2 in the same libs.
10104     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
10105     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources" >&5
10106 $as_echo_n "checking for XRRGetScreenResources... " >&6; }
10107 if ${ac_cv_randr_12+:} false; then :
10108   $as_echo_n "(cached) " >&6
10109 else
10110   ac_cv_randr_12=no
10111
10112   ac_save_CPPFLAGS="$CPPFLAGS"
10113   if test \! -z "$includedir" ; then
10114     CPPFLAGS="$CPPFLAGS -I$includedir"
10115   fi
10116   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10117   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10119 /* end confdefs.h.  */
10120 #include <stdlib.h>
10121                          #include <X11/Xlib.h>
10122                          #include <X11/extensions/Xrandr.h>
10123 int
10124 main ()
10125 {
10126 XRRScreenResources *res =
10127                            XRRGetScreenResources (0, 0);
10128   ;
10129   return 0;
10130 }
10131 _ACEOF
10132 if ac_fn_c_try_compile "$LINENO"; then :
10133   ac_cv_randr_12=yes
10134 else
10135   ac_cv_randr_12=no
10136 fi
10137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10138   CPPFLAGS="$ac_save_CPPFLAGS"
10139 fi
10140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_randr_12" >&5
10141 $as_echo "$ac_cv_randr_12" >&6; }
10142     if test "$ac_cv_randr_12" = yes ; then
10143       $as_echo "#define HAVE_RANDR_12 1" >>confdefs.h
10144
10145     fi
10146 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
10147 #                  [true], $SAVER_LIBS)
10148   fi
10149
10150
10151 elif test "$with_randr" != no; then
10152   echo "error: must be yes or no: --with-randr-ext=$with_randr"
10153   exit 1
10154 fi
10155
10156
10157 ###############################################################################
10158 #
10159 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
10160 #       using other XF86 stuff.)
10161 #
10162 ###############################################################################
10163
10164 have_xf86miscsetgrabkeysstate=no
10165 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
10166
10167   ac_save_CPPFLAGS="$CPPFLAGS"
10168   ac_save_LDFLAGS="$LDFLAGS"
10169 #  ac_save_LIBS="$LIBS"
10170
10171   if test \! -z "$includedir" ; then
10172     CPPFLAGS="$CPPFLAGS -I$includedir"
10173   fi
10174   # note: $X_CFLAGS includes $x_includes
10175   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10176
10177   if test \! -z "$libdir" ; then
10178     LDFLAGS="$LDFLAGS -L$libdir"
10179   fi
10180   # note: $X_LIBS includes $x_libraries
10181   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10182
10183   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10184   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10185   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
10186 $as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
10187 if ${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+:} false; then :
10188   $as_echo_n "(cached) " >&6
10189 else
10190   ac_check_lib_save_LIBS=$LIBS
10191 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
10192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10193 /* end confdefs.h.  */
10194
10195 /* Override any GCC internal prototype to avoid an error.
10196    Use char because int might match the return type of a GCC
10197    builtin and then its argument prototype would still apply.  */
10198 #ifdef __cplusplus
10199 extern "C"
10200 #endif
10201 char XF86MiscSetGrabKeysState ();
10202 int
10203 main ()
10204 {
10205 return XF86MiscSetGrabKeysState ();
10206   ;
10207   return 0;
10208 }
10209 _ACEOF
10210 if ac_fn_c_try_link "$LINENO"; then :
10211   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
10212 else
10213   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
10214 fi
10215 rm -f core conftest.err conftest.$ac_objext \
10216     conftest$ac_exeext conftest.$ac_ext
10217 LIBS=$ac_check_lib_save_LIBS
10218 fi
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
10220 $as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
10221 if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = xyes; then :
10222   have_xf86miscsetgrabkeysstate=yes
10223 else
10224   true
10225 fi
10226
10227   CPPFLAGS="$ac_save_CPPFLAGS"
10228   LDFLAGS="$ac_save_LDFLAGS"
10229 #  LIBS="$ac_save_LIBS"
10230
10231   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
10232     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
10233     $as_echo "#define HAVE_XF86MISCSETGRABKEYSSTATE 1" >>confdefs.h
10234
10235   fi
10236 fi
10237
10238
10239 ###############################################################################
10240 #
10241 #       Check for HP XHPDisableReset and XHPEnableReset.
10242 #
10243 ###############################################################################
10244
10245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XHPDisableReset in X11/XHPlib.h" >&5
10246 $as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
10247
10248   ac_save_CPPFLAGS="$CPPFLAGS"
10249   if test \! -z "$includedir" ; then
10250     CPPFLAGS="$CPPFLAGS -I$includedir"
10251   fi
10252   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10253   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10254   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10255 /* end confdefs.h.  */
10256 #include <X11/XHPlib.h>
10257
10258 _ACEOF
10259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10260   $EGREP "XHPDisableReset" >/dev/null 2>&1; then :
10261   $as_echo "#define HAVE_XHPDISABLERESET 1" >>confdefs.h
10262
10263                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10264                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10265 $as_echo "yes" >&6; }
10266 else
10267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10268 $as_echo "no" >&6; }
10269 fi
10270 rm -rf conftest*
10271
10272   CPPFLAGS="$ac_save_CPPFLAGS"
10273
10274
10275 ###############################################################################
10276 #
10277 #       Check for /proc/interrupts.
10278 #
10279 ###############################################################################
10280
10281 have_proc_interrupts=no
10282 with_proc_interrupts_req=unspecified
10283
10284 # Check whether --with-proc-interrupts was given.
10285 if test "${with_proc_interrupts+set}" = set; then :
10286   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
10287 else
10288   with_proc_interrupts=yes
10289 fi
10290
10291
10292 if test "$with_proc_interrupts" = yes; then
10293
10294   # Note that we may be building in an environment (e.g. Debian buildd chroot)
10295   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
10296   # check that it has the bits we need, but otherwise we'll just go on faith.
10297   #
10298   have_proc_interrupts=yes
10299
10300   if test -f /proc/interrupts; then
10301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /proc/interrupts contains keyboard data" >&5
10302 $as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
10303 if ${ac_cv_have_proc_interrupts+:} false; then :
10304   $as_echo_n "(cached) " >&6
10305 else
10306   ac_cv_have_proc_interrupts=no
10307      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
10308        ac_cv_have_proc_interrupts=yes
10309      fi
10310
10311 fi
10312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_proc_interrupts" >&5
10313 $as_echo "$ac_cv_have_proc_interrupts" >&6; }
10314    have_proc_interrupts=$ac_cv_have_proc_interrupts
10315   fi
10316
10317   if test "$have_proc_interrupts" = yes; then
10318     $as_echo "#define HAVE_PROC_INTERRUPTS 1" >>confdefs.h
10319
10320   fi
10321
10322 elif test "$with_proc_interrupts" != no; then
10323   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
10324   exit 1
10325 fi
10326
10327
10328 ###############################################################################
10329 #
10330 #       The --enable-locking option
10331 #
10332 ###############################################################################
10333
10334 # Check whether --enable-locking was given.
10335 if test "${enable_locking+set}" = set; then :
10336   enableval=$enable_locking; enable_locking="$enableval"
10337 else
10338   if test "$ac_macosx" = yes; then
10339     # We can't lock on MacOS X, so default to not compiling in support for it.
10340     # But allow --enable-locking to override that, so I can debug Linux locking
10341     # under MacOS X11.
10342     enable_locking=no
10343    else
10344     enable_locking=yes
10345    fi
10346 fi
10347
10348 if test "$enable_locking" = yes; then
10349   true
10350 elif test "$enable_locking" = no; then
10351   $as_echo "#define NO_LOCKING 1" >>confdefs.h
10352
10353 else
10354   echo "error: must be yes or no: --enable-locking=$enable_locking"
10355   exit 1
10356 fi
10357
10358
10359 ###############################################################################
10360 #
10361 #       Whether to allow root password to unblank.
10362 #
10363 ###############################################################################
10364 # Check whether --enable-root-passwd was given.
10365 if test "${enable_root_passwd+set}" = set; then :
10366   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
10367 else
10368   enable_root_passwd=yes
10369 fi
10370
10371 if test "$enable_root_passwd" = yes; then
10372   $as_echo "#define ALLOW_ROOT_PASSWD 1" >>confdefs.h
10373
10374   true
10375 elif test "$enable_root_passwd" != no; then
10376   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
10377   exit 1
10378 fi
10379
10380 ###############################################################################
10381 #
10382 #       Check for PAM.
10383 #
10384 ###############################################################################
10385
10386 case "$host" in
10387   *-solaris*)
10388    # Solaris systems tend to come with PAM misconfigured.
10389    #  Don't build it by default, even if the headers exist.
10390    with_pam_default=no
10391    ;;
10392   *)
10393    # Default to building PAM support on all other systems, if it exists.
10394    with_pam_default=yes
10395   ;;
10396 esac
10397
10398 have_pam=no
10399 with_pam_req=unspecified
10400
10401
10402 # Check whether --with-pam was given.
10403 if test "${with_pam+set}" = set; then :
10404   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
10405 else
10406   with_pam=$with_pam_default
10407 fi
10408
10409
10410
10411 # Check whether --with-pam_service_name was given.
10412 if test "${with_pam_service_name+set}" = set; then :
10413   withval=$with_pam_service_name; pam_service_name="$withval"
10414 else
10415   pam_service_name="xscreensaver"
10416 fi
10417
10418
10419 # Check whether --enable-pam-check-account-type was given.
10420 if test "${enable_pam_check_account_type+set}" = set; then :
10421   enableval=$enable_pam_check_account_type; enable_pam_check_account_type="$enableval"
10422 else
10423   enable_pam_check_account_type=no
10424 fi
10425
10426 if test "$enable_pam_check_account_type" = yes ; then
10427   $as_echo "#define PAM_CHECK_ACCOUNT_TYPE 1" >>confdefs.h
10428
10429   true
10430 elif test "$enable_pam_check_account_type" != no ; then
10431   echo "error: must be yes or no: --enable-pam-check-account-type=$enable_pam_check_account_type"
10432   exit 1
10433 fi
10434
10435
10436    case "$with_pam" in
10437     yes) ;;
10438     no)  ;;
10439
10440     /*)
10441      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM headers" >&5
10442 $as_echo_n "checking for PAM headers... " >&6; }
10443      d=$with_pam/include
10444      if test -d $d; then
10445        X_CFLAGS="-I$d $X_CFLAGS"
10446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10447 $as_echo "$d" >&6; }
10448      else
10449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10450 $as_echo "not found ($d: no such directory)" >&6; }
10451      fi
10452
10453      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM libs" >&5
10454 $as_echo_n "checking for PAM libs... " >&6; }
10455      d=$with_pam/lib
10456      if test -d $d; then
10457        X_LIBS="-L$d $X_LIBS"
10458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10459 $as_echo "$d" >&6; }
10460      else
10461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10462 $as_echo "not found ($d: no such directory)" >&6; }
10463      fi
10464
10465      # replace the directory string with "yes".
10466      with_pam_req="yes"
10467      with_pam=$with_pam_req
10468      ;;
10469
10470     *)
10471      echo ""
10472      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
10473      echo "       If it is a directory, then \`DIR/include' will be added to"
10474      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10475      exit 1
10476      ;;
10477    esac
10478
10479
10480 if test "$enable_locking" = yes -a "$with_pam" = yes; then
10481   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM" >&5
10482 $as_echo_n "checking for PAM... " >&6; }
10483 if ${ac_cv_pam+:} false; then :
10484   $as_echo_n "(cached) " >&6
10485 else
10486
10487   ac_save_CPPFLAGS="$CPPFLAGS"
10488   if test \! -z "$includedir" ; then
10489     CPPFLAGS="$CPPFLAGS -I$includedir"
10490   fi
10491   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10492   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10494 /* end confdefs.h.  */
10495 #include <security/pam_appl.h>
10496 int
10497 main ()
10498 {
10499
10500   ;
10501   return 0;
10502 }
10503 _ACEOF
10504 if ac_fn_c_try_compile "$LINENO"; then :
10505   ac_cv_pam=yes
10506 else
10507   ac_cv_pam=no
10508 fi
10509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10510   CPPFLAGS="$ac_save_CPPFLAGS"
10511 fi
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pam" >&5
10513 $as_echo "$ac_cv_pam" >&6; }
10514   if test "$ac_cv_pam" = yes ; then
10515     have_pam=yes
10516     $as_echo "#define HAVE_PAM 1" >>confdefs.h
10517
10518     cat >>confdefs.h <<_ACEOF
10519 #define PAM_SERVICE_NAME "$pam_service_name"
10520 _ACEOF
10521
10522
10523     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
10524
10525     # libpam typically requires dlopen and dlsym.  On FreeBSD,
10526     # those are in libc.  On Linux and Solaris, they're in libdl.
10527     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10528 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10529 if ${ac_cv_lib_dl_dlopen+:} false; then :
10530   $as_echo_n "(cached) " >&6
10531 else
10532   ac_check_lib_save_LIBS=$LIBS
10533 LIBS="-ldl  $LIBS"
10534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10535 /* end confdefs.h.  */
10536
10537 /* Override any GCC internal prototype to avoid an error.
10538    Use char because int might match the return type of a GCC
10539    builtin and then its argument prototype would still apply.  */
10540 #ifdef __cplusplus
10541 extern "C"
10542 #endif
10543 char dlopen ();
10544 int
10545 main ()
10546 {
10547 return dlopen ();
10548   ;
10549   return 0;
10550 }
10551 _ACEOF
10552 if ac_fn_c_try_link "$LINENO"; then :
10553   ac_cv_lib_dl_dlopen=yes
10554 else
10555   ac_cv_lib_dl_dlopen=no
10556 fi
10557 rm -f core conftest.err conftest.$ac_objext \
10558     conftest$ac_exeext conftest.$ac_ext
10559 LIBS=$ac_check_lib_save_LIBS
10560 fi
10561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10562 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10563 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10564   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
10565 fi
10566
10567
10568     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
10569     have_timedwait=no
10570     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lc" >&5
10571 $as_echo_n "checking for sigtimedwait in -lc... " >&6; }
10572 if ${ac_cv_lib_c_sigtimedwait+:} false; then :
10573   $as_echo_n "(cached) " >&6
10574 else
10575   ac_check_lib_save_LIBS=$LIBS
10576 LIBS="-lc  $LIBS"
10577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10578 /* end confdefs.h.  */
10579
10580 /* Override any GCC internal prototype to avoid an error.
10581    Use char because int might match the return type of a GCC
10582    builtin and then its argument prototype would still apply.  */
10583 #ifdef __cplusplus
10584 extern "C"
10585 #endif
10586 char sigtimedwait ();
10587 int
10588 main ()
10589 {
10590 return sigtimedwait ();
10591   ;
10592   return 0;
10593 }
10594 _ACEOF
10595 if ac_fn_c_try_link "$LINENO"; then :
10596   ac_cv_lib_c_sigtimedwait=yes
10597 else
10598   ac_cv_lib_c_sigtimedwait=no
10599 fi
10600 rm -f core conftest.err conftest.$ac_objext \
10601     conftest$ac_exeext conftest.$ac_ext
10602 LIBS=$ac_check_lib_save_LIBS
10603 fi
10604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigtimedwait" >&5
10605 $as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
10606 if test "x$ac_cv_lib_c_sigtimedwait" = xyes; then :
10607   have_timedwait=yes
10608                   $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
10609
10610 fi
10611
10612     if test "$have_timedwait" = no ; then
10613       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lrt" >&5
10614 $as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
10615 if ${ac_cv_lib_rt_sigtimedwait+:} false; then :
10616   $as_echo_n "(cached) " >&6
10617 else
10618   ac_check_lib_save_LIBS=$LIBS
10619 LIBS="-lrt  $LIBS"
10620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10621 /* end confdefs.h.  */
10622
10623 /* Override any GCC internal prototype to avoid an error.
10624    Use char because int might match the return type of a GCC
10625    builtin and then its argument prototype would still apply.  */
10626 #ifdef __cplusplus
10627 extern "C"
10628 #endif
10629 char sigtimedwait ();
10630 int
10631 main ()
10632 {
10633 return sigtimedwait ();
10634   ;
10635   return 0;
10636 }
10637 _ACEOF
10638 if ac_fn_c_try_link "$LINENO"; then :
10639   ac_cv_lib_rt_sigtimedwait=yes
10640 else
10641   ac_cv_lib_rt_sigtimedwait=no
10642 fi
10643 rm -f core conftest.err conftest.$ac_objext \
10644     conftest$ac_exeext conftest.$ac_ext
10645 LIBS=$ac_check_lib_save_LIBS
10646 fi
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sigtimedwait" >&5
10648 $as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
10649 if test "x$ac_cv_lib_rt_sigtimedwait" = xyes; then :
10650   have_timedwait=yes
10651                                       $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
10652
10653                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
10654 fi
10655
10656     fi
10657
10658     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call pam_strerror" >&5
10659 $as_echo_n "checking how to call pam_strerror... " >&6; }
10660     if ${ac_cv_pam_strerror_args+:} false; then :
10661   $as_echo_n "(cached) " >&6
10662 else
10663
10664   ac_save_CPPFLAGS="$CPPFLAGS"
10665   if test \! -z "$includedir" ; then
10666     CPPFLAGS="$CPPFLAGS -I$includedir"
10667   fi
10668   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10669   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10670   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10671 /* end confdefs.h.  */
10672 #include <stdio.h>
10673                         #include <stdlib.h>
10674                         #include <security/pam_appl.h>
10675 int
10676 main ()
10677 {
10678 pam_handle_t *pamh = 0;
10679                         char *s = pam_strerror(pamh, PAM_SUCCESS);
10680   ;
10681   return 0;
10682 }
10683 _ACEOF
10684 if ac_fn_c_try_compile "$LINENO"; then :
10685   ac_pam_strerror_args=2
10686 else
10687
10688   ac_save_CPPFLAGS="$CPPFLAGS"
10689   if test \! -z "$includedir" ; then
10690     CPPFLAGS="$CPPFLAGS -I$includedir"
10691   fi
10692   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10693   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10694   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10695 /* end confdefs.h.  */
10696 #include <stdio.h>
10697                                           #include <stdlib.h>
10698                                           #include <security/pam_appl.h>
10699 int
10700 main ()
10701 {
10702 char *s =
10703                                            pam_strerror(PAM_SUCCESS);
10704   ;
10705   return 0;
10706 }
10707 _ACEOF
10708 if ac_fn_c_try_compile "$LINENO"; then :
10709   ac_pam_strerror_args=1
10710 else
10711   ac_pam_strerror_args=0
10712 fi
10713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10714   CPPFLAGS="$ac_save_CPPFLAGS"
10715 fi
10716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10717   CPPFLAGS="$ac_save_CPPFLAGS"
10718       ac_cv_pam_strerror_args=$ac_pam_strerror_args
10719 fi
10720
10721     ac_pam_strerror_args=$ac_cv_pam_strerror_args
10722     if test "$ac_pam_strerror_args" = 1 ; then
10723       { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
10724 $as_echo "one argument" >&6; }
10725     elif test "$ac_pam_strerror_args" = 2 ; then
10726       $as_echo "#define PAM_STRERROR_TWO_ARGS 1" >>confdefs.h
10727
10728       { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
10729 $as_echo "two arguments" >&6; }
10730     else
10731       { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
10732 $as_echo "unknown" >&6; }
10733     fi
10734
10735 # Check pam_fail_delay
10736     { $as_echo "$as_me:${as_lineno-$LINENO}: checking pam_fail_delay in -lpam" >&5
10737 $as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
10738     if ${ac_cv_pam_fail_delay+:} false; then :
10739   $as_echo_n "(cached) " >&6
10740 else
10741   ac_save_LDFLAGS="$LDFLAGS"
10742       LDFLAGS="-lpam"
10743       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10744 /* end confdefs.h.  */
10745 #include <security/pam_appl.h>
10746 int
10747 main ()
10748 {
10749 pam_handle_t *pamh = 0;
10750                    unsigned int usec = 1;
10751                    int status = pam_fail_delay (pamh, usec);
10752   ;
10753   return 0;
10754 }
10755 _ACEOF
10756 if ac_fn_c_try_link "$LINENO"; then :
10757   ac_pam_fail_delay=yes
10758 else
10759   ac_pam_fail_delay=no
10760 fi
10761 rm -f core conftest.err conftest.$ac_objext \
10762     conftest$ac_exeext conftest.$ac_ext
10763       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
10764       LDFLAGS=$ac_save_LDFLAGS
10765 fi
10766
10767
10768       if test "$ac_pam_fail_delay" = yes ; then
10769         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10770 $as_echo "yes" >&6; }
10771         $as_echo "#define HAVE_PAM_FAIL_DELAY 1" >>confdefs.h
10772
10773       else
10774         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10775 $as_echo "no" >&6; }
10776       fi
10777
10778   fi
10779 fi
10780
10781
10782 ###############################################################################
10783 #
10784 #       Check for Kerberos.
10785 #
10786 ###############################################################################
10787
10788 have_kerberos=no
10789 have_kerberos5=no
10790 with_kerberos_req=unspecified
10791
10792
10793 # Check whether --with-kerberos was given.
10794 if test "${with_kerberos+set}" = set; then :
10795   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
10796 else
10797   with_kerberos=yes
10798 fi
10799
10800
10801
10802    case "$with_kerberos" in
10803     yes) ;;
10804     no)  ;;
10805
10806     /*)
10807      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos headers" >&5
10808 $as_echo_n "checking for Kerberos headers... " >&6; }
10809      d=$with_kerberos/include
10810      if test -d $d; then
10811        X_CFLAGS="-I$d $X_CFLAGS"
10812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10813 $as_echo "$d" >&6; }
10814      else
10815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10816 $as_echo "not found ($d: no such directory)" >&6; }
10817      fi
10818
10819      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos libs" >&5
10820 $as_echo_n "checking for Kerberos libs... " >&6; }
10821      d=$with_kerberos/lib
10822      if test -d $d; then
10823        X_LIBS="-L$d $X_LIBS"
10824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10825 $as_echo "$d" >&6; }
10826      else
10827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10828 $as_echo "not found ($d: no such directory)" >&6; }
10829      fi
10830
10831      # replace the directory string with "yes".
10832      with_kerberos_req="yes"
10833      with_kerberos=$with_kerberos_req
10834      ;;
10835
10836     *)
10837      echo ""
10838      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
10839      echo "       If it is a directory, then \`DIR/include' will be added to"
10840      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10841      exit 1
10842      ;;
10843    esac
10844
10845
10846 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
10847   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 4" >&5
10848 $as_echo_n "checking for Kerberos 4... " >&6; }
10849 if ${ac_cv_kerberos+:} false; then :
10850   $as_echo_n "(cached) " >&6
10851 else
10852
10853   ac_save_CPPFLAGS="$CPPFLAGS"
10854   if test \! -z "$includedir" ; then
10855     CPPFLAGS="$CPPFLAGS -I$includedir"
10856   fi
10857   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10858   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10860 /* end confdefs.h.  */
10861 #include <krb.h>
10862 int
10863 main ()
10864 {
10865
10866   ;
10867   return 0;
10868 }
10869 _ACEOF
10870 if ac_fn_c_try_compile "$LINENO"; then :
10871   ac_cv_kerberos=yes
10872 else
10873   ac_cv_kerberos=no
10874 fi
10875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10876   CPPFLAGS="$ac_save_CPPFLAGS"
10877 fi
10878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos" >&5
10879 $as_echo "$ac_cv_kerberos" >&6; }
10880   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 5" >&5
10881 $as_echo_n "checking for Kerberos 5... " >&6; }
10882 if ${ac_cv_kerberos5+:} false; then :
10883   $as_echo_n "(cached) " >&6
10884 else
10885
10886   ac_save_CPPFLAGS="$CPPFLAGS"
10887   if test \! -z "$includedir" ; then
10888     CPPFLAGS="$CPPFLAGS -I$includedir"
10889   fi
10890   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10891   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10893 /* end confdefs.h.  */
10894 #include <kerberosIV/krb.h>
10895 int
10896 main ()
10897 {
10898
10899   ;
10900   return 0;
10901 }
10902 _ACEOF
10903 if ac_fn_c_try_compile "$LINENO"; then :
10904   ac_cv_kerberos5=yes
10905 else
10906   ac_cv_kerberos5=no
10907 fi
10908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10909   CPPFLAGS="$ac_save_CPPFLAGS"
10910 fi
10911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos5" >&5
10912 $as_echo "$ac_cv_kerberos5" >&6; }
10913
10914   if test "$ac_cv_kerberos" = yes ; then
10915     have_kerberos=yes
10916     $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10917
10918   fi
10919
10920   if test "$ac_cv_kerberos5" = yes ; then
10921
10922     # Andrew Snare <ajs@pigpond.com> wrote:
10923     #
10924     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
10925     # (krb4) was also available.  This turns out not to be the case with
10926     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
10927     # is optional.
10928     #
10929     # So, disable kerberosV support if libkrb4 can't be found.
10930     # This is not the best solution, but it makes the compile not fail.
10931     #
10932
10933   ac_save_CPPFLAGS="$CPPFLAGS"
10934   ac_save_LDFLAGS="$LDFLAGS"
10935 #  ac_save_LIBS="$LIBS"
10936
10937   if test \! -z "$includedir" ; then
10938     CPPFLAGS="$CPPFLAGS -I$includedir"
10939   fi
10940   # note: $X_CFLAGS includes $x_includes
10941   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10942
10943   if test \! -z "$libdir" ; then
10944     LDFLAGS="$LDFLAGS -L$libdir"
10945   fi
10946   # note: $X_LIBS includes $x_libraries
10947   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10948
10949   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10950   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10951   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_tf_realm in -lkrb4" >&5
10952 $as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
10953 if ${ac_cv_lib_krb4_krb_get_tf_realm+:} false; then :
10954   $as_echo_n "(cached) " >&6
10955 else
10956   ac_check_lib_save_LIBS=$LIBS
10957 LIBS="-lkrb4  $LIBS"
10958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10959 /* end confdefs.h.  */
10960
10961 /* Override any GCC internal prototype to avoid an error.
10962    Use char because int might match the return type of a GCC
10963    builtin and then its argument prototype would still apply.  */
10964 #ifdef __cplusplus
10965 extern "C"
10966 #endif
10967 char krb_get_tf_realm ();
10968 int
10969 main ()
10970 {
10971 return krb_get_tf_realm ();
10972   ;
10973   return 0;
10974 }
10975 _ACEOF
10976 if ac_fn_c_try_link "$LINENO"; then :
10977   ac_cv_lib_krb4_krb_get_tf_realm=yes
10978 else
10979   ac_cv_lib_krb4_krb_get_tf_realm=no
10980 fi
10981 rm -f core conftest.err conftest.$ac_objext \
10982     conftest$ac_exeext conftest.$ac_ext
10983 LIBS=$ac_check_lib_save_LIBS
10984 fi
10985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
10986 $as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
10987 if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = xyes; then :
10988   have_kerberos=yes
10989 else
10990   have_kerberos=no
10991 fi
10992
10993   CPPFLAGS="$ac_save_CPPFLAGS"
10994   LDFLAGS="$ac_save_LDFLAGS"
10995 #  LIBS="$ac_save_LIBS"
10996
10997     if test "$have_kerberos" = yes ; then
10998       have_kerberos5=yes
10999       $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
11000
11001       $as_echo "#define HAVE_KERBEROS5 1" >>confdefs.h
11002
11003     else
11004       have_kerberos5=no
11005       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
11006 $as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
11007     fi
11008
11009   fi
11010
11011   if test "$have_kerberos5" = yes ; then
11012     # from Matt Knopp <mhat@infocalypse.netlag.com>
11013     # (who got it from amu@mit.edu)
11014
11015     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
11016
11017     # jwz: MacOS X uses -lkrb5, but not -lcrypt
11018
11019   ac_save_CPPFLAGS="$CPPFLAGS"
11020   ac_save_LDFLAGS="$LDFLAGS"
11021 #  ac_save_LIBS="$LIBS"
11022
11023   if test \! -z "$includedir" ; then
11024     CPPFLAGS="$CPPFLAGS -I$includedir"
11025   fi
11026   # note: $X_CFLAGS includes $x_includes
11027   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11028
11029   if test \! -z "$libdir" ; then
11030     LDFLAGS="$LDFLAGS -L$libdir"
11031   fi
11032   # note: $X_LIBS includes $x_libraries
11033   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11034
11035   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11036   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11037   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11038 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
11039 if ${ac_cv_lib_crypt_crypt+:} false; then :
11040   $as_echo_n "(cached) " >&6
11041 else
11042   ac_check_lib_save_LIBS=$LIBS
11043 LIBS="-lcrypt  $LIBS"
11044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11045 /* end confdefs.h.  */
11046
11047 /* Override any GCC internal prototype to avoid an error.
11048    Use char because int might match the return type of a GCC
11049    builtin and then its argument prototype would still apply.  */
11050 #ifdef __cplusplus
11051 extern "C"
11052 #endif
11053 char crypt ();
11054 int
11055 main ()
11056 {
11057 return crypt ();
11058   ;
11059   return 0;
11060 }
11061 _ACEOF
11062 if ac_fn_c_try_link "$LINENO"; then :
11063   ac_cv_lib_crypt_crypt=yes
11064 else
11065   ac_cv_lib_crypt_crypt=no
11066 fi
11067 rm -f core conftest.err conftest.$ac_objext \
11068     conftest$ac_exeext conftest.$ac_ext
11069 LIBS=$ac_check_lib_save_LIBS
11070 fi
11071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
11072 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11073 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
11074   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11075 fi
11076
11077   CPPFLAGS="$ac_save_CPPFLAGS"
11078   LDFLAGS="$ac_save_LDFLAGS"
11079 #  LIBS="$ac_save_LIBS"
11080
11081
11082   elif test "$have_kerberos" = yes ; then
11083     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
11084     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
11085   fi
11086
11087   if test "$have_kerberos" = yes ; then
11088     ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
11089 if test "x$ac_cv_func_res_search" = xyes; then :
11090
11091 else
11092   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
11093 $as_echo_n "checking for res_search in -lresolv... " >&6; }
11094 if ${ac_cv_lib_resolv_res_search+:} false; then :
11095   $as_echo_n "(cached) " >&6
11096 else
11097   ac_check_lib_save_LIBS=$LIBS
11098 LIBS="-lresolv  $LIBS"
11099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11100 /* end confdefs.h.  */
11101
11102 /* Override any GCC internal prototype to avoid an error.
11103    Use char because int might match the return type of a GCC
11104    builtin and then its argument prototype would still apply.  */
11105 #ifdef __cplusplus
11106 extern "C"
11107 #endif
11108 char res_search ();
11109 int
11110 main ()
11111 {
11112 return res_search ();
11113   ;
11114   return 0;
11115 }
11116 _ACEOF
11117 if ac_fn_c_try_link "$LINENO"; then :
11118   ac_cv_lib_resolv_res_search=yes
11119 else
11120   ac_cv_lib_resolv_res_search=no
11121 fi
11122 rm -f core conftest.err conftest.$ac_objext \
11123     conftest$ac_exeext conftest.$ac_ext
11124 LIBS=$ac_check_lib_save_LIBS
11125 fi
11126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
11127 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
11128 if test "x$ac_cv_lib_resolv_res_search" = xyes; then :
11129   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
11130 else
11131   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
11132 $as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
11133
11134 fi
11135
11136 fi
11137
11138   fi
11139 fi
11140
11141
11142 ###############################################################################
11143 #
11144 #       Check for the nine billion variants of shadow passwords...
11145 #
11146 ###############################################################################
11147
11148 need_setuid=no
11149
11150 have_shadow=no
11151 with_shadow_req=unspecified
11152
11153
11154 # Check whether --with-shadow was given.
11155 if test "${with_shadow+set}" = set; then :
11156   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
11157 else
11158   with_shadow=yes
11159 fi
11160
11161
11162
11163    case "$with_shadow" in
11164     yes) ;;
11165     no)  ;;
11166
11167     /*)
11168      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password headers" >&5
11169 $as_echo_n "checking for shadow password headers... " >&6; }
11170      d=$with_shadow/include
11171      if test -d $d; then
11172        X_CFLAGS="-I$d $X_CFLAGS"
11173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11174 $as_echo "$d" >&6; }
11175      else
11176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11177 $as_echo "not found ($d: no such directory)" >&6; }
11178      fi
11179
11180      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password libs" >&5
11181 $as_echo_n "checking for shadow password libs... " >&6; }
11182      d=$with_shadow/lib
11183      if test -d $d; then
11184        X_LIBS="-L$d $X_LIBS"
11185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11186 $as_echo "$d" >&6; }
11187      else
11188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11189 $as_echo "not found ($d: no such directory)" >&6; }
11190      fi
11191
11192      # replace the directory string with "yes".
11193      with_shadow_req="yes"
11194      with_shadow=$with_shadow_req
11195      ;;
11196
11197     *)
11198      echo ""
11199      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
11200      echo "       If it is a directory, then \`DIR/include' will be added to"
11201      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11202      exit 1
11203      ;;
11204    esac
11205
11206
11207 if test "$enable_locking" = no ; then
11208   with_shadow_req=no
11209   with_shadow=no
11210 fi
11211
11212
11213 ###############################################################################
11214 #
11215 #       Check for Sun "adjunct" passwords.
11216 #
11217 ###############################################################################
11218
11219 if test "$with_shadow" = yes ; then
11220   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sun-style shadow passwords" >&5
11221 $as_echo_n "checking for Sun-style shadow passwords... " >&6; }
11222 if ${ac_cv_sun_adjunct+:} false; then :
11223   $as_echo_n "(cached) " >&6
11224 else
11225
11226   ac_save_CPPFLAGS="$CPPFLAGS"
11227   if test \! -z "$includedir" ; then
11228     CPPFLAGS="$CPPFLAGS -I$includedir"
11229   fi
11230   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11231   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11232   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11233 /* end confdefs.h.  */
11234 #include <stdlib.h>
11235                                     #include <unistd.h>
11236                                     #include <sys/types.h>
11237                                     #include <sys/label.h>
11238                                     #include <sys/audit.h>
11239                                     #include <pwdadj.h>
11240 int
11241 main ()
11242 {
11243 struct passwd_adjunct *p = getpwanam("nobody");
11244                        const char *pw = p->pwa_passwd;
11245   ;
11246   return 0;
11247 }
11248 _ACEOF
11249 if ac_fn_c_try_compile "$LINENO"; then :
11250   ac_cv_sun_adjunct=yes
11251 else
11252   ac_cv_sun_adjunct=no
11253 fi
11254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11255   CPPFLAGS="$ac_save_CPPFLAGS"
11256 fi
11257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sun_adjunct" >&5
11258 $as_echo "$ac_cv_sun_adjunct" >&6; }
11259   if test "$ac_cv_sun_adjunct" = yes; then
11260     have_shadow_adjunct=yes
11261     have_shadow=yes
11262     need_setuid=yes
11263   fi
11264 fi
11265
11266
11267 ###############################################################################
11268 #
11269 #       Check for DEC and SCO so-called "enhanced" security.
11270 #
11271 ###############################################################################
11272
11273 if test "$with_shadow" = yes ; then
11274   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DEC-style shadow passwords" >&5
11275 $as_echo_n "checking for DEC-style shadow passwords... " >&6; }
11276 if ${ac_cv_enhanced_passwd+:} false; then :
11277   $as_echo_n "(cached) " >&6
11278 else
11279
11280   ac_save_CPPFLAGS="$CPPFLAGS"
11281   if test \! -z "$includedir" ; then
11282     CPPFLAGS="$CPPFLAGS -I$includedir"
11283   fi
11284   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11285   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11287 /* end confdefs.h.  */
11288 #include <stdlib.h>
11289                                     #include <unistd.h>
11290                                     #include <sys/types.h>
11291                                     #include <pwd.h>
11292                                     #include <sys/security.h>
11293                                     #include <prot.h>
11294 int
11295 main ()
11296 {
11297 struct pr_passwd *p;
11298                        const char *pw;
11299                        set_auth_parameters(0, 0);
11300                        check_auth_parameters();
11301                        p = getprpwnam("nobody");
11302                        pw = p->ufld.fd_encrypt;
11303   ;
11304   return 0;
11305 }
11306 _ACEOF
11307 if ac_fn_c_try_compile "$LINENO"; then :
11308   ac_cv_enhanced_passwd=yes
11309 else
11310   ac_cv_enhanced_passwd=no
11311 fi
11312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11313   CPPFLAGS="$ac_save_CPPFLAGS"
11314 fi
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enhanced_passwd" >&5
11316 $as_echo "$ac_cv_enhanced_passwd" >&6; }
11317   if test $ac_cv_enhanced_passwd = yes; then
11318     have_shadow_enhanced=yes
11319     have_shadow=yes
11320     need_setuid=yes
11321
11322     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
11323     # (I'm told it needs -lcurses too, but I don't understand why.)
11324     # But on DEC, it's in -lsecurity.
11325     #
11326     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lprot" >&5
11327 $as_echo_n "checking for getprpwnam in -lprot... " >&6; }
11328 if ${ac_cv_lib_prot_getprpwnam+:} false; then :
11329   $as_echo_n "(cached) " >&6
11330 else
11331   ac_check_lib_save_LIBS=$LIBS
11332 LIBS="-lprot -lx $LIBS"
11333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11334 /* end confdefs.h.  */
11335
11336 /* Override any GCC internal prototype to avoid an error.
11337    Use char because int might match the return type of a GCC
11338    builtin and then its argument prototype would still apply.  */
11339 #ifdef __cplusplus
11340 extern "C"
11341 #endif
11342 char getprpwnam ();
11343 int
11344 main ()
11345 {
11346 return getprpwnam ();
11347   ;
11348   return 0;
11349 }
11350 _ACEOF
11351 if ac_fn_c_try_link "$LINENO"; then :
11352   ac_cv_lib_prot_getprpwnam=yes
11353 else
11354   ac_cv_lib_prot_getprpwnam=no
11355 fi
11356 rm -f core conftest.err conftest.$ac_objext \
11357     conftest$ac_exeext conftest.$ac_ext
11358 LIBS=$ac_check_lib_save_LIBS
11359 fi
11360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getprpwnam" >&5
11361 $as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
11362 if test "x$ac_cv_lib_prot_getprpwnam" = xyes; then :
11363   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
11364 else
11365   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lsecurity" >&5
11366 $as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
11367 if ${ac_cv_lib_security_getprpwnam+:} false; then :
11368   $as_echo_n "(cached) " >&6
11369 else
11370   ac_check_lib_save_LIBS=$LIBS
11371 LIBS="-lsecurity  $LIBS"
11372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11373 /* end confdefs.h.  */
11374
11375 /* Override any GCC internal prototype to avoid an error.
11376    Use char because int might match the return type of a GCC
11377    builtin and then its argument prototype would still apply.  */
11378 #ifdef __cplusplus
11379 extern "C"
11380 #endif
11381 char getprpwnam ();
11382 int
11383 main ()
11384 {
11385 return getprpwnam ();
11386   ;
11387   return 0;
11388 }
11389 _ACEOF
11390 if ac_fn_c_try_link "$LINENO"; then :
11391   ac_cv_lib_security_getprpwnam=yes
11392 else
11393   ac_cv_lib_security_getprpwnam=no
11394 fi
11395 rm -f core conftest.err conftest.$ac_objext \
11396     conftest$ac_exeext conftest.$ac_ext
11397 LIBS=$ac_check_lib_save_LIBS
11398 fi
11399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_getprpwnam" >&5
11400 $as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
11401 if test "x$ac_cv_lib_security_getprpwnam" = xyes; then :
11402   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
11403 fi
11404
11405 fi
11406
11407   fi
11408 fi
11409
11410 ###############################################################################
11411 #
11412 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
11413 #
11414 ###############################################################################
11415
11416 if test "$with_shadow" = yes ; then
11417   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HP-style shadow passwords" >&5
11418 $as_echo_n "checking for HP-style shadow passwords... " >&6; }
11419 if ${ac_cv_hpux_passwd+:} false; then :
11420   $as_echo_n "(cached) " >&6
11421 else
11422
11423   ac_save_CPPFLAGS="$CPPFLAGS"
11424   if test \! -z "$includedir" ; then
11425     CPPFLAGS="$CPPFLAGS -I$includedir"
11426   fi
11427   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11428   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11429   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11430 /* end confdefs.h.  */
11431 #include <stdlib.h>
11432                                     #include <unistd.h>
11433                                     #include <sys/types.h>
11434                                     #include <pwd.h>
11435                                     #include <hpsecurity.h>
11436                                     #include <prot.h>
11437 int
11438 main ()
11439 {
11440 struct s_passwd *p = getspwnam("nobody");
11441                        const char *pw = p->pw_passwd;
11442   ;
11443   return 0;
11444 }
11445 _ACEOF
11446 if ac_fn_c_try_compile "$LINENO"; then :
11447   ac_cv_hpux_passwd=yes
11448 else
11449   ac_cv_hpux_passwd=no
11450 fi
11451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11452   CPPFLAGS="$ac_save_CPPFLAGS"
11453 fi
11454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_hpux_passwd" >&5
11455 $as_echo "$ac_cv_hpux_passwd" >&6; }
11456   if test "$ac_cv_hpux_passwd" = yes; then
11457     have_shadow_hpux=yes
11458     have_shadow=yes
11459     need_setuid=yes
11460
11461     # on HPUX, bigcrypt is in -lsec
11462     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsec" >&5
11463 $as_echo_n "checking for bigcrypt in -lsec... " >&6; }
11464 if ${ac_cv_lib_sec_bigcrypt+:} false; then :
11465   $as_echo_n "(cached) " >&6
11466 else
11467   ac_check_lib_save_LIBS=$LIBS
11468 LIBS="-lsec  $LIBS"
11469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11470 /* end confdefs.h.  */
11471
11472 /* Override any GCC internal prototype to avoid an error.
11473    Use char because int might match the return type of a GCC
11474    builtin and then its argument prototype would still apply.  */
11475 #ifdef __cplusplus
11476 extern "C"
11477 #endif
11478 char bigcrypt ();
11479 int
11480 main ()
11481 {
11482 return bigcrypt ();
11483   ;
11484   return 0;
11485 }
11486 _ACEOF
11487 if ac_fn_c_try_link "$LINENO"; then :
11488   ac_cv_lib_sec_bigcrypt=yes
11489 else
11490   ac_cv_lib_sec_bigcrypt=no
11491 fi
11492 rm -f core conftest.err conftest.$ac_objext \
11493     conftest$ac_exeext conftest.$ac_ext
11494 LIBS=$ac_check_lib_save_LIBS
11495 fi
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_bigcrypt" >&5
11497 $as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
11498 if test "x$ac_cv_lib_sec_bigcrypt" = xyes; then :
11499   PASSWD_LIBS="$PASSWD_LIBS -lsec"
11500 fi
11501
11502   fi
11503 fi
11504
11505
11506 ###############################################################################
11507 #
11508 #       Check for FreeBSD-style shadow passwords.
11509 #
11510 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
11511 #       password systems -- except you only get stuff in the pw_passwd field
11512 #       if the running program is setuid.  So, guess that we've got this
11513 #       lossage to contend with if /etc/master.passwd exists, and default to
11514 #       a setuid installation.
11515 #
11516 ###############################################################################
11517
11518 if test "$with_shadow" = yes ; then
11519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeBSD-style shadow passwords" >&5
11520 $as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
11521 if ${ac_cv_master_passwd+:} false; then :
11522   $as_echo_n "(cached) " >&6
11523 else
11524   if test -f /etc/master.passwd ; then
11525                     ac_cv_master_passwd=yes
11526                   else
11527                     ac_cv_master_passwd=no
11528                   fi
11529 fi
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_master_passwd" >&5
11531 $as_echo "$ac_cv_master_passwd" >&6; }
11532   if test "$ac_cv_master_passwd" = yes; then
11533     need_setuid=yes
11534   fi
11535 fi
11536
11537
11538 ###############################################################################
11539 #
11540 #       Check for traditional (ha!) shadow passwords.
11541 #
11542 ###############################################################################
11543
11544 if test "$with_shadow" = yes ; then
11545   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic shadow passwords" >&5
11546 $as_echo_n "checking for generic shadow passwords... " >&6; }
11547 if ${ac_cv_shadow+:} false; then :
11548   $as_echo_n "(cached) " >&6
11549 else
11550
11551   ac_save_CPPFLAGS="$CPPFLAGS"
11552   if test \! -z "$includedir" ; then
11553     CPPFLAGS="$CPPFLAGS -I$includedir"
11554   fi
11555   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11556   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11558 /* end confdefs.h.  */
11559 #include <stdlib.h>
11560                                     #include <unistd.h>
11561                                     #include <sys/types.h>
11562                                     #include <pwd.h>
11563                                     #include <shadow.h>
11564 int
11565 main ()
11566 {
11567 struct spwd *p = getspnam("nobody");
11568                        const char *pw = p->sp_pwdp;
11569   ;
11570   return 0;
11571 }
11572 _ACEOF
11573 if ac_fn_c_try_compile "$LINENO"; then :
11574   ac_cv_shadow=yes
11575 else
11576   ac_cv_shadow=no
11577 fi
11578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11579   CPPFLAGS="$ac_save_CPPFLAGS"
11580 fi
11581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_shadow" >&5
11582 $as_echo "$ac_cv_shadow" >&6; }
11583   if test "$ac_cv_shadow" = yes; then
11584     have_shadow=yes
11585     need_setuid=yes
11586
11587     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
11588     have_getspnam=no
11589     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lc" >&5
11590 $as_echo_n "checking for getspnam in -lc... " >&6; }
11591 if ${ac_cv_lib_c_getspnam+:} false; then :
11592   $as_echo_n "(cached) " >&6
11593 else
11594   ac_check_lib_save_LIBS=$LIBS
11595 LIBS="-lc  $LIBS"
11596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11597 /* end confdefs.h.  */
11598
11599 /* Override any GCC internal prototype to avoid an error.
11600    Use char because int might match the return type of a GCC
11601    builtin and then its argument prototype would still apply.  */
11602 #ifdef __cplusplus
11603 extern "C"
11604 #endif
11605 char getspnam ();
11606 int
11607 main ()
11608 {
11609 return getspnam ();
11610   ;
11611   return 0;
11612 }
11613 _ACEOF
11614 if ac_fn_c_try_link "$LINENO"; then :
11615   ac_cv_lib_c_getspnam=yes
11616 else
11617   ac_cv_lib_c_getspnam=no
11618 fi
11619 rm -f core conftest.err conftest.$ac_objext \
11620     conftest$ac_exeext conftest.$ac_ext
11621 LIBS=$ac_check_lib_save_LIBS
11622 fi
11623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_getspnam" >&5
11624 $as_echo "$ac_cv_lib_c_getspnam" >&6; }
11625 if test "x$ac_cv_lib_c_getspnam" = xyes; then :
11626   have_getspnam=yes
11627 fi
11628
11629     if test "$have_getspnam" = no ; then
11630       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
11631 $as_echo_n "checking for getspnam in -lgen... " >&6; }
11632 if ${ac_cv_lib_gen_getspnam+:} false; then :
11633   $as_echo_n "(cached) " >&6
11634 else
11635   ac_check_lib_save_LIBS=$LIBS
11636 LIBS="-lgen  $LIBS"
11637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11638 /* end confdefs.h.  */
11639
11640 /* Override any GCC internal prototype to avoid an error.
11641    Use char because int might match the return type of a GCC
11642    builtin and then its argument prototype would still apply.  */
11643 #ifdef __cplusplus
11644 extern "C"
11645 #endif
11646 char getspnam ();
11647 int
11648 main ()
11649 {
11650 return getspnam ();
11651   ;
11652   return 0;
11653 }
11654 _ACEOF
11655 if ac_fn_c_try_link "$LINENO"; then :
11656   ac_cv_lib_gen_getspnam=yes
11657 else
11658   ac_cv_lib_gen_getspnam=no
11659 fi
11660 rm -f core conftest.err conftest.$ac_objext \
11661     conftest$ac_exeext conftest.$ac_ext
11662 LIBS=$ac_check_lib_save_LIBS
11663 fi
11664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
11665 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
11666 if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
11667   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
11668 fi
11669
11670     fi
11671   fi
11672 fi
11673
11674
11675 ###############################################################################
11676 #
11677 #       Check for other libraries needed for non-shadow passwords.
11678 #
11679 ###############################################################################
11680
11681 if test "$enable_locking" = yes ; then
11682
11683   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
11684   have_crypt=no
11685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lc" >&5
11686 $as_echo_n "checking for crypt in -lc... " >&6; }
11687 if ${ac_cv_lib_c_crypt+:} false; then :
11688   $as_echo_n "(cached) " >&6
11689 else
11690   ac_check_lib_save_LIBS=$LIBS
11691 LIBS="-lc  $LIBS"
11692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11693 /* end confdefs.h.  */
11694
11695 /* Override any GCC internal prototype to avoid an error.
11696    Use char because int might match the return type of a GCC
11697    builtin and then its argument prototype would still apply.  */
11698 #ifdef __cplusplus
11699 extern "C"
11700 #endif
11701 char crypt ();
11702 int
11703 main ()
11704 {
11705 return crypt ();
11706   ;
11707   return 0;
11708 }
11709 _ACEOF
11710 if ac_fn_c_try_link "$LINENO"; then :
11711   ac_cv_lib_c_crypt=yes
11712 else
11713   ac_cv_lib_c_crypt=no
11714 fi
11715 rm -f core conftest.err conftest.$ac_objext \
11716     conftest$ac_exeext conftest.$ac_ext
11717 LIBS=$ac_check_lib_save_LIBS
11718 fi
11719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_crypt" >&5
11720 $as_echo "$ac_cv_lib_c_crypt" >&6; }
11721 if test "x$ac_cv_lib_c_crypt" = xyes; then :
11722   have_crypt=yes
11723 fi
11724
11725   if test "$have_crypt" = no ; then
11726     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11727 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
11728 if ${ac_cv_lib_crypt_crypt+:} false; then :
11729   $as_echo_n "(cached) " >&6
11730 else
11731   ac_check_lib_save_LIBS=$LIBS
11732 LIBS="-lcrypt  $LIBS"
11733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11734 /* end confdefs.h.  */
11735
11736 /* Override any GCC internal prototype to avoid an error.
11737    Use char because int might match the return type of a GCC
11738    builtin and then its argument prototype would still apply.  */
11739 #ifdef __cplusplus
11740 extern "C"
11741 #endif
11742 char crypt ();
11743 int
11744 main ()
11745 {
11746 return crypt ();
11747   ;
11748   return 0;
11749 }
11750 _ACEOF
11751 if ac_fn_c_try_link "$LINENO"; then :
11752   ac_cv_lib_crypt_crypt=yes
11753 else
11754   ac_cv_lib_crypt_crypt=no
11755 fi
11756 rm -f core conftest.err conftest.$ac_objext \
11757     conftest$ac_exeext conftest.$ac_ext
11758 LIBS=$ac_check_lib_save_LIBS
11759 fi
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
11761 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11762 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
11763   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11764 fi
11765
11766   fi
11767 fi
11768
11769
11770 # Most of the above shadow mechanisms will have set need_setuid to yes,
11771 # if they were found.  But, on some systems, we need setuid even when
11772 # using plain old vanilla passwords.
11773 #
11774 if test "$enable_locking" = yes ; then
11775   case "$host" in
11776     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
11777       need_setuid=yes
11778     ;;
11779   esac
11780 fi
11781
11782
11783 if test "$have_shadow_adjunct" = yes ; then
11784   $as_echo "#define HAVE_ADJUNCT_PASSWD 1" >>confdefs.h
11785
11786 elif test "$have_shadow_enhanced" = yes ; then
11787   $as_echo "#define HAVE_ENHANCED_PASSWD 1" >>confdefs.h
11788
11789 elif test "$have_shadow_hpux" = yes ; then
11790   $as_echo "#define HAVE_HPUX_PASSWD 1" >>confdefs.h
11791
11792 elif test "$have_shadow" = yes ; then
11793   $as_echo "#define HAVE_SHADOW_PASSWD 1" >>confdefs.h
11794
11795 fi
11796
11797
11798 ###############################################################################
11799 #
11800 #       Check for external password helper
11801 #       On SuSE, instead of having xscreensaver be a setuid program, they
11802 #       fork an external program that takes the password on stdin, and
11803 #       returns true if that password is a valid one.  Then only that
11804 #       smaller program needs to be setuid.
11805 #
11806 #       (Note that this external program is not a GUI: the GUI is still
11807 #       all in xscreensaver itself; the external program just does auth.)
11808 #
11809 ###############################################################################
11810
11811 have_passwd_helper=no
11812 with_passwd_helper_req=unspecified
11813
11814
11815 # Check whether --with-passwd-helper was given.
11816 if test "${with_passwd_helper+set}" = set; then :
11817   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
11818 else
11819   with_passwd_helper=no
11820 fi
11821
11822 # no HANDLE_X_PATH_ARG for this one
11823
11824 if test "$enable_locking" = no ; then
11825   with_passwd_helper_req=no
11826   with_passwd_helper=no
11827 fi
11828
11829 case "$with_passwd_helper" in
11830   ""|no) : ;;
11831   /*)
11832     cat >>confdefs.h <<_ACEOF
11833 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
11834 _ACEOF
11835
11836     have_passwd_helper=yes;;
11837   *)
11838     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
11839     exit 1
11840 esac
11841
11842
11843 ###############################################################################
11844 #
11845 #       Check for a login manager for a "New Login" button on the lock dialog.
11846 #       Usually this will be "/usr/bin/gdmflexiserver".
11847 #
11848 ###############################################################################
11849
11850 with_login_manager_req=unspecified
11851 default_login_manager_1='gdmflexiserver -ls'
11852 default_login_manager_2='kdmctl reserve'
11853 default_login_manager_3='lxdm -c USER_SWITCH'
11854 default_login_manager_4='dm-tool switch-to-greeter'
11855
11856
11857 # Check whether --with-login-manager was given.
11858 if test "${with_login_manager+set}" = set; then :
11859   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
11860 else
11861   with_login_manager=yes
11862 fi
11863
11864 # no HANDLE_X_PATH_ARG for this one
11865
11866 if test "$enable_locking" = no ; then
11867   with_login_manager_req=no
11868   with_login_manager=no
11869 fi
11870
11871 case "$with_login_manager_req" in
11872   no)
11873     with_login_manager=""
11874   ;;
11875
11876   yes|unspecified)
11877     # Try various defaults, use the first one that exists.
11878
11879     with_login_manager=""
11880
11881     if test -z "$with_login_manager" ; then
11882       set dummy $default_login_manager_1 ; login_manager_tmp=$2
11883       unset ac_cv_path_login_manager_tmp  # don't cache
11884       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11885 set dummy $login_manager_tmp; ac_word=$2
11886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11887 $as_echo_n "checking for $ac_word... " >&6; }
11888 if ${ac_cv_path_login_manager_tmp+:} false; then :
11889   $as_echo_n "(cached) " >&6
11890 else
11891   case $login_manager_tmp in
11892   [\\/]* | ?:[\\/]*)
11893   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11894   ;;
11895   *)
11896   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11897 for as_dir in $PATH
11898 do
11899   IFS=$as_save_IFS
11900   test -z "$as_dir" && as_dir=.
11901     for ac_exec_ext in '' $ac_executable_extensions; do
11902   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11903     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11905     break 2
11906   fi
11907 done
11908   done
11909 IFS=$as_save_IFS
11910
11911   ;;
11912 esac
11913 fi
11914 login_manager_tmp=$ac_cv_path_login_manager_tmp
11915 if test -n "$login_manager_tmp"; then
11916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11917 $as_echo "$login_manager_tmp" >&6; }
11918 else
11919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11920 $as_echo "no" >&6; }
11921 fi
11922
11923
11924       if test ! -z "$login_manager_tmp" ; then
11925         with_login_manager="$default_login_manager_1"
11926       fi
11927     fi
11928
11929     if test -z "$with_login_manager" ; then
11930       set dummy $default_login_manager_2 ; login_manager_tmp=$2
11931       unset ac_cv_path_login_manager_tmp  # don't cache
11932       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11933 set dummy $login_manager_tmp; ac_word=$2
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11935 $as_echo_n "checking for $ac_word... " >&6; }
11936 if ${ac_cv_path_login_manager_tmp+:} false; then :
11937   $as_echo_n "(cached) " >&6
11938 else
11939   case $login_manager_tmp in
11940   [\\/]* | ?:[\\/]*)
11941   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11942   ;;
11943   *)
11944   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11945 for as_dir in $PATH
11946 do
11947   IFS=$as_save_IFS
11948   test -z "$as_dir" && as_dir=.
11949     for ac_exec_ext in '' $ac_executable_extensions; do
11950   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11951     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11953     break 2
11954   fi
11955 done
11956   done
11957 IFS=$as_save_IFS
11958
11959   ;;
11960 esac
11961 fi
11962 login_manager_tmp=$ac_cv_path_login_manager_tmp
11963 if test -n "$login_manager_tmp"; then
11964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11965 $as_echo "$login_manager_tmp" >&6; }
11966 else
11967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11968 $as_echo "no" >&6; }
11969 fi
11970
11971
11972       if test ! -z "$login_manager_tmp" ; then
11973         with_login_manager="$default_login_manager_2"
11974       fi
11975     fi
11976
11977     if test -z "$with_login_manager" ; then
11978       set dummy $default_login_manager_3 ; login_manager_tmp=$2
11979       unset ac_cv_path_login_manager_tmp  # don't cache
11980       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11981 set dummy $login_manager_tmp; ac_word=$2
11982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11983 $as_echo_n "checking for $ac_word... " >&6; }
11984 if ${ac_cv_path_login_manager_tmp+:} false; then :
11985   $as_echo_n "(cached) " >&6
11986 else
11987   case $login_manager_tmp in
11988   [\\/]* | ?:[\\/]*)
11989   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11990   ;;
11991   *)
11992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11993 for as_dir in $PATH
11994 do
11995   IFS=$as_save_IFS
11996   test -z "$as_dir" && as_dir=.
11997     for ac_exec_ext in '' $ac_executable_extensions; do
11998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11999     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
12000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12001     break 2
12002   fi
12003 done
12004   done
12005 IFS=$as_save_IFS
12006
12007   ;;
12008 esac
12009 fi
12010 login_manager_tmp=$ac_cv_path_login_manager_tmp
12011 if test -n "$login_manager_tmp"; then
12012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
12013 $as_echo "$login_manager_tmp" >&6; }
12014 else
12015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12016 $as_echo "no" >&6; }
12017 fi
12018
12019
12020       if test ! -z "$login_manager_tmp" ; then
12021         with_login_manager="$default_login_manager_3"
12022       fi
12023     fi
12024
12025     if test -z "$with_login_manager" ; then
12026       set dummy $default_login_manager_4 ; login_manager_tmp=$2
12027       unset ac_cv_path_login_manager_tmp  # don't cache
12028       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
12029 set dummy $login_manager_tmp; ac_word=$2
12030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12031 $as_echo_n "checking for $ac_word... " >&6; }
12032 if ${ac_cv_path_login_manager_tmp+:} false; then :
12033   $as_echo_n "(cached) " >&6
12034 else
12035   case $login_manager_tmp in
12036   [\\/]* | ?:[\\/]*)
12037   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
12038   ;;
12039   *)
12040   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12041 for as_dir in $PATH
12042 do
12043   IFS=$as_save_IFS
12044   test -z "$as_dir" && as_dir=.
12045     for ac_exec_ext in '' $ac_executable_extensions; do
12046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12047     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
12048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12049     break 2
12050   fi
12051 done
12052   done
12053 IFS=$as_save_IFS
12054
12055   ;;
12056 esac
12057 fi
12058 login_manager_tmp=$ac_cv_path_login_manager_tmp
12059 if test -n "$login_manager_tmp"; then
12060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
12061 $as_echo "$login_manager_tmp" >&6; }
12062 else
12063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12064 $as_echo "no" >&6; }
12065 fi
12066
12067
12068       if test ! -z "$login_manager_tmp" ; then
12069         with_login_manager="$default_login_manager_4"
12070       fi
12071     fi
12072
12073   ;;
12074
12075   /*)
12076     # absolute path specified on cmd line
12077     set dummy $with_login_manager_req ; login_manager_tmp=$2
12078     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $login_manager_tmp" >&5
12079 $as_echo_n "checking for $login_manager_tmp... " >&6; }
12080     if test -x "$login_manager_tmp" ; then
12081       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12082 $as_echo "yes" >&6; }
12083     else
12084       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12085 $as_echo "no" >&6; }
12086       with_login_manager=""
12087     fi
12088   ;;
12089
12090   *)
12091     # relative path specified on cmd line
12092     set dummy $with_login_manager_req ; login_manager_tmp=$2
12093     unset ac_cv_path_login_manager_tmp    # don't cache
12094     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
12095 set dummy $login_manager_tmp; ac_word=$2
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12097 $as_echo_n "checking for $ac_word... " >&6; }
12098 if ${ac_cv_path_login_manager_tmp+:} false; then :
12099   $as_echo_n "(cached) " >&6
12100 else
12101   case $login_manager_tmp in
12102   [\\/]* | ?:[\\/]*)
12103   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
12104   ;;
12105   *)
12106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12107 for as_dir in $PATH
12108 do
12109   IFS=$as_save_IFS
12110   test -z "$as_dir" && as_dir=.
12111     for ac_exec_ext in '' $ac_executable_extensions; do
12112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12113     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
12114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12115     break 2
12116   fi
12117 done
12118   done
12119 IFS=$as_save_IFS
12120
12121   ;;
12122 esac
12123 fi
12124 login_manager_tmp=$ac_cv_path_login_manager_tmp
12125 if test -n "$login_manager_tmp"; then
12126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
12127 $as_echo "$login_manager_tmp" >&6; }
12128 else
12129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12130 $as_echo "no" >&6; }
12131 fi
12132
12133
12134     if test -z "$login_manager_tmp" ; then
12135       with_login_manager=""
12136     else
12137       with_login_manager="$login_manager_tmp"
12138     fi
12139   ;;
12140 esac
12141 ac_cv_login_manager_program="$with_login_manager"
12142
12143 NEW_LOGIN_COMMAND_P=''
12144 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
12145
12146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for login manager" >&5
12147 $as_echo_n "checking for login manager... " >&6; }
12148 if test -z "$NEW_LOGIN_COMMAND" ; then
12149   NEW_LOGIN_COMMAND="$default_login_manager_1"
12150   NEW_LOGIN_COMMAND_P='! '
12151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND (disabled)" >&5
12152 $as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
12153 else
12154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND" >&5
12155 $as_echo "$NEW_LOGIN_COMMAND" >&6; }
12156 fi
12157
12158
12159 ###############################################################################
12160 #
12161 #       Check for -lgtk (and Gnome stuff)
12162 #
12163 ###############################################################################
12164
12165 have_gtk=no
12166 with_gtk_req=unspecified
12167
12168 # Check whether --with-gtk was given.
12169 if test "${with_gtk+set}" = set; then :
12170   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
12171 else
12172   with_gtk=yes
12173 fi
12174
12175
12176 # if --with-gtk=/directory/ was specified, remember that directory so that
12177 # we can also look for the `gtk-config' program in that directory.
12178 case "$with_gtk" in
12179   /*)
12180     gtk_dir="$with_gtk"
12181     ;;
12182   *)
12183     gtk_dir=""
12184     ;;
12185 esac
12186
12187
12188    case "$with_gtk" in
12189     yes) ;;
12190     no)  ;;
12191
12192     /*)
12193      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk headers" >&5
12194 $as_echo_n "checking for Gtk headers... " >&6; }
12195      d=$with_gtk/include
12196      if test -d $d; then
12197        X_CFLAGS="-I$d $X_CFLAGS"
12198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12199 $as_echo "$d" >&6; }
12200      else
12201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12202 $as_echo "not found ($d: no such directory)" >&6; }
12203      fi
12204
12205      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
12206 $as_echo_n "checking for Gtk libs... " >&6; }
12207      d=$with_gtk/lib
12208      if test -d $d; then
12209        X_LIBS="-L$d $X_LIBS"
12210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12211 $as_echo "$d" >&6; }
12212      else
12213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12214 $as_echo "not found ($d: no such directory)" >&6; }
12215      fi
12216
12217      # replace the directory string with "yes".
12218      with_gtk_req="yes"
12219      with_gtk=$with_gtk_req
12220      ;;
12221
12222     *)
12223      echo ""
12224      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
12225      echo "       If it is a directory, then \`DIR/include' will be added to"
12226      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12227      exit 1
12228      ;;
12229    esac
12230
12231
12232 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
12233   echo "error: must be yes or no: --with-gtk=$with_gtk"
12234   exit 1
12235 fi
12236
12237
12238 parse_gtk_version_string() {
12239   # M4 sucks!!
12240
12241   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
12242   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
12243
12244   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
12245   if test -z "$ac_gtk_version"; then
12246     ac_gtk_version=unknown
12247     ac_gtk_version_string=unknown
12248   fi
12249 }
12250
12251 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
12252 # if the user specified --with-gtk=/foo/ then look there.
12253 #
12254 gtk_path="$PATH"
12255 if test ! -z "$gtk_dir"; then
12256   # canonicalize slashes.
12257   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
12258   gtk_path="$foo:$gtk_path"
12259 fi
12260
12261 for ac_prog in pkg-config
12262 do
12263   # Extract the first word of "$ac_prog", so it can be a program name with args.
12264 set dummy $ac_prog; ac_word=$2
12265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12266 $as_echo_n "checking for $ac_word... " >&6; }
12267 if ${ac_cv_path_pkg_config+:} false; then :
12268   $as_echo_n "(cached) " >&6
12269 else
12270   case $pkg_config in
12271   [\\/]* | ?:[\\/]*)
12272   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
12273   ;;
12274   *)
12275   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12276 for as_dir in $gtk_path
12277 do
12278   IFS=$as_save_IFS
12279   test -z "$as_dir" && as_dir=.
12280     for ac_exec_ext in '' $ac_executable_extensions; do
12281   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12282     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
12283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12284     break 2
12285   fi
12286 done
12287   done
12288 IFS=$as_save_IFS
12289
12290   ;;
12291 esac
12292 fi
12293 pkg_config=$ac_cv_path_pkg_config
12294 if test -n "$pkg_config"; then
12295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config" >&5
12296 $as_echo "$pkg_config" >&6; }
12297 else
12298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12299 $as_echo "no" >&6; }
12300 fi
12301
12302
12303   test -n "$pkg_config" && break
12304 done
12305
12306
12307 if test -z "$pkg_config" ; then
12308   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found!" >&5
12309 $as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
12310   pkg_config="false"
12311 fi
12312
12313
12314 # Utility function for running pkg-config-based tests...
12315 #
12316 pkgs=''
12317 pkg_check_version() {
12318   if test "$ok" = yes ; then
12319     req="$1"
12320     min="$2"
12321     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $req" >&5
12322 $as_echo_n "checking for $req... " >&6; }
12323     if $pkg_config --exists "$req" ; then
12324       vers=`$pkg_config --modversion "$req"`
12325       if $pkg_config --exists "$req >= $min" ; then
12326         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers" >&5
12327 $as_echo "$vers" >&6; }
12328         pkgs="$pkgs $req"
12329         return 1
12330       else
12331         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers (wanted >= $min)" >&5
12332 $as_echo "$vers (wanted >= $min)" >&6; }
12333         ok=no
12334         return 0
12335       fi
12336     else
12337       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12338 $as_echo "no" >&6; }
12339       ok=no
12340       return 0
12341     fi
12342   fi
12343 }
12344
12345
12346 jurassic_gtk=no
12347 gtk_halfassed=no
12348 have_gtk_2_22_or_higher=no
12349 COMMENT_DEMO_GLADE2_GTK_2_22_HEAD=""
12350 COMMENT_DEMO_GLADE2_GTK_2_22_TAIL=""
12351
12352 if test "$with_gtk" = yes; then
12353   have_gtk=no
12354
12355   ok="yes"
12356   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
12357   pkg_check_version         gmodule-2.0  2.0.0
12358   pkg_check_version          libxml-2.0  2.4.6
12359   pkg_check_version        libglade-2.0  1.99.0
12360   pkg_check_version      gdk-pixbuf-2.0  2.0.0
12361   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
12362   have_gtk="$ok"
12363
12364   if test "$have_gtk" = no; then
12365     if test -n "$ac_gtk_version_string" ; then
12366       gtk_halfassed="$ac_gtk_version_string"
12367       gtk_halfassed_lib="$req"
12368     fi
12369   fi
12370
12371   if test "$have_gtk" = yes; then
12372     parse_gtk_version_string
12373     jurassic_gtk=no
12374   fi
12375
12376   if test "$have_gtk" = yes; then
12377     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk includes" >&5
12378 $as_echo_n "checking for Gtk includes... " >&6; }
12379 if ${ac_cv_gtk_config_cflags+:} false; then :
12380   $as_echo_n "(cached) " >&6
12381 else
12382   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
12383 fi
12384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_cflags" >&5
12385 $as_echo "$ac_cv_gtk_config_cflags" >&6; }
12386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
12387 $as_echo_n "checking for Gtk libs... " >&6; }
12388 if ${ac_cv_gtk_config_libs+:} false; then :
12389   $as_echo_n "(cached) " >&6
12390 else
12391   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
12392 fi
12393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_libs" >&5
12394 $as_echo "$ac_cv_gtk_config_libs" >&6; }
12395   fi
12396
12397   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12398   ac_gtk_config_libs=$ac_cv_gtk_config_libs
12399
12400   GTK_EXTRA_OBJS=""
12401   GTK_DATADIR=""
12402   if test "$have_gtk" = yes; then
12403     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
12404     GTK_DATADIR="$GTK_DATADIR/share"
12405   fi
12406
12407   if test "$have_gtk" = yes; then
12408     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
12409     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
12410     $as_echo "#define HAVE_GTK 1" >>confdefs.h
12411
12412     $as_echo "#define HAVE_GTK2 1" >>confdefs.h
12413
12414     $as_echo "#define HAVE_XML 1" >>confdefs.h
12415
12416   fi
12417
12418   if test "$have_gtk" = yes; then
12419     ok="yes"
12420     pkg_check_version gtk+-2.0 2.22
12421     have_gtk_2_22_or_higher="$ok"
12422     if test "$have_gtk_2_22_or_higher" = yes; then
12423       COMMENT_DEMO_GLADE2_GTK_2_22_HEAD="<!-- comment>"
12424       COMMENT_DEMO_GLADE2_GTK_2_22_TAIL="</comment -->"
12425     fi
12426   fi
12427 fi
12428
12429
12430 # Check for the various Gnome help and URL loading programs.
12431 #
12432 WITH_BROWSER=gnome-open
12433 if test "$have_gtk" = yes; then
12434   for ac_prog in gnome-open
12435 do
12436   # Extract the first word of "$ac_prog", so it can be a program name with args.
12437 set dummy $ac_prog; ac_word=$2
12438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12439 $as_echo_n "checking for $ac_word... " >&6; }
12440 if ${ac_cv_prog_gnome_open_program+:} false; then :
12441   $as_echo_n "(cached) " >&6
12442 else
12443   if test -n "$gnome_open_program"; then
12444   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
12445 else
12446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12447 for as_dir in $PATH
12448 do
12449   IFS=$as_save_IFS
12450   test -z "$as_dir" && as_dir=.
12451     for ac_exec_ext in '' $ac_executable_extensions; do
12452   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12453     ac_cv_prog_gnome_open_program="$ac_prog"
12454     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12455     break 2
12456   fi
12457 done
12458   done
12459 IFS=$as_save_IFS
12460
12461 fi
12462 fi
12463 gnome_open_program=$ac_cv_prog_gnome_open_program
12464 if test -n "$gnome_open_program"; then
12465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_open_program" >&5
12466 $as_echo "$gnome_open_program" >&6; }
12467 else
12468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12469 $as_echo "no" >&6; }
12470 fi
12471
12472
12473   test -n "$gnome_open_program" && break
12474 done
12475
12476   for ac_prog in gnome-url-show
12477 do
12478   # Extract the first word of "$ac_prog", so it can be a program name with args.
12479 set dummy $ac_prog; ac_word=$2
12480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12481 $as_echo_n "checking for $ac_word... " >&6; }
12482 if ${ac_cv_prog_gnome_url_show_program+:} false; then :
12483   $as_echo_n "(cached) " >&6
12484 else
12485   if test -n "$gnome_url_show_program"; then
12486   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
12487 else
12488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12489 for as_dir in $PATH
12490 do
12491   IFS=$as_save_IFS
12492   test -z "$as_dir" && as_dir=.
12493     for ac_exec_ext in '' $ac_executable_extensions; do
12494   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12495     ac_cv_prog_gnome_url_show_program="$ac_prog"
12496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12497     break 2
12498   fi
12499 done
12500   done
12501 IFS=$as_save_IFS
12502
12503 fi
12504 fi
12505 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
12506 if test -n "$gnome_url_show_program"; then
12507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_url_show_program" >&5
12508 $as_echo "$gnome_url_show_program" >&6; }
12509 else
12510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12511 $as_echo "no" >&6; }
12512 fi
12513
12514
12515   test -n "$gnome_url_show_program" && break
12516 done
12517
12518 fi
12519
12520
12521 ###############################################################################
12522 #
12523 #       Check for -lXm.
12524 #
12525 ###############################################################################
12526
12527 have_motif=no
12528 with_motif_req=unspecified
12529
12530 # Check whether --with-motif was given.
12531 if test "${with_motif+set}" = set; then :
12532   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
12533 else
12534   with_motif=no
12535 fi
12536
12537
12538
12539    case "$with_motif" in
12540     yes) ;;
12541     no)  ;;
12542
12543     /*)
12544      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif headers" >&5
12545 $as_echo_n "checking for Motif headers... " >&6; }
12546      d=$with_motif/include
12547      if test -d $d; then
12548        X_CFLAGS="-I$d $X_CFLAGS"
12549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12550 $as_echo "$d" >&6; }
12551      else
12552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12553 $as_echo "not found ($d: no such directory)" >&6; }
12554      fi
12555
12556      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif libs" >&5
12557 $as_echo_n "checking for Motif libs... " >&6; }
12558      d=$with_motif/lib
12559      if test -d $d; then
12560        X_LIBS="-L$d $X_LIBS"
12561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12562 $as_echo "$d" >&6; }
12563      else
12564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12565 $as_echo "not found ($d: no such directory)" >&6; }
12566      fi
12567
12568      # replace the directory string with "yes".
12569      with_motif_req="yes"
12570      with_motif=$with_motif_req
12571      ;;
12572
12573     *)
12574      echo ""
12575      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12576      echo "       If it is a directory, then \`DIR/include' will be added to"
12577      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12578      exit 1
12579      ;;
12580    esac
12581
12582
12583 if test "$with_motif" != yes -a "$with_motif" != no ; then
12584   echo "error: must be yes or no: --with-motif=$with_motif"
12585   exit 1
12586 fi
12587
12588 if test "$with_motif" = yes; then
12589   have_motif=no
12590
12591   ac_save_CPPFLAGS="$CPPFLAGS"
12592   if test \! -z "$includedir" ; then
12593     CPPFLAGS="$CPPFLAGS -I$includedir"
12594   fi
12595   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12596   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12597   ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "#include <stdlib.h>
12598                      #include <stdio.h>
12599                      #include <X11/Intrinsic.h>
12600 "
12601 if test "x$ac_cv_header_Xm_Xm_h" = xyes; then :
12602   have_motif=yes
12603                      $as_echo "#define HAVE_MOTIF 1" >>confdefs.h
12604
12605                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12606 fi
12607
12608
12609   CPPFLAGS="$ac_save_CPPFLAGS"
12610 fi
12611
12612
12613 if test "$have_motif" = yes; then
12614
12615   ac_save_CPPFLAGS="$CPPFLAGS"
12616   if test \! -z "$includedir" ; then
12617     CPPFLAGS="$CPPFLAGS -I$includedir"
12618   fi
12619   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12620   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12621   ac_fn_c_check_header_compile "$LINENO" "Xm/ComboBox.h" "ac_cv_header_Xm_ComboBox_h" "#include <stdlib.h>
12622                      #include <stdio.h>
12623                      #include <X11/Intrinsic.h>
12624 "
12625 if test "x$ac_cv_header_Xm_ComboBox_h" = xyes; then :
12626   $as_echo "#define HAVE_XMCOMBOBOX 1" >>confdefs.h
12627
12628 fi
12629
12630
12631   CPPFLAGS="$ac_save_CPPFLAGS"
12632 fi
12633
12634
12635 ###############################################################################
12636 #
12637 #       Checking whether Motif is really Lesstif.
12638 #
12639 ###############################################################################
12640
12641 have_lesstif=no
12642 if test "$have_motif" = yes ; then
12643   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif is really LessTif" >&5
12644 $as_echo_n "checking whether Motif is really LessTif... " >&6; }
12645 if ${ac_cv_have_lesstif+:} false; then :
12646   $as_echo_n "(cached) " >&6
12647 else
12648
12649   ac_save_CPPFLAGS="$CPPFLAGS"
12650   if test \! -z "$includedir" ; then
12651     CPPFLAGS="$CPPFLAGS -I$includedir"
12652   fi
12653   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12654   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12656 /* end confdefs.h.  */
12657 #include <Xm/Xm.h>
12658 int
12659 main ()
12660 {
12661 long vers = LesstifVersion;
12662   ;
12663   return 0;
12664 }
12665 _ACEOF
12666 if ac_fn_c_try_compile "$LINENO"; then :
12667   ac_cv_have_lesstif=yes
12668 else
12669   ac_cv_have_lesstif=no
12670 fi
12671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12672   CPPFLAGS="$ac_save_CPPFLAGS"
12673 fi
12674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lesstif" >&5
12675 $as_echo "$ac_cv_have_lesstif" >&6; }
12676   have_lesstif=$ac_cv_have_lesstif
12677 fi
12678
12679
12680 lesstif_version=unknown
12681 lesstif_version_string=unknown
12682
12683 if test "$have_lesstif" = yes ; then
12684   ltv=unknown
12685   echo unknown > conftest-lt
12686   { $as_echo "$as_me:${as_lineno-$LINENO}: checking LessTif version number" >&5
12687 $as_echo_n "checking LessTif version number... " >&6; }
12688 if ${ac_cv_lesstif_version_string+:} false; then :
12689   $as_echo_n "(cached) " >&6
12690 else
12691
12692   ac_save_CPPFLAGS="$CPPFLAGS"
12693   if test \! -z "$includedir" ; then
12694     CPPFLAGS="$CPPFLAGS -I$includedir"
12695   fi
12696   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12697   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12698   if test "$cross_compiling" = yes; then :
12699   ac_cv_lesstif_version=unknown
12700                      ac_cv_lesstif_version_string=unknown
12701 else
12702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12703 /* end confdefs.h.  */
12704 #include <stdio.h>
12705                      #include <Xm/Xm.h>
12706                      int main() {
12707                        FILE *f = fopen("conftest-lt", "w");
12708                        if (!f) exit(1);
12709                        fprintf(f, "%d %d.%d\n", LesstifVersion,
12710                           LESSTIF_VERSION, LESSTIF_REVISION);
12711                        fclose(f);
12712                        exit(0);
12713                      }
12714 _ACEOF
12715 if ac_fn_c_try_run "$LINENO"; then :
12716   ltv=`cat conftest-lt`
12717                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
12718                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
12719 else
12720   ac_cv_lesstif_version=unknown
12721                      ac_cv_lesstif_version_string=unknown
12722 fi
12723 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12724   conftest.$ac_objext conftest.beam conftest.$ac_ext
12725 fi
12726
12727   CPPFLAGS="$ac_save_CPPFLAGS"
12728 fi
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lesstif_version_string" >&5
12730 $as_echo "$ac_cv_lesstif_version_string" >&6; }
12731   rm -rf conftest-lt
12732   lesstif_version=$ac_cv_lesstif_version
12733   lesstif_version_string=$ac_cv_lesstif_version_string
12734
12735 fi
12736
12737
12738 if test "$have_motif" = yes ; then
12739   mtv=unknown
12740   echo unknown > conftest-mt
12741   { $as_echo "$as_me:${as_lineno-$LINENO}: checking Motif version number" >&5
12742 $as_echo_n "checking Motif version number... " >&6; }
12743 if ${ac_cv_motif_version_string+:} false; then :
12744   $as_echo_n "(cached) " >&6
12745 else
12746
12747   ac_save_CPPFLAGS="$CPPFLAGS"
12748   if test \! -z "$includedir" ; then
12749     CPPFLAGS="$CPPFLAGS -I$includedir"
12750   fi
12751   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12752   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12753   if test "$cross_compiling" = yes; then :
12754   ac_cv_motif_version=unknown
12755                      ac_cv_motif_version_string=unknown
12756 else
12757   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12758 /* end confdefs.h.  */
12759 #include <stdio.h>
12760                      #include <Xm/Xm.h>
12761                      int main() {
12762                        FILE *f = fopen("conftest-mt", "w");
12763                        if (!f) exit(1);
12764                        fprintf(f, "%d %d.%d\n", XmVersion,
12765                           XmVERSION, XmREVISION);
12766                        fclose(f);
12767                        exit(0);
12768                      }
12769 _ACEOF
12770 if ac_fn_c_try_run "$LINENO"; then :
12771   mtv=`cat conftest-mt`
12772                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
12773                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
12774 else
12775   ac_cv_motif_version=unknown
12776                      ac_cv_motif_version_string=unknown
12777 fi
12778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12779   conftest.$ac_objext conftest.beam conftest.$ac_ext
12780 fi
12781
12782   CPPFLAGS="$ac_save_CPPFLAGS"
12783 fi
12784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_motif_version_string" >&5
12785 $as_echo "$ac_cv_motif_version_string" >&6; }
12786   rm -rf conftest-mt
12787   motif_version=$ac_cv_motif_version
12788   motif_version_string=$ac_cv_motif_version_string
12789
12790 fi
12791
12792
12793 ###############################################################################
12794 #
12795 #       Checking whether Motif requires -lXpm.
12796 #
12797 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
12798 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
12799 #       of the library whether to build the XPM code into libXm, or whether
12800 #       to rely on an external libXm.  So the only way to tell whether XPM is
12801 #       a link-time requirement is to examine libXm.a, which is very
12802 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
12803 #       always link against XPM if the XPM lib exists (and this will be a
12804 #       no-op if libXm happens to already have the XPM code in it.)
12805 #
12806 ###############################################################################
12807
12808 motif_requires_xpm=no
12809 if test "$have_motif" = yes ; then
12810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif requires XPM" >&5
12811 $as_echo_n "checking whether Motif requires XPM... " >&6; }
12812    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
12813    then
12814      motif_requires_xpm=yes
12815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
12816 $as_echo "maybe" >&6; }
12817    else
12818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12819 $as_echo "no" >&6; }
12820    fi
12821 fi
12822
12823
12824 ###############################################################################
12825 #
12826 #       Checking whether Motif requires -lXp.
12827 #
12828 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
12829 #       Extension".   Why this extension isn't in -lXext with all the others,
12830 #       I have no idea.
12831 #
12832 ###############################################################################
12833
12834 have_xp_ext=no
12835 if test "$have_motif" = yes ; then
12836    have_xp_ext=no
12837
12838   ac_save_CPPFLAGS="$CPPFLAGS"
12839   ac_save_LDFLAGS="$LDFLAGS"
12840 #  ac_save_LIBS="$LIBS"
12841
12842   if test \! -z "$includedir" ; then
12843     CPPFLAGS="$CPPFLAGS -I$includedir"
12844   fi
12845   # note: $X_CFLAGS includes $x_includes
12846   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12847
12848   if test \! -z "$libdir" ; then
12849     LDFLAGS="$LDFLAGS -L$libdir"
12850   fi
12851   # note: $X_LIBS includes $x_libraries
12852   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12853
12854   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12855   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12856   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpQueryExtension in -lXp" >&5
12857 $as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
12858 if ${ac_cv_lib_Xp_XpQueryExtension+:} false; then :
12859   $as_echo_n "(cached) " >&6
12860 else
12861   ac_check_lib_save_LIBS=$LIBS
12862 LIBS="-lXp -lX11 -lXext -lm $LIBS"
12863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12864 /* end confdefs.h.  */
12865
12866 /* Override any GCC internal prototype to avoid an error.
12867    Use char because int might match the return type of a GCC
12868    builtin and then its argument prototype would still apply.  */
12869 #ifdef __cplusplus
12870 extern "C"
12871 #endif
12872 char XpQueryExtension ();
12873 int
12874 main ()
12875 {
12876 return XpQueryExtension ();
12877   ;
12878   return 0;
12879 }
12880 _ACEOF
12881 if ac_fn_c_try_link "$LINENO"; then :
12882   ac_cv_lib_Xp_XpQueryExtension=yes
12883 else
12884   ac_cv_lib_Xp_XpQueryExtension=no
12885 fi
12886 rm -f core conftest.err conftest.$ac_objext \
12887     conftest$ac_exeext conftest.$ac_ext
12888 LIBS=$ac_check_lib_save_LIBS
12889 fi
12890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
12891 $as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
12892 if test "x$ac_cv_lib_Xp_XpQueryExtension" = xyes; then :
12893   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
12894 else
12895   true
12896 fi
12897
12898   CPPFLAGS="$ac_save_CPPFLAGS"
12899   LDFLAGS="$ac_save_LDFLAGS"
12900 #  LIBS="$ac_save_LIBS"
12901
12902 fi
12903
12904
12905 ###############################################################################
12906 #
12907 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
12908 #
12909 ###############################################################################
12910
12911 have_xintl=no
12912 if test "$have_motif" = yes ; then
12913
12914   ac_save_CPPFLAGS="$CPPFLAGS"
12915   ac_save_LDFLAGS="$LDFLAGS"
12916 #  ac_save_LIBS="$LIBS"
12917
12918   if test \! -z "$includedir" ; then
12919     CPPFLAGS="$CPPFLAGS -I$includedir"
12920   fi
12921   # note: $X_CFLAGS includes $x_includes
12922   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12923
12924   if test \! -z "$libdir" ; then
12925     LDFLAGS="$LDFLAGS -L$libdir"
12926   fi
12927   # note: $X_LIBS includes $x_libraries
12928   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12929
12930   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12931   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Xsetlocale in -lXintl" >&5
12933 $as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
12934 if ${ac_cv_lib_Xintl__Xsetlocale+:} false; then :
12935   $as_echo_n "(cached) " >&6
12936 else
12937   ac_check_lib_save_LIBS=$LIBS
12938 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
12939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12940 /* end confdefs.h.  */
12941
12942 /* Override any GCC internal prototype to avoid an error.
12943    Use char because int might match the return type of a GCC
12944    builtin and then its argument prototype would still apply.  */
12945 #ifdef __cplusplus
12946 extern "C"
12947 #endif
12948 char _Xsetlocale ();
12949 int
12950 main ()
12951 {
12952 return _Xsetlocale ();
12953   ;
12954   return 0;
12955 }
12956 _ACEOF
12957 if ac_fn_c_try_link "$LINENO"; then :
12958   ac_cv_lib_Xintl__Xsetlocale=yes
12959 else
12960   ac_cv_lib_Xintl__Xsetlocale=no
12961 fi
12962 rm -f core conftest.err conftest.$ac_objext \
12963     conftest$ac_exeext conftest.$ac_ext
12964 LIBS=$ac_check_lib_save_LIBS
12965 fi
12966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
12967 $as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
12968 if test "x$ac_cv_lib_Xintl__Xsetlocale" = xyes; then :
12969   have_xintl=yes
12970 else
12971   have_xintl=no
12972 fi
12973
12974   CPPFLAGS="$ac_save_CPPFLAGS"
12975   LDFLAGS="$ac_save_LDFLAGS"
12976 #  LIBS="$ac_save_LIBS"
12977
12978   if test "$have_xintl" = yes; then
12979     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
12980   fi
12981 fi
12982
12983
12984 ###############################################################################
12985 #
12986 #       Check for -lGL or -lMesaGL.
12987 #
12988 ###############################################################################
12989
12990 have_gl=no
12991 ac_have_mesa_gl=no
12992 with_gl_req=unspecified
12993 gl_halfassed=no
12994
12995 # Check whether --with-gl was given.
12996 if test "${with_gl+set}" = set; then :
12997   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
12998 else
12999   with_gl=yes
13000 fi
13001
13002
13003
13004    case "$with_gl" in
13005     yes) ;;
13006     no)  ;;
13007
13008     /*)
13009      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL headers" >&5
13010 $as_echo_n "checking for GL headers... " >&6; }
13011      d=$with_gl/include
13012      if test -d $d; then
13013        X_CFLAGS="-I$d $X_CFLAGS"
13014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13015 $as_echo "$d" >&6; }
13016      else
13017        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13018 $as_echo "not found ($d: no such directory)" >&6; }
13019      fi
13020
13021      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL libs" >&5
13022 $as_echo_n "checking for GL libs... " >&6; }
13023      d=$with_gl/lib
13024      if test -d $d; then
13025        X_LIBS="-L$d $X_LIBS"
13026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13027 $as_echo "$d" >&6; }
13028      else
13029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13030 $as_echo "not found ($d: no such directory)" >&6; }
13031      fi
13032
13033      # replace the directory string with "yes".
13034      with_gl_req="yes"
13035      with_gl=$with_gl_req
13036      ;;
13037
13038     *)
13039      echo ""
13040      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
13041      echo "       If it is a directory, then \`DIR/include' will be added to"
13042      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13043      exit 1
13044      ;;
13045    esac
13046
13047
13048 ac_mesagl_version=unknown
13049 ac_mesagl_version_string=unknown
13050
13051 if test "$with_gl" = yes; then
13052
13053   ac_save_CPPFLAGS="$CPPFLAGS"
13054   if test \! -z "$includedir" ; then
13055     CPPFLAGS="$CPPFLAGS -I$includedir"
13056   fi
13057   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13058   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13059   ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
13060 if test "x$ac_cv_header_GL_gl_h" = xyes; then :
13061   have_gl=yes
13062 else
13063   have_gl=no
13064 fi
13065
13066
13067   CPPFLAGS="$ac_save_CPPFLAGS"
13068   if test "$have_gl" = yes ; then
13069
13070   ac_save_CPPFLAGS="$CPPFLAGS"
13071   if test \! -z "$includedir" ; then
13072     CPPFLAGS="$CPPFLAGS -I$includedir"
13073   fi
13074   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13075   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13076   ac_fn_c_check_header_compile "$LINENO" "GL/glx.h" "ac_cv_header_GL_glx_h" "#include <GL/gl.h>
13077 "
13078 if test "x$ac_cv_header_GL_glx_h" = xyes; then :
13079   have_gl=yes
13080 else
13081   have_gl=no
13082 fi
13083
13084
13085   CPPFLAGS="$ac_save_CPPFLAGS"
13086   fi
13087
13088   # If we have the headers, try and figure out which vendor it's from.
13089   #
13090   if test "$have_gl" = yes ; then
13091
13092     # We need to know whether it's MesaGL so that we know which libraries
13093     # to link against.
13094     #
13095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GL is really MesaGL" >&5
13096 $as_echo_n "checking whether GL is really MesaGL... " >&6; }
13097 if ${ac_cv_have_mesa_gl+:} false; then :
13098   $as_echo_n "(cached) " >&6
13099 else
13100   ac_cv_have_mesa_gl=no
13101        if test "$ac_macosx" = no; then
13102          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
13103          # It's not really Mesa, is it?
13104
13105   ac_save_CPPFLAGS="$CPPFLAGS"
13106   if test \! -z "$includedir" ; then
13107     CPPFLAGS="$CPPFLAGS -I$includedir"
13108   fi
13109   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13110   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13112 /* end confdefs.h.  */
13113 #include <GL/glx.h>
13114
13115 _ACEOF
13116 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13117   $EGREP "Mesa|MESA" >/dev/null 2>&1; then :
13118   ac_cv_have_mesa_gl=yes
13119 fi
13120 rm -rf conftest*
13121
13122   CPPFLAGS="$ac_save_CPPFLAGS"
13123        fi
13124 fi
13125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mesa_gl" >&5
13126 $as_echo "$ac_cv_have_mesa_gl" >&6; }
13127     ac_have_mesa_gl=$ac_cv_have_mesa_gl
13128
13129     gl_lib_1=""
13130     GL_LIBS=""
13131
13132     if test "$ac_macosx" = yes; then
13133
13134       # Without these, every link against libGL gets a bunch of useless
13135       # warnings.
13136       #
13137       osx_crud="-bind_at_load -multiply_defined suppress"
13138       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
13139 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
13140       GL_LIBS="$GL_LIBS $osx_crud"
13141       unset osx_crud
13142
13143       # New lossage in 10.5.0: without this, we get:
13144       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
13145       #
13146       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
13147       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
13148
13149       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
13150 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
13151       GL_LIBS="$GL_LIBS $osx_crud"
13152       unset osx_crud
13153
13154       # New lossage in 10.6.8: we can't allow -L/opt/local/lib to be in the
13155       # link line, or at runtime XQueryExtension gets a segv due to some kind
13156       # of library version skew.  Libs must come from /usr/X11/lib even if
13157       # $prefix and/or $exec_prefix are set to /opt/local/.
13158       #
13159       { $as_echo "$as_me:${as_lineno-$LINENO}: result: omitting \"$libdir\" from LDFLAGS" >&5
13160 $as_echo "omitting \"$libdir\" from LDFLAGS" >&6; }
13161       libdir=''
13162
13163       # Looks like as of OSX 10.12, gcc can't do ObjC.
13164       OBJCC="clang -Wall"
13165
13166     fi
13167
13168
13169     # Some versions of MesaGL are compiled to require -lpthread.
13170     # So if the Mesa headers exist, and -lpthread exists, then always
13171     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
13172     #
13173     # Oftentimes, AX_PTHREAD will bring in -lpthread as well; but that ends
13174     # up before -l(Mesa)GL, instead of after where it would belong.
13175     #
13176     if test "$ac_have_mesa_gl" = yes; then
13177       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
13178 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
13179 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
13180   $as_echo_n "(cached) " >&6
13181 else
13182   ac_check_lib_save_LIBS=$LIBS
13183 LIBS="-lpthread  $LIBS"
13184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13185 /* end confdefs.h.  */
13186
13187 /* Override any GCC internal prototype to avoid an error.
13188    Use char because int might match the return type of a GCC
13189    builtin and then its argument prototype would still apply.  */
13190 #ifdef __cplusplus
13191 extern "C"
13192 #endif
13193 char pthread_create ();
13194 int
13195 main ()
13196 {
13197 return pthread_create ();
13198   ;
13199   return 0;
13200 }
13201 _ACEOF
13202 if ac_fn_c_try_link "$LINENO"; then :
13203   ac_cv_lib_pthread_pthread_create=yes
13204 else
13205   ac_cv_lib_pthread_pthread_create=no
13206 fi
13207 rm -f core conftest.err conftest.$ac_objext \
13208     conftest$ac_exeext conftest.$ac_ext
13209 LIBS=$ac_check_lib_save_LIBS
13210 fi
13211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
13212 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
13213 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
13214   GL_LIBS="-lpthread"
13215 fi
13216
13217     fi
13218
13219
13220     # If we have Mesa headers, check to see if we can link against -lMesaGL.
13221     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
13222     # Else, warn that GL is busted.  (We have the headers, but no libs.)
13223     #
13224
13225     if test "$ac_have_mesa_gl" = yes ; then
13226
13227   ac_save_CPPFLAGS="$CPPFLAGS"
13228   ac_save_LDFLAGS="$LDFLAGS"
13229 #  ac_save_LIBS="$LIBS"
13230
13231   if test \! -z "$includedir" ; then
13232     CPPFLAGS="$CPPFLAGS -I$includedir"
13233   fi
13234   # note: $X_CFLAGS includes $x_includes
13235   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13236
13237   if test \! -z "$libdir" ; then
13238     LDFLAGS="$LDFLAGS -L$libdir"
13239   fi
13240   # note: $X_LIBS includes $x_libraries
13241   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13242
13243   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13244   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13245   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lMesaGL" >&5
13246 $as_echo_n "checking for glXCreateContext in -lMesaGL... " >&6; }
13247 if ${ac_cv_lib_MesaGL_glXCreateContext+:} false; then :
13248   $as_echo_n "(cached) " >&6
13249 else
13250   ac_check_lib_save_LIBS=$LIBS
13251 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
13252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13253 /* end confdefs.h.  */
13254
13255 /* Override any GCC internal prototype to avoid an error.
13256    Use char because int might match the return type of a GCC
13257    builtin and then its argument prototype would still apply.  */
13258 #ifdef __cplusplus
13259 extern "C"
13260 #endif
13261 char glXCreateContext ();
13262 int
13263 main ()
13264 {
13265 return glXCreateContext ();
13266   ;
13267   return 0;
13268 }
13269 _ACEOF
13270 if ac_fn_c_try_link "$LINENO"; then :
13271   ac_cv_lib_MesaGL_glXCreateContext=yes
13272 else
13273   ac_cv_lib_MesaGL_glXCreateContext=no
13274 fi
13275 rm -f core conftest.err conftest.$ac_objext \
13276     conftest$ac_exeext conftest.$ac_ext
13277 LIBS=$ac_check_lib_save_LIBS
13278 fi
13279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
13280 $as_echo "$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
13281 if test "x$ac_cv_lib_MesaGL_glXCreateContext" = xyes; then :
13282   gl_lib_1="MesaGL"
13283                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
13284 fi
13285
13286   CPPFLAGS="$ac_save_CPPFLAGS"
13287   LDFLAGS="$ac_save_LDFLAGS"
13288 #  LIBS="$ac_save_LIBS"
13289
13290     fi
13291
13292     if test "$gl_lib_1" = "" ; then
13293
13294   ac_save_CPPFLAGS="$CPPFLAGS"
13295   ac_save_LDFLAGS="$LDFLAGS"
13296 #  ac_save_LIBS="$LIBS"
13297
13298   if test \! -z "$includedir" ; then
13299     CPPFLAGS="$CPPFLAGS -I$includedir"
13300   fi
13301   # note: $X_CFLAGS includes $x_includes
13302   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13303
13304   if test \! -z "$libdir" ; then
13305     LDFLAGS="$LDFLAGS -L$libdir"
13306   fi
13307   # note: $X_LIBS includes $x_libraries
13308   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13309
13310   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13311   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13312   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lGL" >&5
13313 $as_echo_n "checking for glXCreateContext in -lGL... " >&6; }
13314 if ${ac_cv_lib_GL_glXCreateContext+:} false; then :
13315   $as_echo_n "(cached) " >&6
13316 else
13317   ac_check_lib_save_LIBS=$LIBS
13318 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
13319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13320 /* end confdefs.h.  */
13321
13322 /* Override any GCC internal prototype to avoid an error.
13323    Use char because int might match the return type of a GCC
13324    builtin and then its argument prototype would still apply.  */
13325 #ifdef __cplusplus
13326 extern "C"
13327 #endif
13328 char glXCreateContext ();
13329 int
13330 main ()
13331 {
13332 return glXCreateContext ();
13333   ;
13334   return 0;
13335 }
13336 _ACEOF
13337 if ac_fn_c_try_link "$LINENO"; then :
13338   ac_cv_lib_GL_glXCreateContext=yes
13339 else
13340   ac_cv_lib_GL_glXCreateContext=no
13341 fi
13342 rm -f core conftest.err conftest.$ac_objext \
13343     conftest$ac_exeext conftest.$ac_ext
13344 LIBS=$ac_check_lib_save_LIBS
13345 fi
13346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_glXCreateContext" >&5
13347 $as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; }
13348 if test "x$ac_cv_lib_GL_glXCreateContext" = xyes; then :
13349   gl_lib_1="GL"
13350                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
13351 fi
13352
13353   CPPFLAGS="$ac_save_CPPFLAGS"
13354   LDFLAGS="$ac_save_LDFLAGS"
13355 #  LIBS="$ac_save_LIBS"
13356
13357     fi
13358
13359     if test "$gl_lib_1" = "" ; then
13360       # we have headers, but no libs -- bail.
13361       have_gl=no
13362       ac_have_mesa_gl=no
13363       gl_halfassed=yes
13364     else
13365       # linking works -- we can build the GL hacks.
13366       $as_echo "#define HAVE_GL 1" >>confdefs.h
13367
13368       if test "$ac_have_mesa_gl" = yes ; then
13369         $as_echo "#define HAVE_MESA_GL 1" >>confdefs.h
13370
13371       fi
13372     fi
13373   fi
13374
13375
13376   # Now that we know we have GL headers and libs, do some more GL testing.
13377   #
13378
13379   if test "$have_gl" = yes ; then
13380     # If it's MesaGL, we'd like to issue a warning if the version number
13381     # is less than or equal to 2.6, because that version had a security bug.
13382     #
13383     if test "$ac_have_mesa_gl" = yes; then
13384
13385       { $as_echo "$as_me:${as_lineno-$LINENO}: checking MesaGL version number" >&5
13386 $as_echo_n "checking MesaGL version number... " >&6; }
13387 if ${ac_cv_mesagl_version_string+:} false; then :
13388   $as_echo_n "(cached) " >&6
13389 else
13390   cat > conftest.$ac_ext <<EOF
13391 #line 13395 "configure"
13392 #include "confdefs.h"
13393 #include <GL/gl.h>
13394 #ifndef MESA_MAJOR_VERSION
13395 # include <GL/xmesa.h>
13396 # ifdef XMESA_MAJOR_VERSION
13397    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
13398       we have to check the XMesa version number (the number of the X protocol
13399       support, which seems to be the same as the Mesa version number.)
13400     */
13401 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
13402 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
13403 # else
13404    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
13405       so we have no way of telling what version of Mesa this is at all.
13406       So, we'll guess that the osmesa version (the "offscreen protocol")
13407       is less than or equal to the real mesa version number.  Except that
13408       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
13409       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
13410     */
13411 # include <GL/osmesa.h>
13412 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
13413 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
13414 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
13415 #   undef MESA_MINOR_VERSION
13416 #   define MESA_MINOR_VERSION 4 or newer, probably?
13417 #  endif
13418 # endif
13419 #endif
13420 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
13421 EOF
13422
13423          ac_save_CPPFLAGS="$CPPFLAGS"
13424          if test \! -z "$includedir" ; then
13425            CPPFLAGS="$CPPFLAGS -I$includedir"
13426          fi
13427          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13428
13429          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
13430
13431          # M4 sucks!!
13432
13433           mglv=`echo "$mglv" | sed -n \
13434              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
13435
13436
13437          rm -rf conftest.$ac_ext
13438
13439          CPPFLAGS="$ac_save_CPPFLAGS"
13440
13441          if test "$mglv" = ""; then
13442            ac_mesagl_version=unknown
13443            ac_mesagl_version_string=unknown
13444          else
13445            ac_mesagl_version_string="$mglv"
13446            # M4 sucks!!
13447
13448            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
13449            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
13450
13451            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
13452            if test -z "$ac_mesagl_version"; then
13453              ac_mesagl_version=unknown
13454              ac_mesagl_version_string=unknown
13455            fi
13456          fi
13457          ac_cv_mesagl_version=$ac_mesagl_version
13458          ac_cv_mesagl_version_string=$ac_mesagl_version_string
13459
13460 fi
13461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mesagl_version_string" >&5
13462 $as_echo "$ac_cv_mesagl_version_string" >&6; }
13463       ac_mesagl_version=$ac_cv_mesagl_version
13464       ac_mesagl_version_string=$ac_cv_mesagl_version_string
13465     fi
13466
13467
13468     # Check for OpenGL 1.1 features.
13469     #
13470
13471   ac_save_CPPFLAGS="$CPPFLAGS"
13472   ac_save_LDFLAGS="$LDFLAGS"
13473 #  ac_save_LIBS="$LIBS"
13474
13475   if test \! -z "$includedir" ; then
13476     CPPFLAGS="$CPPFLAGS -I$includedir"
13477   fi
13478   # note: $X_CFLAGS includes $x_includes
13479   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13480
13481   if test \! -z "$libdir" ; then
13482     LDFLAGS="$LDFLAGS -L$libdir"
13483   fi
13484   # note: $X_LIBS includes $x_libraries
13485   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13486
13487   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13488   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13489   as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
13490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBindTexture in -l$gl_lib_1" >&5
13491 $as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
13492 if eval \${$as_ac_Lib+:} false; then :
13493   $as_echo_n "(cached) " >&6
13494 else
13495   ac_check_lib_save_LIBS=$LIBS
13496 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
13497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13498 /* end confdefs.h.  */
13499
13500 /* Override any GCC internal prototype to avoid an error.
13501    Use char because int might match the return type of a GCC
13502    builtin and then its argument prototype would still apply.  */
13503 #ifdef __cplusplus
13504 extern "C"
13505 #endif
13506 char glBindTexture ();
13507 int
13508 main ()
13509 {
13510 return glBindTexture ();
13511   ;
13512   return 0;
13513 }
13514 _ACEOF
13515 if ac_fn_c_try_link "$LINENO"; then :
13516   eval "$as_ac_Lib=yes"
13517 else
13518   eval "$as_ac_Lib=no"
13519 fi
13520 rm -f core conftest.err conftest.$ac_objext \
13521     conftest$ac_exeext conftest.$ac_ext
13522 LIBS=$ac_check_lib_save_LIBS
13523 fi
13524 eval ac_res=\$$as_ac_Lib
13525                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13526 $as_echo "$ac_res" >&6; }
13527 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13528   $as_echo "#define HAVE_GLBINDTEXTURE 1" >>confdefs.h
13529
13530 else
13531   true
13532 fi
13533
13534   CPPFLAGS="$ac_save_CPPFLAGS"
13535   LDFLAGS="$ac_save_LDFLAGS"
13536 #  LIBS="$ac_save_LIBS"
13537
13538   fi
13539
13540 elif test "$with_gl" != no; then
13541   echo "error: must be yes or no: --with-gl=$with_gl"
13542   exit 1
13543 fi
13544
13545
13546 ###############################################################################
13547 #
13548 #       Check for -lgle.
13549 #
13550 ###############################################################################
13551
13552 have_gle=no
13553 with_gle_req=unspecified
13554 gle_halfassed=no
13555
13556 # Check whether --with-gle was given.
13557 if test "${with_gle+set}" = set; then :
13558   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
13559 else
13560   with_gle=yes
13561 fi
13562
13563
13564
13565    case "$with_gle" in
13566     yes) ;;
13567     no)  ;;
13568
13569     /*)
13570      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE headers" >&5
13571 $as_echo_n "checking for GLE headers... " >&6; }
13572      d=$with_gle/include
13573      if test -d $d; then
13574        X_CFLAGS="-I$d $X_CFLAGS"
13575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13576 $as_echo "$d" >&6; }
13577      else
13578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13579 $as_echo "not found ($d: no such directory)" >&6; }
13580      fi
13581
13582      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE libs" >&5
13583 $as_echo_n "checking for GLE libs... " >&6; }
13584      d=$with_gle/lib
13585      if test -d $d; then
13586        X_LIBS="-L$d $X_LIBS"
13587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13588 $as_echo "$d" >&6; }
13589      else
13590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13591 $as_echo "not found ($d: no such directory)" >&6; }
13592      fi
13593
13594      # replace the directory string with "yes".
13595      with_gle_req="yes"
13596      with_gle=$with_gle_req
13597      ;;
13598
13599     *)
13600      echo ""
13601      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
13602      echo "       If it is a directory, then \`DIR/include' will be added to"
13603      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13604      exit 1
13605      ;;
13606    esac
13607
13608
13609 GLE_LIBS=""
13610
13611 if test "$have_gl" = no ; then
13612  true
13613 elif test "$with_gle" = yes; then
13614
13615
13616   ac_save_CPPFLAGS="$CPPFLAGS"
13617   if test \! -z "$includedir" ; then
13618     CPPFLAGS="$CPPFLAGS -I$includedir"
13619   fi
13620   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13621   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13622   ac_fn_c_check_header_compile "$LINENO" "GL/gle.h" "ac_cv_header_GL_gle_h" "#include <GL/gl.h>
13623 "
13624 if test "x$ac_cv_header_GL_gle_h" = xyes; then :
13625   have_gle3=yes
13626 else
13627   have_gle3=no
13628 fi
13629
13630
13631   CPPFLAGS="$ac_save_CPPFLAGS"
13632   if test "$have_gle3" = yes ; then
13633     have_gle=yes;
13634   else
13635
13636   ac_save_CPPFLAGS="$CPPFLAGS"
13637   if test \! -z "$includedir" ; then
13638     CPPFLAGS="$CPPFLAGS -I$includedir"
13639   fi
13640   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13641   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13642   ac_fn_c_check_header_compile "$LINENO" "GL/gutil.h" "ac_cv_header_GL_gutil_h" "#include <GL/gl.h>
13643 "
13644 if test "x$ac_cv_header_GL_gutil_h" = xyes; then :
13645   have_gle=yes
13646 else
13647   have_gle=no
13648 fi
13649
13650
13651   CPPFLAGS="$ac_save_CPPFLAGS"
13652     if test "$have_gle" = yes ; then
13653
13654   ac_save_CPPFLAGS="$CPPFLAGS"
13655   if test \! -z "$includedir" ; then
13656     CPPFLAGS="$CPPFLAGS -I$includedir"
13657   fi
13658   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13659   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13660   ac_fn_c_check_header_compile "$LINENO" "GL/tube.h" "ac_cv_header_GL_tube_h" "#include <GL/gl.h>
13661 "
13662 if test "x$ac_cv_header_GL_tube_h" = xyes; then :
13663   have_gle=yes
13664 else
13665   have_gle=no
13666 fi
13667
13668
13669   CPPFLAGS="$ac_save_CPPFLAGS"
13670     fi
13671   fi
13672
13673   if test "$have_gle" = yes ; then
13674     have_gle=no
13675     gle_halfassed=yes
13676
13677   ac_save_CPPFLAGS="$CPPFLAGS"
13678   ac_save_LDFLAGS="$LDFLAGS"
13679 #  ac_save_LIBS="$LIBS"
13680
13681   if test \! -z "$includedir" ; then
13682     CPPFLAGS="$CPPFLAGS -I$includedir"
13683   fi
13684   # note: $X_CFLAGS includes $x_includes
13685   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13686
13687   if test \! -z "$libdir" ; then
13688     LDFLAGS="$LDFLAGS -L$libdir"
13689   fi
13690   # note: $X_LIBS includes $x_libraries
13691   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13692
13693   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13694   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13695   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gleCreateGC in -lgle" >&5
13696 $as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
13697 if ${ac_cv_lib_gle_gleCreateGC+:} false; then :
13698   $as_echo_n "(cached) " >&6
13699 else
13700   ac_check_lib_save_LIBS=$LIBS
13701 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
13702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13703 /* end confdefs.h.  */
13704
13705 /* Override any GCC internal prototype to avoid an error.
13706    Use char because int might match the return type of a GCC
13707    builtin and then its argument prototype would still apply.  */
13708 #ifdef __cplusplus
13709 extern "C"
13710 #endif
13711 char gleCreateGC ();
13712 int
13713 main ()
13714 {
13715 return gleCreateGC ();
13716   ;
13717   return 0;
13718 }
13719 _ACEOF
13720 if ac_fn_c_try_link "$LINENO"; then :
13721   ac_cv_lib_gle_gleCreateGC=yes
13722 else
13723   ac_cv_lib_gle_gleCreateGC=no
13724 fi
13725 rm -f core conftest.err conftest.$ac_objext \
13726     conftest$ac_exeext conftest.$ac_ext
13727 LIBS=$ac_check_lib_save_LIBS
13728 fi
13729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_gleCreateGC" >&5
13730 $as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
13731 if test "x$ac_cv_lib_gle_gleCreateGC" = xyes; then :
13732   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
13733 fi
13734
13735   CPPFLAGS="$ac_save_CPPFLAGS"
13736   LDFLAGS="$ac_save_LDFLAGS"
13737 #  LIBS="$ac_save_LIBS"
13738
13739   fi
13740   if test "$have_gle" = yes ; then
13741     have_gle=no
13742     gle_halfassed=yes
13743
13744     # sometimes the libmatrix stuff is included in libgle.  look there first.
13745 #
13746 # I don't get it.  For some reason, this test passes on SGI, as if
13747 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
13748 # Yet the link is succeeding.  Why???
13749 #
13750 #    AC_CHECK_X_LIB(gle, uview_direction_d,
13751 #                   [have_gle=yes; gle_halfassed=no],
13752 #                   [], $GL_LIBS -lX11 -lXext -lm)
13753
13754     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
13755     # *sigh*
13756     if test "$have_gle3" = yes ; then
13757
13758   ac_save_CPPFLAGS="$CPPFLAGS"
13759   ac_save_LDFLAGS="$LDFLAGS"
13760 #  ac_save_LIBS="$LIBS"
13761
13762   if test \! -z "$includedir" ; then
13763     CPPFLAGS="$CPPFLAGS -I$includedir"
13764   fi
13765   # note: $X_CFLAGS includes $x_includes
13766   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13767
13768   if test \! -z "$libdir" ; then
13769     LDFLAGS="$LDFLAGS -L$libdir"
13770   fi
13771   # note: $X_LIBS includes $x_libraries
13772   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13773
13774   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13775   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13776   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction in -lgle" >&5
13777 $as_echo_n "checking for uview_direction in -lgle... " >&6; }
13778 if ${ac_cv_lib_gle_uview_direction+:} false; then :
13779   $as_echo_n "(cached) " >&6
13780 else
13781   ac_check_lib_save_LIBS=$LIBS
13782 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
13783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13784 /* end confdefs.h.  */
13785
13786 /* Override any GCC internal prototype to avoid an error.
13787    Use char because int might match the return type of a GCC
13788    builtin and then its argument prototype would still apply.  */
13789 #ifdef __cplusplus
13790 extern "C"
13791 #endif
13792 char uview_direction ();
13793 int
13794 main ()
13795 {
13796 return uview_direction ();
13797   ;
13798   return 0;
13799 }
13800 _ACEOF
13801 if ac_fn_c_try_link "$LINENO"; then :
13802   ac_cv_lib_gle_uview_direction=yes
13803 else
13804   ac_cv_lib_gle_uview_direction=no
13805 fi
13806 rm -f core conftest.err conftest.$ac_objext \
13807     conftest$ac_exeext conftest.$ac_ext
13808 LIBS=$ac_check_lib_save_LIBS
13809 fi
13810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_uview_direction" >&5
13811 $as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
13812 if test "x$ac_cv_lib_gle_uview_direction" = xyes; then :
13813   have_gle=yes; gle_halfassed=no
13814 fi
13815
13816   CPPFLAGS="$ac_save_CPPFLAGS"
13817   LDFLAGS="$ac_save_LDFLAGS"
13818 #  LIBS="$ac_save_LIBS"
13819
13820     fi
13821     # if it wasn't in libgle, then look in libmatrix.
13822     if test "$have_gle" = no ; then
13823
13824   ac_save_CPPFLAGS="$CPPFLAGS"
13825   ac_save_LDFLAGS="$LDFLAGS"
13826 #  ac_save_LIBS="$LIBS"
13827
13828   if test \! -z "$includedir" ; then
13829     CPPFLAGS="$CPPFLAGS -I$includedir"
13830   fi
13831   # note: $X_CFLAGS includes $x_includes
13832   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13833
13834   if test \! -z "$libdir" ; then
13835     LDFLAGS="$LDFLAGS -L$libdir"
13836   fi
13837   # note: $X_LIBS includes $x_libraries
13838   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13839
13840   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13841   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13842   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction_d in -lmatrix" >&5
13843 $as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
13844 if ${ac_cv_lib_matrix_uview_direction_d+:} false; then :
13845   $as_echo_n "(cached) " >&6
13846 else
13847   ac_check_lib_save_LIBS=$LIBS
13848 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
13849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13850 /* end confdefs.h.  */
13851
13852 /* Override any GCC internal prototype to avoid an error.
13853    Use char because int might match the return type of a GCC
13854    builtin and then its argument prototype would still apply.  */
13855 #ifdef __cplusplus
13856 extern "C"
13857 #endif
13858 char uview_direction_d ();
13859 int
13860 main ()
13861 {
13862 return uview_direction_d ();
13863   ;
13864   return 0;
13865 }
13866 _ACEOF
13867 if ac_fn_c_try_link "$LINENO"; then :
13868   ac_cv_lib_matrix_uview_direction_d=yes
13869 else
13870   ac_cv_lib_matrix_uview_direction_d=no
13871 fi
13872 rm -f core conftest.err conftest.$ac_objext \
13873     conftest$ac_exeext conftest.$ac_ext
13874 LIBS=$ac_check_lib_save_LIBS
13875 fi
13876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_matrix_uview_direction_d" >&5
13877 $as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
13878 if test "x$ac_cv_lib_matrix_uview_direction_d" = xyes; then :
13879   have_gle=yes; gle_halfassed=no;
13880                       GLE_LIBS="$GLE_LIBS -lmatrix"
13881 fi
13882
13883   CPPFLAGS="$ac_save_CPPFLAGS"
13884   LDFLAGS="$ac_save_LDFLAGS"
13885 #  LIBS="$ac_save_LIBS"
13886
13887     fi
13888   fi
13889
13890   if test "$have_gle" = yes ; then
13891     $as_echo "#define HAVE_GLE 1" >>confdefs.h
13892
13893     if test "$have_gle3" = yes ; then
13894       $as_echo "#define HAVE_GLE3 1" >>confdefs.h
13895
13896     fi
13897   fi
13898
13899 elif test "$with_gle" != no; then
13900   echo "error: must be yes or no: --with-gle=$with_gle"
13901   exit 1
13902
13903 fi
13904
13905
13906 ###############################################################################
13907 #
13908 #       Handle --with-gles
13909 #
13910 ###############################################################################
13911
13912 with_gles_req=unspecified
13913
13914 # Check whether --with-gles was given.
13915 if test "${with_gles+set}" = set; then :
13916   withval=$with_gles; with_gles="$withval"; with_gles_req="$withval"
13917 else
13918   with_gles=no
13919 fi
13920
13921
13922
13923    case "$with_gles" in
13924     yes) ;;
13925     no)  ;;
13926
13927     /*)
13928      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES headers" >&5
13929 $as_echo_n "checking for JWZGLES headers... " >&6; }
13930      d=$with_gles/include
13931      if test -d $d; then
13932        X_CFLAGS="-I$d $X_CFLAGS"
13933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13934 $as_echo "$d" >&6; }
13935      else
13936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13937 $as_echo "not found ($d: no such directory)" >&6; }
13938      fi
13939
13940      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES libs" >&5
13941 $as_echo_n "checking for JWZGLES libs... " >&6; }
13942      d=$with_gles/lib
13943      if test -d $d; then
13944        X_LIBS="-L$d $X_LIBS"
13945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13946 $as_echo "$d" >&6; }
13947      else
13948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13949 $as_echo "not found ($d: no such directory)" >&6; }
13950      fi
13951
13952      # replace the directory string with "yes".
13953      with_gles_req="yes"
13954      with_gles=$with_gles_req
13955      ;;
13956
13957     *)
13958      echo ""
13959      echo "error: argument to --with-gles must be \"yes\", \"no\", or a directory."
13960      echo "       If it is a directory, then \`DIR/include' will be added to"
13961      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13962      exit 1
13963      ;;
13964    esac
13965
13966
13967 if test "$with_gles" = yes; then
13968   have_gles=yes
13969   $as_echo "#define HAVE_JWZGLES 1" >>confdefs.h
13970
13971   JWZGLES_OBJS='$(JWXYZ_BIN)/jwzgles.o'
13972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OpenGL ES compatiblity shim" >&5
13973 $as_echo "using OpenGL ES compatiblity shim" >&6; }
13974 elif test "$with_gles" != no; then
13975   echo "error: must be yes or no: --with-gles=$with_xpm"
13976   exit 1
13977 fi
13978
13979 ###############################################################################
13980 #
13981 #       Check for -lgdk_pixbuf.
13982 #       These tests are for gdk_pixbuf usage of the hacks,
13983 #       not xscreensaver-demo (thus we have to test again to get
13984 #       the libraries right: don't want to pull in all of GTK
13985 #       for the hacks.)
13986 #
13987 ###############################################################################
13988
13989 have_gdk_pixbuf=no
13990 with_gdk_pixbuf_req=unspecified
13991
13992 # Check whether --with-pixbuf was given.
13993 if test "${with_pixbuf+set}" = set; then :
13994   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
13995 else
13996   with_gdk_pixbuf=yes
13997 fi
13998
13999
14000 # if --with-pixbuf=/directory/ was specified, remember that directory so that
14001 # we can also look for the `gdk-pixbuf-config' program in that directory.
14002 case "$with_gdk_pixbuf" in
14003   /*)
14004     gdk_pixbuf_dir="$with_gdk_pixbuf"
14005     ;;
14006   *)
14007     gdk_pixbuf_dir=""
14008     ;;
14009 esac
14010
14011
14012    case "$with_gdk_pixbuf" in
14013     yes) ;;
14014     no)  ;;
14015
14016     /*)
14017      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF headers" >&5
14018 $as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
14019      d=$with_gdk_pixbuf/include
14020      if test -d $d; then
14021        X_CFLAGS="-I$d $X_CFLAGS"
14022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14023 $as_echo "$d" >&6; }
14024      else
14025        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14026 $as_echo "not found ($d: no such directory)" >&6; }
14027      fi
14028
14029      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF libs" >&5
14030 $as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
14031      d=$with_gdk_pixbuf/lib
14032      if test -d $d; then
14033        X_LIBS="-L$d $X_LIBS"
14034        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14035 $as_echo "$d" >&6; }
14036      else
14037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14038 $as_echo "not found ($d: no such directory)" >&6; }
14039      fi
14040
14041      # replace the directory string with "yes".
14042      with_gdk_pixbuf_req="yes"
14043      with_gdk_pixbuf=$with_gdk_pixbuf_req
14044      ;;
14045
14046     *)
14047      echo ""
14048      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
14049      echo "       If it is a directory, then \`DIR/include' will be added to"
14050      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14051      exit 1
14052      ;;
14053    esac
14054
14055
14056 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
14057   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
14058   exit 1
14059 fi
14060
14061 if test "$with_gdk_pixbuf" = yes; then
14062   have_gdk_pixbuf=no
14063
14064   pkgs=''
14065   ok="yes"
14066
14067   pkg_check_version gdk-pixbuf-2.0      2.0.0
14068   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
14069   have_gdk_pixbuf="$ok"
14070
14071   if test "$have_gdk_pixbuf" = yes; then
14072     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf includes" >&5
14073 $as_echo_n "checking for gdk-pixbuf includes... " >&6; }
14074 if ${ac_cv_gdk_pixbuf_config_cflags+:} false; then :
14075   $as_echo_n "(cached) " >&6
14076 else
14077   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
14078 fi
14079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
14080 $as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
14081     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf libs" >&5
14082 $as_echo_n "checking for gdk-pixbuf libs... " >&6; }
14083 if ${ac_cv_gdk_pixbuf_config_libs+:} false; then :
14084   $as_echo_n "(cached) " >&6
14085 else
14086   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
14087 fi
14088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_libs" >&5
14089 $as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
14090   fi
14091
14092   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
14093   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
14094
14095
14096   if test "$have_gdk_pixbuf" = yes; then
14097     #
14098     # we appear to have pixbuf; check for headers/libs to be sure.
14099     #
14100     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
14101     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
14102
14103     have_gdk_pixbuf=no
14104
14105     # check for header A...
14106
14107   ac_save_CPPFLAGS="$CPPFLAGS"
14108   if test \! -z "$includedir" ; then
14109     CPPFLAGS="$CPPFLAGS -I$includedir"
14110   fi
14111   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14112   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14113   ac_fn_c_check_header_mongrel "$LINENO" "gdk-pixbuf/gdk-pixbuf.h" "ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" "$ac_includes_default"
14114 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = xyes; then :
14115   have_gdk_pixbuf=yes
14116 fi
14117
14118
14119   CPPFLAGS="$ac_save_CPPFLAGS"
14120
14121     # if that worked, check for header B...
14122     if test "$have_gdk_pixbuf" = yes; then
14123       have_gdk_pixbuf=no
14124       gdk_pixbuf_halfassed=yes
14125
14126   ac_save_CPPFLAGS="$CPPFLAGS"
14127   if test \! -z "$includedir" ; then
14128     CPPFLAGS="$CPPFLAGS -I$includedir"
14129   fi
14130   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14131   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14132   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"
14133 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = xyes; then :
14134   have_gdk_pixbuf=yes
14135                          gdk_pixbuf_halfassed=no
14136 fi
14137
14138
14139   CPPFLAGS="$ac_save_CPPFLAGS"
14140
14141       # yay, it has a new name in Gtk 2.x...
14142       if test "$have_gdk_pixbuf" = no; then
14143         have_gdk_pixbuf=no
14144         gdk_pixbuf_halfassed=yes
14145
14146   ac_save_CPPFLAGS="$CPPFLAGS"
14147   if test \! -z "$includedir" ; then
14148     CPPFLAGS="$CPPFLAGS -I$includedir"
14149   fi
14150   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14151   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14152   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"
14153 if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = xyes; then :
14154   have_gdk_pixbuf=yes
14155                            gdk_pixbuf_halfassed=no
14156 fi
14157
14158
14159   CPPFLAGS="$ac_save_CPPFLAGS"
14160       fi
14161     fi
14162     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
14163   fi
14164
14165   if test "$have_gdk_pixbuf" = yes; then
14166     # we have the headers, now check for the libraries
14167     have_gdk_pixbuf=no
14168     gdk_pixbuf_halfassed=yes
14169
14170     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability..." >&5
14171 $as_echo "checking for gdk_pixbuf usability..." >&6; }
14172
14173     # library A...
14174
14175   ac_save_CPPFLAGS="$CPPFLAGS"
14176   ac_save_LDFLAGS="$LDFLAGS"
14177 #  ac_save_LIBS="$LIBS"
14178
14179   if test \! -z "$includedir" ; then
14180     CPPFLAGS="$CPPFLAGS -I$includedir"
14181   fi
14182   # note: $X_CFLAGS includes $x_includes
14183   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14184
14185   if test \! -z "$libdir" ; then
14186     LDFLAGS="$LDFLAGS -L$libdir"
14187   fi
14188   # note: $X_LIBS includes $x_libraries
14189   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14190
14191   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14192   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14193   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_new_from_file in -lc" >&5
14194 $as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
14195 if ${ac_cv_lib_c_gdk_pixbuf_new_from_file+:} false; then :
14196   $as_echo_n "(cached) " >&6
14197 else
14198   ac_check_lib_save_LIBS=$LIBS
14199 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
14200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14201 /* end confdefs.h.  */
14202
14203 /* Override any GCC internal prototype to avoid an error.
14204    Use char because int might match the return type of a GCC
14205    builtin and then its argument prototype would still apply.  */
14206 #ifdef __cplusplus
14207 extern "C"
14208 #endif
14209 char gdk_pixbuf_new_from_file ();
14210 int
14211 main ()
14212 {
14213 return gdk_pixbuf_new_from_file ();
14214   ;
14215   return 0;
14216 }
14217 _ACEOF
14218 if ac_fn_c_try_link "$LINENO"; then :
14219   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
14220 else
14221   ac_cv_lib_c_gdk_pixbuf_new_from_file=no
14222 fi
14223 rm -f core conftest.err conftest.$ac_objext \
14224     conftest$ac_exeext conftest.$ac_ext
14225 LIBS=$ac_check_lib_save_LIBS
14226 fi
14227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
14228 $as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
14229 if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = xyes; then :
14230   have_gdk_pixbuf=yes
14231 fi
14232
14233   CPPFLAGS="$ac_save_CPPFLAGS"
14234   LDFLAGS="$ac_save_LDFLAGS"
14235 #  LIBS="$ac_save_LIBS"
14236
14237     # library B...
14238     if test "$have_gdk_pixbuf" = yes; then
14239       have_gdk_pixbuf=no
14240
14241   ac_save_CPPFLAGS="$CPPFLAGS"
14242   ac_save_LDFLAGS="$LDFLAGS"
14243 #  ac_save_LIBS="$LIBS"
14244
14245   if test \! -z "$includedir" ; then
14246     CPPFLAGS="$CPPFLAGS -I$includedir"
14247   fi
14248   # note: $X_CFLAGS includes $x_includes
14249   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14250
14251   if test \! -z "$libdir" ; then
14252     LDFLAGS="$LDFLAGS -L$libdir"
14253   fi
14254   # note: $X_LIBS includes $x_libraries
14255   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14256
14257   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14258   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_xlib_init in -lc" >&5
14260 $as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
14261 if ${ac_cv_lib_c_gdk_pixbuf_xlib_init+:} false; then :
14262   $as_echo_n "(cached) " >&6
14263 else
14264   ac_check_lib_save_LIBS=$LIBS
14265 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
14266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14267 /* end confdefs.h.  */
14268
14269 /* Override any GCC internal prototype to avoid an error.
14270    Use char because int might match the return type of a GCC
14271    builtin and then its argument prototype would still apply.  */
14272 #ifdef __cplusplus
14273 extern "C"
14274 #endif
14275 char gdk_pixbuf_xlib_init ();
14276 int
14277 main ()
14278 {
14279 return gdk_pixbuf_xlib_init ();
14280   ;
14281   return 0;
14282 }
14283 _ACEOF
14284 if ac_fn_c_try_link "$LINENO"; then :
14285   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
14286 else
14287   ac_cv_lib_c_gdk_pixbuf_xlib_init=no
14288 fi
14289 rm -f core conftest.err conftest.$ac_objext \
14290     conftest$ac_exeext conftest.$ac_ext
14291 LIBS=$ac_check_lib_save_LIBS
14292 fi
14293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
14294 $as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
14295 if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = xyes; then :
14296   have_gdk_pixbuf=yes
14297                       gdk_pixbuf_halfassed=no
14298 fi
14299
14300   CPPFLAGS="$ac_save_CPPFLAGS"
14301   LDFLAGS="$ac_save_LDFLAGS"
14302 #  LIBS="$ac_save_LIBS"
14303
14304     fi
14305   fi
14306
14307   if test "$have_gdk_pixbuf" = yes; then
14308     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
14309     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
14310     $as_echo "#define HAVE_GDK_PIXBUF 1" >>confdefs.h
14311
14312   else
14313     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability... no" >&5
14314 $as_echo "checking for gdk_pixbuf usability... no" >&6; }
14315   fi
14316
14317   if test "$have_gdk_pixbuf" = yes; then
14318
14319   ac_save_CPPFLAGS="$CPPFLAGS"
14320   ac_save_LDFLAGS="$LDFLAGS"
14321 #  ac_save_LIBS="$LIBS"
14322
14323   if test \! -z "$includedir" ; then
14324     CPPFLAGS="$CPPFLAGS -I$includedir"
14325   fi
14326   # note: $X_CFLAGS includes $x_includes
14327   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14328
14329   if test \! -z "$libdir" ; then
14330     LDFLAGS="$LDFLAGS -L$libdir"
14331   fi
14332   # note: $X_LIBS includes $x_libraries
14333   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14334
14335   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14336   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14337   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
14338 $as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
14339 if ${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+:} false; then :
14340   $as_echo_n "(cached) " >&6
14341 else
14342   ac_check_lib_save_LIBS=$LIBS
14343 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
14344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14345 /* end confdefs.h.  */
14346
14347 /* Override any GCC internal prototype to avoid an error.
14348    Use char because int might match the return type of a GCC
14349    builtin and then its argument prototype would still apply.  */
14350 #ifdef __cplusplus
14351 extern "C"
14352 #endif
14353 char gdk_pixbuf_apply_embedded_orientation ();
14354 int
14355 main ()
14356 {
14357 return gdk_pixbuf_apply_embedded_orientation ();
14358   ;
14359   return 0;
14360 }
14361 _ACEOF
14362 if ac_fn_c_try_link "$LINENO"; then :
14363   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
14364 else
14365   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
14366 fi
14367 rm -f core conftest.err conftest.$ac_objext \
14368     conftest$ac_exeext conftest.$ac_ext
14369 LIBS=$ac_check_lib_save_LIBS
14370 fi
14371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
14372 $as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
14373 if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = xyes; then :
14374   $as_echo "#define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1" >>confdefs.h
14375
14376 fi
14377
14378   CPPFLAGS="$ac_save_CPPFLAGS"
14379   LDFLAGS="$ac_save_LDFLAGS"
14380 #  LIBS="$ac_save_LIBS"
14381
14382   fi
14383 fi
14384
14385
14386 ###############################################################################
14387 #
14388 #       Check for -lXpm.
14389 #
14390 ###############################################################################
14391
14392 have_xpm=no
14393 with_xpm_req=unspecified
14394
14395 # Check whether --with-xpm was given.
14396 if test "${with_xpm+set}" = set; then :
14397   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
14398 else
14399   with_xpm=yes
14400 fi
14401
14402
14403
14404    case "$with_xpm" in
14405     yes) ;;
14406     no)  ;;
14407
14408     /*)
14409      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM headers" >&5
14410 $as_echo_n "checking for XPM headers... " >&6; }
14411      d=$with_xpm/include
14412      if test -d $d; then
14413        X_CFLAGS="-I$d $X_CFLAGS"
14414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14415 $as_echo "$d" >&6; }
14416      else
14417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14418 $as_echo "not found ($d: no such directory)" >&6; }
14419      fi
14420
14421      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM libs" >&5
14422 $as_echo_n "checking for XPM libs... " >&6; }
14423      d=$with_xpm/lib
14424      if test -d $d; then
14425        X_LIBS="-L$d $X_LIBS"
14426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14427 $as_echo "$d" >&6; }
14428      else
14429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14430 $as_echo "not found ($d: no such directory)" >&6; }
14431      fi
14432
14433      # replace the directory string with "yes".
14434      with_xpm_req="yes"
14435      with_xpm=$with_xpm_req
14436      ;;
14437
14438     *)
14439      echo ""
14440      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
14441      echo "       If it is a directory, then \`DIR/include' will be added to"
14442      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14443      exit 1
14444      ;;
14445    esac
14446
14447
14448 if test "$with_xpm" = yes; then
14449
14450   ac_save_CPPFLAGS="$CPPFLAGS"
14451   if test \! -z "$includedir" ; then
14452     CPPFLAGS="$CPPFLAGS -I$includedir"
14453   fi
14454   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14455   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14456   ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "#include <X11/Xlib.h>
14457 "
14458 if test "x$ac_cv_header_X11_xpm_h" = xyes; then :
14459   have_xpm=yes
14460                     $as_echo "#define HAVE_XPM 1" >>confdefs.h
14461
14462                     XPM_LIBS="-lXpm $XPM_LIBS"
14463 fi
14464
14465
14466   CPPFLAGS="$ac_save_CPPFLAGS"
14467 elif test "$with_xpm" != no; then
14468   echo "error: must be yes or no: --with-xpm=$with_xpm"
14469   exit 1
14470 fi
14471
14472 # See comment near $motif_requires_xpm, above.
14473 # Need to do this here, after both Motif and XPM have been checked for.
14474 #
14475 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
14476   if test "$motif_requires_xpm" = yes ; then
14477     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
14478   fi
14479 fi
14480
14481 if test "$XPM_LIBS" = "" ; then
14482   XPM_LIBS=$(MINIXPM)
14483 fi
14484
14485
14486 ###############################################################################
14487 #
14488 #       Check for -ljpeg
14489 #
14490 ###############################################################################
14491
14492 have_jpeg=no
14493 with_jpeg_req=unspecified
14494 jpeg_halfassed=no
14495
14496 # Check whether --with-jpeg was given.
14497 if test "${with_jpeg+set}" = set; then :
14498   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
14499 else
14500   with_jpeg=yes
14501 fi
14502
14503
14504
14505    case "$with_jpeg" in
14506     yes) ;;
14507     no)  ;;
14508
14509     /*)
14510      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG headers" >&5
14511 $as_echo_n "checking for JPEG headers... " >&6; }
14512      d=$with_jpeg/include
14513      if test -d $d; then
14514        X_CFLAGS="-I$d $X_CFLAGS"
14515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14516 $as_echo "$d" >&6; }
14517      else
14518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14519 $as_echo "not found ($d: no such directory)" >&6; }
14520      fi
14521
14522      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG libs" >&5
14523 $as_echo_n "checking for JPEG libs... " >&6; }
14524      d=$with_jpeg/lib
14525      if test -d $d; then
14526        X_LIBS="-L$d $X_LIBS"
14527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14528 $as_echo "$d" >&6; }
14529      else
14530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14531 $as_echo "not found ($d: no such directory)" >&6; }
14532      fi
14533
14534      # replace the directory string with "yes".
14535      with_jpeg_req="yes"
14536      with_jpeg=$with_jpeg_req
14537      ;;
14538
14539     *)
14540      echo ""
14541      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
14542      echo "       If it is a directory, then \`DIR/include' will be added to"
14543      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14544      exit 1
14545      ;;
14546    esac
14547
14548
14549 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
14550   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
14551   exit 1
14552 fi
14553
14554 if test "$with_jpeg" = yes; then
14555
14556   have_jpeg=no
14557
14558   ac_save_CPPFLAGS="$CPPFLAGS"
14559   if test \! -z "$includedir" ; then
14560     CPPFLAGS="$CPPFLAGS -I$includedir"
14561   fi
14562   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14563   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14564   ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
14565 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
14566   have_jpeg=yes
14567 fi
14568
14569
14570   CPPFLAGS="$ac_save_CPPFLAGS"
14571
14572   if test "$have_jpeg" = yes; then
14573     # we have the header, now check for the library
14574     have_jpeg=no
14575     jpeg_halfassed=yes
14576
14577   ac_save_CPPFLAGS="$CPPFLAGS"
14578   ac_save_LDFLAGS="$LDFLAGS"
14579 #  ac_save_LIBS="$LIBS"
14580
14581   if test \! -z "$includedir" ; then
14582     CPPFLAGS="$CPPFLAGS -I$includedir"
14583   fi
14584   # note: $X_CFLAGS includes $x_includes
14585   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14586
14587   if test \! -z "$libdir" ; then
14588     LDFLAGS="$LDFLAGS -L$libdir"
14589   fi
14590   # note: $X_LIBS includes $x_libraries
14591   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14592
14593   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14594   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14595   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_start_compress in -ljpeg" >&5
14596 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
14597 if ${ac_cv_lib_jpeg_jpeg_start_compress+:} false; then :
14598   $as_echo_n "(cached) " >&6
14599 else
14600   ac_check_lib_save_LIBS=$LIBS
14601 LIBS="-ljpeg  $LIBS"
14602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14603 /* end confdefs.h.  */
14604
14605 /* Override any GCC internal prototype to avoid an error.
14606    Use char because int might match the return type of a GCC
14607    builtin and then its argument prototype would still apply.  */
14608 #ifdef __cplusplus
14609 extern "C"
14610 #endif
14611 char jpeg_start_compress ();
14612 int
14613 main ()
14614 {
14615 return jpeg_start_compress ();
14616   ;
14617   return 0;
14618 }
14619 _ACEOF
14620 if ac_fn_c_try_link "$LINENO"; then :
14621   ac_cv_lib_jpeg_jpeg_start_compress=yes
14622 else
14623   ac_cv_lib_jpeg_jpeg_start_compress=no
14624 fi
14625 rm -f core conftest.err conftest.$ac_objext \
14626     conftest$ac_exeext conftest.$ac_ext
14627 LIBS=$ac_check_lib_save_LIBS
14628 fi
14629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
14630 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
14631 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = xyes; then :
14632   have_jpeg=yes
14633                     jpeg_halfassed=no
14634                     JPEG_LIBS="-ljpeg"
14635                     $as_echo "#define HAVE_JPEGLIB 1" >>confdefs.h
14636
14637 fi
14638
14639   CPPFLAGS="$ac_save_CPPFLAGS"
14640   LDFLAGS="$ac_save_LDFLAGS"
14641 #  LIBS="$ac_save_LIBS"
14642
14643   fi
14644 fi
14645
14646
14647 ###############################################################################
14648 #
14649 #       Check for -lXft
14650 #
14651 ###############################################################################
14652
14653 have_xutf8drawstring=no
14654
14655   ac_save_CPPFLAGS="$CPPFLAGS"
14656   ac_save_LDFLAGS="$LDFLAGS"
14657 #  ac_save_LIBS="$LIBS"
14658
14659   if test \! -z "$includedir" ; then
14660     CPPFLAGS="$CPPFLAGS -I$includedir"
14661   fi
14662   # note: $X_CFLAGS includes $x_includes
14663   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14664
14665   if test \! -z "$libdir" ; then
14666     LDFLAGS="$LDFLAGS -L$libdir"
14667   fi
14668   # note: $X_LIBS includes $x_libraries
14669   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14670
14671   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14672   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14673   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xutf8DrawString in -lX11" >&5
14674 $as_echo_n "checking for Xutf8DrawString in -lX11... " >&6; }
14675 if ${ac_cv_lib_X11_Xutf8DrawString+:} false; then :
14676   $as_echo_n "(cached) " >&6
14677 else
14678   ac_check_lib_save_LIBS=$LIBS
14679 LIBS="-lX11 -lX11 -lXext -lm $LIBS"
14680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14681 /* end confdefs.h.  */
14682
14683 /* Override any GCC internal prototype to avoid an error.
14684    Use char because int might match the return type of a GCC
14685    builtin and then its argument prototype would still apply.  */
14686 #ifdef __cplusplus
14687 extern "C"
14688 #endif
14689 char Xutf8DrawString ();
14690 int
14691 main ()
14692 {
14693 return Xutf8DrawString ();
14694   ;
14695   return 0;
14696 }
14697 _ACEOF
14698 if ac_fn_c_try_link "$LINENO"; then :
14699   ac_cv_lib_X11_Xutf8DrawString=yes
14700 else
14701   ac_cv_lib_X11_Xutf8DrawString=no
14702 fi
14703 rm -f core conftest.err conftest.$ac_objext \
14704     conftest$ac_exeext conftest.$ac_ext
14705 LIBS=$ac_check_lib_save_LIBS
14706 fi
14707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_Xutf8DrawString" >&5
14708 $as_echo "$ac_cv_lib_X11_Xutf8DrawString" >&6; }
14709 if test "x$ac_cv_lib_X11_Xutf8DrawString" = xyes; then :
14710   have_xutf8drawstring=yes
14711 else
14712   true
14713 fi
14714
14715   CPPFLAGS="$ac_save_CPPFLAGS"
14716   LDFLAGS="$ac_save_LDFLAGS"
14717 #  LIBS="$ac_save_LIBS"
14718
14719 if test "$have_xutf8drawstring" = yes ; then
14720   $as_echo "#define HAVE_XUTF8DRAWSTRING 1" >>confdefs.h
14721
14722 fi
14723
14724
14725 have_xft=no
14726 with_xft_req=unspecified
14727 xft_halfassed=no
14728
14729 # Check whether --with-xft was given.
14730 if test "${with_xft+set}" = set; then :
14731   withval=$with_xft; with_xft="$withval"; with_xft_req="$withval"
14732 else
14733   with_xft=yes
14734 fi
14735
14736
14737
14738    case "$with_xft" in
14739     yes) ;;
14740     no)  ;;
14741
14742     /*)
14743      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft headers" >&5
14744 $as_echo_n "checking for Xft headers... " >&6; }
14745      d=$with_xft/include
14746      if test -d $d; then
14747        X_CFLAGS="-I$d $X_CFLAGS"
14748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14749 $as_echo "$d" >&6; }
14750      else
14751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14752 $as_echo "not found ($d: no such directory)" >&6; }
14753      fi
14754
14755      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft libs" >&5
14756 $as_echo_n "checking for Xft libs... " >&6; }
14757      d=$with_xft/lib
14758      if test -d $d; then
14759        X_LIBS="-L$d $X_LIBS"
14760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14761 $as_echo "$d" >&6; }
14762      else
14763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14764 $as_echo "not found ($d: no such directory)" >&6; }
14765      fi
14766
14767      # replace the directory string with "yes".
14768      with_xft_req="yes"
14769      with_xft=$with_xft_req
14770      ;;
14771
14772     *)
14773      echo ""
14774      echo "error: argument to --with-xft must be \"yes\", \"no\", or a directory."
14775      echo "       If it is a directory, then \`DIR/include' will be added to"
14776      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14777      exit 1
14778      ;;
14779    esac
14780
14781
14782 if test "$with_xft" != yes -a "$with_xft" != no ; then
14783   echo "error: must be yes or no: --with-xft=$with_xft"
14784   exit 1
14785 fi
14786
14787 if test "$with_xft" = yes; then
14788
14789   pkgs=''
14790   ok="yes"
14791   pkg_check_version xft 2.1.0
14792   have_xft="$ok"
14793
14794   if test "$have_xft" = yes; then
14795     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft includes" >&5
14796 $as_echo_n "checking for Xft includes... " >&6; }
14797 if ${ac_cv_xft_config_cflags+:} false; then :
14798   $as_echo_n "(cached) " >&6
14799 else
14800   ac_cv_xft_config_cflags=`$pkg_config --cflags $pkgs`
14801 fi
14802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xft_config_cflags" >&5
14803 $as_echo "$ac_cv_xft_config_cflags" >&6; }
14804     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft libs" >&5
14805 $as_echo_n "checking for Xft libs... " >&6; }
14806 if ${ac_cv_xft_config_libs+:} false; then :
14807   $as_echo_n "(cached) " >&6
14808 else
14809   ac_cv_xft_config_libs=`$pkg_config --libs $pkgs`
14810 fi
14811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xft_config_libs" >&5
14812 $as_echo "$ac_cv_xft_config_libs" >&6; }
14813   fi
14814
14815   ac_xft_config_cflags=$ac_cv_xft_config_cflags
14816   ac_xft_config_libs=$ac_cv_xft_config_libs
14817
14818   if test "$have_xft" = yes; then
14819     #
14820     # we appear to have Xft; check for headers/libs to be sure.
14821     #
14822     ac_save_xft_CPPFLAGS="$CPPFLAGS"
14823     CPPFLAGS="$CPPFLAGS $ac_xft_config_cflags"
14824
14825     have_xft=no
14826
14827   ac_save_CPPFLAGS="$CPPFLAGS"
14828   if test \! -z "$includedir" ; then
14829     CPPFLAGS="$CPPFLAGS -I$includedir"
14830   fi
14831   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14832   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14833   ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
14834 if test "x$ac_cv_header_X11_Xft_Xft_h" = xyes; then :
14835   have_xft=yes
14836 fi
14837
14838
14839   CPPFLAGS="$ac_save_CPPFLAGS"
14840
14841     CPPFLAGS="$ac_save_xft_CPPFLAGS"
14842   fi
14843
14844   if test "$have_xft" = yes; then
14845     # we have the headers, now check for the libraries
14846     have_xft=no
14847     xft_halfassed=yes
14848
14849     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for Xft usability..." >&5
14850 $as_echo "checking for Xft usability..." >&6; }
14851
14852   ac_save_CPPFLAGS="$CPPFLAGS"
14853   ac_save_LDFLAGS="$LDFLAGS"
14854 #  ac_save_LIBS="$LIBS"
14855
14856   if test \! -z "$includedir" ; then
14857     CPPFLAGS="$CPPFLAGS -I$includedir"
14858   fi
14859   # note: $X_CFLAGS includes $x_includes
14860   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14861
14862   if test \! -z "$libdir" ; then
14863     LDFLAGS="$LDFLAGS -L$libdir"
14864   fi
14865   # note: $X_LIBS includes $x_libraries
14866   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14867
14868   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14869   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14870   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftDrawStringUtf8 in -lc" >&5
14871 $as_echo_n "checking for XftDrawStringUtf8 in -lc... " >&6; }
14872 if ${ac_cv_lib_c_XftDrawStringUtf8+:} false; then :
14873   $as_echo_n "(cached) " >&6
14874 else
14875   ac_check_lib_save_LIBS=$LIBS
14876 LIBS="-lc $ac_xft_config_libs -lX11 -lXext -lm $LIBS"
14877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14878 /* end confdefs.h.  */
14879
14880 /* Override any GCC internal prototype to avoid an error.
14881    Use char because int might match the return type of a GCC
14882    builtin and then its argument prototype would still apply.  */
14883 #ifdef __cplusplus
14884 extern "C"
14885 #endif
14886 char XftDrawStringUtf8 ();
14887 int
14888 main ()
14889 {
14890 return XftDrawStringUtf8 ();
14891   ;
14892   return 0;
14893 }
14894 _ACEOF
14895 if ac_fn_c_try_link "$LINENO"; then :
14896   ac_cv_lib_c_XftDrawStringUtf8=yes
14897 else
14898   ac_cv_lib_c_XftDrawStringUtf8=no
14899 fi
14900 rm -f core conftest.err conftest.$ac_objext \
14901     conftest$ac_exeext conftest.$ac_ext
14902 LIBS=$ac_check_lib_save_LIBS
14903 fi
14904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_XftDrawStringUtf8" >&5
14905 $as_echo "$ac_cv_lib_c_XftDrawStringUtf8" >&6; }
14906 if test "x$ac_cv_lib_c_XftDrawStringUtf8" = xyes; then :
14907   have_xft=yes
14908 fi
14909
14910   CPPFLAGS="$ac_save_CPPFLAGS"
14911   LDFLAGS="$ac_save_LDFLAGS"
14912 #  LIBS="$ac_save_LIBS"
14913
14914   fi
14915
14916   if test "$have_xft" = no; then
14917     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for Xft usability... no" >&5
14918 $as_echo "checking for Xft usability... no" >&6; }
14919   fi
14920 fi
14921
14922 if test "$have_xft" = yes; then
14923   INCLUDES="$INCLUDES $ac_xft_config_cflags"
14924   XFT_LIBS="$ac_xft_config_libs"
14925   XFT_SRCS=''
14926   XFT_OBJS=''
14927   $as_echo "#define HAVE_XFT 1" >>confdefs.h
14928
14929 else
14930   XFT_LIBS=''
14931   XFT_SRCS='$(UTILS_SRC)/xft.c'
14932   XFT_OBJS='$(UTILS_BIN)/xft.o'
14933 fi
14934
14935
14936 ###############################################################################
14937 #
14938 #       Check for pty support: this allows 'phosphor' and 'apple2'
14939 #       to run curses-based programs, or be used as terminal windows.
14940 #
14941 ###############################################################################
14942
14943 PTY_LIBS=
14944 for ac_header in pty.h util.h sys/termios.h
14945 do :
14946   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14947 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14948 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14949   cat >>confdefs.h <<_ACEOF
14950 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14951 _ACEOF
14952
14953 fi
14954
14955 done
14956
14957
14958   ac_save_CPPFLAGS="$CPPFLAGS"
14959   ac_save_LDFLAGS="$LDFLAGS"
14960 #  ac_save_LIBS="$LIBS"
14961
14962   if test \! -z "$includedir" ; then
14963     CPPFLAGS="$CPPFLAGS -I$includedir"
14964   fi
14965   # note: $X_CFLAGS includes $x_includes
14966   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14967
14968   if test \! -z "$libdir" ; then
14969     LDFLAGS="$LDFLAGS -L$libdir"
14970   fi
14971   # note: $X_LIBS includes $x_libraries
14972   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14973
14974   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14975   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
14977 $as_echo_n "checking for forkpty in -lutil... " >&6; }
14978 if ${ac_cv_lib_util_forkpty+:} false; then :
14979   $as_echo_n "(cached) " >&6
14980 else
14981   ac_check_lib_save_LIBS=$LIBS
14982 LIBS="-lutil  $LIBS"
14983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14984 /* end confdefs.h.  */
14985
14986 /* Override any GCC internal prototype to avoid an error.
14987    Use char because int might match the return type of a GCC
14988    builtin and then its argument prototype would still apply.  */
14989 #ifdef __cplusplus
14990 extern "C"
14991 #endif
14992 char forkpty ();
14993 int
14994 main ()
14995 {
14996 return forkpty ();
14997   ;
14998   return 0;
14999 }
15000 _ACEOF
15001 if ac_fn_c_try_link "$LINENO"; then :
15002   ac_cv_lib_util_forkpty=yes
15003 else
15004   ac_cv_lib_util_forkpty=no
15005 fi
15006 rm -f core conftest.err conftest.$ac_objext \
15007     conftest$ac_exeext conftest.$ac_ext
15008 LIBS=$ac_check_lib_save_LIBS
15009 fi
15010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
15011 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
15012 if test "x$ac_cv_lib_util_forkpty" = xyes; then :
15013   PTY_LIBS="-lutil"
15014                 ac_have_forkpty=yes
15015                 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
15016
15017 fi
15018
15019   CPPFLAGS="$ac_save_CPPFLAGS"
15020   LDFLAGS="$ac_save_LDFLAGS"
15021 #  LIBS="$ac_save_LIBS"
15022
15023
15024 if test "$ac_have_forkpty" != yes ; then
15025   # we don't need (or have) -lutil on MacOS 10.4.2...
15026
15027   ac_save_CPPFLAGS="$CPPFLAGS"
15028   ac_save_LDFLAGS="$LDFLAGS"
15029 #  ac_save_LIBS="$LIBS"
15030
15031   if test \! -z "$includedir" ; then
15032     CPPFLAGS="$CPPFLAGS -I$includedir"
15033   fi
15034   # note: $X_CFLAGS includes $x_includes
15035   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15036
15037   if test \! -z "$libdir" ; then
15038     LDFLAGS="$LDFLAGS -L$libdir"
15039   fi
15040   # note: $X_LIBS includes $x_libraries
15041   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15042
15043   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15044   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15045   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lc" >&5
15046 $as_echo_n "checking for forkpty in -lc... " >&6; }
15047 if ${ac_cv_lib_c_forkpty+:} false; then :
15048   $as_echo_n "(cached) " >&6
15049 else
15050   ac_check_lib_save_LIBS=$LIBS
15051 LIBS="-lc  $LIBS"
15052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15053 /* end confdefs.h.  */
15054
15055 /* Override any GCC internal prototype to avoid an error.
15056    Use char because int might match the return type of a GCC
15057    builtin and then its argument prototype would still apply.  */
15058 #ifdef __cplusplus
15059 extern "C"
15060 #endif
15061 char forkpty ();
15062 int
15063 main ()
15064 {
15065 return forkpty ();
15066   ;
15067   return 0;
15068 }
15069 _ACEOF
15070 if ac_fn_c_try_link "$LINENO"; then :
15071   ac_cv_lib_c_forkpty=yes
15072 else
15073   ac_cv_lib_c_forkpty=no
15074 fi
15075 rm -f core conftest.err conftest.$ac_objext \
15076     conftest$ac_exeext conftest.$ac_ext
15077 LIBS=$ac_check_lib_save_LIBS
15078 fi
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_forkpty" >&5
15080 $as_echo "$ac_cv_lib_c_forkpty" >&6; }
15081 if test "x$ac_cv_lib_c_forkpty" = xyes; then :
15082   PTY_LIBS=""
15083                   $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
15084
15085 fi
15086
15087   CPPFLAGS="$ac_save_CPPFLAGS"
15088   LDFLAGS="$ac_save_LDFLAGS"
15089 #  LIBS="$ac_save_LIBS"
15090
15091 fi
15092
15093 ###############################################################################
15094 #
15095 #       Check for the XSHM server extension.
15096 #
15097 ###############################################################################
15098
15099 have_xshm=no
15100 with_xshm_req=unspecified
15101
15102 # Check whether --with-xshm-ext was given.
15103 if test "${with_xshm_ext+set}" = set; then :
15104   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
15105 else
15106   with_xshm=yes
15107 fi
15108
15109
15110
15111    case "$with_xshm" in
15112     yes) ;;
15113     no)  ;;
15114
15115     /*)
15116      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM headers" >&5
15117 $as_echo_n "checking for XSHM headers... " >&6; }
15118      d=$with_xshm/include
15119      if test -d $d; then
15120        X_CFLAGS="-I$d $X_CFLAGS"
15121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15122 $as_echo "$d" >&6; }
15123      else
15124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15125 $as_echo "not found ($d: no such directory)" >&6; }
15126      fi
15127
15128      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM libs" >&5
15129 $as_echo_n "checking for XSHM libs... " >&6; }
15130      d=$with_xshm/lib
15131      if test -d $d; then
15132        X_LIBS="-L$d $X_LIBS"
15133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15134 $as_echo "$d" >&6; }
15135      else
15136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15137 $as_echo "not found ($d: no such directory)" >&6; }
15138      fi
15139
15140      # replace the directory string with "yes".
15141      with_xshm_req="yes"
15142      with_xshm=$with_xshm_req
15143      ;;
15144
15145     *)
15146      echo ""
15147      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
15148      echo "       If it is a directory, then \`DIR/include' will be added to"
15149      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15150      exit 1
15151      ;;
15152    esac
15153
15154
15155 if test "$with_xshm" = yes; then
15156
15157   # first check for Xshm.h.
15158
15159   ac_save_CPPFLAGS="$CPPFLAGS"
15160   if test \! -z "$includedir" ; then
15161     CPPFLAGS="$CPPFLAGS -I$includedir"
15162   fi
15163   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15164   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15165   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XShm.h" "ac_cv_header_X11_extensions_XShm_h" "#include <X11/Xlib.h>
15166 "
15167 if test "x$ac_cv_header_X11_extensions_XShm_h" = xyes; then :
15168   have_xshm=yes
15169 fi
15170
15171
15172   CPPFLAGS="$ac_save_CPPFLAGS"
15173
15174   # if that succeeded, then check for sys/ipc.h.
15175   if test "$have_xshm" = yes; then
15176     have_xshm=no
15177
15178   ac_save_CPPFLAGS="$CPPFLAGS"
15179   if test \! -z "$includedir" ; then
15180     CPPFLAGS="$CPPFLAGS -I$includedir"
15181   fi
15182   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15183   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15184   ac_fn_c_check_header_mongrel "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
15185 if test "x$ac_cv_header_sys_ipc_h" = xyes; then :
15186   have_xshm=yes
15187 fi
15188
15189
15190   CPPFLAGS="$ac_save_CPPFLAGS"
15191   fi
15192
15193   # if that succeeded, then check for sys/shm.h.
15194   if test "$have_xshm" = yes; then
15195     have_xshm=no
15196
15197   ac_save_CPPFLAGS="$CPPFLAGS"
15198   if test \! -z "$includedir" ; then
15199     CPPFLAGS="$CPPFLAGS -I$includedir"
15200   fi
15201   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15202   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15203   ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
15204 if test "x$ac_cv_header_sys_shm_h" = xyes; then :
15205   have_xshm=yes
15206 fi
15207
15208
15209   CPPFLAGS="$ac_save_CPPFLAGS"
15210   fi
15211
15212   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
15213   # to exist, but the library code to not exist.  And even better, the library
15214   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
15215   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
15216   # that's not quite right, but close enough.)
15217   #
15218   case "$host" in
15219     *-aix*)
15220       if  `uname -v` -eq 3 ; then
15221         have_xshm=no
15222
15223   ac_save_CPPFLAGS="$CPPFLAGS"
15224   ac_save_LDFLAGS="$LDFLAGS"
15225 #  ac_save_LIBS="$LIBS"
15226
15227   if test \! -z "$includedir" ; then
15228     CPPFLAGS="$CPPFLAGS -I$includedir"
15229   fi
15230   # note: $X_CFLAGS includes $x_includes
15231   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15232
15233   if test \! -z "$libdir" ; then
15234     LDFLAGS="$LDFLAGS -L$libdir"
15235   fi
15236   # note: $X_LIBS includes $x_libraries
15237   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15238
15239   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15240   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15241   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryExtension in -lXextSam" >&5
15242 $as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
15243 if ${ac_cv_lib_XextSam_XShmQueryExtension+:} false; then :
15244   $as_echo_n "(cached) " >&6
15245 else
15246   ac_check_lib_save_LIBS=$LIBS
15247 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
15248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15249 /* end confdefs.h.  */
15250
15251 /* Override any GCC internal prototype to avoid an error.
15252    Use char because int might match the return type of a GCC
15253    builtin and then its argument prototype would still apply.  */
15254 #ifdef __cplusplus
15255 extern "C"
15256 #endif
15257 char XShmQueryExtension ();
15258 int
15259 main ()
15260 {
15261 return XShmQueryExtension ();
15262   ;
15263   return 0;
15264 }
15265 _ACEOF
15266 if ac_fn_c_try_link "$LINENO"; then :
15267   ac_cv_lib_XextSam_XShmQueryExtension=yes
15268 else
15269   ac_cv_lib_XextSam_XShmQueryExtension=no
15270 fi
15271 rm -f core conftest.err conftest.$ac_objext \
15272     conftest$ac_exeext conftest.$ac_ext
15273 LIBS=$ac_check_lib_save_LIBS
15274 fi
15275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
15276 $as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
15277 if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = xyes; then :
15278   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
15279 else
15280   true
15281 fi
15282
15283   CPPFLAGS="$ac_save_CPPFLAGS"
15284   LDFLAGS="$ac_save_LDFLAGS"
15285 #  LIBS="$ac_save_LIBS"
15286
15287       fi
15288     ;;
15289   esac
15290
15291   # if that succeeded, then we've really got it.
15292   if test "$have_xshm" = yes; then
15293     $as_echo "#define HAVE_XSHM_EXTENSION 1" >>confdefs.h
15294
15295   fi
15296
15297 elif test "$with_xshm" != no; then
15298   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
15299   exit 1
15300 fi
15301
15302
15303 ###############################################################################
15304 #
15305 #       Check for the DOUBLE-BUFFER server extension.
15306 #
15307 ###############################################################################
15308
15309 have_xdbe=no
15310 with_xdbe_req=unspecified
15311
15312 # Check whether --with-xdbe-ext was given.
15313 if test "${with_xdbe_ext+set}" = set; then :
15314   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
15315 else
15316   with_xdbe=yes
15317 fi
15318
15319
15320
15321    case "$with_xdbe" in
15322     yes) ;;
15323     no)  ;;
15324
15325     /*)
15326      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER headers" >&5
15327 $as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
15328      d=$with_xdbe/include
15329      if test -d $d; then
15330        X_CFLAGS="-I$d $X_CFLAGS"
15331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15332 $as_echo "$d" >&6; }
15333      else
15334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15335 $as_echo "not found ($d: no such directory)" >&6; }
15336      fi
15337
15338      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER libs" >&5
15339 $as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
15340      d=$with_xdbe/lib
15341      if test -d $d; then
15342        X_LIBS="-L$d $X_LIBS"
15343        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15344 $as_echo "$d" >&6; }
15345      else
15346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15347 $as_echo "not found ($d: no such directory)" >&6; }
15348      fi
15349
15350      # replace the directory string with "yes".
15351      with_xdbe_req="yes"
15352      with_xdbe=$with_xdbe_req
15353      ;;
15354
15355     *)
15356      echo ""
15357      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
15358      echo "       If it is a directory, then \`DIR/include' will be added to"
15359      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15360      exit 1
15361      ;;
15362    esac
15363
15364
15365 if test "$with_xdbe" = yes; then
15366
15367
15368   ac_save_CPPFLAGS="$CPPFLAGS"
15369   if test \! -z "$includedir" ; then
15370     CPPFLAGS="$CPPFLAGS -I$includedir"
15371   fi
15372   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15373   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15374   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xdbe.h" "ac_cv_header_X11_extensions_Xdbe_h" "#include <X11/Xlib.h>
15375 "
15376 if test "x$ac_cv_header_X11_extensions_Xdbe_h" = xyes; then :
15377   have_xdbe=yes
15378 fi
15379
15380
15381   CPPFLAGS="$ac_save_CPPFLAGS"
15382   if test "$have_xdbe" = yes; then
15383     $as_echo "#define HAVE_DOUBLE_BUFFER_EXTENSION 1" >>confdefs.h
15384
15385   fi
15386
15387 elif test "$with_xdbe" != no; then
15388   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
15389   exit 1
15390 fi
15391
15392
15393 ###############################################################################
15394 #
15395 #       Check for the SGI XReadDisplay server extension.
15396 #
15397 #       Note: this has to be down here, rather than up with the other server
15398 #       extension tests, so that the output of `configure --help' is in the
15399 #       right order.  Arrgh!
15400 #
15401 ###############################################################################
15402
15403 have_readdisplay=no
15404 with_readdisplay_req=unspecified
15405
15406 # Check whether --with-readdisplay was given.
15407 if test "${with_readdisplay+set}" = set; then :
15408   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
15409 else
15410   with_readdisplay=yes
15411 fi
15412
15413
15414
15415    case "$with_readdisplay" in
15416     yes) ;;
15417     no)  ;;
15418
15419     /*)
15420      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay headers" >&5
15421 $as_echo_n "checking for XReadDisplay headers... " >&6; }
15422      d=$with_readdisplay/include
15423      if test -d $d; then
15424        X_CFLAGS="-I$d $X_CFLAGS"
15425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15426 $as_echo "$d" >&6; }
15427      else
15428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15429 $as_echo "not found ($d: no such directory)" >&6; }
15430      fi
15431
15432      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay libs" >&5
15433 $as_echo_n "checking for XReadDisplay libs... " >&6; }
15434      d=$with_readdisplay/lib
15435      if test -d $d; then
15436        X_LIBS="-L$d $X_LIBS"
15437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15438 $as_echo "$d" >&6; }
15439      else
15440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15441 $as_echo "not found ($d: no such directory)" >&6; }
15442      fi
15443
15444      # replace the directory string with "yes".
15445      with_readdisplay_req="yes"
15446      with_readdisplay=$with_readdisplay_req
15447      ;;
15448
15449     *)
15450      echo ""
15451      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
15452      echo "       If it is a directory, then \`DIR/include' will be added to"
15453      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15454      exit 1
15455      ;;
15456    esac
15457
15458
15459 if test "$with_readdisplay" = yes; then
15460
15461   ac_save_CPPFLAGS="$CPPFLAGS"
15462   if test \! -z "$includedir" ; then
15463     CPPFLAGS="$CPPFLAGS -I$includedir"
15464   fi
15465   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15466   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15467   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/readdisplay.h" "ac_cv_header_X11_extensions_readdisplay_h" "#include <X11/Xlib.h>
15468 "
15469 if test "x$ac_cv_header_X11_extensions_readdisplay_h" = xyes; then :
15470   $as_echo "#define HAVE_READ_DISPLAY_EXTENSION 1" >>confdefs.h
15471
15472 fi
15473
15474
15475   CPPFLAGS="$ac_save_CPPFLAGS"
15476 elif test "$with_readdisplay" != no; then
15477   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
15478   exit 1
15479 fi
15480
15481
15482 ###############################################################################
15483 #
15484 #       Check for a directory full of images to use as the default value
15485 #       of the "imageDirectory" preference.
15486 #
15487 ###############################################################################
15488
15489 have_imagedir=no
15490 with_imagedir_req=unspecified
15491
15492
15493 # Check whether --with-image-directory was given.
15494 if test "${with_image_directory+set}" = set; then :
15495   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
15496 else
15497   with_imagedir=yes
15498 fi
15499
15500 # no HANDLE_X_PATH_ARG for this one
15501
15502 case "$with_imagedir" in
15503   /*)
15504     # absolute path
15505     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $with_imagedir" >&5
15506 $as_echo_n "checking for image directory $with_imagedir... " >&6; }
15507     if test -d "$with_imagedir" ; then
15508       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15509 $as_echo "yes" >&6; }
15510     else
15511       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15512 $as_echo "no" >&6; }
15513       with_imagedir=""
15514     fi
15515   ;;
15516   yes)
15517     with_imagedir=""
15518
15519     #### Could use some more defaults here...
15520     for dd in \
15521       "/usr/share/backgrounds/images/"          \
15522       "/usr/share/wallpapers/"                  \
15523       "/Library/Desktop Pictures/"              \
15524     ; do
15525       if test -z "$with_imagedir"; then
15526         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $dd" >&5
15527 $as_echo_n "checking for image directory $dd... " >&6; }
15528         if test -d "$dd" ; then
15529           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15530 $as_echo "yes" >&6; }
15531           with_imagedir="$dd"
15532         else
15533           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15534 $as_echo "no" >&6; }
15535         fi
15536       fi
15537     done
15538
15539   ;;
15540   no)
15541     with_imagedir=""
15542   ;;
15543
15544   *)
15545     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
15546     exit 1
15547   ;;
15548 esac
15549 ac_cv_imagedir="$with_imagedir"
15550
15551 DEFAULT_IMAGES_P='True'
15552 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
15553
15554 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
15555   DEFAULT_IMAGES_P='False'
15556 fi
15557
15558
15559 ###############################################################################
15560 #
15561 #       Pick a text file to use as the default of the "textFile" preference.
15562 #       Any old file will do, but preferably one that will make interesting
15563 #       shapes when displayed by "starwars" and "fontglide".
15564 #
15565 ###############################################################################
15566
15567 have_textfile=no
15568 with_textfile_req=unspecified
15569
15570
15571 # Check whether --with-text-file was given.
15572 if test "${with_text_file+set}" = set; then :
15573   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
15574 else
15575   with_textfile=yes
15576 fi
15577
15578 # no HANDLE_X_PATH_ARG for this one
15579
15580 case "$with_textfile" in
15581   /*)
15582     # absolute path
15583     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $with_textfile" >&5
15584 $as_echo_n "checking for text file $with_textfile... " >&6; }
15585     if test -f "$with_textfile" ; then
15586       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15587 $as_echo "yes" >&6; }
15588     else
15589       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15590 $as_echo "no" >&6; }
15591       with_textfile=""
15592     fi
15593   ;;
15594   yes)
15595     with_textfile=""
15596
15597     #### Could use some more defaults here...
15598     for f in \
15599       "/usr/X11R6/lib/X11/doc/README"              \
15600       "/usr/share/doc/xserver-common/copyright"    \
15601       "/usr/share/doc/xserver-xorg-core/copyright" \
15602       "/usr/X11R6/README"                          \
15603       "/usr/share/doc/libX11*/COPYING"             \
15604       "/usr/X11/share/X11/doc/README*"             \
15605       "/usr/share/doc/debian/debian-manifesto"     \
15606     ; do
15607       if test -z "$with_textfile"; then
15608         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $f" >&5
15609 $as_echo_n "checking for text file $f... " >&6; }
15610         f=`/bin/ls $f 2>&- | head -1`
15611         if test -f "$f" ; then
15612           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15613 $as_echo "yes" >&6; }
15614           with_textfile="$f"
15615         else
15616           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15617 $as_echo "no" >&6; }
15618         fi
15619       fi
15620     done
15621
15622   ;;
15623   no)
15624     with_textfile=""
15625   ;;
15626
15627   *)
15628     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
15629     exit 1
15630   ;;
15631 esac
15632 ac_cv_textfile="$with_textfile"
15633
15634 DEFAULT_TEXT_FILE="$ac_cv_textfile"
15635
15636
15637 ###############################################################################
15638 #
15639 #       Check the browser to see help URL
15640 #
15641 ###############################################################################
15642
15643 have_browser=no
15644 with_browser_req=unspecified
15645
15646
15647 # Check whether --with-browser was given.
15648 if test "${with_browser+set}" = set; then :
15649   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
15650 else
15651   with_browser=no
15652 fi
15653
15654 # no HANDLE_X_PATH_ARG for this one
15655
15656 case "$with_browser" in
15657   no )
15658   ;;
15659   * )
15660     WITH_BROWSER=$with_browser
15661     gnome_open_program=$with_browser
15662     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for browser $with_browser" >&5
15663 $as_echo_n "checking for browser $with_browser... " >&6; }
15664     with_browser_fullpath=`which $with_browser 2>/dev/null`
15665     case $with_browser_fullpath in
15666          /* )
15667                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15668 $as_echo "yes" >&6; }
15669                  have_browser=yes
15670                  ;;
15671         * )
15672                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15673 $as_echo "no" >&6; }
15674 # Only warning: we don't want to install all packages for the
15675 # dependency of the browser in building stage...
15676                echo "WARNING: browser not found: --with-browser=$with_browser"
15677                ;;
15678     esac
15679   ;;
15680 esac
15681 ac_cv_browser="$with_browser"
15682
15683 ###############################################################################
15684 #
15685 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
15686 #       This should be safe, but let's give people the option.
15687 #
15688 ###############################################################################
15689
15690 setuid_hacks_default=no
15691 setuid_hacks="$setuid_hacks_default"
15692
15693 # Check whether --with-setuid-hacks was given.
15694 if test "${with_setuid_hacks+set}" = set; then :
15695   withval=$with_setuid_hacks; setuid_hacks="$withval"
15696 else
15697   setuid_hacks="$setuid_hacks_default"
15698 fi
15699
15700
15701
15702    case "$setuid_hacks" in
15703     yes) ;;
15704     no)  ;;
15705
15706     /*)
15707      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks headers" >&5
15708 $as_echo_n "checking for setuid hacks headers... " >&6; }
15709      d=$setuid_hacks/include
15710      if test -d $d; then
15711        X_CFLAGS="-I$d $X_CFLAGS"
15712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15713 $as_echo "$d" >&6; }
15714      else
15715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15716 $as_echo "not found ($d: no such directory)" >&6; }
15717      fi
15718
15719      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks libs" >&5
15720 $as_echo_n "checking for setuid hacks libs... " >&6; }
15721      d=$setuid_hacks/lib
15722      if test -d $d; then
15723        X_LIBS="-L$d $X_LIBS"
15724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15725 $as_echo "$d" >&6; }
15726      else
15727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15728 $as_echo "not found ($d: no such directory)" >&6; }
15729      fi
15730
15731      # replace the directory string with "yes".
15732      setuid_hacks_req="yes"
15733      setuid_hacks=$setuid_hacks_req
15734      ;;
15735
15736     *)
15737      echo ""
15738      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
15739      echo "       If it is a directory, then \`DIR/include' will be added to"
15740      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15741      exit 1
15742      ;;
15743    esac
15744
15745
15746 if test "$setuid_hacks" = yes; then
15747   true
15748 elif test "$setuid_hacks" != no; then
15749   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
15750   exit 1
15751 fi
15752
15753
15754 ###############################################################################
15755 #
15756 #       Check for --with-record-animation
15757 #
15758 ###############################################################################
15759
15760 record_anim_default=no
15761 record_anim="$record_anim_default"
15762
15763 # Check whether --with-record-animation was given.
15764 if test "${with_record_animation+set}" = set; then :
15765   withval=$with_record_animation; record_anim="$withval"
15766 else
15767   record_anim="$record_anim_default"
15768 fi
15769
15770
15771
15772    case "$record_anim" in
15773     yes) ;;
15774     no)  ;;
15775
15776     /*)
15777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for record animation headers" >&5
15778 $as_echo_n "checking for record animation headers... " >&6; }
15779      d=$record_anim/include
15780      if test -d $d; then
15781        X_CFLAGS="-I$d $X_CFLAGS"
15782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15783 $as_echo "$d" >&6; }
15784      else
15785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15786 $as_echo "not found ($d: no such directory)" >&6; }
15787      fi
15788
15789      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for record animation libs" >&5
15790 $as_echo_n "checking for record animation libs... " >&6; }
15791      d=$record_anim/lib
15792      if test -d $d; then
15793        X_LIBS="-L$d $X_LIBS"
15794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15795 $as_echo "$d" >&6; }
15796      else
15797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15798 $as_echo "not found ($d: no such directory)" >&6; }
15799      fi
15800
15801      # replace the directory string with "yes".
15802      record_anim_req="yes"
15803      record_anim=$record_anim_req
15804      ;;
15805
15806     *)
15807      echo ""
15808      echo "error: argument to --with-record-animation must be \"yes\", \"no\", or a directory."
15809      echo "       If it is a directory, then \`DIR/include' will be added to"
15810      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15811      exit 1
15812      ;;
15813    esac
15814
15815
15816 if test "$record_anim" = yes; then
15817   true
15818 elif test "$record_anim" != no; then
15819   echo "error: must be yes or no: --with-record-animation=$record_anim"
15820   exit 1
15821 fi
15822
15823 if test "$record_anim" = yes; then
15824   if test "$have_gdk_pixbuf" != yes; then
15825     as_fn_error $? "--with-record-animation requires GDK-Pixbuf" "$LINENO" 5
15826   else
15827     { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling --with-record-animation" >&5
15828 $as_echo "enabling --with-record-animation" >&6; }
15829     $as_echo "#define HAVE_RECORD_ANIM 1" >>confdefs.h
15830
15831     ANIM_OBJS='$(ANIM_OBJS)'
15832     ANIM_LIBS='$(ANIM_LIBS)'
15833   fi
15834 fi
15835
15836 ###############################################################################
15837 #
15838 #       Done testing.  Now, set up the various -I and -L variables,
15839 #       and decide which GUI program to build by default.
15840 #
15841 ###############################################################################
15842
15843 DEPEND=makedepend
15844 DEPEND_FLAGS=
15845 DEPEND_DEFINES=
15846
15847
15848 if test \! -z "$includedir" ; then
15849   INCLUDES="$INCLUDES -I$includedir"
15850 fi
15851
15852 if test \! -z "$libdir" ; then
15853   LDFLAGS="$LDFLAGS -L$libdir"
15854 fi
15855
15856
15857 PREFERRED_DEMO_PROGRAM=''
15858 ALL_DEMO_PROGRAMS=
15859 if test "$have_motif" = yes; then
15860   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
15861   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
15862 fi
15863 if test "$have_gtk" = yes; then
15864   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
15865   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
15866 fi
15867
15868
15869 if test "$have_kerberos" = yes; then
15870   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
15871   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
15872 fi
15873 if test "$have_pam" = yes; then
15874   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
15875   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
15876   INSTALL_PAM="install-pam"
15877 fi
15878 if test "$enable_pam_check_account_type" = yes; then
15879   COMMENT_PAM_CHECK_ACCOUNT=""
15880 else
15881   COMMENT_PAM_CHECK_ACCOUNT="#"
15882 fi
15883 if test "$have_passwd_helper" = yes; then
15884   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
15885   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
15886 fi
15887   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
15888   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
15889
15890
15891 if test "$enable_locking" = yes; then
15892   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
15893   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
15894 else
15895   LOCK_SRCS='$(NOLOCK_SRCS_1)'
15896   LOCK_OBJS='$(NOLOCK_OBJS_1)'
15897 fi
15898
15899 if test "$ac_macosx" = yes; then
15900   EXES_OSX='$(EXES_OSX)'
15901   SCRIPTS_OSX='$(SCRIPTS_OSX)'
15902   MEN_OSX='$(MEN_OSX)'
15903 else
15904   EXES_OSX=
15905   SCRIPTS_OSX=
15906   MEN_OSX=
15907 fi
15908
15909
15910 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
15911
15912 if test "$need_setuid" = yes; then
15913   NEED_SETUID=yes
15914 else
15915   NEED_SETUID=no
15916 fi
15917
15918 if test "$setuid_hacks" = yes; then
15919   SETUID_HACKS=yes
15920 else
15921   SETUID_HACKS=no
15922 fi
15923
15924 tab='   '
15925 if test "$have_gl" = yes; then
15926   GL_EXES='$(GL_EXES)'
15927   SUID_EXES='$(SUID_EXES)'
15928   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
15929   GL_UTIL_EXES='$(GL_UTIL_EXES)'
15930   GL_MEN='$(GL_MEN)'
15931   GL_KLUDGE=" "
15932 else
15933   GL_KLUDGE="-"
15934 fi
15935
15936 if test "$have_gle" = yes; then
15937   GLE_EXES='$(GLE_EXES)'
15938   GLE_KLUDGE=" "
15939 else
15940   GLE_KLUDGE="-"
15941 fi
15942
15943 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
15944  JPEG_EXES='$(JPEG_EXES)'
15945 fi
15946
15947
15948 # Another substitution in the XScreenSaver.ad.in file:
15949 #
15950 if test "$gnome_open_program" != ''; then
15951   GNOME24=''
15952   GNOME22='!    '
15953   NOGNOME='!    '
15954 elif test "$gnome_url_show_program" != ''; then
15955   GNOME24='!    '
15956   GNOME22=''
15957   NOGNOME='!    '
15958 else
15959   GNOME24='!    '
15960   GNOME22='!    '
15961   NOGNOME=''
15962 fi
15963
15964
15965 # Set PO_DATADIR to something sensible.
15966 #
15967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale directory" >&5
15968 $as_echo_n "checking for locale directory... " >&6; }
15969 if test -n "$GTK_DATADIR" ; then
15970   PO_DATADIR="$GTK_DATADIR"
15971 elif test "$have_gtk" = yes; then
15972   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15973   PO_DATADIR="$PO_DATADIR/share"
15974 fi
15975
15976 if test -z "$PO_DATADIR" ; then
15977   #
15978   # #### Total fucking kludge --
15979   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
15980   # but of course we need to expand all the nested variables to do that...
15981   #
15982   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
15983   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
15984 fi
15985
15986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PO_DATADIR/locale" >&5
15987 $as_echo "$PO_DATADIR/locale" >&6; }
15988
15989
15990 # canonicalize slashes.
15991 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
15992
15993 # gcc 3.0 likes to issue this warning for every file:
15994 #
15995 # cc1: warning: changing search order for system directory "/usr/local/include"
15996 # cc1: warning:   as it has already been specified as a non-system directory
15997 #
15998 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
15999 # Which *should* be totally redundant, and thus an ok thing to delete?
16000 #
16001 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
16002
16003
16004 ###############################################################################
16005 #
16006 #       Perform substitutions and write Makefiles.
16007 #
16008 ###############################################################################
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084 APPDEFAULTS=$ac_x_app_defaults
16085
16086
16087
16088
16089
16090
16091
16092 ac_config_files="$ac_config_files Makefile utils/Makefile jwxyz/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/Makefile driver/xscreensaver.pam driver/xscreensaver-demo.glade2 driver/XScreenSaver.ad"
16093
16094 cat >confcache <<\_ACEOF
16095 # This file is a shell script that caches the results of configure
16096 # tests run on this system so they can be shared between configure
16097 # scripts and configure runs, see configure's option --config-cache.
16098 # It is not useful on other systems.  If it contains results you don't
16099 # want to keep, you may remove or edit it.
16100 #
16101 # config.status only pays attention to the cache file if you give it
16102 # the --recheck option to rerun configure.
16103 #
16104 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16105 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16106 # following values.
16107
16108 _ACEOF
16109
16110 # The following way of writing the cache mishandles newlines in values,
16111 # but we know of no workaround that is simple, portable, and efficient.
16112 # So, we kill variables containing newlines.
16113 # Ultrix sh set writes to stderr and can't be redirected directly,
16114 # and sets the high bit in the cache file unless we assign to the vars.
16115 (
16116   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16117     eval ac_val=\$$ac_var
16118     case $ac_val in #(
16119     *${as_nl}*)
16120       case $ac_var in #(
16121       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16122 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16123       esac
16124       case $ac_var in #(
16125       _ | IFS | as_nl) ;; #(
16126       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16127       *) { eval $ac_var=; unset $ac_var;} ;;
16128       esac ;;
16129     esac
16130   done
16131
16132   (set) 2>&1 |
16133     case $as_nl`(ac_space=' '; set) 2>&1` in #(
16134     *${as_nl}ac_space=\ *)
16135       # `set' does not quote correctly, so add quotes: double-quote
16136       # substitution turns \\\\ into \\, and sed turns \\ into \.
16137       sed -n \
16138         "s/'/'\\\\''/g;
16139           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16140       ;; #(
16141     *)
16142       # `set' quotes correctly as required by POSIX, so do not add quotes.
16143       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16144       ;;
16145     esac |
16146     sort
16147 ) |
16148   sed '
16149      /^ac_cv_env_/b end
16150      t clear
16151      :clear
16152      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16153      t end
16154      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16155      :end' >>confcache
16156 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16157   if test -w "$cache_file"; then
16158     if test "x$cache_file" != "x/dev/null"; then
16159       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16160 $as_echo "$as_me: updating cache $cache_file" >&6;}
16161       if test ! -f "$cache_file" || test -h "$cache_file"; then
16162         cat confcache >"$cache_file"
16163       else
16164         case $cache_file in #(
16165         */* | ?:*)
16166           mv -f confcache "$cache_file"$$ &&
16167           mv -f "$cache_file"$$ "$cache_file" ;; #(
16168         *)
16169           mv -f confcache "$cache_file" ;;
16170         esac
16171       fi
16172     fi
16173   else
16174     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16175 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16176   fi
16177 fi
16178 rm -f confcache
16179
16180 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16181 # Let make expand exec_prefix.
16182 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16183
16184 DEFS=-DHAVE_CONFIG_H
16185
16186 ac_libobjs=
16187 ac_ltlibobjs=
16188 U=
16189 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16190   # 1. Remove the extension, and $U if already installed.
16191   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16192   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16193   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
16194   #    will be set to the directory where LIBOBJS objects are built.
16195   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16196   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16197 done
16198 LIBOBJS=$ac_libobjs
16199
16200 LTLIBOBJS=$ac_ltlibobjs
16201
16202
16203
16204   ac_config_commands="$ac_config_commands po/stamp-it"
16205
16206
16207
16208 : "${CONFIG_STATUS=./config.status}"
16209 ac_write_fail=0
16210 ac_clean_files_save=$ac_clean_files
16211 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16212 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16213 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16214 as_write_fail=0
16215 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16216 #! $SHELL
16217 # Generated by $as_me.
16218 # Run this file to recreate the current configuration.
16219 # Compiler output produced by configure, useful for debugging
16220 # configure, is in config.log if it exists.
16221
16222 debug=false
16223 ac_cs_recheck=false
16224 ac_cs_silent=false
16225
16226 SHELL=\${CONFIG_SHELL-$SHELL}
16227 export SHELL
16228 _ASEOF
16229 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16230 ## -------------------- ##
16231 ## M4sh Initialization. ##
16232 ## -------------------- ##
16233
16234 # Be more Bourne compatible
16235 DUALCASE=1; export DUALCASE # for MKS sh
16236 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16237   emulate sh
16238   NULLCMD=:
16239   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16240   # is contrary to our usage.  Disable this feature.
16241   alias -g '${1+"$@"}'='"$@"'
16242   setopt NO_GLOB_SUBST
16243 else
16244   case `(set -o) 2>/dev/null` in #(
16245   *posix*) :
16246     set -o posix ;; #(
16247   *) :
16248      ;;
16249 esac
16250 fi
16251
16252
16253 as_nl='
16254 '
16255 export as_nl
16256 # Printing a long string crashes Solaris 7 /usr/bin/printf.
16257 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16258 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16259 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16260 # Prefer a ksh shell builtin over an external printf program on Solaris,
16261 # but without wasting forks for bash or zsh.
16262 if test -z "$BASH_VERSION$ZSH_VERSION" \
16263     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16264   as_echo='print -r --'
16265   as_echo_n='print -rn --'
16266 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16267   as_echo='printf %s\n'
16268   as_echo_n='printf %s'
16269 else
16270   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16271     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16272     as_echo_n='/usr/ucb/echo -n'
16273   else
16274     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16275     as_echo_n_body='eval
16276       arg=$1;
16277       case $arg in #(
16278       *"$as_nl"*)
16279         expr "X$arg" : "X\\(.*\\)$as_nl";
16280         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16281       esac;
16282       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16283     '
16284     export as_echo_n_body
16285     as_echo_n='sh -c $as_echo_n_body as_echo'
16286   fi
16287   export as_echo_body
16288   as_echo='sh -c $as_echo_body as_echo'
16289 fi
16290
16291 # The user is always right.
16292 if test "${PATH_SEPARATOR+set}" != set; then
16293   PATH_SEPARATOR=:
16294   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16295     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16296       PATH_SEPARATOR=';'
16297   }
16298 fi
16299
16300
16301 # IFS
16302 # We need space, tab and new line, in precisely that order.  Quoting is
16303 # there to prevent editors from complaining about space-tab.
16304 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
16305 # splitting by setting IFS to empty value.)
16306 IFS=" ""        $as_nl"
16307
16308 # Find who we are.  Look in the path if we contain no directory separator.
16309 as_myself=
16310 case $0 in #((
16311   *[\\/]* ) as_myself=$0 ;;
16312   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16313 for as_dir in $PATH
16314 do
16315   IFS=$as_save_IFS
16316   test -z "$as_dir" && as_dir=.
16317     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16318   done
16319 IFS=$as_save_IFS
16320
16321      ;;
16322 esac
16323 # We did not find ourselves, most probably we were run as `sh COMMAND'
16324 # in which case we are not to be found in the path.
16325 if test "x$as_myself" = x; then
16326   as_myself=$0
16327 fi
16328 if test ! -f "$as_myself"; then
16329   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16330   exit 1
16331 fi
16332
16333 # Unset variables that we do not need and which cause bugs (e.g. in
16334 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
16335 # suppresses any "Segmentation fault" message there.  '((' could
16336 # trigger a bug in pdksh 5.2.14.
16337 for as_var in BASH_ENV ENV MAIL MAILPATH
16338 do eval test x\${$as_var+set} = xset \
16339   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16340 done
16341 PS1='$ '
16342 PS2='> '
16343 PS4='+ '
16344
16345 # NLS nuisances.
16346 LC_ALL=C
16347 export LC_ALL
16348 LANGUAGE=C
16349 export LANGUAGE
16350
16351 # CDPATH.
16352 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16353
16354
16355 # as_fn_error STATUS ERROR [LINENO LOG_FD]
16356 # ----------------------------------------
16357 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16358 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16359 # script with STATUS, using 1 if that was 0.
16360 as_fn_error ()
16361 {
16362   as_status=$1; test $as_status -eq 0 && as_status=1
16363   if test "$4"; then
16364     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16365     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16366   fi
16367   $as_echo "$as_me: error: $2" >&2
16368   as_fn_exit $as_status
16369 } # as_fn_error
16370
16371
16372 # as_fn_set_status STATUS
16373 # -----------------------
16374 # Set $? to STATUS, without forking.
16375 as_fn_set_status ()
16376 {
16377   return $1
16378 } # as_fn_set_status
16379
16380 # as_fn_exit STATUS
16381 # -----------------
16382 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16383 as_fn_exit ()
16384 {
16385   set +e
16386   as_fn_set_status $1
16387   exit $1
16388 } # as_fn_exit
16389
16390 # as_fn_unset VAR
16391 # ---------------
16392 # Portably unset VAR.
16393 as_fn_unset ()
16394 {
16395   { eval $1=; unset $1;}
16396 }
16397 as_unset=as_fn_unset
16398 # as_fn_append VAR VALUE
16399 # ----------------------
16400 # Append the text in VALUE to the end of the definition contained in VAR. Take
16401 # advantage of any shell optimizations that allow amortized linear growth over
16402 # repeated appends, instead of the typical quadratic growth present in naive
16403 # implementations.
16404 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16405   eval 'as_fn_append ()
16406   {
16407     eval $1+=\$2
16408   }'
16409 else
16410   as_fn_append ()
16411   {
16412     eval $1=\$$1\$2
16413   }
16414 fi # as_fn_append
16415
16416 # as_fn_arith ARG...
16417 # ------------------
16418 # Perform arithmetic evaluation on the ARGs, and store the result in the
16419 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16420 # must be portable across $(()) and expr.
16421 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16422   eval 'as_fn_arith ()
16423   {
16424     as_val=$(( $* ))
16425   }'
16426 else
16427   as_fn_arith ()
16428   {
16429     as_val=`expr "$@" || test $? -eq 1`
16430   }
16431 fi # as_fn_arith
16432
16433
16434 if expr a : '\(a\)' >/dev/null 2>&1 &&
16435    test "X`expr 00001 : '.*\(...\)'`" = X001; then
16436   as_expr=expr
16437 else
16438   as_expr=false
16439 fi
16440
16441 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16442   as_basename=basename
16443 else
16444   as_basename=false
16445 fi
16446
16447 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16448   as_dirname=dirname
16449 else
16450   as_dirname=false
16451 fi
16452
16453 as_me=`$as_basename -- "$0" ||
16454 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16455          X"$0" : 'X\(//\)$' \| \
16456          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16457 $as_echo X/"$0" |
16458     sed '/^.*\/\([^/][^/]*\)\/*$/{
16459             s//\1/
16460             q
16461           }
16462           /^X\/\(\/\/\)$/{
16463             s//\1/
16464             q
16465           }
16466           /^X\/\(\/\).*/{
16467             s//\1/
16468             q
16469           }
16470           s/.*/./; q'`
16471
16472 # Avoid depending upon Character Ranges.
16473 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16474 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16475 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16476 as_cr_digits='0123456789'
16477 as_cr_alnum=$as_cr_Letters$as_cr_digits
16478
16479 ECHO_C= ECHO_N= ECHO_T=
16480 case `echo -n x` in #(((((
16481 -n*)
16482   case `echo 'xy\c'` in
16483   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
16484   xy)  ECHO_C='\c';;
16485   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
16486        ECHO_T=' ';;
16487   esac;;
16488 *)
16489   ECHO_N='-n';;
16490 esac
16491
16492 rm -f conf$$ conf$$.exe conf$$.file
16493 if test -d conf$$.dir; then
16494   rm -f conf$$.dir/conf$$.file
16495 else
16496   rm -f conf$$.dir
16497   mkdir conf$$.dir 2>/dev/null
16498 fi
16499 if (echo >conf$$.file) 2>/dev/null; then
16500   if ln -s conf$$.file conf$$ 2>/dev/null; then
16501     as_ln_s='ln -s'
16502     # ... but there are two gotchas:
16503     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16504     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16505     # In both cases, we have to default to `cp -pR'.
16506     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16507       as_ln_s='cp -pR'
16508   elif ln conf$$.file conf$$ 2>/dev/null; then
16509     as_ln_s=ln
16510   else
16511     as_ln_s='cp -pR'
16512   fi
16513 else
16514   as_ln_s='cp -pR'
16515 fi
16516 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16517 rmdir conf$$.dir 2>/dev/null
16518
16519
16520 # as_fn_mkdir_p
16521 # -------------
16522 # Create "$as_dir" as a directory, including parents if necessary.
16523 as_fn_mkdir_p ()
16524 {
16525
16526   case $as_dir in #(
16527   -*) as_dir=./$as_dir;;
16528   esac
16529   test -d "$as_dir" || eval $as_mkdir_p || {
16530     as_dirs=
16531     while :; do
16532       case $as_dir in #(
16533       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16534       *) as_qdir=$as_dir;;
16535       esac
16536       as_dirs="'$as_qdir' $as_dirs"
16537       as_dir=`$as_dirname -- "$as_dir" ||
16538 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16539          X"$as_dir" : 'X\(//\)[^/]' \| \
16540          X"$as_dir" : 'X\(//\)$' \| \
16541          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16542 $as_echo X"$as_dir" |
16543     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16544             s//\1/
16545             q
16546           }
16547           /^X\(\/\/\)[^/].*/{
16548             s//\1/
16549             q
16550           }
16551           /^X\(\/\/\)$/{
16552             s//\1/
16553             q
16554           }
16555           /^X\(\/\).*/{
16556             s//\1/
16557             q
16558           }
16559           s/.*/./; q'`
16560       test -d "$as_dir" && break
16561     done
16562     test -z "$as_dirs" || eval "mkdir $as_dirs"
16563   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16564
16565
16566 } # as_fn_mkdir_p
16567 if mkdir -p . 2>/dev/null; then
16568   as_mkdir_p='mkdir -p "$as_dir"'
16569 else
16570   test -d ./-p && rmdir ./-p
16571   as_mkdir_p=false
16572 fi
16573
16574
16575 # as_fn_executable_p FILE
16576 # -----------------------
16577 # Test if FILE is an executable regular file.
16578 as_fn_executable_p ()
16579 {
16580   test -f "$1" && test -x "$1"
16581 } # as_fn_executable_p
16582 as_test_x='test -x'
16583 as_executable_p=as_fn_executable_p
16584
16585 # Sed expression to map a string onto a valid CPP name.
16586 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16587
16588 # Sed expression to map a string onto a valid variable name.
16589 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16590
16591
16592 exec 6>&1
16593 ## ----------------------------------- ##
16594 ## Main body of $CONFIG_STATUS script. ##
16595 ## ----------------------------------- ##
16596 _ASEOF
16597 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16598
16599 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16600 # Save the log message, to keep $0 and so on meaningful, and to
16601 # report actual input values of CONFIG_FILES etc. instead of their
16602 # values after options handling.
16603 ac_log="
16604 This file was extended by $as_me, which was
16605 generated by GNU Autoconf 2.69.  Invocation command line was
16606
16607   CONFIG_FILES    = $CONFIG_FILES
16608   CONFIG_HEADERS  = $CONFIG_HEADERS
16609   CONFIG_LINKS    = $CONFIG_LINKS
16610   CONFIG_COMMANDS = $CONFIG_COMMANDS
16611   $ $0 $@
16612
16613 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16614 "
16615
16616 _ACEOF
16617
16618 case $ac_config_files in *"
16619 "*) set x $ac_config_files; shift; ac_config_files=$*;;
16620 esac
16621
16622 case $ac_config_headers in *"
16623 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16624 esac
16625
16626
16627 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16628 # Files that config.status was made for.
16629 config_files="$ac_config_files"
16630 config_headers="$ac_config_headers"
16631 config_commands="$ac_config_commands"
16632
16633 _ACEOF
16634
16635 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16636 ac_cs_usage="\
16637 \`$as_me' instantiates files and other configuration actions
16638 from templates according to the current configuration.  Unless the files
16639 and actions are specified as TAGs, all are instantiated by default.
16640
16641 Usage: $0 [OPTION]... [TAG]...
16642
16643   -h, --help       print this help, then exit
16644   -V, --version    print version number and configuration settings, then exit
16645       --config     print configuration, then exit
16646   -q, --quiet, --silent
16647                    do not print progress messages
16648   -d, --debug      don't remove temporary files
16649       --recheck    update $as_me by reconfiguring in the same conditions
16650       --file=FILE[:TEMPLATE]
16651                    instantiate the configuration file FILE
16652       --header=FILE[:TEMPLATE]
16653                    instantiate the configuration header FILE
16654
16655 Configuration files:
16656 $config_files
16657
16658 Configuration headers:
16659 $config_headers
16660
16661 Configuration commands:
16662 $config_commands
16663
16664 Report bugs to the package provider."
16665
16666 _ACEOF
16667 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16668 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16669 ac_cs_version="\\
16670 config.status
16671 configured by $0, generated by GNU Autoconf 2.69,
16672   with options \\"\$ac_cs_config\\"
16673
16674 Copyright (C) 2012 Free Software Foundation, Inc.
16675 This config.status script is free software; the Free Software Foundation
16676 gives unlimited permission to copy, distribute and modify it."
16677
16678 ac_pwd='$ac_pwd'
16679 srcdir='$srcdir'
16680 INSTALL='$INSTALL'
16681 test -n "\$AWK" || AWK=awk
16682 _ACEOF
16683
16684 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16685 # The default lists apply if the user does not specify any file.
16686 ac_need_defaults=:
16687 while test $# != 0
16688 do
16689   case $1 in
16690   --*=?*)
16691     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16692     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16693     ac_shift=:
16694     ;;
16695   --*=)
16696     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16697     ac_optarg=
16698     ac_shift=:
16699     ;;
16700   *)
16701     ac_option=$1
16702     ac_optarg=$2
16703     ac_shift=shift
16704     ;;
16705   esac
16706
16707   case $ac_option in
16708   # Handling of the options.
16709   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16710     ac_cs_recheck=: ;;
16711   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16712     $as_echo "$ac_cs_version"; exit ;;
16713   --config | --confi | --conf | --con | --co | --c )
16714     $as_echo "$ac_cs_config"; exit ;;
16715   --debug | --debu | --deb | --de | --d | -d )
16716     debug=: ;;
16717   --file | --fil | --fi | --f )
16718     $ac_shift
16719     case $ac_optarg in
16720     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16721     '') as_fn_error $? "missing file argument" ;;
16722     esac
16723     as_fn_append CONFIG_FILES " '$ac_optarg'"
16724     ac_need_defaults=false;;
16725   --header | --heade | --head | --hea )
16726     $ac_shift
16727     case $ac_optarg in
16728     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16729     esac
16730     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16731     ac_need_defaults=false;;
16732   --he | --h)
16733     # Conflict between --help and --header
16734     as_fn_error $? "ambiguous option: \`$1'
16735 Try \`$0 --help' for more information.";;
16736   --help | --hel | -h )
16737     $as_echo "$ac_cs_usage"; exit ;;
16738   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16739   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16740     ac_cs_silent=: ;;
16741
16742   # This is an error.
16743   -*) as_fn_error $? "unrecognized option: \`$1'
16744 Try \`$0 --help' for more information." ;;
16745
16746   *) as_fn_append ac_config_targets " $1"
16747      ac_need_defaults=false ;;
16748
16749   esac
16750   shift
16751 done
16752
16753 ac_configure_extra_args=
16754
16755 if $ac_cs_silent; then
16756   exec 6>/dev/null
16757   ac_configure_extra_args="$ac_configure_extra_args --silent"
16758 fi
16759
16760 _ACEOF
16761 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16762 if \$ac_cs_recheck; then
16763   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16764   shift
16765   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16766   CONFIG_SHELL='$SHELL'
16767   export CONFIG_SHELL
16768   exec "\$@"
16769 fi
16770
16771 _ACEOF
16772 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16773 exec 5>>config.log
16774 {
16775   echo
16776   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16777 ## Running $as_me. ##
16778 _ASBOX
16779   $as_echo "$ac_log"
16780 } >&5
16781
16782 _ACEOF
16783 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16784 #
16785 # INIT-COMMANDS
16786 #
16787
16788
16789 _ACEOF
16790
16791 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16792
16793 # Handling of arguments.
16794 for ac_config_target in $ac_config_targets
16795 do
16796   case $ac_config_target in
16797     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
16798     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
16799     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16800     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
16801     "jwxyz/Makefile") CONFIG_FILES="$CONFIG_FILES jwxyz/Makefile" ;;
16802     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
16803     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
16804     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
16805     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
16806     "driver/xscreensaver.pam") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.pam" ;;
16807     "driver/xscreensaver-demo.glade2") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver-demo.glade2" ;;
16808     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
16809     "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
16810
16811   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16812   esac
16813 done
16814
16815
16816 # If the user did not use the arguments to specify the items to instantiate,
16817 # then the envvar interface is used.  Set only those that are not.
16818 # We use the long form for the default assignment because of an extremely
16819 # bizarre bug on SunOS 4.1.3.
16820 if $ac_need_defaults; then
16821   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16822   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16823   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16824 fi
16825
16826 # Have a temporary directory for convenience.  Make it in the build tree
16827 # simply because there is no reason against having it here, and in addition,
16828 # creating and moving files from /tmp can sometimes cause problems.
16829 # Hook for its removal unless debugging.
16830 # Note that there is a small window in which the directory will not be cleaned:
16831 # after its creation but before its name has been assigned to `$tmp'.
16832 $debug ||
16833 {
16834   tmp= ac_tmp=
16835   trap 'exit_status=$?
16836   : "${ac_tmp:=$tmp}"
16837   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16838 ' 0
16839   trap 'as_fn_exit 1' 1 2 13 15
16840 }
16841 # Create a (secure) tmp directory for tmp files.
16842
16843 {
16844   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16845   test -d "$tmp"
16846 }  ||
16847 {
16848   tmp=./conf$$-$RANDOM
16849   (umask 077 && mkdir "$tmp")
16850 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16851 ac_tmp=$tmp
16852
16853 # Set up the scripts for CONFIG_FILES section.
16854 # No need to generate them if there are no CONFIG_FILES.
16855 # This happens for instance with `./config.status config.h'.
16856 if test -n "$CONFIG_FILES"; then
16857
16858
16859 ac_cr=`echo X | tr X '\015'`
16860 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16861 # But we know of no other shell where ac_cr would be empty at this
16862 # point, so we can use a bashism as a fallback.
16863 if test "x$ac_cr" = x; then
16864   eval ac_cr=\$\'\\r\'
16865 fi
16866 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16867 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16868   ac_cs_awk_cr='\\r'
16869 else
16870   ac_cs_awk_cr=$ac_cr
16871 fi
16872
16873 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16874 _ACEOF
16875
16876
16877 {
16878   echo "cat >conf$$subs.awk <<_ACEOF" &&
16879   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16880   echo "_ACEOF"
16881 } >conf$$subs.sh ||
16882   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16883 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16884 ac_delim='%!_!# '
16885 for ac_last_try in false false false false false :; do
16886   . ./conf$$subs.sh ||
16887     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16888
16889   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16890   if test $ac_delim_n = $ac_delim_num; then
16891     break
16892   elif $ac_last_try; then
16893     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16894   else
16895     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16896   fi
16897 done
16898 rm -f conf$$subs.sh
16899
16900 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16901 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16902 _ACEOF
16903 sed -n '
16904 h
16905 s/^/S["/; s/!.*/"]=/
16906 p
16907 g
16908 s/^[^!]*!//
16909 :repl
16910 t repl
16911 s/'"$ac_delim"'$//
16912 t delim
16913 :nl
16914 h
16915 s/\(.\{148\}\)..*/\1/
16916 t more1
16917 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16918 p
16919 n
16920 b repl
16921 :more1
16922 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16923 p
16924 g
16925 s/.\{148\}//
16926 t nl
16927 :delim
16928 h
16929 s/\(.\{148\}\)..*/\1/
16930 t more2
16931 s/["\\]/\\&/g; s/^/"/; s/$/"/
16932 p
16933 b
16934 :more2
16935 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16936 p
16937 g
16938 s/.\{148\}//
16939 t delim
16940 ' <conf$$subs.awk | sed '
16941 /^[^""]/{
16942   N
16943   s/\n//
16944 }
16945 ' >>$CONFIG_STATUS || ac_write_fail=1
16946 rm -f conf$$subs.awk
16947 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16948 _ACAWK
16949 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16950   for (key in S) S_is_set[key] = 1
16951   FS = "\a"
16952
16953 }
16954 {
16955   line = $ 0
16956   nfields = split(line, field, "@")
16957   substed = 0
16958   len = length(field[1])
16959   for (i = 2; i < nfields; i++) {
16960     key = field[i]
16961     keylen = length(key)
16962     if (S_is_set[key]) {
16963       value = S[key]
16964       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16965       len += length(value) + length(field[++i])
16966       substed = 1
16967     } else
16968       len += 1 + keylen
16969   }
16970
16971   print line
16972 }
16973
16974 _ACAWK
16975 _ACEOF
16976 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16977 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16978   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16979 else
16980   cat
16981 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16982   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16983 _ACEOF
16984
16985 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16986 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16987 # trailing colons and then remove the whole line if VPATH becomes empty
16988 # (actually we leave an empty line to preserve line numbers).
16989 if test "x$srcdir" = x.; then
16990   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16991 h
16992 s///
16993 s/^/:/
16994 s/[      ]*$/:/
16995 s/:\$(srcdir):/:/g
16996 s/:\${srcdir}:/:/g
16997 s/:@srcdir@:/:/g
16998 s/^:*//
16999 s/:*$//
17000 x
17001 s/\(=[   ]*\).*/\1/
17002 G
17003 s/\n//
17004 s/^[^=]*=[       ]*$//
17005 }'
17006 fi
17007
17008 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17009 fi # test -n "$CONFIG_FILES"
17010
17011 # Set up the scripts for CONFIG_HEADERS section.
17012 # No need to generate them if there are no CONFIG_HEADERS.
17013 # This happens for instance with `./config.status Makefile'.
17014 if test -n "$CONFIG_HEADERS"; then
17015 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
17016 BEGIN {
17017 _ACEOF
17018
17019 # Transform confdefs.h into an awk script `defines.awk', embedded as
17020 # here-document in config.status, that substitutes the proper values into
17021 # config.h.in to produce config.h.
17022
17023 # Create a delimiter string that does not exist in confdefs.h, to ease
17024 # handling of long lines.
17025 ac_delim='%!_!# '
17026 for ac_last_try in false false :; do
17027   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17028   if test -z "$ac_tt"; then
17029     break
17030   elif $ac_last_try; then
17031     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
17032   else
17033     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17034   fi
17035 done
17036
17037 # For the awk script, D is an array of macro values keyed by name,
17038 # likewise P contains macro parameters if any.  Preserve backslash
17039 # newline sequences.
17040
17041 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17042 sed -n '
17043 s/.\{148\}/&'"$ac_delim"'/g
17044 t rset
17045 :rset
17046 s/^[     ]*#[    ]*define[       ][      ]*/ /
17047 t def
17048 d
17049 :def
17050 s/\\$//
17051 t bsnl
17052 s/["\\]/\\&/g
17053 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17054 D["\1"]=" \3"/p
17055 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
17056 d
17057 :bsnl
17058 s/["\\]/\\&/g
17059 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17060 D["\1"]=" \3\\\\\\n"\\/p
17061 t cont
17062 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17063 t cont
17064 d
17065 :cont
17066 n
17067 s/.\{148\}/&'"$ac_delim"'/g
17068 t clear
17069 :clear
17070 s/\\$//
17071 t bsnlc
17072 s/["\\]/\\&/g; s/^/"/; s/$/"/p
17073 d
17074 :bsnlc
17075 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17076 b cont
17077 ' <confdefs.h | sed '
17078 s/'"$ac_delim"'/"\\\
17079 "/g' >>$CONFIG_STATUS || ac_write_fail=1
17080
17081 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17082   for (key in D) D_is_set[key] = 1
17083   FS = "\a"
17084 }
17085 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17086   line = \$ 0
17087   split(line, arg, " ")
17088   if (arg[1] == "#") {
17089     defundef = arg[2]
17090     mac1 = arg[3]
17091   } else {
17092     defundef = substr(arg[1], 2)
17093     mac1 = arg[2]
17094   }
17095   split(mac1, mac2, "(") #)
17096   macro = mac2[1]
17097   prefix = substr(line, 1, index(line, defundef) - 1)
17098   if (D_is_set[macro]) {
17099     # Preserve the white space surrounding the "#".
17100     print prefix "define", macro P[macro] D[macro]
17101     next
17102   } else {
17103     # Replace #undef with comments.  This is necessary, for example,
17104     # in the case of _POSIX_SOURCE, which is predefined and required
17105     # on some systems where configure will not decide to define it.
17106     if (defundef == "undef") {
17107       print "/*", prefix defundef, macro, "*/"
17108       next
17109     }
17110   }
17111 }
17112 { print }
17113 _ACAWK
17114 _ACEOF
17115 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17116   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17117 fi # test -n "$CONFIG_HEADERS"
17118
17119
17120 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
17121 shift
17122 for ac_tag
17123 do
17124   case $ac_tag in
17125   :[FHLC]) ac_mode=$ac_tag; continue;;
17126   esac
17127   case $ac_mode$ac_tag in
17128   :[FHL]*:*);;
17129   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17130   :[FH]-) ac_tag=-:-;;
17131   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17132   esac
17133   ac_save_IFS=$IFS
17134   IFS=:
17135   set x $ac_tag
17136   IFS=$ac_save_IFS
17137   shift
17138   ac_file=$1
17139   shift
17140
17141   case $ac_mode in
17142   :L) ac_source=$1;;
17143   :[FH])
17144     ac_file_inputs=
17145     for ac_f
17146     do
17147       case $ac_f in
17148       -) ac_f="$ac_tmp/stdin";;
17149       *) # Look for the file first in the build tree, then in the source tree
17150          # (if the path is not absolute).  The absolute path cannot be DOS-style,
17151          # because $ac_f cannot contain `:'.
17152          test -f "$ac_f" ||
17153            case $ac_f in
17154            [\\/$]*) false;;
17155            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17156            esac ||
17157            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17158       esac
17159       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17160       as_fn_append ac_file_inputs " '$ac_f'"
17161     done
17162
17163     # Let's still pretend it is `configure' which instantiates (i.e., don't
17164     # use $as_me), people would be surprised to read:
17165     #    /* config.h.  Generated by config.status.  */
17166     configure_input='Generated from '`
17167           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17168         `' by configure.'
17169     if test x"$ac_file" != x-; then
17170       configure_input="$ac_file.  $configure_input"
17171       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17172 $as_echo "$as_me: creating $ac_file" >&6;}
17173     fi
17174     # Neutralize special characters interpreted by sed in replacement strings.
17175     case $configure_input in #(
17176     *\&* | *\|* | *\\* )
17177        ac_sed_conf_input=`$as_echo "$configure_input" |
17178        sed 's/[\\\\&|]/\\\\&/g'`;; #(
17179     *) ac_sed_conf_input=$configure_input;;
17180     esac
17181
17182     case $ac_tag in
17183     *:-:* | *:-) cat >"$ac_tmp/stdin" \
17184       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17185     esac
17186     ;;
17187   esac
17188
17189   ac_dir=`$as_dirname -- "$ac_file" ||
17190 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17191          X"$ac_file" : 'X\(//\)[^/]' \| \
17192          X"$ac_file" : 'X\(//\)$' \| \
17193          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17194 $as_echo X"$ac_file" |
17195     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17196             s//\1/
17197             q
17198           }
17199           /^X\(\/\/\)[^/].*/{
17200             s//\1/
17201             q
17202           }
17203           /^X\(\/\/\)$/{
17204             s//\1/
17205             q
17206           }
17207           /^X\(\/\).*/{
17208             s//\1/
17209             q
17210           }
17211           s/.*/./; q'`
17212   as_dir="$ac_dir"; as_fn_mkdir_p
17213   ac_builddir=.
17214
17215 case "$ac_dir" in
17216 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17217 *)
17218   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17219   # A ".." for each directory in $ac_dir_suffix.
17220   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17221   case $ac_top_builddir_sub in
17222   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17223   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17224   esac ;;
17225 esac
17226 ac_abs_top_builddir=$ac_pwd
17227 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17228 # for backward compatibility:
17229 ac_top_builddir=$ac_top_build_prefix
17230
17231 case $srcdir in
17232   .)  # We are building in place.
17233     ac_srcdir=.
17234     ac_top_srcdir=$ac_top_builddir_sub
17235     ac_abs_top_srcdir=$ac_pwd ;;
17236   [\\/]* | ?:[\\/]* )  # Absolute name.
17237     ac_srcdir=$srcdir$ac_dir_suffix;
17238     ac_top_srcdir=$srcdir
17239     ac_abs_top_srcdir=$srcdir ;;
17240   *) # Relative name.
17241     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17242     ac_top_srcdir=$ac_top_build_prefix$srcdir
17243     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17244 esac
17245 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17246
17247
17248   case $ac_mode in
17249   :F)
17250   #
17251   # CONFIG_FILE
17252   #
17253
17254   case $INSTALL in
17255   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17256   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17257   esac
17258 _ACEOF
17259
17260 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17261 # If the template does not know about datarootdir, expand it.
17262 # FIXME: This hack should be removed a few years after 2.60.
17263 ac_datarootdir_hack=; ac_datarootdir_seen=
17264 ac_sed_dataroot='
17265 /datarootdir/ {
17266   p
17267   q
17268 }
17269 /@datadir@/p
17270 /@docdir@/p
17271 /@infodir@/p
17272 /@localedir@/p
17273 /@mandir@/p'
17274 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17275 *datarootdir*) ac_datarootdir_seen=yes;;
17276 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17277   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17278 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17279 _ACEOF
17280 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17281   ac_datarootdir_hack='
17282   s&@datadir@&$datadir&g
17283   s&@docdir@&$docdir&g
17284   s&@infodir@&$infodir&g
17285   s&@localedir@&$localedir&g
17286   s&@mandir@&$mandir&g
17287   s&\\\${datarootdir}&$datarootdir&g' ;;
17288 esac
17289 _ACEOF
17290
17291 # Neutralize VPATH when `$srcdir' = `.'.
17292 # Shell code in configure.ac might set extrasub.
17293 # FIXME: do we really want to maintain this feature?
17294 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17295 ac_sed_extra="$ac_vpsub
17296 $extrasub
17297 _ACEOF
17298 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17299 :t
17300 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17301 s|@configure_input@|$ac_sed_conf_input|;t t
17302 s&@top_builddir@&$ac_top_builddir_sub&;t t
17303 s&@top_build_prefix@&$ac_top_build_prefix&;t t
17304 s&@srcdir@&$ac_srcdir&;t t
17305 s&@abs_srcdir@&$ac_abs_srcdir&;t t
17306 s&@top_srcdir@&$ac_top_srcdir&;t t
17307 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17308 s&@builddir@&$ac_builddir&;t t
17309 s&@abs_builddir@&$ac_abs_builddir&;t t
17310 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17311 s&@INSTALL@&$ac_INSTALL&;t t
17312 $ac_datarootdir_hack
17313 "
17314 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17315   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17316
17317 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17318   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17319   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
17320       "$ac_tmp/out"`; test -z "$ac_out"; } &&
17321   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17322 which seems to be undefined.  Please make sure it is defined" >&5
17323 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17324 which seems to be undefined.  Please make sure it is defined" >&2;}
17325
17326   rm -f "$ac_tmp/stdin"
17327   case $ac_file in
17328   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17329   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
17330   esac \
17331   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17332  ;;
17333   :H)
17334   #
17335   # CONFIG_HEADER
17336   #
17337   if test x"$ac_file" != x-; then
17338     {
17339       $as_echo "/* $configure_input  */" \
17340       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17341     } >"$ac_tmp/config.h" \
17342       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17343     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17344       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17345 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17346     else
17347       rm -f "$ac_file"
17348       mv "$ac_tmp/config.h" "$ac_file" \
17349         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17350     fi
17351   else
17352     $as_echo "/* $configure_input  */" \
17353       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17354       || as_fn_error $? "could not create -" "$LINENO" 5
17355   fi
17356  ;;
17357
17358   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17359 $as_echo "$as_me: executing $ac_file commands" >&6;}
17360  ;;
17361   esac
17362
17363
17364   case $ac_file$ac_mode in
17365     "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
17366         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
17367       esac ;;
17368     "po/stamp-it":C)
17369     if  ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
17370        as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5
17371     fi
17372     rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
17373     >"po/stamp-it.tmp"
17374     sed '/^#/d
17375          s/^[[].*] *//
17376          /^[    ]*$/d
17377         '"s|^|  $ac_top_srcdir/|" \
17378       "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
17379
17380     sed '/^POTFILES =/,/[^\\]$/ {
17381                 /^POTFILES =/!d
17382                 r po/POTFILES
17383           }
17384          ' "po/Makefile.in" >"po/Makefile"
17385     rm -f "po/Makefile.tmp"
17386     mv "po/stamp-it.tmp" "po/stamp-it"
17387    ;;
17388
17389   esac
17390 done # for ac_tag
17391
17392
17393 as_fn_exit 0
17394 _ACEOF
17395 ac_clean_files=$ac_clean_files_save
17396
17397 test $ac_write_fail = 0 ||
17398   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17399
17400
17401 # configure is writing to config.log, and then calls config.status.
17402 # config.status does its own redirection, appending to config.log.
17403 # Unfortunately, on DOS this fails, as config.log is still kept open
17404 # by configure, so config.status won't be able to write to it; its
17405 # output is simply discarded.  So we exec the FD to /dev/null,
17406 # effectively closing config.log, so it can be properly (re)opened and
17407 # appended to by config.status.  When coming back to configure, we
17408 # need to make the FD available again.
17409 if test "$no_create" != yes; then
17410   ac_cs_success=:
17411   ac_config_status_args=
17412   test "$silent" = yes &&
17413     ac_config_status_args="$ac_config_status_args --quiet"
17414   exec 5>/dev/null
17415   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17416   exec 5>>config.log
17417   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17418   # would make configure fail if this is the last instruction.
17419   $ac_cs_success || as_fn_exit 1
17420 fi
17421 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17422   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17423 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17424 fi
17425
17426
17427 ###############################################################################
17428 #
17429 #       Print some warnings at the end.
17430 #
17431 ###############################################################################
17432
17433 warn_prefix_1="    Warning:"
17434 warn_prefix_2="       Note:"
17435 warn_prefix="$warn_prefix_1"
17436
17437 warning=no
17438 warnsep='    #################################################################'
17439
17440 warnpre() {
17441   if test "$warning" = no ; then
17442     echo '' ; echo "$warnsep" ; echo ''
17443     warning=yes
17444   fi
17445 }
17446
17447 warn() {
17448   warnpre
17449   if test "$warning" = long ; then echo '' ; fi
17450   warning=yes
17451   rest="$@"
17452   echo "$warn_prefix $rest"
17453 }
17454
17455 warnL() {
17456   was=$warning
17457   warnpre
17458   warning=yes
17459   if test "$was" != no ; then echo '' ; fi
17460   rest="$@"
17461   echo "$warn_prefix $rest"
17462 }
17463
17464 warn2() {
17465   rest="$@"
17466   echo "             $rest"
17467   warning=long
17468 }
17469
17470 note() {
17471   warn_prefix="$warn_prefix_2"
17472   warn $@
17473   warn_prefix="$warn_prefix_1"
17474 }
17475
17476 noteL() {
17477   warn_prefix="$warn_prefix_2"
17478   warnL $@
17479   warn_prefix="$warn_prefix_1"
17480 }
17481
17482
17483 # ac_prog_cc_no_pthread normally only happens on AIX, because according
17484 # to AX_PTHREAD, AIX needs CC=xlc_r or CC=cc_r to do threads.
17485 # If CC is specified, it takes precedence over --with-pthread.
17486 if test "$ac_prog_cc_no_pthread" ; then
17487   warnL "You requested $ac_original_cc for the C compiler, but it doesn't"
17488   warn2 "support POSIX threads."
17489   echo ""
17490   warn2 "If you have multiple CPU cores, try CC=$PTHREAD_CC."
17491 elif test "$with_pthread_req" = yes -a "$have_pthread" = no ; then
17492   warn 'POSIX threads were requested, but were not found.'
17493 fi
17494
17495 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
17496   warn 'The SGI saver extension was requested, but was not found.'
17497 fi
17498
17499 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
17500   warn 'The XIdle extension was requested, but was not found.'
17501 fi
17502
17503 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
17504   warn 'The XSHM extension was requested, but was not found.'
17505 fi
17506
17507 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
17508   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
17509 fi
17510
17511 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
17512   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
17513 fi
17514
17515 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
17516   warn 'The DPMS extension was requested, but was not found.'
17517 fi
17518
17519 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
17520   warn 'The Xinerama extension was requested, but was not found.'
17521 fi
17522
17523 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
17524   warn 'The XF86VMODE extension was requested, but was not found.'
17525 fi
17526
17527 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
17528   warn 'The RANDR extension was requested, but was not found.'
17529 fi
17530
17531 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
17532   warn "Checking of /proc/interrupts was requested, but it's bogus."
17533 fi
17534
17535 if test "$pkg_config" = false ; then
17536   warnL 'The "pkg-config" program was not found.  Without that,'
17537   warn2 "detection of the various GTK libraries won't work."
17538 else
17539   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
17540   if test "x$pkgerr" != "x" ; then
17541     warnL 'The "pkg-config" program produces errors.  This often causes'
17542     warn2 "detection of the various GTK libraries to malfunction."
17543     warn2 "The errors are:"
17544     echo ''
17545     echo "$pkgerr" | sed 's/^/             > /g'
17546   fi
17547 fi
17548
17549 if test "$gtk_halfassed" != no ; then
17550   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
17551   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
17552   warn2 "Perhaps some of the development packages are not installed?"
17553   if test "$have_gtk" = yes ; then
17554     v="$ac_gtk_version_string"
17555     warn2 "GTK $v is also installed, so it will be used instead."
17556     warn2 "Please read the above output and the \`config.log' file"
17557     warn2 "for more details."
17558   fi
17559 fi
17560
17561 motif_warn2() {
17562   warn2 'Though the Motif front-end to xscreensaver is still'
17563   warn2 'maintained, it is no longer being updated with new'
17564   warn2 'features: all new development on the xscreensaver-demo'
17565   warn2 'program is happening in the GTK version, and not in the'
17566   warn2 'Motif version.  It is recommended that you build against'
17567   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
17568 }
17569
17570 if test "$have_motif" = no -a "$have_gtk" = no; then
17571
17572   if test "$with_motif" = yes; then
17573     warnL "Neither the GTK nor Motif libraries were found; the"
17574     warn2 "\`xscreensaver-demo' program requires one of these."
17575     echo ''
17576     motif_warn2
17577   else
17578     warnL "The GTK libraries do not seem to be available; the"
17579     warn2 "\`xscreensaver-demo' program requires them."
17580 #   echo ''
17581 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
17582 #   warn2 "\`--with-motif' option) but that is NOT recommended."
17583 #   motif_warn2
17584   fi
17585
17586 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
17587   warnL "Use of Motif was requested, but it wasn't found;"
17588   warn2 "Gtk will be used instead."
17589
17590 elif test "$jurassic_gtk" = yes ; then
17591
17592   pref_gtk=2.0
17593
17594   v="$ac_gtk_version_string"
17595   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
17596     warnL "Use of Gtk was requested, but its version number is unknown;"
17597   elif test "$with_gtk_req" = yes ; then
17598     warnL "Use of Gtk was requested, but it is version $v;"
17599   else
17600     warnL "Gtk was found on this system, but it is version $v;"
17601   fi
17602
17603   warn2 "Gtk $pref_gtk or newer is required."
17604
17605 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
17606   warnL "Use of Gtk was requested, but it wasn't found."
17607 fi
17608
17609
17610 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
17611   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
17612   warn2 "headers were not found.  That can't be good.  Please"
17613   warn2 "install the GDK-Pixbuf development kit and re-configure."
17614 fi
17615
17616 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
17617
17618   preferred_lesstif=0.92
17619
17620   if test "$lesstif_version" = unknown; then
17621     warnL "Unable to determine the LessTif version number!"
17622     warn2 "Make sure you are using version $preferred_lesstif or newer."
17623     warn2 "See <http://www.lesstif.org/>."
17624
17625   elif test \! $lesstif_version -gt 82; then
17626     warnL "LessTif version $lesstif_version_string is being used."
17627     warn2 "LessTif versions 0.82 and earlier are too buggy to"
17628     warn2 "use with XScreenSaver; it is strongly recommended"
17629     warn2 "that you upgrade to at least version $preferred_lesstif!"
17630     warn2 "See <http://www.lesstif.org/>."
17631   fi
17632 fi
17633
17634
17635 if test "$have_motif" = yes -a "$have_gtk" = no ; then
17636   warn  'Motif is being used, and GTK is not.'
17637   echo  ''
17638   motif_warn2
17639 fi
17640
17641
17642 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
17643   warnL 'Use of XPM was requested, but it was not found.'
17644 fi
17645
17646 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
17647   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
17648 fi
17649
17650 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
17651    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
17652
17653   if test "$with_gdk_pixbuf_req" = yes ; then
17654     true
17655   elif test "$with_gdk_pixbuf_req" = no ; then
17656     warnL 'The GDK-Pixbuf library is not being used.'
17657   else
17658     warnL 'The GDK-Pixbuf library was not found.'
17659   fi
17660
17661   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
17662     true
17663   elif test "$with_xpm_req" = no ; then
17664     warnL 'The XPM library is not being used.'
17665   else
17666     warnL 'The XPM library was not found.'
17667   fi
17668
17669   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
17670     warn2 'The XPM library is being used instead.'
17671   fi
17672
17673   if test "$gdk_pixbuf_halfassed" = yes ; then
17674     echo ''
17675     warn2 'More specifically, we found the headers, but not the'
17676     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
17677     warn2 "system, or something else went wrong.  The \`config.log'"
17678     warn2 'file might contain some clues.'
17679   fi
17680
17681   echo ''
17682   warn2 'Some of the demos will not use images as much as they could.'
17683   warn2 'You should consider installing GDK-Pixbuf and re-running'
17684   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
17685   warn2 'provides support for more image formats.)'
17686 fi
17687
17688
17689 if test "$have_jpeg" = no ; then
17690   if test "$with_jpeg_req" = yes ; then
17691     warnL 'Use of libjpeg was requested, but it was not found.'
17692   elif test "$with_jpeg_req" = no ; then
17693     noteL 'The JPEG library is not being used.'
17694   else
17695     noteL 'The JPEG library was not found.'
17696   fi
17697
17698   if test "$jpeg_halfassed" = yes ; then
17699     echo ''
17700     warn2 'More specifically, we found the headers, but not the'
17701     warn2 'library; so either JPEG is half-installed on this'
17702     warn2 "system, or something else went wrong.  The \`config.log'"
17703     warn2 'file might contain some clues.'
17704     echo ''
17705   fi
17706
17707   if test "$have_gdk_pixbuf" = no ; then
17708     warn2 "This means that it won't be possible for the image-manipulating"
17709     warn2 "display modes to load files from disk; and it also means that"
17710     warn2 "the \`webcollage' program will be much slower."
17711   else
17712     warn2 "This means the \`webcollage' program will be much slower."
17713   fi
17714 fi
17715
17716
17717 if test "$have_xft" = no ; then
17718   if test "$with_xft_req" = yes ; then
17719     warnL "Use of libXft was requested, but it was not found."
17720   elif test "$with_xft_req" = no ; then
17721     noteL 'The Xft library is not being used.'
17722   else
17723     noteL "The Xft library was not found."
17724   fi
17725
17726   if test "$xft_halfassed" = yes ; then
17727     echo ''
17728     warn2 'More specifically, we found the headers, but not the'
17729     warn2 'libraries; so either Xft is half-installed on this'
17730     warn2 "system, or something else went wrong.  The \`config.log'"
17731     warn2 'file might contain some clues.'
17732     echo ''
17733   fi
17734
17735   warn2 "This means that fonts won't be anti-aliased."
17736 fi
17737
17738
17739 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
17740   preferred_mesagl=3.4
17741   mgv="$ac_mesagl_version_string"
17742   pgl="$preferred_mesagl"
17743
17744   if test "$ac_mesagl_version" = unknown; then
17745     true
17746     # warnL "Unable to determine the MesaGL version number!"
17747     # warn2 "Make sure you are using version $preferred_mesagl or newer."
17748
17749   elif test \! "$ac_mesagl_version" -gt 2006; then
17750     warnL "MesaGL version number is $mgv --"
17751     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
17752     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
17753
17754   elif test \! "$ac_mesagl_version" -gt 3003; then
17755     warnL "MesaGL version number is $mgv --"
17756     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
17757     warn2 "that you upgrade to $pgl or newer."
17758   fi
17759 fi
17760
17761 if test "$have_gl" = no ; then
17762   if test "$with_gl_req" = yes ; then
17763     warnL 'Use of GL was requested, but it was not found.'
17764   elif test "$with_gl_req" = no ; then
17765     noteL 'The OpenGL 3D library is not being used.'
17766   else
17767     noteL 'The OpenGL 3D library was not found.'
17768   fi
17769
17770   if test "$gl_halfassed" = yes ; then
17771     echo ''
17772     warn2 'More specifically, we found the headers, but not the'
17773     warn2 'libraries; so either GL is half-installed on this'
17774     warn2 "system, or something else went wrong.  The \`config.log'"
17775     warn2 'file might contain some clues.'
17776   fi
17777
17778   echo ''
17779   warn2 'Those demos which use 3D will not be built or installed.'
17780   warn2 'You might want to consider installing OpenGL and'
17781   warn2 're-running configure.'
17782
17783 fi
17784
17785
17786 if test "$have_gl" = yes -a "$have_gle" = no ; then
17787
17788  # nobody cares about this; don't print the warning unless it was
17789  # requested and not found, or halfway-found.
17790  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
17791
17792   if test "$with_gle_req" = yes ; then
17793     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
17794     warn2 'it was not found (though the OpenGL library was found, and'
17795     warn2 'is being used.)'
17796   elif test "$with_gle_req" = no ; then
17797     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
17798     warn2 'library is not.'
17799   else
17800     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
17801     warn2 'library was not.'
17802   fi
17803
17804   if test "$gle_halfassed" = yes ; then
17805     echo ''
17806     warn2 'More specifically, we found the headers, but not the'
17807     warn2 'libraries; so either GLE is half-installed on this'
17808     warn2 "system, or something else went wrong.  The \`config.log'"
17809     warn2 'file might contain some clues.'
17810   fi
17811
17812   echo ''
17813   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
17814   warn2 'will not be built or installed.  You might want to consider'
17815   warn2 'installing GLE and re-running configure.  You can find the'
17816   warn2 'GLE library at <http://www.linas.org/gle/>'
17817
17818  fi
17819 fi
17820
17821
17822 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
17823   warn 'Use of XReadDisplay was requested, but it was not found.'
17824 fi
17825
17826 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
17827   warn 'Use of Kerberos was requested, but it was not found.'
17828 fi
17829
17830 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
17831   warn 'Use of PAM was requested, but it was not found.'
17832 fi
17833
17834 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
17835   warn 'Use of shadow passwords was requested, but they were not found.'
17836 fi
17837
17838 if test "$ac_macosx" = yes ; then
17839   if test "$enable_locking" = yes ; then
17840     warn  "You have specified --enable-locking on MacOS X."
17841     warn2 "THIS DOES NOT WORK!  Don't do this!"
17842   fi
17843 fi
17844
17845
17846 # You are in a twisty maze of namespaces and syntaxes, all alike.
17847 # Fuck the skull of Unix.
17848 #
17849 bindir=`eval eval eval eval eval eval eval echo $bindir`
17850 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
17851 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
17852
17853 # canonicalize slashes.
17854 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
17855 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
17856 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
17857
17858
17859 # Sanity check the hackdir
17860 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
17861   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
17862     echo ""
17863     as_fn_error $? "\"--with-hackdir=${bindir}/${bad_choice}\" won't work.
17864                    There will be an executable installed with that name, so
17865                    that can't be the name of a directory as well.  Please
17866                    re-configure with a different directory name." "$LINENO" 5
17867   fi
17868 done
17869
17870
17871 do_dir_warning=no
17872
17873 # Now let's warn if there's a previous RPM version already installed.
17874 # But don't bother with this test if we are currently *building* an RPM.
17875
17876 if test -z "$RPM_PACKAGE_VERSION" ; then
17877
17878   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
17879
17880   # M4 sucks!!
17881
17882   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
17883         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
17884         head -1`
17885
17886
17887   if test \! -z "$rpmv" ; then
17888     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
17889     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
17890
17891     warning=no
17892     warnL "There is already an installed RPM of xscreensaver $rpmv"
17893     warn2 'on this system.  You might want to remove it ("rpm -ve")'
17894     warn2 'before running "make install" in this directory.'
17895     echo ""
17896     warn2 "Alternately, you could build this version of xscreensaver"
17897     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
17898     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
17899     warn2 "See the RPM documentation for more info."
17900     echo ""
17901
17902     if test "$rpmbdir" = "$rpmhdir" ; then
17903       warn2 "The RPM version was installed in $rpmbdir/."
17904       do_dir_warning=yes
17905     else
17906       warn2 "The RPM version was installed in $rpmbdir/,"
17907       warn2 "with demos in $rpmhdir/."
17908     fi
17909   fi
17910 fi
17911
17912 # Also warn if there's a Debian package installed.
17913 #
17914 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
17915 debv=''
17916 for dpkg in $debnames ; do
17917   if test -z "$debv"; then
17918     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
17919   fi
17920 done
17921
17922 if test \! -z "$debv" ; then
17923   debbdir=`dpkg -L $debnames 2>/dev/null | \
17924             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
17925   debhdir=`dpkg -L $debnames 2>/dev/null | \
17926             sed -n 's@^\(.*/\)popsquares$@\1@p'`
17927   if test -z "$debbdir" ; then debbdir='???'; fi
17928   if test -z "$debhdir" ; then debhdir='???'; fi
17929
17930   warning=no
17931   warnL "There is already an installed dpkg of xscreensaver"
17932   warn2 "version \"$debv\" on this system."
17933   echo ""
17934   warn2 "The dpkg was installed in $debbdir,"
17935   warn2 "with demos in $debhdir."
17936 fi
17937
17938
17939 if test "${bindir}" = "${HACKDIR}" ; then
17940   do_dir_warning=yes
17941 fi
17942
17943 if test "$do_dir_warning" = yes; then
17944   echo ""
17945   echo "$warnsep"
17946   echo ""
17947   echo '      When you run "make install", the "xscreensaver",'
17948   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
17949   echo "      will be installed in ${bindir}/."
17950   echo ""
17951   echo "      The various graphics demos (200+ different executables) will"
17952   echo "      be installed in ${HACKDIR}/."
17953   echo ""
17954   echo "      If you would prefer the demos to be installed elsewhere,"
17955   echo "      you should re-run configure with the --with-hackdir=DIR"
17956   echo "      option.  For more information, run \`./configure --help'."
17957   warning=yes
17958 fi
17959
17960 if test "$warning" != no; then
17961   echo '' ; echo "$warnsep" ; echo ''
17962 fi
17963
17964 if test "$do_dir_warning" = no; then
17965   if test "$warning" = no; then
17966     echo ''
17967   fi
17968   echo "User programs will be installed in ${bindir}/"
17969   echo "Screen savers will be installed in ${HACKDIR}/"
17970   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
17971   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
17972   echo ''
17973 fi