From http://www.jwz.org/xscreensaver/xscreensaver-5.40.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 HACK_LIBS
688 JPEG_LIBS
689 PNG_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_png
853 with_pixbuf
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-png             Include support for the PNG library.
1548   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1549                           demos, which will make it possible for them to read
1550                           GIF, JPEG, and PNG files as well.
1551   --with-jpeg             Include support for the JPEG library.
1552   --with-xft              Include support for the X Freetype library.
1553   --with-xshm-ext         Include support for the Shared Memory extension.
1554   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1555   --with-readdisplay      Include support for the XReadDisplay extension.
1556   --with-image-directory  Arg is the default directory from which some demos
1557                           will choose random images to display.
1558   --with-text-file=FILE   By default, some demos may display this file.
1559   --with-browser=BROWSER  Specify the web browser used to show the help URL.
1560   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1561                           (which is needed in order to ping other hosts.)
1562
1563   --with-record-animation Include code for generating MP4 videos.
1564
1565
1566 Some influential environment variables:
1567   CC          C compiler command
1568   CFLAGS      C compiler flags
1569   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1570               nonstandard directory <lib dir>
1571   LIBS        libraries to pass to the linker, e.g. -l<library>
1572   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1573               you have headers in a nonstandard directory <include dir>
1574   CPP         C preprocessor
1575   XMKMF       Path to xmkmf, Makefile generator for X Window System
1576
1577 Use these variables to override the choices made by `configure' or to help
1578 it to find libraries and programs with nonstandard names/locations.
1579
1580 Report bugs to the package provider.
1581 _ACEOF
1582 ac_status=$?
1583 fi
1584
1585 if test "$ac_init_help" = "recursive"; then
1586   # If there are subdirs, report their specific --help.
1587   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1588     test -d "$ac_dir" ||
1589       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1590       continue
1591     ac_builddir=.
1592
1593 case "$ac_dir" in
1594 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1595 *)
1596   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1597   # A ".." for each directory in $ac_dir_suffix.
1598   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1599   case $ac_top_builddir_sub in
1600   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1601   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1602   esac ;;
1603 esac
1604 ac_abs_top_builddir=$ac_pwd
1605 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1606 # for backward compatibility:
1607 ac_top_builddir=$ac_top_build_prefix
1608
1609 case $srcdir in
1610   .)  # We are building in place.
1611     ac_srcdir=.
1612     ac_top_srcdir=$ac_top_builddir_sub
1613     ac_abs_top_srcdir=$ac_pwd ;;
1614   [\\/]* | ?:[\\/]* )  # Absolute name.
1615     ac_srcdir=$srcdir$ac_dir_suffix;
1616     ac_top_srcdir=$srcdir
1617     ac_abs_top_srcdir=$srcdir ;;
1618   *) # Relative name.
1619     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1620     ac_top_srcdir=$ac_top_build_prefix$srcdir
1621     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1622 esac
1623 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1624
1625     cd "$ac_dir" || { ac_status=$?; continue; }
1626     # Check for guested configure.
1627     if test -f "$ac_srcdir/configure.gnu"; then
1628       echo &&
1629       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1630     elif test -f "$ac_srcdir/configure"; then
1631       echo &&
1632       $SHELL "$ac_srcdir/configure" --help=recursive
1633     else
1634       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1635     fi || ac_status=$?
1636     cd "$ac_pwd" || { ac_status=$?; break; }
1637   done
1638 fi
1639
1640 test -n "$ac_init_help" && exit $ac_status
1641 if $ac_init_version; then
1642   cat <<\_ACEOF
1643 configure
1644 generated by GNU Autoconf 2.69
1645
1646 Copyright (C) 2012 Free Software Foundation, Inc.
1647 This configure script is free software; the Free Software Foundation
1648 gives unlimited permission to copy, distribute and modify it.
1649 _ACEOF
1650   exit
1651 fi
1652
1653 ## ------------------------ ##
1654 ## Autoconf initialization. ##
1655 ## ------------------------ ##
1656
1657 # ac_fn_c_try_compile LINENO
1658 # --------------------------
1659 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1660 ac_fn_c_try_compile ()
1661 {
1662   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1663   rm -rf conftest.$ac_objext
1664   if { { ac_try="$ac_compile"
1665 case "(($ac_try" in
1666   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1667   *) ac_try_echo=$ac_try;;
1668 esac
1669 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1670 $as_echo "$ac_try_echo"; } >&5
1671   (eval "$ac_compile") 2>conftest.err
1672   ac_status=$?
1673   if test -s conftest.err; then
1674     grep -v '^ *+' conftest.err >conftest.er1
1675     cat conftest.er1 >&5
1676     mv -f conftest.er1 conftest.err
1677   fi
1678   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1679   test $ac_status = 0; } && {
1680          test -z "$ac_c_werror_flag" ||
1681          test ! -s conftest.err
1682        } && test -s conftest.$ac_objext; then :
1683   ac_retval=0
1684 else
1685   $as_echo "$as_me: failed program was:" >&5
1686 sed 's/^/| /' conftest.$ac_ext >&5
1687
1688         ac_retval=1
1689 fi
1690   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1691   as_fn_set_status $ac_retval
1692
1693 } # ac_fn_c_try_compile
1694
1695 # ac_fn_c_try_link LINENO
1696 # -----------------------
1697 # Try to link conftest.$ac_ext, and return whether this succeeded.
1698 ac_fn_c_try_link ()
1699 {
1700   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1701   rm -rf conftest.$ac_objext conftest$ac_exeext
1702   if { { ac_try="$ac_link"
1703 case "(($ac_try" in
1704   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705   *) ac_try_echo=$ac_try;;
1706 esac
1707 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708 $as_echo "$ac_try_echo"; } >&5
1709   (eval "$ac_link") 2>conftest.err
1710   ac_status=$?
1711   if test -s conftest.err; then
1712     grep -v '^ *+' conftest.err >conftest.er1
1713     cat conftest.er1 >&5
1714     mv -f conftest.er1 conftest.err
1715   fi
1716   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1717   test $ac_status = 0; } && {
1718          test -z "$ac_c_werror_flag" ||
1719          test ! -s conftest.err
1720        } && test -s conftest$ac_exeext && {
1721          test "$cross_compiling" = yes ||
1722          test -x conftest$ac_exeext
1723        }; then :
1724   ac_retval=0
1725 else
1726   $as_echo "$as_me: failed program was:" >&5
1727 sed 's/^/| /' conftest.$ac_ext >&5
1728
1729         ac_retval=1
1730 fi
1731   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1732   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1733   # interfere with the next link command; also delete a directory that is
1734   # left behind by Apple's compiler.  We do this before executing the actions.
1735   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1736   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1737   as_fn_set_status $ac_retval
1738
1739 } # ac_fn_c_try_link
1740
1741 # ac_fn_c_try_run LINENO
1742 # ----------------------
1743 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1744 # that executables *can* be run.
1745 ac_fn_c_try_run ()
1746 {
1747   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1748   if { { ac_try="$ac_link"
1749 case "(($ac_try" in
1750   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1751   *) ac_try_echo=$ac_try;;
1752 esac
1753 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1754 $as_echo "$ac_try_echo"; } >&5
1755   (eval "$ac_link") 2>&5
1756   ac_status=$?
1757   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1758   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1759   { { case "(($ac_try" in
1760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1761   *) ac_try_echo=$ac_try;;
1762 esac
1763 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1764 $as_echo "$ac_try_echo"; } >&5
1765   (eval "$ac_try") 2>&5
1766   ac_status=$?
1767   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1768   test $ac_status = 0; }; }; then :
1769   ac_retval=0
1770 else
1771   $as_echo "$as_me: program exited with status $ac_status" >&5
1772        $as_echo "$as_me: failed program was:" >&5
1773 sed 's/^/| /' conftest.$ac_ext >&5
1774
1775        ac_retval=$ac_status
1776 fi
1777   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1778   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1779   as_fn_set_status $ac_retval
1780
1781 } # ac_fn_c_try_run
1782
1783 # ac_fn_c_try_cpp LINENO
1784 # ----------------------
1785 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1786 ac_fn_c_try_cpp ()
1787 {
1788   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1789   if { { ac_try="$ac_cpp conftest.$ac_ext"
1790 case "(($ac_try" in
1791   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1792   *) ac_try_echo=$ac_try;;
1793 esac
1794 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1795 $as_echo "$ac_try_echo"; } >&5
1796   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1797   ac_status=$?
1798   if test -s conftest.err; then
1799     grep -v '^ *+' conftest.err >conftest.er1
1800     cat conftest.er1 >&5
1801     mv -f conftest.er1 conftest.err
1802   fi
1803   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804   test $ac_status = 0; } > conftest.i && {
1805          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1806          test ! -s conftest.err
1807        }; then :
1808   ac_retval=0
1809 else
1810   $as_echo "$as_me: failed program was:" >&5
1811 sed 's/^/| /' conftest.$ac_ext >&5
1812
1813     ac_retval=1
1814 fi
1815   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1816   as_fn_set_status $ac_retval
1817
1818 } # ac_fn_c_try_cpp
1819
1820 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1821 # -------------------------------------------------------
1822 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1823 # the include files in INCLUDES and setting the cache variable VAR
1824 # accordingly.
1825 ac_fn_c_check_header_mongrel ()
1826 {
1827   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828   if eval \${$3+:} false; then :
1829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1830 $as_echo_n "checking for $2... " >&6; }
1831 if eval \${$3+:} false; then :
1832   $as_echo_n "(cached) " >&6
1833 fi
1834 eval ac_res=\$$3
1835                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1836 $as_echo "$ac_res" >&6; }
1837 else
1838   # Is the header compilable?
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1840 $as_echo_n "checking $2 usability... " >&6; }
1841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1842 /* end confdefs.h.  */
1843 $4
1844 #include <$2>
1845 _ACEOF
1846 if ac_fn_c_try_compile "$LINENO"; then :
1847   ac_header_compiler=yes
1848 else
1849   ac_header_compiler=no
1850 fi
1851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1853 $as_echo "$ac_header_compiler" >&6; }
1854
1855 # Is the header present?
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1857 $as_echo_n "checking $2 presence... " >&6; }
1858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1859 /* end confdefs.h.  */
1860 #include <$2>
1861 _ACEOF
1862 if ac_fn_c_try_cpp "$LINENO"; then :
1863   ac_header_preproc=yes
1864 else
1865   ac_header_preproc=no
1866 fi
1867 rm -rf conftest.err conftest.i conftest.$ac_ext
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1869 $as_echo "$ac_header_preproc" >&6; }
1870
1871 # So?  What about this header?
1872 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1873   yes:no: )
1874     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1875 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1876     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1877 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1878     ;;
1879   no:yes:* )
1880     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1881 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1882     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1883 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1884     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1885 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1886     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1887 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1888     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1889 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1890     ;;
1891 esac
1892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1893 $as_echo_n "checking for $2... " >&6; }
1894 if eval \${$3+:} false; then :
1895   $as_echo_n "(cached) " >&6
1896 else
1897   eval "$3=\$ac_header_compiler"
1898 fi
1899 eval ac_res=\$$3
1900                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1901 $as_echo "$ac_res" >&6; }
1902 fi
1903   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1904
1905 } # ac_fn_c_check_header_mongrel
1906
1907 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1908 # -------------------------------------------------------
1909 # Tests whether HEADER exists and can be compiled using the include files in
1910 # INCLUDES, setting the cache variable VAR accordingly.
1911 ac_fn_c_check_header_compile ()
1912 {
1913   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915 $as_echo_n "checking for $2... " >&6; }
1916 if eval \${$3+:} false; then :
1917   $as_echo_n "(cached) " >&6
1918 else
1919   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1920 /* end confdefs.h.  */
1921 $4
1922 #include <$2>
1923 _ACEOF
1924 if ac_fn_c_try_compile "$LINENO"; then :
1925   eval "$3=yes"
1926 else
1927   eval "$3=no"
1928 fi
1929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1930 fi
1931 eval ac_res=\$$3
1932                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1933 $as_echo "$ac_res" >&6; }
1934   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1935
1936 } # ac_fn_c_check_header_compile
1937
1938 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1939 # -------------------------------------------
1940 # Tests whether TYPE exists after having included INCLUDES, setting cache
1941 # variable VAR accordingly.
1942 ac_fn_c_check_type ()
1943 {
1944   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1945   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1946 $as_echo_n "checking for $2... " >&6; }
1947 if eval \${$3+:} false; then :
1948   $as_echo_n "(cached) " >&6
1949 else
1950   eval "$3=no"
1951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952 /* end confdefs.h.  */
1953 $4
1954 int
1955 main ()
1956 {
1957 if (sizeof ($2))
1958          return 0;
1959   ;
1960   return 0;
1961 }
1962 _ACEOF
1963 if ac_fn_c_try_compile "$LINENO"; then :
1964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965 /* end confdefs.h.  */
1966 $4
1967 int
1968 main ()
1969 {
1970 if (sizeof (($2)))
1971             return 0;
1972   ;
1973   return 0;
1974 }
1975 _ACEOF
1976 if ac_fn_c_try_compile "$LINENO"; then :
1977
1978 else
1979   eval "$3=yes"
1980 fi
1981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1982 fi
1983 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1984 fi
1985 eval ac_res=\$$3
1986                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1987 $as_echo "$ac_res" >&6; }
1988   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1989
1990 } # ac_fn_c_check_type
1991
1992 # ac_fn_c_check_func LINENO FUNC VAR
1993 # ----------------------------------
1994 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1995 ac_fn_c_check_func ()
1996 {
1997   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1998   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1999 $as_echo_n "checking for $2... " >&6; }
2000 if eval \${$3+:} false; then :
2001   $as_echo_n "(cached) " >&6
2002 else
2003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004 /* end confdefs.h.  */
2005 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2006    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2007 #define $2 innocuous_$2
2008
2009 /* System header to define __stub macros and hopefully few prototypes,
2010     which can conflict with char $2 (); below.
2011     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2012     <limits.h> exists even on freestanding compilers.  */
2013
2014 #ifdef __STDC__
2015 # include <limits.h>
2016 #else
2017 # include <assert.h>
2018 #endif
2019
2020 #undef $2
2021
2022 /* Override any GCC internal prototype to avoid an error.
2023    Use char because int might match the return type of a GCC
2024    builtin and then its argument prototype would still apply.  */
2025 #ifdef __cplusplus
2026 extern "C"
2027 #endif
2028 char $2 ();
2029 /* The GNU C library defines this for functions which it implements
2030     to always fail with ENOSYS.  Some functions are actually named
2031     something starting with __ and the normal name is an alias.  */
2032 #if defined __stub_$2 || defined __stub___$2
2033 choke me
2034 #endif
2035
2036 int
2037 main ()
2038 {
2039 return $2 ();
2040   ;
2041   return 0;
2042 }
2043 _ACEOF
2044 if ac_fn_c_try_link "$LINENO"; then :
2045   eval "$3=yes"
2046 else
2047   eval "$3=no"
2048 fi
2049 rm -f core conftest.err conftest.$ac_objext \
2050     conftest$ac_exeext conftest.$ac_ext
2051 fi
2052 eval ac_res=\$$3
2053                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2054 $as_echo "$ac_res" >&6; }
2055   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2056
2057 } # ac_fn_c_check_func
2058
2059 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2060 # ----------------------------------------------------
2061 # Tries to find if the field MEMBER exists in type AGGR, after including
2062 # INCLUDES, setting cache variable VAR accordingly.
2063 ac_fn_c_check_member ()
2064 {
2065   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2067 $as_echo_n "checking for $2.$3... " >&6; }
2068 if eval \${$4+:} false; then :
2069   $as_echo_n "(cached) " >&6
2070 else
2071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072 /* end confdefs.h.  */
2073 $5
2074 int
2075 main ()
2076 {
2077 static $2 ac_aggr;
2078 if (ac_aggr.$3)
2079 return 0;
2080   ;
2081   return 0;
2082 }
2083 _ACEOF
2084 if ac_fn_c_try_compile "$LINENO"; then :
2085   eval "$4=yes"
2086 else
2087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088 /* end confdefs.h.  */
2089 $5
2090 int
2091 main ()
2092 {
2093 static $2 ac_aggr;
2094 if (sizeof ac_aggr.$3)
2095 return 0;
2096   ;
2097   return 0;
2098 }
2099 _ACEOF
2100 if ac_fn_c_try_compile "$LINENO"; then :
2101   eval "$4=yes"
2102 else
2103   eval "$4=no"
2104 fi
2105 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106 fi
2107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108 fi
2109 eval ac_res=\$$4
2110                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2111 $as_echo "$ac_res" >&6; }
2112   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2113
2114 } # ac_fn_c_check_member
2115 cat >config.log <<_ACEOF
2116 This file contains any messages produced by compilers while
2117 running configure, to aid debugging if configure makes a mistake.
2118
2119 It was created by $as_me, which was
2120 generated by GNU Autoconf 2.69.  Invocation command line was
2121
2122   $ $0 $@
2123
2124 _ACEOF
2125 exec 5>>config.log
2126 {
2127 cat <<_ASUNAME
2128 ## --------- ##
2129 ## Platform. ##
2130 ## --------- ##
2131
2132 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2133 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2134 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2135 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2136 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2137
2138 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2139 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2140
2141 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2142 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2143 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2144 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2145 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2146 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2147 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2148
2149 _ASUNAME
2150
2151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2152 for as_dir in $PATH
2153 do
2154   IFS=$as_save_IFS
2155   test -z "$as_dir" && as_dir=.
2156     $as_echo "PATH: $as_dir"
2157   done
2158 IFS=$as_save_IFS
2159
2160 } >&5
2161
2162 cat >&5 <<_ACEOF
2163
2164
2165 ## ----------- ##
2166 ## Core tests. ##
2167 ## ----------- ##
2168
2169 _ACEOF
2170
2171
2172 # Keep a trace of the command line.
2173 # Strip out --no-create and --no-recursion so they do not pile up.
2174 # Strip out --silent because we don't want to record it for future runs.
2175 # Also quote any args containing shell meta-characters.
2176 # Make two passes to allow for proper duplicate-argument suppression.
2177 ac_configure_args=
2178 ac_configure_args0=
2179 ac_configure_args1=
2180 ac_must_keep_next=false
2181 for ac_pass in 1 2
2182 do
2183   for ac_arg
2184   do
2185     case $ac_arg in
2186     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2187     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2188     | -silent | --silent | --silen | --sile | --sil)
2189       continue ;;
2190     *\'*)
2191       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2192     esac
2193     case $ac_pass in
2194     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2195     2)
2196       as_fn_append ac_configure_args1 " '$ac_arg'"
2197       if test $ac_must_keep_next = true; then
2198         ac_must_keep_next=false # Got value, back to normal.
2199       else
2200         case $ac_arg in
2201           *=* | --config-cache | -C | -disable-* | --disable-* \
2202           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2203           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2204           | -with-* | --with-* | -without-* | --without-* | --x)
2205             case "$ac_configure_args0 " in
2206               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2207             esac
2208             ;;
2209           -* ) ac_must_keep_next=true ;;
2210         esac
2211       fi
2212       as_fn_append ac_configure_args " '$ac_arg'"
2213       ;;
2214     esac
2215   done
2216 done
2217 { ac_configure_args0=; unset ac_configure_args0;}
2218 { ac_configure_args1=; unset ac_configure_args1;}
2219
2220 # When interrupted or exit'd, cleanup temporary files, and complete
2221 # config.log.  We remove comments because anyway the quotes in there
2222 # would cause problems or look ugly.
2223 # WARNING: Use '\'' to represent an apostrophe within the trap.
2224 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2225 trap 'exit_status=$?
2226   # Save into config.log some information that might help in debugging.
2227   {
2228     echo
2229
2230     $as_echo "## ---------------- ##
2231 ## Cache variables. ##
2232 ## ---------------- ##"
2233     echo
2234     # The following way of writing the cache mishandles newlines in values,
2235 (
2236   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2237     eval ac_val=\$$ac_var
2238     case $ac_val in #(
2239     *${as_nl}*)
2240       case $ac_var in #(
2241       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2242 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2243       esac
2244       case $ac_var in #(
2245       _ | IFS | as_nl) ;; #(
2246       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2247       *) { eval $ac_var=; unset $ac_var;} ;;
2248       esac ;;
2249     esac
2250   done
2251   (set) 2>&1 |
2252     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2253     *${as_nl}ac_space=\ *)
2254       sed -n \
2255         "s/'\''/'\''\\\\'\'''\''/g;
2256           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2257       ;; #(
2258     *)
2259       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2260       ;;
2261     esac |
2262     sort
2263 )
2264     echo
2265
2266     $as_echo "## ----------------- ##
2267 ## Output variables. ##
2268 ## ----------------- ##"
2269     echo
2270     for ac_var in $ac_subst_vars
2271     do
2272       eval ac_val=\$$ac_var
2273       case $ac_val in
2274       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2275       esac
2276       $as_echo "$ac_var='\''$ac_val'\''"
2277     done | sort
2278     echo
2279
2280     if test -n "$ac_subst_files"; then
2281       $as_echo "## ------------------- ##
2282 ## File substitutions. ##
2283 ## ------------------- ##"
2284       echo
2285       for ac_var in $ac_subst_files
2286       do
2287         eval ac_val=\$$ac_var
2288         case $ac_val in
2289         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2290         esac
2291         $as_echo "$ac_var='\''$ac_val'\''"
2292       done | sort
2293       echo
2294     fi
2295
2296     if test -s confdefs.h; then
2297       $as_echo "## ----------- ##
2298 ## confdefs.h. ##
2299 ## ----------- ##"
2300       echo
2301       cat confdefs.h
2302       echo
2303     fi
2304     test "$ac_signal" != 0 &&
2305       $as_echo "$as_me: caught signal $ac_signal"
2306     $as_echo "$as_me: exit $exit_status"
2307   } >&5
2308   rm -f core *.core core.conftest.* &&
2309     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2310     exit $exit_status
2311 ' 0
2312 for ac_signal in 1 2 13 15; do
2313   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2314 done
2315 ac_signal=0
2316
2317 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2318 rm -f -r conftest* confdefs.h
2319
2320 $as_echo "/* confdefs.h */" > confdefs.h
2321
2322 # Predefined preprocessor variables.
2323
2324 cat >>confdefs.h <<_ACEOF
2325 #define PACKAGE_NAME "$PACKAGE_NAME"
2326 _ACEOF
2327
2328 cat >>confdefs.h <<_ACEOF
2329 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2330 _ACEOF
2331
2332 cat >>confdefs.h <<_ACEOF
2333 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2334 _ACEOF
2335
2336 cat >>confdefs.h <<_ACEOF
2337 #define PACKAGE_STRING "$PACKAGE_STRING"
2338 _ACEOF
2339
2340 cat >>confdefs.h <<_ACEOF
2341 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2342 _ACEOF
2343
2344 cat >>confdefs.h <<_ACEOF
2345 #define PACKAGE_URL "$PACKAGE_URL"
2346 _ACEOF
2347
2348
2349 # Let the site file select an alternate cache file if it wants to.
2350 # Prefer an explicitly selected file to automatically selected ones.
2351 ac_site_file1=NONE
2352 ac_site_file2=NONE
2353 if test -n "$CONFIG_SITE"; then
2354   # We do not want a PATH search for config.site.
2355   case $CONFIG_SITE in #((
2356     -*)  ac_site_file1=./$CONFIG_SITE;;
2357     */*) ac_site_file1=$CONFIG_SITE;;
2358     *)   ac_site_file1=./$CONFIG_SITE;;
2359   esac
2360 elif test "x$prefix" != xNONE; then
2361   ac_site_file1=$prefix/share/config.site
2362   ac_site_file2=$prefix/etc/config.site
2363 else
2364   ac_site_file1=$ac_default_prefix/share/config.site
2365   ac_site_file2=$ac_default_prefix/etc/config.site
2366 fi
2367 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2368 do
2369   test "x$ac_site_file" = xNONE && continue
2370   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2371     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2372 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2373     sed 's/^/| /' "$ac_site_file" >&5
2374     . "$ac_site_file" \
2375       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2376 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2377 as_fn_error $? "failed to load site script $ac_site_file
2378 See \`config.log' for more details" "$LINENO" 5; }
2379   fi
2380 done
2381
2382 if test -r "$cache_file"; then
2383   # Some versions of bash will fail to source /dev/null (special files
2384   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2385   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2386     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2387 $as_echo "$as_me: loading cache $cache_file" >&6;}
2388     case $cache_file in
2389       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2390       *)                      . "./$cache_file";;
2391     esac
2392   fi
2393 else
2394   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2395 $as_echo "$as_me: creating cache $cache_file" >&6;}
2396   >$cache_file
2397 fi
2398
2399 # Check that the precious variables saved in the cache have kept the same
2400 # value.
2401 ac_cache_corrupted=false
2402 for ac_var in $ac_precious_vars; do
2403   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2404   eval ac_new_set=\$ac_env_${ac_var}_set
2405   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2406   eval ac_new_val=\$ac_env_${ac_var}_value
2407   case $ac_old_set,$ac_new_set in
2408     set,)
2409       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2410 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2411       ac_cache_corrupted=: ;;
2412     ,set)
2413       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2414 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2415       ac_cache_corrupted=: ;;
2416     ,);;
2417     *)
2418       if test "x$ac_old_val" != "x$ac_new_val"; then
2419         # differences in whitespace do not lead to failure.
2420         ac_old_val_w=`echo x $ac_old_val`
2421         ac_new_val_w=`echo x $ac_new_val`
2422         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2423           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2424 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2425           ac_cache_corrupted=:
2426         else
2427           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2428 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2429           eval $ac_var=\$ac_old_val
2430         fi
2431         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2432 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2433         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2434 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2435       fi;;
2436   esac
2437   # Pass precious variables to config.status.
2438   if test "$ac_new_set" = set; then
2439     case $ac_new_val in
2440     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2441     *) ac_arg=$ac_var=$ac_new_val ;;
2442     esac
2443     case " $ac_configure_args " in
2444       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2445       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2446     esac
2447   fi
2448 done
2449 if $ac_cache_corrupted; then
2450   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2451 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2452   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2453 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2454   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2455 fi
2456 ## -------------------- ##
2457 ## Main body of script. ##
2458 ## -------------------- ##
2459
2460 ac_ext=c
2461 ac_cpp='$CPP $CPPFLAGS'
2462 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2463 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2465
2466
2467 ac_config_headers="$ac_config_headers config.h"
2468
2469
2470 echo "current directory: `pwd`"
2471 echo "command line was: $0 $@"
2472
2473 ###############################################################################
2474 #
2475 #       Autoheader stuff
2476 #
2477 ###############################################################################
2478
2479
2480
2481
2482
2483
2484
2485 # This only ever existed in X11R4 and X11R5.
2486 #AH_TEMPLATE([HAVE_XIDLE_EXTENSION],
2487 #           [Define this if you have the XIDLE extension installed. If you
2488 #           have the XIDLE extension, this is recommended.  (You have this
2489 #           extension if the file /usr/include/X11/extensions/xidle.h
2490 #           exists.) Turning on this flag lets XScreenSaver work better with
2491 #           servers which support this extension; but it will still work
2492 #           with servers which do not suport it, so it's a good idea to
2493 #           compile in support for it if you can.])
2494
2495 # Using this extension will crash your X server and make fading not work.
2496 #AH_TEMPLATE([HAVE_MIT_SAVER_EXTENSION],
2497 #           [Define this if you have the MIT-SCREEN-SAVER extension
2498 #            installed.  See the caveats about this extension, above.
2499 #            (It's available if /usr/include/X11/extensions/scrnsaver.h
2500 #            exists.)])
2501
2502 # This only ever existed on SGI hardware.
2503 #AH_TEMPLATE([HAVE_SGI_SAVER_EXTENSION],
2504 #           [Define this if you have the SGI SCREEN_SAVER extension.  This is
2505 #           standard on Irix systems, and not available elsewhere.])
2506
2507 # This only ever existed on SGI hardware.
2508 #AH_TEMPLATE([HAVE_SGI_VC_EXTENSION],
2509 #           [Define this if you have the SGI-VIDEO-CONTROL extension.  This
2510 #           is standard on Irix systems, and not available elsewhere.])
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
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 # After checking to see that --srcdir is correct (which AC_INIT does)
2630 # check for some random other files that come later in the tar file,
2631 # to make sure everything is here.
2632 #
2633 for d in utils jwxyz hacks hacks/glx driver ; do
2634   f=$srcdir/$d/Makefile.in
2635   if test \! -r $f ; then
2636     echo ""
2637     echo "ERROR: The package is incomplete: $f does not exist."
2638     echo "       This probably means that your download was truncated."
2639     echo ""
2640     exit 1
2641   fi
2642 done
2643
2644 ###############################################################################
2645 #
2646 #       Query AX_PTHREAD, and figure out which compiler gets used.
2647 #
2648 ###############################################################################
2649
2650
2651
2652
2653 ###############################################################################
2654 #
2655 #       Function to figure out how to run the compiler.
2656 #
2657 ###############################################################################
2658
2659
2660
2661
2662 ###############################################################################
2663 #
2664 #       Check for availability of various gcc command-line options.
2665 #
2666 ###############################################################################
2667
2668
2669
2670
2671
2672
2673
2674 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2675 # around an Apple-specific gcc bug.
2676 #
2677
2678
2679 ###############################################################################
2680 #
2681 #       Function to figure out how to disable // comments in ANSI C code.
2682 #
2683 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2684 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2685 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2686 #       so much for compatibility!)
2687 #
2688 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2689 #       declarations preceed statements, without resorting to "-pedantic".
2690 #       This means that there is no way to get gcc3 to issue warnings that
2691 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2692 #       also drowning in totally useless warnings.  Thank you master may I
2693 #       have another.
2694 #
2695 #       So, I give up, let's just use -pedantic.
2696 #
2697 ###############################################################################
2698
2699
2700
2701
2702
2703
2704 ###############################################################################
2705 #
2706 #       Function to figure out how to create directory trees.
2707 #
2708 ###############################################################################
2709
2710
2711
2712
2713 ###############################################################################
2714 #
2715 #       Function to check whether gettimeofday() exists, and how to call it.
2716 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2717 #
2718 ###############################################################################
2719
2720
2721
2722
2723 ###############################################################################
2724 #
2725 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2726 #
2727 ###############################################################################
2728
2729 # M4 sucks!!  perl sucks too!!
2730
2731 perl_version_cmd='print $]'
2732
2733
2734
2735
2736
2737 ###############################################################################
2738 #
2739 #       Function to demand "bc".  Losers.
2740 #
2741 ###############################################################################
2742
2743
2744
2745 ###############################################################################
2746 #
2747 #       Functions to check how to do ICMP PING requests.
2748 #
2749 ###############################################################################
2750
2751
2752
2753
2754
2755
2756 ###############################################################################
2757 #
2758 #       Functions to check for various X11 crap.
2759 #
2760 ###############################################################################
2761
2762 # Try and find the app-defaults directory.
2763 # It sucks that autoconf doesn't do this already...
2764 #
2765
2766
2767 ###############################################################################
2768 #
2769 #       Handle the --with-x-app-defaults option HERE
2770 #
2771 ###############################################################################
2772
2773
2774 # Check whether --with-x-app-defaults was given.
2775 if test "${with_x_app_defaults+set}" = set; then :
2776   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2777 else
2778   eval ac_x_app_defaults="$withval"
2779 fi
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791 # Random special-cases for X on certain pathological OSes.
2792 # You know who you are.
2793 #
2794
2795
2796
2797
2798
2799
2800 ###############################################################################
2801 #
2802 #       Some utility functions to make checking for X things easier.
2803 #
2804 ###############################################################################
2805
2806 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2807 #
2808
2809
2810 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2811 #
2812
2813
2814 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2815 #
2816
2817
2818
2819 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2820 # Use this sparingly; it probably doesn't work very well on X programs.
2821 #
2822
2823
2824 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2825 # (But not the -L directories!)
2826 #
2827
2828
2829
2830
2831 # Usage: HANDLE_X_PATH_ARG([variable_name],
2832 #                          [--command-line-option],
2833 #                          [descriptive string])
2834 #
2835 # All of the --with options take three forms:
2836 #
2837 #   --with-foo (or --with-foo=yes)
2838 #   --without-foo (or --with-foo=no)
2839 #   --with-foo=/DIR
2840 #
2841 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2842 # a directory (string beginning with a slash) it checks to see whether
2843 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2844 # as appropriate.
2845 #
2846
2847
2848
2849
2850 ###############################################################################
2851 ###############################################################################
2852 #
2853 #       End of function definitions.  Now start actually executing stuff.
2854 #
2855 ###############################################################################
2856 ###############################################################################
2857
2858 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2859 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2860 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2861
2862
2863 # random compiler setup
2864 ac_aux_dir=
2865 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2866   if test -f "$ac_dir/install-sh"; then
2867     ac_aux_dir=$ac_dir
2868     ac_install_sh="$ac_aux_dir/install-sh -c"
2869     break
2870   elif test -f "$ac_dir/install.sh"; then
2871     ac_aux_dir=$ac_dir
2872     ac_install_sh="$ac_aux_dir/install.sh -c"
2873     break
2874   elif test -f "$ac_dir/shtool"; then
2875     ac_aux_dir=$ac_dir
2876     ac_install_sh="$ac_aux_dir/shtool install -c"
2877     break
2878   fi
2879 done
2880 if test -z "$ac_aux_dir"; then
2881   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2882 fi
2883
2884 # These three variables are undocumented and unsupported,
2885 # and are intended to be withdrawn in a future Autoconf release.
2886 # They can cause serious problems if a builder's source tree is in a directory
2887 # whose full name contains unusual characters.
2888 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2889 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2890 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2891
2892
2893 # Make sure we can run config.sub.
2894 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2895   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2896
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2898 $as_echo_n "checking build system type... " >&6; }
2899 if ${ac_cv_build+:} false; then :
2900   $as_echo_n "(cached) " >&6
2901 else
2902   ac_build_alias=$build_alias
2903 test "x$ac_build_alias" = x &&
2904   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2905 test "x$ac_build_alias" = x &&
2906   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2907 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2908   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2909
2910 fi
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2912 $as_echo "$ac_cv_build" >&6; }
2913 case $ac_cv_build in
2914 *-*-*) ;;
2915 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2916 esac
2917 build=$ac_cv_build
2918 ac_save_IFS=$IFS; IFS='-'
2919 set x $ac_cv_build
2920 shift
2921 build_cpu=$1
2922 build_vendor=$2
2923 shift; shift
2924 # Remember, the first character of IFS is used to create $*,
2925 # except with old shells:
2926 build_os=$*
2927 IFS=$ac_save_IFS
2928 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2929
2930
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2932 $as_echo_n "checking host system type... " >&6; }
2933 if ${ac_cv_host+:} false; then :
2934   $as_echo_n "(cached) " >&6
2935 else
2936   if test "x$host_alias" = x; then
2937   ac_cv_host=$ac_cv_build
2938 else
2939   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2940     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2941 fi
2942
2943 fi
2944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2945 $as_echo "$ac_cv_host" >&6; }
2946 case $ac_cv_host in
2947 *-*-*) ;;
2948 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2949 esac
2950 host=$ac_cv_host
2951 ac_save_IFS=$IFS; IFS='-'
2952 set x $ac_cv_host
2953 shift
2954 host_cpu=$1
2955 host_vendor=$2
2956 shift; shift
2957 # Remember, the first character of IFS is used to create $*,
2958 # except with old shells:
2959 host_os=$*
2960 IFS=$ac_save_IFS
2961 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2962
2963
2964
2965 ac_original_cc=$CC
2966 ac_ext=c
2967 ac_cpp='$CPP $CPPFLAGS'
2968 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2969 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2970 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2971 if test -n "$ac_tool_prefix"; then
2972   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2973 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2975 $as_echo_n "checking for $ac_word... " >&6; }
2976 if ${ac_cv_prog_CC+:} false; then :
2977   $as_echo_n "(cached) " >&6
2978 else
2979   if test -n "$CC"; then
2980   ac_cv_prog_CC="$CC" # Let the user override the test.
2981 else
2982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2983 for as_dir in $PATH
2984 do
2985   IFS=$as_save_IFS
2986   test -z "$as_dir" && as_dir=.
2987     for ac_exec_ext in '' $ac_executable_extensions; do
2988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2989     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2991     break 2
2992   fi
2993 done
2994   done
2995 IFS=$as_save_IFS
2996
2997 fi
2998 fi
2999 CC=$ac_cv_prog_CC
3000 if test -n "$CC"; then
3001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3002 $as_echo "$CC" >&6; }
3003 else
3004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3005 $as_echo "no" >&6; }
3006 fi
3007
3008
3009 fi
3010 if test -z "$ac_cv_prog_CC"; then
3011   ac_ct_CC=$CC
3012   # Extract the first word of "gcc", so it can be a program name with args.
3013 set dummy gcc; ac_word=$2
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3015 $as_echo_n "checking for $ac_word... " >&6; }
3016 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3017   $as_echo_n "(cached) " >&6
3018 else
3019   if test -n "$ac_ct_CC"; then
3020   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3021 else
3022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3023 for as_dir in $PATH
3024 do
3025   IFS=$as_save_IFS
3026   test -z "$as_dir" && as_dir=.
3027     for ac_exec_ext in '' $ac_executable_extensions; do
3028   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3029     ac_cv_prog_ac_ct_CC="gcc"
3030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3031     break 2
3032   fi
3033 done
3034   done
3035 IFS=$as_save_IFS
3036
3037 fi
3038 fi
3039 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3040 if test -n "$ac_ct_CC"; then
3041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3042 $as_echo "$ac_ct_CC" >&6; }
3043 else
3044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3045 $as_echo "no" >&6; }
3046 fi
3047
3048   if test "x$ac_ct_CC" = x; then
3049     CC=""
3050   else
3051     case $cross_compiling:$ac_tool_warned in
3052 yes:)
3053 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3054 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3055 ac_tool_warned=yes ;;
3056 esac
3057     CC=$ac_ct_CC
3058   fi
3059 else
3060   CC="$ac_cv_prog_CC"
3061 fi
3062
3063 if test -z "$CC"; then
3064           if test -n "$ac_tool_prefix"; then
3065     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3066 set dummy ${ac_tool_prefix}cc; ac_word=$2
3067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3068 $as_echo_n "checking for $ac_word... " >&6; }
3069 if ${ac_cv_prog_CC+:} false; then :
3070   $as_echo_n "(cached) " >&6
3071 else
3072   if test -n "$CC"; then
3073   ac_cv_prog_CC="$CC" # Let the user override the test.
3074 else
3075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3076 for as_dir in $PATH
3077 do
3078   IFS=$as_save_IFS
3079   test -z "$as_dir" && as_dir=.
3080     for ac_exec_ext in '' $ac_executable_extensions; do
3081   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3082     ac_cv_prog_CC="${ac_tool_prefix}cc"
3083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3084     break 2
3085   fi
3086 done
3087   done
3088 IFS=$as_save_IFS
3089
3090 fi
3091 fi
3092 CC=$ac_cv_prog_CC
3093 if test -n "$CC"; then
3094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3095 $as_echo "$CC" >&6; }
3096 else
3097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3098 $as_echo "no" >&6; }
3099 fi
3100
3101
3102   fi
3103 fi
3104 if test -z "$CC"; then
3105   # Extract the first word of "cc", so it can be a program name with args.
3106 set dummy cc; ac_word=$2
3107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3108 $as_echo_n "checking for $ac_word... " >&6; }
3109 if ${ac_cv_prog_CC+:} false; then :
3110   $as_echo_n "(cached) " >&6
3111 else
3112   if test -n "$CC"; then
3113   ac_cv_prog_CC="$CC" # Let the user override the test.
3114 else
3115   ac_prog_rejected=no
3116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3117 for as_dir in $PATH
3118 do
3119   IFS=$as_save_IFS
3120   test -z "$as_dir" && as_dir=.
3121     for ac_exec_ext in '' $ac_executable_extensions; do
3122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3123     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3124        ac_prog_rejected=yes
3125        continue
3126      fi
3127     ac_cv_prog_CC="cc"
3128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3129     break 2
3130   fi
3131 done
3132   done
3133 IFS=$as_save_IFS
3134
3135 if test $ac_prog_rejected = yes; then
3136   # We found a bogon in the path, so make sure we never use it.
3137   set dummy $ac_cv_prog_CC
3138   shift
3139   if test $# != 0; then
3140     # We chose a different compiler from the bogus one.
3141     # However, it has the same basename, so the bogon will be chosen
3142     # first if we set CC to just the basename; use the full file name.
3143     shift
3144     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3145   fi
3146 fi
3147 fi
3148 fi
3149 CC=$ac_cv_prog_CC
3150 if test -n "$CC"; then
3151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3152 $as_echo "$CC" >&6; }
3153 else
3154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3155 $as_echo "no" >&6; }
3156 fi
3157
3158
3159 fi
3160 if test -z "$CC"; then
3161   if test -n "$ac_tool_prefix"; then
3162   for ac_prog in cl.exe
3163   do
3164     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3165 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3167 $as_echo_n "checking for $ac_word... " >&6; }
3168 if ${ac_cv_prog_CC+:} false; then :
3169   $as_echo_n "(cached) " >&6
3170 else
3171   if test -n "$CC"; then
3172   ac_cv_prog_CC="$CC" # Let the user override the test.
3173 else
3174 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3175 for as_dir in $PATH
3176 do
3177   IFS=$as_save_IFS
3178   test -z "$as_dir" && as_dir=.
3179     for ac_exec_ext in '' $ac_executable_extensions; do
3180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3181     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3183     break 2
3184   fi
3185 done
3186   done
3187 IFS=$as_save_IFS
3188
3189 fi
3190 fi
3191 CC=$ac_cv_prog_CC
3192 if test -n "$CC"; then
3193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3194 $as_echo "$CC" >&6; }
3195 else
3196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3197 $as_echo "no" >&6; }
3198 fi
3199
3200
3201     test -n "$CC" && break
3202   done
3203 fi
3204 if test -z "$CC"; then
3205   ac_ct_CC=$CC
3206   for ac_prog in cl.exe
3207 do
3208   # Extract the first word of "$ac_prog", so it can be a program name with args.
3209 set dummy $ac_prog; ac_word=$2
3210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3211 $as_echo_n "checking for $ac_word... " >&6; }
3212 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3213   $as_echo_n "(cached) " >&6
3214 else
3215   if test -n "$ac_ct_CC"; then
3216   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3217 else
3218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3219 for as_dir in $PATH
3220 do
3221   IFS=$as_save_IFS
3222   test -z "$as_dir" && as_dir=.
3223     for ac_exec_ext in '' $ac_executable_extensions; do
3224   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3225     ac_cv_prog_ac_ct_CC="$ac_prog"
3226     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3227     break 2
3228   fi
3229 done
3230   done
3231 IFS=$as_save_IFS
3232
3233 fi
3234 fi
3235 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3236 if test -n "$ac_ct_CC"; then
3237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3238 $as_echo "$ac_ct_CC" >&6; }
3239 else
3240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3241 $as_echo "no" >&6; }
3242 fi
3243
3244
3245   test -n "$ac_ct_CC" && break
3246 done
3247
3248   if test "x$ac_ct_CC" = x; then
3249     CC=""
3250   else
3251     case $cross_compiling:$ac_tool_warned in
3252 yes:)
3253 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3254 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3255 ac_tool_warned=yes ;;
3256 esac
3257     CC=$ac_ct_CC
3258   fi
3259 fi
3260
3261 fi
3262
3263
3264 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3265 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3266 as_fn_error $? "no acceptable C compiler found in \$PATH
3267 See \`config.log' for more details" "$LINENO" 5; }
3268
3269 # Provide some information about the compiler.
3270 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3271 set X $ac_compile
3272 ac_compiler=$2
3273 for ac_option in --version -v -V -qversion; do
3274   { { ac_try="$ac_compiler $ac_option >&5"
3275 case "(($ac_try" in
3276   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3277   *) ac_try_echo=$ac_try;;
3278 esac
3279 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3280 $as_echo "$ac_try_echo"; } >&5
3281   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3282   ac_status=$?
3283   if test -s conftest.err; then
3284     sed '10a\
3285 ... rest of stderr output deleted ...
3286          10q' conftest.err >conftest.er1
3287     cat conftest.er1 >&5
3288   fi
3289   rm -rf conftest.er1 conftest.err
3290   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3291   test $ac_status = 0; }
3292 done
3293
3294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3295 /* end confdefs.h.  */
3296
3297 int
3298 main ()
3299 {
3300
3301   ;
3302   return 0;
3303 }
3304 _ACEOF
3305 ac_clean_files_save=$ac_clean_files
3306 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3307 # Try to create an executable without -o first, disregard a.out.
3308 # It will help us diagnose broken compilers, and finding out an intuition
3309 # of exeext.
3310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3311 $as_echo_n "checking whether the C compiler works... " >&6; }
3312 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3313
3314 # The possible output files:
3315 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3316
3317 ac_rmfiles=
3318 for ac_file in $ac_files
3319 do
3320   case $ac_file in
3321     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3322     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3323   esac
3324 done
3325 rm -f $ac_rmfiles
3326
3327 if { { ac_try="$ac_link_default"
3328 case "(($ac_try" in
3329   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3330   *) ac_try_echo=$ac_try;;
3331 esac
3332 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3333 $as_echo "$ac_try_echo"; } >&5
3334   (eval "$ac_link_default") 2>&5
3335   ac_status=$?
3336   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3337   test $ac_status = 0; }; then :
3338   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3339 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3340 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3341 # so that the user can short-circuit this test for compilers unknown to
3342 # Autoconf.
3343 for ac_file in $ac_files ''
3344 do
3345   test -f "$ac_file" || continue
3346   case $ac_file in
3347     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3348         ;;
3349     [ab].out )
3350         # We found the default executable, but exeext='' is most
3351         # certainly right.
3352         break;;
3353     *.* )
3354         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3355         then :; else
3356            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3357         fi
3358         # We set ac_cv_exeext here because the later test for it is not
3359         # safe: cross compilers may not add the suffix if given an `-o'
3360         # argument, so we may need to know it at that point already.
3361         # Even if this section looks crufty: it has the advantage of
3362         # actually working.
3363         break;;
3364     * )
3365         break;;
3366   esac
3367 done
3368 test "$ac_cv_exeext" = no && ac_cv_exeext=
3369
3370 else
3371   ac_file=''
3372 fi
3373 if test -z "$ac_file"; then :
3374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3375 $as_echo "no" >&6; }
3376 $as_echo "$as_me: failed program was:" >&5
3377 sed 's/^/| /' conftest.$ac_ext >&5
3378
3379 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3380 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3381 as_fn_error 77 "C compiler cannot create executables
3382 See \`config.log' for more details" "$LINENO" 5; }
3383 else
3384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3385 $as_echo "yes" >&6; }
3386 fi
3387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3388 $as_echo_n "checking for C compiler default output file name... " >&6; }
3389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3390 $as_echo "$ac_file" >&6; }
3391 ac_exeext=$ac_cv_exeext
3392
3393 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3394 ac_clean_files=$ac_clean_files_save
3395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3396 $as_echo_n "checking for suffix of executables... " >&6; }
3397 if { { ac_try="$ac_link"
3398 case "(($ac_try" in
3399   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3400   *) ac_try_echo=$ac_try;;
3401 esac
3402 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3403 $as_echo "$ac_try_echo"; } >&5
3404   (eval "$ac_link") 2>&5
3405   ac_status=$?
3406   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3407   test $ac_status = 0; }; then :
3408   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3409 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3410 # work properly (i.e., refer to `conftest.exe'), while it won't with
3411 # `rm'.
3412 for ac_file in conftest.exe conftest conftest.*; do
3413   test -f "$ac_file" || continue
3414   case $ac_file in
3415     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3416     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3417           break;;
3418     * ) break;;
3419   esac
3420 done
3421 else
3422   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3423 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3424 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3425 See \`config.log' for more details" "$LINENO" 5; }
3426 fi
3427 rm -rf conftest conftest$ac_cv_exeext
3428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3429 $as_echo "$ac_cv_exeext" >&6; }
3430
3431 rm -rf conftest.$ac_ext
3432 EXEEXT=$ac_cv_exeext
3433 ac_exeext=$EXEEXT
3434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3435 /* end confdefs.h.  */
3436 #include <stdio.h>
3437 int
3438 main ()
3439 {
3440 FILE *f = fopen ("conftest.out", "w");
3441  return ferror (f) || fclose (f) != 0;
3442
3443   ;
3444   return 0;
3445 }
3446 _ACEOF
3447 ac_clean_files="$ac_clean_files conftest.out"
3448 # Check that the compiler produces executables we can run.  If not, either
3449 # the compiler is broken, or we cross compile.
3450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3451 $as_echo_n "checking whether we are cross compiling... " >&6; }
3452 if test "$cross_compiling" != yes; then
3453   { { ac_try="$ac_link"
3454 case "(($ac_try" in
3455   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3456   *) ac_try_echo=$ac_try;;
3457 esac
3458 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3459 $as_echo "$ac_try_echo"; } >&5
3460   (eval "$ac_link") 2>&5
3461   ac_status=$?
3462   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3463   test $ac_status = 0; }
3464   if { ac_try='./conftest$ac_cv_exeext'
3465   { { case "(($ac_try" in
3466   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3467   *) ac_try_echo=$ac_try;;
3468 esac
3469 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3470 $as_echo "$ac_try_echo"; } >&5
3471   (eval "$ac_try") 2>&5
3472   ac_status=$?
3473   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3474   test $ac_status = 0; }; }; then
3475     cross_compiling=no
3476   else
3477     if test "$cross_compiling" = maybe; then
3478         cross_compiling=yes
3479     else
3480         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3481 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3482 as_fn_error $? "cannot run C compiled programs.
3483 If you meant to cross compile, use \`--host'.
3484 See \`config.log' for more details" "$LINENO" 5; }
3485     fi
3486   fi
3487 fi
3488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3489 $as_echo "$cross_compiling" >&6; }
3490
3491 rm -rf conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3492 ac_clean_files=$ac_clean_files_save
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3494 $as_echo_n "checking for suffix of object files... " >&6; }
3495 if ${ac_cv_objext+:} false; then :
3496   $as_echo_n "(cached) " >&6
3497 else
3498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3499 /* end confdefs.h.  */
3500
3501 int
3502 main ()
3503 {
3504
3505   ;
3506   return 0;
3507 }
3508 _ACEOF
3509 rm -rf conftest.o conftest.obj
3510 if { { ac_try="$ac_compile"
3511 case "(($ac_try" in
3512   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3513   *) ac_try_echo=$ac_try;;
3514 esac
3515 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3516 $as_echo "$ac_try_echo"; } >&5
3517   (eval "$ac_compile") 2>&5
3518   ac_status=$?
3519   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3520   test $ac_status = 0; }; then :
3521   for ac_file in conftest.o conftest.obj conftest.*; do
3522   test -f "$ac_file" || continue;
3523   case $ac_file in
3524     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3525     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3526        break;;
3527   esac
3528 done
3529 else
3530   $as_echo "$as_me: failed program was:" >&5
3531 sed 's/^/| /' conftest.$ac_ext >&5
3532
3533 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3534 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3535 as_fn_error $? "cannot compute suffix of object files: cannot compile
3536 See \`config.log' for more details" "$LINENO" 5; }
3537 fi
3538 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
3539 fi
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3541 $as_echo "$ac_cv_objext" >&6; }
3542 OBJEXT=$ac_cv_objext
3543 ac_objext=$OBJEXT
3544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3545 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3546 if ${ac_cv_c_compiler_gnu+:} false; then :
3547   $as_echo_n "(cached) " >&6
3548 else
3549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3550 /* end confdefs.h.  */
3551
3552 int
3553 main ()
3554 {
3555 #ifndef __GNUC__
3556        choke me
3557 #endif
3558
3559   ;
3560   return 0;
3561 }
3562 _ACEOF
3563 if ac_fn_c_try_compile "$LINENO"; then :
3564   ac_compiler_gnu=yes
3565 else
3566   ac_compiler_gnu=no
3567 fi
3568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3569 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3570
3571 fi
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3573 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3574 if test $ac_compiler_gnu = yes; then
3575   GCC=yes
3576 else
3577   GCC=
3578 fi
3579 ac_test_CFLAGS=${CFLAGS+set}
3580 ac_save_CFLAGS=$CFLAGS
3581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3582 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3583 if ${ac_cv_prog_cc_g+:} false; then :
3584   $as_echo_n "(cached) " >&6
3585 else
3586   ac_save_c_werror_flag=$ac_c_werror_flag
3587    ac_c_werror_flag=yes
3588    ac_cv_prog_cc_g=no
3589    CFLAGS="-g"
3590    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3591 /* end confdefs.h.  */
3592
3593 int
3594 main ()
3595 {
3596
3597   ;
3598   return 0;
3599 }
3600 _ACEOF
3601 if ac_fn_c_try_compile "$LINENO"; then :
3602   ac_cv_prog_cc_g=yes
3603 else
3604   CFLAGS=""
3605       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3606 /* end confdefs.h.  */
3607
3608 int
3609 main ()
3610 {
3611
3612   ;
3613   return 0;
3614 }
3615 _ACEOF
3616 if ac_fn_c_try_compile "$LINENO"; then :
3617
3618 else
3619   ac_c_werror_flag=$ac_save_c_werror_flag
3620          CFLAGS="-g"
3621          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3622 /* end confdefs.h.  */
3623
3624 int
3625 main ()
3626 {
3627
3628   ;
3629   return 0;
3630 }
3631 _ACEOF
3632 if ac_fn_c_try_compile "$LINENO"; then :
3633   ac_cv_prog_cc_g=yes
3634 fi
3635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3636 fi
3637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3638 fi
3639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3640    ac_c_werror_flag=$ac_save_c_werror_flag
3641 fi
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3643 $as_echo "$ac_cv_prog_cc_g" >&6; }
3644 if test "$ac_test_CFLAGS" = set; then
3645   CFLAGS=$ac_save_CFLAGS
3646 elif test $ac_cv_prog_cc_g = yes; then
3647   if test "$GCC" = yes; then
3648     CFLAGS="-g -O2"
3649   else
3650     CFLAGS="-g"
3651   fi
3652 else
3653   if test "$GCC" = yes; then
3654     CFLAGS="-O2"
3655   else
3656     CFLAGS=
3657   fi
3658 fi
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3660 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3661 if ${ac_cv_prog_cc_c89+:} false; then :
3662   $as_echo_n "(cached) " >&6
3663 else
3664   ac_cv_prog_cc_c89=no
3665 ac_save_CC=$CC
3666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3667 /* end confdefs.h.  */
3668 #include <stdarg.h>
3669 #include <stdio.h>
3670 struct stat;
3671 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3672 struct buf { int x; };
3673 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3674 static char *e (p, i)
3675      char **p;
3676      int i;
3677 {
3678   return p[i];
3679 }
3680 static char *f (char * (*g) (char **, int), char **p, ...)
3681 {
3682   char *s;
3683   va_list v;
3684   va_start (v,p);
3685   s = g (p, va_arg (v,int));
3686   va_end (v);
3687   return s;
3688 }
3689
3690 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3691    function prototypes and stuff, but not '\xHH' hex character constants.
3692    These don't provoke an error unfortunately, instead are silently treated
3693    as 'x'.  The following induces an error, until -std is added to get
3694    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3695    array size at least.  It's necessary to write '\x00'==0 to get something
3696    that's true only with -std.  */
3697 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3698
3699 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3700    inside strings and character constants.  */
3701 #define FOO(x) 'x'
3702 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3703
3704 int test (int i, double x);
3705 struct s1 {int (*f) (int a);};
3706 struct s2 {int (*f) (double a);};
3707 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3708 int argc;
3709 char **argv;
3710 int
3711 main ()
3712 {
3713 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3714   ;
3715   return 0;
3716 }
3717 _ACEOF
3718 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3719         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3720 do
3721   CC="$ac_save_CC $ac_arg"
3722   if ac_fn_c_try_compile "$LINENO"; then :
3723   ac_cv_prog_cc_c89=$ac_arg
3724 fi
3725 rm -f core conftest.err conftest.$ac_objext
3726   test "x$ac_cv_prog_cc_c89" != "xno" && break
3727 done
3728 rm -rf conftest.$ac_ext
3729 CC=$ac_save_CC
3730
3731 fi
3732 # AC_CACHE_VAL
3733 case "x$ac_cv_prog_cc_c89" in
3734   x)
3735     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3736 $as_echo "none needed" >&6; } ;;
3737   xno)
3738     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3739 $as_echo "unsupported" >&6; } ;;
3740   *)
3741     CC="$CC $ac_cv_prog_cc_c89"
3742     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3743 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3744 esac
3745 if test "x$ac_cv_prog_cc_c89" != xno; then :
3746
3747 fi
3748
3749 ac_ext=c
3750 ac_cpp='$CPP $CPPFLAGS'
3751 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3752 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3753 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3754
3755
3756 have_pthread=no
3757   with_pthread_req=unspecified
3758
3759   # AX_PTHREAD is from the GNU Autoconf Archive.
3760   # https://savannah.gnu.org/projects/autoconf-archive/
3761   # ===========================================================================
3762 #        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
3763 # ===========================================================================
3764 #
3765 # SYNOPSIS
3766 #
3767 #   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
3768 #
3769 # DESCRIPTION
3770 #
3771 #   This macro figures out how to build C programs using POSIX threads. It
3772 #   sets the PTHREAD_LIBS output variable to the threads library and linker
3773 #   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
3774 #   flags that are needed. (The user can also force certain compiler
3775 #   flags/libs to be tested by setting these environment variables.)
3776 #
3777 #   Also sets PTHREAD_CC to any special C compiler that is needed for
3778 #   multi-threaded programs (defaults to the value of CC otherwise). (This
3779 #   is necessary on AIX to use the special cc_r compiler alias.)
3780 #
3781 #   NOTE: You are assumed to not only compile your program with these flags,
3782 #   but also link it with them as well. e.g. you should link with
3783 #   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
3784 #
3785 #   If you are only building threads programs, you may wish to use these
3786 #   variables in your default LIBS, CFLAGS, and CC:
3787 #
3788 #     LIBS="$PTHREAD_LIBS $LIBS"
3789 #     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
3790 #     CC="$PTHREAD_CC"
3791 #
3792 #   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
3793 #   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
3794 #   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
3795 #
3796 #   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
3797 #   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
3798 #   PTHREAD_CFLAGS.
3799 #
3800 #   ACTION-IF-FOUND is a list of shell commands to run if a threads library
3801 #   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
3802 #   is not found. If ACTION-IF-FOUND is not specified, the default action
3803 #   will define HAVE_PTHREAD.
3804 #
3805 #   Please let the authors know if this macro fails on any platform, or if
3806 #   you have any other suggestions or comments. This macro was based on work
3807 #   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
3808 #   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
3809 #   Alejandro Forero Cuervo to the autoconf macro repository. We are also
3810 #   grateful for the helpful feedback of numerous users.
3811 #
3812 #   Updated for Autoconf 2.68 by Daniel Richard G.
3813 #
3814 # LICENSE
3815 #
3816 #   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
3817 #   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
3818 #
3819 #   This program is free software: you can redistribute it and/or modify it
3820 #   under the terms of the GNU General Public License as published by the
3821 #   Free Software Foundation, either version 3 of the License, or (at your
3822 #   option) any later version.
3823 #
3824 #   This program is distributed in the hope that it will be useful, but
3825 #   WITHOUT ANY WARRANTY; without even the implied warranty of
3826 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
3827 #   Public License for more details.
3828 #
3829 #   You should have received a copy of the GNU General Public License along
3830 #   with this program. If not, see <http://www.gnu.org/licenses/>.
3831 #
3832 #   As a special exception, the respective Autoconf Macro's copyright owner
3833 #   gives unlimited permission to copy, distribute and modify the configure
3834 #   scripts that are the output of Autoconf when processing the Macro. You
3835 #   need not follow the terms of the GNU General Public License when using
3836 #   or distributing such scripts, even though portions of the text of the
3837 #   Macro appear in them. The GNU General Public License (GPL) does govern
3838 #   all other use of the material that constitutes the Autoconf Macro.
3839 #
3840 #   This special exception to the GPL applies to versions of the Autoconf
3841 #   Macro released by the Autoconf Archive. When you make and distribute a
3842 #   modified version of the Autoconf Macro, you may extend this special
3843 #   exception to the GPL to apply to your modified version as well.
3844
3845 #serial 21
3846
3847 # This is what autoupdate's m4 run will expand.  It fires
3848 # the warning (with _au_warn_XXX), outputs it into the
3849 # updated configure.ac (with AC_DIAGNOSE), and then outputs
3850 # the replacement expansion.
3851
3852
3853 # This is an auxiliary macro that is also run when
3854 # autoupdate runs m4.  It simply calls m4_warning, but
3855 # we need a wrapper so that each warning is emitted only
3856 # once.  We break the quoting in m4_warning's argument in
3857 # order to expand this macro's arguments, not AU_DEFUN's.
3858
3859
3860 # Finally, this is the expansion that is picked up by
3861 # autoconf.  It tells the user to run autoupdate, and
3862 # then outputs the replacement expansion.  We do not care
3863 # about autoupdate's warning because that contains
3864 # information on what to do *after* running autoupdate.
3865
3866
3867
3868   # This affects CC, LIBS, and CFLAGS, instead of defining new variables.
3869
3870
3871 # Check whether --with-pthread was given.
3872 if test "${with_pthread+set}" = set; then :
3873   withval=$with_pthread; with_pthread="$withval"; with_pthread_req="$withval"
3874 else
3875   with_pthread=yes
3876 fi
3877
3878
3879   if test "$with_pthread" = yes; then
3880     # AX_PTHREAD might want a different compiler.
3881
3882
3883 ac_ext=c
3884 ac_cpp='$CPP $CPPFLAGS'
3885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3888
3889 ax_pthread_ok=no
3890
3891 # We used to check for pthread.h first, but this fails if pthread.h
3892 # requires special compiler flags (e.g. on True64 or Sequent).
3893 # It gets checked for in the link test anyway.
3894
3895 # First of all, check if the user has set any of the PTHREAD_LIBS,
3896 # etcetera environment variables, and if threads linking works using
3897 # them:
3898 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
3899         save_CFLAGS="$CFLAGS"
3900         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
3901         save_LIBS="$LIBS"
3902         LIBS="$PTHREAD_LIBS $LIBS"
3903         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
3904 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
3905         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3906 /* end confdefs.h.  */
3907
3908 /* Override any GCC internal prototype to avoid an error.
3909    Use char because int might match the return type of a GCC
3910    builtin and then its argument prototype would still apply.  */
3911 #ifdef __cplusplus
3912 extern "C"
3913 #endif
3914 char pthread_join ();
3915 int
3916 main ()
3917 {
3918 return pthread_join ();
3919   ;
3920   return 0;
3921 }
3922 _ACEOF
3923 if ac_fn_c_try_link "$LINENO"; then :
3924   ax_pthread_ok=yes
3925 fi
3926 rm -f core conftest.err conftest.$ac_objext \
3927     conftest$ac_exeext conftest.$ac_ext
3928         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
3929 $as_echo "$ax_pthread_ok" >&6; }
3930         if test x"$ax_pthread_ok" = xno; then
3931                 PTHREAD_LIBS=""
3932                 PTHREAD_CFLAGS=""
3933         fi
3934         LIBS="$save_LIBS"
3935         CFLAGS="$save_CFLAGS"
3936 fi
3937
3938 # We must check for the threads library under a number of different
3939 # names; the ordering is very important because some systems
3940 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
3941 # libraries is broken (non-POSIX).
3942
3943 # Create a list of thread flags to try.  Items starting with a "-" are
3944 # C compiler flags, and other items are library names, except for "none"
3945 # which indicates that we try without any flags at all, and "pthread-config"
3946 # which is a program returning the flags for the Pth emulation library.
3947
3948 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3949
3950 # The ordering *is* (sometimes) important.  Some notes on the
3951 # individual items follow:
3952
3953 # pthreads: AIX (must check this before -lpthread)
3954 # none: in case threads are in libc; should be tried before -Kthread and
3955 #       other compiler flags to prevent continual compiler warnings
3956 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
3957 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
3958 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3959 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
3960 # -pthreads: Solaris/gcc
3961 # -mthreads: Mingw32/gcc, Lynx/gcc
3962 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
3963 #      doesn't hurt to check since this sometimes defines pthreads too;
3964 #      also defines -D_REENTRANT)
3965 #      ... -mt is also the pthreads flag for HP/aCC
3966 # pthread: Linux, etcetera
3967 # --thread-safe: KAI C++
3968 # pthread-config: use pthread-config program (for GNU Pth library)
3969
3970 case ${host_os} in
3971         solaris*)
3972
3973         # On Solaris (at least, for some versions), libc contains stubbed
3974         # (non-functional) versions of the pthreads routines, so link-based
3975         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
3976         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
3977         # a function called by this macro, so we could check for that, but
3978         # who knows whether they'll stub that too in a future libc.)  So,
3979         # we'll just look for -pthreads and -lpthread first:
3980
3981         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
3982         ;;
3983
3984         darwin*)
3985         ax_pthread_flags="-pthread $ax_pthread_flags"
3986         ;;
3987 esac
3988
3989 # Clang doesn't consider unrecognized options an error unless we specify
3990 # -Werror. We throw in some extra Clang-specific options to ensure that
3991 # this doesn't happen for GCC, which also accepts -Werror.
3992
3993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
3994 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
3995 save_CFLAGS="$CFLAGS"
3996 ax_pthread_extra_flags="-Werror"
3997 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
3998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3999 /* end confdefs.h.  */
4000 int foo(void);
4001 int
4002 main ()
4003 {
4004 foo()
4005   ;
4006   return 0;
4007 }
4008 _ACEOF
4009 if ac_fn_c_try_compile "$LINENO"; then :
4010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4011 $as_echo "yes" >&6; }
4012 else
4013   ax_pthread_extra_flags=
4014                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4015 $as_echo "no" >&6; }
4016 fi
4017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4018 CFLAGS="$save_CFLAGS"
4019
4020 if test x"$ax_pthread_ok" = xno; then
4021 for flag in $ax_pthread_flags; do
4022
4023         case $flag in
4024                 none)
4025                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
4026 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
4027                 ;;
4028
4029                 -*)
4030                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
4031 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
4032                 PTHREAD_CFLAGS="$flag"
4033                 ;;
4034
4035                 pthread-config)
4036                 # Extract the first word of "pthread-config", so it can be a program name with args.
4037 set dummy pthread-config; ac_word=$2
4038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4039 $as_echo_n "checking for $ac_word... " >&6; }
4040 if ${ac_cv_prog_ax_pthread_config+:} false; then :
4041   $as_echo_n "(cached) " >&6
4042 else
4043   if test -n "$ax_pthread_config"; then
4044   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
4045 else
4046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4047 for as_dir in $PATH
4048 do
4049   IFS=$as_save_IFS
4050   test -z "$as_dir" && as_dir=.
4051     for ac_exec_ext in '' $ac_executable_extensions; do
4052   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4053     ac_cv_prog_ax_pthread_config="yes"
4054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4055     break 2
4056   fi
4057 done
4058   done
4059 IFS=$as_save_IFS
4060
4061   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
4062 fi
4063 fi
4064 ax_pthread_config=$ac_cv_prog_ax_pthread_config
4065 if test -n "$ax_pthread_config"; then
4066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
4067 $as_echo "$ax_pthread_config" >&6; }
4068 else
4069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4070 $as_echo "no" >&6; }
4071 fi
4072
4073
4074                 if test x"$ax_pthread_config" = xno; then continue; fi
4075                 PTHREAD_CFLAGS="`pthread-config --cflags`"
4076                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
4077                 ;;
4078
4079                 *)
4080                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
4081 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
4082                 PTHREAD_LIBS="-l$flag"
4083                 ;;
4084         esac
4085
4086         save_LIBS="$LIBS"
4087         save_CFLAGS="$CFLAGS"
4088         LIBS="$PTHREAD_LIBS $LIBS"
4089         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
4090
4091         # Check for various functions.  We must include pthread.h,
4092         # since some functions may be macros.  (On the Sequent, we
4093         # need a special flag -Kthread to make this header compile.)
4094         # We check for pthread_join because it is in -lpthread on IRIX
4095         # while pthread_create is in libc.  We check for pthread_attr_init
4096         # due to DEC craziness with -lpthreads.  We check for
4097         # pthread_cleanup_push because it is one of the few pthread
4098         # functions on Solaris that doesn't have a non-functional libc stub.
4099         # We try pthread_create on general principles.
4100         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4101 /* end confdefs.h.  */
4102 #include <pthread.h>
4103                         static void routine(void *a) { a = 0; }
4104                         static void *start_routine(void *a) { return a; }
4105 int
4106 main ()
4107 {
4108 pthread_t th; pthread_attr_t attr;
4109                         pthread_create(&th, 0, start_routine, 0);
4110                         pthread_join(th, 0);
4111                         pthread_attr_init(&attr);
4112                         pthread_cleanup_push(routine, 0);
4113                         pthread_cleanup_pop(0) /* ; */
4114   ;
4115   return 0;
4116 }
4117 _ACEOF
4118 if ac_fn_c_try_link "$LINENO"; then :
4119   ax_pthread_ok=yes
4120 fi
4121 rm -f core conftest.err conftest.$ac_objext \
4122     conftest$ac_exeext conftest.$ac_ext
4123
4124         LIBS="$save_LIBS"
4125         CFLAGS="$save_CFLAGS"
4126
4127         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
4128 $as_echo "$ax_pthread_ok" >&6; }
4129         if test "x$ax_pthread_ok" = xyes; then
4130                 break;
4131         fi
4132
4133         PTHREAD_LIBS=""
4134         PTHREAD_CFLAGS=""
4135 done
4136 fi
4137
4138 # Various other checks:
4139 if test "x$ax_pthread_ok" = xyes; then
4140         save_LIBS="$LIBS"
4141         LIBS="$PTHREAD_LIBS $LIBS"
4142         save_CFLAGS="$CFLAGS"
4143         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
4144
4145         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
4146         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
4147 $as_echo_n "checking for joinable pthread attribute... " >&6; }
4148         attr_name=unknown
4149         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
4150             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4151 /* end confdefs.h.  */
4152 #include <pthread.h>
4153 int
4154 main ()
4155 {
4156 int attr = $attr; return attr /* ; */
4157   ;
4158   return 0;
4159 }
4160 _ACEOF
4161 if ac_fn_c_try_link "$LINENO"; then :
4162   attr_name=$attr; break
4163 fi
4164 rm -f core conftest.err conftest.$ac_objext \
4165     conftest$ac_exeext conftest.$ac_ext
4166         done
4167         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
4168 $as_echo "$attr_name" >&6; }
4169         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
4170
4171 cat >>confdefs.h <<_ACEOF
4172 #define PTHREAD_CREATE_JOINABLE $attr_name
4173 _ACEOF
4174
4175         fi
4176
4177         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
4178 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
4179         flag=no
4180         case ${host_os} in
4181             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
4182             osf* | hpux*) flag="-D_REENTRANT";;
4183             solaris*)
4184             if test "$GCC" = "yes"; then
4185                 flag="-D_REENTRANT"
4186             else
4187                 # TODO: What about Clang on Solaris?
4188                 flag="-mt -D_REENTRANT"
4189             fi
4190             ;;
4191         esac
4192         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
4193 $as_echo "$flag" >&6; }
4194         if test "x$flag" != xno; then
4195             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
4196         fi
4197
4198         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
4199 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
4200 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
4201   $as_echo_n "(cached) " >&6
4202 else
4203
4204                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4205 /* end confdefs.h.  */
4206 #include <pthread.h>
4207 int
4208 main ()
4209 {
4210 int i = PTHREAD_PRIO_INHERIT;
4211   ;
4212   return 0;
4213 }
4214 _ACEOF
4215 if ac_fn_c_try_link "$LINENO"; then :
4216   ax_cv_PTHREAD_PRIO_INHERIT=yes
4217 else
4218   ax_cv_PTHREAD_PRIO_INHERIT=no
4219 fi
4220 rm -f core conftest.err conftest.$ac_objext \
4221     conftest$ac_exeext conftest.$ac_ext
4222
4223 fi
4224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
4225 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
4226         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
4227
4228 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
4229
4230 fi
4231
4232         LIBS="$save_LIBS"
4233         CFLAGS="$save_CFLAGS"
4234
4235         # More AIX lossage: compile with *_r variant
4236         if test "x$GCC" != xyes; then
4237             case $host_os in
4238                 aix*)
4239                 case "x/$CC" in #(
4240   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
4241     #handle absolute path differently from PATH based program lookup
4242                    case "x$CC" in #(
4243   x/*) :
4244     if as_fn_executable_p ${CC}_r; then :
4245   PTHREAD_CC="${CC}_r"
4246 fi ;; #(
4247   *) :
4248     for ac_prog in ${CC}_r
4249 do
4250   # Extract the first word of "$ac_prog", so it can be a program name with args.
4251 set dummy $ac_prog; ac_word=$2
4252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4253 $as_echo_n "checking for $ac_word... " >&6; }
4254 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
4255   $as_echo_n "(cached) " >&6
4256 else
4257   if test -n "$PTHREAD_CC"; then
4258   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
4259 else
4260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4261 for as_dir in $PATH
4262 do
4263   IFS=$as_save_IFS
4264   test -z "$as_dir" && as_dir=.
4265     for ac_exec_ext in '' $ac_executable_extensions; do
4266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4267     ac_cv_prog_PTHREAD_CC="$ac_prog"
4268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4269     break 2
4270   fi
4271 done
4272   done
4273 IFS=$as_save_IFS
4274
4275 fi
4276 fi
4277 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
4278 if test -n "$PTHREAD_CC"; then
4279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
4280 $as_echo "$PTHREAD_CC" >&6; }
4281 else
4282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4283 $as_echo "no" >&6; }
4284 fi
4285
4286
4287   test -n "$PTHREAD_CC" && break
4288 done
4289 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
4290  ;;
4291 esac ;; #(
4292   *) :
4293      ;;
4294 esac
4295                 ;;
4296             esac
4297         fi
4298 fi
4299
4300 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
4301
4302
4303
4304
4305
4306 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
4307 if test x"$ax_pthread_ok" = xyes; then
4308         if test "$CC" = "$PTHREAD_CC" -o -z "$ac_original_cc"; then
4309         have_pthread=yes
4310       else
4311         ac_prog_cc_no_pthread=yes
4312       fi
4313
4314         :
4315 else
4316         ax_pthread_ok=no
4317
4318 fi
4319 ac_ext=c
4320 ac_cpp='$CPP $CPPFLAGS'
4321 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4322 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4323 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4324
4325
4326
4327     if test "$have_pthread" = yes; then
4328       $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
4329
4330       CC=$PTHREAD_CC
4331     fi
4332   fi
4333  # Needs ac_original_cc.
4334
4335
4336
4337   if test -z "$GCC"; then
4338     # not using GCC
4339     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to request ANSI compilation" >&5
4340 $as_echo_n "checking how to request ANSI compilation... " >&6; }
4341     case "$host" in
4342       *-hpux* )
4343         { $as_echo "$as_me:${as_lineno-$LINENO}: result: HPUX: adding -Ae" >&5
4344 $as_echo "HPUX: adding -Ae" >&6; }
4345         CC="$CC -Ae"
4346       ;;
4347       *-aix* )
4348         { $as_echo "$as_me:${as_lineno-$LINENO}: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
4349 $as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
4350         CC="$CC -qlanglvl=ansi -qhalt=e"
4351       ;;
4352       *-dec-* )
4353         { $as_echo "$as_me:${as_lineno-$LINENO}: result: DEC: adding -std1 -ieee" >&5
4354 $as_echo "DEC: adding -std1 -ieee" >&6; }
4355         CC="$CC -std1"
4356       ;;
4357       *)
4358         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no idea" >&5
4359 $as_echo "no idea" >&6; }
4360       ;;
4361     esac
4362   else
4363     # using GCC
4364     case "$host" in
4365       *-solaris*)
4366         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris: adding -D__EXTENSIONS__" >&5
4367 $as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
4368         CC="$CC -D__EXTENSIONS__"
4369       ;;
4370     esac
4371   fi
4372
4373   OBJCC="$CC"
4374
4375   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler works on ANSI C" >&5
4376 $as_echo_n "checking whether the compiler works on ANSI C... " >&6; }
4377   if test "$cross_compiling" = yes; then :
4378   as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
4379 else
4380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4381 /* end confdefs.h.  */
4382  main(int ac, char **av) { return 0; }
4383 _ACEOF
4384 if ac_fn_c_try_run "$LINENO"; then :
4385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4386 $as_echo "yes" >&6; }
4387 else
4388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4389 $as_echo "no" >&6; }
4390      as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
4391 fi
4392 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4393   conftest.$ac_objext conftest.beam conftest.$ac_ext
4394 fi
4395
4396
4397   if test -n "$GCC"; then
4398     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on gcc compiler warnings." >&5
4399 $as_echo "Turning on gcc compiler warnings." >&6; }
4400     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
4401     OBJCC="$OBJCC -Wall"
4402     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
4403     # and so perhaps now we can do without -pedantic?
4404   else
4405     case "$host" in
4406       *-irix5* |*-irix6.0-3* )
4407         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on SGI compiler warnings." >&5
4408 $as_echo "Turning on SGI compiler warnings." >&6; }
4409         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
4410       ;;
4411 #     *-dec-osf* )
4412 #       if test -z "$GCC"; then
4413 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
4414 #         CC="$CC -migrate -w0 -verbose -warnprotos"
4415 #       fi
4416 #     ;;
4417     esac
4418   fi
4419
4420 if test -n "$GCC"; then
4421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wno-overlength-strings" >&5
4422 $as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
4423 if ${ac_cv_gcc_accepts_no_overlength+:} false; then :
4424   $as_echo_n "(cached) " >&6
4425 else
4426   rm -rf conftest.$ac_ext
4427      touch conftest.$ac_ext
4428      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4429           grep unrecognized >/dev/null ); then
4430        ac_cv_gcc_accepts_no_overlength=no
4431      else
4432        ac_cv_gcc_accepts_no_overlength=yes
4433        CC="$CC -Wno-overlength-strings"
4434      fi
4435 fi
4436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_overlength" >&5
4437 $as_echo "$ac_cv_gcc_accepts_no_overlength" >&6; }
4438    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
4439   fi
4440
4441 if test -n "$GCC"; then
4442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wdeclaration-after-statement" >&5
4443 $as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
4444 if ${ac_cv_gcc_accepts_no_decl_after+:} false; then :
4445   $as_echo_n "(cached) " >&6
4446 else
4447   rm -rf conftest.$ac_ext
4448      touch conftest.$ac_ext
4449      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4450           grep unrecognized >/dev/null ); then
4451        ac_cv_gcc_accepts_no_decl_after=no
4452      else
4453        ac_cv_gcc_accepts_no_decl_after=yes
4454        CC="$CC -Wdeclaration-after-statement"
4455      fi
4456 fi
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_decl_after" >&5
4458 $as_echo "$ac_cv_gcc_accepts_no_decl_after" >&6; }
4459    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
4460   fi
4461
4462 if test -n "$GCC"; then
4463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -no-cpp-precomp" >&5
4464 $as_echo_n "checking whether gcc accepts -no-cpp-precomp... " >&6; }
4465 if ${ac_cv_gcc_accepts_no_cpp_precomp+:} false; then :
4466   $as_echo_n "(cached) " >&6
4467 else
4468   rm -rf conftest.$ac_ext
4469      touch conftest.$ac_ext
4470      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4471           grep unrecognized >/dev/null ); then
4472        ac_cv_gcc_accepts_no_cpp_precomp=no
4473      else
4474        ac_cv_gcc_accepts_no_cpp_precomp=yes
4475        CC="$CC -no-cpp-precomp"
4476      fi
4477 fi
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
4479 $as_echo "$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
4480    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
4481   fi
4482
4483 if test -n "$GCC"; then
4484
4485   case "$host" in
4486     *-darwin* )
4487       # Fucking Apple let // comments sneak into OpenGL headers, so
4488       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
4489     ;;
4490    *)
4491      if test -n "$GCC"; then
4492    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -std=c89" >&5
4493 $as_echo_n "checking whether gcc accepts -std=c89... " >&6; }
4494 if ${ac_cv_gcc_accepts_std+:} false; then :
4495   $as_echo_n "(cached) " >&6
4496 else
4497   rm -rf conftest.$ac_ext
4498      touch conftest.$ac_ext
4499      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4500           grep unrecognized >/dev/null ); then
4501        ac_cv_gcc_accepts_std=no
4502      else
4503        ac_cv_gcc_accepts_std=yes
4504        CC="$CC -std=c89"
4505      fi
4506 fi
4507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_std" >&5
4508 $as_echo "$ac_cv_gcc_accepts_std" >&6; }
4509    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
4510   fi
4511
4512    ;;
4513   esac
4514
4515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling C++ comments in ANSI C code." >&5
4516 $as_echo "Disabling C++ comments in ANSI C code." >&6; }
4517    #
4518    # The reason that // comments are banned from xscreensaver is that gcc is
4519    # basically the only compiler in the world that supports them in C code.
4520    # All other vendors support them only in their C++ compilers, not in their
4521    # ANSI C compilers.  This means that it's a portability problem: every time
4522    # these comments have snuck into the xscreensaver source code, I've gotten
4523    # complaints about it the next day.  So we turn off support for them in gcc
4524    # as well to prevent them from accidentially slipping in.
4525    #
4526    if test "$ac_gcc_accepts_std" = yes ; then
4527      #
4528      # -std=c89 defines __STRICT_ANSI__, which we don't want.
4529      # (That appears to be the only additional preprocessor symbol
4530      # it defines, in addition to the syntax changes it makes.)
4531      #
4532      # -std=gnu89 is no good, because // comments were a GNU extension
4533      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
4534      # with -std=gnu89 but not with -std=c89.)
4535      #
4536      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
4537      CC="$CC -U__STRICT_ANSI__"
4538 #   else
4539 #     # The old way:
4540 #     CC="$CC -Wp,-lang-c89"
4541    fi
4542   fi
4543
4544 ac_ext=c
4545 ac_cpp='$CPP $CPPFLAGS'
4546 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4547 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4548 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4550 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4551 # On Suns, sometimes $CPP names a directory.
4552 if test -n "$CPP" && test -d "$CPP"; then
4553   CPP=
4554 fi
4555 if test -z "$CPP"; then
4556   if ${ac_cv_prog_CPP+:} false; then :
4557   $as_echo_n "(cached) " >&6
4558 else
4559       # Double quotes because CPP needs to be expanded
4560     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4561     do
4562       ac_preproc_ok=false
4563 for ac_c_preproc_warn_flag in '' yes
4564 do
4565   # Use a header file that comes with gcc, so configuring glibc
4566   # with a fresh cross-compiler works.
4567   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4568   # <limits.h> exists even on freestanding compilers.
4569   # On the NeXT, cc -E runs the code through the compiler's parser,
4570   # not just through cpp. "Syntax error" is here to catch this case.
4571   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4572 /* end confdefs.h.  */
4573 #ifdef __STDC__
4574 # include <limits.h>
4575 #else
4576 # include <assert.h>
4577 #endif
4578                      Syntax error
4579 _ACEOF
4580 if ac_fn_c_try_cpp "$LINENO"; then :
4581
4582 else
4583   # Broken: fails on valid input.
4584 continue
4585 fi
4586 rm -rf conftest.err conftest.i conftest.$ac_ext
4587
4588   # OK, works on sane cases.  Now check whether nonexistent headers
4589   # can be detected and how.
4590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4591 /* end confdefs.h.  */
4592 #include <ac_nonexistent.h>
4593 _ACEOF
4594 if ac_fn_c_try_cpp "$LINENO"; then :
4595   # Broken: success on invalid input.
4596 continue
4597 else
4598   # Passes both tests.
4599 ac_preproc_ok=:
4600 break
4601 fi
4602 rm -rf conftest.err conftest.i conftest.$ac_ext
4603
4604 done
4605 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4606 rm -rf conftest.i conftest.err conftest.$ac_ext
4607 if $ac_preproc_ok; then :
4608   break
4609 fi
4610
4611     done
4612     ac_cv_prog_CPP=$CPP
4613
4614 fi
4615   CPP=$ac_cv_prog_CPP
4616 else
4617   ac_cv_prog_CPP=$CPP
4618 fi
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4620 $as_echo "$CPP" >&6; }
4621 ac_preproc_ok=false
4622 for ac_c_preproc_warn_flag in '' yes
4623 do
4624   # Use a header file that comes with gcc, so configuring glibc
4625   # with a fresh cross-compiler works.
4626   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4627   # <limits.h> exists even on freestanding compilers.
4628   # On the NeXT, cc -E runs the code through the compiler's parser,
4629   # not just through cpp. "Syntax error" is here to catch this case.
4630   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4631 /* end confdefs.h.  */
4632 #ifdef __STDC__
4633 # include <limits.h>
4634 #else
4635 # include <assert.h>
4636 #endif
4637                      Syntax error
4638 _ACEOF
4639 if ac_fn_c_try_cpp "$LINENO"; then :
4640
4641 else
4642   # Broken: fails on valid input.
4643 continue
4644 fi
4645 rm -rf conftest.err conftest.i conftest.$ac_ext
4646
4647   # OK, works on sane cases.  Now check whether nonexistent headers
4648   # can be detected and how.
4649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4650 /* end confdefs.h.  */
4651 #include <ac_nonexistent.h>
4652 _ACEOF
4653 if ac_fn_c_try_cpp "$LINENO"; then :
4654   # Broken: success on invalid input.
4655 continue
4656 else
4657   # Passes both tests.
4658 ac_preproc_ok=:
4659 break
4660 fi
4661 rm -rf conftest.err conftest.i conftest.$ac_ext
4662
4663 done
4664 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4665 rm -rf conftest.i conftest.err conftest.$ac_ext
4666 if $ac_preproc_ok; then :
4667
4668 else
4669   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4670 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4671 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4672 See \`config.log' for more details" "$LINENO" 5; }
4673 fi
4674
4675 ac_ext=c
4676 ac_cpp='$CPP $CPPFLAGS'
4677 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4678 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4679 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4680
4681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4682 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4683 if ${ac_cv_c_const+:} false; then :
4684   $as_echo_n "(cached) " >&6
4685 else
4686   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4687 /* end confdefs.h.  */
4688
4689 int
4690 main ()
4691 {
4692
4693 #ifndef __cplusplus
4694   /* Ultrix mips cc rejects this sort of thing.  */
4695   typedef int charset[2];
4696   const charset cs = { 0, 0 };
4697   /* SunOS 4.1.1 cc rejects this.  */
4698   char const *const *pcpcc;
4699   char **ppc;
4700   /* NEC SVR4.0.2 mips cc rejects this.  */
4701   struct point {int x, y;};
4702   static struct point const zero = {0,0};
4703   /* AIX XL C 1.02.0.0 rejects this.
4704      It does not let you subtract one const X* pointer from another in
4705      an arm of an if-expression whose if-part is not a constant
4706      expression */
4707   const char *g = "string";
4708   pcpcc = &g + (g ? g-g : 0);
4709   /* HPUX 7.0 cc rejects these. */
4710   ++pcpcc;
4711   ppc = (char**) pcpcc;
4712   pcpcc = (char const *const *) ppc;
4713   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4714     char tx;
4715     char *t = &tx;
4716     char const *s = 0 ? (char *) 0 : (char const *) 0;
4717
4718     *t++ = 0;
4719     if (s) return 0;
4720   }
4721   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4722     int x[] = {25, 17};
4723     const int *foo = &x[0];
4724     ++foo;
4725   }
4726   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4727     typedef const int *iptr;
4728     iptr p = 0;
4729     ++p;
4730   }
4731   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4732        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4733     struct s { int j; const int *ap[3]; } bx;
4734     struct s *b = &bx; b->j = 5;
4735   }
4736   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4737     const int foo = 10;
4738     if (!foo) return 0;
4739   }
4740   return !cs[0] && !zero.x;
4741 #endif
4742
4743   ;
4744   return 0;
4745 }
4746 _ACEOF
4747 if ac_fn_c_try_compile "$LINENO"; then :
4748   ac_cv_c_const=yes
4749 else
4750   ac_cv_c_const=no
4751 fi
4752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4753 fi
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4755 $as_echo "$ac_cv_c_const" >&6; }
4756 if test $ac_cv_c_const = no; then
4757
4758 $as_echo "#define const /**/" >>confdefs.h
4759
4760 fi
4761
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4763 $as_echo_n "checking for inline... " >&6; }
4764 if ${ac_cv_c_inline+:} false; then :
4765   $as_echo_n "(cached) " >&6
4766 else
4767   ac_cv_c_inline=no
4768 for ac_kw in inline __inline__ __inline; do
4769   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4770 /* end confdefs.h.  */
4771 #ifndef __cplusplus
4772 typedef int foo_t;
4773 static $ac_kw foo_t static_foo () {return 0; }
4774 $ac_kw foo_t foo () {return 0; }
4775 #endif
4776
4777 _ACEOF
4778 if ac_fn_c_try_compile "$LINENO"; then :
4779   ac_cv_c_inline=$ac_kw
4780 fi
4781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4782   test "$ac_cv_c_inline" != no && break
4783 done
4784
4785 fi
4786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4787 $as_echo "$ac_cv_c_inline" >&6; }
4788
4789 case $ac_cv_c_inline in
4790   inline | yes) ;;
4791   *)
4792     case $ac_cv_c_inline in
4793       no) ac_val=;;
4794       *) ac_val=$ac_cv_c_inline;;
4795     esac
4796     cat >>confdefs.h <<_ACEOF
4797 #ifndef __cplusplus
4798 #define inline $ac_val
4799 #endif
4800 _ACEOF
4801     ;;
4802 esac
4803
4804
4805 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4806   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bc" >&5
4807 $as_echo_n "checking for bc... " >&6; }
4808   if test "$ac_bc_result" = "15" ; then
4809     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4810 $as_echo "yes" >&6; }
4811   else
4812     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4813 $as_echo "no" >&6; }
4814     echo ''
4815     as_fn_error $? "Your system doesn't have \"bc\", which has been a standard
4816                   part of Unix since the 1970s.  Come back when your vendor
4817                   has grown a clue." "$LINENO" 5
4818   fi
4819
4820
4821 # stuff for Makefiles
4822 # Find a good install program.  We prefer a C program (faster),
4823 # so one script is as good as another.  But avoid the broken or
4824 # incompatible versions:
4825 # SysV /etc/install, /usr/sbin/install
4826 # SunOS /usr/etc/install
4827 # IRIX /sbin/install
4828 # AIX /bin/install
4829 # AmigaOS /C/install, which installs bootblocks on floppy discs
4830 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4831 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4832 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4833 # OS/2's system install, which has a completely different semantic
4834 # ./install, which can be erroneously created by make from ./install.sh.
4835 # Reject install programs that cannot install multiple files.
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4837 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4838 if test -z "$INSTALL"; then
4839 if ${ac_cv_path_install+:} false; then :
4840   $as_echo_n "(cached) " >&6
4841 else
4842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843 for as_dir in $PATH
4844 do
4845   IFS=$as_save_IFS
4846   test -z "$as_dir" && as_dir=.
4847     # Account for people who put trailing slashes in PATH elements.
4848 case $as_dir/ in #((
4849   ./ | .// | /[cC]/* | \
4850   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4851   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4852   /usr/ucb/* ) ;;
4853   *)
4854     # OSF1 and SCO ODT 3.0 have their own names for install.
4855     # Don't use installbsd from OSF since it installs stuff as root
4856     # by default.
4857     for ac_prog in ginstall scoinst install; do
4858       for ac_exec_ext in '' $ac_executable_extensions; do
4859         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4860           if test $ac_prog = install &&
4861             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4862             # AIX install.  It has an incompatible calling convention.
4863             :
4864           elif test $ac_prog = install &&
4865             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4866             # program-specific install script used by HP pwplus--don't use.
4867             :
4868           else
4869             rm -rf conftest.one conftest.two conftest.dir
4870             echo one > conftest.one
4871             echo two > conftest.two
4872             mkdir conftest.dir
4873             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4874               test -s conftest.one && test -s conftest.two &&
4875               test -s conftest.dir/conftest.one &&
4876               test -s conftest.dir/conftest.two
4877             then
4878               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4879               break 3
4880             fi
4881           fi
4882         fi
4883       done
4884     done
4885     ;;
4886 esac
4887
4888   done
4889 IFS=$as_save_IFS
4890
4891 rm -rf conftest.one conftest.two conftest.dir
4892
4893 fi
4894   if test "${ac_cv_path_install+set}" = set; then
4895     INSTALL=$ac_cv_path_install
4896   else
4897     # As a last resort, use the slow shell script.  Don't cache a
4898     # value for INSTALL within a source directory, because that will
4899     # break other packages using the cache if that directory is
4900     # removed, or if the value is a relative name.
4901     INSTALL=$ac_install_sh
4902   fi
4903 fi
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4905 $as_echo "$INSTALL" >&6; }
4906
4907 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4908 # It thinks the first close brace ends the variable substitution.
4909 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4910
4911 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4912
4913 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4914
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4916 $as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4917 if ${ac_cv_install_d_creates_dirs+:} false; then :
4918   $as_echo_n "(cached) " >&6
4919 else
4920   ac_cv_install_d_creates_dirs=no
4921      rm -rf conftestdir
4922      if mkdir conftestdir; then
4923        cd conftestdir 2>/dev/null
4924        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4925        if test -d dir1/dir2/. ; then
4926          ac_cv_install_d_creates_dirs=yes
4927        fi
4928        cd .. 2>/dev/null
4929        rm -rf conftestdir
4930      fi
4931
4932 fi
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_install_d_creates_dirs" >&5
4934 $as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4935
4936   if test "$ac_cv_install_d_creates_dirs" = no ; then
4937     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"mkdir -p\" creates intermediate directories" >&5
4938 $as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4939 if ${ac_cv_mkdir_p_creates_dirs+:} false; then :
4940   $as_echo_n "(cached) " >&6
4941 else
4942   ac_cv_mkdir_p_creates_dirs=no
4943        rm -rf conftestdir
4944        if mkdir conftestdir; then
4945          cd conftestdir 2>/dev/null
4946          mkdir -p dir1/dir2 >/dev/null 2>&1
4947          if test -d dir1/dir2/. ; then
4948            ac_cv_mkdir_p_creates_dirs=yes
4949          fi
4950          cd .. 2>/dev/null
4951          rm -rf conftestdir
4952        fi
4953
4954 fi
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_p_creates_dirs" >&5
4956 $as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4957   fi
4958
4959   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4960     INSTALL_DIRS='${INSTALL} -d'
4961   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4962     INSTALL_DIRS='mkdir -p'
4963   else
4964     # any other ideas?
4965     INSTALL_DIRS='${INSTALL} -d'
4966   fi
4967
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4969 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4970 set x ${MAKE-make}
4971 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4972 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4973   $as_echo_n "(cached) " >&6
4974 else
4975   cat >conftest.make <<\_ACEOF
4976 SHELL = /bin/sh
4977 all:
4978         @echo '@@@%%%=$(MAKE)=@@@%%%'
4979 _ACEOF
4980 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4981 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4982   *@@@%%%=?*=@@@%%%*)
4983     eval ac_cv_prog_make_${ac_make}_set=yes;;
4984   *)
4985     eval ac_cv_prog_make_${ac_make}_set=no;;
4986 esac
4987 rm -rf conftest.make
4988 fi
4989 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4991 $as_echo "yes" >&6; }
4992   SET_MAKE=
4993 else
4994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995 $as_echo "no" >&6; }
4996   SET_MAKE="MAKE=${MAKE-make}"
4997 fi
4998
4999
5000 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
5001 # That's wrong: it should be set to '${INSTALL}', so that one can
5002 # implement the "install-strip" target properly (strip executables,
5003 # but do not try to strip scripts.)
5004 #
5005 INSTALL_SCRIPT='${INSTALL}'
5006
5007 # random libc stuff
5008
5009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5010 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5011 if ${ac_cv_path_GREP+:} false; then :
5012   $as_echo_n "(cached) " >&6
5013 else
5014   if test -z "$GREP"; then
5015   ac_path_GREP_found=false
5016   # Loop through the user's path and test for each of PROGNAME-LIST
5017   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5018 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5019 do
5020   IFS=$as_save_IFS
5021   test -z "$as_dir" && as_dir=.
5022     for ac_prog in grep ggrep; do
5023     for ac_exec_ext in '' $ac_executable_extensions; do
5024       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5025       as_fn_executable_p "$ac_path_GREP" || continue
5026 # Check for GNU ac_path_GREP and select it if it is found.
5027   # Check for GNU $ac_path_GREP
5028 case `"$ac_path_GREP" --version 2>&1` in
5029 *GNU*)
5030   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5031 *)
5032   ac_count=0
5033   $as_echo_n 0123456789 >"conftest.in"
5034   while :
5035   do
5036     cat "conftest.in" "conftest.in" >"conftest.tmp"
5037     mv "conftest.tmp" "conftest.in"
5038     cp "conftest.in" "conftest.nl"
5039     $as_echo 'GREP' >> "conftest.nl"
5040     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5041     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5042     as_fn_arith $ac_count + 1 && ac_count=$as_val
5043     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5044       # Best one so far, save it but keep looking for a better one
5045       ac_cv_path_GREP="$ac_path_GREP"
5046       ac_path_GREP_max=$ac_count
5047     fi
5048     # 10*(2^10) chars as input seems more than enough
5049     test $ac_count -gt 10 && break
5050   done
5051   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
5052 esac
5053
5054       $ac_path_GREP_found && break 3
5055     done
5056   done
5057   done
5058 IFS=$as_save_IFS
5059   if test -z "$ac_cv_path_GREP"; then
5060     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5061   fi
5062 else
5063   ac_cv_path_GREP=$GREP
5064 fi
5065
5066 fi
5067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5068 $as_echo "$ac_cv_path_GREP" >&6; }
5069  GREP="$ac_cv_path_GREP"
5070
5071
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5073 $as_echo_n "checking for egrep... " >&6; }
5074 if ${ac_cv_path_EGREP+:} false; then :
5075   $as_echo_n "(cached) " >&6
5076 else
5077   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5078    then ac_cv_path_EGREP="$GREP -E"
5079    else
5080      if test -z "$EGREP"; then
5081   ac_path_EGREP_found=false
5082   # Loop through the user's path and test for each of PROGNAME-LIST
5083   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5084 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5085 do
5086   IFS=$as_save_IFS
5087   test -z "$as_dir" && as_dir=.
5088     for ac_prog in egrep; do
5089     for ac_exec_ext in '' $ac_executable_extensions; do
5090       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5091       as_fn_executable_p "$ac_path_EGREP" || continue
5092 # Check for GNU ac_path_EGREP and select it if it is found.
5093   # Check for GNU $ac_path_EGREP
5094 case `"$ac_path_EGREP" --version 2>&1` in
5095 *GNU*)
5096   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5097 *)
5098   ac_count=0
5099   $as_echo_n 0123456789 >"conftest.in"
5100   while :
5101   do
5102     cat "conftest.in" "conftest.in" >"conftest.tmp"
5103     mv "conftest.tmp" "conftest.in"
5104     cp "conftest.in" "conftest.nl"
5105     $as_echo 'EGREP' >> "conftest.nl"
5106     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5107     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5108     as_fn_arith $ac_count + 1 && ac_count=$as_val
5109     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5110       # Best one so far, save it but keep looking for a better one
5111       ac_cv_path_EGREP="$ac_path_EGREP"
5112       ac_path_EGREP_max=$ac_count
5113     fi
5114     # 10*(2^10) chars as input seems more than enough
5115     test $ac_count -gt 10 && break
5116   done
5117   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
5118 esac
5119
5120       $ac_path_EGREP_found && break 3
5121     done
5122   done
5123   done
5124 IFS=$as_save_IFS
5125   if test -z "$ac_cv_path_EGREP"; then
5126     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5127   fi
5128 else
5129   ac_cv_path_EGREP=$EGREP
5130 fi
5131
5132    fi
5133 fi
5134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5135 $as_echo "$ac_cv_path_EGREP" >&6; }
5136  EGREP="$ac_cv_path_EGREP"
5137
5138
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5140 $as_echo_n "checking for ANSI C header files... " >&6; }
5141 if ${ac_cv_header_stdc+:} false; then :
5142   $as_echo_n "(cached) " >&6
5143 else
5144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5145 /* end confdefs.h.  */
5146 #include <stdlib.h>
5147 #include <stdarg.h>
5148 #include <string.h>
5149 #include <float.h>
5150
5151 int
5152 main ()
5153 {
5154
5155   ;
5156   return 0;
5157 }
5158 _ACEOF
5159 if ac_fn_c_try_compile "$LINENO"; then :
5160   ac_cv_header_stdc=yes
5161 else
5162   ac_cv_header_stdc=no
5163 fi
5164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5165
5166 if test $ac_cv_header_stdc = yes; then
5167   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5169 /* end confdefs.h.  */
5170 #include <string.h>
5171
5172 _ACEOF
5173 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5174   $EGREP "memchr" >/dev/null 2>&1; then :
5175
5176 else
5177   ac_cv_header_stdc=no
5178 fi
5179 rm -rf conftest*
5180
5181 fi
5182
5183 if test $ac_cv_header_stdc = yes; then
5184   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5185   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5186 /* end confdefs.h.  */
5187 #include <stdlib.h>
5188
5189 _ACEOF
5190 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5191   $EGREP "free" >/dev/null 2>&1; then :
5192
5193 else
5194   ac_cv_header_stdc=no
5195 fi
5196 rm -rf conftest*
5197
5198 fi
5199
5200 if test $ac_cv_header_stdc = yes; then
5201   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5202   if test "$cross_compiling" = yes; then :
5203   :
5204 else
5205   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5206 /* end confdefs.h.  */
5207 #include <ctype.h>
5208 #include <stdlib.h>
5209 #if ((' ' & 0x0FF) == 0x020)
5210 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5211 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5212 #else
5213 # define ISLOWER(c) \
5214                    (('a' <= (c) && (c) <= 'i') \
5215                      || ('j' <= (c) && (c) <= 'r') \
5216                      || ('s' <= (c) && (c) <= 'z'))
5217 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5218 #endif
5219
5220 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5221 int
5222 main ()
5223 {
5224   int i;
5225   for (i = 0; i < 256; i++)
5226     if (XOR (islower (i), ISLOWER (i))
5227         || toupper (i) != TOUPPER (i))
5228       return 2;
5229   return 0;
5230 }
5231 _ACEOF
5232 if ac_fn_c_try_run "$LINENO"; then :
5233
5234 else
5235   ac_cv_header_stdc=no
5236 fi
5237 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5238   conftest.$ac_objext conftest.beam conftest.$ac_ext
5239 fi
5240
5241 fi
5242 fi
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5244 $as_echo "$ac_cv_header_stdc" >&6; }
5245 if test $ac_cv_header_stdc = yes; then
5246
5247 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5248
5249 fi
5250
5251 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5252 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5253                   inttypes.h stdint.h unistd.h
5254 do :
5255   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5256 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5257 "
5258 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5259   cat >>confdefs.h <<_ACEOF
5260 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5261 _ACEOF
5262
5263 fi
5264
5265 done
5266
5267
5268 for ac_header in unistd.h inttypes.h
5269 do :
5270   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5271 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5272 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5273   cat >>confdefs.h <<_ACEOF
5274 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5275 _ACEOF
5276
5277 fi
5278
5279 done
5280
5281 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
5282 if test "x$ac_cv_type_mode_t" = xyes; then :
5283
5284 else
5285
5286 cat >>confdefs.h <<_ACEOF
5287 #define mode_t int
5288 _ACEOF
5289
5290 fi
5291
5292 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
5293 if test "x$ac_cv_type_pid_t" = xyes; then :
5294
5295 else
5296
5297 cat >>confdefs.h <<_ACEOF
5298 #define pid_t int
5299 _ACEOF
5300
5301 fi
5302
5303 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
5304 if test "x$ac_cv_type_size_t" = xyes; then :
5305
5306 else
5307
5308 cat >>confdefs.h <<_ACEOF
5309 #define size_t unsigned int
5310 _ACEOF
5311
5312 fi
5313
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
5315 $as_echo_n "checking return type of signal handlers... " >&6; }
5316 if ${ac_cv_type_signal+:} false; then :
5317   $as_echo_n "(cached) " >&6
5318 else
5319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5320 /* end confdefs.h.  */
5321 #include <sys/types.h>
5322 #include <signal.h>
5323
5324 int
5325 main ()
5326 {
5327 return *(signal (0, 0)) (0) == 1;
5328   ;
5329   return 0;
5330 }
5331 _ACEOF
5332 if ac_fn_c_try_compile "$LINENO"; then :
5333   ac_cv_type_signal=int
5334 else
5335   ac_cv_type_signal=void
5336 fi
5337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5338 fi
5339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
5340 $as_echo "$ac_cv_type_signal" >&6; }
5341
5342 cat >>confdefs.h <<_ACEOF
5343 #define RETSIGTYPE $ac_cv_type_signal
5344 _ACEOF
5345
5346
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
5348 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5349 if ${ac_cv_header_time+:} false; then :
5350   $as_echo_n "(cached) " >&6
5351 else
5352   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5353 /* end confdefs.h.  */
5354 #include <sys/types.h>
5355 #include <sys/time.h>
5356 #include <time.h>
5357
5358 int
5359 main ()
5360 {
5361 if ((struct tm *) 0)
5362 return 0;
5363   ;
5364   return 0;
5365 }
5366 _ACEOF
5367 if ac_fn_c_try_compile "$LINENO"; then :
5368   ac_cv_header_time=yes
5369 else
5370   ac_cv_header_time=no
5371 fi
5372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5373 fi
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
5375 $as_echo "$ac_cv_header_time" >&6; }
5376 if test $ac_cv_header_time = yes; then
5377
5378 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
5379
5380 fi
5381
5382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
5383 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5384 if ${ac_cv_header_sys_wait_h+:} false; then :
5385   $as_echo_n "(cached) " >&6
5386 else
5387   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5388 /* end confdefs.h.  */
5389 #include <sys/types.h>
5390 #include <sys/wait.h>
5391 #ifndef WEXITSTATUS
5392 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5393 #endif
5394 #ifndef WIFEXITED
5395 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5396 #endif
5397
5398 int
5399 main ()
5400 {
5401   int s;
5402   wait (&s);
5403   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5404   ;
5405   return 0;
5406 }
5407 _ACEOF
5408 if ac_fn_c_try_compile "$LINENO"; then :
5409   ac_cv_header_sys_wait_h=yes
5410 else
5411   ac_cv_header_sys_wait_h=no
5412 fi
5413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5414 fi
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
5416 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
5417 if test $ac_cv_header_sys_wait_h = yes; then
5418
5419 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
5420
5421 fi
5422
5423 ac_header_dirent=no
5424 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5425   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
5427 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5428 if eval \${$as_ac_Header+:} false; then :
5429   $as_echo_n "(cached) " >&6
5430 else
5431   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5432 /* end confdefs.h.  */
5433 #include <sys/types.h>
5434 #include <$ac_hdr>
5435
5436 int
5437 main ()
5438 {
5439 if ((DIR *) 0)
5440 return 0;
5441   ;
5442   return 0;
5443 }
5444 _ACEOF
5445 if ac_fn_c_try_compile "$LINENO"; then :
5446   eval "$as_ac_Header=yes"
5447 else
5448   eval "$as_ac_Header=no"
5449 fi
5450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5451 fi
5452 eval ac_res=\$$as_ac_Header
5453                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5454 $as_echo "$ac_res" >&6; }
5455 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5456   cat >>confdefs.h <<_ACEOF
5457 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5458 _ACEOF
5459
5460 ac_header_dirent=$ac_hdr; break
5461 fi
5462
5463 done
5464 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5465 if test $ac_header_dirent = dirent.h; then
5466   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
5467 $as_echo_n "checking for library containing opendir... " >&6; }
5468 if ${ac_cv_search_opendir+:} false; then :
5469   $as_echo_n "(cached) " >&6
5470 else
5471   ac_func_search_save_LIBS=$LIBS
5472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5473 /* end confdefs.h.  */
5474
5475 /* Override any GCC internal prototype to avoid an error.
5476    Use char because int might match the return type of a GCC
5477    builtin and then its argument prototype would still apply.  */
5478 #ifdef __cplusplus
5479 extern "C"
5480 #endif
5481 char opendir ();
5482 int
5483 main ()
5484 {
5485 return opendir ();
5486   ;
5487   return 0;
5488 }
5489 _ACEOF
5490 for ac_lib in '' dir; do
5491   if test -z "$ac_lib"; then
5492     ac_res="none required"
5493   else
5494     ac_res=-l$ac_lib
5495     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5496   fi
5497   if ac_fn_c_try_link "$LINENO"; then :
5498   ac_cv_search_opendir=$ac_res
5499 fi
5500 rm -f core conftest.err conftest.$ac_objext \
5501     conftest$ac_exeext
5502   if ${ac_cv_search_opendir+:} false; then :
5503   break
5504 fi
5505 done
5506 if ${ac_cv_search_opendir+:} false; then :
5507
5508 else
5509   ac_cv_search_opendir=no
5510 fi
5511 rm conftest.$ac_ext
5512 LIBS=$ac_func_search_save_LIBS
5513 fi
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
5515 $as_echo "$ac_cv_search_opendir" >&6; }
5516 ac_res=$ac_cv_search_opendir
5517 if test "$ac_res" != no; then :
5518   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5519
5520 fi
5521
5522 else
5523   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
5524 $as_echo_n "checking for library containing opendir... " >&6; }
5525 if ${ac_cv_search_opendir+:} false; then :
5526   $as_echo_n "(cached) " >&6
5527 else
5528   ac_func_search_save_LIBS=$LIBS
5529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5530 /* end confdefs.h.  */
5531
5532 /* Override any GCC internal prototype to avoid an error.
5533    Use char because int might match the return type of a GCC
5534    builtin and then its argument prototype would still apply.  */
5535 #ifdef __cplusplus
5536 extern "C"
5537 #endif
5538 char opendir ();
5539 int
5540 main ()
5541 {
5542 return opendir ();
5543   ;
5544   return 0;
5545 }
5546 _ACEOF
5547 for ac_lib in '' x; do
5548   if test -z "$ac_lib"; then
5549     ac_res="none required"
5550   else
5551     ac_res=-l$ac_lib
5552     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5553   fi
5554   if ac_fn_c_try_link "$LINENO"; then :
5555   ac_cv_search_opendir=$ac_res
5556 fi
5557 rm -f core conftest.err conftest.$ac_objext \
5558     conftest$ac_exeext
5559   if ${ac_cv_search_opendir+:} false; then :
5560   break
5561 fi
5562 done
5563 if ${ac_cv_search_opendir+:} false; then :
5564
5565 else
5566   ac_cv_search_opendir=no
5567 fi
5568 rm conftest.$ac_ext
5569 LIBS=$ac_func_search_save_LIBS
5570 fi
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
5572 $as_echo "$ac_cv_search_opendir" >&6; }
5573 ac_res=$ac_cv_search_opendir
5574 if test "$ac_res" != no; then :
5575   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5576
5577 fi
5578
5579 fi
5580
5581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call gettimeofday" >&5
5582 $as_echo_n "checking how to call gettimeofday... " >&6; }
5583   if ${ac_cv_gettimeofday_args+:} false; then :
5584   $as_echo_n "(cached) " >&6
5585 else
5586   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5587 /* end confdefs.h.  */
5588 #include <stdlib.h>
5589                     #include <sys/time.h>
5590 int
5591 main ()
5592 {
5593 struct timeval tv; struct timezone tzp;
5594                     gettimeofday(&tv, &tzp);
5595   ;
5596   return 0;
5597 }
5598 _ACEOF
5599 if ac_fn_c_try_compile "$LINENO"; then :
5600   ac_gettimeofday_args=2
5601 else
5602   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5603 /* end confdefs.h.  */
5604 #include <stdlib.h>
5605                                     #include <sys/time.h>
5606 int
5607 main ()
5608 {
5609 struct timeval tv; gettimeofday(&tv);
5610   ;
5611   return 0;
5612 }
5613 _ACEOF
5614 if ac_fn_c_try_compile "$LINENO"; then :
5615   ac_gettimeofday_args=1
5616 else
5617   ac_gettimeofday_args=0
5618 fi
5619 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5620 fi
5621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5622     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5623 fi
5624
5625   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5626   if test "$ac_gettimeofday_args" = 1 ; then
5627     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5628
5629     { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
5630 $as_echo "one argument" >&6; }
5631   elif test "$ac_gettimeofday_args" = 2 ; then
5632     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5633
5634     $as_echo "#define GETTIMEOFDAY_TWO_ARGS 1" >>confdefs.h
5635
5636     { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
5637 $as_echo "two arguments" >&6; }
5638   else
5639     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
5640 $as_echo "unknown" >&6; }
5641   fi
5642
5643 # Check whether --enable-largefile was given.
5644 if test "${enable_largefile+set}" = set; then :
5645   enableval=$enable_largefile;
5646 fi
5647
5648 if test "$enable_largefile" != no; then
5649
5650   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5651 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5652 if ${ac_cv_sys_largefile_CC+:} false; then :
5653   $as_echo_n "(cached) " >&6
5654 else
5655   ac_cv_sys_largefile_CC=no
5656      if test "$GCC" != yes; then
5657        ac_save_CC=$CC
5658        while :; do
5659          # IRIX 6.2 and later do not support large files by default,
5660          # so use the C compiler's -n32 option if that helps.
5661          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5662 /* end confdefs.h.  */
5663 #include <sys/types.h>
5664  /* Check that off_t can represent 2**63 - 1 correctly.
5665     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5666     since some C++ compilers masquerading as C compilers
5667     incorrectly reject 9223372036854775807.  */
5668 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5669   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5670                        && LARGE_OFF_T % 2147483647 == 1)
5671                       ? 1 : -1];
5672 int
5673 main ()
5674 {
5675
5676   ;
5677   return 0;
5678 }
5679 _ACEOF
5680          if ac_fn_c_try_compile "$LINENO"; then :
5681   break
5682 fi
5683 rm -f core conftest.err conftest.$ac_objext
5684          CC="$CC -n32"
5685          if ac_fn_c_try_compile "$LINENO"; then :
5686   ac_cv_sys_largefile_CC=' -n32'; break
5687 fi
5688 rm -f core conftest.err conftest.$ac_objext
5689          break
5690        done
5691        CC=$ac_save_CC
5692        rm -rf conftest.$ac_ext
5693     fi
5694 fi
5695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5696 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5697   if test "$ac_cv_sys_largefile_CC" != no; then
5698     CC=$CC$ac_cv_sys_largefile_CC
5699   fi
5700
5701   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5702 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5703 if ${ac_cv_sys_file_offset_bits+:} false; then :
5704   $as_echo_n "(cached) " >&6
5705 else
5706   while :; do
5707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5708 /* end confdefs.h.  */
5709 #include <sys/types.h>
5710  /* Check that off_t can represent 2**63 - 1 correctly.
5711     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5712     since some C++ compilers masquerading as C compilers
5713     incorrectly reject 9223372036854775807.  */
5714 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5715   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5716                        && LARGE_OFF_T % 2147483647 == 1)
5717                       ? 1 : -1];
5718 int
5719 main ()
5720 {
5721
5722   ;
5723   return 0;
5724 }
5725 _ACEOF
5726 if ac_fn_c_try_compile "$LINENO"; then :
5727   ac_cv_sys_file_offset_bits=no; break
5728 fi
5729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5731 /* end confdefs.h.  */
5732 #define _FILE_OFFSET_BITS 64
5733 #include <sys/types.h>
5734  /* Check that off_t can represent 2**63 - 1 correctly.
5735     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5736     since some C++ compilers masquerading as C compilers
5737     incorrectly reject 9223372036854775807.  */
5738 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5739   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5740                        && LARGE_OFF_T % 2147483647 == 1)
5741                       ? 1 : -1];
5742 int
5743 main ()
5744 {
5745
5746   ;
5747   return 0;
5748 }
5749 _ACEOF
5750 if ac_fn_c_try_compile "$LINENO"; then :
5751   ac_cv_sys_file_offset_bits=64; break
5752 fi
5753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5754   ac_cv_sys_file_offset_bits=unknown
5755   break
5756 done
5757 fi
5758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5759 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5760 case $ac_cv_sys_file_offset_bits in #(
5761   no | unknown) ;;
5762   *)
5763 cat >>confdefs.h <<_ACEOF
5764 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5765 _ACEOF
5766 ;;
5767 esac
5768 rm -rf conftest*
5769   if test $ac_cv_sys_file_offset_bits = unknown; then
5770     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5771 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5772 if ${ac_cv_sys_large_files+:} false; then :
5773   $as_echo_n "(cached) " >&6
5774 else
5775   while :; do
5776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5777 /* end confdefs.h.  */
5778 #include <sys/types.h>
5779  /* Check that off_t can represent 2**63 - 1 correctly.
5780     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5781     since some C++ compilers masquerading as C compilers
5782     incorrectly reject 9223372036854775807.  */
5783 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5784   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5785                        && LARGE_OFF_T % 2147483647 == 1)
5786                       ? 1 : -1];
5787 int
5788 main ()
5789 {
5790
5791   ;
5792   return 0;
5793 }
5794 _ACEOF
5795 if ac_fn_c_try_compile "$LINENO"; then :
5796   ac_cv_sys_large_files=no; break
5797 fi
5798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5800 /* end confdefs.h.  */
5801 #define _LARGE_FILES 1
5802 #include <sys/types.h>
5803  /* Check that off_t can represent 2**63 - 1 correctly.
5804     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5805     since some C++ compilers masquerading as C compilers
5806     incorrectly reject 9223372036854775807.  */
5807 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5808   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5809                        && LARGE_OFF_T % 2147483647 == 1)
5810                       ? 1 : -1];
5811 int
5812 main ()
5813 {
5814
5815   ;
5816   return 0;
5817 }
5818 _ACEOF
5819 if ac_fn_c_try_compile "$LINENO"; then :
5820   ac_cv_sys_large_files=1; break
5821 fi
5822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5823   ac_cv_sys_large_files=unknown
5824   break
5825 done
5826 fi
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5828 $as_echo "$ac_cv_sys_large_files" >&6; }
5829 case $ac_cv_sys_large_files in #(
5830   no | unknown) ;;
5831   *)
5832 cat >>confdefs.h <<_ACEOF
5833 #define _LARGE_FILES $ac_cv_sys_large_files
5834 _ACEOF
5835 ;;
5836 esac
5837 rm -rf conftest*
5838   fi
5839
5840
5841 fi
5842
5843 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5844 do :
5845   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5846 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5847 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5848   cat >>confdefs.h <<_ACEOF
5849 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5850 _ACEOF
5851
5852 fi
5853 done
5854
5855 for ac_func in sigaction syslog realpath setrlimit
5856 do :
5857   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5858 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5859 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5860   cat >>confdefs.h <<_ACEOF
5861 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5862 _ACEOF
5863
5864 fi
5865 done
5866
5867 for ac_func in setlocale sqrtf
5868 do :
5869   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5870 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5871 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5872   cat >>confdefs.h <<_ACEOF
5873 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5874 _ACEOF
5875
5876 fi
5877 done
5878
5879 for ac_func in getaddrinfo
5880 do :
5881   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
5882 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
5883   cat >>confdefs.h <<_ACEOF
5884 #define HAVE_GETADDRINFO 1
5885 _ACEOF
5886
5887 fi
5888 done
5889
5890 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
5891 "
5892 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
5893
5894 cat >>confdefs.h <<_ACEOF
5895 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
5896 _ACEOF
5897
5898
5899 fi
5900
5901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmp" >&5
5902 $as_echo_n "checking for struct icmp... " >&6; }
5903 if ${ac_cv_have_icmp+:} false; then :
5904   $as_echo_n "(cached) " >&6
5905 else
5906   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5907 /* end confdefs.h.  */
5908 #include <stdlib.h>
5909                    #include <stdio.h>
5910                    #include <math.h>
5911                    #include <unistd.h>
5912                    #include <limits.h>
5913                    #include <signal.h>
5914                    #include <fcntl.h>
5915                    #include <sys/types.h>
5916                    #include <sys/time.h>
5917                    #include <sys/ipc.h>
5918                    #include <sys/shm.h>
5919                    #include <sys/socket.h>
5920                    #include <netinet/in_systm.h>
5921                    #include <netinet/in.h>
5922                    #include <netinet/ip.h>
5923                    #include <netinet/ip_icmp.h>
5924                    #include <netinet/udp.h>
5925                    #include <arpa/inet.h>
5926                    #include <netdb.h>
5927 int
5928 main ()
5929 {
5930 struct icmp i;
5931                    struct sockaddr s;
5932                    struct sockaddr_in si;
5933                    struct ip ip;
5934                    i.icmp_type = ICMP_ECHO;
5935                    i.icmp_code = 0;
5936                    i.icmp_cksum = 0;
5937                    i.icmp_id = 0;
5938                    i.icmp_seq = 0;
5939                    si.sin_family = AF_INET;
5940                    #if defined(__DECC) || defined(_IP_VHL)
5941                    ip.ip_vhl = 0;
5942                    #else
5943                    ip.ip_hl = 0;
5944                    #endif
5945
5946   ;
5947   return 0;
5948 }
5949 _ACEOF
5950 if ac_fn_c_try_compile "$LINENO"; then :
5951   ac_cv_have_icmp=yes
5952 else
5953   ac_cv_have_icmp=no
5954 fi
5955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5956 fi
5957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmp" >&5
5958 $as_echo "$ac_cv_have_icmp" >&6; }
5959  if test "$ac_cv_have_icmp" = yes ; then
5960    $as_echo "#define HAVE_ICMP 1" >>confdefs.h
5961
5962  fi
5963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmphdr" >&5
5964 $as_echo_n "checking for struct icmphdr... " >&6; }
5965 if ${ac_cv_have_icmphdr+:} false; then :
5966   $as_echo_n "(cached) " >&6
5967 else
5968   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5969 /* end confdefs.h.  */
5970 #include <stdlib.h>
5971                    #include <stdio.h>
5972                    #include <math.h>
5973                    #include <unistd.h>
5974                    #include <limits.h>
5975                    #include <signal.h>
5976                    #include <fcntl.h>
5977                    #include <sys/types.h>
5978                    #include <sys/time.h>
5979                    #include <sys/ipc.h>
5980                    #include <sys/shm.h>
5981                    #include <sys/socket.h>
5982                    #include <netinet/in_systm.h>
5983                    #include <netinet/in.h>
5984                    #include <netinet/ip.h>
5985                    #include <netinet/ip_icmp.h>
5986                    #include <netinet/udp.h>
5987                    #include <arpa/inet.h>
5988                    #include <netdb.h>
5989 int
5990 main ()
5991 {
5992 struct icmphdr i;
5993                    struct sockaddr s;
5994                    struct sockaddr_in si;
5995                    struct ip ip;
5996                    i.type = ICMP_ECHO;
5997                    i.code = 0;
5998                    i.checksum = 0;
5999                    i.un.echo.id = 0;
6000                    i.un.echo.sequence = 0;
6001                    si.sin_family = AF_INET;
6002                    ip.ip_hl = 0;
6003   ;
6004   return 0;
6005 }
6006 _ACEOF
6007 if ac_fn_c_try_compile "$LINENO"; then :
6008   ac_cv_have_icmphdr=yes
6009 else
6010   ac_cv_have_icmphdr=no
6011 fi
6012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6013 fi
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmphdr" >&5
6015 $as_echo "$ac_cv_have_icmphdr" >&6; }
6016  if test "$ac_cv_have_icmphdr" = yes ; then
6017    $as_echo "#define HAVE_ICMPHDR 1" >>confdefs.h
6018
6019  fi
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs" >&5
6021 $as_echo_n "checking for getifaddrs... " >&6; }
6022 if ${ac_cv_have_getifaddrs+:} false; then :
6023   $as_echo_n "(cached) " >&6
6024 else
6025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6026 /* end confdefs.h.  */
6027 #include <stdlib.h>
6028                    #include <unistd.h>
6029                    #include <arpa/inet.h>
6030                    #include <ifaddrs.h>
6031 int
6032 main ()
6033 {
6034 struct ifaddrs *ifa;
6035                    getifaddrs (&ifa);
6036                    ifa->ifa_next = 0;
6037                    ifa->ifa_addr->sa_family = 0;
6038   ;
6039   return 0;
6040 }
6041 _ACEOF
6042 if ac_fn_c_try_compile "$LINENO"; then :
6043   ac_cv_have_getifaddrs=yes
6044 else
6045   ac_cv_have_getifaddrs=no
6046 fi
6047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6048 fi
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getifaddrs" >&5
6050 $as_echo "$ac_cv_have_getifaddrs" >&6; }
6051  if test "$ac_cv_have_getifaddrs" = yes ; then
6052    $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
6053
6054  fi
6055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
6056 $as_echo_n "checking for socklen_t... " >&6; }
6057 if ${ac_cv_type_socklen_t+:} false; then :
6058   $as_echo_n "(cached) " >&6
6059 else
6060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6061 /* end confdefs.h.  */
6062
6063    #include <sys/types.h>
6064    #include <sys/socket.h>
6065 int
6066 main ()
6067 {
6068
6069    socklen_t socklen;
6070
6071   ;
6072   return 0;
6073 }
6074 _ACEOF
6075 if ac_fn_c_try_compile "$LINENO"; then :
6076   ac_cv_type_socklen_t=yes
6077 else
6078   ac_cv_type_socklen_t=no
6079 fi
6080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6081 fi
6082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_socklen_t" >&5
6083 $as_echo "$ac_cv_type_socklen_t" >&6; }
6084   if test "$ac_cv_type_socklen_t" != yes; then
6085
6086 $as_echo "#define socklen_t int" >>confdefs.h
6087
6088   fi
6089 for ac_header in crypt.h sys/select.h
6090 do :
6091   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6092 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6093 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6094   cat >>confdefs.h <<_ACEOF
6095 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6096 _ACEOF
6097
6098 fi
6099
6100 done
6101
6102 for ac_prog in perl5 perl
6103 do
6104   # Extract the first word of "$ac_prog", so it can be a program name with args.
6105 set dummy $ac_prog; ac_word=$2
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6107 $as_echo_n "checking for $ac_word... " >&6; }
6108 if ${ac_cv_path_PERL+:} false; then :
6109   $as_echo_n "(cached) " >&6
6110 else
6111   case $PERL in
6112   [\\/]* | ?:[\\/]*)
6113   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6114   ;;
6115   *)
6116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6117 for as_dir in $PATH
6118 do
6119   IFS=$as_save_IFS
6120   test -z "$as_dir" && as_dir=.
6121     for ac_exec_ext in '' $ac_executable_extensions; do
6122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6123     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6125     break 2
6126   fi
6127 done
6128   done
6129 IFS=$as_save_IFS
6130
6131   ;;
6132 esac
6133 fi
6134 PERL=$ac_cv_path_PERL
6135 if test -n "$PERL"; then
6136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
6137 $as_echo "$PERL" >&6; }
6138 else
6139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6140 $as_echo "no" >&6; }
6141 fi
6142
6143
6144   test -n "$PERL" && break
6145 done
6146
6147   if test -z "$PERL" ; then
6148     PERL_VERSION=0
6149   else
6150     { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5
6151 $as_echo_n "checking perl version... " >&6; }
6152 if ${ac_cv_perl_version+:} false; then :
6153   $as_echo_n "(cached) " >&6
6154 else
6155   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6156 fi
6157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_perl_version" >&5
6158 $as_echo "$ac_cv_perl_version" >&6; }
6159     PERL_VERSION=$ac_cv_perl_version
6160   fi
6161
6162
6163 if test -z "$PERL" ; then
6164   # don't let it be blank...
6165   PERL=/usr/bin/perl
6166 fi
6167
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
6169 $as_echo_n "checking for X... " >&6; }
6170
6171
6172 # Check whether --with-x was given.
6173 if test "${with_x+set}" = set; then :
6174   withval=$with_x;
6175 fi
6176
6177 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6178 if test "x$with_x" = xno; then
6179   # The user explicitly disabled X.
6180   have_x=disabled
6181 else
6182   case $x_includes,$x_libraries in #(
6183     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
6184     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
6185   $as_echo_n "(cached) " >&6
6186 else
6187   # One or both of the vars are not set, and there is no cached value.
6188 ac_x_includes=no ac_x_libraries=no
6189 rm -f -r conftest.dir
6190 if mkdir conftest.dir; then
6191   cd conftest.dir
6192   cat >Imakefile <<'_ACEOF'
6193 incroot:
6194         @echo incroot='${INCROOT}'
6195 usrlibdir:
6196         @echo usrlibdir='${USRLIBDIR}'
6197 libdir:
6198         @echo libdir='${LIBDIR}'
6199 _ACEOF
6200   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6201     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6202     for ac_var in incroot usrlibdir libdir; do
6203       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6204     done
6205     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6206     for ac_extension in a so sl dylib la dll; do
6207       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6208          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6209         ac_im_usrlibdir=$ac_im_libdir; break
6210       fi
6211     done
6212     # Screen out bogus values from the imake configuration.  They are
6213     # bogus both because they are the default anyway, and because
6214     # using them would break gcc on systems where it needs fixed includes.
6215     case $ac_im_incroot in
6216         /usr/include) ac_x_includes= ;;
6217         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6218     esac
6219     case $ac_im_usrlibdir in
6220         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6221         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6222     esac
6223   fi
6224   cd ..
6225   rm -f -r conftest.dir
6226 fi
6227
6228 # Standard set of common directories for X headers.
6229 # Check X11 before X11Rn because it is often a symlink to the current release.
6230 ac_x_header_dirs='
6231 /usr/X11/include
6232 /usr/X11R7/include
6233 /usr/X11R6/include
6234 /usr/X11R5/include
6235 /usr/X11R4/include
6236
6237 /usr/include/X11
6238 /usr/include/X11R7
6239 /usr/include/X11R6
6240 /usr/include/X11R5
6241 /usr/include/X11R4
6242
6243 /usr/local/X11/include
6244 /usr/local/X11R7/include
6245 /usr/local/X11R6/include
6246 /usr/local/X11R5/include
6247 /usr/local/X11R4/include
6248
6249 /usr/local/include/X11
6250 /usr/local/include/X11R7
6251 /usr/local/include/X11R6
6252 /usr/local/include/X11R5
6253 /usr/local/include/X11R4
6254
6255 /usr/X386/include
6256 /usr/x386/include
6257 /usr/XFree86/include/X11
6258
6259 /usr/include
6260 /usr/local/include
6261 /usr/unsupported/include
6262 /usr/athena/include
6263 /usr/local/x11r5/include
6264 /usr/lpp/Xamples/include
6265
6266 /usr/openwin/include
6267 /usr/openwin/share/include'
6268
6269 if test "$ac_x_includes" = no; then
6270   # Guess where to find include files, by looking for Xlib.h.
6271   # First, try using that file with no special directory specified.
6272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6273 /* end confdefs.h.  */
6274 #include <X11/Xlib.h>
6275 _ACEOF
6276 if ac_fn_c_try_cpp "$LINENO"; then :
6277   # We can compile using X headers with no special include directory.
6278 ac_x_includes=
6279 else
6280   for ac_dir in $ac_x_header_dirs; do
6281   if test -r "$ac_dir/X11/Xlib.h"; then
6282     ac_x_includes=$ac_dir
6283     break
6284   fi
6285 done
6286 fi
6287 rm -rf conftest.err conftest.i conftest.$ac_ext
6288 fi # $ac_x_includes = no
6289
6290 if test "$ac_x_libraries" = no; then
6291   # Check for the libraries.
6292   # See if we find them without any special options.
6293   # Don't add to $LIBS permanently.
6294   ac_save_LIBS=$LIBS
6295   LIBS="-lX11 $LIBS"
6296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6297 /* end confdefs.h.  */
6298 #include <X11/Xlib.h>
6299 int
6300 main ()
6301 {
6302 XrmInitialize ()
6303   ;
6304   return 0;
6305 }
6306 _ACEOF
6307 if ac_fn_c_try_link "$LINENO"; then :
6308   LIBS=$ac_save_LIBS
6309 # We can link X programs with no special library path.
6310 ac_x_libraries=
6311 else
6312   LIBS=$ac_save_LIBS
6313 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6314 do
6315   # Don't even attempt the hair of trying to link an X program!
6316   for ac_extension in a so sl dylib la dll; do
6317     if test -r "$ac_dir/libX11.$ac_extension"; then
6318       ac_x_libraries=$ac_dir
6319       break 2
6320     fi
6321   done
6322 done
6323 fi
6324 rm -f core conftest.err conftest.$ac_objext \
6325     conftest$ac_exeext conftest.$ac_ext
6326 fi # $ac_x_libraries = no
6327
6328 case $ac_x_includes,$ac_x_libraries in #(
6329   no,* | *,no | *\'*)
6330     # Didn't find X, or a directory has "'" in its name.
6331     ac_cv_have_x="have_x=no";; #(
6332   *)
6333     # Record where we found X for the cache.
6334     ac_cv_have_x="have_x=yes\
6335         ac_x_includes='$ac_x_includes'\
6336         ac_x_libraries='$ac_x_libraries'"
6337 esac
6338 fi
6339 ;; #(
6340     *) have_x=yes;;
6341   esac
6342   eval "$ac_cv_have_x"
6343 fi # $with_x != no
6344
6345 if test "$have_x" != yes; then
6346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
6347 $as_echo "$have_x" >&6; }
6348   no_x=yes
6349 else
6350   # If each of the values was on the command line, it overrides each guess.
6351   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6352   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6353   # Update the cache value to reflect the command line values.
6354   ac_cv_have_x="have_x=yes\
6355         ac_x_includes='$x_includes'\
6356         ac_x_libraries='$x_libraries'"
6357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
6358 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
6359 fi
6360
6361 if test "$no_x" = yes; then
6362   # Not all programs may use this symbol, but it does not hurt to define it.
6363
6364 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
6365
6366   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6367 else
6368   if test -n "$x_includes"; then
6369     X_CFLAGS="$X_CFLAGS -I$x_includes"
6370   fi
6371
6372   # It would also be nice to do this for all -L options, not just this one.
6373   if test -n "$x_libraries"; then
6374     X_LIBS="$X_LIBS -L$x_libraries"
6375     # For Solaris; some versions of Sun CC require a space after -R and
6376     # others require no space.  Words are not sufficient . . . .
6377     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
6378 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
6379     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6380     ac_xsave_c_werror_flag=$ac_c_werror_flag
6381     ac_c_werror_flag=yes
6382     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6383 /* end confdefs.h.  */
6384
6385 int
6386 main ()
6387 {
6388
6389   ;
6390   return 0;
6391 }
6392 _ACEOF
6393 if ac_fn_c_try_link "$LINENO"; then :
6394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6395 $as_echo "no" >&6; }
6396        X_LIBS="$X_LIBS -R$x_libraries"
6397 else
6398   LIBS="$ac_xsave_LIBS -R $x_libraries"
6399        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6400 /* end confdefs.h.  */
6401
6402 int
6403 main ()
6404 {
6405
6406   ;
6407   return 0;
6408 }
6409 _ACEOF
6410 if ac_fn_c_try_link "$LINENO"; then :
6411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6412 $as_echo "yes" >&6; }
6413           X_LIBS="$X_LIBS -R $x_libraries"
6414 else
6415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
6416 $as_echo "neither works" >&6; }
6417 fi
6418 rm -f core conftest.err conftest.$ac_objext \
6419     conftest$ac_exeext conftest.$ac_ext
6420 fi
6421 rm -f core conftest.err conftest.$ac_objext \
6422     conftest$ac_exeext conftest.$ac_ext
6423     ac_c_werror_flag=$ac_xsave_c_werror_flag
6424     LIBS=$ac_xsave_LIBS
6425   fi
6426
6427   # Check for system-dependent libraries X programs must link with.
6428   # Do this before checking for the system-independent R6 libraries
6429   # (-lICE), since we may need -lsocket or whatever for X linking.
6430
6431   if test "$ISC" = yes; then
6432     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6433   else
6434     # Martyn Johnson says this is needed for Ultrix, if the X
6435     # libraries were built with DECnet support.  And Karl Berry says
6436     # the Alpha needs dnet_stub (dnet does not exist).
6437     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6438     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6439 /* end confdefs.h.  */
6440
6441 /* Override any GCC internal prototype to avoid an error.
6442    Use char because int might match the return type of a GCC
6443    builtin and then its argument prototype would still apply.  */
6444 #ifdef __cplusplus
6445 extern "C"
6446 #endif
6447 char XOpenDisplay ();
6448 int
6449 main ()
6450 {
6451 return XOpenDisplay ();
6452   ;
6453   return 0;
6454 }
6455 _ACEOF
6456 if ac_fn_c_try_link "$LINENO"; then :
6457
6458 else
6459   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
6460 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
6461 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
6462   $as_echo_n "(cached) " >&6
6463 else
6464   ac_check_lib_save_LIBS=$LIBS
6465 LIBS="-ldnet  $LIBS"
6466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6467 /* end confdefs.h.  */
6468
6469 /* Override any GCC internal prototype to avoid an error.
6470    Use char because int might match the return type of a GCC
6471    builtin and then its argument prototype would still apply.  */
6472 #ifdef __cplusplus
6473 extern "C"
6474 #endif
6475 char dnet_ntoa ();
6476 int
6477 main ()
6478 {
6479 return dnet_ntoa ();
6480   ;
6481   return 0;
6482 }
6483 _ACEOF
6484 if ac_fn_c_try_link "$LINENO"; then :
6485   ac_cv_lib_dnet_dnet_ntoa=yes
6486 else
6487   ac_cv_lib_dnet_dnet_ntoa=no
6488 fi
6489 rm -f core conftest.err conftest.$ac_objext \
6490     conftest$ac_exeext conftest.$ac_ext
6491 LIBS=$ac_check_lib_save_LIBS
6492 fi
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6494 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6495 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
6496   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6497 fi
6498
6499     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6500       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
6501 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
6502 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
6503   $as_echo_n "(cached) " >&6
6504 else
6505   ac_check_lib_save_LIBS=$LIBS
6506 LIBS="-ldnet_stub  $LIBS"
6507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6508 /* end confdefs.h.  */
6509
6510 /* Override any GCC internal prototype to avoid an error.
6511    Use char because int might match the return type of a GCC
6512    builtin and then its argument prototype would still apply.  */
6513 #ifdef __cplusplus
6514 extern "C"
6515 #endif
6516 char dnet_ntoa ();
6517 int
6518 main ()
6519 {
6520 return dnet_ntoa ();
6521   ;
6522   return 0;
6523 }
6524 _ACEOF
6525 if ac_fn_c_try_link "$LINENO"; then :
6526   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6527 else
6528   ac_cv_lib_dnet_stub_dnet_ntoa=no
6529 fi
6530 rm -f core conftest.err conftest.$ac_objext \
6531     conftest$ac_exeext conftest.$ac_ext
6532 LIBS=$ac_check_lib_save_LIBS
6533 fi
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6535 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6536 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
6537   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6538 fi
6539
6540     fi
6541 fi
6542 rm -f core conftest.err conftest.$ac_objext \
6543     conftest$ac_exeext conftest.$ac_ext
6544     LIBS="$ac_xsave_LIBS"
6545
6546     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6547     # to get the SysV transport functions.
6548     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6549     # needs -lnsl.
6550     # The nsl library prevents programs from opening the X display
6551     # on Irix 5.2, according to T.E. Dickey.
6552     # The functions gethostbyname, getservbyname, and inet_addr are
6553     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6554     ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
6555 if test "x$ac_cv_func_gethostbyname" = xyes; then :
6556
6557 fi
6558
6559     if test $ac_cv_func_gethostbyname = no; then
6560       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
6561 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
6562 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
6563   $as_echo_n "(cached) " >&6
6564 else
6565   ac_check_lib_save_LIBS=$LIBS
6566 LIBS="-lnsl  $LIBS"
6567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6568 /* end confdefs.h.  */
6569
6570 /* Override any GCC internal prototype to avoid an error.
6571    Use char because int might match the return type of a GCC
6572    builtin and then its argument prototype would still apply.  */
6573 #ifdef __cplusplus
6574 extern "C"
6575 #endif
6576 char gethostbyname ();
6577 int
6578 main ()
6579 {
6580 return gethostbyname ();
6581   ;
6582   return 0;
6583 }
6584 _ACEOF
6585 if ac_fn_c_try_link "$LINENO"; then :
6586   ac_cv_lib_nsl_gethostbyname=yes
6587 else
6588   ac_cv_lib_nsl_gethostbyname=no
6589 fi
6590 rm -f core conftest.err conftest.$ac_objext \
6591     conftest$ac_exeext conftest.$ac_ext
6592 LIBS=$ac_check_lib_save_LIBS
6593 fi
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
6595 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
6596 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
6597   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6598 fi
6599
6600       if test $ac_cv_lib_nsl_gethostbyname = no; then
6601         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
6602 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
6603 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
6604   $as_echo_n "(cached) " >&6
6605 else
6606   ac_check_lib_save_LIBS=$LIBS
6607 LIBS="-lbsd  $LIBS"
6608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6609 /* end confdefs.h.  */
6610
6611 /* Override any GCC internal prototype to avoid an error.
6612    Use char because int might match the return type of a GCC
6613    builtin and then its argument prototype would still apply.  */
6614 #ifdef __cplusplus
6615 extern "C"
6616 #endif
6617 char gethostbyname ();
6618 int
6619 main ()
6620 {
6621 return gethostbyname ();
6622   ;
6623   return 0;
6624 }
6625 _ACEOF
6626 if ac_fn_c_try_link "$LINENO"; then :
6627   ac_cv_lib_bsd_gethostbyname=yes
6628 else
6629   ac_cv_lib_bsd_gethostbyname=no
6630 fi
6631 rm -f core conftest.err conftest.$ac_objext \
6632     conftest$ac_exeext conftest.$ac_ext
6633 LIBS=$ac_check_lib_save_LIBS
6634 fi
6635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
6636 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
6637 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
6638   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6639 fi
6640
6641       fi
6642     fi
6643
6644     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6645     # socket/setsockopt and other routines are undefined under SCO ODT
6646     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6647     # on later versions), says Simon Leinen: it contains gethostby*
6648     # variants that don't use the name server (or something).  -lsocket
6649     # must be given before -lnsl if both are needed.  We assume that
6650     # if connect needs -lnsl, so does gethostbyname.
6651     ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
6652 if test "x$ac_cv_func_connect" = xyes; then :
6653
6654 fi
6655
6656     if test $ac_cv_func_connect = no; then
6657       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
6658 $as_echo_n "checking for connect in -lsocket... " >&6; }
6659 if ${ac_cv_lib_socket_connect+:} false; then :
6660   $as_echo_n "(cached) " >&6
6661 else
6662   ac_check_lib_save_LIBS=$LIBS
6663 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6665 /* end confdefs.h.  */
6666
6667 /* Override any GCC internal prototype to avoid an error.
6668    Use char because int might match the return type of a GCC
6669    builtin and then its argument prototype would still apply.  */
6670 #ifdef __cplusplus
6671 extern "C"
6672 #endif
6673 char connect ();
6674 int
6675 main ()
6676 {
6677 return connect ();
6678   ;
6679   return 0;
6680 }
6681 _ACEOF
6682 if ac_fn_c_try_link "$LINENO"; then :
6683   ac_cv_lib_socket_connect=yes
6684 else
6685   ac_cv_lib_socket_connect=no
6686 fi
6687 rm -f core conftest.err conftest.$ac_objext \
6688     conftest$ac_exeext conftest.$ac_ext
6689 LIBS=$ac_check_lib_save_LIBS
6690 fi
6691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
6692 $as_echo "$ac_cv_lib_socket_connect" >&6; }
6693 if test "x$ac_cv_lib_socket_connect" = xyes; then :
6694   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6695 fi
6696
6697     fi
6698
6699     # Guillermo Gomez says -lposix is necessary on A/UX.
6700     ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
6701 if test "x$ac_cv_func_remove" = xyes; then :
6702
6703 fi
6704
6705     if test $ac_cv_func_remove = no; then
6706       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
6707 $as_echo_n "checking for remove in -lposix... " >&6; }
6708 if ${ac_cv_lib_posix_remove+:} false; then :
6709   $as_echo_n "(cached) " >&6
6710 else
6711   ac_check_lib_save_LIBS=$LIBS
6712 LIBS="-lposix  $LIBS"
6713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6714 /* end confdefs.h.  */
6715
6716 /* Override any GCC internal prototype to avoid an error.
6717    Use char because int might match the return type of a GCC
6718    builtin and then its argument prototype would still apply.  */
6719 #ifdef __cplusplus
6720 extern "C"
6721 #endif
6722 char remove ();
6723 int
6724 main ()
6725 {
6726 return remove ();
6727   ;
6728   return 0;
6729 }
6730 _ACEOF
6731 if ac_fn_c_try_link "$LINENO"; then :
6732   ac_cv_lib_posix_remove=yes
6733 else
6734   ac_cv_lib_posix_remove=no
6735 fi
6736 rm -f core conftest.err conftest.$ac_objext \
6737     conftest$ac_exeext conftest.$ac_ext
6738 LIBS=$ac_check_lib_save_LIBS
6739 fi
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
6741 $as_echo "$ac_cv_lib_posix_remove" >&6; }
6742 if test "x$ac_cv_lib_posix_remove" = xyes; then :
6743   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6744 fi
6745
6746     fi
6747
6748     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6749     ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
6750 if test "x$ac_cv_func_shmat" = xyes; then :
6751
6752 fi
6753
6754     if test $ac_cv_func_shmat = no; then
6755       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
6756 $as_echo_n "checking for shmat in -lipc... " >&6; }
6757 if ${ac_cv_lib_ipc_shmat+:} false; then :
6758   $as_echo_n "(cached) " >&6
6759 else
6760   ac_check_lib_save_LIBS=$LIBS
6761 LIBS="-lipc  $LIBS"
6762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6763 /* end confdefs.h.  */
6764
6765 /* Override any GCC internal prototype to avoid an error.
6766    Use char because int might match the return type of a GCC
6767    builtin and then its argument prototype would still apply.  */
6768 #ifdef __cplusplus
6769 extern "C"
6770 #endif
6771 char shmat ();
6772 int
6773 main ()
6774 {
6775 return shmat ();
6776   ;
6777   return 0;
6778 }
6779 _ACEOF
6780 if ac_fn_c_try_link "$LINENO"; then :
6781   ac_cv_lib_ipc_shmat=yes
6782 else
6783   ac_cv_lib_ipc_shmat=no
6784 fi
6785 rm -f core conftest.err conftest.$ac_objext \
6786     conftest$ac_exeext conftest.$ac_ext
6787 LIBS=$ac_check_lib_save_LIBS
6788 fi
6789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
6790 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
6791 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
6792   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6793 fi
6794
6795     fi
6796   fi
6797
6798   # Check for libraries that X11R6 Xt/Xaw programs need.
6799   ac_save_LDFLAGS=$LDFLAGS
6800   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6801   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6802   # check for ICE first), but we must link in the order -lSM -lICE or
6803   # we get undefined symbols.  So assume we have SM if we have ICE.
6804   # These have to be linked with before -lX11, unlike the other
6805   # libraries we check for below, so use a different variable.
6806   # John Interrante, Karl Berry
6807   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
6808 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
6809 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
6810   $as_echo_n "(cached) " >&6
6811 else
6812   ac_check_lib_save_LIBS=$LIBS
6813 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6815 /* end confdefs.h.  */
6816
6817 /* Override any GCC internal prototype to avoid an error.
6818    Use char because int might match the return type of a GCC
6819    builtin and then its argument prototype would still apply.  */
6820 #ifdef __cplusplus
6821 extern "C"
6822 #endif
6823 char IceConnectionNumber ();
6824 int
6825 main ()
6826 {
6827 return IceConnectionNumber ();
6828   ;
6829   return 0;
6830 }
6831 _ACEOF
6832 if ac_fn_c_try_link "$LINENO"; then :
6833   ac_cv_lib_ICE_IceConnectionNumber=yes
6834 else
6835   ac_cv_lib_ICE_IceConnectionNumber=no
6836 fi
6837 rm -f core conftest.err conftest.$ac_objext \
6838     conftest$ac_exeext conftest.$ac_ext
6839 LIBS=$ac_check_lib_save_LIBS
6840 fi
6841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6842 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
6843 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
6844   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6845 fi
6846
6847   LDFLAGS=$ac_save_LDFLAGS
6848
6849 fi
6850
6851
6852 if test "$have_x" != yes; then
6853   as_fn_error $? "Couldn't find X11 headers/libs.  Try \`$0 --help'." "$LINENO" 5
6854 fi
6855
6856
6857     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X app-defaults directory" >&5
6858 $as_echo_n "checking for X app-defaults directory... " >&6; }
6859 if ${ac_cv_x_app_defaults+:} false; then :
6860   $as_echo_n "(cached) " >&6
6861 else
6862   # skip this, it's always wrong these days.
6863       #  AC_PATH_X_APP_DEFAULTS_XMKMF
6864       if test x"$ac_x_app_defaults" = x; then
6865         true
6866   # Look for the directory under a standard set of common directories.
6867   # Check X11 before X11Rn because it's often a symlink to the current release.
6868   for ac_dir in                                 \
6869                                                 \
6870     /usr/share/X11/app-defaults                 \
6871                                                 \
6872     /usr/X11/lib/app-defaults                   \
6873     /usr/X11R6/lib/app-defaults                 \
6874     /usr/X11R6/lib/X11/app-defaults             \
6875     /usr/X11R5/lib/app-defaults                 \
6876     /usr/X11R5/lib/X11/app-defaults             \
6877     /usr/X11R4/lib/app-defaults                 \
6878     /usr/X11R4/lib/X11/app-defaults             \
6879                                                 \
6880     /usr/lib/X11/app-defaults                   \
6881     /usr/lib/X11R6/app-defaults                 \
6882     /usr/lib/X11R5/app-defaults                 \
6883     /usr/lib/X11R4/app-defaults                 \
6884                                                 \
6885     /etc/X11/app-defaults                       \
6886                                                 \
6887     /usr/local/X11/lib/app-defaults             \
6888     /usr/local/X11R6/lib/app-defaults           \
6889     /usr/local/X11R5/lib/app-defaults           \
6890     /usr/local/X11R4/lib/app-defaults           \
6891                                                 \
6892     /usr/local/lib/X11/app-defaults             \
6893     /usr/local/lib/X11R6/app-defaults           \
6894     /usr/local/lib/X11R6/X11/app-defaults       \
6895     /usr/local/lib/X11R5/app-defaults           \
6896     /usr/local/lib/X11R5/X11/app-defaults       \
6897     /usr/local/lib/X11R4/app-defaults           \
6898     /usr/local/lib/X11R4/X11/app-defaults       \
6899                                                 \
6900     /usr/X386/lib/X11/app-defaults              \
6901     /usr/x386/lib/X11/app-defaults              \
6902     /usr/XFree86/lib/X11/app-defaults           \
6903                                                 \
6904     /usr/lib/X11/app-defaults                   \
6905     /usr/local/lib/X11/app-defaults             \
6906     /usr/unsupported/lib/X11/app-defaults       \
6907     /usr/athena/lib/X11/app-defaults            \
6908     /usr/local/x11r5/lib/X11/app-defaults       \
6909     /usr/lpp/Xamples/lib/X11/app-defaults       \
6910     /lib/usr/lib/X11/app-defaults               \
6911                                                 \
6912     /usr/openwin/lib/app-defaults               \
6913     /usr/openwin/lib/X11/app-defaults           \
6914     /usr/openwin/share/lib/app-defaults         \
6915     /usr/openwin/share/lib/X11/app-defaults     \
6916                                                 \
6917     /X11R6/lib/app-defaults                     \
6918     /X11R5/lib/app-defaults                     \
6919     /X11R4/lib/app-defaults                     \
6920     ; \
6921   do
6922     if test -d "$ac_dir"; then
6923       ac_x_app_defaults=$ac_dir
6924       break
6925     fi
6926   done
6927
6928       fi
6929       if test x"$ac_x_app_defaults" = x; then
6930         /bin/echo -n 'fallback: '
6931         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6932       else
6933         # Record where we found app-defaults for the cache.
6934         ac_cv_x_app_defaults="$ac_x_app_defaults"
6935       fi
6936 fi
6937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x_app_defaults" >&5
6938 $as_echo "$ac_cv_x_app_defaults" >&6; }
6939     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6940 case "$host" in
6941     *-hpux*)
6942
6943       # The following arcana was gleaned from conversations with
6944       # Eric Schwartz <erics@col.hp.com>:
6945       #
6946       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6947       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6948       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6949       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6950       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6951       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6952       # you don't need any -I or -L arguments.
6953       #
6954       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6955       # are the same division as 10.x.  However, there are no symlinks to
6956       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6957       # arguments are always necessary.
6958       #
6959       # However, X11R6 was available on HPUX 9.x as a patch: if that
6960       # patch was installed, then all of X11R6 went in to
6961       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6962       #
6963       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6964       # whether R5 was available as a patch; R6 undoubtedly was not.)
6965       #
6966       # So.  We try and use the highest numbered pair of
6967       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6968       # that are available.  We do not mix and match different versions
6969       # of X.
6970       #
6971       # Question I still don't know the answer to: (do you?)
6972       #
6973       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6974       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6975       #     that contrib directory?  Did it contain so-called "standard"
6976       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6977       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6978       #     be a situation where one had to reach into the R5 headers and
6979       #     libs to find Xmu?  That is, must both R6 and R5 directories
6980       #     be on the -I and -L lists in that case?
6981       #
6982       for version in X11R6 X11R5 X11R4 ; do
6983         # if either pair of directories exists...
6984         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6985         then
6986            # if contrib exists, use it...
6987            if test -d /usr/contrib/$version/include ; then
6988              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6989              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6990            fi
6991            # if the "standard" one exists, use it.
6992            if test -d /usr/include/$version ; then
6993              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6994              X_LIBS="$X_LIBS -L/usr/lib/$version"
6995            fi
6996            # since at least one of the pair exists, go no farther.
6997            break
6998         fi
6999       done
7000
7001       # Now find Motif.  Thanks for not making xmkmf find this by
7002       # default, you losers.
7003       #
7004       if test -d /usr/include/Motif2.1 ; then
7005         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7006         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7007       elif test -d /usr/include/Motif1.2 ; then
7008         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7009         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7010       elif test -d /usr/include/Motif1.1 ; then
7011         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7012         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7013       fi
7014
7015       # Now let's check for the pseudo-standard locations for OpenGL.
7016       #
7017       if test -d /opt/graphics/OpenGL/include ; then
7018         # HP-UX 10.20 puts it here
7019         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7020         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7021       elif test -d /opt/Mesa/lib ; then
7022         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
7023         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
7024       fi
7025
7026
7027       # On HPUX, default to installing in /opt/xscreensaver/ instead of
7028       # in /usr/local/, unless there is already an xscreensaver in
7029       # /usr/local/bin/.  This can be overridden with the --prefix arg
7030       # to configure.  I'm not sure this is the right thing to do, but
7031       # Richard Lloyd says so...
7032       #
7033       if test \! -x /usr/local/bin/xscreensaver ; then
7034         ac_default_prefix=/opt/xscreensaver
7035       fi
7036
7037     ;;
7038     *-solaris*)
7039
7040       # Thanks for not making xmkmf find this by default, pinheads.
7041       # And thanks for moving things around again, too.  Is this
7042       # really the standard location now?  What happened to the
7043       # joke that this kind of thing went in /opt?
7044       # cthomp says "answer: CDE (Common Disorganized Environment)"
7045       #
7046       if test -f /usr/dt/include/Xm/Xm.h ; then
7047         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7048         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7049
7050         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7051         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcmp in -lgen" >&5
7052 $as_echo_n "checking for regcmp in -lgen... " >&6; }
7053 if ${ac_cv_lib_gen_regcmp+:} false; then :
7054   $as_echo_n "(cached) " >&6
7055 else
7056   ac_check_lib_save_LIBS=$LIBS
7057 LIBS="-lgen  $LIBS"
7058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7059 /* end confdefs.h.  */
7060
7061 /* Override any GCC internal prototype to avoid an error.
7062    Use char because int might match the return type of a GCC
7063    builtin and then its argument prototype would still apply.  */
7064 #ifdef __cplusplus
7065 extern "C"
7066 #endif
7067 char regcmp ();
7068 int
7069 main ()
7070 {
7071 return regcmp ();
7072   ;
7073   return 0;
7074 }
7075 _ACEOF
7076 if ac_fn_c_try_link "$LINENO"; then :
7077   ac_cv_lib_gen_regcmp=yes
7078 else
7079   ac_cv_lib_gen_regcmp=no
7080 fi
7081 rm -f core conftest.err conftest.$ac_objext \
7082     conftest$ac_exeext conftest.$ac_ext
7083 LIBS=$ac_check_lib_save_LIBS
7084 fi
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_regcmp" >&5
7086 $as_echo "$ac_cv_lib_gen_regcmp" >&6; }
7087 if test "x$ac_cv_lib_gen_regcmp" = xyes; then :
7088   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7089 fi
7090
7091       fi
7092
7093     ;;
7094     *-darwin*)
7095
7096       # On MacOS X (10.x with "fink"), many things are under /sw/.
7097       #
7098       if test -d /sw/include ; then
7099         X_CFLAGS="-I/sw/include $X_CFLAGS"
7100         X_LIBS="-L/sw/lib $X_LIBS"
7101       fi
7102     ;;
7103   esac
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPointer" >&5
7105 $as_echo_n "checking for XPointer... " >&6; }
7106 if ${ac_cv_xpointer+:} false; then :
7107   $as_echo_n "(cached) " >&6
7108 else
7109
7110   ac_save_CPPFLAGS="$CPPFLAGS"
7111   if test \! -z "$includedir" ; then
7112     CPPFLAGS="$CPPFLAGS -I$includedir"
7113   fi
7114   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7115   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7116   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7117 /* end confdefs.h.  */
7118 #include <X11/Xlib.h>
7119 int
7120 main ()
7121 {
7122 XPointer foo = (XPointer) 0;
7123   ;
7124   return 0;
7125 }
7126 _ACEOF
7127 if ac_fn_c_try_compile "$LINENO"; then :
7128   ac_cv_xpointer=yes
7129 else
7130   ac_cv_xpointer=no
7131 fi
7132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7133   CPPFLAGS="$ac_save_CPPFLAGS"
7134 fi
7135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xpointer" >&5
7136 $as_echo "$ac_cv_xpointer" >&6; }
7137   if test "$ac_cv_xpointer" != yes; then
7138    $as_echo "#define XPointer char*" >>confdefs.h
7139
7140   fi
7141
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is MacOS X" >&5
7143 $as_echo_n "checking whether this is MacOS X... " >&6; }
7144   ac_macosx=no
7145   case "$host" in
7146     *-apple-darwin* )
7147       ac_macosx=yes
7148     ;;
7149   esac
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_macosx" >&5
7151 $as_echo "$ac_macosx" >&6; }
7152
7153
7154 ###############################################################################
7155 #
7156 #       Gettext support
7157 #
7158 ###############################################################################
7159
7160
7161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
7162 $as_echo_n "checking whether NLS is requested... " >&6; }
7163     # Check whether --enable-nls was given.
7164 if test "${enable_nls+set}" = set; then :
7165   enableval=$enable_nls; USE_NLS=$enableval
7166 else
7167   USE_NLS=yes
7168 fi
7169
7170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
7171 $as_echo "$USE_NLS" >&6; }
7172
7173
7174
7175
7176 case "$am__api_version" in
7177     1.01234)
7178         as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5
7179     ;;
7180     *)
7181     ;;
7182 esac
7183
7184 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7185 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
7186 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7187 if test -n ""; then
7188     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= " >&5
7189 $as_echo_n "checking for intltool >= ... " >&6; }
7190     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5
7191 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
7192     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
7193         as_fn_error $? "Your intltool is too old.  You need intltool  or later." "$LINENO" 5
7194 fi
7195
7196 # Extract the first word of "intltool-update", so it can be a program name with args.
7197 set dummy intltool-update; ac_word=$2
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7199 $as_echo_n "checking for $ac_word... " >&6; }
7200 if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then :
7201   $as_echo_n "(cached) " >&6
7202 else
7203   case $INTLTOOL_UPDATE in
7204   [\\/]* | ?:[\\/]*)
7205   ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
7206   ;;
7207   *)
7208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7209 for as_dir in $PATH
7210 do
7211   IFS=$as_save_IFS
7212   test -z "$as_dir" && as_dir=.
7213     for ac_exec_ext in '' $ac_executable_extensions; do
7214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7215     ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
7216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7217     break 2
7218   fi
7219 done
7220   done
7221 IFS=$as_save_IFS
7222
7223   ;;
7224 esac
7225 fi
7226 INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
7227 if test -n "$INTLTOOL_UPDATE"; then
7228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5
7229 $as_echo "$INTLTOOL_UPDATE" >&6; }
7230 else
7231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7232 $as_echo "no" >&6; }
7233 fi
7234
7235
7236 # Extract the first word of "intltool-merge", so it can be a program name with args.
7237 set dummy intltool-merge; ac_word=$2
7238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7239 $as_echo_n "checking for $ac_word... " >&6; }
7240 if ${ac_cv_path_INTLTOOL_MERGE+:} false; then :
7241   $as_echo_n "(cached) " >&6
7242 else
7243   case $INTLTOOL_MERGE in
7244   [\\/]* | ?:[\\/]*)
7245   ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
7246   ;;
7247   *)
7248   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7249 for as_dir in $PATH
7250 do
7251   IFS=$as_save_IFS
7252   test -z "$as_dir" && as_dir=.
7253     for ac_exec_ext in '' $ac_executable_extensions; do
7254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7255     ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
7256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7257     break 2
7258   fi
7259 done
7260   done
7261 IFS=$as_save_IFS
7262
7263   ;;
7264 esac
7265 fi
7266 INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
7267 if test -n "$INTLTOOL_MERGE"; then
7268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5
7269 $as_echo "$INTLTOOL_MERGE" >&6; }
7270 else
7271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7272 $as_echo "no" >&6; }
7273 fi
7274
7275
7276 # Extract the first word of "intltool-extract", so it can be a program name with args.
7277 set dummy intltool-extract; ac_word=$2
7278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7279 $as_echo_n "checking for $ac_word... " >&6; }
7280 if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then :
7281   $as_echo_n "(cached) " >&6
7282 else
7283   case $INTLTOOL_EXTRACT in
7284   [\\/]* | ?:[\\/]*)
7285   ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
7286   ;;
7287   *)
7288   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7289 for as_dir in $PATH
7290 do
7291   IFS=$as_save_IFS
7292   test -z "$as_dir" && as_dir=.
7293     for ac_exec_ext in '' $ac_executable_extensions; do
7294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7295     ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
7296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7297     break 2
7298   fi
7299 done
7300   done
7301 IFS=$as_save_IFS
7302
7303   ;;
7304 esac
7305 fi
7306 INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
7307 if test -n "$INTLTOOL_EXTRACT"; then
7308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5
7309 $as_echo "$INTLTOOL_EXTRACT" >&6; }
7310 else
7311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7312 $as_echo "no" >&6; }
7313 fi
7314
7315
7316 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
7317     as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5
7318 fi
7319
7320 if test -z "$AM_DEFAULT_VERBOSITY"; then
7321   AM_DEFAULT_VERBOSITY=1
7322 fi
7323
7324
7325 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
7326 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
7327 INTLTOOL__v_MERGE_0='@echo "  ITMRG " $@;'
7328
7329
7330
7331
7332 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
7333 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
7334 intltool__v_merge_options_0='-q'
7335
7336
7337
7338
7339   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 $< $@'
7340 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 $< $@'
7341      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 $< $@'
7342      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 $< $@'
7343       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 $< $@'
7344      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 $< $@'
7345    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 $< $@'
7346     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 $< $@'
7347 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 $< $@'
7348        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 $< $@'
7349       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 $< $@'
7350 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
7351       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 $< $@'
7352 else
7353       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'
7354 fi
7355       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 $< $@'
7356       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 $< $@'
7357     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 $< $@'
7358   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 $< $@'
7359     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 $< $@'
7360     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 $< $@'
7361    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 $< $@'
7362
7363
7364
7365
7366
7367
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 # Check the gettext tools to make sure they are GNU
7460 # Extract the first word of "xgettext", so it can be a program name with args.
7461 set dummy xgettext; ac_word=$2
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7463 $as_echo_n "checking for $ac_word... " >&6; }
7464 if ${ac_cv_path_XGETTEXT+:} false; then :
7465   $as_echo_n "(cached) " >&6
7466 else
7467   case $XGETTEXT in
7468   [\\/]* | ?:[\\/]*)
7469   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7470   ;;
7471   *)
7472   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7473 for as_dir in $PATH
7474 do
7475   IFS=$as_save_IFS
7476   test -z "$as_dir" && as_dir=.
7477     for ac_exec_ext in '' $ac_executable_extensions; do
7478   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7479     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
7480     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7481     break 2
7482   fi
7483 done
7484   done
7485 IFS=$as_save_IFS
7486
7487   ;;
7488 esac
7489 fi
7490 XGETTEXT=$ac_cv_path_XGETTEXT
7491 if test -n "$XGETTEXT"; then
7492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
7493 $as_echo "$XGETTEXT" >&6; }
7494 else
7495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7496 $as_echo "no" >&6; }
7497 fi
7498
7499
7500 # Extract the first word of "msgmerge", so it can be a program name with args.
7501 set dummy msgmerge; ac_word=$2
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7503 $as_echo_n "checking for $ac_word... " >&6; }
7504 if ${ac_cv_path_MSGMERGE+:} false; then :
7505   $as_echo_n "(cached) " >&6
7506 else
7507   case $MSGMERGE in
7508   [\\/]* | ?:[\\/]*)
7509   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
7510   ;;
7511   *)
7512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7513 for as_dir in $PATH
7514 do
7515   IFS=$as_save_IFS
7516   test -z "$as_dir" && as_dir=.
7517     for ac_exec_ext in '' $ac_executable_extensions; do
7518   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7519     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
7520     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7521     break 2
7522   fi
7523 done
7524   done
7525 IFS=$as_save_IFS
7526
7527   ;;
7528 esac
7529 fi
7530 MSGMERGE=$ac_cv_path_MSGMERGE
7531 if test -n "$MSGMERGE"; then
7532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
7533 $as_echo "$MSGMERGE" >&6; }
7534 else
7535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7536 $as_echo "no" >&6; }
7537 fi
7538
7539
7540 # Extract the first word of "msgfmt", so it can be a program name with args.
7541 set dummy msgfmt; ac_word=$2
7542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7543 $as_echo_n "checking for $ac_word... " >&6; }
7544 if ${ac_cv_path_MSGFMT+:} false; then :
7545   $as_echo_n "(cached) " >&6
7546 else
7547   case $MSGFMT in
7548   [\\/]* | ?:[\\/]*)
7549   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7550   ;;
7551   *)
7552   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7553 for as_dir in $PATH
7554 do
7555   IFS=$as_save_IFS
7556   test -z "$as_dir" && as_dir=.
7557     for ac_exec_ext in '' $ac_executable_extensions; do
7558   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7559     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
7560     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7561     break 2
7562   fi
7563 done
7564   done
7565 IFS=$as_save_IFS
7566
7567   ;;
7568 esac
7569 fi
7570 MSGFMT=$ac_cv_path_MSGFMT
7571 if test -n "$MSGFMT"; then
7572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
7573 $as_echo "$MSGFMT" >&6; }
7574 else
7575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7576 $as_echo "no" >&6; }
7577 fi
7578
7579
7580 # Extract the first word of "gmsgfmt", so it can be a program name with args.
7581 set dummy gmsgfmt; ac_word=$2
7582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7583 $as_echo_n "checking for $ac_word... " >&6; }
7584 if ${ac_cv_path_GMSGFMT+:} false; then :
7585   $as_echo_n "(cached) " >&6
7586 else
7587   case $GMSGFMT in
7588   [\\/]* | ?:[\\/]*)
7589   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7590   ;;
7591   *)
7592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7593 for as_dir in $PATH
7594 do
7595   IFS=$as_save_IFS
7596   test -z "$as_dir" && as_dir=.
7597     for ac_exec_ext in '' $ac_executable_extensions; do
7598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7599     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7601     break 2
7602   fi
7603 done
7604   done
7605 IFS=$as_save_IFS
7606
7607   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7608   ;;
7609 esac
7610 fi
7611 GMSGFMT=$ac_cv_path_GMSGFMT
7612 if test -n "$GMSGFMT"; then
7613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
7614 $as_echo "$GMSGFMT" >&6; }
7615 else
7616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7617 $as_echo "no" >&6; }
7618 fi
7619
7620
7621 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
7622     as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
7623 fi
7624 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
7625 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
7626 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
7627 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
7628     as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
7629 fi
7630
7631 # Substitute ALL_LINGUAS so we can use it in po/Makefile
7632
7633
7634
7635
7636
7637 GETTEXT_PACKAGE=xscreensaver
7638
7639 cat >>confdefs.h <<_ACEOF
7640 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7641 _ACEOF
7642
7643
7644 cat >>confdefs.h <<_ACEOF
7645 #define PACKAGE "$GETTEXT_PACKAGE"
7646 _ACEOF
7647
7648
7649
7650 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"
7651
7652    for ac_header in locale.h
7653 do :
7654   ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
7655 if test "x$ac_cv_header_locale_h" = xyes; then :
7656   cat >>confdefs.h <<_ACEOF
7657 #define HAVE_LOCALE_H 1
7658 _ACEOF
7659
7660 fi
7661
7662 done
7663
7664     if test $ac_cv_header_locale_h = yes; then
7665     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
7666 $as_echo_n "checking for LC_MESSAGES... " >&6; }
7667 if ${am_cv_val_LC_MESSAGES+:} false; then :
7668   $as_echo_n "(cached) " >&6
7669 else
7670   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7671 /* end confdefs.h.  */
7672 #include <locale.h>
7673 int
7674 main ()
7675 {
7676 return LC_MESSAGES
7677   ;
7678   return 0;
7679 }
7680 _ACEOF
7681 if ac_fn_c_try_link "$LINENO"; then :
7682   am_cv_val_LC_MESSAGES=yes
7683 else
7684   am_cv_val_LC_MESSAGES=no
7685 fi
7686 rm -f core conftest.err conftest.$ac_objext \
7687     conftest$ac_exeext conftest.$ac_ext
7688 fi
7689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
7690 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
7691     if test $am_cv_val_LC_MESSAGES = yes; then
7692
7693 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
7694
7695     fi
7696   fi
7697      USE_NLS=yes
7698
7699
7700     gt_cv_have_gettext=no
7701
7702     CATOBJEXT=NONE
7703     XGETTEXT=:
7704     INTLLIBS=
7705
7706
7707     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
7708 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
7709 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
7710   $as_echo_n "(cached) " >&6
7711 else
7712   gt_save_LIBS="$LIBS"
7713      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
7714      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7715 /* end confdefs.h.  */
7716 #include <CoreFoundation/CFPreferences.h>
7717 int
7718 main ()
7719 {
7720 CFPreferencesCopyAppValue(NULL, NULL)
7721   ;
7722   return 0;
7723 }
7724 _ACEOF
7725 if ac_fn_c_try_link "$LINENO"; then :
7726   gt_cv_func_CFPreferencesCopyAppValue=yes
7727 else
7728   gt_cv_func_CFPreferencesCopyAppValue=no
7729 fi
7730 rm -f core conftest.err conftest.$ac_objext \
7731     conftest$ac_exeext conftest.$ac_ext
7732      LIBS="$gt_save_LIBS"
7733 fi
7734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
7735 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
7736   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
7737
7738 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
7739
7740   fi
7741     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
7742 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
7743 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
7744   $as_echo_n "(cached) " >&6
7745 else
7746   gt_save_LIBS="$LIBS"
7747      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
7748      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7749 /* end confdefs.h.  */
7750 #include <CoreFoundation/CFLocale.h>
7751 int
7752 main ()
7753 {
7754 CFLocaleCopyCurrent();
7755   ;
7756   return 0;
7757 }
7758 _ACEOF
7759 if ac_fn_c_try_link "$LINENO"; then :
7760   gt_cv_func_CFLocaleCopyCurrent=yes
7761 else
7762   gt_cv_func_CFLocaleCopyCurrent=no
7763 fi
7764 rm -f core conftest.err conftest.$ac_objext \
7765     conftest$ac_exeext conftest.$ac_ext
7766      LIBS="$gt_save_LIBS"
7767 fi
7768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
7769 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
7770   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7771
7772 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
7773
7774   fi
7775   INTL_MACOSX_LIBS=
7776   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7777     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
7778   fi
7779
7780
7781
7782     ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
7783 if test "x$ac_cv_header_libintl_h" = xyes; then :
7784   gt_cv_func_dgettext_libintl="no"
7785       libintl_extra_libs=""
7786
7787       #
7788       # First check in libc
7789       #
7790       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
7791 $as_echo_n "checking for ngettext in libc... " >&6; }
7792 if ${gt_cv_func_ngettext_libc+:} false; then :
7793   $as_echo_n "(cached) " >&6
7794 else
7795   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7796 /* end confdefs.h.  */
7797
7798 #include <libintl.h>
7799
7800 int
7801 main ()
7802 {
7803 return !ngettext ("","", 1)
7804   ;
7805   return 0;
7806 }
7807 _ACEOF
7808 if ac_fn_c_try_link "$LINENO"; then :
7809   gt_cv_func_ngettext_libc=yes
7810 else
7811   gt_cv_func_ngettext_libc=no
7812 fi
7813 rm -f core conftest.err conftest.$ac_objext \
7814     conftest$ac_exeext conftest.$ac_ext
7815
7816 fi
7817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
7818 $as_echo "$gt_cv_func_ngettext_libc" >&6; }
7819
7820       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7821               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
7822 $as_echo_n "checking for dgettext in libc... " >&6; }
7823 if ${gt_cv_func_dgettext_libc+:} false; then :
7824   $as_echo_n "(cached) " >&6
7825 else
7826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7827 /* end confdefs.h.  */
7828
7829 #include <libintl.h>
7830
7831 int
7832 main ()
7833 {
7834 return !dgettext ("","")
7835   ;
7836   return 0;
7837 }
7838 _ACEOF
7839 if ac_fn_c_try_link "$LINENO"; then :
7840   gt_cv_func_dgettext_libc=yes
7841 else
7842   gt_cv_func_dgettext_libc=no
7843 fi
7844 rm -f core conftest.err conftest.$ac_objext \
7845     conftest$ac_exeext conftest.$ac_ext
7846
7847 fi
7848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
7849 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
7850       fi
7851
7852       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7853         for ac_func in bind_textdomain_codeset
7854 do :
7855   ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7856 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7857   cat >>confdefs.h <<_ACEOF
7858 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
7859 _ACEOF
7860
7861 fi
7862 done
7863
7864       fi
7865
7866       #
7867       # If we don't have everything we want, check in libintl
7868       #
7869       if test "$gt_cv_func_dgettext_libc" != "yes" \
7870          || test "$gt_cv_func_ngettext_libc" != "yes" \
7871          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7872
7873         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
7874 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
7875 if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
7876   $as_echo_n "(cached) " >&6
7877 else
7878   ac_check_lib_save_LIBS=$LIBS
7879 LIBS="-lintl  $LIBS"
7880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7881 /* end confdefs.h.  */
7882
7883 /* Override any GCC internal prototype to avoid an error.
7884    Use char because int might match the return type of a GCC
7885    builtin and then its argument prototype would still apply.  */
7886 #ifdef __cplusplus
7887 extern "C"
7888 #endif
7889 char bindtextdomain ();
7890 int
7891 main ()
7892 {
7893 return bindtextdomain ();
7894   ;
7895   return 0;
7896 }
7897 _ACEOF
7898 if ac_fn_c_try_link "$LINENO"; then :
7899   ac_cv_lib_intl_bindtextdomain=yes
7900 else
7901   ac_cv_lib_intl_bindtextdomain=no
7902 fi
7903 rm -f core conftest.err conftest.$ac_objext \
7904     conftest$ac_exeext conftest.$ac_ext
7905 LIBS=$ac_check_lib_save_LIBS
7906 fi
7907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
7908 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
7909 if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
7910   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
7911 $as_echo_n "checking for ngettext in -lintl... " >&6; }
7912 if ${ac_cv_lib_intl_ngettext+:} false; then :
7913   $as_echo_n "(cached) " >&6
7914 else
7915   ac_check_lib_save_LIBS=$LIBS
7916 LIBS="-lintl  $LIBS"
7917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7918 /* end confdefs.h.  */
7919
7920 /* Override any GCC internal prototype to avoid an error.
7921    Use char because int might match the return type of a GCC
7922    builtin and then its argument prototype would still apply.  */
7923 #ifdef __cplusplus
7924 extern "C"
7925 #endif
7926 char ngettext ();
7927 int
7928 main ()
7929 {
7930 return ngettext ();
7931   ;
7932   return 0;
7933 }
7934 _ACEOF
7935 if ac_fn_c_try_link "$LINENO"; then :
7936   ac_cv_lib_intl_ngettext=yes
7937 else
7938   ac_cv_lib_intl_ngettext=no
7939 fi
7940 rm -f core conftest.err conftest.$ac_objext \
7941     conftest$ac_exeext conftest.$ac_ext
7942 LIBS=$ac_check_lib_save_LIBS
7943 fi
7944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
7945 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
7946 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
7947   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
7948 $as_echo_n "checking for dgettext in -lintl... " >&6; }
7949 if ${ac_cv_lib_intl_dgettext+:} false; then :
7950   $as_echo_n "(cached) " >&6
7951 else
7952   ac_check_lib_save_LIBS=$LIBS
7953 LIBS="-lintl  $LIBS"
7954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7955 /* end confdefs.h.  */
7956
7957 /* Override any GCC internal prototype to avoid an error.
7958    Use char because int might match the return type of a GCC
7959    builtin and then its argument prototype would still apply.  */
7960 #ifdef __cplusplus
7961 extern "C"
7962 #endif
7963 char dgettext ();
7964 int
7965 main ()
7966 {
7967 return dgettext ();
7968   ;
7969   return 0;
7970 }
7971 _ACEOF
7972 if ac_fn_c_try_link "$LINENO"; then :
7973   ac_cv_lib_intl_dgettext=yes
7974 else
7975   ac_cv_lib_intl_dgettext=no
7976 fi
7977 rm -f core conftest.err conftest.$ac_objext \
7978     conftest$ac_exeext conftest.$ac_ext
7979 LIBS=$ac_check_lib_save_LIBS
7980 fi
7981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
7982 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
7983 if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
7984   gt_cv_func_dgettext_libintl=yes
7985 fi
7986
7987 fi
7988
7989 fi
7990
7991
7992         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7993           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
7994 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
7995           { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
7996 $as_echo "" >&6; }
7997           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
7998 $as_echo_n "checking for ngettext in -lintl... " >&6; }
7999 if ${ac_cv_lib_intl_ngettext+:} false; then :
8000   $as_echo_n "(cached) " >&6
8001 else
8002   ac_check_lib_save_LIBS=$LIBS
8003 LIBS="-lintl -liconv $LIBS"
8004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8005 /* end confdefs.h.  */
8006
8007 /* Override any GCC internal prototype to avoid an error.
8008    Use char because int might match the return type of a GCC
8009    builtin and then its argument prototype would still apply.  */
8010 #ifdef __cplusplus
8011 extern "C"
8012 #endif
8013 char ngettext ();
8014 int
8015 main ()
8016 {
8017 return ngettext ();
8018   ;
8019   return 0;
8020 }
8021 _ACEOF
8022 if ac_fn_c_try_link "$LINENO"; then :
8023   ac_cv_lib_intl_ngettext=yes
8024 else
8025   ac_cv_lib_intl_ngettext=no
8026 fi
8027 rm -f core conftest.err conftest.$ac_objext \
8028     conftest$ac_exeext conftest.$ac_ext
8029 LIBS=$ac_check_lib_save_LIBS
8030 fi
8031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
8032 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
8033 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
8034   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
8035 $as_echo_n "checking for dcgettext in -lintl... " >&6; }
8036 if ${ac_cv_lib_intl_dcgettext+:} false; then :
8037   $as_echo_n "(cached) " >&6
8038 else
8039   ac_check_lib_save_LIBS=$LIBS
8040 LIBS="-lintl -liconv $LIBS"
8041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8042 /* end confdefs.h.  */
8043
8044 /* Override any GCC internal prototype to avoid an error.
8045    Use char because int might match the return type of a GCC
8046    builtin and then its argument prototype would still apply.  */
8047 #ifdef __cplusplus
8048 extern "C"
8049 #endif
8050 char dcgettext ();
8051 int
8052 main ()
8053 {
8054 return dcgettext ();
8055   ;
8056   return 0;
8057 }
8058 _ACEOF
8059 if ac_fn_c_try_link "$LINENO"; then :
8060   ac_cv_lib_intl_dcgettext=yes
8061 else
8062   ac_cv_lib_intl_dcgettext=no
8063 fi
8064 rm -f core conftest.err conftest.$ac_objext \
8065     conftest$ac_exeext conftest.$ac_ext
8066 LIBS=$ac_check_lib_save_LIBS
8067 fi
8068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
8069 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
8070 if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
8071   gt_cv_func_dgettext_libintl=yes
8072                         libintl_extra_libs=-liconv
8073 else
8074   :
8075 fi
8076
8077 else
8078   :
8079 fi
8080
8081         fi
8082
8083         #
8084         # If we found libintl, then check in it for bind_textdomain_codeset();
8085         # we'll prefer libc if neither have bind_textdomain_codeset(),
8086         # and both have dgettext and ngettext
8087         #
8088         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
8089           glib_save_LIBS="$LIBS"
8090           LIBS="$LIBS -lintl $libintl_extra_libs"
8091           unset ac_cv_func_bind_textdomain_codeset
8092           for ac_func in bind_textdomain_codeset
8093 do :
8094   ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
8095 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
8096   cat >>confdefs.h <<_ACEOF
8097 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
8098 _ACEOF
8099
8100 fi
8101 done
8102
8103           LIBS="$glib_save_LIBS"
8104
8105           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
8106             gt_cv_func_dgettext_libc=no
8107           else
8108             if test "$gt_cv_func_dgettext_libc" = "yes" \
8109                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
8110               gt_cv_func_dgettext_libintl=no
8111             fi
8112           fi
8113         fi
8114       fi
8115
8116       if test "$gt_cv_func_dgettext_libc" = "yes" \
8117         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
8118         gt_cv_have_gettext=yes
8119       fi
8120
8121       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
8122         INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS"
8123       fi
8124
8125       if test "$gt_cv_have_gettext" = "yes"; then
8126
8127 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
8128
8129         # Extract the first word of "msgfmt", so it can be a program name with args.
8130 set dummy msgfmt; ac_word=$2
8131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8132 $as_echo_n "checking for $ac_word... " >&6; }
8133 if ${ac_cv_path_MSGFMT+:} false; then :
8134   $as_echo_n "(cached) " >&6
8135 else
8136   case "$MSGFMT" in
8137   /*)
8138   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8139   ;;
8140   *)
8141   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8142   for ac_dir in $PATH; do
8143     test -z "$ac_dir" && ac_dir=.
8144     if test -f $ac_dir/$ac_word; then
8145       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
8146         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
8147         break
8148       fi
8149     fi
8150   done
8151   IFS="$ac_save_ifs"
8152   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
8153   ;;
8154 esac
8155 fi
8156 MSGFMT="$ac_cv_path_MSGFMT"
8157 if test "$MSGFMT" != "no"; then
8158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
8159 $as_echo "$MSGFMT" >&6; }
8160 else
8161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8162 $as_echo "no" >&6; }
8163 fi
8164         if test "$MSGFMT" != "no"; then
8165           glib_save_LIBS="$LIBS"
8166           LIBS="$LIBS $INTLLIBS"
8167           for ac_func in dcgettext
8168 do :
8169   ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
8170 if test "x$ac_cv_func_dcgettext" = xyes; then :
8171   cat >>confdefs.h <<_ACEOF
8172 #define HAVE_DCGETTEXT 1
8173 _ACEOF
8174
8175 fi
8176 done
8177
8178           MSGFMT_OPTS=
8179           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
8180 $as_echo_n "checking if msgfmt accepts -c... " >&6; }
8181           cat >conftest.foo <<_ACEOF
8182
8183 msgid ""
8184 msgstr ""
8185 "Content-Type: text/plain; charset=UTF-8\n"
8186 "Project-Id-Version: test 1.0\n"
8187 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
8188 "Last-Translator: test <foo@bar.xx>\n"
8189 "Language-Team: C <LL@li.org>\n"
8190 "MIME-Version: 1.0\n"
8191 "Content-Transfer-Encoding: 8bit\n"
8192
8193 _ACEOF
8194 if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
8195   ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
8196   ac_status=$?
8197   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8198   test $ac_status = 0; }; then
8199   MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8200 $as_echo "yes" >&6; }
8201 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8202 $as_echo "no" >&6; }
8203 echo "$as_me: failed input was:" >&5
8204 sed 's/^/| /' conftest.foo >&5
8205 fi
8206
8207           # Extract the first word of "gmsgfmt", so it can be a program name with args.
8208 set dummy gmsgfmt; ac_word=$2
8209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8210 $as_echo_n "checking for $ac_word... " >&6; }
8211 if ${ac_cv_path_GMSGFMT+:} false; then :
8212   $as_echo_n "(cached) " >&6
8213 else
8214   case $GMSGFMT in
8215   [\\/]* | ?:[\\/]*)
8216   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8217   ;;
8218   *)
8219   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8220 for as_dir in $PATH
8221 do
8222   IFS=$as_save_IFS
8223   test -z "$as_dir" && as_dir=.
8224     for ac_exec_ext in '' $ac_executable_extensions; do
8225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8226     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8228     break 2
8229   fi
8230 done
8231   done
8232 IFS=$as_save_IFS
8233
8234   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8235   ;;
8236 esac
8237 fi
8238 GMSGFMT=$ac_cv_path_GMSGFMT
8239 if test -n "$GMSGFMT"; then
8240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
8241 $as_echo "$GMSGFMT" >&6; }
8242 else
8243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8244 $as_echo "no" >&6; }
8245 fi
8246
8247
8248           # Extract the first word of "xgettext", so it can be a program name with args.
8249 set dummy xgettext; ac_word=$2
8250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8251 $as_echo_n "checking for $ac_word... " >&6; }
8252 if ${ac_cv_path_XGETTEXT+:} false; then :
8253   $as_echo_n "(cached) " >&6
8254 else
8255   case "$XGETTEXT" in
8256   /*)
8257   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8258   ;;
8259   *)
8260   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8261   for ac_dir in $PATH; do
8262     test -z "$ac_dir" && ac_dir=.
8263     if test -f $ac_dir/$ac_word; then
8264       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8265         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8266         break
8267       fi
8268     fi
8269   done
8270   IFS="$ac_save_ifs"
8271   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8272   ;;
8273 esac
8274 fi
8275 XGETTEXT="$ac_cv_path_XGETTEXT"
8276 if test "$XGETTEXT" != ":"; then
8277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
8278 $as_echo "$XGETTEXT" >&6; }
8279 else
8280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8281 $as_echo "no" >&6; }
8282 fi
8283
8284           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8285 /* end confdefs.h.  */
8286
8287 int
8288 main ()
8289 {
8290 extern int _nl_msg_cat_cntr;
8291                          return _nl_msg_cat_cntr
8292   ;
8293   return 0;
8294 }
8295 _ACEOF
8296 if ac_fn_c_try_link "$LINENO"; then :
8297   CATOBJEXT=.gmo
8298              DATADIRNAME=share
8299 else
8300   case $host in
8301             *-*-solaris*)
8302                                                                 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
8303 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
8304   CATOBJEXT=.gmo
8305                DATADIRNAME=share
8306 else
8307   CATOBJEXT=.mo
8308                DATADIRNAME=lib
8309 fi
8310
8311             ;;
8312             *-*-openbsd*)
8313             CATOBJEXT=.mo
8314             DATADIRNAME=share
8315             ;;
8316             *)
8317             CATOBJEXT=.mo
8318             DATADIRNAME=lib
8319             ;;
8320             esac
8321 fi
8322 rm -f core conftest.err conftest.$ac_objext \
8323     conftest$ac_exeext conftest.$ac_ext
8324           LIBS="$glib_save_LIBS"
8325           INSTOBJEXT=.mo
8326         else
8327           gt_cv_have_gettext=no
8328         fi
8329       fi
8330
8331 fi
8332
8333
8334
8335     if test "$gt_cv_have_gettext" = "yes" ; then
8336
8337 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
8338
8339     fi
8340
8341         if test "$XGETTEXT" != ":"; then
8342                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8343         : ;
8344       else
8345         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
8346 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
8347         XGETTEXT=":"
8348       fi
8349     fi
8350
8351     # We need to process the po/ directory.
8352     POSUB=po
8353
8354     ac_config_commands="$ac_config_commands default-1"
8355
8356
8357                 for lang in $ALL_LINGUAS; do
8358       GMOFILES="$GMOFILES $lang.gmo"
8359       POFILES="$POFILES $lang.po"
8360     done
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374    if test "$gt_cv_have_gettext" = "yes"; then
8375      if test "x$ALL_LINGUAS" = "x"; then
8376        LINGUAS=
8377      else
8378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
8379 $as_echo_n "checking for catalogs to be installed... " >&6; }
8380        NEW_LINGUAS=
8381        for presentlang in $ALL_LINGUAS; do
8382          useit=no
8383          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
8384            desiredlanguages="$LINGUAS"
8385          else
8386            desiredlanguages="$ALL_LINGUAS"
8387          fi
8388          for desiredlang in $desiredlanguages; do
8389            # Use the presentlang catalog if desiredlang is
8390            #   a. equal to presentlang, or
8391            #   b. a variant of presentlang (because in this case,
8392            #      presentlang can be used as a fallback for messages
8393            #      which are not translated in the desiredlang catalog).
8394            case "$desiredlang" in
8395              "$presentlang"*) useit=yes;;
8396            esac
8397          done
8398          if test $useit = yes; then
8399            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8400          fi
8401        done
8402        LINGUAS=$NEW_LINGUAS
8403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
8404 $as_echo "$LINGUAS" >&6; }
8405      fi
8406
8407           if test -n "$LINGUAS"; then
8408        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8409      fi
8410    fi
8411
8412             MKINSTALLDIRS=
8413    if test -n "$ac_aux_dir"; then
8414      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8415    fi
8416    if test -z "$MKINSTALLDIRS"; then
8417      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8418    fi
8419
8420
8421          test -d po || mkdir po
8422    if test "x$srcdir" != "x."; then
8423      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8424        posrcprefix="$srcdir/"
8425      else
8426        posrcprefix="../$srcdir/"
8427      fi
8428    else
8429      posrcprefix="../"
8430    fi
8431    rm -f po/POTFILES
8432    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8433         < $srcdir/po/POTFILES.in > po/POTFILES
8434
8435 MKINSTALLDIRS="$INSTALL_DIRS"
8436
8437
8438 ###############################################################################
8439 #
8440 #       Check for -lXmu (some fucked up vendors don't ship it...)
8441 #
8442 ###############################################################################
8443
8444 have_xmu=no
8445
8446   ac_save_CPPFLAGS="$CPPFLAGS"
8447   if test \! -z "$includedir" ; then
8448     CPPFLAGS="$CPPFLAGS -I$includedir"
8449   fi
8450   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8451   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8452   ac_fn_c_check_header_compile "$LINENO" "X11/Xmu/Error.h" "ac_cv_header_X11_Xmu_Error_h" "#include <stdlib.h>
8453                    #include <stdio.h>
8454                    #include <X11/Intrinsic.h>
8455 "
8456 if test "x$ac_cv_header_X11_Xmu_Error_h" = xyes; then :
8457   have_xmu=yes
8458 fi
8459
8460
8461   CPPFLAGS="$ac_save_CPPFLAGS"
8462 if test "$have_xmu" = no ; then
8463   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8464   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8465   XMU_LIBS=''
8466 else
8467   XMU_SRCS=''
8468   XMU_OBJS=''
8469   XMU_LIBS='-lXmu'
8470   $as_echo "#define HAVE_XMU 1" >>confdefs.h
8471
8472 fi
8473
8474
8475 ###############################################################################
8476 #
8477 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8478 #       See comp.windows.x FAQ question 124.  The right fix is to
8479 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8480 #
8481 ###############################################################################
8482
8483 if test "$have_xmu" = yes ; then
8484   case "$host" in
8485     *-sunos4*)
8486     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8487 $as_echo_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... " >&6; }
8488 if ${ac_cv_sunos_xmu_bug+:} false; then :
8489   $as_echo_n "(cached) " >&6
8490 else
8491   ac_save_LDFLAGS="$LDFLAGS"
8492                     if test \! -z "$x_libraries" ; then
8493                       LDFLAGS="$LDFLAGS -L$x_libraries"
8494                     fi
8495                     # Note: this trick never works!  (Generally.)
8496                     # We're only getting away with using AC_TRY_LINK
8497                     # with X libraries because we know it's SunOS.
8498                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8499                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8500 /* end confdefs.h.  */
8501
8502 int
8503 main ()
8504 {
8505
8506   ;
8507   return 0;
8508 }
8509 _ACEOF
8510 if ac_fn_c_try_link "$LINENO"; then :
8511   ac_cv_sunos_xmu_bug=no
8512 else
8513   ac_cv_sunos_xmu_bug=yes
8514 fi
8515 rm -f core conftest.err conftest.$ac_objext \
8516     conftest$ac_exeext conftest.$ac_ext
8517                     LDFLAGS="$ac_save_LDFLAGS"
8518 fi
8519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sunos_xmu_bug" >&5
8520 $as_echo "$ac_cv_sunos_xmu_bug" >&6; }
8521     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8522       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler understands -static" >&5
8523 $as_echo_n "checking whether the compiler understands -static... " >&6; }
8524 if ${ac_cv_ld_static+:} false; then :
8525   $as_echo_n "(cached) " >&6
8526 else
8527   ac_save_LDFLAGS="$LDFLAGS"
8528                       LDFLAGS="$LDFLAGS -static"
8529                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8530 /* end confdefs.h.  */
8531
8532 int
8533 main ()
8534 {
8535
8536   ;
8537   return 0;
8538 }
8539 _ACEOF
8540 if ac_fn_c_try_link "$LINENO"; then :
8541   ac_cv_ld_static=yes
8542 else
8543   ac_cv_ld_static=no
8544 fi
8545 rm -f core conftest.err conftest.$ac_objext \
8546     conftest$ac_exeext conftest.$ac_ext
8547                     LDFLAGS="$ac_save_LDFLAGS"
8548 fi
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ld_static" >&5
8550 $as_echo "$ac_cv_ld_static" >&6; }
8551       if test "$ac_cv_ld_static" = yes ; then
8552         LDFLAGS="$LDFLAGS -static"
8553       else
8554         LDFLAGS="$LDFLAGS -Bstatic"
8555       fi
8556     fi
8557     ;;
8558   esac
8559 fi
8560
8561
8562 ###############################################################################
8563 #
8564 #       Handle the --with-hackdir option
8565 #
8566 ###############################################################################
8567
8568 have_hackdir=yes
8569 with_hackdir_req=unspecified
8570
8571 # Check whether --with-hackdir was given.
8572 if test "${with_hackdir+set}" = set; then :
8573   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
8574 else
8575   with_hackdir=yes
8576 fi
8577
8578
8579 if test x"$with_hackdir" = xyes; then
8580   HACKDIR='${libexecdir}/xscreensaver'
8581 elif test x"$with_hackdir" = xno; then
8582   HACKDIR='${bindir}'
8583 else
8584   HACKDIR=$with_hackdir
8585 fi
8586
8587 # canonicalize slashes.
8588 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8589
8590 # Expand HACKDIR as HACKDIR_FULL
8591 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
8592
8593 # This option used to be called --enable-subdir; make sure that is no longer
8594 # used, since configure brain-damagedly ignores unknown --enable options.
8595
8596 obsolete_enable=
8597 # Check whether --enable-subdir was given.
8598 if test "${enable_subdir+set}" = set; then :
8599   enableval=$enable_subdir; obsolete_enable=yes
8600 fi
8601
8602 if test -n "$obsolete_enable"; then
8603   echo "error: the --enable-subdir option has been replaced with"
8604   echo "       the new --with-hackdir option; see \`configure --help'"
8605   echo "       for more information."
8606   exit 1
8607 fi
8608
8609
8610 ###############################################################################
8611 #
8612 #       Handle the --with-configdir option
8613 #       Help for --with-x-app-defaults option added.
8614 #
8615 ###############################################################################
8616
8617 have_configdir=yes
8618 with_configdir_req=unspecified
8619
8620 # Check whether --with-configdir was given.
8621 if test "${with_configdir+set}" = set; then :
8622   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
8623 else
8624   with_configdir=yes
8625 fi
8626
8627
8628 if test x"$with_configdir" = xyes; then
8629   HACK_CONF_DIR='${datadir}/xscreensaver/config'
8630 elif test x"$with_configdir" = xno; then
8631   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8632   exit 1
8633 else
8634   # there must be a better way than this...
8635   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8636     # absolute path
8637     HACK_CONF_DIR=$with_configdir
8638   else
8639     # relative path
8640     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8641   fi
8642 fi
8643
8644
8645
8646
8647 ###############################################################################
8648 #
8649 #       Check for the SGI SCREEN_SAVER server extension.
8650 #
8651 ###############################################################################
8652
8653 #have_sgi=no
8654 #with_sgi_req=unspecified
8655 #AC_ARG_WITH(sgi-ext,
8656 #[Except where noted, all of the --with options below can also take a
8657 #directory argument: for example, `--with-motif=/opt/Motif'.  That would
8658 #cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
8659 #to be added to the -L list, assuming those directories exist.
8660 #
8661 #By default, support for each of these options will be built in, if the
8662 #relevant library routines exist.  At run time, they will then be used
8663 #only if the X server being used supports them.  Each --with option has
8664 #a corresponding --without option, to override building support for them
8665 #at all.
8666 #
8667 #Screen blanking and idle-detection options:
8668 #
8669 #  --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.],
8670 #  [with_sgi="$withval"; with_sgi_req="$withval"],[with_sgi=yes])
8671 #
8672 #HANDLE_X_PATH_ARG(with_sgi, --with-sgi-ext, SGI SCREEN_SAVER)
8673 #
8674 #if test "$with_sgi" = yes; then
8675 #  AC_CHECK_X_HEADER(X11/extensions/XScreenSaver.h,
8676 #                    [have_sgi=yes
8677 #                     AC_DEFINE(HAVE_SGI_SAVER_EXTENSION)],,
8678 #                    [#include <X11/Xlib.h>])
8679 #
8680 #elif test "$with_sgi" != no; then
8681 #  echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8682 #  exit 1
8683 #fi
8684
8685
8686 ###############################################################################
8687 #
8688 #       Check for the XIDLE server extension.
8689 #
8690 ###############################################################################
8691
8692 #have_xidle=no
8693 #with_xidle_req=unspecified
8694 #AC_ARG_WITH(xidle-ext,
8695 #[  --with-xidle-ext        Include support for the XIDLE extension.],
8696 #  [with_xidle="$withval"; with_xidle_req="$withval"],[with_xidle=yes])
8697 #
8698 #HANDLE_X_PATH_ARG(with_xidle, --with-xidle-ext, XIDLE)
8699 #
8700 #if test "$with_xidle" = yes; then
8701 #  AC_CHECK_X_HEADER(X11/extensions/xidle.h,
8702 #                    [have_xidle=yes
8703 #                     AC_DEFINE(HAVE_XIDLE_EXTENSION)],,
8704 #                    [#include <X11/Xlib.h>])
8705 #elif test "$with_xidle" != no; then
8706 #  echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
8707 #  exit 1
8708 #fi
8709
8710
8711 ###############################################################################
8712 #
8713 #       Check for the SGI-VIDEO-CONTROL server extension.
8714 #
8715 ###############################################################################
8716
8717 #have_sgivc=no
8718 #with_sgivc_req=unspecified
8719 #AC_ARG_WITH(sgivc-ext,
8720 #[  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.],
8721 #  [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
8722 #
8723 #HANDLE_X_PATH_ARG(with_sgivc, --with-sgivc-ext, SGI-VIDEO-CONTROL)
8724 #
8725 #if test "$with_sgivc" = yes; then
8726 #
8727 #  # first check for XSGIvc.h
8728 #  AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes],,
8729 #                    [#include <X11/Xlib.h>])
8730 #
8731 #  # if that succeeded, then check for the -lXsgivc
8732 #  if test "$have_sgivc" = yes; then
8733 #    have_sgivc=no
8734 #    AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
8735 #                  [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [true],
8736 #                  -lXext -lX11)
8737 #  fi
8738 #
8739 #  # if that succeeded, then we've really got it.
8740 #  if test "$have_sgivc" = yes; then
8741 #    AC_DEFINE(HAVE_SGI_VC_EXTENSION)
8742 #  fi
8743 #
8744 #elif test "$with_sgivc" != no; then
8745 #  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
8746 #  exit 1
8747 #fi
8748
8749
8750 ###############################################################################
8751 #
8752 #       Check for the DPMS server extension.
8753 #
8754 ###############################################################################
8755
8756 have_dpms=no
8757 with_dpms_req=unspecified
8758
8759 # Check whether --with-dpms-ext was given.
8760 if test "${with_dpms_ext+set}" = set; then :
8761   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
8762 else
8763   with_dpms=yes
8764 fi
8765
8766
8767
8768    case "$with_dpms" in
8769     yes) ;;
8770     no)  ;;
8771
8772     /*)
8773      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS headers" >&5
8774 $as_echo_n "checking for DPMS headers... " >&6; }
8775      d=$with_dpms/include
8776      if test -d $d; then
8777        X_CFLAGS="-I$d $X_CFLAGS"
8778        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8779 $as_echo "$d" >&6; }
8780      else
8781        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8782 $as_echo "not found ($d: no such directory)" >&6; }
8783      fi
8784
8785      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS libs" >&5
8786 $as_echo_n "checking for DPMS libs... " >&6; }
8787      d=$with_dpms/lib
8788      if test -d $d; then
8789        X_LIBS="-L$d $X_LIBS"
8790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8791 $as_echo "$d" >&6; }
8792      else
8793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8794 $as_echo "not found ($d: no such directory)" >&6; }
8795      fi
8796
8797      # replace the directory string with "yes".
8798      with_dpms_req="yes"
8799      with_dpms=$with_dpms_req
8800      ;;
8801
8802     *)
8803      echo ""
8804      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
8805      echo "       If it is a directory, then \`DIR/include' will be added to"
8806      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8807      exit 1
8808      ;;
8809    esac
8810
8811
8812 if test "$with_dpms" = yes; then
8813
8814   # first check for dpms.h
8815
8816   ac_save_CPPFLAGS="$CPPFLAGS"
8817   if test \! -z "$includedir" ; then
8818     CPPFLAGS="$CPPFLAGS -I$includedir"
8819   fi
8820   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8821   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8822   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/dpms.h" "ac_cv_header_X11_extensions_dpms_h" "#include <X11/Xlib.h>
8823                      #include <X11/Xmd.h>
8824 "
8825 if test "x$ac_cv_header_X11_extensions_dpms_h" = xyes; then :
8826   have_dpms=yes
8827 fi
8828
8829
8830   CPPFLAGS="$ac_save_CPPFLAGS"
8831
8832   # if that succeeded, then check for the DPMS code in the libraries
8833   if test "$have_dpms" = yes; then
8834
8835     # first look in -lXext (this is where it is with XFree86 4.0)
8836     have_dpms=no
8837
8838   ac_save_CPPFLAGS="$CPPFLAGS"
8839   ac_save_LDFLAGS="$LDFLAGS"
8840 #  ac_save_LIBS="$LIBS"
8841
8842   if test \! -z "$includedir" ; then
8843     CPPFLAGS="$CPPFLAGS -I$includedir"
8844   fi
8845   # note: $X_CFLAGS includes $x_includes
8846   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8847
8848   if test \! -z "$libdir" ; then
8849     LDFLAGS="$LDFLAGS -L$libdir"
8850   fi
8851   # note: $X_LIBS includes $x_libraries
8852   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8853
8854   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8855   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8856   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXext" >&5
8857 $as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
8858 if ${ac_cv_lib_Xext_DPMSInfo+:} false; then :
8859   $as_echo_n "(cached) " >&6
8860 else
8861   ac_check_lib_save_LIBS=$LIBS
8862 LIBS="-lXext -lXext -lX11 $LIBS"
8863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8864 /* end confdefs.h.  */
8865
8866 /* Override any GCC internal prototype to avoid an error.
8867    Use char because int might match the return type of a GCC
8868    builtin and then its argument prototype would still apply.  */
8869 #ifdef __cplusplus
8870 extern "C"
8871 #endif
8872 char DPMSInfo ();
8873 int
8874 main ()
8875 {
8876 return DPMSInfo ();
8877   ;
8878   return 0;
8879 }
8880 _ACEOF
8881 if ac_fn_c_try_link "$LINENO"; then :
8882   ac_cv_lib_Xext_DPMSInfo=yes
8883 else
8884   ac_cv_lib_Xext_DPMSInfo=no
8885 fi
8886 rm -f core conftest.err conftest.$ac_objext \
8887     conftest$ac_exeext conftest.$ac_ext
8888 LIBS=$ac_check_lib_save_LIBS
8889 fi
8890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_DPMSInfo" >&5
8891 $as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
8892 if test "x$ac_cv_lib_Xext_DPMSInfo" = xyes; then :
8893   have_dpms=yes
8894 else
8895   true
8896 fi
8897
8898   CPPFLAGS="$ac_save_CPPFLAGS"
8899   LDFLAGS="$ac_save_LDFLAGS"
8900 #  LIBS="$ac_save_LIBS"
8901
8902
8903     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
8904     if test "$have_dpms" = no; then
8905
8906   ac_save_CPPFLAGS="$CPPFLAGS"
8907   ac_save_LDFLAGS="$LDFLAGS"
8908 #  ac_save_LIBS="$LIBS"
8909
8910   if test \! -z "$includedir" ; then
8911     CPPFLAGS="$CPPFLAGS -I$includedir"
8912   fi
8913   # note: $X_CFLAGS includes $x_includes
8914   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8915
8916   if test \! -z "$libdir" ; then
8917     LDFLAGS="$LDFLAGS -L$libdir"
8918   fi
8919   # note: $X_LIBS includes $x_libraries
8920   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8921
8922   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8923   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXdpms" >&5
8925 $as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
8926 if ${ac_cv_lib_Xdpms_DPMSInfo+:} false; then :
8927   $as_echo_n "(cached) " >&6
8928 else
8929   ac_check_lib_save_LIBS=$LIBS
8930 LIBS="-lXdpms -lXext -lX11 $LIBS"
8931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8932 /* end confdefs.h.  */
8933
8934 /* Override any GCC internal prototype to avoid an error.
8935    Use char because int might match the return type of a GCC
8936    builtin and then its argument prototype would still apply.  */
8937 #ifdef __cplusplus
8938 extern "C"
8939 #endif
8940 char DPMSInfo ();
8941 int
8942 main ()
8943 {
8944 return DPMSInfo ();
8945   ;
8946   return 0;
8947 }
8948 _ACEOF
8949 if ac_fn_c_try_link "$LINENO"; then :
8950   ac_cv_lib_Xdpms_DPMSInfo=yes
8951 else
8952   ac_cv_lib_Xdpms_DPMSInfo=no
8953 fi
8954 rm -f core conftest.err conftest.$ac_objext \
8955     conftest$ac_exeext conftest.$ac_ext
8956 LIBS=$ac_check_lib_save_LIBS
8957 fi
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
8959 $as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
8960 if test "x$ac_cv_lib_Xdpms_DPMSInfo" = xyes; then :
8961   have_dpms=yes; XDPMS_LIBS="-lXdpms"
8962 else
8963   true
8964 fi
8965
8966   CPPFLAGS="$ac_save_CPPFLAGS"
8967   LDFLAGS="$ac_save_LDFLAGS"
8968 #  LIBS="$ac_save_LIBS"
8969
8970     fi
8971   fi
8972
8973
8974   # if that succeeded, then we've really got it.
8975   if test "$have_dpms" = yes; then
8976     $as_echo "#define HAVE_DPMS_EXTENSION 1" >>confdefs.h
8977
8978   fi
8979
8980 elif test "$with_dpms" != no; then
8981   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
8982   exit 1
8983 fi
8984
8985
8986 ###############################################################################
8987 #
8988 #       Check for the XINERAMA server extension.
8989 #
8990 ###############################################################################
8991
8992 have_xinerama=no
8993 with_xinerama_req=unspecified
8994
8995 # Check whether --with-xinerama-ext was given.
8996 if test "${with_xinerama_ext+set}" = set; then :
8997   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
8998 else
8999   with_xinerama=yes
9000 fi
9001
9002
9003
9004    case "$with_xinerama" in
9005     yes) ;;
9006     no)  ;;
9007
9008     /*)
9009      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA headers" >&5
9010 $as_echo_n "checking for XINERAMA headers... " >&6; }
9011      d=$with_xinerama/include
9012      if test -d $d; then
9013        X_CFLAGS="-I$d $X_CFLAGS"
9014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9015 $as_echo "$d" >&6; }
9016      else
9017        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9018 $as_echo "not found ($d: no such directory)" >&6; }
9019      fi
9020
9021      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA libs" >&5
9022 $as_echo_n "checking for XINERAMA libs... " >&6; }
9023      d=$with_xinerama/lib
9024      if test -d $d; then
9025        X_LIBS="-L$d $X_LIBS"
9026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9027 $as_echo "$d" >&6; }
9028      else
9029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9030 $as_echo "not found ($d: no such directory)" >&6; }
9031      fi
9032
9033      # replace the directory string with "yes".
9034      with_xinerama_req="yes"
9035      with_xinerama=$with_xinerama_req
9036      ;;
9037
9038     *)
9039      echo ""
9040      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
9041      echo "       If it is a directory, then \`DIR/include' will be added to"
9042      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9043      exit 1
9044      ;;
9045    esac
9046
9047
9048 if test "$with_xinerama" = yes; then
9049
9050   # first check for Xinerama.h
9051
9052   ac_save_CPPFLAGS="$CPPFLAGS"
9053   if test \! -z "$includedir" ; then
9054     CPPFLAGS="$CPPFLAGS -I$includedir"
9055   fi
9056   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9057   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9058   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "#include <X11/Xlib.h>
9059 "
9060 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = xyes; then :
9061   have_xinerama=yes
9062 fi
9063
9064
9065   CPPFLAGS="$ac_save_CPPFLAGS"
9066
9067   # if that succeeded, then check for the XINERAMA code in the libraries
9068   if test "$have_xinerama" = yes; then
9069
9070     # first look in -lXext
9071     have_xinerama=no
9072
9073   ac_save_CPPFLAGS="$CPPFLAGS"
9074   ac_save_LDFLAGS="$LDFLAGS"
9075 #  ac_save_LIBS="$LIBS"
9076
9077   if test \! -z "$includedir" ; then
9078     CPPFLAGS="$CPPFLAGS -I$includedir"
9079   fi
9080   # note: $X_CFLAGS includes $x_includes
9081   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9082
9083   if test \! -z "$libdir" ; then
9084     LDFLAGS="$LDFLAGS -L$libdir"
9085   fi
9086   # note: $X_LIBS includes $x_libraries
9087   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9088
9089   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9090   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXext" >&5
9092 $as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
9093 if ${ac_cv_lib_Xext_XineramaQueryScreens+:} false; then :
9094   $as_echo_n "(cached) " >&6
9095 else
9096   ac_check_lib_save_LIBS=$LIBS
9097 LIBS="-lXext -lXext -lX11 $LIBS"
9098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9099 /* end confdefs.h.  */
9100
9101 /* Override any GCC internal prototype to avoid an error.
9102    Use char because int might match the return type of a GCC
9103    builtin and then its argument prototype would still apply.  */
9104 #ifdef __cplusplus
9105 extern "C"
9106 #endif
9107 char XineramaQueryScreens ();
9108 int
9109 main ()
9110 {
9111 return XineramaQueryScreens ();
9112   ;
9113   return 0;
9114 }
9115 _ACEOF
9116 if ac_fn_c_try_link "$LINENO"; then :
9117   ac_cv_lib_Xext_XineramaQueryScreens=yes
9118 else
9119   ac_cv_lib_Xext_XineramaQueryScreens=no
9120 fi
9121 rm -f core conftest.err conftest.$ac_objext \
9122     conftest$ac_exeext conftest.$ac_ext
9123 LIBS=$ac_check_lib_save_LIBS
9124 fi
9125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
9126 $as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
9127 if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = xyes; then :
9128   have_xinerama=yes
9129 else
9130   true
9131 fi
9132
9133   CPPFLAGS="$ac_save_CPPFLAGS"
9134   LDFLAGS="$ac_save_LDFLAGS"
9135 #  LIBS="$ac_save_LIBS"
9136
9137
9138     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
9139     if test "$have_xinerama" = no; then
9140
9141   ac_save_CPPFLAGS="$CPPFLAGS"
9142   ac_save_LDFLAGS="$LDFLAGS"
9143 #  ac_save_LIBS="$LIBS"
9144
9145   if test \! -z "$includedir" ; then
9146     CPPFLAGS="$CPPFLAGS -I$includedir"
9147   fi
9148   # note: $X_CFLAGS includes $x_includes
9149   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9150
9151   if test \! -z "$libdir" ; then
9152     LDFLAGS="$LDFLAGS -L$libdir"
9153   fi
9154   # note: $X_LIBS includes $x_libraries
9155   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9156
9157   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9158   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9159   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXinerama" >&5
9160 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
9161 if ${ac_cv_lib_Xinerama_XineramaQueryScreens+:} false; then :
9162   $as_echo_n "(cached) " >&6
9163 else
9164   ac_check_lib_save_LIBS=$LIBS
9165 LIBS="-lXinerama -lXext -lX11 $LIBS"
9166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9167 /* end confdefs.h.  */
9168
9169 /* Override any GCC internal prototype to avoid an error.
9170    Use char because int might match the return type of a GCC
9171    builtin and then its argument prototype would still apply.  */
9172 #ifdef __cplusplus
9173 extern "C"
9174 #endif
9175 char XineramaQueryScreens ();
9176 int
9177 main ()
9178 {
9179 return XineramaQueryScreens ();
9180   ;
9181   return 0;
9182 }
9183 _ACEOF
9184 if ac_fn_c_try_link "$LINENO"; then :
9185   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
9186 else
9187   ac_cv_lib_Xinerama_XineramaQueryScreens=no
9188 fi
9189 rm -f core conftest.err conftest.$ac_objext \
9190     conftest$ac_exeext conftest.$ac_ext
9191 LIBS=$ac_check_lib_save_LIBS
9192 fi
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
9194 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
9195 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = xyes; then :
9196   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
9197 else
9198   true
9199 fi
9200
9201   CPPFLAGS="$ac_save_CPPFLAGS"
9202   LDFLAGS="$ac_save_LDFLAGS"
9203 #  LIBS="$ac_save_LIBS"
9204
9205     fi
9206   fi
9207
9208   # if that succeeded, then we've really got it.
9209   if test "$have_xinerama" = yes; then
9210     $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
9211
9212   fi
9213
9214 elif test "$with_xinerama" != no; then
9215   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
9216   exit 1
9217 fi
9218
9219
9220 ###############################################################################
9221 #
9222 #       Check for the XINPUT server extension.
9223 #
9224 ###############################################################################
9225
9226 have_xinput=no
9227 with_xinput_req=unspecified
9228
9229 # Check whether --with-xinput-ext was given.
9230 if test "${with_xinput_ext+set}" = set; then :
9231   withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
9232 else
9233   with_xinput=yes
9234 fi
9235
9236
9237
9238    case "$with_xinput" in
9239     yes) ;;
9240     no)  ;;
9241
9242     /*)
9243      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT headers" >&5
9244 $as_echo_n "checking for XINPUT headers... " >&6; }
9245      d=$with_xinput/include
9246      if test -d $d; then
9247        X_CFLAGS="-I$d $X_CFLAGS"
9248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9249 $as_echo "$d" >&6; }
9250      else
9251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9252 $as_echo "not found ($d: no such directory)" >&6; }
9253      fi
9254
9255      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT libs" >&5
9256 $as_echo_n "checking for XINPUT libs... " >&6; }
9257      d=$with_xinput/lib
9258      if test -d $d; then
9259        X_LIBS="-L$d $X_LIBS"
9260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9261 $as_echo "$d" >&6; }
9262      else
9263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9264 $as_echo "not found ($d: no such directory)" >&6; }
9265      fi
9266
9267      # replace the directory string with "yes".
9268      with_xinput_req="yes"
9269      with_xinput=$with_xinput_req
9270      ;;
9271
9272     *)
9273      echo ""
9274      echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
9275      echo "       If it is a directory, then \`DIR/include' will be added to"
9276      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9277      exit 1
9278      ;;
9279    esac
9280
9281
9282 if test "$with_xinput" = yes; then
9283
9284   # first check for Xinput.h
9285
9286   ac_save_CPPFLAGS="$CPPFLAGS"
9287   if test \! -z "$includedir" ; then
9288     CPPFLAGS="$CPPFLAGS -I$includedir"
9289   fi
9290   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9291   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9292   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XInput.h" "ac_cv_header_X11_extensions_XInput_h" "#include <X11/Xlib.h>
9293 "
9294 if test "x$ac_cv_header_X11_extensions_XInput_h" = xyes; then :
9295   have_xinput=yes
9296 fi
9297
9298
9299   CPPFLAGS="$ac_save_CPPFLAGS"
9300
9301   # if that succeeded, then check for libXi
9302   if test "$have_xinput" = yes; then
9303     have_xinput=no
9304
9305   ac_save_CPPFLAGS="$CPPFLAGS"
9306   ac_save_LDFLAGS="$LDFLAGS"
9307 #  ac_save_LIBS="$LIBS"
9308
9309   if test \! -z "$includedir" ; then
9310     CPPFLAGS="$CPPFLAGS -I$includedir"
9311   fi
9312   # note: $X_CFLAGS includes $x_includes
9313   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9314
9315   if test \! -z "$libdir" ; then
9316     LDFLAGS="$LDFLAGS -L$libdir"
9317   fi
9318   # note: $X_LIBS includes $x_libraries
9319   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9320
9321   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9322   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9323   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XListInputDevices in -lXi" >&5
9324 $as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
9325 if ${ac_cv_lib_Xi_XListInputDevices+:} false; then :
9326   $as_echo_n "(cached) " >&6
9327 else
9328   ac_check_lib_save_LIBS=$LIBS
9329 LIBS="-lXi -lXext -lX11 $LIBS"
9330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9331 /* end confdefs.h.  */
9332
9333 /* Override any GCC internal prototype to avoid an error.
9334    Use char because int might match the return type of a GCC
9335    builtin and then its argument prototype would still apply.  */
9336 #ifdef __cplusplus
9337 extern "C"
9338 #endif
9339 char XListInputDevices ();
9340 int
9341 main ()
9342 {
9343 return XListInputDevices ();
9344   ;
9345   return 0;
9346 }
9347 _ACEOF
9348 if ac_fn_c_try_link "$LINENO"; then :
9349   ac_cv_lib_Xi_XListInputDevices=yes
9350 else
9351   ac_cv_lib_Xi_XListInputDevices=no
9352 fi
9353 rm -f core conftest.err conftest.$ac_objext \
9354     conftest$ac_exeext conftest.$ac_ext
9355 LIBS=$ac_check_lib_save_LIBS
9356 fi
9357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xi_XListInputDevices" >&5
9358 $as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
9359 if test "x$ac_cv_lib_Xi_XListInputDevices" = xyes; then :
9360   have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
9361 else
9362   true
9363 fi
9364
9365   CPPFLAGS="$ac_save_CPPFLAGS"
9366   LDFLAGS="$ac_save_LDFLAGS"
9367 #  LIBS="$ac_save_LIBS"
9368
9369   fi
9370
9371   # if that succeeded, then we've really got it.
9372   if test "$have_xinput" = yes; then
9373     $as_echo "#define HAVE_XINPUT 1" >>confdefs.h
9374
9375   fi
9376
9377 elif test "$with_xinput" != no; then
9378   echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
9379   exit 1
9380 fi
9381
9382
9383 ###############################################################################
9384 #
9385 #       Check for the XF86VMODE server extension (for virtual screens.)
9386 #
9387 ###############################################################################
9388
9389 have_xf86vmode=no
9390 with_xf86vmode_req=unspecified
9391
9392 # Check whether --with-xf86vmode-ext was given.
9393 if test "${with_xf86vmode_ext+set}" = set; then :
9394   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
9395 else
9396   with_xf86vmode=yes
9397 fi
9398
9399
9400
9401    case "$with_xf86vmode" in
9402     yes) ;;
9403     no)  ;;
9404
9405     /*)
9406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode headers" >&5
9407 $as_echo_n "checking for xf86vmode headers... " >&6; }
9408      d=$with_xf86vmode/include
9409      if test -d $d; then
9410        X_CFLAGS="-I$d $X_CFLAGS"
9411        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9412 $as_echo "$d" >&6; }
9413      else
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9415 $as_echo "not found ($d: no such directory)" >&6; }
9416      fi
9417
9418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode libs" >&5
9419 $as_echo_n "checking for xf86vmode libs... " >&6; }
9420      d=$with_xf86vmode/lib
9421      if test -d $d; then
9422        X_LIBS="-L$d $X_LIBS"
9423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9424 $as_echo "$d" >&6; }
9425      else
9426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9427 $as_echo "not found ($d: no such directory)" >&6; }
9428      fi
9429
9430      # replace the directory string with "yes".
9431      with_xf86vmode_req="yes"
9432      with_xf86vmode=$with_xf86vmode_req
9433      ;;
9434
9435     *)
9436      echo ""
9437      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
9438      echo "       If it is a directory, then \`DIR/include' will be added to"
9439      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9440      exit 1
9441      ;;
9442    esac
9443
9444
9445 VIDMODE_LIBS=""
9446
9447 if test "$with_xf86vmode" = yes; then
9448
9449   # first check for xf86vmode.h
9450
9451   ac_save_CPPFLAGS="$CPPFLAGS"
9452   if test \! -z "$includedir" ; then
9453     CPPFLAGS="$CPPFLAGS -I$includedir"
9454   fi
9455   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9456   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9457   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9458 "
9459 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9460   have_xf86vmode=yes
9461 fi
9462
9463
9464   CPPFLAGS="$ac_save_CPPFLAGS"
9465
9466   # if that succeeded, then check for the -lXxf86vm
9467   if test "$have_xf86vmode" = yes; then
9468     have_xf86vmode=no
9469
9470   ac_save_CPPFLAGS="$CPPFLAGS"
9471   ac_save_LDFLAGS="$LDFLAGS"
9472 #  ac_save_LIBS="$LIBS"
9473
9474   if test \! -z "$includedir" ; then
9475     CPPFLAGS="$CPPFLAGS -I$includedir"
9476   fi
9477   # note: $X_CFLAGS includes $x_includes
9478   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9479
9480   if test \! -z "$libdir" ; then
9481     LDFLAGS="$LDFLAGS -L$libdir"
9482   fi
9483   # note: $X_LIBS includes $x_libraries
9484   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9485
9486   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9487   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9488   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
9489 $as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
9490 if ${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+:} false; then :
9491   $as_echo_n "(cached) " >&6
9492 else
9493   ac_check_lib_save_LIBS=$LIBS
9494 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9496 /* end confdefs.h.  */
9497
9498 /* Override any GCC internal prototype to avoid an error.
9499    Use char because int might match the return type of a GCC
9500    builtin and then its argument prototype would still apply.  */
9501 #ifdef __cplusplus
9502 extern "C"
9503 #endif
9504 char XF86VidModeGetViewPort ();
9505 int
9506 main ()
9507 {
9508 return XF86VidModeGetViewPort ();
9509   ;
9510   return 0;
9511 }
9512 _ACEOF
9513 if ac_fn_c_try_link "$LINENO"; then :
9514   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
9515 else
9516   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
9517 fi
9518 rm -f core conftest.err conftest.$ac_objext \
9519     conftest$ac_exeext conftest.$ac_ext
9520 LIBS=$ac_check_lib_save_LIBS
9521 fi
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
9523 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
9524 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = xyes; then :
9525   have_xf86vmode=yes;
9526                    VIDMODE_LIBS="-lXxf86vm";
9527                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
9528 else
9529   true
9530 fi
9531
9532   CPPFLAGS="$ac_save_CPPFLAGS"
9533   LDFLAGS="$ac_save_LDFLAGS"
9534 #  LIBS="$ac_save_LIBS"
9535
9536   fi
9537
9538   # if that succeeded, then we've really got it.
9539   if test "$have_xf86vmode" = yes; then
9540     $as_echo "#define HAVE_XF86VMODE 1" >>confdefs.h
9541
9542   fi
9543
9544 elif test "$with_xf86vmode" != no; then
9545   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
9546   exit 1
9547 fi
9548
9549
9550 ###############################################################################
9551 #
9552 #       Check for the XF86VMODE server extension (for gamma fading.)
9553 #
9554 ###############################################################################
9555
9556 have_xf86gamma=no
9557 have_xf86gamma_ramp=no
9558 with_xf86gamma_req=unspecified
9559
9560 # Check whether --with-xf86gamma-ext was given.
9561 if test "${with_xf86gamma_ext+set}" = set; then :
9562   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
9563 else
9564   with_xf86gamma=yes
9565 fi
9566
9567
9568
9569    case "$with_xf86gamma" in
9570     yes) ;;
9571     no)  ;;
9572
9573     /*)
9574      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma headers" >&5
9575 $as_echo_n "checking for xf86gamma headers... " >&6; }
9576      d=$with_xf86gamma/include
9577      if test -d $d; then
9578        X_CFLAGS="-I$d $X_CFLAGS"
9579        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9580 $as_echo "$d" >&6; }
9581      else
9582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9583 $as_echo "not found ($d: no such directory)" >&6; }
9584      fi
9585
9586      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma libs" >&5
9587 $as_echo_n "checking for xf86gamma libs... " >&6; }
9588      d=$with_xf86gamma/lib
9589      if test -d $d; then
9590        X_LIBS="-L$d $X_LIBS"
9591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9592 $as_echo "$d" >&6; }
9593      else
9594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9595 $as_echo "not found ($d: no such directory)" >&6; }
9596      fi
9597
9598      # replace the directory string with "yes".
9599      with_xf86gamma_req="yes"
9600      with_xf86gamma=$with_xf86gamma_req
9601      ;;
9602
9603     *)
9604      echo ""
9605      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
9606      echo "       If it is a directory, then \`DIR/include' will be added to"
9607      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9608      exit 1
9609      ;;
9610    esac
9611
9612
9613 if test "$with_xf86gamma" = yes; then
9614
9615   # first check for xf86vmode.h, if we haven't already
9616   if test "$have_xf86vmode" = yes; then
9617     have_xf86gamma=yes
9618   else
9619
9620   ac_save_CPPFLAGS="$CPPFLAGS"
9621   if test \! -z "$includedir" ; then
9622     CPPFLAGS="$CPPFLAGS -I$includedir"
9623   fi
9624   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9625   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9626   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9627 "
9628 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9629   have_xf86gamma=yes
9630 fi
9631
9632
9633   CPPFLAGS="$ac_save_CPPFLAGS"
9634   fi
9635
9636   # if that succeeded, then check for the -lXxf86vm
9637   if test "$have_xf86gamma" = yes; then
9638     have_xf86gamma=no
9639
9640   ac_save_CPPFLAGS="$CPPFLAGS"
9641   ac_save_LDFLAGS="$LDFLAGS"
9642 #  ac_save_LIBS="$LIBS"
9643
9644   if test \! -z "$includedir" ; then
9645     CPPFLAGS="$CPPFLAGS -I$includedir"
9646   fi
9647   # note: $X_CFLAGS includes $x_includes
9648   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9649
9650   if test \! -z "$libdir" ; then
9651     LDFLAGS="$LDFLAGS -L$libdir"
9652   fi
9653   # note: $X_LIBS includes $x_libraries
9654   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9655
9656   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9657   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9658   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
9659 $as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
9660 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+:} false; then :
9661   $as_echo_n "(cached) " >&6
9662 else
9663   ac_check_lib_save_LIBS=$LIBS
9664 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9666 /* end confdefs.h.  */
9667
9668 /* Override any GCC internal prototype to avoid an error.
9669    Use char because int might match the return type of a GCC
9670    builtin and then its argument prototype would still apply.  */
9671 #ifdef __cplusplus
9672 extern "C"
9673 #endif
9674 char XF86VidModeSetGamma ();
9675 int
9676 main ()
9677 {
9678 return XF86VidModeSetGamma ();
9679   ;
9680   return 0;
9681 }
9682 _ACEOF
9683 if ac_fn_c_try_link "$LINENO"; then :
9684   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
9685 else
9686   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
9687 fi
9688 rm -f core conftest.err conftest.$ac_objext \
9689     conftest$ac_exeext conftest.$ac_ext
9690 LIBS=$ac_check_lib_save_LIBS
9691 fi
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
9693 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
9694 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = xyes; then :
9695   have_xf86gamma=yes
9696 else
9697   true
9698 fi
9699
9700   CPPFLAGS="$ac_save_CPPFLAGS"
9701   LDFLAGS="$ac_save_LDFLAGS"
9702 #  LIBS="$ac_save_LIBS"
9703
9704   fi
9705
9706   # check for the Ramp versions of the functions too.
9707   if test "$have_xf86gamma" = yes; then
9708     have_xf86gamma_ramp=no
9709
9710   ac_save_CPPFLAGS="$CPPFLAGS"
9711   ac_save_LDFLAGS="$LDFLAGS"
9712 #  ac_save_LIBS="$LIBS"
9713
9714   if test \! -z "$includedir" ; then
9715     CPPFLAGS="$CPPFLAGS -I$includedir"
9716   fi
9717   # note: $X_CFLAGS includes $x_includes
9718   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9719
9720   if test \! -z "$libdir" ; then
9721     LDFLAGS="$LDFLAGS -L$libdir"
9722   fi
9723   # note: $X_LIBS includes $x_libraries
9724   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9725
9726   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9727   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9728   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
9729 $as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
9730 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+:} false; then :
9731   $as_echo_n "(cached) " >&6
9732 else
9733   ac_check_lib_save_LIBS=$LIBS
9734 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9736 /* end confdefs.h.  */
9737
9738 /* Override any GCC internal prototype to avoid an error.
9739    Use char because int might match the return type of a GCC
9740    builtin and then its argument prototype would still apply.  */
9741 #ifdef __cplusplus
9742 extern "C"
9743 #endif
9744 char XF86VidModeSetGammaRamp ();
9745 int
9746 main ()
9747 {
9748 return XF86VidModeSetGammaRamp ();
9749   ;
9750   return 0;
9751 }
9752 _ACEOF
9753 if ac_fn_c_try_link "$LINENO"; then :
9754   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
9755 else
9756   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
9757 fi
9758 rm -f core conftest.err conftest.$ac_objext \
9759     conftest$ac_exeext conftest.$ac_ext
9760 LIBS=$ac_check_lib_save_LIBS
9761 fi
9762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
9763 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
9764 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = xyes; then :
9765   have_xf86gamma_ramp=yes
9766 else
9767   true
9768 fi
9769
9770   CPPFLAGS="$ac_save_CPPFLAGS"
9771   LDFLAGS="$ac_save_LDFLAGS"
9772 #  LIBS="$ac_save_LIBS"
9773
9774   fi
9775
9776   # if those tests succeeded, then we've really got the functions.
9777   if test "$have_xf86gamma" = yes; then
9778     $as_echo "#define HAVE_XF86VMODE_GAMMA 1" >>confdefs.h
9779
9780   fi
9781
9782   if test "$have_xf86gamma_ramp" = yes; then
9783     $as_echo "#define HAVE_XF86VMODE_GAMMA_RAMP 1" >>confdefs.h
9784
9785   fi
9786
9787   # pull in the lib, if we haven't already
9788   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
9789     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
9790   fi
9791
9792 elif test "$with_xf86gamma" != no; then
9793   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
9794   exit 1
9795 fi
9796
9797
9798 ###############################################################################
9799 #
9800 #       Check for the RANDR (Resize and Rotate) server extension.
9801 #
9802 #       We need this to detect when the resolution of the desktop
9803 #       has changed out from under us (this is a newer, different
9804 #       mechanism than the XF86VMODE virtual viewports.)
9805 #
9806 ###############################################################################
9807
9808 have_randr=no
9809 with_randr_req=unspecified
9810
9811 # Check whether --with-randr-ext was given.
9812 if test "${with_randr_ext+set}" = set; then :
9813   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
9814 else
9815   with_randr=yes
9816 fi
9817
9818
9819
9820    case "$with_randr" in
9821     yes) ;;
9822     no)  ;;
9823
9824     /*)
9825      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR headers" >&5
9826 $as_echo_n "checking for RANDR headers... " >&6; }
9827      d=$with_randr/include
9828      if test -d $d; then
9829        X_CFLAGS="-I$d $X_CFLAGS"
9830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9831 $as_echo "$d" >&6; }
9832      else
9833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9834 $as_echo "not found ($d: no such directory)" >&6; }
9835      fi
9836
9837      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR libs" >&5
9838 $as_echo_n "checking for RANDR libs... " >&6; }
9839      d=$with_randr/lib
9840      if test -d $d; then
9841        X_LIBS="-L$d $X_LIBS"
9842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9843 $as_echo "$d" >&6; }
9844      else
9845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9846 $as_echo "not found ($d: no such directory)" >&6; }
9847      fi
9848
9849      # replace the directory string with "yes".
9850      with_randr_req="yes"
9851      with_randr=$with_randr_req
9852      ;;
9853
9854     *)
9855      echo ""
9856      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
9857      echo "       If it is a directory, then \`DIR/include' will be added to"
9858      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9859      exit 1
9860      ;;
9861    esac
9862
9863
9864 if test "$with_randr" = yes; then
9865
9866   # first check for Xrandr.h
9867
9868   ac_save_CPPFLAGS="$CPPFLAGS"
9869   if test \! -z "$includedir" ; then
9870     CPPFLAGS="$CPPFLAGS -I$includedir"
9871   fi
9872   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9873   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9874   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "#include <X11/Xlib.h>
9875 "
9876 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = xyes; then :
9877   have_randr=yes
9878 fi
9879
9880
9881   CPPFLAGS="$ac_save_CPPFLAGS"
9882
9883   # if that succeeded, then check for the XRR code in the libraries
9884   if test "$have_randr" = yes; then
9885
9886     # RANDR probably needs -lXrender
9887     xrender_libs=
9888
9889   ac_save_CPPFLAGS="$CPPFLAGS"
9890   ac_save_LDFLAGS="$LDFLAGS"
9891 #  ac_save_LIBS="$LIBS"
9892
9893   if test \! -z "$includedir" ; then
9894     CPPFLAGS="$CPPFLAGS -I$includedir"
9895   fi
9896   # note: $X_CFLAGS includes $x_includes
9897   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9898
9899   if test \! -z "$libdir" ; then
9900     LDFLAGS="$LDFLAGS -L$libdir"
9901   fi
9902   # note: $X_LIBS includes $x_libraries
9903   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9904
9905   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9906   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderSetSubpixelOrder in -lXrender" >&5
9908 $as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
9909 if ${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+:} false; then :
9910   $as_echo_n "(cached) " >&6
9911 else
9912   ac_check_lib_save_LIBS=$LIBS
9913 LIBS="-lXrender -lXext -lX11 $LIBS"
9914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9915 /* end confdefs.h.  */
9916
9917 /* Override any GCC internal prototype to avoid an error.
9918    Use char because int might match the return type of a GCC
9919    builtin and then its argument prototype would still apply.  */
9920 #ifdef __cplusplus
9921 extern "C"
9922 #endif
9923 char XRenderSetSubpixelOrder ();
9924 int
9925 main ()
9926 {
9927 return XRenderSetSubpixelOrder ();
9928   ;
9929   return 0;
9930 }
9931 _ACEOF
9932 if ac_fn_c_try_link "$LINENO"; then :
9933   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
9934 else
9935   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
9936 fi
9937 rm -f core conftest.err conftest.$ac_objext \
9938     conftest$ac_exeext conftest.$ac_ext
9939 LIBS=$ac_check_lib_save_LIBS
9940 fi
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
9942 $as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
9943 if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = xyes; then :
9944   xrender_libs="-lXrender"
9945 else
9946   true
9947 fi
9948
9949   CPPFLAGS="$ac_save_CPPFLAGS"
9950   LDFLAGS="$ac_save_LDFLAGS"
9951 #  LIBS="$ac_save_LIBS"
9952
9953
9954     # first look for RANDR in -lXext
9955     have_randr=no
9956
9957   ac_save_CPPFLAGS="$CPPFLAGS"
9958   ac_save_LDFLAGS="$LDFLAGS"
9959 #  ac_save_LIBS="$LIBS"
9960
9961   if test \! -z "$includedir" ; then
9962     CPPFLAGS="$CPPFLAGS -I$includedir"
9963   fi
9964   # note: $X_CFLAGS includes $x_includes
9965   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9966
9967   if test \! -z "$libdir" ; then
9968     LDFLAGS="$LDFLAGS -L$libdir"
9969   fi
9970   # note: $X_LIBS includes $x_libraries
9971   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9972
9973   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9974   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9975   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXext" >&5
9976 $as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
9977 if ${ac_cv_lib_Xext_XRRGetScreenInfo+:} false; then :
9978   $as_echo_n "(cached) " >&6
9979 else
9980   ac_check_lib_save_LIBS=$LIBS
9981 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
9982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9983 /* end confdefs.h.  */
9984
9985 /* Override any GCC internal prototype to avoid an error.
9986    Use char because int might match the return type of a GCC
9987    builtin and then its argument prototype would still apply.  */
9988 #ifdef __cplusplus
9989 extern "C"
9990 #endif
9991 char XRRGetScreenInfo ();
9992 int
9993 main ()
9994 {
9995 return XRRGetScreenInfo ();
9996   ;
9997   return 0;
9998 }
9999 _ACEOF
10000 if ac_fn_c_try_link "$LINENO"; then :
10001   ac_cv_lib_Xext_XRRGetScreenInfo=yes
10002 else
10003   ac_cv_lib_Xext_XRRGetScreenInfo=no
10004 fi
10005 rm -f core conftest.err conftest.$ac_objext \
10006     conftest$ac_exeext conftest.$ac_ext
10007 LIBS=$ac_check_lib_save_LIBS
10008 fi
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
10010 $as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
10011 if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = xyes; then :
10012   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
10013 else
10014   true
10015 fi
10016
10017   CPPFLAGS="$ac_save_CPPFLAGS"
10018   LDFLAGS="$ac_save_LDFLAGS"
10019 #  LIBS="$ac_save_LIBS"
10020
10021
10022     # if that failed, look in -lXrandr
10023     if test "$have_randr" = no; then
10024
10025   ac_save_CPPFLAGS="$CPPFLAGS"
10026   ac_save_LDFLAGS="$LDFLAGS"
10027 #  ac_save_LIBS="$LIBS"
10028
10029   if test \! -z "$includedir" ; then
10030     CPPFLAGS="$CPPFLAGS -I$includedir"
10031   fi
10032   # note: $X_CFLAGS includes $x_includes
10033   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10034
10035   if test \! -z "$libdir" ; then
10036     LDFLAGS="$LDFLAGS -L$libdir"
10037   fi
10038   # note: $X_LIBS includes $x_libraries
10039   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10040
10041   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10042   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10043   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
10044 $as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
10045 if ${ac_cv_lib_Xrandr_XRRGetScreenInfo+:} false; then :
10046   $as_echo_n "(cached) " >&6
10047 else
10048   ac_check_lib_save_LIBS=$LIBS
10049 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
10050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10051 /* end confdefs.h.  */
10052
10053 /* Override any GCC internal prototype to avoid an error.
10054    Use char because int might match the return type of a GCC
10055    builtin and then its argument prototype would still apply.  */
10056 #ifdef __cplusplus
10057 extern "C"
10058 #endif
10059 char XRRGetScreenInfo ();
10060 int
10061 main ()
10062 {
10063 return XRRGetScreenInfo ();
10064   ;
10065   return 0;
10066 }
10067 _ACEOF
10068 if ac_fn_c_try_link "$LINENO"; then :
10069   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
10070 else
10071   ac_cv_lib_Xrandr_XRRGetScreenInfo=no
10072 fi
10073 rm -f core conftest.err conftest.$ac_objext \
10074     conftest$ac_exeext conftest.$ac_ext
10075 LIBS=$ac_check_lib_save_LIBS
10076 fi
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
10078 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
10079 if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = xyes; then :
10080   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
10081 else
10082   true
10083 fi
10084
10085   CPPFLAGS="$ac_save_CPPFLAGS"
10086   LDFLAGS="$ac_save_LDFLAGS"
10087 #  LIBS="$ac_save_LIBS"
10088
10089     fi
10090   fi
10091
10092   # if that succeeded, then we've really got it.
10093   if test "$have_randr" = yes; then
10094     $as_echo "#define HAVE_RANDR 1" >>confdefs.h
10095
10096
10097     # Now check for version 1.2 in the same libs.
10098     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
10099     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources" >&5
10100 $as_echo_n "checking for XRRGetScreenResources... " >&6; }
10101 if ${ac_cv_randr_12+:} false; then :
10102   $as_echo_n "(cached) " >&6
10103 else
10104   ac_cv_randr_12=no
10105
10106   ac_save_CPPFLAGS="$CPPFLAGS"
10107   if test \! -z "$includedir" ; then
10108     CPPFLAGS="$CPPFLAGS -I$includedir"
10109   fi
10110   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10111   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10112   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10113 /* end confdefs.h.  */
10114 #include <stdlib.h>
10115                          #include <X11/Xlib.h>
10116                          #include <X11/extensions/Xrandr.h>
10117 int
10118 main ()
10119 {
10120 XRRScreenResources *res =
10121                            XRRGetScreenResources (0, 0);
10122   ;
10123   return 0;
10124 }
10125 _ACEOF
10126 if ac_fn_c_try_compile "$LINENO"; then :
10127   ac_cv_randr_12=yes
10128 else
10129   ac_cv_randr_12=no
10130 fi
10131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10132   CPPFLAGS="$ac_save_CPPFLAGS"
10133 fi
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_randr_12" >&5
10135 $as_echo "$ac_cv_randr_12" >&6; }
10136     if test "$ac_cv_randr_12" = yes ; then
10137       $as_echo "#define HAVE_RANDR_12 1" >>confdefs.h
10138
10139     fi
10140 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
10141 #                  [true], $SAVER_LIBS)
10142   fi
10143
10144
10145 elif test "$with_randr" != no; then
10146   echo "error: must be yes or no: --with-randr-ext=$with_randr"
10147   exit 1
10148 fi
10149
10150
10151 ###############################################################################
10152 #
10153 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
10154 #       using other XF86 stuff.)
10155 #
10156 ###############################################################################
10157
10158 have_xf86miscsetgrabkeysstate=no
10159 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
10160
10161   ac_save_CPPFLAGS="$CPPFLAGS"
10162   ac_save_LDFLAGS="$LDFLAGS"
10163 #  ac_save_LIBS="$LIBS"
10164
10165   if test \! -z "$includedir" ; then
10166     CPPFLAGS="$CPPFLAGS -I$includedir"
10167   fi
10168   # note: $X_CFLAGS includes $x_includes
10169   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10170
10171   if test \! -z "$libdir" ; then
10172     LDFLAGS="$LDFLAGS -L$libdir"
10173   fi
10174   # note: $X_LIBS includes $x_libraries
10175   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10176
10177   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10178   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10179   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
10180 $as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
10181 if ${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+:} false; then :
10182   $as_echo_n "(cached) " >&6
10183 else
10184   ac_check_lib_save_LIBS=$LIBS
10185 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
10186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10187 /* end confdefs.h.  */
10188
10189 /* Override any GCC internal prototype to avoid an error.
10190    Use char because int might match the return type of a GCC
10191    builtin and then its argument prototype would still apply.  */
10192 #ifdef __cplusplus
10193 extern "C"
10194 #endif
10195 char XF86MiscSetGrabKeysState ();
10196 int
10197 main ()
10198 {
10199 return XF86MiscSetGrabKeysState ();
10200   ;
10201   return 0;
10202 }
10203 _ACEOF
10204 if ac_fn_c_try_link "$LINENO"; then :
10205   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
10206 else
10207   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
10208 fi
10209 rm -f core conftest.err conftest.$ac_objext \
10210     conftest$ac_exeext conftest.$ac_ext
10211 LIBS=$ac_check_lib_save_LIBS
10212 fi
10213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
10214 $as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
10215 if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = xyes; then :
10216   have_xf86miscsetgrabkeysstate=yes
10217 else
10218   true
10219 fi
10220
10221   CPPFLAGS="$ac_save_CPPFLAGS"
10222   LDFLAGS="$ac_save_LDFLAGS"
10223 #  LIBS="$ac_save_LIBS"
10224
10225   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
10226     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
10227     $as_echo "#define HAVE_XF86MISCSETGRABKEYSSTATE 1" >>confdefs.h
10228
10229   fi
10230 fi
10231
10232
10233 ###############################################################################
10234 #
10235 #       Check for HP XHPDisableReset and XHPEnableReset.
10236 #
10237 ###############################################################################
10238
10239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XHPDisableReset in X11/XHPlib.h" >&5
10240 $as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
10241
10242   ac_save_CPPFLAGS="$CPPFLAGS"
10243   if test \! -z "$includedir" ; then
10244     CPPFLAGS="$CPPFLAGS -I$includedir"
10245   fi
10246   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10247   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10248   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10249 /* end confdefs.h.  */
10250 #include <X11/XHPlib.h>
10251
10252 _ACEOF
10253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10254   $EGREP "XHPDisableReset" >/dev/null 2>&1; then :
10255   $as_echo "#define HAVE_XHPDISABLERESET 1" >>confdefs.h
10256
10257                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10258                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10259 $as_echo "yes" >&6; }
10260 else
10261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10262 $as_echo "no" >&6; }
10263 fi
10264 rm -rf conftest*
10265
10266   CPPFLAGS="$ac_save_CPPFLAGS"
10267
10268
10269 ###############################################################################
10270 #
10271 #       Check for /proc/interrupts.
10272 #
10273 ###############################################################################
10274
10275 have_proc_interrupts=no
10276 with_proc_interrupts_req=unspecified
10277
10278 # Check whether --with-proc-interrupts was given.
10279 if test "${with_proc_interrupts+set}" = set; then :
10280   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
10281 else
10282   with_proc_interrupts=yes
10283 fi
10284
10285
10286 if test "$with_proc_interrupts" = yes; then
10287
10288   # Note that we may be building in an environment (e.g. Debian buildd chroot)
10289   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
10290   # check that it has the bits we need, but otherwise we'll just go on faith.
10291   #
10292   have_proc_interrupts=yes
10293
10294   if test -f /proc/interrupts; then
10295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /proc/interrupts contains keyboard data" >&5
10296 $as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
10297 if ${ac_cv_have_proc_interrupts+:} false; then :
10298   $as_echo_n "(cached) " >&6
10299 else
10300   ac_cv_have_proc_interrupts=no
10301      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
10302        ac_cv_have_proc_interrupts=yes
10303      fi
10304
10305 fi
10306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_proc_interrupts" >&5
10307 $as_echo "$ac_cv_have_proc_interrupts" >&6; }
10308    have_proc_interrupts=$ac_cv_have_proc_interrupts
10309   fi
10310
10311   if test "$have_proc_interrupts" = yes; then
10312     $as_echo "#define HAVE_PROC_INTERRUPTS 1" >>confdefs.h
10313
10314   fi
10315
10316 elif test "$with_proc_interrupts" != no; then
10317   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
10318   exit 1
10319 fi
10320
10321
10322 ###############################################################################
10323 #
10324 #       The --enable-locking option
10325 #
10326 ###############################################################################
10327
10328 # Check whether --enable-locking was given.
10329 if test "${enable_locking+set}" = set; then :
10330   enableval=$enable_locking; enable_locking="$enableval"
10331 else
10332   if test "$ac_macosx" = yes; then
10333     # We can't lock on MacOS X, so default to not compiling in support for it.
10334     # But allow --enable-locking to override that, so I can debug Linux locking
10335     # under MacOS X11.
10336     enable_locking=no
10337    else
10338     enable_locking=yes
10339    fi
10340 fi
10341
10342 if test "$enable_locking" = yes; then
10343   true
10344 elif test "$enable_locking" = no; then
10345   $as_echo "#define NO_LOCKING 1" >>confdefs.h
10346
10347 else
10348   echo "error: must be yes or no: --enable-locking=$enable_locking"
10349   exit 1
10350 fi
10351
10352
10353 ###############################################################################
10354 #
10355 #       Whether to allow root password to unblank.
10356 #
10357 ###############################################################################
10358 # Check whether --enable-root-passwd was given.
10359 if test "${enable_root_passwd+set}" = set; then :
10360   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
10361 else
10362   enable_root_passwd=yes
10363 fi
10364
10365 if test "$enable_root_passwd" = yes; then
10366   $as_echo "#define ALLOW_ROOT_PASSWD 1" >>confdefs.h
10367
10368   true
10369 elif test "$enable_root_passwd" != no; then
10370   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
10371   exit 1
10372 fi
10373
10374 ###############################################################################
10375 #
10376 #       Check for PAM.
10377 #
10378 ###############################################################################
10379
10380 case "$host" in
10381   *-solaris*)
10382    # Solaris systems tend to come with PAM misconfigured.
10383    #  Don't build it by default, even if the headers exist.
10384    with_pam_default=no
10385    ;;
10386   *)
10387    # Default to building PAM support on all other systems, if it exists.
10388    with_pam_default=yes
10389   ;;
10390 esac
10391
10392 have_pam=no
10393 with_pam_req=unspecified
10394
10395
10396 # Check whether --with-pam was given.
10397 if test "${with_pam+set}" = set; then :
10398   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
10399 else
10400   with_pam=$with_pam_default
10401 fi
10402
10403
10404
10405 # Check whether --with-pam_service_name was given.
10406 if test "${with_pam_service_name+set}" = set; then :
10407   withval=$with_pam_service_name; pam_service_name="$withval"
10408 else
10409   pam_service_name="xscreensaver"
10410 fi
10411
10412
10413 # Check whether --enable-pam-check-account-type was given.
10414 if test "${enable_pam_check_account_type+set}" = set; then :
10415   enableval=$enable_pam_check_account_type; enable_pam_check_account_type="$enableval"
10416 else
10417   enable_pam_check_account_type=no
10418 fi
10419
10420 if test "$enable_pam_check_account_type" = yes ; then
10421   $as_echo "#define PAM_CHECK_ACCOUNT_TYPE 1" >>confdefs.h
10422
10423   true
10424 elif test "$enable_pam_check_account_type" != no ; then
10425   echo "error: must be yes or no: --enable-pam-check-account-type=$enable_pam_check_account_type"
10426   exit 1
10427 fi
10428
10429
10430    case "$with_pam" in
10431     yes) ;;
10432     no)  ;;
10433
10434     /*)
10435      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM headers" >&5
10436 $as_echo_n "checking for PAM headers... " >&6; }
10437      d=$with_pam/include
10438      if test -d $d; then
10439        X_CFLAGS="-I$d $X_CFLAGS"
10440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10441 $as_echo "$d" >&6; }
10442      else
10443        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10444 $as_echo "not found ($d: no such directory)" >&6; }
10445      fi
10446
10447      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM libs" >&5
10448 $as_echo_n "checking for PAM libs... " >&6; }
10449      d=$with_pam/lib
10450      if test -d $d; then
10451        X_LIBS="-L$d $X_LIBS"
10452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10453 $as_echo "$d" >&6; }
10454      else
10455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10456 $as_echo "not found ($d: no such directory)" >&6; }
10457      fi
10458
10459      # replace the directory string with "yes".
10460      with_pam_req="yes"
10461      with_pam=$with_pam_req
10462      ;;
10463
10464     *)
10465      echo ""
10466      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
10467      echo "       If it is a directory, then \`DIR/include' will be added to"
10468      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10469      exit 1
10470      ;;
10471    esac
10472
10473
10474 if test "$enable_locking" = yes -a "$with_pam" = yes; then
10475   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM" >&5
10476 $as_echo_n "checking for PAM... " >&6; }
10477 if ${ac_cv_pam+:} false; then :
10478   $as_echo_n "(cached) " >&6
10479 else
10480
10481   ac_save_CPPFLAGS="$CPPFLAGS"
10482   if test \! -z "$includedir" ; then
10483     CPPFLAGS="$CPPFLAGS -I$includedir"
10484   fi
10485   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10486   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10487   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10488 /* end confdefs.h.  */
10489 #include <security/pam_appl.h>
10490 int
10491 main ()
10492 {
10493
10494   ;
10495   return 0;
10496 }
10497 _ACEOF
10498 if ac_fn_c_try_compile "$LINENO"; then :
10499   ac_cv_pam=yes
10500 else
10501   ac_cv_pam=no
10502 fi
10503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10504   CPPFLAGS="$ac_save_CPPFLAGS"
10505 fi
10506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pam" >&5
10507 $as_echo "$ac_cv_pam" >&6; }
10508   if test "$ac_cv_pam" = yes ; then
10509     have_pam=yes
10510     $as_echo "#define HAVE_PAM 1" >>confdefs.h
10511
10512     cat >>confdefs.h <<_ACEOF
10513 #define PAM_SERVICE_NAME "$pam_service_name"
10514 _ACEOF
10515
10516
10517     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
10518
10519     # libpam typically requires dlopen and dlsym.  On FreeBSD,
10520     # those are in libc.  On Linux and Solaris, they're in libdl.
10521     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10522 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10523 if ${ac_cv_lib_dl_dlopen+:} false; then :
10524   $as_echo_n "(cached) " >&6
10525 else
10526   ac_check_lib_save_LIBS=$LIBS
10527 LIBS="-ldl  $LIBS"
10528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10529 /* end confdefs.h.  */
10530
10531 /* Override any GCC internal prototype to avoid an error.
10532    Use char because int might match the return type of a GCC
10533    builtin and then its argument prototype would still apply.  */
10534 #ifdef __cplusplus
10535 extern "C"
10536 #endif
10537 char dlopen ();
10538 int
10539 main ()
10540 {
10541 return dlopen ();
10542   ;
10543   return 0;
10544 }
10545 _ACEOF
10546 if ac_fn_c_try_link "$LINENO"; then :
10547   ac_cv_lib_dl_dlopen=yes
10548 else
10549   ac_cv_lib_dl_dlopen=no
10550 fi
10551 rm -f core conftest.err conftest.$ac_objext \
10552     conftest$ac_exeext conftest.$ac_ext
10553 LIBS=$ac_check_lib_save_LIBS
10554 fi
10555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10556 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10557 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10558   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
10559 fi
10560
10561
10562     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
10563     have_timedwait=no
10564     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lc" >&5
10565 $as_echo_n "checking for sigtimedwait in -lc... " >&6; }
10566 if ${ac_cv_lib_c_sigtimedwait+:} false; then :
10567   $as_echo_n "(cached) " >&6
10568 else
10569   ac_check_lib_save_LIBS=$LIBS
10570 LIBS="-lc  $LIBS"
10571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10572 /* end confdefs.h.  */
10573
10574 /* Override any GCC internal prototype to avoid an error.
10575    Use char because int might match the return type of a GCC
10576    builtin and then its argument prototype would still apply.  */
10577 #ifdef __cplusplus
10578 extern "C"
10579 #endif
10580 char sigtimedwait ();
10581 int
10582 main ()
10583 {
10584 return sigtimedwait ();
10585   ;
10586   return 0;
10587 }
10588 _ACEOF
10589 if ac_fn_c_try_link "$LINENO"; then :
10590   ac_cv_lib_c_sigtimedwait=yes
10591 else
10592   ac_cv_lib_c_sigtimedwait=no
10593 fi
10594 rm -f core conftest.err conftest.$ac_objext \
10595     conftest$ac_exeext conftest.$ac_ext
10596 LIBS=$ac_check_lib_save_LIBS
10597 fi
10598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigtimedwait" >&5
10599 $as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
10600 if test "x$ac_cv_lib_c_sigtimedwait" = xyes; then :
10601   have_timedwait=yes
10602                   $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
10603
10604 fi
10605
10606     if test "$have_timedwait" = no ; then
10607       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lrt" >&5
10608 $as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
10609 if ${ac_cv_lib_rt_sigtimedwait+:} false; then :
10610   $as_echo_n "(cached) " >&6
10611 else
10612   ac_check_lib_save_LIBS=$LIBS
10613 LIBS="-lrt  $LIBS"
10614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10615 /* end confdefs.h.  */
10616
10617 /* Override any GCC internal prototype to avoid an error.
10618    Use char because int might match the return type of a GCC
10619    builtin and then its argument prototype would still apply.  */
10620 #ifdef __cplusplus
10621 extern "C"
10622 #endif
10623 char sigtimedwait ();
10624 int
10625 main ()
10626 {
10627 return sigtimedwait ();
10628   ;
10629   return 0;
10630 }
10631 _ACEOF
10632 if ac_fn_c_try_link "$LINENO"; then :
10633   ac_cv_lib_rt_sigtimedwait=yes
10634 else
10635   ac_cv_lib_rt_sigtimedwait=no
10636 fi
10637 rm -f core conftest.err conftest.$ac_objext \
10638     conftest$ac_exeext conftest.$ac_ext
10639 LIBS=$ac_check_lib_save_LIBS
10640 fi
10641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sigtimedwait" >&5
10642 $as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
10643 if test "x$ac_cv_lib_rt_sigtimedwait" = xyes; then :
10644   have_timedwait=yes
10645                                       $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
10646
10647                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
10648 fi
10649
10650     fi
10651
10652     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call pam_strerror" >&5
10653 $as_echo_n "checking how to call pam_strerror... " >&6; }
10654     if ${ac_cv_pam_strerror_args+:} false; then :
10655   $as_echo_n "(cached) " >&6
10656 else
10657
10658   ac_save_CPPFLAGS="$CPPFLAGS"
10659   if test \! -z "$includedir" ; then
10660     CPPFLAGS="$CPPFLAGS -I$includedir"
10661   fi
10662   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10663   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10664   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10665 /* end confdefs.h.  */
10666 #include <stdio.h>
10667                         #include <stdlib.h>
10668                         #include <security/pam_appl.h>
10669 int
10670 main ()
10671 {
10672 pam_handle_t *pamh = 0;
10673                         char *s = pam_strerror(pamh, PAM_SUCCESS);
10674   ;
10675   return 0;
10676 }
10677 _ACEOF
10678 if ac_fn_c_try_compile "$LINENO"; then :
10679   ac_pam_strerror_args=2
10680 else
10681
10682   ac_save_CPPFLAGS="$CPPFLAGS"
10683   if test \! -z "$includedir" ; then
10684     CPPFLAGS="$CPPFLAGS -I$includedir"
10685   fi
10686   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10687   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10689 /* end confdefs.h.  */
10690 #include <stdio.h>
10691                                           #include <stdlib.h>
10692                                           #include <security/pam_appl.h>
10693 int
10694 main ()
10695 {
10696 char *s =
10697                                            pam_strerror(PAM_SUCCESS);
10698   ;
10699   return 0;
10700 }
10701 _ACEOF
10702 if ac_fn_c_try_compile "$LINENO"; then :
10703   ac_pam_strerror_args=1
10704 else
10705   ac_pam_strerror_args=0
10706 fi
10707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10708   CPPFLAGS="$ac_save_CPPFLAGS"
10709 fi
10710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10711   CPPFLAGS="$ac_save_CPPFLAGS"
10712       ac_cv_pam_strerror_args=$ac_pam_strerror_args
10713 fi
10714
10715     ac_pam_strerror_args=$ac_cv_pam_strerror_args
10716     if test "$ac_pam_strerror_args" = 1 ; then
10717       { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
10718 $as_echo "one argument" >&6; }
10719     elif test "$ac_pam_strerror_args" = 2 ; then
10720       $as_echo "#define PAM_STRERROR_TWO_ARGS 1" >>confdefs.h
10721
10722       { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
10723 $as_echo "two arguments" >&6; }
10724     else
10725       { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
10726 $as_echo "unknown" >&6; }
10727     fi
10728
10729 # Check pam_fail_delay
10730     { $as_echo "$as_me:${as_lineno-$LINENO}: checking pam_fail_delay in -lpam" >&5
10731 $as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
10732     if ${ac_cv_pam_fail_delay+:} false; then :
10733   $as_echo_n "(cached) " >&6
10734 else
10735   ac_save_LDFLAGS="$LDFLAGS"
10736       LDFLAGS="-lpam"
10737       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10738 /* end confdefs.h.  */
10739 #include <security/pam_appl.h>
10740 int
10741 main ()
10742 {
10743 pam_handle_t *pamh = 0;
10744                    unsigned int usec = 1;
10745                    int status = pam_fail_delay (pamh, usec);
10746   ;
10747   return 0;
10748 }
10749 _ACEOF
10750 if ac_fn_c_try_link "$LINENO"; then :
10751   ac_pam_fail_delay=yes
10752 else
10753   ac_pam_fail_delay=no
10754 fi
10755 rm -f core conftest.err conftest.$ac_objext \
10756     conftest$ac_exeext conftest.$ac_ext
10757       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
10758       LDFLAGS=$ac_save_LDFLAGS
10759 fi
10760
10761
10762       if test "$ac_pam_fail_delay" = yes ; then
10763         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10764 $as_echo "yes" >&6; }
10765         $as_echo "#define HAVE_PAM_FAIL_DELAY 1" >>confdefs.h
10766
10767       else
10768         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10769 $as_echo "no" >&6; }
10770       fi
10771
10772   fi
10773 fi
10774
10775
10776 ###############################################################################
10777 #
10778 #       Check for Kerberos.
10779 #
10780 ###############################################################################
10781
10782 have_kerberos=no
10783 have_kerberos5=no
10784 with_kerberos_req=unspecified
10785
10786
10787 # Check whether --with-kerberos was given.
10788 if test "${with_kerberos+set}" = set; then :
10789   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
10790 else
10791   with_kerberos=yes
10792 fi
10793
10794
10795
10796    case "$with_kerberos" in
10797     yes) ;;
10798     no)  ;;
10799
10800     /*)
10801      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos headers" >&5
10802 $as_echo_n "checking for Kerberos headers... " >&6; }
10803      d=$with_kerberos/include
10804      if test -d $d; then
10805        X_CFLAGS="-I$d $X_CFLAGS"
10806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10807 $as_echo "$d" >&6; }
10808      else
10809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10810 $as_echo "not found ($d: no such directory)" >&6; }
10811      fi
10812
10813      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos libs" >&5
10814 $as_echo_n "checking for Kerberos libs... " >&6; }
10815      d=$with_kerberos/lib
10816      if test -d $d; then
10817        X_LIBS="-L$d $X_LIBS"
10818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10819 $as_echo "$d" >&6; }
10820      else
10821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10822 $as_echo "not found ($d: no such directory)" >&6; }
10823      fi
10824
10825      # replace the directory string with "yes".
10826      with_kerberos_req="yes"
10827      with_kerberos=$with_kerberos_req
10828      ;;
10829
10830     *)
10831      echo ""
10832      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
10833      echo "       If it is a directory, then \`DIR/include' will be added to"
10834      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10835      exit 1
10836      ;;
10837    esac
10838
10839
10840 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
10841   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 4" >&5
10842 $as_echo_n "checking for Kerberos 4... " >&6; }
10843 if ${ac_cv_kerberos+:} false; then :
10844   $as_echo_n "(cached) " >&6
10845 else
10846
10847   ac_save_CPPFLAGS="$CPPFLAGS"
10848   if test \! -z "$includedir" ; then
10849     CPPFLAGS="$CPPFLAGS -I$includedir"
10850   fi
10851   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10852   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10853   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10854 /* end confdefs.h.  */
10855 #include <krb.h>
10856 int
10857 main ()
10858 {
10859
10860   ;
10861   return 0;
10862 }
10863 _ACEOF
10864 if ac_fn_c_try_compile "$LINENO"; then :
10865   ac_cv_kerberos=yes
10866 else
10867   ac_cv_kerberos=no
10868 fi
10869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10870   CPPFLAGS="$ac_save_CPPFLAGS"
10871 fi
10872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos" >&5
10873 $as_echo "$ac_cv_kerberos" >&6; }
10874   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 5" >&5
10875 $as_echo_n "checking for Kerberos 5... " >&6; }
10876 if ${ac_cv_kerberos5+:} false; then :
10877   $as_echo_n "(cached) " >&6
10878 else
10879
10880   ac_save_CPPFLAGS="$CPPFLAGS"
10881   if test \! -z "$includedir" ; then
10882     CPPFLAGS="$CPPFLAGS -I$includedir"
10883   fi
10884   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10885   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10887 /* end confdefs.h.  */
10888 #include <kerberosIV/krb.h>
10889 int
10890 main ()
10891 {
10892
10893   ;
10894   return 0;
10895 }
10896 _ACEOF
10897 if ac_fn_c_try_compile "$LINENO"; then :
10898   ac_cv_kerberos5=yes
10899 else
10900   ac_cv_kerberos5=no
10901 fi
10902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10903   CPPFLAGS="$ac_save_CPPFLAGS"
10904 fi
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos5" >&5
10906 $as_echo "$ac_cv_kerberos5" >&6; }
10907
10908   if test "$ac_cv_kerberos" = yes ; then
10909     have_kerberos=yes
10910     $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10911
10912   fi
10913
10914   if test "$ac_cv_kerberos5" = yes ; then
10915
10916     # Andrew Snare <ajs@pigpond.com> wrote:
10917     #
10918     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
10919     # (krb4) was also available.  This turns out not to be the case with
10920     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
10921     # is optional.
10922     #
10923     # So, disable kerberosV support if libkrb4 can't be found.
10924     # This is not the best solution, but it makes the compile not fail.
10925     #
10926
10927   ac_save_CPPFLAGS="$CPPFLAGS"
10928   ac_save_LDFLAGS="$LDFLAGS"
10929 #  ac_save_LIBS="$LIBS"
10930
10931   if test \! -z "$includedir" ; then
10932     CPPFLAGS="$CPPFLAGS -I$includedir"
10933   fi
10934   # note: $X_CFLAGS includes $x_includes
10935   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10936
10937   if test \! -z "$libdir" ; then
10938     LDFLAGS="$LDFLAGS -L$libdir"
10939   fi
10940   # note: $X_LIBS includes $x_libraries
10941   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10942
10943   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10944   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10945   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_tf_realm in -lkrb4" >&5
10946 $as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
10947 if ${ac_cv_lib_krb4_krb_get_tf_realm+:} false; then :
10948   $as_echo_n "(cached) " >&6
10949 else
10950   ac_check_lib_save_LIBS=$LIBS
10951 LIBS="-lkrb4  $LIBS"
10952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10953 /* end confdefs.h.  */
10954
10955 /* Override any GCC internal prototype to avoid an error.
10956    Use char because int might match the return type of a GCC
10957    builtin and then its argument prototype would still apply.  */
10958 #ifdef __cplusplus
10959 extern "C"
10960 #endif
10961 char krb_get_tf_realm ();
10962 int
10963 main ()
10964 {
10965 return krb_get_tf_realm ();
10966   ;
10967   return 0;
10968 }
10969 _ACEOF
10970 if ac_fn_c_try_link "$LINENO"; then :
10971   ac_cv_lib_krb4_krb_get_tf_realm=yes
10972 else
10973   ac_cv_lib_krb4_krb_get_tf_realm=no
10974 fi
10975 rm -f core conftest.err conftest.$ac_objext \
10976     conftest$ac_exeext conftest.$ac_ext
10977 LIBS=$ac_check_lib_save_LIBS
10978 fi
10979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
10980 $as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
10981 if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = xyes; then :
10982   have_kerberos=yes
10983 else
10984   have_kerberos=no
10985 fi
10986
10987   CPPFLAGS="$ac_save_CPPFLAGS"
10988   LDFLAGS="$ac_save_LDFLAGS"
10989 #  LIBS="$ac_save_LIBS"
10990
10991     if test "$have_kerberos" = yes ; then
10992       have_kerberos5=yes
10993       $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10994
10995       $as_echo "#define HAVE_KERBEROS5 1" >>confdefs.h
10996
10997     else
10998       have_kerberos5=no
10999       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
11000 $as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
11001     fi
11002
11003   fi
11004
11005   if test "$have_kerberos5" = yes ; then
11006     # from Matt Knopp <mhat@infocalypse.netlag.com>
11007     # (who got it from amu@mit.edu)
11008
11009     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
11010
11011     # jwz: MacOS X uses -lkrb5, but not -lcrypt
11012
11013   ac_save_CPPFLAGS="$CPPFLAGS"
11014   ac_save_LDFLAGS="$LDFLAGS"
11015 #  ac_save_LIBS="$LIBS"
11016
11017   if test \! -z "$includedir" ; then
11018     CPPFLAGS="$CPPFLAGS -I$includedir"
11019   fi
11020   # note: $X_CFLAGS includes $x_includes
11021   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11022
11023   if test \! -z "$libdir" ; then
11024     LDFLAGS="$LDFLAGS -L$libdir"
11025   fi
11026   # note: $X_LIBS includes $x_libraries
11027   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11028
11029   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11030   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11031   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11032 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
11033 if ${ac_cv_lib_crypt_crypt+:} false; then :
11034   $as_echo_n "(cached) " >&6
11035 else
11036   ac_check_lib_save_LIBS=$LIBS
11037 LIBS="-lcrypt  $LIBS"
11038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11039 /* end confdefs.h.  */
11040
11041 /* Override any GCC internal prototype to avoid an error.
11042    Use char because int might match the return type of a GCC
11043    builtin and then its argument prototype would still apply.  */
11044 #ifdef __cplusplus
11045 extern "C"
11046 #endif
11047 char crypt ();
11048 int
11049 main ()
11050 {
11051 return crypt ();
11052   ;
11053   return 0;
11054 }
11055 _ACEOF
11056 if ac_fn_c_try_link "$LINENO"; then :
11057   ac_cv_lib_crypt_crypt=yes
11058 else
11059   ac_cv_lib_crypt_crypt=no
11060 fi
11061 rm -f core conftest.err conftest.$ac_objext \
11062     conftest$ac_exeext conftest.$ac_ext
11063 LIBS=$ac_check_lib_save_LIBS
11064 fi
11065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
11066 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11067 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
11068   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11069 fi
11070
11071   CPPFLAGS="$ac_save_CPPFLAGS"
11072   LDFLAGS="$ac_save_LDFLAGS"
11073 #  LIBS="$ac_save_LIBS"
11074
11075
11076   elif test "$have_kerberos" = yes ; then
11077     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
11078     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
11079   fi
11080
11081   if test "$have_kerberos" = yes ; then
11082     ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
11083 if test "x$ac_cv_func_res_search" = xyes; then :
11084
11085 else
11086   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
11087 $as_echo_n "checking for res_search in -lresolv... " >&6; }
11088 if ${ac_cv_lib_resolv_res_search+:} false; then :
11089   $as_echo_n "(cached) " >&6
11090 else
11091   ac_check_lib_save_LIBS=$LIBS
11092 LIBS="-lresolv  $LIBS"
11093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11094 /* end confdefs.h.  */
11095
11096 /* Override any GCC internal prototype to avoid an error.
11097    Use char because int might match the return type of a GCC
11098    builtin and then its argument prototype would still apply.  */
11099 #ifdef __cplusplus
11100 extern "C"
11101 #endif
11102 char res_search ();
11103 int
11104 main ()
11105 {
11106 return res_search ();
11107   ;
11108   return 0;
11109 }
11110 _ACEOF
11111 if ac_fn_c_try_link "$LINENO"; then :
11112   ac_cv_lib_resolv_res_search=yes
11113 else
11114   ac_cv_lib_resolv_res_search=no
11115 fi
11116 rm -f core conftest.err conftest.$ac_objext \
11117     conftest$ac_exeext conftest.$ac_ext
11118 LIBS=$ac_check_lib_save_LIBS
11119 fi
11120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
11121 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
11122 if test "x$ac_cv_lib_resolv_res_search" = xyes; then :
11123   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
11124 else
11125   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
11126 $as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
11127
11128 fi
11129
11130 fi
11131
11132   fi
11133 fi
11134
11135
11136 ###############################################################################
11137 #
11138 #       Check for the nine billion variants of shadow passwords...
11139 #
11140 ###############################################################################
11141
11142 need_setuid=no
11143
11144 have_shadow=no
11145 with_shadow_req=unspecified
11146
11147
11148 # Check whether --with-shadow was given.
11149 if test "${with_shadow+set}" = set; then :
11150   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
11151 else
11152   with_shadow=yes
11153 fi
11154
11155
11156
11157    case "$with_shadow" in
11158     yes) ;;
11159     no)  ;;
11160
11161     /*)
11162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password headers" >&5
11163 $as_echo_n "checking for shadow password headers... " >&6; }
11164      d=$with_shadow/include
11165      if test -d $d; then
11166        X_CFLAGS="-I$d $X_CFLAGS"
11167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11168 $as_echo "$d" >&6; }
11169      else
11170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11171 $as_echo "not found ($d: no such directory)" >&6; }
11172      fi
11173
11174      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password libs" >&5
11175 $as_echo_n "checking for shadow password libs... " >&6; }
11176      d=$with_shadow/lib
11177      if test -d $d; then
11178        X_LIBS="-L$d $X_LIBS"
11179        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11180 $as_echo "$d" >&6; }
11181      else
11182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11183 $as_echo "not found ($d: no such directory)" >&6; }
11184      fi
11185
11186      # replace the directory string with "yes".
11187      with_shadow_req="yes"
11188      with_shadow=$with_shadow_req
11189      ;;
11190
11191     *)
11192      echo ""
11193      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
11194      echo "       If it is a directory, then \`DIR/include' will be added to"
11195      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11196      exit 1
11197      ;;
11198    esac
11199
11200
11201 if test "$enable_locking" = no ; then
11202   with_shadow_req=no
11203   with_shadow=no
11204 fi
11205
11206
11207 ###############################################################################
11208 #
11209 #       Check for Sun "adjunct" passwords.
11210 #
11211 ###############################################################################
11212
11213 if test "$with_shadow" = yes ; then
11214   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sun-style shadow passwords" >&5
11215 $as_echo_n "checking for Sun-style shadow passwords... " >&6; }
11216 if ${ac_cv_sun_adjunct+:} false; then :
11217   $as_echo_n "(cached) " >&6
11218 else
11219
11220   ac_save_CPPFLAGS="$CPPFLAGS"
11221   if test \! -z "$includedir" ; then
11222     CPPFLAGS="$CPPFLAGS -I$includedir"
11223   fi
11224   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11225   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11226   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11227 /* end confdefs.h.  */
11228 #include <stdlib.h>
11229                                     #include <unistd.h>
11230                                     #include <sys/types.h>
11231                                     #include <sys/label.h>
11232                                     #include <sys/audit.h>
11233                                     #include <pwdadj.h>
11234 int
11235 main ()
11236 {
11237 struct passwd_adjunct *p = getpwanam("nobody");
11238                        const char *pw = p->pwa_passwd;
11239   ;
11240   return 0;
11241 }
11242 _ACEOF
11243 if ac_fn_c_try_compile "$LINENO"; then :
11244   ac_cv_sun_adjunct=yes
11245 else
11246   ac_cv_sun_adjunct=no
11247 fi
11248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11249   CPPFLAGS="$ac_save_CPPFLAGS"
11250 fi
11251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sun_adjunct" >&5
11252 $as_echo "$ac_cv_sun_adjunct" >&6; }
11253   if test "$ac_cv_sun_adjunct" = yes; then
11254     have_shadow_adjunct=yes
11255     have_shadow=yes
11256     need_setuid=yes
11257   fi
11258 fi
11259
11260
11261 ###############################################################################
11262 #
11263 #       Check for DEC and SCO so-called "enhanced" security.
11264 #
11265 ###############################################################################
11266
11267 if test "$with_shadow" = yes ; then
11268   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DEC-style shadow passwords" >&5
11269 $as_echo_n "checking for DEC-style shadow passwords... " >&6; }
11270 if ${ac_cv_enhanced_passwd+:} false; then :
11271   $as_echo_n "(cached) " >&6
11272 else
11273
11274   ac_save_CPPFLAGS="$CPPFLAGS"
11275   if test \! -z "$includedir" ; then
11276     CPPFLAGS="$CPPFLAGS -I$includedir"
11277   fi
11278   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11279   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11281 /* end confdefs.h.  */
11282 #include <stdlib.h>
11283                                     #include <unistd.h>
11284                                     #include <sys/types.h>
11285                                     #include <pwd.h>
11286                                     #include <sys/security.h>
11287                                     #include <prot.h>
11288 int
11289 main ()
11290 {
11291 struct pr_passwd *p;
11292                        const char *pw;
11293                        set_auth_parameters(0, 0);
11294                        check_auth_parameters();
11295                        p = getprpwnam("nobody");
11296                        pw = p->ufld.fd_encrypt;
11297   ;
11298   return 0;
11299 }
11300 _ACEOF
11301 if ac_fn_c_try_compile "$LINENO"; then :
11302   ac_cv_enhanced_passwd=yes
11303 else
11304   ac_cv_enhanced_passwd=no
11305 fi
11306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11307   CPPFLAGS="$ac_save_CPPFLAGS"
11308 fi
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enhanced_passwd" >&5
11310 $as_echo "$ac_cv_enhanced_passwd" >&6; }
11311   if test $ac_cv_enhanced_passwd = yes; then
11312     have_shadow_enhanced=yes
11313     have_shadow=yes
11314     need_setuid=yes
11315
11316     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
11317     # (I'm told it needs -lcurses too, but I don't understand why.)
11318     # But on DEC, it's in -lsecurity.
11319     #
11320     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lprot" >&5
11321 $as_echo_n "checking for getprpwnam in -lprot... " >&6; }
11322 if ${ac_cv_lib_prot_getprpwnam+:} false; then :
11323   $as_echo_n "(cached) " >&6
11324 else
11325   ac_check_lib_save_LIBS=$LIBS
11326 LIBS="-lprot -lx $LIBS"
11327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11328 /* end confdefs.h.  */
11329
11330 /* Override any GCC internal prototype to avoid an error.
11331    Use char because int might match the return type of a GCC
11332    builtin and then its argument prototype would still apply.  */
11333 #ifdef __cplusplus
11334 extern "C"
11335 #endif
11336 char getprpwnam ();
11337 int
11338 main ()
11339 {
11340 return getprpwnam ();
11341   ;
11342   return 0;
11343 }
11344 _ACEOF
11345 if ac_fn_c_try_link "$LINENO"; then :
11346   ac_cv_lib_prot_getprpwnam=yes
11347 else
11348   ac_cv_lib_prot_getprpwnam=no
11349 fi
11350 rm -f core conftest.err conftest.$ac_objext \
11351     conftest$ac_exeext conftest.$ac_ext
11352 LIBS=$ac_check_lib_save_LIBS
11353 fi
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getprpwnam" >&5
11355 $as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
11356 if test "x$ac_cv_lib_prot_getprpwnam" = xyes; then :
11357   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
11358 else
11359   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lsecurity" >&5
11360 $as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
11361 if ${ac_cv_lib_security_getprpwnam+:} false; then :
11362   $as_echo_n "(cached) " >&6
11363 else
11364   ac_check_lib_save_LIBS=$LIBS
11365 LIBS="-lsecurity  $LIBS"
11366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11367 /* end confdefs.h.  */
11368
11369 /* Override any GCC internal prototype to avoid an error.
11370    Use char because int might match the return type of a GCC
11371    builtin and then its argument prototype would still apply.  */
11372 #ifdef __cplusplus
11373 extern "C"
11374 #endif
11375 char getprpwnam ();
11376 int
11377 main ()
11378 {
11379 return getprpwnam ();
11380   ;
11381   return 0;
11382 }
11383 _ACEOF
11384 if ac_fn_c_try_link "$LINENO"; then :
11385   ac_cv_lib_security_getprpwnam=yes
11386 else
11387   ac_cv_lib_security_getprpwnam=no
11388 fi
11389 rm -f core conftest.err conftest.$ac_objext \
11390     conftest$ac_exeext conftest.$ac_ext
11391 LIBS=$ac_check_lib_save_LIBS
11392 fi
11393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_getprpwnam" >&5
11394 $as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
11395 if test "x$ac_cv_lib_security_getprpwnam" = xyes; then :
11396   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
11397 fi
11398
11399 fi
11400
11401   fi
11402 fi
11403
11404 ###############################################################################
11405 #
11406 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
11407 #
11408 ###############################################################################
11409
11410 if test "$with_shadow" = yes ; then
11411   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HP-style shadow passwords" >&5
11412 $as_echo_n "checking for HP-style shadow passwords... " >&6; }
11413 if ${ac_cv_hpux_passwd+:} false; then :
11414   $as_echo_n "(cached) " >&6
11415 else
11416
11417   ac_save_CPPFLAGS="$CPPFLAGS"
11418   if test \! -z "$includedir" ; then
11419     CPPFLAGS="$CPPFLAGS -I$includedir"
11420   fi
11421   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11422   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11424 /* end confdefs.h.  */
11425 #include <stdlib.h>
11426                                     #include <unistd.h>
11427                                     #include <sys/types.h>
11428                                     #include <pwd.h>
11429                                     #include <hpsecurity.h>
11430                                     #include <prot.h>
11431 int
11432 main ()
11433 {
11434 struct s_passwd *p = getspwnam("nobody");
11435                        const char *pw = p->pw_passwd;
11436   ;
11437   return 0;
11438 }
11439 _ACEOF
11440 if ac_fn_c_try_compile "$LINENO"; then :
11441   ac_cv_hpux_passwd=yes
11442 else
11443   ac_cv_hpux_passwd=no
11444 fi
11445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11446   CPPFLAGS="$ac_save_CPPFLAGS"
11447 fi
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_hpux_passwd" >&5
11449 $as_echo "$ac_cv_hpux_passwd" >&6; }
11450   if test "$ac_cv_hpux_passwd" = yes; then
11451     have_shadow_hpux=yes
11452     have_shadow=yes
11453     need_setuid=yes
11454
11455     # on HPUX, bigcrypt is in -lsec
11456     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsec" >&5
11457 $as_echo_n "checking for bigcrypt in -lsec... " >&6; }
11458 if ${ac_cv_lib_sec_bigcrypt+:} false; then :
11459   $as_echo_n "(cached) " >&6
11460 else
11461   ac_check_lib_save_LIBS=$LIBS
11462 LIBS="-lsec  $LIBS"
11463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11464 /* end confdefs.h.  */
11465
11466 /* Override any GCC internal prototype to avoid an error.
11467    Use char because int might match the return type of a GCC
11468    builtin and then its argument prototype would still apply.  */
11469 #ifdef __cplusplus
11470 extern "C"
11471 #endif
11472 char bigcrypt ();
11473 int
11474 main ()
11475 {
11476 return bigcrypt ();
11477   ;
11478   return 0;
11479 }
11480 _ACEOF
11481 if ac_fn_c_try_link "$LINENO"; then :
11482   ac_cv_lib_sec_bigcrypt=yes
11483 else
11484   ac_cv_lib_sec_bigcrypt=no
11485 fi
11486 rm -f core conftest.err conftest.$ac_objext \
11487     conftest$ac_exeext conftest.$ac_ext
11488 LIBS=$ac_check_lib_save_LIBS
11489 fi
11490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_bigcrypt" >&5
11491 $as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
11492 if test "x$ac_cv_lib_sec_bigcrypt" = xyes; then :
11493   PASSWD_LIBS="$PASSWD_LIBS -lsec"
11494 fi
11495
11496   fi
11497 fi
11498
11499
11500 ###############################################################################
11501 #
11502 #       Check for FreeBSD-style shadow passwords.
11503 #
11504 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
11505 #       password systems -- except you only get stuff in the pw_passwd field
11506 #       if the running program is setuid.  So, guess that we've got this
11507 #       lossage to contend with if /etc/master.passwd exists, and default to
11508 #       a setuid installation.
11509 #
11510 ###############################################################################
11511
11512 if test "$with_shadow" = yes ; then
11513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeBSD-style shadow passwords" >&5
11514 $as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
11515 if ${ac_cv_master_passwd+:} false; then :
11516   $as_echo_n "(cached) " >&6
11517 else
11518   if test -f /etc/master.passwd ; then
11519                     ac_cv_master_passwd=yes
11520                   else
11521                     ac_cv_master_passwd=no
11522                   fi
11523 fi
11524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_master_passwd" >&5
11525 $as_echo "$ac_cv_master_passwd" >&6; }
11526   if test "$ac_cv_master_passwd" = yes; then
11527     need_setuid=yes
11528   fi
11529 fi
11530
11531
11532 ###############################################################################
11533 #
11534 #       Check for traditional (ha!) shadow passwords.
11535 #
11536 ###############################################################################
11537
11538 if test "$with_shadow" = yes ; then
11539   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic shadow passwords" >&5
11540 $as_echo_n "checking for generic shadow passwords... " >&6; }
11541 if ${ac_cv_shadow+:} false; then :
11542   $as_echo_n "(cached) " >&6
11543 else
11544
11545   ac_save_CPPFLAGS="$CPPFLAGS"
11546   if test \! -z "$includedir" ; then
11547     CPPFLAGS="$CPPFLAGS -I$includedir"
11548   fi
11549   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11550   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11552 /* end confdefs.h.  */
11553 #include <stdlib.h>
11554                                     #include <unistd.h>
11555                                     #include <sys/types.h>
11556                                     #include <pwd.h>
11557                                     #include <shadow.h>
11558 int
11559 main ()
11560 {
11561 struct spwd *p = getspnam("nobody");
11562                        const char *pw = p->sp_pwdp;
11563   ;
11564   return 0;
11565 }
11566 _ACEOF
11567 if ac_fn_c_try_compile "$LINENO"; then :
11568   ac_cv_shadow=yes
11569 else
11570   ac_cv_shadow=no
11571 fi
11572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11573   CPPFLAGS="$ac_save_CPPFLAGS"
11574 fi
11575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_shadow" >&5
11576 $as_echo "$ac_cv_shadow" >&6; }
11577   if test "$ac_cv_shadow" = yes; then
11578     have_shadow=yes
11579     need_setuid=yes
11580
11581     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
11582     have_getspnam=no
11583     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lc" >&5
11584 $as_echo_n "checking for getspnam in -lc... " >&6; }
11585 if ${ac_cv_lib_c_getspnam+:} false; then :
11586   $as_echo_n "(cached) " >&6
11587 else
11588   ac_check_lib_save_LIBS=$LIBS
11589 LIBS="-lc  $LIBS"
11590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11591 /* end confdefs.h.  */
11592
11593 /* Override any GCC internal prototype to avoid an error.
11594    Use char because int might match the return type of a GCC
11595    builtin and then its argument prototype would still apply.  */
11596 #ifdef __cplusplus
11597 extern "C"
11598 #endif
11599 char getspnam ();
11600 int
11601 main ()
11602 {
11603 return getspnam ();
11604   ;
11605   return 0;
11606 }
11607 _ACEOF
11608 if ac_fn_c_try_link "$LINENO"; then :
11609   ac_cv_lib_c_getspnam=yes
11610 else
11611   ac_cv_lib_c_getspnam=no
11612 fi
11613 rm -f core conftest.err conftest.$ac_objext \
11614     conftest$ac_exeext conftest.$ac_ext
11615 LIBS=$ac_check_lib_save_LIBS
11616 fi
11617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_getspnam" >&5
11618 $as_echo "$ac_cv_lib_c_getspnam" >&6; }
11619 if test "x$ac_cv_lib_c_getspnam" = xyes; then :
11620   have_getspnam=yes
11621 fi
11622
11623     if test "$have_getspnam" = no ; then
11624       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
11625 $as_echo_n "checking for getspnam in -lgen... " >&6; }
11626 if ${ac_cv_lib_gen_getspnam+:} false; then :
11627   $as_echo_n "(cached) " >&6
11628 else
11629   ac_check_lib_save_LIBS=$LIBS
11630 LIBS="-lgen  $LIBS"
11631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11632 /* end confdefs.h.  */
11633
11634 /* Override any GCC internal prototype to avoid an error.
11635    Use char because int might match the return type of a GCC
11636    builtin and then its argument prototype would still apply.  */
11637 #ifdef __cplusplus
11638 extern "C"
11639 #endif
11640 char getspnam ();
11641 int
11642 main ()
11643 {
11644 return getspnam ();
11645   ;
11646   return 0;
11647 }
11648 _ACEOF
11649 if ac_fn_c_try_link "$LINENO"; then :
11650   ac_cv_lib_gen_getspnam=yes
11651 else
11652   ac_cv_lib_gen_getspnam=no
11653 fi
11654 rm -f core conftest.err conftest.$ac_objext \
11655     conftest$ac_exeext conftest.$ac_ext
11656 LIBS=$ac_check_lib_save_LIBS
11657 fi
11658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
11659 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
11660 if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
11661   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
11662 fi
11663
11664     fi
11665   fi
11666 fi
11667
11668
11669 ###############################################################################
11670 #
11671 #       Check for other libraries needed for non-shadow passwords.
11672 #
11673 ###############################################################################
11674
11675 if test "$enable_locking" = yes ; then
11676
11677   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
11678   have_crypt=no
11679   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lc" >&5
11680 $as_echo_n "checking for crypt in -lc... " >&6; }
11681 if ${ac_cv_lib_c_crypt+:} false; then :
11682   $as_echo_n "(cached) " >&6
11683 else
11684   ac_check_lib_save_LIBS=$LIBS
11685 LIBS="-lc  $LIBS"
11686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11687 /* end confdefs.h.  */
11688
11689 /* Override any GCC internal prototype to avoid an error.
11690    Use char because int might match the return type of a GCC
11691    builtin and then its argument prototype would still apply.  */
11692 #ifdef __cplusplus
11693 extern "C"
11694 #endif
11695 char crypt ();
11696 int
11697 main ()
11698 {
11699 return crypt ();
11700   ;
11701   return 0;
11702 }
11703 _ACEOF
11704 if ac_fn_c_try_link "$LINENO"; then :
11705   ac_cv_lib_c_crypt=yes
11706 else
11707   ac_cv_lib_c_crypt=no
11708 fi
11709 rm -f core conftest.err conftest.$ac_objext \
11710     conftest$ac_exeext conftest.$ac_ext
11711 LIBS=$ac_check_lib_save_LIBS
11712 fi
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_crypt" >&5
11714 $as_echo "$ac_cv_lib_c_crypt" >&6; }
11715 if test "x$ac_cv_lib_c_crypt" = xyes; then :
11716   have_crypt=yes
11717 fi
11718
11719   if test "$have_crypt" = no ; then
11720     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11721 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
11722 if ${ac_cv_lib_crypt_crypt+:} false; then :
11723   $as_echo_n "(cached) " >&6
11724 else
11725   ac_check_lib_save_LIBS=$LIBS
11726 LIBS="-lcrypt  $LIBS"
11727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11728 /* end confdefs.h.  */
11729
11730 /* Override any GCC internal prototype to avoid an error.
11731    Use char because int might match the return type of a GCC
11732    builtin and then its argument prototype would still apply.  */
11733 #ifdef __cplusplus
11734 extern "C"
11735 #endif
11736 char crypt ();
11737 int
11738 main ()
11739 {
11740 return crypt ();
11741   ;
11742   return 0;
11743 }
11744 _ACEOF
11745 if ac_fn_c_try_link "$LINENO"; then :
11746   ac_cv_lib_crypt_crypt=yes
11747 else
11748   ac_cv_lib_crypt_crypt=no
11749 fi
11750 rm -f core conftest.err conftest.$ac_objext \
11751     conftest$ac_exeext conftest.$ac_ext
11752 LIBS=$ac_check_lib_save_LIBS
11753 fi
11754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
11755 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11756 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
11757   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11758 fi
11759
11760   fi
11761 fi
11762
11763
11764 # Most of the above shadow mechanisms will have set need_setuid to yes,
11765 # if they were found.  But, on some systems, we need setuid even when
11766 # using plain old vanilla passwords.
11767 #
11768 if test "$enable_locking" = yes ; then
11769   case "$host" in
11770     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
11771       need_setuid=yes
11772     ;;
11773   esac
11774 fi
11775
11776
11777 if test "$have_shadow_adjunct" = yes ; then
11778   $as_echo "#define HAVE_ADJUNCT_PASSWD 1" >>confdefs.h
11779
11780 elif test "$have_shadow_enhanced" = yes ; then
11781   $as_echo "#define HAVE_ENHANCED_PASSWD 1" >>confdefs.h
11782
11783 elif test "$have_shadow_hpux" = yes ; then
11784   $as_echo "#define HAVE_HPUX_PASSWD 1" >>confdefs.h
11785
11786 elif test "$have_shadow" = yes ; then
11787   $as_echo "#define HAVE_SHADOW_PASSWD 1" >>confdefs.h
11788
11789 fi
11790
11791
11792 ###############################################################################
11793 #
11794 #       Check for external password helper
11795 #       On SuSE, instead of having xscreensaver be a setuid program, they
11796 #       fork an external program that takes the password on stdin, and
11797 #       returns true if that password is a valid one.  Then only that
11798 #       smaller program needs to be setuid.
11799 #
11800 #       (Note that this external program is not a GUI: the GUI is still
11801 #       all in xscreensaver itself; the external program just does auth.)
11802 #
11803 ###############################################################################
11804
11805 have_passwd_helper=no
11806 with_passwd_helper_req=unspecified
11807
11808
11809 # Check whether --with-passwd-helper was given.
11810 if test "${with_passwd_helper+set}" = set; then :
11811   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
11812 else
11813   with_passwd_helper=no
11814 fi
11815
11816 # no HANDLE_X_PATH_ARG for this one
11817
11818 if test "$enable_locking" = no ; then
11819   with_passwd_helper_req=no
11820   with_passwd_helper=no
11821 fi
11822
11823 case "$with_passwd_helper" in
11824   ""|no) : ;;
11825   /*)
11826     cat >>confdefs.h <<_ACEOF
11827 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
11828 _ACEOF
11829
11830     have_passwd_helper=yes;;
11831   *)
11832     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
11833     exit 1
11834 esac
11835
11836
11837 ###############################################################################
11838 #
11839 #       Check for a login manager for a "New Login" button on the lock dialog.
11840 #       Usually this will be "/usr/bin/gdmflexiserver".
11841 #
11842 ###############################################################################
11843
11844 with_login_manager_req=unspecified
11845 default_login_manager_1='gdmflexiserver -ls'
11846 default_login_manager_2='kdmctl reserve'
11847 default_login_manager_3='lxdm -c USER_SWITCH'
11848 default_login_manager_4='dm-tool switch-to-greeter'
11849
11850
11851 # Check whether --with-login-manager was given.
11852 if test "${with_login_manager+set}" = set; then :
11853   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
11854 else
11855   with_login_manager=yes
11856 fi
11857
11858 # no HANDLE_X_PATH_ARG for this one
11859
11860 if test "$enable_locking" = no ; then
11861   with_login_manager_req=no
11862   with_login_manager=no
11863 fi
11864
11865 case "$with_login_manager_req" in
11866   no)
11867     with_login_manager=""
11868   ;;
11869
11870   yes|unspecified)
11871     # Try various defaults, use the first one that exists.
11872
11873     with_login_manager=""
11874
11875     if test -z "$with_login_manager" ; then
11876       set dummy $default_login_manager_1 ; login_manager_tmp=$2
11877       unset ac_cv_path_login_manager_tmp  # don't cache
11878       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11879 set dummy $login_manager_tmp; ac_word=$2
11880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11881 $as_echo_n "checking for $ac_word... " >&6; }
11882 if ${ac_cv_path_login_manager_tmp+:} false; then :
11883   $as_echo_n "(cached) " >&6
11884 else
11885   case $login_manager_tmp in
11886   [\\/]* | ?:[\\/]*)
11887   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11888   ;;
11889   *)
11890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11891 for as_dir in $PATH
11892 do
11893   IFS=$as_save_IFS
11894   test -z "$as_dir" && as_dir=.
11895     for ac_exec_ext in '' $ac_executable_extensions; do
11896   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11897     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11899     break 2
11900   fi
11901 done
11902   done
11903 IFS=$as_save_IFS
11904
11905   ;;
11906 esac
11907 fi
11908 login_manager_tmp=$ac_cv_path_login_manager_tmp
11909 if test -n "$login_manager_tmp"; then
11910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11911 $as_echo "$login_manager_tmp" >&6; }
11912 else
11913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11914 $as_echo "no" >&6; }
11915 fi
11916
11917
11918       if test ! -z "$login_manager_tmp" ; then
11919         with_login_manager="$default_login_manager_1"
11920       fi
11921     fi
11922
11923     if test -z "$with_login_manager" ; then
11924       set dummy $default_login_manager_2 ; login_manager_tmp=$2
11925       unset ac_cv_path_login_manager_tmp  # don't cache
11926       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11927 set dummy $login_manager_tmp; ac_word=$2
11928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11929 $as_echo_n "checking for $ac_word... " >&6; }
11930 if ${ac_cv_path_login_manager_tmp+:} false; then :
11931   $as_echo_n "(cached) " >&6
11932 else
11933   case $login_manager_tmp in
11934   [\\/]* | ?:[\\/]*)
11935   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11936   ;;
11937   *)
11938   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11939 for as_dir in $PATH
11940 do
11941   IFS=$as_save_IFS
11942   test -z "$as_dir" && as_dir=.
11943     for ac_exec_ext in '' $ac_executable_extensions; do
11944   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11945     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11946     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11947     break 2
11948   fi
11949 done
11950   done
11951 IFS=$as_save_IFS
11952
11953   ;;
11954 esac
11955 fi
11956 login_manager_tmp=$ac_cv_path_login_manager_tmp
11957 if test -n "$login_manager_tmp"; then
11958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11959 $as_echo "$login_manager_tmp" >&6; }
11960 else
11961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11962 $as_echo "no" >&6; }
11963 fi
11964
11965
11966       if test ! -z "$login_manager_tmp" ; then
11967         with_login_manager="$default_login_manager_2"
11968       fi
11969     fi
11970
11971     if test -z "$with_login_manager" ; then
11972       set dummy $default_login_manager_3 ; login_manager_tmp=$2
11973       unset ac_cv_path_login_manager_tmp  # don't cache
11974       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11975 set dummy $login_manager_tmp; ac_word=$2
11976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11977 $as_echo_n "checking for $ac_word... " >&6; }
11978 if ${ac_cv_path_login_manager_tmp+:} false; then :
11979   $as_echo_n "(cached) " >&6
11980 else
11981   case $login_manager_tmp in
11982   [\\/]* | ?:[\\/]*)
11983   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11984   ;;
11985   *)
11986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11987 for as_dir in $PATH
11988 do
11989   IFS=$as_save_IFS
11990   test -z "$as_dir" && as_dir=.
11991     for ac_exec_ext in '' $ac_executable_extensions; do
11992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11993     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11995     break 2
11996   fi
11997 done
11998   done
11999 IFS=$as_save_IFS
12000
12001   ;;
12002 esac
12003 fi
12004 login_manager_tmp=$ac_cv_path_login_manager_tmp
12005 if test -n "$login_manager_tmp"; then
12006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
12007 $as_echo "$login_manager_tmp" >&6; }
12008 else
12009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12010 $as_echo "no" >&6; }
12011 fi
12012
12013
12014       if test ! -z "$login_manager_tmp" ; then
12015         with_login_manager="$default_login_manager_3"
12016       fi
12017     fi
12018
12019     if test -z "$with_login_manager" ; then
12020       set dummy $default_login_manager_4 ; login_manager_tmp=$2
12021       unset ac_cv_path_login_manager_tmp  # don't cache
12022       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
12023 set dummy $login_manager_tmp; ac_word=$2
12024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12025 $as_echo_n "checking for $ac_word... " >&6; }
12026 if ${ac_cv_path_login_manager_tmp+:} false; then :
12027   $as_echo_n "(cached) " >&6
12028 else
12029   case $login_manager_tmp in
12030   [\\/]* | ?:[\\/]*)
12031   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
12032   ;;
12033   *)
12034   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12035 for as_dir in $PATH
12036 do
12037   IFS=$as_save_IFS
12038   test -z "$as_dir" && as_dir=.
12039     for ac_exec_ext in '' $ac_executable_extensions; do
12040   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12041     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
12042     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12043     break 2
12044   fi
12045 done
12046   done
12047 IFS=$as_save_IFS
12048
12049   ;;
12050 esac
12051 fi
12052 login_manager_tmp=$ac_cv_path_login_manager_tmp
12053 if test -n "$login_manager_tmp"; then
12054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
12055 $as_echo "$login_manager_tmp" >&6; }
12056 else
12057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058 $as_echo "no" >&6; }
12059 fi
12060
12061
12062       if test ! -z "$login_manager_tmp" ; then
12063         with_login_manager="$default_login_manager_4"
12064       fi
12065     fi
12066
12067   ;;
12068
12069   /*)
12070     # absolute path specified on cmd line
12071     set dummy $with_login_manager_req ; login_manager_tmp=$2
12072     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $login_manager_tmp" >&5
12073 $as_echo_n "checking for $login_manager_tmp... " >&6; }
12074     if test -x "$login_manager_tmp" ; then
12075       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12076 $as_echo "yes" >&6; }
12077     else
12078       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12079 $as_echo "no" >&6; }
12080       with_login_manager=""
12081     fi
12082   ;;
12083
12084   *)
12085     # relative path specified on cmd line
12086     set dummy $with_login_manager_req ; login_manager_tmp=$2
12087     unset ac_cv_path_login_manager_tmp    # don't cache
12088     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
12089 set dummy $login_manager_tmp; ac_word=$2
12090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12091 $as_echo_n "checking for $ac_word... " >&6; }
12092 if ${ac_cv_path_login_manager_tmp+:} false; then :
12093   $as_echo_n "(cached) " >&6
12094 else
12095   case $login_manager_tmp in
12096   [\\/]* | ?:[\\/]*)
12097   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
12098   ;;
12099   *)
12100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12101 for as_dir in $PATH
12102 do
12103   IFS=$as_save_IFS
12104   test -z "$as_dir" && as_dir=.
12105     for ac_exec_ext in '' $ac_executable_extensions; do
12106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12107     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
12108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12109     break 2
12110   fi
12111 done
12112   done
12113 IFS=$as_save_IFS
12114
12115   ;;
12116 esac
12117 fi
12118 login_manager_tmp=$ac_cv_path_login_manager_tmp
12119 if test -n "$login_manager_tmp"; then
12120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
12121 $as_echo "$login_manager_tmp" >&6; }
12122 else
12123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12124 $as_echo "no" >&6; }
12125 fi
12126
12127
12128     if test -z "$login_manager_tmp" ; then
12129       with_login_manager=""
12130     else
12131       with_login_manager="$login_manager_tmp"
12132     fi
12133   ;;
12134 esac
12135 ac_cv_login_manager_program="$with_login_manager"
12136
12137 NEW_LOGIN_COMMAND_P=''
12138 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
12139
12140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for login manager" >&5
12141 $as_echo_n "checking for login manager... " >&6; }
12142 if test -z "$NEW_LOGIN_COMMAND" ; then
12143   NEW_LOGIN_COMMAND="$default_login_manager_1"
12144   NEW_LOGIN_COMMAND_P='! '
12145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND (disabled)" >&5
12146 $as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
12147 else
12148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND" >&5
12149 $as_echo "$NEW_LOGIN_COMMAND" >&6; }
12150 fi
12151
12152
12153 ###############################################################################
12154 #
12155 #       Check for -lgtk (and Gnome stuff)
12156 #
12157 ###############################################################################
12158
12159 have_gtk=no
12160 with_gtk_req=unspecified
12161
12162 # Check whether --with-gtk was given.
12163 if test "${with_gtk+set}" = set; then :
12164   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
12165 else
12166   with_gtk=yes
12167 fi
12168
12169
12170 # if --with-gtk=/directory/ was specified, remember that directory so that
12171 # we can also look for the `gtk-config' program in that directory.
12172 case "$with_gtk" in
12173   /*)
12174     gtk_dir="$with_gtk"
12175     ;;
12176   *)
12177     gtk_dir=""
12178     ;;
12179 esac
12180
12181
12182    case "$with_gtk" in
12183     yes) ;;
12184     no)  ;;
12185
12186     /*)
12187      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk headers" >&5
12188 $as_echo_n "checking for Gtk headers... " >&6; }
12189      d=$with_gtk/include
12190      if test -d $d; then
12191        X_CFLAGS="-I$d $X_CFLAGS"
12192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12193 $as_echo "$d" >&6; }
12194      else
12195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12196 $as_echo "not found ($d: no such directory)" >&6; }
12197      fi
12198
12199      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
12200 $as_echo_n "checking for Gtk libs... " >&6; }
12201      d=$with_gtk/lib
12202      if test -d $d; then
12203        X_LIBS="-L$d $X_LIBS"
12204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12205 $as_echo "$d" >&6; }
12206      else
12207        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12208 $as_echo "not found ($d: no such directory)" >&6; }
12209      fi
12210
12211      # replace the directory string with "yes".
12212      with_gtk_req="yes"
12213      with_gtk=$with_gtk_req
12214      ;;
12215
12216     *)
12217      echo ""
12218      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
12219      echo "       If it is a directory, then \`DIR/include' will be added to"
12220      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12221      exit 1
12222      ;;
12223    esac
12224
12225
12226 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
12227   echo "error: must be yes or no: --with-gtk=$with_gtk"
12228   exit 1
12229 fi
12230
12231
12232 parse_gtk_version_string() {
12233   # M4 sucks!!
12234
12235   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
12236   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
12237
12238   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
12239   if test -z "$ac_gtk_version"; then
12240     ac_gtk_version=unknown
12241     ac_gtk_version_string=unknown
12242   fi
12243 }
12244
12245 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
12246 # if the user specified --with-gtk=/foo/ then look there.
12247 #
12248 gtk_path="$PATH"
12249 if test ! -z "$gtk_dir"; then
12250   # canonicalize slashes.
12251   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
12252   gtk_path="$foo:$gtk_path"
12253 fi
12254
12255 for ac_prog in pkg-config
12256 do
12257   # Extract the first word of "$ac_prog", so it can be a program name with args.
12258 set dummy $ac_prog; ac_word=$2
12259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12260 $as_echo_n "checking for $ac_word... " >&6; }
12261 if ${ac_cv_path_pkg_config+:} false; then :
12262   $as_echo_n "(cached) " >&6
12263 else
12264   case $pkg_config in
12265   [\\/]* | ?:[\\/]*)
12266   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
12267   ;;
12268   *)
12269   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12270 for as_dir in $gtk_path
12271 do
12272   IFS=$as_save_IFS
12273   test -z "$as_dir" && as_dir=.
12274     for ac_exec_ext in '' $ac_executable_extensions; do
12275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12276     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
12277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12278     break 2
12279   fi
12280 done
12281   done
12282 IFS=$as_save_IFS
12283
12284   ;;
12285 esac
12286 fi
12287 pkg_config=$ac_cv_path_pkg_config
12288 if test -n "$pkg_config"; then
12289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config" >&5
12290 $as_echo "$pkg_config" >&6; }
12291 else
12292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12293 $as_echo "no" >&6; }
12294 fi
12295
12296
12297   test -n "$pkg_config" && break
12298 done
12299
12300
12301 if test -z "$pkg_config" ; then
12302   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found!" >&5
12303 $as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
12304   pkg_config="false"
12305 fi
12306
12307
12308 # Utility function for running pkg-config-based tests...
12309 #
12310 pkgs=''
12311 pkg_check_version() {
12312   if test "$ok" = yes ; then
12313     req="$1"
12314     min="$2"
12315     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $req" >&5
12316 $as_echo_n "checking for $req... " >&6; }
12317     if $pkg_config --exists "$req" ; then
12318       vers=`$pkg_config --modversion "$req"`
12319       if $pkg_config --exists "$req >= $min" ; then
12320         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers" >&5
12321 $as_echo "$vers" >&6; }
12322         pkgs="$pkgs $req"
12323         return 1
12324       else
12325         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers (wanted >= $min)" >&5
12326 $as_echo "$vers (wanted >= $min)" >&6; }
12327         ok=no
12328         return 0
12329       fi
12330     else
12331       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12332 $as_echo "no" >&6; }
12333       ok=no
12334       return 0
12335     fi
12336   fi
12337 }
12338
12339
12340 jurassic_gtk=no
12341 gtk_halfassed=no
12342 have_gtk_2_22_or_higher=no
12343 COMMENT_DEMO_GLADE2_GTK_2_22_HEAD=""
12344 COMMENT_DEMO_GLADE2_GTK_2_22_TAIL=""
12345
12346 if test "$with_gtk" = yes; then
12347   have_gtk=no
12348
12349   ok="yes"
12350   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
12351   pkg_check_version         gmodule-2.0  2.0.0
12352   pkg_check_version          libxml-2.0  2.4.6
12353   pkg_check_version        libglade-2.0  1.99.0
12354   pkg_check_version      gdk-pixbuf-2.0  2.0.0
12355   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
12356   have_gtk="$ok"
12357
12358   if test "$have_gtk" = no; then
12359     if test -n "$ac_gtk_version_string" ; then
12360       gtk_halfassed="$ac_gtk_version_string"
12361       gtk_halfassed_lib="$req"
12362     fi
12363   fi
12364
12365   if test "$have_gtk" = yes; then
12366     parse_gtk_version_string
12367     jurassic_gtk=no
12368   fi
12369
12370   if test "$have_gtk" = yes; then
12371     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk includes" >&5
12372 $as_echo_n "checking for Gtk includes... " >&6; }
12373 if ${ac_cv_gtk_config_cflags+:} false; then :
12374   $as_echo_n "(cached) " >&6
12375 else
12376   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
12377 fi
12378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_cflags" >&5
12379 $as_echo "$ac_cv_gtk_config_cflags" >&6; }
12380     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
12381 $as_echo_n "checking for Gtk libs... " >&6; }
12382 if ${ac_cv_gtk_config_libs+:} false; then :
12383   $as_echo_n "(cached) " >&6
12384 else
12385   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
12386 fi
12387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_libs" >&5
12388 $as_echo "$ac_cv_gtk_config_libs" >&6; }
12389   fi
12390
12391   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12392   ac_gtk_config_libs=$ac_cv_gtk_config_libs
12393
12394   GTK_EXTRA_OBJS=""
12395   GTK_DATADIR=""
12396   if test "$have_gtk" = yes; then
12397     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
12398     GTK_DATADIR="$GTK_DATADIR/share"
12399   fi
12400
12401   if test "$have_gtk" = yes; then
12402     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
12403     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
12404     $as_echo "#define HAVE_GTK 1" >>confdefs.h
12405
12406     $as_echo "#define HAVE_GTK2 1" >>confdefs.h
12407
12408     $as_echo "#define HAVE_XML 1" >>confdefs.h
12409
12410   fi
12411
12412   if test "$have_gtk" = yes; then
12413     ok="yes"
12414     pkg_check_version gtk+-2.0 2.22
12415     have_gtk_2_22_or_higher="$ok"
12416     if test "$have_gtk_2_22_or_higher" = yes; then
12417       COMMENT_DEMO_GLADE2_GTK_2_22_HEAD="<!-- comment>"
12418       COMMENT_DEMO_GLADE2_GTK_2_22_TAIL="</comment -->"
12419     fi
12420   fi
12421 fi
12422
12423
12424 # Check for the various Gnome help and URL loading programs.
12425 #
12426 WITH_BROWSER=gnome-open
12427 if test "$have_gtk" = yes; then
12428   for ac_prog in gnome-open
12429 do
12430   # Extract the first word of "$ac_prog", so it can be a program name with args.
12431 set dummy $ac_prog; ac_word=$2
12432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12433 $as_echo_n "checking for $ac_word... " >&6; }
12434 if ${ac_cv_prog_gnome_open_program+:} false; then :
12435   $as_echo_n "(cached) " >&6
12436 else
12437   if test -n "$gnome_open_program"; then
12438   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
12439 else
12440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12441 for as_dir in $PATH
12442 do
12443   IFS=$as_save_IFS
12444   test -z "$as_dir" && as_dir=.
12445     for ac_exec_ext in '' $ac_executable_extensions; do
12446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12447     ac_cv_prog_gnome_open_program="$ac_prog"
12448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12449     break 2
12450   fi
12451 done
12452   done
12453 IFS=$as_save_IFS
12454
12455 fi
12456 fi
12457 gnome_open_program=$ac_cv_prog_gnome_open_program
12458 if test -n "$gnome_open_program"; then
12459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_open_program" >&5
12460 $as_echo "$gnome_open_program" >&6; }
12461 else
12462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12463 $as_echo "no" >&6; }
12464 fi
12465
12466
12467   test -n "$gnome_open_program" && break
12468 done
12469
12470   for ac_prog in gnome-url-show
12471 do
12472   # Extract the first word of "$ac_prog", so it can be a program name with args.
12473 set dummy $ac_prog; ac_word=$2
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12475 $as_echo_n "checking for $ac_word... " >&6; }
12476 if ${ac_cv_prog_gnome_url_show_program+:} false; then :
12477   $as_echo_n "(cached) " >&6
12478 else
12479   if test -n "$gnome_url_show_program"; then
12480   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
12481 else
12482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12483 for as_dir in $PATH
12484 do
12485   IFS=$as_save_IFS
12486   test -z "$as_dir" && as_dir=.
12487     for ac_exec_ext in '' $ac_executable_extensions; do
12488   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12489     ac_cv_prog_gnome_url_show_program="$ac_prog"
12490     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12491     break 2
12492   fi
12493 done
12494   done
12495 IFS=$as_save_IFS
12496
12497 fi
12498 fi
12499 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
12500 if test -n "$gnome_url_show_program"; then
12501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_url_show_program" >&5
12502 $as_echo "$gnome_url_show_program" >&6; }
12503 else
12504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12505 $as_echo "no" >&6; }
12506 fi
12507
12508
12509   test -n "$gnome_url_show_program" && break
12510 done
12511
12512 fi
12513
12514
12515 ###############################################################################
12516 #
12517 #       Check for -lXm.
12518 #
12519 ###############################################################################
12520
12521 have_motif=no
12522 with_motif_req=unspecified
12523
12524 # Check whether --with-motif was given.
12525 if test "${with_motif+set}" = set; then :
12526   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
12527 else
12528   with_motif=no
12529 fi
12530
12531
12532
12533    case "$with_motif" in
12534     yes) ;;
12535     no)  ;;
12536
12537     /*)
12538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif headers" >&5
12539 $as_echo_n "checking for Motif headers... " >&6; }
12540      d=$with_motif/include
12541      if test -d $d; then
12542        X_CFLAGS="-I$d $X_CFLAGS"
12543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12544 $as_echo "$d" >&6; }
12545      else
12546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12547 $as_echo "not found ($d: no such directory)" >&6; }
12548      fi
12549
12550      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif libs" >&5
12551 $as_echo_n "checking for Motif libs... " >&6; }
12552      d=$with_motif/lib
12553      if test -d $d; then
12554        X_LIBS="-L$d $X_LIBS"
12555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12556 $as_echo "$d" >&6; }
12557      else
12558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12559 $as_echo "not found ($d: no such directory)" >&6; }
12560      fi
12561
12562      # replace the directory string with "yes".
12563      with_motif_req="yes"
12564      with_motif=$with_motif_req
12565      ;;
12566
12567     *)
12568      echo ""
12569      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12570      echo "       If it is a directory, then \`DIR/include' will be added to"
12571      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12572      exit 1
12573      ;;
12574    esac
12575
12576
12577 if test "$with_motif" != yes -a "$with_motif" != no ; then
12578   echo "error: must be yes or no: --with-motif=$with_motif"
12579   exit 1
12580 fi
12581
12582 if test "$with_motif" = yes; then
12583   have_motif=no
12584
12585   ac_save_CPPFLAGS="$CPPFLAGS"
12586   if test \! -z "$includedir" ; then
12587     CPPFLAGS="$CPPFLAGS -I$includedir"
12588   fi
12589   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12590   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12591   ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "#include <stdlib.h>
12592                      #include <stdio.h>
12593                      #include <X11/Intrinsic.h>
12594 "
12595 if test "x$ac_cv_header_Xm_Xm_h" = xyes; then :
12596   have_motif=yes
12597                      $as_echo "#define HAVE_MOTIF 1" >>confdefs.h
12598
12599                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12600 fi
12601
12602
12603   CPPFLAGS="$ac_save_CPPFLAGS"
12604 fi
12605
12606
12607 if test "$have_motif" = yes; then
12608
12609   ac_save_CPPFLAGS="$CPPFLAGS"
12610   if test \! -z "$includedir" ; then
12611     CPPFLAGS="$CPPFLAGS -I$includedir"
12612   fi
12613   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12614   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12615   ac_fn_c_check_header_compile "$LINENO" "Xm/ComboBox.h" "ac_cv_header_Xm_ComboBox_h" "#include <stdlib.h>
12616                      #include <stdio.h>
12617                      #include <X11/Intrinsic.h>
12618 "
12619 if test "x$ac_cv_header_Xm_ComboBox_h" = xyes; then :
12620   $as_echo "#define HAVE_XMCOMBOBOX 1" >>confdefs.h
12621
12622 fi
12623
12624
12625   CPPFLAGS="$ac_save_CPPFLAGS"
12626 fi
12627
12628
12629 ###############################################################################
12630 #
12631 #       Checking whether Motif is really Lesstif.
12632 #
12633 ###############################################################################
12634
12635 have_lesstif=no
12636 if test "$have_motif" = yes ; then
12637   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif is really LessTif" >&5
12638 $as_echo_n "checking whether Motif is really LessTif... " >&6; }
12639 if ${ac_cv_have_lesstif+:} false; then :
12640   $as_echo_n "(cached) " >&6
12641 else
12642
12643   ac_save_CPPFLAGS="$CPPFLAGS"
12644   if test \! -z "$includedir" ; then
12645     CPPFLAGS="$CPPFLAGS -I$includedir"
12646   fi
12647   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12648   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12650 /* end confdefs.h.  */
12651 #include <Xm/Xm.h>
12652 int
12653 main ()
12654 {
12655 long vers = LesstifVersion;
12656   ;
12657   return 0;
12658 }
12659 _ACEOF
12660 if ac_fn_c_try_compile "$LINENO"; then :
12661   ac_cv_have_lesstif=yes
12662 else
12663   ac_cv_have_lesstif=no
12664 fi
12665 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12666   CPPFLAGS="$ac_save_CPPFLAGS"
12667 fi
12668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lesstif" >&5
12669 $as_echo "$ac_cv_have_lesstif" >&6; }
12670   have_lesstif=$ac_cv_have_lesstif
12671 fi
12672
12673
12674 lesstif_version=unknown
12675 lesstif_version_string=unknown
12676
12677 if test "$have_lesstif" = yes ; then
12678   ltv=unknown
12679   echo unknown > conftest-lt
12680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking LessTif version number" >&5
12681 $as_echo_n "checking LessTif version number... " >&6; }
12682 if ${ac_cv_lesstif_version_string+:} false; then :
12683   $as_echo_n "(cached) " >&6
12684 else
12685
12686   ac_save_CPPFLAGS="$CPPFLAGS"
12687   if test \! -z "$includedir" ; then
12688     CPPFLAGS="$CPPFLAGS -I$includedir"
12689   fi
12690   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12691   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12692   if test "$cross_compiling" = yes; then :
12693   ac_cv_lesstif_version=unknown
12694                      ac_cv_lesstif_version_string=unknown
12695 else
12696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12697 /* end confdefs.h.  */
12698 #include <stdio.h>
12699                      #include <Xm/Xm.h>
12700                      int main() {
12701                        FILE *f = fopen("conftest-lt", "w");
12702                        if (!f) exit(1);
12703                        fprintf(f, "%d %d.%d\n", LesstifVersion,
12704                           LESSTIF_VERSION, LESSTIF_REVISION);
12705                        fclose(f);
12706                        exit(0);
12707                      }
12708 _ACEOF
12709 if ac_fn_c_try_run "$LINENO"; then :
12710   ltv=`cat conftest-lt`
12711                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
12712                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
12713 else
12714   ac_cv_lesstif_version=unknown
12715                      ac_cv_lesstif_version_string=unknown
12716 fi
12717 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12718   conftest.$ac_objext conftest.beam conftest.$ac_ext
12719 fi
12720
12721   CPPFLAGS="$ac_save_CPPFLAGS"
12722 fi
12723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lesstif_version_string" >&5
12724 $as_echo "$ac_cv_lesstif_version_string" >&6; }
12725   rm -rf conftest-lt
12726   lesstif_version=$ac_cv_lesstif_version
12727   lesstif_version_string=$ac_cv_lesstif_version_string
12728
12729 fi
12730
12731
12732 if test "$have_motif" = yes ; then
12733   mtv=unknown
12734   echo unknown > conftest-mt
12735   { $as_echo "$as_me:${as_lineno-$LINENO}: checking Motif version number" >&5
12736 $as_echo_n "checking Motif version number... " >&6; }
12737 if ${ac_cv_motif_version_string+:} false; then :
12738   $as_echo_n "(cached) " >&6
12739 else
12740
12741   ac_save_CPPFLAGS="$CPPFLAGS"
12742   if test \! -z "$includedir" ; then
12743     CPPFLAGS="$CPPFLAGS -I$includedir"
12744   fi
12745   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12746   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12747   if test "$cross_compiling" = yes; then :
12748   ac_cv_motif_version=unknown
12749                      ac_cv_motif_version_string=unknown
12750 else
12751   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12752 /* end confdefs.h.  */
12753 #include <stdio.h>
12754                      #include <Xm/Xm.h>
12755                      int main() {
12756                        FILE *f = fopen("conftest-mt", "w");
12757                        if (!f) exit(1);
12758                        fprintf(f, "%d %d.%d\n", XmVersion,
12759                           XmVERSION, XmREVISION);
12760                        fclose(f);
12761                        exit(0);
12762                      }
12763 _ACEOF
12764 if ac_fn_c_try_run "$LINENO"; then :
12765   mtv=`cat conftest-mt`
12766                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
12767                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
12768 else
12769   ac_cv_motif_version=unknown
12770                      ac_cv_motif_version_string=unknown
12771 fi
12772 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12773   conftest.$ac_objext conftest.beam conftest.$ac_ext
12774 fi
12775
12776   CPPFLAGS="$ac_save_CPPFLAGS"
12777 fi
12778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_motif_version_string" >&5
12779 $as_echo "$ac_cv_motif_version_string" >&6; }
12780   rm -rf conftest-mt
12781   motif_version=$ac_cv_motif_version
12782   motif_version_string=$ac_cv_motif_version_string
12783
12784 fi
12785
12786
12787 ###############################################################################
12788 #
12789 #       Checking whether Motif requires -lXp.
12790 #
12791 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
12792 #       Extension".   Why this extension isn't in -lXext with all the others,
12793 #       I have no idea.
12794 #
12795 ###############################################################################
12796
12797 have_xp_ext=no
12798 if test "$have_motif" = yes ; then
12799    have_xp_ext=no
12800
12801   ac_save_CPPFLAGS="$CPPFLAGS"
12802   ac_save_LDFLAGS="$LDFLAGS"
12803 #  ac_save_LIBS="$LIBS"
12804
12805   if test \! -z "$includedir" ; then
12806     CPPFLAGS="$CPPFLAGS -I$includedir"
12807   fi
12808   # note: $X_CFLAGS includes $x_includes
12809   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12810
12811   if test \! -z "$libdir" ; then
12812     LDFLAGS="$LDFLAGS -L$libdir"
12813   fi
12814   # note: $X_LIBS includes $x_libraries
12815   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12816
12817   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12818   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpQueryExtension in -lXp" >&5
12820 $as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
12821 if ${ac_cv_lib_Xp_XpQueryExtension+:} false; then :
12822   $as_echo_n "(cached) " >&6
12823 else
12824   ac_check_lib_save_LIBS=$LIBS
12825 LIBS="-lXp -lX11 -lXext -lm $LIBS"
12826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12827 /* end confdefs.h.  */
12828
12829 /* Override any GCC internal prototype to avoid an error.
12830    Use char because int might match the return type of a GCC
12831    builtin and then its argument prototype would still apply.  */
12832 #ifdef __cplusplus
12833 extern "C"
12834 #endif
12835 char XpQueryExtension ();
12836 int
12837 main ()
12838 {
12839 return XpQueryExtension ();
12840   ;
12841   return 0;
12842 }
12843 _ACEOF
12844 if ac_fn_c_try_link "$LINENO"; then :
12845   ac_cv_lib_Xp_XpQueryExtension=yes
12846 else
12847   ac_cv_lib_Xp_XpQueryExtension=no
12848 fi
12849 rm -f core conftest.err conftest.$ac_objext \
12850     conftest$ac_exeext conftest.$ac_ext
12851 LIBS=$ac_check_lib_save_LIBS
12852 fi
12853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
12854 $as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
12855 if test "x$ac_cv_lib_Xp_XpQueryExtension" = xyes; then :
12856   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
12857 else
12858   true
12859 fi
12860
12861   CPPFLAGS="$ac_save_CPPFLAGS"
12862   LDFLAGS="$ac_save_LDFLAGS"
12863 #  LIBS="$ac_save_LIBS"
12864
12865 fi
12866
12867
12868 ###############################################################################
12869 #
12870 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
12871 #
12872 ###############################################################################
12873
12874 have_xintl=no
12875 if test "$have_motif" = yes ; then
12876
12877   ac_save_CPPFLAGS="$CPPFLAGS"
12878   ac_save_LDFLAGS="$LDFLAGS"
12879 #  ac_save_LIBS="$LIBS"
12880
12881   if test \! -z "$includedir" ; then
12882     CPPFLAGS="$CPPFLAGS -I$includedir"
12883   fi
12884   # note: $X_CFLAGS includes $x_includes
12885   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12886
12887   if test \! -z "$libdir" ; then
12888     LDFLAGS="$LDFLAGS -L$libdir"
12889   fi
12890   # note: $X_LIBS includes $x_libraries
12891   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12892
12893   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12894   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12895   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Xsetlocale in -lXintl" >&5
12896 $as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
12897 if ${ac_cv_lib_Xintl__Xsetlocale+:} false; then :
12898   $as_echo_n "(cached) " >&6
12899 else
12900   ac_check_lib_save_LIBS=$LIBS
12901 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
12902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12903 /* end confdefs.h.  */
12904
12905 /* Override any GCC internal prototype to avoid an error.
12906    Use char because int might match the return type of a GCC
12907    builtin and then its argument prototype would still apply.  */
12908 #ifdef __cplusplus
12909 extern "C"
12910 #endif
12911 char _Xsetlocale ();
12912 int
12913 main ()
12914 {
12915 return _Xsetlocale ();
12916   ;
12917   return 0;
12918 }
12919 _ACEOF
12920 if ac_fn_c_try_link "$LINENO"; then :
12921   ac_cv_lib_Xintl__Xsetlocale=yes
12922 else
12923   ac_cv_lib_Xintl__Xsetlocale=no
12924 fi
12925 rm -f core conftest.err conftest.$ac_objext \
12926     conftest$ac_exeext conftest.$ac_ext
12927 LIBS=$ac_check_lib_save_LIBS
12928 fi
12929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
12930 $as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
12931 if test "x$ac_cv_lib_Xintl__Xsetlocale" = xyes; then :
12932   have_xintl=yes
12933 else
12934   have_xintl=no
12935 fi
12936
12937   CPPFLAGS="$ac_save_CPPFLAGS"
12938   LDFLAGS="$ac_save_LDFLAGS"
12939 #  LIBS="$ac_save_LIBS"
12940
12941   if test "$have_xintl" = yes; then
12942     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
12943   fi
12944 fi
12945
12946
12947 ###############################################################################
12948 #
12949 #       Check for -lGL or -lMesaGL.
12950 #
12951 ###############################################################################
12952
12953 have_gl=no
12954 ac_have_mesa_gl=no
12955 with_gl_req=unspecified
12956 gl_halfassed=no
12957
12958 # Check whether --with-gl was given.
12959 if test "${with_gl+set}" = set; then :
12960   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
12961 else
12962   with_gl=yes
12963 fi
12964
12965
12966
12967    case "$with_gl" in
12968     yes) ;;
12969     no)  ;;
12970
12971     /*)
12972      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL headers" >&5
12973 $as_echo_n "checking for GL headers... " >&6; }
12974      d=$with_gl/include
12975      if test -d $d; then
12976        X_CFLAGS="-I$d $X_CFLAGS"
12977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12978 $as_echo "$d" >&6; }
12979      else
12980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12981 $as_echo "not found ($d: no such directory)" >&6; }
12982      fi
12983
12984      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL libs" >&5
12985 $as_echo_n "checking for GL libs... " >&6; }
12986      d=$with_gl/lib
12987      if test -d $d; then
12988        X_LIBS="-L$d $X_LIBS"
12989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12990 $as_echo "$d" >&6; }
12991      else
12992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12993 $as_echo "not found ($d: no such directory)" >&6; }
12994      fi
12995
12996      # replace the directory string with "yes".
12997      with_gl_req="yes"
12998      with_gl=$with_gl_req
12999      ;;
13000
13001     *)
13002      echo ""
13003      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
13004      echo "       If it is a directory, then \`DIR/include' will be added to"
13005      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13006      exit 1
13007      ;;
13008    esac
13009
13010
13011 ac_mesagl_version=unknown
13012 ac_mesagl_version_string=unknown
13013
13014 if test "$with_gl" = yes; then
13015
13016   ac_save_CPPFLAGS="$CPPFLAGS"
13017   if test \! -z "$includedir" ; then
13018     CPPFLAGS="$CPPFLAGS -I$includedir"
13019   fi
13020   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13021   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13022   ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
13023 if test "x$ac_cv_header_GL_gl_h" = xyes; then :
13024   have_gl=yes
13025 else
13026   have_gl=no
13027 fi
13028
13029
13030   CPPFLAGS="$ac_save_CPPFLAGS"
13031   if test "$have_gl" = yes ; then
13032
13033   ac_save_CPPFLAGS="$CPPFLAGS"
13034   if test \! -z "$includedir" ; then
13035     CPPFLAGS="$CPPFLAGS -I$includedir"
13036   fi
13037   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13038   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13039   ac_fn_c_check_header_compile "$LINENO" "GL/glx.h" "ac_cv_header_GL_glx_h" "#include <GL/gl.h>
13040 "
13041 if test "x$ac_cv_header_GL_glx_h" = xyes; then :
13042   have_gl=yes
13043 else
13044   have_gl=no
13045 fi
13046
13047
13048   CPPFLAGS="$ac_save_CPPFLAGS"
13049   fi
13050
13051   # If we have the headers, try and figure out which vendor it's from.
13052   #
13053   if test "$have_gl" = yes ; then
13054
13055     # We need to know whether it's MesaGL so that we know which libraries
13056     # to link against.
13057     #
13058     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GL is really MesaGL" >&5
13059 $as_echo_n "checking whether GL is really MesaGL... " >&6; }
13060 if ${ac_cv_have_mesa_gl+:} false; then :
13061   $as_echo_n "(cached) " >&6
13062 else
13063   ac_cv_have_mesa_gl=no
13064        if test "$ac_macosx" = no; then
13065          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
13066          # It's not really Mesa, is it?
13067
13068   ac_save_CPPFLAGS="$CPPFLAGS"
13069   if test \! -z "$includedir" ; then
13070     CPPFLAGS="$CPPFLAGS -I$includedir"
13071   fi
13072   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13073   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13075 /* end confdefs.h.  */
13076 #include <GL/glx.h>
13077
13078 _ACEOF
13079 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13080   $EGREP "Mesa|MESA" >/dev/null 2>&1; then :
13081   ac_cv_have_mesa_gl=yes
13082 fi
13083 rm -rf conftest*
13084
13085   CPPFLAGS="$ac_save_CPPFLAGS"
13086        fi
13087 fi
13088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mesa_gl" >&5
13089 $as_echo "$ac_cv_have_mesa_gl" >&6; }
13090     ac_have_mesa_gl=$ac_cv_have_mesa_gl
13091
13092     gl_lib_1=""
13093     GL_LIBS=""
13094
13095     if test "$ac_macosx" = yes; then
13096
13097       # Without these, every link against libGL gets a bunch of useless
13098       # warnings.
13099       #
13100       osx_crud="-bind_at_load -multiply_defined suppress"
13101       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
13102 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
13103       GL_LIBS="$GL_LIBS $osx_crud"
13104       unset osx_crud
13105
13106       # New lossage in 10.5.0: without this, we get:
13107       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
13108       #
13109       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
13110       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
13111
13112       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
13113 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
13114       GL_LIBS="$GL_LIBS $osx_crud"
13115       unset osx_crud
13116
13117       # New lossage in 10.6.8: we can't allow -L/opt/local/lib to be in the
13118       # link line, or at runtime XQueryExtension gets a segv due to some kind
13119       # of library version skew.  Libs must come from /usr/X11/lib even if
13120       # $prefix and/or $exec_prefix are set to /opt/local/.
13121       #
13122       { $as_echo "$as_me:${as_lineno-$LINENO}: result: omitting \"$libdir\" from LDFLAGS" >&5
13123 $as_echo "omitting \"$libdir\" from LDFLAGS" >&6; }
13124       libdir=''
13125
13126       # Looks like as of OSX 10.12, gcc can't do ObjC.
13127       OBJCC="clang -Wall"
13128
13129     fi
13130
13131
13132     # Some versions of MesaGL are compiled to require -lpthread.
13133     # So if the Mesa headers exist, and -lpthread exists, then always
13134     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
13135     #
13136     # Oftentimes, AX_PTHREAD will bring in -lpthread as well; but that ends
13137     # up before -l(Mesa)GL, instead of after where it would belong.
13138     #
13139     if test "$ac_have_mesa_gl" = yes; then
13140       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
13141 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
13142 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
13143   $as_echo_n "(cached) " >&6
13144 else
13145   ac_check_lib_save_LIBS=$LIBS
13146 LIBS="-lpthread  $LIBS"
13147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13148 /* end confdefs.h.  */
13149
13150 /* Override any GCC internal prototype to avoid an error.
13151    Use char because int might match the return type of a GCC
13152    builtin and then its argument prototype would still apply.  */
13153 #ifdef __cplusplus
13154 extern "C"
13155 #endif
13156 char pthread_create ();
13157 int
13158 main ()
13159 {
13160 return pthread_create ();
13161   ;
13162   return 0;
13163 }
13164 _ACEOF
13165 if ac_fn_c_try_link "$LINENO"; then :
13166   ac_cv_lib_pthread_pthread_create=yes
13167 else
13168   ac_cv_lib_pthread_pthread_create=no
13169 fi
13170 rm -f core conftest.err conftest.$ac_objext \
13171     conftest$ac_exeext conftest.$ac_ext
13172 LIBS=$ac_check_lib_save_LIBS
13173 fi
13174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
13175 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
13176 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
13177   GL_LIBS="-lpthread"
13178 fi
13179
13180     fi
13181
13182
13183     # If we have Mesa headers, check to see if we can link against -lMesaGL.
13184     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
13185     # Else, warn that GL is busted.  (We have the headers, but no libs.)
13186     #
13187
13188     if test "$ac_have_mesa_gl" = yes ; then
13189
13190   ac_save_CPPFLAGS="$CPPFLAGS"
13191   ac_save_LDFLAGS="$LDFLAGS"
13192 #  ac_save_LIBS="$LIBS"
13193
13194   if test \! -z "$includedir" ; then
13195     CPPFLAGS="$CPPFLAGS -I$includedir"
13196   fi
13197   # note: $X_CFLAGS includes $x_includes
13198   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13199
13200   if test \! -z "$libdir" ; then
13201     LDFLAGS="$LDFLAGS -L$libdir"
13202   fi
13203   # note: $X_LIBS includes $x_libraries
13204   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13205
13206   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13207   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13208   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lMesaGL" >&5
13209 $as_echo_n "checking for glXCreateContext in -lMesaGL... " >&6; }
13210 if ${ac_cv_lib_MesaGL_glXCreateContext+:} false; then :
13211   $as_echo_n "(cached) " >&6
13212 else
13213   ac_check_lib_save_LIBS=$LIBS
13214 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
13215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13216 /* end confdefs.h.  */
13217
13218 /* Override any GCC internal prototype to avoid an error.
13219    Use char because int might match the return type of a GCC
13220    builtin and then its argument prototype would still apply.  */
13221 #ifdef __cplusplus
13222 extern "C"
13223 #endif
13224 char glXCreateContext ();
13225 int
13226 main ()
13227 {
13228 return glXCreateContext ();
13229   ;
13230   return 0;
13231 }
13232 _ACEOF
13233 if ac_fn_c_try_link "$LINENO"; then :
13234   ac_cv_lib_MesaGL_glXCreateContext=yes
13235 else
13236   ac_cv_lib_MesaGL_glXCreateContext=no
13237 fi
13238 rm -f core conftest.err conftest.$ac_objext \
13239     conftest$ac_exeext conftest.$ac_ext
13240 LIBS=$ac_check_lib_save_LIBS
13241 fi
13242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
13243 $as_echo "$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
13244 if test "x$ac_cv_lib_MesaGL_glXCreateContext" = xyes; then :
13245   gl_lib_1="MesaGL"
13246                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
13247 fi
13248
13249   CPPFLAGS="$ac_save_CPPFLAGS"
13250   LDFLAGS="$ac_save_LDFLAGS"
13251 #  LIBS="$ac_save_LIBS"
13252
13253     fi
13254
13255     if test "$gl_lib_1" = "" ; then
13256
13257   ac_save_CPPFLAGS="$CPPFLAGS"
13258   ac_save_LDFLAGS="$LDFLAGS"
13259 #  ac_save_LIBS="$LIBS"
13260
13261   if test \! -z "$includedir" ; then
13262     CPPFLAGS="$CPPFLAGS -I$includedir"
13263   fi
13264   # note: $X_CFLAGS includes $x_includes
13265   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13266
13267   if test \! -z "$libdir" ; then
13268     LDFLAGS="$LDFLAGS -L$libdir"
13269   fi
13270   # note: $X_LIBS includes $x_libraries
13271   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13272
13273   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13274   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13275   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lGL" >&5
13276 $as_echo_n "checking for glXCreateContext in -lGL... " >&6; }
13277 if ${ac_cv_lib_GL_glXCreateContext+:} false; then :
13278   $as_echo_n "(cached) " >&6
13279 else
13280   ac_check_lib_save_LIBS=$LIBS
13281 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
13282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13283 /* end confdefs.h.  */
13284
13285 /* Override any GCC internal prototype to avoid an error.
13286    Use char because int might match the return type of a GCC
13287    builtin and then its argument prototype would still apply.  */
13288 #ifdef __cplusplus
13289 extern "C"
13290 #endif
13291 char glXCreateContext ();
13292 int
13293 main ()
13294 {
13295 return glXCreateContext ();
13296   ;
13297   return 0;
13298 }
13299 _ACEOF
13300 if ac_fn_c_try_link "$LINENO"; then :
13301   ac_cv_lib_GL_glXCreateContext=yes
13302 else
13303   ac_cv_lib_GL_glXCreateContext=no
13304 fi
13305 rm -f core conftest.err conftest.$ac_objext \
13306     conftest$ac_exeext conftest.$ac_ext
13307 LIBS=$ac_check_lib_save_LIBS
13308 fi
13309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_glXCreateContext" >&5
13310 $as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; }
13311 if test "x$ac_cv_lib_GL_glXCreateContext" = xyes; then :
13312   gl_lib_1="GL"
13313                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
13314 fi
13315
13316   CPPFLAGS="$ac_save_CPPFLAGS"
13317   LDFLAGS="$ac_save_LDFLAGS"
13318 #  LIBS="$ac_save_LIBS"
13319
13320     fi
13321
13322     if test "$gl_lib_1" = "" ; then
13323       # we have headers, but no libs -- bail.
13324       have_gl=no
13325       ac_have_mesa_gl=no
13326       gl_halfassed=yes
13327     else
13328       # linking works -- we can build the GL hacks.
13329       $as_echo "#define HAVE_GL 1" >>confdefs.h
13330
13331       if test "$ac_have_mesa_gl" = yes ; then
13332         $as_echo "#define HAVE_MESA_GL 1" >>confdefs.h
13333
13334       fi
13335     fi
13336   fi
13337
13338
13339   # Now that we know we have GL headers and libs, do some more GL testing.
13340   #
13341
13342   if test "$have_gl" = yes ; then
13343     # If it's MesaGL, we'd like to issue a warning if the version number
13344     # is less than or equal to 2.6, because that version had a security bug.
13345     #
13346     if test "$ac_have_mesa_gl" = yes; then
13347
13348       { $as_echo "$as_me:${as_lineno-$LINENO}: checking MesaGL version number" >&5
13349 $as_echo_n "checking MesaGL version number... " >&6; }
13350 if ${ac_cv_mesagl_version_string+:} false; then :
13351   $as_echo_n "(cached) " >&6
13352 else
13353   cat > conftest.$ac_ext <<EOF
13354 #line 13358 "configure"
13355 #include "confdefs.h"
13356 #include <GL/gl.h>
13357 #ifndef MESA_MAJOR_VERSION
13358 # include <GL/xmesa.h>
13359 # ifdef XMESA_MAJOR_VERSION
13360    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
13361       we have to check the XMesa version number (the number of the X protocol
13362       support, which seems to be the same as the Mesa version number.)
13363     */
13364 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
13365 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
13366 # else
13367    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
13368       so we have no way of telling what version of Mesa this is at all.
13369       So, we'll guess that the osmesa version (the "offscreen protocol")
13370       is less than or equal to the real mesa version number.  Except that
13371       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
13372       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
13373     */
13374 # include <GL/osmesa.h>
13375 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
13376 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
13377 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
13378 #   undef MESA_MINOR_VERSION
13379 #   define MESA_MINOR_VERSION 4 or newer, probably?
13380 #  endif
13381 # endif
13382 #endif
13383 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
13384 EOF
13385
13386          ac_save_CPPFLAGS="$CPPFLAGS"
13387          if test \! -z "$includedir" ; then
13388            CPPFLAGS="$CPPFLAGS -I$includedir"
13389          fi
13390          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13391
13392          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
13393
13394          # M4 sucks!!
13395
13396           mglv=`echo "$mglv" | sed -n \
13397              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
13398
13399
13400          rm -rf conftest.$ac_ext
13401
13402          CPPFLAGS="$ac_save_CPPFLAGS"
13403
13404          if test "$mglv" = ""; then
13405            ac_mesagl_version=unknown
13406            ac_mesagl_version_string=unknown
13407          else
13408            ac_mesagl_version_string="$mglv"
13409            # M4 sucks!!
13410
13411            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
13412            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
13413
13414            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
13415            if test -z "$ac_mesagl_version"; then
13416              ac_mesagl_version=unknown
13417              ac_mesagl_version_string=unknown
13418            fi
13419          fi
13420          ac_cv_mesagl_version=$ac_mesagl_version
13421          ac_cv_mesagl_version_string=$ac_mesagl_version_string
13422
13423 fi
13424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mesagl_version_string" >&5
13425 $as_echo "$ac_cv_mesagl_version_string" >&6; }
13426       ac_mesagl_version=$ac_cv_mesagl_version
13427       ac_mesagl_version_string=$ac_cv_mesagl_version_string
13428     fi
13429
13430
13431     # Check for OpenGL 1.1 features.
13432     #
13433
13434   ac_save_CPPFLAGS="$CPPFLAGS"
13435   ac_save_LDFLAGS="$LDFLAGS"
13436 #  ac_save_LIBS="$LIBS"
13437
13438   if test \! -z "$includedir" ; then
13439     CPPFLAGS="$CPPFLAGS -I$includedir"
13440   fi
13441   # note: $X_CFLAGS includes $x_includes
13442   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13443
13444   if test \! -z "$libdir" ; then
13445     LDFLAGS="$LDFLAGS -L$libdir"
13446   fi
13447   # note: $X_LIBS includes $x_libraries
13448   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13449
13450   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13451   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13452   as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
13453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBindTexture in -l$gl_lib_1" >&5
13454 $as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
13455 if eval \${$as_ac_Lib+:} false; then :
13456   $as_echo_n "(cached) " >&6
13457 else
13458   ac_check_lib_save_LIBS=$LIBS
13459 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
13460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13461 /* end confdefs.h.  */
13462
13463 /* Override any GCC internal prototype to avoid an error.
13464    Use char because int might match the return type of a GCC
13465    builtin and then its argument prototype would still apply.  */
13466 #ifdef __cplusplus
13467 extern "C"
13468 #endif
13469 char glBindTexture ();
13470 int
13471 main ()
13472 {
13473 return glBindTexture ();
13474   ;
13475   return 0;
13476 }
13477 _ACEOF
13478 if ac_fn_c_try_link "$LINENO"; then :
13479   eval "$as_ac_Lib=yes"
13480 else
13481   eval "$as_ac_Lib=no"
13482 fi
13483 rm -f core conftest.err conftest.$ac_objext \
13484     conftest$ac_exeext conftest.$ac_ext
13485 LIBS=$ac_check_lib_save_LIBS
13486 fi
13487 eval ac_res=\$$as_ac_Lib
13488                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13489 $as_echo "$ac_res" >&6; }
13490 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13491   $as_echo "#define HAVE_GLBINDTEXTURE 1" >>confdefs.h
13492
13493 else
13494   true
13495 fi
13496
13497   CPPFLAGS="$ac_save_CPPFLAGS"
13498   LDFLAGS="$ac_save_LDFLAGS"
13499 #  LIBS="$ac_save_LIBS"
13500
13501   fi
13502
13503 elif test "$with_gl" != no; then
13504   echo "error: must be yes or no: --with-gl=$with_gl"
13505   exit 1
13506 fi
13507
13508
13509 ###############################################################################
13510 #
13511 #       Check for -lgle.
13512 #
13513 ###############################################################################
13514
13515 have_gle=no
13516 with_gle_req=unspecified
13517 gle_halfassed=no
13518
13519 # Check whether --with-gle was given.
13520 if test "${with_gle+set}" = set; then :
13521   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
13522 else
13523   with_gle=yes
13524 fi
13525
13526
13527
13528    case "$with_gle" in
13529     yes) ;;
13530     no)  ;;
13531
13532     /*)
13533      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE headers" >&5
13534 $as_echo_n "checking for GLE headers... " >&6; }
13535      d=$with_gle/include
13536      if test -d $d; then
13537        X_CFLAGS="-I$d $X_CFLAGS"
13538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13539 $as_echo "$d" >&6; }
13540      else
13541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13542 $as_echo "not found ($d: no such directory)" >&6; }
13543      fi
13544
13545      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE libs" >&5
13546 $as_echo_n "checking for GLE libs... " >&6; }
13547      d=$with_gle/lib
13548      if test -d $d; then
13549        X_LIBS="-L$d $X_LIBS"
13550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13551 $as_echo "$d" >&6; }
13552      else
13553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13554 $as_echo "not found ($d: no such directory)" >&6; }
13555      fi
13556
13557      # replace the directory string with "yes".
13558      with_gle_req="yes"
13559      with_gle=$with_gle_req
13560      ;;
13561
13562     *)
13563      echo ""
13564      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
13565      echo "       If it is a directory, then \`DIR/include' will be added to"
13566      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13567      exit 1
13568      ;;
13569    esac
13570
13571
13572 GLE_LIBS=""
13573
13574 if test "$have_gl" = no ; then
13575  true
13576 elif test "$with_gle" = yes; then
13577
13578
13579   ac_save_CPPFLAGS="$CPPFLAGS"
13580   if test \! -z "$includedir" ; then
13581     CPPFLAGS="$CPPFLAGS -I$includedir"
13582   fi
13583   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13584   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13585   ac_fn_c_check_header_compile "$LINENO" "GL/gle.h" "ac_cv_header_GL_gle_h" "#include <GL/gl.h>
13586 "
13587 if test "x$ac_cv_header_GL_gle_h" = xyes; then :
13588   have_gle3=yes
13589 else
13590   have_gle3=no
13591 fi
13592
13593
13594   CPPFLAGS="$ac_save_CPPFLAGS"
13595   if test "$have_gle3" = yes ; then
13596     have_gle=yes;
13597   else
13598
13599   ac_save_CPPFLAGS="$CPPFLAGS"
13600   if test \! -z "$includedir" ; then
13601     CPPFLAGS="$CPPFLAGS -I$includedir"
13602   fi
13603   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13604   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13605   ac_fn_c_check_header_compile "$LINENO" "GL/gutil.h" "ac_cv_header_GL_gutil_h" "#include <GL/gl.h>
13606 "
13607 if test "x$ac_cv_header_GL_gutil_h" = xyes; then :
13608   have_gle=yes
13609 else
13610   have_gle=no
13611 fi
13612
13613
13614   CPPFLAGS="$ac_save_CPPFLAGS"
13615     if test "$have_gle" = yes ; then
13616
13617   ac_save_CPPFLAGS="$CPPFLAGS"
13618   if test \! -z "$includedir" ; then
13619     CPPFLAGS="$CPPFLAGS -I$includedir"
13620   fi
13621   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13622   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13623   ac_fn_c_check_header_compile "$LINENO" "GL/tube.h" "ac_cv_header_GL_tube_h" "#include <GL/gl.h>
13624 "
13625 if test "x$ac_cv_header_GL_tube_h" = xyes; then :
13626   have_gle=yes
13627 else
13628   have_gle=no
13629 fi
13630
13631
13632   CPPFLAGS="$ac_save_CPPFLAGS"
13633     fi
13634   fi
13635
13636   if test "$have_gle" = yes ; then
13637     have_gle=no
13638     gle_halfassed=yes
13639
13640   ac_save_CPPFLAGS="$CPPFLAGS"
13641   ac_save_LDFLAGS="$LDFLAGS"
13642 #  ac_save_LIBS="$LIBS"
13643
13644   if test \! -z "$includedir" ; then
13645     CPPFLAGS="$CPPFLAGS -I$includedir"
13646   fi
13647   # note: $X_CFLAGS includes $x_includes
13648   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13649
13650   if test \! -z "$libdir" ; then
13651     LDFLAGS="$LDFLAGS -L$libdir"
13652   fi
13653   # note: $X_LIBS includes $x_libraries
13654   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13655
13656   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13657   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13658   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gleCreateGC in -lgle" >&5
13659 $as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
13660 if ${ac_cv_lib_gle_gleCreateGC+:} false; then :
13661   $as_echo_n "(cached) " >&6
13662 else
13663   ac_check_lib_save_LIBS=$LIBS
13664 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
13665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13666 /* end confdefs.h.  */
13667
13668 /* Override any GCC internal prototype to avoid an error.
13669    Use char because int might match the return type of a GCC
13670    builtin and then its argument prototype would still apply.  */
13671 #ifdef __cplusplus
13672 extern "C"
13673 #endif
13674 char gleCreateGC ();
13675 int
13676 main ()
13677 {
13678 return gleCreateGC ();
13679   ;
13680   return 0;
13681 }
13682 _ACEOF
13683 if ac_fn_c_try_link "$LINENO"; then :
13684   ac_cv_lib_gle_gleCreateGC=yes
13685 else
13686   ac_cv_lib_gle_gleCreateGC=no
13687 fi
13688 rm -f core conftest.err conftest.$ac_objext \
13689     conftest$ac_exeext conftest.$ac_ext
13690 LIBS=$ac_check_lib_save_LIBS
13691 fi
13692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_gleCreateGC" >&5
13693 $as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
13694 if test "x$ac_cv_lib_gle_gleCreateGC" = xyes; then :
13695   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
13696 fi
13697
13698   CPPFLAGS="$ac_save_CPPFLAGS"
13699   LDFLAGS="$ac_save_LDFLAGS"
13700 #  LIBS="$ac_save_LIBS"
13701
13702   fi
13703   if test "$have_gle" = yes ; then
13704     have_gle=no
13705     gle_halfassed=yes
13706
13707     # sometimes the libmatrix stuff is included in libgle.  look there first.
13708 #
13709 # I don't get it.  For some reason, this test passes on SGI, as if
13710 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
13711 # Yet the link is succeeding.  Why???
13712 #
13713 #    AC_CHECK_X_LIB(gle, uview_direction_d,
13714 #                   [have_gle=yes; gle_halfassed=no],
13715 #                   [], $GL_LIBS -lX11 -lXext -lm)
13716
13717     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
13718     # *sigh*
13719     if test "$have_gle3" = yes ; then
13720
13721   ac_save_CPPFLAGS="$CPPFLAGS"
13722   ac_save_LDFLAGS="$LDFLAGS"
13723 #  ac_save_LIBS="$LIBS"
13724
13725   if test \! -z "$includedir" ; then
13726     CPPFLAGS="$CPPFLAGS -I$includedir"
13727   fi
13728   # note: $X_CFLAGS includes $x_includes
13729   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13730
13731   if test \! -z "$libdir" ; then
13732     LDFLAGS="$LDFLAGS -L$libdir"
13733   fi
13734   # note: $X_LIBS includes $x_libraries
13735   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13736
13737   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13738   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13739   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction in -lgle" >&5
13740 $as_echo_n "checking for uview_direction in -lgle... " >&6; }
13741 if ${ac_cv_lib_gle_uview_direction+:} false; then :
13742   $as_echo_n "(cached) " >&6
13743 else
13744   ac_check_lib_save_LIBS=$LIBS
13745 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
13746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13747 /* end confdefs.h.  */
13748
13749 /* Override any GCC internal prototype to avoid an error.
13750    Use char because int might match the return type of a GCC
13751    builtin and then its argument prototype would still apply.  */
13752 #ifdef __cplusplus
13753 extern "C"
13754 #endif
13755 char uview_direction ();
13756 int
13757 main ()
13758 {
13759 return uview_direction ();
13760   ;
13761   return 0;
13762 }
13763 _ACEOF
13764 if ac_fn_c_try_link "$LINENO"; then :
13765   ac_cv_lib_gle_uview_direction=yes
13766 else
13767   ac_cv_lib_gle_uview_direction=no
13768 fi
13769 rm -f core conftest.err conftest.$ac_objext \
13770     conftest$ac_exeext conftest.$ac_ext
13771 LIBS=$ac_check_lib_save_LIBS
13772 fi
13773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_uview_direction" >&5
13774 $as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
13775 if test "x$ac_cv_lib_gle_uview_direction" = xyes; then :
13776   have_gle=yes; gle_halfassed=no
13777 fi
13778
13779   CPPFLAGS="$ac_save_CPPFLAGS"
13780   LDFLAGS="$ac_save_LDFLAGS"
13781 #  LIBS="$ac_save_LIBS"
13782
13783     fi
13784     # if it wasn't in libgle, then look in libmatrix.
13785     if test "$have_gle" = no ; then
13786
13787   ac_save_CPPFLAGS="$CPPFLAGS"
13788   ac_save_LDFLAGS="$LDFLAGS"
13789 #  ac_save_LIBS="$LIBS"
13790
13791   if test \! -z "$includedir" ; then
13792     CPPFLAGS="$CPPFLAGS -I$includedir"
13793   fi
13794   # note: $X_CFLAGS includes $x_includes
13795   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13796
13797   if test \! -z "$libdir" ; then
13798     LDFLAGS="$LDFLAGS -L$libdir"
13799   fi
13800   # note: $X_LIBS includes $x_libraries
13801   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13802
13803   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13804   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction_d in -lmatrix" >&5
13806 $as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
13807 if ${ac_cv_lib_matrix_uview_direction_d+:} false; then :
13808   $as_echo_n "(cached) " >&6
13809 else
13810   ac_check_lib_save_LIBS=$LIBS
13811 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
13812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13813 /* end confdefs.h.  */
13814
13815 /* Override any GCC internal prototype to avoid an error.
13816    Use char because int might match the return type of a GCC
13817    builtin and then its argument prototype would still apply.  */
13818 #ifdef __cplusplus
13819 extern "C"
13820 #endif
13821 char uview_direction_d ();
13822 int
13823 main ()
13824 {
13825 return uview_direction_d ();
13826   ;
13827   return 0;
13828 }
13829 _ACEOF
13830 if ac_fn_c_try_link "$LINENO"; then :
13831   ac_cv_lib_matrix_uview_direction_d=yes
13832 else
13833   ac_cv_lib_matrix_uview_direction_d=no
13834 fi
13835 rm -f core conftest.err conftest.$ac_objext \
13836     conftest$ac_exeext conftest.$ac_ext
13837 LIBS=$ac_check_lib_save_LIBS
13838 fi
13839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_matrix_uview_direction_d" >&5
13840 $as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
13841 if test "x$ac_cv_lib_matrix_uview_direction_d" = xyes; then :
13842   have_gle=yes; gle_halfassed=no;
13843                       GLE_LIBS="$GLE_LIBS -lmatrix"
13844 fi
13845
13846   CPPFLAGS="$ac_save_CPPFLAGS"
13847   LDFLAGS="$ac_save_LDFLAGS"
13848 #  LIBS="$ac_save_LIBS"
13849
13850     fi
13851   fi
13852
13853   if test "$have_gle" = yes ; then
13854     $as_echo "#define HAVE_GLE 1" >>confdefs.h
13855
13856     if test "$have_gle3" = yes ; then
13857       $as_echo "#define HAVE_GLE3 1" >>confdefs.h
13858
13859     fi
13860   fi
13861
13862 elif test "$with_gle" != no; then
13863   echo "error: must be yes or no: --with-gle=$with_gle"
13864   exit 1
13865
13866 fi
13867
13868
13869 ###############################################################################
13870 #
13871 #       Handle --with-gles
13872 #
13873 ###############################################################################
13874
13875 with_gles_req=unspecified
13876
13877 # Check whether --with-gles was given.
13878 if test "${with_gles+set}" = set; then :
13879   withval=$with_gles; with_gles="$withval"; with_gles_req="$withval"
13880 else
13881   with_gles=no
13882 fi
13883
13884
13885
13886    case "$with_gles" in
13887     yes) ;;
13888     no)  ;;
13889
13890     /*)
13891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES headers" >&5
13892 $as_echo_n "checking for JWZGLES headers... " >&6; }
13893      d=$with_gles/include
13894      if test -d $d; then
13895        X_CFLAGS="-I$d $X_CFLAGS"
13896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13897 $as_echo "$d" >&6; }
13898      else
13899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13900 $as_echo "not found ($d: no such directory)" >&6; }
13901      fi
13902
13903      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES libs" >&5
13904 $as_echo_n "checking for JWZGLES libs... " >&6; }
13905      d=$with_gles/lib
13906      if test -d $d; then
13907        X_LIBS="-L$d $X_LIBS"
13908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13909 $as_echo "$d" >&6; }
13910      else
13911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13912 $as_echo "not found ($d: no such directory)" >&6; }
13913      fi
13914
13915      # replace the directory string with "yes".
13916      with_gles_req="yes"
13917      with_gles=$with_gles_req
13918      ;;
13919
13920     *)
13921      echo ""
13922      echo "error: argument to --with-gles must be \"yes\", \"no\", or a directory."
13923      echo "       If it is a directory, then \`DIR/include' will be added to"
13924      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13925      exit 1
13926      ;;
13927    esac
13928
13929
13930 if test "$with_gles" = yes; then
13931   have_gles=yes
13932   $as_echo "#define HAVE_JWZGLES 1" >>confdefs.h
13933
13934   JWZGLES_OBJS='$(JWXYZ_BIN)/jwzgles.o'
13935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OpenGL ES compatiblity shim" >&5
13936 $as_echo "using OpenGL ES compatiblity shim" >&6; }
13937 elif test "$with_gles" != no; then
13938   echo "error: must be yes or no: --with-gles=$with_gles"
13939   exit 1
13940 fi
13941
13942 ###############################################################################
13943 #
13944 #       Check for -lpng
13945 #
13946 ###############################################################################
13947
13948 have_png=no
13949 with_png_req=unspecified
13950 png_halfassed=no
13951
13952 # Check whether --with-png was given.
13953 if test "${with_png+set}" = set; then :
13954   withval=$with_png; with_png="$withval"; with_png_req="$withval"
13955 else
13956   with_png=yes
13957 fi
13958
13959
13960
13961    case "$with_png" in
13962     yes) ;;
13963     no)  ;;
13964
13965     /*)
13966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG headers" >&5
13967 $as_echo_n "checking for PNG headers... " >&6; }
13968      d=$with_png/include
13969      if test -d $d; then
13970        X_CFLAGS="-I$d $X_CFLAGS"
13971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13972 $as_echo "$d" >&6; }
13973      else
13974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13975 $as_echo "not found ($d: no such directory)" >&6; }
13976      fi
13977
13978      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG libs" >&5
13979 $as_echo_n "checking for PNG libs... " >&6; }
13980      d=$with_png/lib
13981      if test -d $d; then
13982        X_LIBS="-L$d $X_LIBS"
13983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13984 $as_echo "$d" >&6; }
13985      else
13986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13987 $as_echo "not found ($d: no such directory)" >&6; }
13988      fi
13989
13990      # replace the directory string with "yes".
13991      with_png_req="yes"
13992      with_png=$with_png_req
13993      ;;
13994
13995     *)
13996      echo ""
13997      echo "error: argument to --with-png must be \"yes\", \"no\", or a directory."
13998      echo "       If it is a directory, then \`DIR/include' will be added to"
13999      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14000      exit 1
14001      ;;
14002    esac
14003
14004
14005 if test "$with_png" != yes -a "$with_png" != no ; then
14006   echo "error: must be yes or no: --with-png=$with_png"
14007   exit 1
14008 fi
14009
14010 if test "$with_png" = yes; then
14011
14012   have_png=no
14013
14014   ac_save_CPPFLAGS="$CPPFLAGS"
14015   if test \! -z "$includedir" ; then
14016     CPPFLAGS="$CPPFLAGS -I$includedir"
14017   fi
14018   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14019   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14020   ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
14021 if test "x$ac_cv_header_png_h" = xyes; then :
14022   have_png=yes
14023 fi
14024
14025
14026   CPPFLAGS="$ac_save_CPPFLAGS"
14027
14028   if test "$have_png" = yes; then
14029     # we have the header, now check for the library
14030     have_png=no
14031     png_halfassed=yes
14032
14033   ac_save_CPPFLAGS="$CPPFLAGS"
14034   ac_save_LDFLAGS="$LDFLAGS"
14035 #  ac_save_LIBS="$LIBS"
14036
14037   if test \! -z "$includedir" ; then
14038     CPPFLAGS="$CPPFLAGS -I$includedir"
14039   fi
14040   # note: $X_CFLAGS includes $x_includes
14041   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14042
14043   if test \! -z "$libdir" ; then
14044     LDFLAGS="$LDFLAGS -L$libdir"
14045   fi
14046   # note: $X_LIBS includes $x_libraries
14047   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14048
14049   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14050   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_create_read_struct in -lpng" >&5
14052 $as_echo_n "checking for png_create_read_struct in -lpng... " >&6; }
14053 if ${ac_cv_lib_png_png_create_read_struct+:} false; then :
14054   $as_echo_n "(cached) " >&6
14055 else
14056   ac_check_lib_save_LIBS=$LIBS
14057 LIBS="-lpng  $LIBS"
14058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14059 /* end confdefs.h.  */
14060
14061 /* Override any GCC internal prototype to avoid an error.
14062    Use char because int might match the return type of a GCC
14063    builtin and then its argument prototype would still apply.  */
14064 #ifdef __cplusplus
14065 extern "C"
14066 #endif
14067 char png_create_read_struct ();
14068 int
14069 main ()
14070 {
14071 return png_create_read_struct ();
14072   ;
14073   return 0;
14074 }
14075 _ACEOF
14076 if ac_fn_c_try_link "$LINENO"; then :
14077   ac_cv_lib_png_png_create_read_struct=yes
14078 else
14079   ac_cv_lib_png_png_create_read_struct=no
14080 fi
14081 rm -f core conftest.err conftest.$ac_objext \
14082     conftest$ac_exeext conftest.$ac_ext
14083 LIBS=$ac_check_lib_save_LIBS
14084 fi
14085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_create_read_struct" >&5
14086 $as_echo "$ac_cv_lib_png_png_create_read_struct" >&6; }
14087 if test "x$ac_cv_lib_png_png_create_read_struct" = xyes; then :
14088   have_png=yes
14089                     png_halfassed=no
14090                     PNG_LIBS="-lpng"
14091                     $as_echo "#define HAVE_LIBPNG 1" >>confdefs.h
14092
14093 fi
14094
14095   CPPFLAGS="$ac_save_CPPFLAGS"
14096   LDFLAGS="$ac_save_LDFLAGS"
14097 #  LIBS="$ac_save_LIBS"
14098
14099   fi
14100 fi
14101
14102
14103 ###############################################################################
14104 #
14105 #       Check for -lgdk_pixbuf.
14106 #       These tests are for gdk_pixbuf usage of the hacks,
14107 #       not xscreensaver-demo (thus we have to test again to get
14108 #       the libraries right: don't want to pull in all of GTK
14109 #       for the hacks.)
14110 #
14111 ###############################################################################
14112
14113 have_gdk_pixbuf=no
14114 with_gdk_pixbuf_req=unspecified
14115
14116 # Check whether --with-pixbuf was given.
14117 if test "${with_pixbuf+set}" = set; then :
14118   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
14119 else
14120   with_gdk_pixbuf=yes
14121 fi
14122
14123
14124 # if --with-pixbuf=/directory/ was specified, remember that directory so that
14125 # we can also look for the `gdk-pixbuf-config' program in that directory.
14126 case "$with_gdk_pixbuf" in
14127   /*)
14128     gdk_pixbuf_dir="$with_gdk_pixbuf"
14129     ;;
14130   *)
14131     gdk_pixbuf_dir=""
14132     ;;
14133 esac
14134
14135
14136    case "$with_gdk_pixbuf" in
14137     yes) ;;
14138     no)  ;;
14139
14140     /*)
14141      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF headers" >&5
14142 $as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
14143      d=$with_gdk_pixbuf/include
14144      if test -d $d; then
14145        X_CFLAGS="-I$d $X_CFLAGS"
14146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14147 $as_echo "$d" >&6; }
14148      else
14149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14150 $as_echo "not found ($d: no such directory)" >&6; }
14151      fi
14152
14153      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF libs" >&5
14154 $as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
14155      d=$with_gdk_pixbuf/lib
14156      if test -d $d; then
14157        X_LIBS="-L$d $X_LIBS"
14158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14159 $as_echo "$d" >&6; }
14160      else
14161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14162 $as_echo "not found ($d: no such directory)" >&6; }
14163      fi
14164
14165      # replace the directory string with "yes".
14166      with_gdk_pixbuf_req="yes"
14167      with_gdk_pixbuf=$with_gdk_pixbuf_req
14168      ;;
14169
14170     *)
14171      echo ""
14172      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
14173      echo "       If it is a directory, then \`DIR/include' will be added to"
14174      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14175      exit 1
14176      ;;
14177    esac
14178
14179
14180 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
14181   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
14182   exit 1
14183 fi
14184
14185 if test "$with_gdk_pixbuf" = yes; then
14186   have_gdk_pixbuf=no
14187
14188   pkgs=''
14189   ok="yes"
14190
14191   pkg_check_version gdk-pixbuf-2.0      2.0.0
14192   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
14193   pkg_check_version gio-2.0             2.0.0
14194   have_gdk_pixbuf="$ok"
14195
14196   if test "$have_gdk_pixbuf" = yes; then
14197     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf includes" >&5
14198 $as_echo_n "checking for gdk-pixbuf includes... " >&6; }
14199 if ${ac_cv_gdk_pixbuf_config_cflags+:} false; then :
14200   $as_echo_n "(cached) " >&6
14201 else
14202   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
14203 fi
14204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
14205 $as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
14206     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf libs" >&5
14207 $as_echo_n "checking for gdk-pixbuf libs... " >&6; }
14208 if ${ac_cv_gdk_pixbuf_config_libs+:} false; then :
14209   $as_echo_n "(cached) " >&6
14210 else
14211   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
14212 fi
14213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_libs" >&5
14214 $as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
14215   fi
14216
14217   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
14218   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
14219
14220
14221   if test "$have_gdk_pixbuf" = yes; then
14222     #
14223     # we appear to have pixbuf; check for headers/libs to be sure.
14224     #
14225     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
14226     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
14227
14228     have_gdk_pixbuf=no
14229
14230     # check for header A...
14231
14232   ac_save_CPPFLAGS="$CPPFLAGS"
14233   if test \! -z "$includedir" ; then
14234     CPPFLAGS="$CPPFLAGS -I$includedir"
14235   fi
14236   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14237   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14238   ac_fn_c_check_header_mongrel "$LINENO" "gdk-pixbuf/gdk-pixbuf.h" "ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" "$ac_includes_default"
14239 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = xyes; then :
14240   have_gdk_pixbuf=yes
14241 fi
14242
14243
14244   CPPFLAGS="$ac_save_CPPFLAGS"
14245
14246     # if that worked, check for header B...
14247     if test "$have_gdk_pixbuf" = yes; then
14248       have_gdk_pixbuf=no
14249       gdk_pixbuf_halfassed=yes
14250
14251   ac_save_CPPFLAGS="$CPPFLAGS"
14252   if test \! -z "$includedir" ; then
14253     CPPFLAGS="$CPPFLAGS -I$includedir"
14254   fi
14255   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14256   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14257   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"
14258 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = xyes; then :
14259   have_gdk_pixbuf=yes
14260                          gdk_pixbuf_halfassed=no
14261 fi
14262
14263
14264   CPPFLAGS="$ac_save_CPPFLAGS"
14265
14266       # yay, it has a new name in Gtk 2.x...
14267       if test "$have_gdk_pixbuf" = no; then
14268         have_gdk_pixbuf=no
14269         gdk_pixbuf_halfassed=yes
14270
14271   ac_save_CPPFLAGS="$CPPFLAGS"
14272   if test \! -z "$includedir" ; then
14273     CPPFLAGS="$CPPFLAGS -I$includedir"
14274   fi
14275   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14276   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14277   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"
14278 if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = xyes; then :
14279   have_gdk_pixbuf=yes
14280                            gdk_pixbuf_halfassed=no
14281 fi
14282
14283
14284   CPPFLAGS="$ac_save_CPPFLAGS"
14285       fi
14286     fi
14287     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
14288   fi
14289
14290   if test "$have_gdk_pixbuf" = yes; then
14291     # we have the headers, now check for the libraries
14292     have_gdk_pixbuf=no
14293     gdk_pixbuf_halfassed=yes
14294
14295     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability..." >&5
14296 $as_echo "checking for gdk_pixbuf usability..." >&6; }
14297
14298     # library A...
14299
14300   ac_save_CPPFLAGS="$CPPFLAGS"
14301   ac_save_LDFLAGS="$LDFLAGS"
14302 #  ac_save_LIBS="$LIBS"
14303
14304   if test \! -z "$includedir" ; then
14305     CPPFLAGS="$CPPFLAGS -I$includedir"
14306   fi
14307   # note: $X_CFLAGS includes $x_includes
14308   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14309
14310   if test \! -z "$libdir" ; then
14311     LDFLAGS="$LDFLAGS -L$libdir"
14312   fi
14313   # note: $X_LIBS includes $x_libraries
14314   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14315
14316   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14317   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14318   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_new_from_file in -lc" >&5
14319 $as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
14320 if ${ac_cv_lib_c_gdk_pixbuf_new_from_file+:} false; then :
14321   $as_echo_n "(cached) " >&6
14322 else
14323   ac_check_lib_save_LIBS=$LIBS
14324 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
14325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14326 /* end confdefs.h.  */
14327
14328 /* Override any GCC internal prototype to avoid an error.
14329    Use char because int might match the return type of a GCC
14330    builtin and then its argument prototype would still apply.  */
14331 #ifdef __cplusplus
14332 extern "C"
14333 #endif
14334 char gdk_pixbuf_new_from_file ();
14335 int
14336 main ()
14337 {
14338 return gdk_pixbuf_new_from_file ();
14339   ;
14340   return 0;
14341 }
14342 _ACEOF
14343 if ac_fn_c_try_link "$LINENO"; then :
14344   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
14345 else
14346   ac_cv_lib_c_gdk_pixbuf_new_from_file=no
14347 fi
14348 rm -f core conftest.err conftest.$ac_objext \
14349     conftest$ac_exeext conftest.$ac_ext
14350 LIBS=$ac_check_lib_save_LIBS
14351 fi
14352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
14353 $as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
14354 if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = xyes; then :
14355   have_gdk_pixbuf=yes
14356 fi
14357
14358   CPPFLAGS="$ac_save_CPPFLAGS"
14359   LDFLAGS="$ac_save_LDFLAGS"
14360 #  LIBS="$ac_save_LIBS"
14361
14362     # library B...
14363     if test "$have_gdk_pixbuf" = yes; then
14364       have_gdk_pixbuf=no
14365
14366   ac_save_CPPFLAGS="$CPPFLAGS"
14367   ac_save_LDFLAGS="$LDFLAGS"
14368 #  ac_save_LIBS="$LIBS"
14369
14370   if test \! -z "$includedir" ; then
14371     CPPFLAGS="$CPPFLAGS -I$includedir"
14372   fi
14373   # note: $X_CFLAGS includes $x_includes
14374   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14375
14376   if test \! -z "$libdir" ; then
14377     LDFLAGS="$LDFLAGS -L$libdir"
14378   fi
14379   # note: $X_LIBS includes $x_libraries
14380   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14381
14382   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14383   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14384   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_xlib_init in -lc" >&5
14385 $as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
14386 if ${ac_cv_lib_c_gdk_pixbuf_xlib_init+:} false; then :
14387   $as_echo_n "(cached) " >&6
14388 else
14389   ac_check_lib_save_LIBS=$LIBS
14390 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
14391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14392 /* end confdefs.h.  */
14393
14394 /* Override any GCC internal prototype to avoid an error.
14395    Use char because int might match the return type of a GCC
14396    builtin and then its argument prototype would still apply.  */
14397 #ifdef __cplusplus
14398 extern "C"
14399 #endif
14400 char gdk_pixbuf_xlib_init ();
14401 int
14402 main ()
14403 {
14404 return gdk_pixbuf_xlib_init ();
14405   ;
14406   return 0;
14407 }
14408 _ACEOF
14409 if ac_fn_c_try_link "$LINENO"; then :
14410   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
14411 else
14412   ac_cv_lib_c_gdk_pixbuf_xlib_init=no
14413 fi
14414 rm -f core conftest.err conftest.$ac_objext \
14415     conftest$ac_exeext conftest.$ac_ext
14416 LIBS=$ac_check_lib_save_LIBS
14417 fi
14418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
14419 $as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
14420 if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = xyes; then :
14421   have_gdk_pixbuf=yes
14422                       gdk_pixbuf_halfassed=no
14423 fi
14424
14425   CPPFLAGS="$ac_save_CPPFLAGS"
14426   LDFLAGS="$ac_save_LDFLAGS"
14427 #  LIBS="$ac_save_LIBS"
14428
14429     fi
14430   fi
14431
14432   if test "$have_gdk_pixbuf" = yes; then
14433     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
14434     PNG_LIBS="$ac_gdk_pixbuf_config_libs"
14435     $as_echo "#define HAVE_GDK_PIXBUF 1" >>confdefs.h
14436
14437   else
14438     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability... no" >&5
14439 $as_echo "checking for gdk_pixbuf usability... no" >&6; }
14440   fi
14441
14442   if test "$have_gdk_pixbuf" = yes; then
14443
14444   ac_save_CPPFLAGS="$CPPFLAGS"
14445   ac_save_LDFLAGS="$LDFLAGS"
14446 #  ac_save_LIBS="$LIBS"
14447
14448   if test \! -z "$includedir" ; then
14449     CPPFLAGS="$CPPFLAGS -I$includedir"
14450   fi
14451   # note: $X_CFLAGS includes $x_includes
14452   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14453
14454   if test \! -z "$libdir" ; then
14455     LDFLAGS="$LDFLAGS -L$libdir"
14456   fi
14457   # note: $X_LIBS includes $x_libraries
14458   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14459
14460   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14461   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14462   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
14463 $as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
14464 if ${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+:} false; then :
14465   $as_echo_n "(cached) " >&6
14466 else
14467   ac_check_lib_save_LIBS=$LIBS
14468 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
14469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14470 /* end confdefs.h.  */
14471
14472 /* Override any GCC internal prototype to avoid an error.
14473    Use char because int might match the return type of a GCC
14474    builtin and then its argument prototype would still apply.  */
14475 #ifdef __cplusplus
14476 extern "C"
14477 #endif
14478 char gdk_pixbuf_apply_embedded_orientation ();
14479 int
14480 main ()
14481 {
14482 return gdk_pixbuf_apply_embedded_orientation ();
14483   ;
14484   return 0;
14485 }
14486 _ACEOF
14487 if ac_fn_c_try_link "$LINENO"; then :
14488   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
14489 else
14490   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
14491 fi
14492 rm -f core conftest.err conftest.$ac_objext \
14493     conftest$ac_exeext conftest.$ac_ext
14494 LIBS=$ac_check_lib_save_LIBS
14495 fi
14496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
14497 $as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
14498 if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = xyes; then :
14499   $as_echo "#define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1" >>confdefs.h
14500
14501 fi
14502
14503   CPPFLAGS="$ac_save_CPPFLAGS"
14504   LDFLAGS="$ac_save_LDFLAGS"
14505 #  LIBS="$ac_save_LIBS"
14506
14507   fi
14508 fi
14509
14510
14511 ###############################################################################
14512 #
14513 #       Check for -ljpeg
14514 #
14515 ###############################################################################
14516
14517 have_jpeg=no
14518 with_jpeg_req=unspecified
14519 jpeg_halfassed=no
14520
14521 # Check whether --with-jpeg was given.
14522 if test "${with_jpeg+set}" = set; then :
14523   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
14524 else
14525   with_jpeg=yes
14526 fi
14527
14528
14529
14530    case "$with_jpeg" in
14531     yes) ;;
14532     no)  ;;
14533
14534     /*)
14535      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG headers" >&5
14536 $as_echo_n "checking for JPEG headers... " >&6; }
14537      d=$with_jpeg/include
14538      if test -d $d; then
14539        X_CFLAGS="-I$d $X_CFLAGS"
14540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14541 $as_echo "$d" >&6; }
14542      else
14543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14544 $as_echo "not found ($d: no such directory)" >&6; }
14545      fi
14546
14547      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG libs" >&5
14548 $as_echo_n "checking for JPEG libs... " >&6; }
14549      d=$with_jpeg/lib
14550      if test -d $d; then
14551        X_LIBS="-L$d $X_LIBS"
14552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14553 $as_echo "$d" >&6; }
14554      else
14555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14556 $as_echo "not found ($d: no such directory)" >&6; }
14557      fi
14558
14559      # replace the directory string with "yes".
14560      with_jpeg_req="yes"
14561      with_jpeg=$with_jpeg_req
14562      ;;
14563
14564     *)
14565      echo ""
14566      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
14567      echo "       If it is a directory, then \`DIR/include' will be added to"
14568      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14569      exit 1
14570      ;;
14571    esac
14572
14573
14574 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
14575   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
14576   exit 1
14577 fi
14578
14579 if test "$with_jpeg" = yes; then
14580
14581   have_jpeg=no
14582
14583   ac_save_CPPFLAGS="$CPPFLAGS"
14584   if test \! -z "$includedir" ; then
14585     CPPFLAGS="$CPPFLAGS -I$includedir"
14586   fi
14587   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14588   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14589   ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
14590 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
14591   have_jpeg=yes
14592 fi
14593
14594
14595   CPPFLAGS="$ac_save_CPPFLAGS"
14596
14597   if test "$have_jpeg" = yes; then
14598     # we have the header, now check for the library
14599     have_jpeg=no
14600     jpeg_halfassed=yes
14601
14602   ac_save_CPPFLAGS="$CPPFLAGS"
14603   ac_save_LDFLAGS="$LDFLAGS"
14604 #  ac_save_LIBS="$LIBS"
14605
14606   if test \! -z "$includedir" ; then
14607     CPPFLAGS="$CPPFLAGS -I$includedir"
14608   fi
14609   # note: $X_CFLAGS includes $x_includes
14610   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14611
14612   if test \! -z "$libdir" ; then
14613     LDFLAGS="$LDFLAGS -L$libdir"
14614   fi
14615   # note: $X_LIBS includes $x_libraries
14616   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14617
14618   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14619   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_start_compress in -ljpeg" >&5
14621 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
14622 if ${ac_cv_lib_jpeg_jpeg_start_compress+:} false; then :
14623   $as_echo_n "(cached) " >&6
14624 else
14625   ac_check_lib_save_LIBS=$LIBS
14626 LIBS="-ljpeg  $LIBS"
14627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628 /* end confdefs.h.  */
14629
14630 /* Override any GCC internal prototype to avoid an error.
14631    Use char because int might match the return type of a GCC
14632    builtin and then its argument prototype would still apply.  */
14633 #ifdef __cplusplus
14634 extern "C"
14635 #endif
14636 char jpeg_start_compress ();
14637 int
14638 main ()
14639 {
14640 return jpeg_start_compress ();
14641   ;
14642   return 0;
14643 }
14644 _ACEOF
14645 if ac_fn_c_try_link "$LINENO"; then :
14646   ac_cv_lib_jpeg_jpeg_start_compress=yes
14647 else
14648   ac_cv_lib_jpeg_jpeg_start_compress=no
14649 fi
14650 rm -f core conftest.err conftest.$ac_objext \
14651     conftest$ac_exeext conftest.$ac_ext
14652 LIBS=$ac_check_lib_save_LIBS
14653 fi
14654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
14655 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
14656 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = xyes; then :
14657   have_jpeg=yes
14658                     jpeg_halfassed=no
14659                     JPEG_LIBS="-ljpeg"
14660                     $as_echo "#define HAVE_JPEGLIB 1" >>confdefs.h
14661
14662 fi
14663
14664   CPPFLAGS="$ac_save_CPPFLAGS"
14665   LDFLAGS="$ac_save_LDFLAGS"
14666 #  LIBS="$ac_save_LIBS"
14667
14668   fi
14669 fi
14670
14671
14672 ###############################################################################
14673 #
14674 #       Check for -lXft
14675 #
14676 ###############################################################################
14677
14678 have_xutf8drawstring=no
14679
14680   ac_save_CPPFLAGS="$CPPFLAGS"
14681   ac_save_LDFLAGS="$LDFLAGS"
14682 #  ac_save_LIBS="$LIBS"
14683
14684   if test \! -z "$includedir" ; then
14685     CPPFLAGS="$CPPFLAGS -I$includedir"
14686   fi
14687   # note: $X_CFLAGS includes $x_includes
14688   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14689
14690   if test \! -z "$libdir" ; then
14691     LDFLAGS="$LDFLAGS -L$libdir"
14692   fi
14693   # note: $X_LIBS includes $x_libraries
14694   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14695
14696   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14697   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14698   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xutf8DrawString in -lX11" >&5
14699 $as_echo_n "checking for Xutf8DrawString in -lX11... " >&6; }
14700 if ${ac_cv_lib_X11_Xutf8DrawString+:} false; then :
14701   $as_echo_n "(cached) " >&6
14702 else
14703   ac_check_lib_save_LIBS=$LIBS
14704 LIBS="-lX11 -lX11 -lXext -lm $LIBS"
14705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14706 /* end confdefs.h.  */
14707
14708 /* Override any GCC internal prototype to avoid an error.
14709    Use char because int might match the return type of a GCC
14710    builtin and then its argument prototype would still apply.  */
14711 #ifdef __cplusplus
14712 extern "C"
14713 #endif
14714 char Xutf8DrawString ();
14715 int
14716 main ()
14717 {
14718 return Xutf8DrawString ();
14719   ;
14720   return 0;
14721 }
14722 _ACEOF
14723 if ac_fn_c_try_link "$LINENO"; then :
14724   ac_cv_lib_X11_Xutf8DrawString=yes
14725 else
14726   ac_cv_lib_X11_Xutf8DrawString=no
14727 fi
14728 rm -f core conftest.err conftest.$ac_objext \
14729     conftest$ac_exeext conftest.$ac_ext
14730 LIBS=$ac_check_lib_save_LIBS
14731 fi
14732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_Xutf8DrawString" >&5
14733 $as_echo "$ac_cv_lib_X11_Xutf8DrawString" >&6; }
14734 if test "x$ac_cv_lib_X11_Xutf8DrawString" = xyes; then :
14735   have_xutf8drawstring=yes
14736 else
14737   true
14738 fi
14739
14740   CPPFLAGS="$ac_save_CPPFLAGS"
14741   LDFLAGS="$ac_save_LDFLAGS"
14742 #  LIBS="$ac_save_LIBS"
14743
14744 if test "$have_xutf8drawstring" = yes ; then
14745   $as_echo "#define HAVE_XUTF8DRAWSTRING 1" >>confdefs.h
14746
14747 fi
14748
14749
14750 have_xft=no
14751 with_xft_req=unspecified
14752 xft_halfassed=no
14753
14754 # Check whether --with-xft was given.
14755 if test "${with_xft+set}" = set; then :
14756   withval=$with_xft; with_xft="$withval"; with_xft_req="$withval"
14757 else
14758   with_xft=yes
14759 fi
14760
14761
14762
14763    case "$with_xft" in
14764     yes) ;;
14765     no)  ;;
14766
14767     /*)
14768      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft headers" >&5
14769 $as_echo_n "checking for Xft headers... " >&6; }
14770      d=$with_xft/include
14771      if test -d $d; then
14772        X_CFLAGS="-I$d $X_CFLAGS"
14773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14774 $as_echo "$d" >&6; }
14775      else
14776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14777 $as_echo "not found ($d: no such directory)" >&6; }
14778      fi
14779
14780      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft libs" >&5
14781 $as_echo_n "checking for Xft libs... " >&6; }
14782      d=$with_xft/lib
14783      if test -d $d; then
14784        X_LIBS="-L$d $X_LIBS"
14785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14786 $as_echo "$d" >&6; }
14787      else
14788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14789 $as_echo "not found ($d: no such directory)" >&6; }
14790      fi
14791
14792      # replace the directory string with "yes".
14793      with_xft_req="yes"
14794      with_xft=$with_xft_req
14795      ;;
14796
14797     *)
14798      echo ""
14799      echo "error: argument to --with-xft must be \"yes\", \"no\", or a directory."
14800      echo "       If it is a directory, then \`DIR/include' will be added to"
14801      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14802      exit 1
14803      ;;
14804    esac
14805
14806
14807 if test "$with_xft" != yes -a "$with_xft" != no ; then
14808   echo "error: must be yes or no: --with-xft=$with_xft"
14809   exit 1
14810 fi
14811
14812 if test "$with_xft" = yes; then
14813
14814   pkgs=''
14815   ok="yes"
14816   pkg_check_version xft 2.1.0
14817   have_xft="$ok"
14818
14819   if test "$have_xft" = yes; then
14820     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft includes" >&5
14821 $as_echo_n "checking for Xft includes... " >&6; }
14822 if ${ac_cv_xft_config_cflags+:} false; then :
14823   $as_echo_n "(cached) " >&6
14824 else
14825   ac_cv_xft_config_cflags=`$pkg_config --cflags $pkgs`
14826 fi
14827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xft_config_cflags" >&5
14828 $as_echo "$ac_cv_xft_config_cflags" >&6; }
14829     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft libs" >&5
14830 $as_echo_n "checking for Xft libs... " >&6; }
14831 if ${ac_cv_xft_config_libs+:} false; then :
14832   $as_echo_n "(cached) " >&6
14833 else
14834   ac_cv_xft_config_libs=`$pkg_config --libs $pkgs`
14835 fi
14836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xft_config_libs" >&5
14837 $as_echo "$ac_cv_xft_config_libs" >&6; }
14838   fi
14839
14840   ac_xft_config_cflags=$ac_cv_xft_config_cflags
14841   ac_xft_config_libs=$ac_cv_xft_config_libs
14842
14843   if test "$have_xft" = yes; then
14844     #
14845     # we appear to have Xft; check for headers/libs to be sure.
14846     #
14847     ac_save_xft_CPPFLAGS="$CPPFLAGS"
14848     CPPFLAGS="$CPPFLAGS $ac_xft_config_cflags"
14849
14850     have_xft=no
14851
14852   ac_save_CPPFLAGS="$CPPFLAGS"
14853   if test \! -z "$includedir" ; then
14854     CPPFLAGS="$CPPFLAGS -I$includedir"
14855   fi
14856   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14857   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14858   ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
14859 if test "x$ac_cv_header_X11_Xft_Xft_h" = xyes; then :
14860   have_xft=yes
14861 fi
14862
14863
14864   CPPFLAGS="$ac_save_CPPFLAGS"
14865
14866     CPPFLAGS="$ac_save_xft_CPPFLAGS"
14867   fi
14868
14869   if test "$have_xft" = yes; then
14870     # we have the headers, now check for the libraries
14871     have_xft=no
14872     xft_halfassed=yes
14873
14874     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for Xft usability..." >&5
14875 $as_echo "checking for Xft usability..." >&6; }
14876
14877   ac_save_CPPFLAGS="$CPPFLAGS"
14878   ac_save_LDFLAGS="$LDFLAGS"
14879 #  ac_save_LIBS="$LIBS"
14880
14881   if test \! -z "$includedir" ; then
14882     CPPFLAGS="$CPPFLAGS -I$includedir"
14883   fi
14884   # note: $X_CFLAGS includes $x_includes
14885   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14886
14887   if test \! -z "$libdir" ; then
14888     LDFLAGS="$LDFLAGS -L$libdir"
14889   fi
14890   # note: $X_LIBS includes $x_libraries
14891   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14892
14893   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14894   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14895   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftDrawStringUtf8 in -lc" >&5
14896 $as_echo_n "checking for XftDrawStringUtf8 in -lc... " >&6; }
14897 if ${ac_cv_lib_c_XftDrawStringUtf8+:} false; then :
14898   $as_echo_n "(cached) " >&6
14899 else
14900   ac_check_lib_save_LIBS=$LIBS
14901 LIBS="-lc $ac_xft_config_libs -lX11 -lXext -lm $LIBS"
14902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14903 /* end confdefs.h.  */
14904
14905 /* Override any GCC internal prototype to avoid an error.
14906    Use char because int might match the return type of a GCC
14907    builtin and then its argument prototype would still apply.  */
14908 #ifdef __cplusplus
14909 extern "C"
14910 #endif
14911 char XftDrawStringUtf8 ();
14912 int
14913 main ()
14914 {
14915 return XftDrawStringUtf8 ();
14916   ;
14917   return 0;
14918 }
14919 _ACEOF
14920 if ac_fn_c_try_link "$LINENO"; then :
14921   ac_cv_lib_c_XftDrawStringUtf8=yes
14922 else
14923   ac_cv_lib_c_XftDrawStringUtf8=no
14924 fi
14925 rm -f core conftest.err conftest.$ac_objext \
14926     conftest$ac_exeext conftest.$ac_ext
14927 LIBS=$ac_check_lib_save_LIBS
14928 fi
14929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_XftDrawStringUtf8" >&5
14930 $as_echo "$ac_cv_lib_c_XftDrawStringUtf8" >&6; }
14931 if test "x$ac_cv_lib_c_XftDrawStringUtf8" = xyes; then :
14932   have_xft=yes
14933 fi
14934
14935   CPPFLAGS="$ac_save_CPPFLAGS"
14936   LDFLAGS="$ac_save_LDFLAGS"
14937 #  LIBS="$ac_save_LIBS"
14938
14939   fi
14940
14941   if test "$have_xft" = no; then
14942     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for Xft usability... no" >&5
14943 $as_echo "checking for Xft usability... no" >&6; }
14944   fi
14945 fi
14946
14947 if test "$have_xft" = yes; then
14948   INCLUDES="$INCLUDES $ac_xft_config_cflags"
14949   XFT_LIBS="$ac_xft_config_libs"
14950   XFT_SRCS=''
14951   XFT_OBJS=''
14952   $as_echo "#define HAVE_XFT 1" >>confdefs.h
14953
14954 else
14955   XFT_LIBS=''
14956   XFT_SRCS='$(UTILS_SRC)/xft.c'
14957   XFT_OBJS='$(UTILS_BIN)/xft.o'
14958 fi
14959
14960
14961 ###############################################################################
14962 #
14963 #       Check for pty support: this allows 'phosphor' and 'apple2'
14964 #       to run curses-based programs, or be used as terminal windows.
14965 #
14966 ###############################################################################
14967
14968 PTY_LIBS=
14969 for ac_header in pty.h util.h sys/termios.h
14970 do :
14971   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14972 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14973 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14974   cat >>confdefs.h <<_ACEOF
14975 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14976 _ACEOF
14977
14978 fi
14979
14980 done
14981
14982
14983   ac_save_CPPFLAGS="$CPPFLAGS"
14984   ac_save_LDFLAGS="$LDFLAGS"
14985 #  ac_save_LIBS="$LIBS"
14986
14987   if test \! -z "$includedir" ; then
14988     CPPFLAGS="$CPPFLAGS -I$includedir"
14989   fi
14990   # note: $X_CFLAGS includes $x_includes
14991   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14992
14993   if test \! -z "$libdir" ; then
14994     LDFLAGS="$LDFLAGS -L$libdir"
14995   fi
14996   # note: $X_LIBS includes $x_libraries
14997   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14998
14999   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15000   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15001   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
15002 $as_echo_n "checking for forkpty in -lutil... " >&6; }
15003 if ${ac_cv_lib_util_forkpty+:} false; then :
15004   $as_echo_n "(cached) " >&6
15005 else
15006   ac_check_lib_save_LIBS=$LIBS
15007 LIBS="-lutil  $LIBS"
15008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15009 /* end confdefs.h.  */
15010
15011 /* Override any GCC internal prototype to avoid an error.
15012    Use char because int might match the return type of a GCC
15013    builtin and then its argument prototype would still apply.  */
15014 #ifdef __cplusplus
15015 extern "C"
15016 #endif
15017 char forkpty ();
15018 int
15019 main ()
15020 {
15021 return forkpty ();
15022   ;
15023   return 0;
15024 }
15025 _ACEOF
15026 if ac_fn_c_try_link "$LINENO"; then :
15027   ac_cv_lib_util_forkpty=yes
15028 else
15029   ac_cv_lib_util_forkpty=no
15030 fi
15031 rm -f core conftest.err conftest.$ac_objext \
15032     conftest$ac_exeext conftest.$ac_ext
15033 LIBS=$ac_check_lib_save_LIBS
15034 fi
15035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
15036 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
15037 if test "x$ac_cv_lib_util_forkpty" = xyes; then :
15038   PTY_LIBS="-lutil"
15039                 ac_have_forkpty=yes
15040                 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
15041
15042 fi
15043
15044   CPPFLAGS="$ac_save_CPPFLAGS"
15045   LDFLAGS="$ac_save_LDFLAGS"
15046 #  LIBS="$ac_save_LIBS"
15047
15048
15049 if test "$ac_have_forkpty" != yes ; then
15050   # we don't need (or have) -lutil on MacOS 10.4.2...
15051
15052   ac_save_CPPFLAGS="$CPPFLAGS"
15053   ac_save_LDFLAGS="$LDFLAGS"
15054 #  ac_save_LIBS="$LIBS"
15055
15056   if test \! -z "$includedir" ; then
15057     CPPFLAGS="$CPPFLAGS -I$includedir"
15058   fi
15059   # note: $X_CFLAGS includes $x_includes
15060   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15061
15062   if test \! -z "$libdir" ; then
15063     LDFLAGS="$LDFLAGS -L$libdir"
15064   fi
15065   # note: $X_LIBS includes $x_libraries
15066   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15067
15068   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15069   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15070   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lc" >&5
15071 $as_echo_n "checking for forkpty in -lc... " >&6; }
15072 if ${ac_cv_lib_c_forkpty+:} false; then :
15073   $as_echo_n "(cached) " >&6
15074 else
15075   ac_check_lib_save_LIBS=$LIBS
15076 LIBS="-lc  $LIBS"
15077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15078 /* end confdefs.h.  */
15079
15080 /* Override any GCC internal prototype to avoid an error.
15081    Use char because int might match the return type of a GCC
15082    builtin and then its argument prototype would still apply.  */
15083 #ifdef __cplusplus
15084 extern "C"
15085 #endif
15086 char forkpty ();
15087 int
15088 main ()
15089 {
15090 return forkpty ();
15091   ;
15092   return 0;
15093 }
15094 _ACEOF
15095 if ac_fn_c_try_link "$LINENO"; then :
15096   ac_cv_lib_c_forkpty=yes
15097 else
15098   ac_cv_lib_c_forkpty=no
15099 fi
15100 rm -f core conftest.err conftest.$ac_objext \
15101     conftest$ac_exeext conftest.$ac_ext
15102 LIBS=$ac_check_lib_save_LIBS
15103 fi
15104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_forkpty" >&5
15105 $as_echo "$ac_cv_lib_c_forkpty" >&6; }
15106 if test "x$ac_cv_lib_c_forkpty" = xyes; then :
15107   PTY_LIBS=""
15108                   $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
15109
15110 fi
15111
15112   CPPFLAGS="$ac_save_CPPFLAGS"
15113   LDFLAGS="$ac_save_LDFLAGS"
15114 #  LIBS="$ac_save_LIBS"
15115
15116 fi
15117
15118 ###############################################################################
15119 #
15120 #       Check for the XSHM server extension.
15121 #
15122 ###############################################################################
15123
15124 have_xshm=no
15125 with_xshm_req=unspecified
15126
15127 # Check whether --with-xshm-ext was given.
15128 if test "${with_xshm_ext+set}" = set; then :
15129   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
15130 else
15131   with_xshm=yes
15132 fi
15133
15134
15135
15136    case "$with_xshm" in
15137     yes) ;;
15138     no)  ;;
15139
15140     /*)
15141      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM headers" >&5
15142 $as_echo_n "checking for XSHM headers... " >&6; }
15143      d=$with_xshm/include
15144      if test -d $d; then
15145        X_CFLAGS="-I$d $X_CFLAGS"
15146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15147 $as_echo "$d" >&6; }
15148      else
15149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15150 $as_echo "not found ($d: no such directory)" >&6; }
15151      fi
15152
15153      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM libs" >&5
15154 $as_echo_n "checking for XSHM libs... " >&6; }
15155      d=$with_xshm/lib
15156      if test -d $d; then
15157        X_LIBS="-L$d $X_LIBS"
15158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15159 $as_echo "$d" >&6; }
15160      else
15161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15162 $as_echo "not found ($d: no such directory)" >&6; }
15163      fi
15164
15165      # replace the directory string with "yes".
15166      with_xshm_req="yes"
15167      with_xshm=$with_xshm_req
15168      ;;
15169
15170     *)
15171      echo ""
15172      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
15173      echo "       If it is a directory, then \`DIR/include' will be added to"
15174      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15175      exit 1
15176      ;;
15177    esac
15178
15179
15180 if test "$with_xshm" = yes; then
15181
15182   # first check for Xshm.h.
15183
15184   ac_save_CPPFLAGS="$CPPFLAGS"
15185   if test \! -z "$includedir" ; then
15186     CPPFLAGS="$CPPFLAGS -I$includedir"
15187   fi
15188   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15189   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15190   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XShm.h" "ac_cv_header_X11_extensions_XShm_h" "#include <X11/Xlib.h>
15191 "
15192 if test "x$ac_cv_header_X11_extensions_XShm_h" = xyes; then :
15193   have_xshm=yes
15194 fi
15195
15196
15197   CPPFLAGS="$ac_save_CPPFLAGS"
15198
15199   # if that succeeded, then check for sys/ipc.h.
15200   if test "$have_xshm" = yes; then
15201     have_xshm=no
15202
15203   ac_save_CPPFLAGS="$CPPFLAGS"
15204   if test \! -z "$includedir" ; then
15205     CPPFLAGS="$CPPFLAGS -I$includedir"
15206   fi
15207   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15208   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15209   ac_fn_c_check_header_mongrel "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
15210 if test "x$ac_cv_header_sys_ipc_h" = xyes; then :
15211   have_xshm=yes
15212 fi
15213
15214
15215   CPPFLAGS="$ac_save_CPPFLAGS"
15216   fi
15217
15218   # if that succeeded, then check for sys/shm.h.
15219   if test "$have_xshm" = yes; then
15220     have_xshm=no
15221
15222   ac_save_CPPFLAGS="$CPPFLAGS"
15223   if test \! -z "$includedir" ; then
15224     CPPFLAGS="$CPPFLAGS -I$includedir"
15225   fi
15226   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15227   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15228   ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
15229 if test "x$ac_cv_header_sys_shm_h" = xyes; then :
15230   have_xshm=yes
15231 fi
15232
15233
15234   CPPFLAGS="$ac_save_CPPFLAGS"
15235   fi
15236
15237   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
15238   # to exist, but the library code to not exist.  And even better, the library
15239   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
15240   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
15241   # that's not quite right, but close enough.)
15242   #
15243   case "$host" in
15244     *-aix*)
15245       if  `uname -v` -eq 3 ; then
15246         have_xshm=no
15247
15248   ac_save_CPPFLAGS="$CPPFLAGS"
15249   ac_save_LDFLAGS="$LDFLAGS"
15250 #  ac_save_LIBS="$LIBS"
15251
15252   if test \! -z "$includedir" ; then
15253     CPPFLAGS="$CPPFLAGS -I$includedir"
15254   fi
15255   # note: $X_CFLAGS includes $x_includes
15256   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15257
15258   if test \! -z "$libdir" ; then
15259     LDFLAGS="$LDFLAGS -L$libdir"
15260   fi
15261   # note: $X_LIBS includes $x_libraries
15262   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15263
15264   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15265   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryExtension in -lXextSam" >&5
15267 $as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
15268 if ${ac_cv_lib_XextSam_XShmQueryExtension+:} false; then :
15269   $as_echo_n "(cached) " >&6
15270 else
15271   ac_check_lib_save_LIBS=$LIBS
15272 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
15273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15274 /* end confdefs.h.  */
15275
15276 /* Override any GCC internal prototype to avoid an error.
15277    Use char because int might match the return type of a GCC
15278    builtin and then its argument prototype would still apply.  */
15279 #ifdef __cplusplus
15280 extern "C"
15281 #endif
15282 char XShmQueryExtension ();
15283 int
15284 main ()
15285 {
15286 return XShmQueryExtension ();
15287   ;
15288   return 0;
15289 }
15290 _ACEOF
15291 if ac_fn_c_try_link "$LINENO"; then :
15292   ac_cv_lib_XextSam_XShmQueryExtension=yes
15293 else
15294   ac_cv_lib_XextSam_XShmQueryExtension=no
15295 fi
15296 rm -f core conftest.err conftest.$ac_objext \
15297     conftest$ac_exeext conftest.$ac_ext
15298 LIBS=$ac_check_lib_save_LIBS
15299 fi
15300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
15301 $as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
15302 if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = xyes; then :
15303   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
15304 else
15305   true
15306 fi
15307
15308   CPPFLAGS="$ac_save_CPPFLAGS"
15309   LDFLAGS="$ac_save_LDFLAGS"
15310 #  LIBS="$ac_save_LIBS"
15311
15312       fi
15313     ;;
15314   esac
15315
15316   # if that succeeded, then we've really got it.
15317   if test "$have_xshm" = yes; then
15318     $as_echo "#define HAVE_XSHM_EXTENSION 1" >>confdefs.h
15319
15320   fi
15321
15322 elif test "$with_xshm" != no; then
15323   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
15324   exit 1
15325 fi
15326
15327
15328 ###############################################################################
15329 #
15330 #       Check for the DOUBLE-BUFFER server extension.
15331 #
15332 ###############################################################################
15333
15334 have_xdbe=no
15335 with_xdbe_req=unspecified
15336
15337 # Check whether --with-xdbe-ext was given.
15338 if test "${with_xdbe_ext+set}" = set; then :
15339   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
15340 else
15341   with_xdbe=yes
15342 fi
15343
15344
15345
15346    case "$with_xdbe" in
15347     yes) ;;
15348     no)  ;;
15349
15350     /*)
15351      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER headers" >&5
15352 $as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
15353      d=$with_xdbe/include
15354      if test -d $d; then
15355        X_CFLAGS="-I$d $X_CFLAGS"
15356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15357 $as_echo "$d" >&6; }
15358      else
15359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15360 $as_echo "not found ($d: no such directory)" >&6; }
15361      fi
15362
15363      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER libs" >&5
15364 $as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
15365      d=$with_xdbe/lib
15366      if test -d $d; then
15367        X_LIBS="-L$d $X_LIBS"
15368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15369 $as_echo "$d" >&6; }
15370      else
15371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15372 $as_echo "not found ($d: no such directory)" >&6; }
15373      fi
15374
15375      # replace the directory string with "yes".
15376      with_xdbe_req="yes"
15377      with_xdbe=$with_xdbe_req
15378      ;;
15379
15380     *)
15381      echo ""
15382      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
15383      echo "       If it is a directory, then \`DIR/include' will be added to"
15384      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15385      exit 1
15386      ;;
15387    esac
15388
15389
15390 if test "$with_xdbe" = yes; then
15391
15392
15393   ac_save_CPPFLAGS="$CPPFLAGS"
15394   if test \! -z "$includedir" ; then
15395     CPPFLAGS="$CPPFLAGS -I$includedir"
15396   fi
15397   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15398   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15399   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xdbe.h" "ac_cv_header_X11_extensions_Xdbe_h" "#include <X11/Xlib.h>
15400 "
15401 if test "x$ac_cv_header_X11_extensions_Xdbe_h" = xyes; then :
15402   have_xdbe=yes
15403 fi
15404
15405
15406   CPPFLAGS="$ac_save_CPPFLAGS"
15407   if test "$have_xdbe" = yes; then
15408     $as_echo "#define HAVE_DOUBLE_BUFFER_EXTENSION 1" >>confdefs.h
15409
15410   fi
15411
15412 elif test "$with_xdbe" != no; then
15413   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
15414   exit 1
15415 fi
15416
15417
15418 ###############################################################################
15419 #
15420 #       Check for the SGI XReadDisplay server extension.
15421 #
15422 #       Note: this has to be down here, rather than up with the other server
15423 #       extension tests, so that the output of `configure --help' is in the
15424 #       right order.  Arrgh!
15425 #
15426 ###############################################################################
15427
15428 have_readdisplay=no
15429 with_readdisplay_req=unspecified
15430
15431 # Check whether --with-readdisplay was given.
15432 if test "${with_readdisplay+set}" = set; then :
15433   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
15434 else
15435   with_readdisplay=yes
15436 fi
15437
15438
15439
15440    case "$with_readdisplay" in
15441     yes) ;;
15442     no)  ;;
15443
15444     /*)
15445      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay headers" >&5
15446 $as_echo_n "checking for XReadDisplay headers... " >&6; }
15447      d=$with_readdisplay/include
15448      if test -d $d; then
15449        X_CFLAGS="-I$d $X_CFLAGS"
15450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15451 $as_echo "$d" >&6; }
15452      else
15453        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15454 $as_echo "not found ($d: no such directory)" >&6; }
15455      fi
15456
15457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay libs" >&5
15458 $as_echo_n "checking for XReadDisplay libs... " >&6; }
15459      d=$with_readdisplay/lib
15460      if test -d $d; then
15461        X_LIBS="-L$d $X_LIBS"
15462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15463 $as_echo "$d" >&6; }
15464      else
15465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15466 $as_echo "not found ($d: no such directory)" >&6; }
15467      fi
15468
15469      # replace the directory string with "yes".
15470      with_readdisplay_req="yes"
15471      with_readdisplay=$with_readdisplay_req
15472      ;;
15473
15474     *)
15475      echo ""
15476      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
15477      echo "       If it is a directory, then \`DIR/include' will be added to"
15478      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15479      exit 1
15480      ;;
15481    esac
15482
15483
15484 if test "$with_readdisplay" = yes; then
15485
15486   ac_save_CPPFLAGS="$CPPFLAGS"
15487   if test \! -z "$includedir" ; then
15488     CPPFLAGS="$CPPFLAGS -I$includedir"
15489   fi
15490   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15491   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15492   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/readdisplay.h" "ac_cv_header_X11_extensions_readdisplay_h" "#include <X11/Xlib.h>
15493 "
15494 if test "x$ac_cv_header_X11_extensions_readdisplay_h" = xyes; then :
15495   $as_echo "#define HAVE_READ_DISPLAY_EXTENSION 1" >>confdefs.h
15496
15497 fi
15498
15499
15500   CPPFLAGS="$ac_save_CPPFLAGS"
15501 elif test "$with_readdisplay" != no; then
15502   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
15503   exit 1
15504 fi
15505
15506
15507 ###############################################################################
15508 #
15509 #       Check for a directory full of images to use as the default value
15510 #       of the "imageDirectory" preference.
15511 #
15512 ###############################################################################
15513
15514 have_imagedir=no
15515 with_imagedir_req=unspecified
15516
15517
15518 # Check whether --with-image-directory was given.
15519 if test "${with_image_directory+set}" = set; then :
15520   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
15521 else
15522   with_imagedir=yes
15523 fi
15524
15525 # no HANDLE_X_PATH_ARG for this one
15526
15527 case "$with_imagedir" in
15528   /*)
15529     # absolute path
15530     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $with_imagedir" >&5
15531 $as_echo_n "checking for image directory $with_imagedir... " >&6; }
15532     if test -d "$with_imagedir" ; then
15533       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15534 $as_echo "yes" >&6; }
15535     else
15536       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15537 $as_echo "no" >&6; }
15538       with_imagedir=""
15539     fi
15540   ;;
15541   yes)
15542     with_imagedir=""
15543
15544     #### Could use some more defaults here...
15545     for dd in \
15546       "/usr/share/backgrounds/images/"          \
15547       "/usr/share/wallpapers/"                  \
15548       "/Library/Desktop Pictures/"              \
15549     ; do
15550       if test -z "$with_imagedir"; then
15551         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $dd" >&5
15552 $as_echo_n "checking for image directory $dd... " >&6; }
15553         if test -d "$dd" ; then
15554           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15555 $as_echo "yes" >&6; }
15556           with_imagedir="$dd"
15557         else
15558           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15559 $as_echo "no" >&6; }
15560         fi
15561       fi
15562     done
15563
15564   ;;
15565   no)
15566     with_imagedir=""
15567   ;;
15568
15569   *)
15570     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
15571     exit 1
15572   ;;
15573 esac
15574 ac_cv_imagedir="$with_imagedir"
15575
15576 DEFAULT_IMAGES_P='True'
15577 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
15578
15579 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
15580   DEFAULT_IMAGES_P='False'
15581 fi
15582
15583
15584 ###############################################################################
15585 #
15586 #       Pick a text file to use as the default of the "textFile" preference.
15587 #       Any old file will do, but preferably one that will make interesting
15588 #       shapes when displayed by "starwars" and "fontglide".
15589 #
15590 ###############################################################################
15591
15592 have_textfile=no
15593 with_textfile_req=unspecified
15594
15595
15596 # Check whether --with-text-file was given.
15597 if test "${with_text_file+set}" = set; then :
15598   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
15599 else
15600   with_textfile=yes
15601 fi
15602
15603 # no HANDLE_X_PATH_ARG for this one
15604
15605 case "$with_textfile" in
15606   /*)
15607     # absolute path
15608     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $with_textfile" >&5
15609 $as_echo_n "checking for text file $with_textfile... " >&6; }
15610     if test -f "$with_textfile" ; then
15611       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15612 $as_echo "yes" >&6; }
15613     else
15614       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15615 $as_echo "no" >&6; }
15616       with_textfile=""
15617     fi
15618   ;;
15619   yes)
15620     with_textfile=""
15621
15622     #### Could use some more defaults here...
15623     for f in \
15624       "/usr/X11R6/lib/X11/doc/README"              \
15625       "/usr/share/doc/xserver-common/copyright"    \
15626       "/usr/share/doc/xserver-xorg-core/copyright" \
15627       "/usr/X11R6/README"                          \
15628       "/usr/share/doc/libX11*/COPYING"             \
15629       "/usr/X11/share/X11/doc/README*"             \
15630       "/usr/share/doc/debian/debian-manifesto"     \
15631     ; do
15632       if test -z "$with_textfile"; then
15633         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $f" >&5
15634 $as_echo_n "checking for text file $f... " >&6; }
15635         f=`/bin/ls $f 2>&- | head -1`
15636         if test -f "$f" ; then
15637           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15638 $as_echo "yes" >&6; }
15639           with_textfile="$f"
15640         else
15641           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15642 $as_echo "no" >&6; }
15643         fi
15644       fi
15645     done
15646
15647   ;;
15648   no)
15649     with_textfile=""
15650   ;;
15651
15652   *)
15653     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
15654     exit 1
15655   ;;
15656 esac
15657 ac_cv_textfile="$with_textfile"
15658
15659 DEFAULT_TEXT_FILE="$ac_cv_textfile"
15660
15661
15662 ###############################################################################
15663 #
15664 #       Check the browser to see help URL
15665 #
15666 ###############################################################################
15667
15668 have_browser=no
15669 with_browser_req=unspecified
15670
15671
15672 # Check whether --with-browser was given.
15673 if test "${with_browser+set}" = set; then :
15674   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
15675 else
15676   with_browser=no
15677 fi
15678
15679 # no HANDLE_X_PATH_ARG for this one
15680
15681 case "$with_browser" in
15682   no )
15683   ;;
15684   * )
15685     WITH_BROWSER=$with_browser
15686     gnome_open_program=$with_browser
15687     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for browser $with_browser" >&5
15688 $as_echo_n "checking for browser $with_browser... " >&6; }
15689     with_browser_fullpath=`which $with_browser 2>/dev/null`
15690     case $with_browser_fullpath in
15691          /* )
15692                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15693 $as_echo "yes" >&6; }
15694                  have_browser=yes
15695                  ;;
15696         * )
15697                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15698 $as_echo "no" >&6; }
15699 # Only warning: we don't want to install all packages for the
15700 # dependency of the browser in building stage...
15701                echo "WARNING: browser not found: --with-browser=$with_browser"
15702                ;;
15703     esac
15704   ;;
15705 esac
15706 ac_cv_browser="$with_browser"
15707
15708 ###############################################################################
15709 #
15710 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
15711 #       This should be safe, but let's give people the option.
15712 #
15713 ###############################################################################
15714
15715 setuid_hacks_default=no
15716 setuid_hacks="$setuid_hacks_default"
15717
15718 # Check whether --with-setuid-hacks was given.
15719 if test "${with_setuid_hacks+set}" = set; then :
15720   withval=$with_setuid_hacks; setuid_hacks="$withval"
15721 else
15722   setuid_hacks="$setuid_hacks_default"
15723 fi
15724
15725
15726
15727    case "$setuid_hacks" in
15728     yes) ;;
15729     no)  ;;
15730
15731     /*)
15732      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks headers" >&5
15733 $as_echo_n "checking for setuid hacks headers... " >&6; }
15734      d=$setuid_hacks/include
15735      if test -d $d; then
15736        X_CFLAGS="-I$d $X_CFLAGS"
15737        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15738 $as_echo "$d" >&6; }
15739      else
15740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15741 $as_echo "not found ($d: no such directory)" >&6; }
15742      fi
15743
15744      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks libs" >&5
15745 $as_echo_n "checking for setuid hacks libs... " >&6; }
15746      d=$setuid_hacks/lib
15747      if test -d $d; then
15748        X_LIBS="-L$d $X_LIBS"
15749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15750 $as_echo "$d" >&6; }
15751      else
15752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15753 $as_echo "not found ($d: no such directory)" >&6; }
15754      fi
15755
15756      # replace the directory string with "yes".
15757      setuid_hacks_req="yes"
15758      setuid_hacks=$setuid_hacks_req
15759      ;;
15760
15761     *)
15762      echo ""
15763      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
15764      echo "       If it is a directory, then \`DIR/include' will be added to"
15765      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15766      exit 1
15767      ;;
15768    esac
15769
15770
15771 if test "$setuid_hacks" = yes; then
15772   true
15773 elif test "$setuid_hacks" != no; then
15774   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
15775   exit 1
15776 fi
15777
15778
15779 ###############################################################################
15780 #
15781 #       Check for --with-record-animation
15782 #
15783 ###############################################################################
15784
15785 record_anim_default=no
15786 record_anim="$record_anim_default"
15787
15788 # Check whether --with-record-animation was given.
15789 if test "${with_record_animation+set}" = set; then :
15790   withval=$with_record_animation; record_anim="$withval"
15791 else
15792   record_anim="$record_anim_default"
15793 fi
15794
15795
15796
15797    case "$record_anim" in
15798     yes) ;;
15799     no)  ;;
15800
15801     /*)
15802      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for record animation headers" >&5
15803 $as_echo_n "checking for record animation headers... " >&6; }
15804      d=$record_anim/include
15805      if test -d $d; then
15806        X_CFLAGS="-I$d $X_CFLAGS"
15807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15808 $as_echo "$d" >&6; }
15809      else
15810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15811 $as_echo "not found ($d: no such directory)" >&6; }
15812      fi
15813
15814      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for record animation libs" >&5
15815 $as_echo_n "checking for record animation libs... " >&6; }
15816      d=$record_anim/lib
15817      if test -d $d; then
15818        X_LIBS="-L$d $X_LIBS"
15819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15820 $as_echo "$d" >&6; }
15821      else
15822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15823 $as_echo "not found ($d: no such directory)" >&6; }
15824      fi
15825
15826      # replace the directory string with "yes".
15827      record_anim_req="yes"
15828      record_anim=$record_anim_req
15829      ;;
15830
15831     *)
15832      echo ""
15833      echo "error: argument to --with-record-animation must be \"yes\", \"no\", or a directory."
15834      echo "       If it is a directory, then \`DIR/include' will be added to"
15835      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15836      exit 1
15837      ;;
15838    esac
15839
15840
15841 if test "$record_anim" = yes; then
15842   true
15843 elif test "$record_anim" != no; then
15844   echo "error: must be yes or no: --with-record-animation=$record_anim"
15845   exit 1
15846 fi
15847
15848 if test "$record_anim" = yes; then
15849   if test "$have_gdk_pixbuf" != yes; then
15850     as_fn_error $? "--with-record-animation requires GDK-Pixbuf" "$LINENO" 5
15851   else
15852     { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling --with-record-animation" >&5
15853 $as_echo "enabling --with-record-animation" >&6; }
15854     $as_echo "#define HAVE_RECORD_ANIM 1" >>confdefs.h
15855
15856     ANIM_OBJS='$(ANIM_OBJS)'
15857     ANIM_LIBS='$(ANIM_LIBS)'
15858   fi
15859 fi
15860
15861 ###############################################################################
15862 #
15863 #       Done testing.  Now, set up the various -I and -L variables,
15864 #       and decide which GUI program to build by default.
15865 #
15866 ###############################################################################
15867
15868 DEPEND=makedepend
15869 DEPEND_FLAGS=
15870 DEPEND_DEFINES=
15871
15872
15873 if test \! -z "$includedir" ; then
15874   INCLUDES="$INCLUDES -I$includedir"
15875 fi
15876
15877 if test \! -z "$libdir" ; then
15878   LDFLAGS="$LDFLAGS -L$libdir"
15879 fi
15880
15881
15882 PREFERRED_DEMO_PROGRAM=''
15883 ALL_DEMO_PROGRAMS=
15884 if test "$have_motif" = yes; then
15885   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
15886   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
15887 fi
15888 if test "$have_gtk" = yes; then
15889   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
15890   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
15891 fi
15892
15893
15894 if test "$have_kerberos" = yes; then
15895   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
15896   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
15897 fi
15898 if test "$have_pam" = yes; then
15899   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
15900   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
15901   INSTALL_PAM="install-pam"
15902 fi
15903 if test "$enable_pam_check_account_type" = yes; then
15904   COMMENT_PAM_CHECK_ACCOUNT=""
15905 else
15906   COMMENT_PAM_CHECK_ACCOUNT="#"
15907 fi
15908 if test "$have_passwd_helper" = yes; then
15909   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
15910   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
15911 fi
15912   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
15913   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
15914
15915
15916 if test "$enable_locking" = yes; then
15917   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
15918   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
15919 else
15920   LOCK_SRCS='$(NOLOCK_SRCS_1)'
15921   LOCK_OBJS='$(NOLOCK_OBJS_1)'
15922 fi
15923
15924 if test "$ac_macosx" = yes; then
15925   EXES_OSX='$(EXES_OSX)'
15926   SCRIPTS_OSX='$(SCRIPTS_OSX)'
15927   MEN_OSX='$(MEN_OSX)'
15928 else
15929   EXES_OSX=
15930   SCRIPTS_OSX=
15931   MEN_OSX=
15932 fi
15933
15934
15935 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
15936
15937 if test "$need_setuid" = yes; then
15938   NEED_SETUID=yes
15939 else
15940   NEED_SETUID=no
15941 fi
15942
15943 if test "$setuid_hacks" = yes; then
15944   SETUID_HACKS=yes
15945 else
15946   SETUID_HACKS=no
15947 fi
15948
15949 tab='   '
15950 if test "$have_gl" = yes; then
15951   GL_EXES='$(GL_EXES)'
15952   SUID_EXES='$(SUID_EXES)'
15953   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
15954   GL_UTIL_EXES='$(GL_UTIL_EXES)'
15955   GL_MEN='$(GL_MEN)'
15956   GL_KLUDGE=" "
15957 else
15958   GL_KLUDGE="-"
15959 fi
15960
15961 if test "$have_gle" = yes; then
15962   GLE_EXES='$(GLE_EXES)'
15963   GLE_KLUDGE=" "
15964 else
15965   GLE_KLUDGE="-"
15966 fi
15967
15968 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
15969  JPEG_EXES='$(JPEG_EXES)'
15970 fi
15971
15972
15973 # Another substitution in the XScreenSaver.ad.in file:
15974 #
15975 if test "$gnome_open_program" != ''; then
15976   GNOME24=''
15977   GNOME22='!    '
15978   NOGNOME='!    '
15979 elif test "$gnome_url_show_program" != ''; then
15980   GNOME24='!    '
15981   GNOME22=''
15982   NOGNOME='!    '
15983 else
15984   GNOME24='!    '
15985   GNOME22='!    '
15986   NOGNOME=''
15987 fi
15988
15989
15990 # Set PO_DATADIR to something sensible.
15991 #
15992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale directory" >&5
15993 $as_echo_n "checking for locale directory... " >&6; }
15994 if test -n "$GTK_DATADIR" ; then
15995   PO_DATADIR="$GTK_DATADIR"
15996 elif test "$have_gtk" = yes; then
15997   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15998   PO_DATADIR="$PO_DATADIR/share"
15999 fi
16000
16001 if test -z "$PO_DATADIR" ; then
16002   #
16003   # #### Total fucking kludge --
16004   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
16005   # but of course we need to expand all the nested variables to do that...
16006   #
16007   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
16008   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
16009 fi
16010
16011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PO_DATADIR/locale" >&5
16012 $as_echo "$PO_DATADIR/locale" >&6; }
16013
16014
16015 # canonicalize slashes.
16016 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
16017
16018 # gcc 3.0 likes to issue this warning for every file:
16019 #
16020 # cc1: warning: changing search order for system directory "/usr/local/include"
16021 # cc1: warning:   as it has already been specified as a non-system directory
16022 #
16023 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
16024 # Which *should* be totally redundant, and thus an ok thing to delete?
16025 #
16026 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
16027
16028
16029 ###############################################################################
16030 #
16031 #       Perform substitutions and write Makefiles.
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
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109 APPDEFAULTS=$ac_x_app_defaults
16110
16111
16112
16113
16114
16115
16116
16117 ac_config_files="$ac_config_files Makefile utils/Makefile jwxyz/Makefile hacks/Makefile hacks/images/Makefile hacks/glx/Makefile po/Makefile.in driver/Makefile driver/xscreensaver.pam driver/xscreensaver-demo.glade2 driver/XScreenSaver.ad"
16118
16119 cat >confcache <<\_ACEOF
16120 # This file is a shell script that caches the results of configure
16121 # tests run on this system so they can be shared between configure
16122 # scripts and configure runs, see configure's option --config-cache.
16123 # It is not useful on other systems.  If it contains results you don't
16124 # want to keep, you may remove or edit it.
16125 #
16126 # config.status only pays attention to the cache file if you give it
16127 # the --recheck option to rerun configure.
16128 #
16129 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16130 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16131 # following values.
16132
16133 _ACEOF
16134
16135 # The following way of writing the cache mishandles newlines in values,
16136 # but we know of no workaround that is simple, portable, and efficient.
16137 # So, we kill variables containing newlines.
16138 # Ultrix sh set writes to stderr and can't be redirected directly,
16139 # and sets the high bit in the cache file unless we assign to the vars.
16140 (
16141   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16142     eval ac_val=\$$ac_var
16143     case $ac_val in #(
16144     *${as_nl}*)
16145       case $ac_var in #(
16146       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16147 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16148       esac
16149       case $ac_var in #(
16150       _ | IFS | as_nl) ;; #(
16151       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16152       *) { eval $ac_var=; unset $ac_var;} ;;
16153       esac ;;
16154     esac
16155   done
16156
16157   (set) 2>&1 |
16158     case $as_nl`(ac_space=' '; set) 2>&1` in #(
16159     *${as_nl}ac_space=\ *)
16160       # `set' does not quote correctly, so add quotes: double-quote
16161       # substitution turns \\\\ into \\, and sed turns \\ into \.
16162       sed -n \
16163         "s/'/'\\\\''/g;
16164           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16165       ;; #(
16166     *)
16167       # `set' quotes correctly as required by POSIX, so do not add quotes.
16168       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16169       ;;
16170     esac |
16171     sort
16172 ) |
16173   sed '
16174      /^ac_cv_env_/b end
16175      t clear
16176      :clear
16177      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16178      t end
16179      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16180      :end' >>confcache
16181 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16182   if test -w "$cache_file"; then
16183     if test "x$cache_file" != "x/dev/null"; then
16184       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16185 $as_echo "$as_me: updating cache $cache_file" >&6;}
16186       if test ! -f "$cache_file" || test -h "$cache_file"; then
16187         cat confcache >"$cache_file"
16188       else
16189         case $cache_file in #(
16190         */* | ?:*)
16191           mv -f confcache "$cache_file"$$ &&
16192           mv -f "$cache_file"$$ "$cache_file" ;; #(
16193         *)
16194           mv -f confcache "$cache_file" ;;
16195         esac
16196       fi
16197     fi
16198   else
16199     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16200 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16201   fi
16202 fi
16203 rm -f confcache
16204
16205 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16206 # Let make expand exec_prefix.
16207 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16208
16209 DEFS=-DHAVE_CONFIG_H
16210
16211 ac_libobjs=
16212 ac_ltlibobjs=
16213 U=
16214 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16215   # 1. Remove the extension, and $U if already installed.
16216   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16217   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16218   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
16219   #    will be set to the directory where LIBOBJS objects are built.
16220   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16221   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16222 done
16223 LIBOBJS=$ac_libobjs
16224
16225 LTLIBOBJS=$ac_ltlibobjs
16226
16227
16228
16229   ac_config_commands="$ac_config_commands po/stamp-it"
16230
16231
16232
16233 : "${CONFIG_STATUS=./config.status}"
16234 ac_write_fail=0
16235 ac_clean_files_save=$ac_clean_files
16236 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16237 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16238 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16239 as_write_fail=0
16240 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16241 #! $SHELL
16242 # Generated by $as_me.
16243 # Run this file to recreate the current configuration.
16244 # Compiler output produced by configure, useful for debugging
16245 # configure, is in config.log if it exists.
16246
16247 debug=false
16248 ac_cs_recheck=false
16249 ac_cs_silent=false
16250
16251 SHELL=\${CONFIG_SHELL-$SHELL}
16252 export SHELL
16253 _ASEOF
16254 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16255 ## -------------------- ##
16256 ## M4sh Initialization. ##
16257 ## -------------------- ##
16258
16259 # Be more Bourne compatible
16260 DUALCASE=1; export DUALCASE # for MKS sh
16261 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16262   emulate sh
16263   NULLCMD=:
16264   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16265   # is contrary to our usage.  Disable this feature.
16266   alias -g '${1+"$@"}'='"$@"'
16267   setopt NO_GLOB_SUBST
16268 else
16269   case `(set -o) 2>/dev/null` in #(
16270   *posix*) :
16271     set -o posix ;; #(
16272   *) :
16273      ;;
16274 esac
16275 fi
16276
16277
16278 as_nl='
16279 '
16280 export as_nl
16281 # Printing a long string crashes Solaris 7 /usr/bin/printf.
16282 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16283 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16284 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16285 # Prefer a ksh shell builtin over an external printf program on Solaris,
16286 # but without wasting forks for bash or zsh.
16287 if test -z "$BASH_VERSION$ZSH_VERSION" \
16288     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16289   as_echo='print -r --'
16290   as_echo_n='print -rn --'
16291 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16292   as_echo='printf %s\n'
16293   as_echo_n='printf %s'
16294 else
16295   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16296     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16297     as_echo_n='/usr/ucb/echo -n'
16298   else
16299     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16300     as_echo_n_body='eval
16301       arg=$1;
16302       case $arg in #(
16303       *"$as_nl"*)
16304         expr "X$arg" : "X\\(.*\\)$as_nl";
16305         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16306       esac;
16307       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16308     '
16309     export as_echo_n_body
16310     as_echo_n='sh -c $as_echo_n_body as_echo'
16311   fi
16312   export as_echo_body
16313   as_echo='sh -c $as_echo_body as_echo'
16314 fi
16315
16316 # The user is always right.
16317 if test "${PATH_SEPARATOR+set}" != set; then
16318   PATH_SEPARATOR=:
16319   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16320     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16321       PATH_SEPARATOR=';'
16322   }
16323 fi
16324
16325
16326 # IFS
16327 # We need space, tab and new line, in precisely that order.  Quoting is
16328 # there to prevent editors from complaining about space-tab.
16329 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
16330 # splitting by setting IFS to empty value.)
16331 IFS=" ""        $as_nl"
16332
16333 # Find who we are.  Look in the path if we contain no directory separator.
16334 as_myself=
16335 case $0 in #((
16336   *[\\/]* ) as_myself=$0 ;;
16337   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16338 for as_dir in $PATH
16339 do
16340   IFS=$as_save_IFS
16341   test -z "$as_dir" && as_dir=.
16342     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16343   done
16344 IFS=$as_save_IFS
16345
16346      ;;
16347 esac
16348 # We did not find ourselves, most probably we were run as `sh COMMAND'
16349 # in which case we are not to be found in the path.
16350 if test "x$as_myself" = x; then
16351   as_myself=$0
16352 fi
16353 if test ! -f "$as_myself"; then
16354   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16355   exit 1
16356 fi
16357
16358 # Unset variables that we do not need and which cause bugs (e.g. in
16359 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
16360 # suppresses any "Segmentation fault" message there.  '((' could
16361 # trigger a bug in pdksh 5.2.14.
16362 for as_var in BASH_ENV ENV MAIL MAILPATH
16363 do eval test x\${$as_var+set} = xset \
16364   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16365 done
16366 PS1='$ '
16367 PS2='> '
16368 PS4='+ '
16369
16370 # NLS nuisances.
16371 LC_ALL=C
16372 export LC_ALL
16373 LANGUAGE=C
16374 export LANGUAGE
16375
16376 # CDPATH.
16377 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16378
16379
16380 # as_fn_error STATUS ERROR [LINENO LOG_FD]
16381 # ----------------------------------------
16382 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16383 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16384 # script with STATUS, using 1 if that was 0.
16385 as_fn_error ()
16386 {
16387   as_status=$1; test $as_status -eq 0 && as_status=1
16388   if test "$4"; then
16389     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16390     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16391   fi
16392   $as_echo "$as_me: error: $2" >&2
16393   as_fn_exit $as_status
16394 } # as_fn_error
16395
16396
16397 # as_fn_set_status STATUS
16398 # -----------------------
16399 # Set $? to STATUS, without forking.
16400 as_fn_set_status ()
16401 {
16402   return $1
16403 } # as_fn_set_status
16404
16405 # as_fn_exit STATUS
16406 # -----------------
16407 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16408 as_fn_exit ()
16409 {
16410   set +e
16411   as_fn_set_status $1
16412   exit $1
16413 } # as_fn_exit
16414
16415 # as_fn_unset VAR
16416 # ---------------
16417 # Portably unset VAR.
16418 as_fn_unset ()
16419 {
16420   { eval $1=; unset $1;}
16421 }
16422 as_unset=as_fn_unset
16423 # as_fn_append VAR VALUE
16424 # ----------------------
16425 # Append the text in VALUE to the end of the definition contained in VAR. Take
16426 # advantage of any shell optimizations that allow amortized linear growth over
16427 # repeated appends, instead of the typical quadratic growth present in naive
16428 # implementations.
16429 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16430   eval 'as_fn_append ()
16431   {
16432     eval $1+=\$2
16433   }'
16434 else
16435   as_fn_append ()
16436   {
16437     eval $1=\$$1\$2
16438   }
16439 fi # as_fn_append
16440
16441 # as_fn_arith ARG...
16442 # ------------------
16443 # Perform arithmetic evaluation on the ARGs, and store the result in the
16444 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16445 # must be portable across $(()) and expr.
16446 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16447   eval 'as_fn_arith ()
16448   {
16449     as_val=$(( $* ))
16450   }'
16451 else
16452   as_fn_arith ()
16453   {
16454     as_val=`expr "$@" || test $? -eq 1`
16455   }
16456 fi # as_fn_arith
16457
16458
16459 if expr a : '\(a\)' >/dev/null 2>&1 &&
16460    test "X`expr 00001 : '.*\(...\)'`" = X001; then
16461   as_expr=expr
16462 else
16463   as_expr=false
16464 fi
16465
16466 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16467   as_basename=basename
16468 else
16469   as_basename=false
16470 fi
16471
16472 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16473   as_dirname=dirname
16474 else
16475   as_dirname=false
16476 fi
16477
16478 as_me=`$as_basename -- "$0" ||
16479 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16480          X"$0" : 'X\(//\)$' \| \
16481          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16482 $as_echo X/"$0" |
16483     sed '/^.*\/\([^/][^/]*\)\/*$/{
16484             s//\1/
16485             q
16486           }
16487           /^X\/\(\/\/\)$/{
16488             s//\1/
16489             q
16490           }
16491           /^X\/\(\/\).*/{
16492             s//\1/
16493             q
16494           }
16495           s/.*/./; q'`
16496
16497 # Avoid depending upon Character Ranges.
16498 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16499 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16500 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16501 as_cr_digits='0123456789'
16502 as_cr_alnum=$as_cr_Letters$as_cr_digits
16503
16504 ECHO_C= ECHO_N= ECHO_T=
16505 case `echo -n x` in #(((((
16506 -n*)
16507   case `echo 'xy\c'` in
16508   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
16509   xy)  ECHO_C='\c';;
16510   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
16511        ECHO_T=' ';;
16512   esac;;
16513 *)
16514   ECHO_N='-n';;
16515 esac
16516
16517 rm -f conf$$ conf$$.exe conf$$.file
16518 if test -d conf$$.dir; then
16519   rm -f conf$$.dir/conf$$.file
16520 else
16521   rm -f conf$$.dir
16522   mkdir conf$$.dir 2>/dev/null
16523 fi
16524 if (echo >conf$$.file) 2>/dev/null; then
16525   if ln -s conf$$.file conf$$ 2>/dev/null; then
16526     as_ln_s='ln -s'
16527     # ... but there are two gotchas:
16528     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16529     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16530     # In both cases, we have to default to `cp -pR'.
16531     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16532       as_ln_s='cp -pR'
16533   elif ln conf$$.file conf$$ 2>/dev/null; then
16534     as_ln_s=ln
16535   else
16536     as_ln_s='cp -pR'
16537   fi
16538 else
16539   as_ln_s='cp -pR'
16540 fi
16541 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16542 rmdir conf$$.dir 2>/dev/null
16543
16544
16545 # as_fn_mkdir_p
16546 # -------------
16547 # Create "$as_dir" as a directory, including parents if necessary.
16548 as_fn_mkdir_p ()
16549 {
16550
16551   case $as_dir in #(
16552   -*) as_dir=./$as_dir;;
16553   esac
16554   test -d "$as_dir" || eval $as_mkdir_p || {
16555     as_dirs=
16556     while :; do
16557       case $as_dir in #(
16558       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16559       *) as_qdir=$as_dir;;
16560       esac
16561       as_dirs="'$as_qdir' $as_dirs"
16562       as_dir=`$as_dirname -- "$as_dir" ||
16563 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16564          X"$as_dir" : 'X\(//\)[^/]' \| \
16565          X"$as_dir" : 'X\(//\)$' \| \
16566          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16567 $as_echo X"$as_dir" |
16568     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16569             s//\1/
16570             q
16571           }
16572           /^X\(\/\/\)[^/].*/{
16573             s//\1/
16574             q
16575           }
16576           /^X\(\/\/\)$/{
16577             s//\1/
16578             q
16579           }
16580           /^X\(\/\).*/{
16581             s//\1/
16582             q
16583           }
16584           s/.*/./; q'`
16585       test -d "$as_dir" && break
16586     done
16587     test -z "$as_dirs" || eval "mkdir $as_dirs"
16588   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16589
16590
16591 } # as_fn_mkdir_p
16592 if mkdir -p . 2>/dev/null; then
16593   as_mkdir_p='mkdir -p "$as_dir"'
16594 else
16595   test -d ./-p && rmdir ./-p
16596   as_mkdir_p=false
16597 fi
16598
16599
16600 # as_fn_executable_p FILE
16601 # -----------------------
16602 # Test if FILE is an executable regular file.
16603 as_fn_executable_p ()
16604 {
16605   test -f "$1" && test -x "$1"
16606 } # as_fn_executable_p
16607 as_test_x='test -x'
16608 as_executable_p=as_fn_executable_p
16609
16610 # Sed expression to map a string onto a valid CPP name.
16611 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16612
16613 # Sed expression to map a string onto a valid variable name.
16614 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16615
16616
16617 exec 6>&1
16618 ## ----------------------------------- ##
16619 ## Main body of $CONFIG_STATUS script. ##
16620 ## ----------------------------------- ##
16621 _ASEOF
16622 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16623
16624 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16625 # Save the log message, to keep $0 and so on meaningful, and to
16626 # report actual input values of CONFIG_FILES etc. instead of their
16627 # values after options handling.
16628 ac_log="
16629 This file was extended by $as_me, which was
16630 generated by GNU Autoconf 2.69.  Invocation command line was
16631
16632   CONFIG_FILES    = $CONFIG_FILES
16633   CONFIG_HEADERS  = $CONFIG_HEADERS
16634   CONFIG_LINKS    = $CONFIG_LINKS
16635   CONFIG_COMMANDS = $CONFIG_COMMANDS
16636   $ $0 $@
16637
16638 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16639 "
16640
16641 _ACEOF
16642
16643 case $ac_config_files in *"
16644 "*) set x $ac_config_files; shift; ac_config_files=$*;;
16645 esac
16646
16647 case $ac_config_headers in *"
16648 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16649 esac
16650
16651
16652 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16653 # Files that config.status was made for.
16654 config_files="$ac_config_files"
16655 config_headers="$ac_config_headers"
16656 config_commands="$ac_config_commands"
16657
16658 _ACEOF
16659
16660 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16661 ac_cs_usage="\
16662 \`$as_me' instantiates files and other configuration actions
16663 from templates according to the current configuration.  Unless the files
16664 and actions are specified as TAGs, all are instantiated by default.
16665
16666 Usage: $0 [OPTION]... [TAG]...
16667
16668   -h, --help       print this help, then exit
16669   -V, --version    print version number and configuration settings, then exit
16670       --config     print configuration, then exit
16671   -q, --quiet, --silent
16672                    do not print progress messages
16673   -d, --debug      don't remove temporary files
16674       --recheck    update $as_me by reconfiguring in the same conditions
16675       --file=FILE[:TEMPLATE]
16676                    instantiate the configuration file FILE
16677       --header=FILE[:TEMPLATE]
16678                    instantiate the configuration header FILE
16679
16680 Configuration files:
16681 $config_files
16682
16683 Configuration headers:
16684 $config_headers
16685
16686 Configuration commands:
16687 $config_commands
16688
16689 Report bugs to the package provider."
16690
16691 _ACEOF
16692 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16693 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16694 ac_cs_version="\\
16695 config.status
16696 configured by $0, generated by GNU Autoconf 2.69,
16697   with options \\"\$ac_cs_config\\"
16698
16699 Copyright (C) 2012 Free Software Foundation, Inc.
16700 This config.status script is free software; the Free Software Foundation
16701 gives unlimited permission to copy, distribute and modify it."
16702
16703 ac_pwd='$ac_pwd'
16704 srcdir='$srcdir'
16705 INSTALL='$INSTALL'
16706 test -n "\$AWK" || AWK=awk
16707 _ACEOF
16708
16709 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16710 # The default lists apply if the user does not specify any file.
16711 ac_need_defaults=:
16712 while test $# != 0
16713 do
16714   case $1 in
16715   --*=?*)
16716     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16717     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16718     ac_shift=:
16719     ;;
16720   --*=)
16721     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16722     ac_optarg=
16723     ac_shift=:
16724     ;;
16725   *)
16726     ac_option=$1
16727     ac_optarg=$2
16728     ac_shift=shift
16729     ;;
16730   esac
16731
16732   case $ac_option in
16733   # Handling of the options.
16734   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16735     ac_cs_recheck=: ;;
16736   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16737     $as_echo "$ac_cs_version"; exit ;;
16738   --config | --confi | --conf | --con | --co | --c )
16739     $as_echo "$ac_cs_config"; exit ;;
16740   --debug | --debu | --deb | --de | --d | -d )
16741     debug=: ;;
16742   --file | --fil | --fi | --f )
16743     $ac_shift
16744     case $ac_optarg in
16745     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16746     '') as_fn_error $? "missing file argument" ;;
16747     esac
16748     as_fn_append CONFIG_FILES " '$ac_optarg'"
16749     ac_need_defaults=false;;
16750   --header | --heade | --head | --hea )
16751     $ac_shift
16752     case $ac_optarg in
16753     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16754     esac
16755     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16756     ac_need_defaults=false;;
16757   --he | --h)
16758     # Conflict between --help and --header
16759     as_fn_error $? "ambiguous option: \`$1'
16760 Try \`$0 --help' for more information.";;
16761   --help | --hel | -h )
16762     $as_echo "$ac_cs_usage"; exit ;;
16763   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16764   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16765     ac_cs_silent=: ;;
16766
16767   # This is an error.
16768   -*) as_fn_error $? "unrecognized option: \`$1'
16769 Try \`$0 --help' for more information." ;;
16770
16771   *) as_fn_append ac_config_targets " $1"
16772      ac_need_defaults=false ;;
16773
16774   esac
16775   shift
16776 done
16777
16778 ac_configure_extra_args=
16779
16780 if $ac_cs_silent; then
16781   exec 6>/dev/null
16782   ac_configure_extra_args="$ac_configure_extra_args --silent"
16783 fi
16784
16785 _ACEOF
16786 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16787 if \$ac_cs_recheck; then
16788   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16789   shift
16790   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16791   CONFIG_SHELL='$SHELL'
16792   export CONFIG_SHELL
16793   exec "\$@"
16794 fi
16795
16796 _ACEOF
16797 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16798 exec 5>>config.log
16799 {
16800   echo
16801   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16802 ## Running $as_me. ##
16803 _ASBOX
16804   $as_echo "$ac_log"
16805 } >&5
16806
16807 _ACEOF
16808 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16809 #
16810 # INIT-COMMANDS
16811 #
16812
16813
16814 _ACEOF
16815
16816 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16817
16818 # Handling of arguments.
16819 for ac_config_target in $ac_config_targets
16820 do
16821   case $ac_config_target in
16822     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
16823     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
16824     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16825     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
16826     "jwxyz/Makefile") CONFIG_FILES="$CONFIG_FILES jwxyz/Makefile" ;;
16827     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
16828     "hacks/images/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/images/Makefile" ;;
16829     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
16830     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
16831     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
16832     "driver/xscreensaver.pam") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.pam" ;;
16833     "driver/xscreensaver-demo.glade2") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver-demo.glade2" ;;
16834     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
16835     "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
16836
16837   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16838   esac
16839 done
16840
16841
16842 # If the user did not use the arguments to specify the items to instantiate,
16843 # then the envvar interface is used.  Set only those that are not.
16844 # We use the long form for the default assignment because of an extremely
16845 # bizarre bug on SunOS 4.1.3.
16846 if $ac_need_defaults; then
16847   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16848   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16849   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16850 fi
16851
16852 # Have a temporary directory for convenience.  Make it in the build tree
16853 # simply because there is no reason against having it here, and in addition,
16854 # creating and moving files from /tmp can sometimes cause problems.
16855 # Hook for its removal unless debugging.
16856 # Note that there is a small window in which the directory will not be cleaned:
16857 # after its creation but before its name has been assigned to `$tmp'.
16858 $debug ||
16859 {
16860   tmp= ac_tmp=
16861   trap 'exit_status=$?
16862   : "${ac_tmp:=$tmp}"
16863   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16864 ' 0
16865   trap 'as_fn_exit 1' 1 2 13 15
16866 }
16867 # Create a (secure) tmp directory for tmp files.
16868
16869 {
16870   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16871   test -d "$tmp"
16872 }  ||
16873 {
16874   tmp=./conf$$-$RANDOM
16875   (umask 077 && mkdir "$tmp")
16876 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16877 ac_tmp=$tmp
16878
16879 # Set up the scripts for CONFIG_FILES section.
16880 # No need to generate them if there are no CONFIG_FILES.
16881 # This happens for instance with `./config.status config.h'.
16882 if test -n "$CONFIG_FILES"; then
16883
16884
16885 ac_cr=`echo X | tr X '\015'`
16886 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16887 # But we know of no other shell where ac_cr would be empty at this
16888 # point, so we can use a bashism as a fallback.
16889 if test "x$ac_cr" = x; then
16890   eval ac_cr=\$\'\\r\'
16891 fi
16892 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16893 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16894   ac_cs_awk_cr='\\r'
16895 else
16896   ac_cs_awk_cr=$ac_cr
16897 fi
16898
16899 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16900 _ACEOF
16901
16902
16903 {
16904   echo "cat >conf$$subs.awk <<_ACEOF" &&
16905   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16906   echo "_ACEOF"
16907 } >conf$$subs.sh ||
16908   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16909 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16910 ac_delim='%!_!# '
16911 for ac_last_try in false false false false false :; do
16912   . ./conf$$subs.sh ||
16913     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16914
16915   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16916   if test $ac_delim_n = $ac_delim_num; then
16917     break
16918   elif $ac_last_try; then
16919     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16920   else
16921     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16922   fi
16923 done
16924 rm -f conf$$subs.sh
16925
16926 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16927 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16928 _ACEOF
16929 sed -n '
16930 h
16931 s/^/S["/; s/!.*/"]=/
16932 p
16933 g
16934 s/^[^!]*!//
16935 :repl
16936 t repl
16937 s/'"$ac_delim"'$//
16938 t delim
16939 :nl
16940 h
16941 s/\(.\{148\}\)..*/\1/
16942 t more1
16943 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16944 p
16945 n
16946 b repl
16947 :more1
16948 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16949 p
16950 g
16951 s/.\{148\}//
16952 t nl
16953 :delim
16954 h
16955 s/\(.\{148\}\)..*/\1/
16956 t more2
16957 s/["\\]/\\&/g; s/^/"/; s/$/"/
16958 p
16959 b
16960 :more2
16961 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16962 p
16963 g
16964 s/.\{148\}//
16965 t delim
16966 ' <conf$$subs.awk | sed '
16967 /^[^""]/{
16968   N
16969   s/\n//
16970 }
16971 ' >>$CONFIG_STATUS || ac_write_fail=1
16972 rm -f conf$$subs.awk
16973 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16974 _ACAWK
16975 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16976   for (key in S) S_is_set[key] = 1
16977   FS = "\a"
16978
16979 }
16980 {
16981   line = $ 0
16982   nfields = split(line, field, "@")
16983   substed = 0
16984   len = length(field[1])
16985   for (i = 2; i < nfields; i++) {
16986     key = field[i]
16987     keylen = length(key)
16988     if (S_is_set[key]) {
16989       value = S[key]
16990       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16991       len += length(value) + length(field[++i])
16992       substed = 1
16993     } else
16994       len += 1 + keylen
16995   }
16996
16997   print line
16998 }
16999
17000 _ACAWK
17001 _ACEOF
17002 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17003 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17004   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17005 else
17006   cat
17007 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17008   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
17009 _ACEOF
17010
17011 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17012 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
17013 # trailing colons and then remove the whole line if VPATH becomes empty
17014 # (actually we leave an empty line to preserve line numbers).
17015 if test "x$srcdir" = x.; then
17016   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
17017 h
17018 s///
17019 s/^/:/
17020 s/[      ]*$/:/
17021 s/:\$(srcdir):/:/g
17022 s/:\${srcdir}:/:/g
17023 s/:@srcdir@:/:/g
17024 s/^:*//
17025 s/:*$//
17026 x
17027 s/\(=[   ]*\).*/\1/
17028 G
17029 s/\n//
17030 s/^[^=]*=[       ]*$//
17031 }'
17032 fi
17033
17034 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17035 fi # test -n "$CONFIG_FILES"
17036
17037 # Set up the scripts for CONFIG_HEADERS section.
17038 # No need to generate them if there are no CONFIG_HEADERS.
17039 # This happens for instance with `./config.status Makefile'.
17040 if test -n "$CONFIG_HEADERS"; then
17041 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
17042 BEGIN {
17043 _ACEOF
17044
17045 # Transform confdefs.h into an awk script `defines.awk', embedded as
17046 # here-document in config.status, that substitutes the proper values into
17047 # config.h.in to produce config.h.
17048
17049 # Create a delimiter string that does not exist in confdefs.h, to ease
17050 # handling of long lines.
17051 ac_delim='%!_!# '
17052 for ac_last_try in false false :; do
17053   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17054   if test -z "$ac_tt"; then
17055     break
17056   elif $ac_last_try; then
17057     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
17058   else
17059     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17060   fi
17061 done
17062
17063 # For the awk script, D is an array of macro values keyed by name,
17064 # likewise P contains macro parameters if any.  Preserve backslash
17065 # newline sequences.
17066
17067 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17068 sed -n '
17069 s/.\{148\}/&'"$ac_delim"'/g
17070 t rset
17071 :rset
17072 s/^[     ]*#[    ]*define[       ][      ]*/ /
17073 t def
17074 d
17075 :def
17076 s/\\$//
17077 t bsnl
17078 s/["\\]/\\&/g
17079 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17080 D["\1"]=" \3"/p
17081 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
17082 d
17083 :bsnl
17084 s/["\\]/\\&/g
17085 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17086 D["\1"]=" \3\\\\\\n"\\/p
17087 t cont
17088 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17089 t cont
17090 d
17091 :cont
17092 n
17093 s/.\{148\}/&'"$ac_delim"'/g
17094 t clear
17095 :clear
17096 s/\\$//
17097 t bsnlc
17098 s/["\\]/\\&/g; s/^/"/; s/$/"/p
17099 d
17100 :bsnlc
17101 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17102 b cont
17103 ' <confdefs.h | sed '
17104 s/'"$ac_delim"'/"\\\
17105 "/g' >>$CONFIG_STATUS || ac_write_fail=1
17106
17107 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17108   for (key in D) D_is_set[key] = 1
17109   FS = "\a"
17110 }
17111 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17112   line = \$ 0
17113   split(line, arg, " ")
17114   if (arg[1] == "#") {
17115     defundef = arg[2]
17116     mac1 = arg[3]
17117   } else {
17118     defundef = substr(arg[1], 2)
17119     mac1 = arg[2]
17120   }
17121   split(mac1, mac2, "(") #)
17122   macro = mac2[1]
17123   prefix = substr(line, 1, index(line, defundef) - 1)
17124   if (D_is_set[macro]) {
17125     # Preserve the white space surrounding the "#".
17126     print prefix "define", macro P[macro] D[macro]
17127     next
17128   } else {
17129     # Replace #undef with comments.  This is necessary, for example,
17130     # in the case of _POSIX_SOURCE, which is predefined and required
17131     # on some systems where configure will not decide to define it.
17132     if (defundef == "undef") {
17133       print "/*", prefix defundef, macro, "*/"
17134       next
17135     }
17136   }
17137 }
17138 { print }
17139 _ACAWK
17140 _ACEOF
17141 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17142   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17143 fi # test -n "$CONFIG_HEADERS"
17144
17145
17146 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
17147 shift
17148 for ac_tag
17149 do
17150   case $ac_tag in
17151   :[FHLC]) ac_mode=$ac_tag; continue;;
17152   esac
17153   case $ac_mode$ac_tag in
17154   :[FHL]*:*);;
17155   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17156   :[FH]-) ac_tag=-:-;;
17157   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17158   esac
17159   ac_save_IFS=$IFS
17160   IFS=:
17161   set x $ac_tag
17162   IFS=$ac_save_IFS
17163   shift
17164   ac_file=$1
17165   shift
17166
17167   case $ac_mode in
17168   :L) ac_source=$1;;
17169   :[FH])
17170     ac_file_inputs=
17171     for ac_f
17172     do
17173       case $ac_f in
17174       -) ac_f="$ac_tmp/stdin";;
17175       *) # Look for the file first in the build tree, then in the source tree
17176          # (if the path is not absolute).  The absolute path cannot be DOS-style,
17177          # because $ac_f cannot contain `:'.
17178          test -f "$ac_f" ||
17179            case $ac_f in
17180            [\\/$]*) false;;
17181            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17182            esac ||
17183            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17184       esac
17185       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17186       as_fn_append ac_file_inputs " '$ac_f'"
17187     done
17188
17189     # Let's still pretend it is `configure' which instantiates (i.e., don't
17190     # use $as_me), people would be surprised to read:
17191     #    /* config.h.  Generated by config.status.  */
17192     configure_input='Generated from '`
17193           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17194         `' by configure.'
17195     if test x"$ac_file" != x-; then
17196       configure_input="$ac_file.  $configure_input"
17197       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17198 $as_echo "$as_me: creating $ac_file" >&6;}
17199     fi
17200     # Neutralize special characters interpreted by sed in replacement strings.
17201     case $configure_input in #(
17202     *\&* | *\|* | *\\* )
17203        ac_sed_conf_input=`$as_echo "$configure_input" |
17204        sed 's/[\\\\&|]/\\\\&/g'`;; #(
17205     *) ac_sed_conf_input=$configure_input;;
17206     esac
17207
17208     case $ac_tag in
17209     *:-:* | *:-) cat >"$ac_tmp/stdin" \
17210       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17211     esac
17212     ;;
17213   esac
17214
17215   ac_dir=`$as_dirname -- "$ac_file" ||
17216 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17217          X"$ac_file" : 'X\(//\)[^/]' \| \
17218          X"$ac_file" : 'X\(//\)$' \| \
17219          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17220 $as_echo X"$ac_file" |
17221     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17222             s//\1/
17223             q
17224           }
17225           /^X\(\/\/\)[^/].*/{
17226             s//\1/
17227             q
17228           }
17229           /^X\(\/\/\)$/{
17230             s//\1/
17231             q
17232           }
17233           /^X\(\/\).*/{
17234             s//\1/
17235             q
17236           }
17237           s/.*/./; q'`
17238   as_dir="$ac_dir"; as_fn_mkdir_p
17239   ac_builddir=.
17240
17241 case "$ac_dir" in
17242 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17243 *)
17244   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17245   # A ".." for each directory in $ac_dir_suffix.
17246   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17247   case $ac_top_builddir_sub in
17248   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17249   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17250   esac ;;
17251 esac
17252 ac_abs_top_builddir=$ac_pwd
17253 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17254 # for backward compatibility:
17255 ac_top_builddir=$ac_top_build_prefix
17256
17257 case $srcdir in
17258   .)  # We are building in place.
17259     ac_srcdir=.
17260     ac_top_srcdir=$ac_top_builddir_sub
17261     ac_abs_top_srcdir=$ac_pwd ;;
17262   [\\/]* | ?:[\\/]* )  # Absolute name.
17263     ac_srcdir=$srcdir$ac_dir_suffix;
17264     ac_top_srcdir=$srcdir
17265     ac_abs_top_srcdir=$srcdir ;;
17266   *) # Relative name.
17267     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17268     ac_top_srcdir=$ac_top_build_prefix$srcdir
17269     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17270 esac
17271 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17272
17273
17274   case $ac_mode in
17275   :F)
17276   #
17277   # CONFIG_FILE
17278   #
17279
17280   case $INSTALL in
17281   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17282   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17283   esac
17284 _ACEOF
17285
17286 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17287 # If the template does not know about datarootdir, expand it.
17288 # FIXME: This hack should be removed a few years after 2.60.
17289 ac_datarootdir_hack=; ac_datarootdir_seen=
17290 ac_sed_dataroot='
17291 /datarootdir/ {
17292   p
17293   q
17294 }
17295 /@datadir@/p
17296 /@docdir@/p
17297 /@infodir@/p
17298 /@localedir@/p
17299 /@mandir@/p'
17300 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17301 *datarootdir*) ac_datarootdir_seen=yes;;
17302 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17303   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17304 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17305 _ACEOF
17306 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17307   ac_datarootdir_hack='
17308   s&@datadir@&$datadir&g
17309   s&@docdir@&$docdir&g
17310   s&@infodir@&$infodir&g
17311   s&@localedir@&$localedir&g
17312   s&@mandir@&$mandir&g
17313   s&\\\${datarootdir}&$datarootdir&g' ;;
17314 esac
17315 _ACEOF
17316
17317 # Neutralize VPATH when `$srcdir' = `.'.
17318 # Shell code in configure.ac might set extrasub.
17319 # FIXME: do we really want to maintain this feature?
17320 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17321 ac_sed_extra="$ac_vpsub
17322 $extrasub
17323 _ACEOF
17324 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17325 :t
17326 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17327 s|@configure_input@|$ac_sed_conf_input|;t t
17328 s&@top_builddir@&$ac_top_builddir_sub&;t t
17329 s&@top_build_prefix@&$ac_top_build_prefix&;t t
17330 s&@srcdir@&$ac_srcdir&;t t
17331 s&@abs_srcdir@&$ac_abs_srcdir&;t t
17332 s&@top_srcdir@&$ac_top_srcdir&;t t
17333 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17334 s&@builddir@&$ac_builddir&;t t
17335 s&@abs_builddir@&$ac_abs_builddir&;t t
17336 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17337 s&@INSTALL@&$ac_INSTALL&;t t
17338 $ac_datarootdir_hack
17339 "
17340 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17341   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17342
17343 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17344   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17345   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
17346       "$ac_tmp/out"`; test -z "$ac_out"; } &&
17347   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17348 which seems to be undefined.  Please make sure it is defined" >&5
17349 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17350 which seems to be undefined.  Please make sure it is defined" >&2;}
17351
17352   rm -f "$ac_tmp/stdin"
17353   case $ac_file in
17354   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17355   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
17356   esac \
17357   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17358  ;;
17359   :H)
17360   #
17361   # CONFIG_HEADER
17362   #
17363   if test x"$ac_file" != x-; then
17364     {
17365       $as_echo "/* $configure_input  */" \
17366       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17367     } >"$ac_tmp/config.h" \
17368       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17369     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17370       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17371 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17372     else
17373       rm -f "$ac_file"
17374       mv "$ac_tmp/config.h" "$ac_file" \
17375         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17376     fi
17377   else
17378     $as_echo "/* $configure_input  */" \
17379       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17380       || as_fn_error $? "could not create -" "$LINENO" 5
17381   fi
17382  ;;
17383
17384   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17385 $as_echo "$as_me: executing $ac_file commands" >&6;}
17386  ;;
17387   esac
17388
17389
17390   case $ac_file$ac_mode in
17391     "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
17392         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
17393       esac ;;
17394     "po/stamp-it":C)
17395     if  ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
17396        as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5
17397     fi
17398     rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
17399     >"po/stamp-it.tmp"
17400     sed '/^#/d
17401          s/^[[].*] *//
17402          /^[    ]*$/d
17403         '"s|^|  $ac_top_srcdir/|" \
17404       "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
17405
17406     sed '/^POTFILES =/,/[^\\]$/ {
17407                 /^POTFILES =/!d
17408                 r po/POTFILES
17409           }
17410          ' "po/Makefile.in" >"po/Makefile"
17411     rm -f "po/Makefile.tmp"
17412     mv "po/stamp-it.tmp" "po/stamp-it"
17413    ;;
17414
17415   esac
17416 done # for ac_tag
17417
17418
17419 as_fn_exit 0
17420 _ACEOF
17421 ac_clean_files=$ac_clean_files_save
17422
17423 test $ac_write_fail = 0 ||
17424   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17425
17426
17427 # configure is writing to config.log, and then calls config.status.
17428 # config.status does its own redirection, appending to config.log.
17429 # Unfortunately, on DOS this fails, as config.log is still kept open
17430 # by configure, so config.status won't be able to write to it; its
17431 # output is simply discarded.  So we exec the FD to /dev/null,
17432 # effectively closing config.log, so it can be properly (re)opened and
17433 # appended to by config.status.  When coming back to configure, we
17434 # need to make the FD available again.
17435 if test "$no_create" != yes; then
17436   ac_cs_success=:
17437   ac_config_status_args=
17438   test "$silent" = yes &&
17439     ac_config_status_args="$ac_config_status_args --quiet"
17440   exec 5>/dev/null
17441   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17442   exec 5>>config.log
17443   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17444   # would make configure fail if this is the last instruction.
17445   $ac_cs_success || as_fn_exit 1
17446 fi
17447 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17448   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17449 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17450 fi
17451
17452
17453 ###############################################################################
17454 #
17455 #       Print some warnings at the end.
17456 #
17457 ###############################################################################
17458
17459 warn_prefix_1="    Warning:"
17460 warn_prefix_2="       Note:"
17461 warn_prefix="$warn_prefix_1"
17462
17463 warning=no
17464 warnsep='    #################################################################'
17465
17466 warnpre() {
17467   if test "$warning" = no ; then
17468     echo '' ; echo "$warnsep" ; echo ''
17469     warning=yes
17470   fi
17471 }
17472
17473 warn() {
17474   warnpre
17475   if test "$warning" = long ; then echo '' ; fi
17476   warning=yes
17477   rest="$@"
17478   echo "$warn_prefix $rest"
17479 }
17480
17481 warnL() {
17482   was=$warning
17483   warnpre
17484   warning=yes
17485   if test "$was" != no ; then echo '' ; fi
17486   rest="$@"
17487   echo "$warn_prefix $rest"
17488 }
17489
17490 warn2() {
17491   rest="$@"
17492   echo "             $rest"
17493   warning=long
17494 }
17495
17496 note() {
17497   warn_prefix="$warn_prefix_2"
17498   warn $@
17499   warn_prefix="$warn_prefix_1"
17500 }
17501
17502 noteL() {
17503   warn_prefix="$warn_prefix_2"
17504   warnL $@
17505   warn_prefix="$warn_prefix_1"
17506 }
17507
17508
17509 # ac_prog_cc_no_pthread normally only happens on AIX, because according
17510 # to AX_PTHREAD, AIX needs CC=xlc_r or CC=cc_r to do threads.
17511 # If CC is specified, it takes precedence over --with-pthread.
17512 if test "$ac_prog_cc_no_pthread" ; then
17513   warnL "You requested $ac_original_cc for the C compiler, but it doesn't"
17514   warn2 "support POSIX threads."
17515   echo ""
17516   warn2 "If you have multiple CPU cores, try CC=$PTHREAD_CC."
17517 elif test "$with_pthread_req" = yes -a "$have_pthread" = no ; then
17518   warn 'POSIX threads were requested, but were not found.'
17519 fi
17520
17521 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
17522   warn 'The SGI saver extension was requested, but was not found.'
17523 fi
17524
17525 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
17526   warn 'The XIdle extension was requested, but was not found.'
17527 fi
17528
17529 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
17530   warn 'The XSHM extension was requested, but was not found.'
17531 fi
17532
17533 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
17534   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
17535 fi
17536
17537 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
17538   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
17539 fi
17540
17541 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
17542   warn 'The DPMS extension was requested, but was not found.'
17543 fi
17544
17545 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
17546   warn 'The Xinerama extension was requested, but was not found.'
17547 fi
17548
17549 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
17550   warn 'The XF86VMODE extension was requested, but was not found.'
17551 fi
17552
17553 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
17554   warn 'The RANDR extension was requested, but was not found.'
17555 fi
17556
17557 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
17558   warn "Checking of /proc/interrupts was requested, but it's bogus."
17559 fi
17560
17561 if test "$pkg_config" = false ; then
17562   warnL 'The "pkg-config" program was not found.  Without that,'
17563   warn2 "detection of the various GTK libraries won't work."
17564 else
17565   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
17566   if test "x$pkgerr" != "x" ; then
17567     warnL 'The "pkg-config" program produces errors.  This often causes'
17568     warn2 "detection of the various GTK libraries to malfunction."
17569     warn2 "The errors are:"
17570     echo ''
17571     echo "$pkgerr" | sed 's/^/             > /g'
17572   fi
17573 fi
17574
17575 if test "$gtk_halfassed" != no ; then
17576   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
17577   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
17578   warn2 "Perhaps some of the development packages are not installed?"
17579   if test "$have_gtk" = yes ; then
17580     v="$ac_gtk_version_string"
17581     warn2 "GTK $v is also installed, so it will be used instead."
17582     warn2 "Please read the above output and the \`config.log' file"
17583     warn2 "for more details."
17584   fi
17585 fi
17586
17587 motif_warn2() {
17588   warn2 'Though the Motif front-end to xscreensaver is still'
17589   warn2 'maintained, it is no longer being updated with new'
17590   warn2 'features: all new development on the xscreensaver-demo'
17591   warn2 'program is happening in the GTK version, and not in the'
17592   warn2 'Motif version.  It is recommended that you build against'
17593   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
17594 }
17595
17596 if test "$have_motif" = no -a "$have_gtk" = no; then
17597
17598   if test "$with_motif" = yes; then
17599     warnL "Neither the GTK nor Motif libraries were found; the"
17600     warn2 "\`xscreensaver-demo' program requires one of these."
17601     echo ''
17602     motif_warn2
17603   else
17604     warnL "The GTK libraries do not seem to be available; the"
17605     warn2 "\`xscreensaver-demo' program requires them."
17606 #   echo ''
17607 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
17608 #   warn2 "\`--with-motif' option) but that is NOT recommended."
17609 #   motif_warn2
17610   fi
17611
17612 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
17613   warnL "Use of Motif was requested, but it wasn't found;"
17614   warn2 "Gtk will be used instead."
17615
17616 elif test "$jurassic_gtk" = yes ; then
17617
17618   pref_gtk=2.0
17619
17620   v="$ac_gtk_version_string"
17621   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
17622     warnL "Use of Gtk was requested, but its version number is unknown;"
17623   elif test "$with_gtk_req" = yes ; then
17624     warnL "Use of Gtk was requested, but it is version $v;"
17625   else
17626     warnL "Gtk was found on this system, but it is version $v;"
17627   fi
17628
17629   warn2 "Gtk $pref_gtk or newer is required."
17630
17631 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
17632   warnL "Use of Gtk was requested, but it wasn't found."
17633 fi
17634
17635
17636 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
17637   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
17638   warn2 "headers were not found.  That can't be good.  Please"
17639   warn2 "install the GDK-Pixbuf development kit and re-configure."
17640 fi
17641
17642 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
17643
17644   preferred_lesstif=0.92
17645
17646   if test "$lesstif_version" = unknown; then
17647     warnL "Unable to determine the LessTif version number!"
17648     warn2 "Make sure you are using version $preferred_lesstif or newer."
17649     warn2 "See <http://www.lesstif.org/>."
17650
17651   elif test \! $lesstif_version -gt 82; then
17652     warnL "LessTif version $lesstif_version_string is being used."
17653     warn2 "LessTif versions 0.82 and earlier are too buggy to"
17654     warn2 "use with XScreenSaver; it is strongly recommended"
17655     warn2 "that you upgrade to at least version $preferred_lesstif!"
17656     warn2 "See <http://www.lesstif.org/>."
17657   fi
17658 fi
17659
17660
17661 if test "$have_motif" = yes -a "$have_gtk" = no ; then
17662   warn  'Motif is being used, and GTK is not.'
17663   echo  ''
17664   motif_warn2
17665 fi
17666
17667
17668 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
17669   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
17670 fi
17671
17672 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
17673    test "$have_gdk_pixbuf" = no ; then
17674
17675   if test "$with_gdk_pixbuf_req" = yes ; then
17676     true
17677   elif test "$with_gdk_pixbuf_req" = no ; then
17678     warnL 'The GDK-Pixbuf library is not being used.'
17679   else
17680     warnL 'The GDK-Pixbuf library was not found.'
17681   fi
17682
17683   if test "$gdk_pixbuf_halfassed" = yes ; then
17684     echo ''
17685     warn2 'More specifically, we found the headers, but not the'
17686     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
17687     warn2 "system, or something else went wrong.  The \`config.log'"
17688     warn2 'file might contain some clues.'
17689   fi
17690
17691   if test "$have_png" = yes ; then
17692     echo ''
17693     warn2 'The PNG library is being used instead.'
17694   fi
17695
17696   echo ''
17697   warn2 'Some of the demos will not use images as much as they could.'
17698   warn2 'You should consider installing GDK-Pixbuf and re-running'
17699   warn2 'configure.'
17700 fi
17701
17702
17703 if test "$have_jpeg" = no ; then
17704   if test "$with_jpeg_req" = yes ; then
17705     warnL 'Use of libjpeg was requested, but it was not found.'
17706   elif test "$with_jpeg_req" = no ; then
17707     noteL 'The JPEG library is not being used.'
17708   else
17709     noteL 'The JPEG library was not found.'
17710   fi
17711
17712   if test "$jpeg_halfassed" = yes ; then
17713     echo ''
17714     warn2 'More specifically, we found the headers, but not the'
17715     warn2 'library; so either JPEG is half-installed on this'
17716     warn2 "system, or something else went wrong.  The \`config.log'"
17717     warn2 'file might contain some clues.'
17718     echo ''
17719   fi
17720
17721   if test "$have_gdk_pixbuf" = no ; then
17722     warn2 "This means that it won't be possible for the image-manipulating"
17723     warn2 "display modes to load files from disk; and it also means that"
17724     warn2 "the \`webcollage' program will be much slower."
17725   else
17726     warn2 "This means the \`webcollage' program will be much slower."
17727   fi
17728 fi
17729
17730
17731 if test "$have_png" = no ; then
17732   if test "$with_png_req" = yes ; then
17733     warnL 'Use of libpng was requested, but it was not found.'
17734   elif test "$with_png_req" = no ; then
17735     noteL 'The PNG library is not being used.'
17736   else
17737     noteL 'The PNG library was not found.'
17738   fi
17739
17740   if test "$png_halfassed" = yes ; then
17741     echo ''
17742     warn2 'More specifically, we found the headers, but not the'
17743     warn2 'library; so either PNG is half-installed on this'
17744     warn2 "system, or something else went wrong.  The \`config.log'"
17745     warn2 'file might contain some clues.'
17746     echo ''
17747   fi
17748
17749   warn2 "Many things aren't going to work right."
17750 fi
17751
17752
17753 if test "$have_xft" = no ; then
17754   if test "$with_xft_req" = yes ; then
17755     warnL "Use of libXft was requested, but it was not found."
17756   elif test "$with_xft_req" = no ; then
17757     noteL 'The Xft library is not being used.'
17758   else
17759     noteL "The Xft library was not found."
17760   fi
17761
17762   if test "$xft_halfassed" = yes ; then
17763     echo ''
17764     warn2 'More specifically, we found the headers, but not the'
17765     warn2 'libraries; so either Xft is half-installed on this'
17766     warn2 "system, or something else went wrong.  The \`config.log'"
17767     warn2 'file might contain some clues.'
17768     echo ''
17769   fi
17770
17771   warn2 "This means that fonts won't be anti-aliased."
17772 fi
17773
17774
17775 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
17776   preferred_mesagl=3.4
17777   mgv="$ac_mesagl_version_string"
17778   pgl="$preferred_mesagl"
17779
17780   if test "$ac_mesagl_version" = unknown; then
17781     true
17782     # warnL "Unable to determine the MesaGL version number!"
17783     # warn2 "Make sure you are using version $preferred_mesagl or newer."
17784
17785   elif test \! "$ac_mesagl_version" -gt 2006; then
17786     warnL "MesaGL version number is $mgv --"
17787     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
17788     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
17789
17790   elif test \! "$ac_mesagl_version" -gt 3003; then
17791     warnL "MesaGL version number is $mgv --"
17792     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
17793     warn2 "that you upgrade to $pgl or newer."
17794   fi
17795 fi
17796
17797 if test "$have_gl" = no ; then
17798   if test "$with_gl_req" = yes ; then
17799     warnL 'Use of GL was requested, but it was not found.'
17800   elif test "$with_gl_req" = no ; then
17801     noteL 'The OpenGL 3D library is not being used.'
17802   else
17803     noteL 'The OpenGL 3D library was not found.'
17804   fi
17805
17806   if test "$gl_halfassed" = yes ; then
17807     echo ''
17808     warn2 'More specifically, we found the headers, but not the'
17809     warn2 'libraries; so either GL is half-installed on this'
17810     warn2 "system, or something else went wrong.  The \`config.log'"
17811     warn2 'file might contain some clues.'
17812   fi
17813
17814   echo ''
17815   warn2 'Those demos which use 3D will not be built or installed.'
17816   warn2 'You might want to consider installing OpenGL and'
17817   warn2 're-running configure.'
17818
17819 fi
17820
17821
17822 if test "$have_gl" = yes -a "$have_gle" = no ; then
17823
17824  # nobody cares about this; don't print the warning unless it was
17825  # requested and not found, or halfway-found.
17826  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
17827
17828   if test "$with_gle_req" = yes ; then
17829     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
17830     warn2 'it was not found (though the OpenGL library was found, and'
17831     warn2 'is being used.)'
17832   elif test "$with_gle_req" = no ; then
17833     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
17834     warn2 'library is not.'
17835   else
17836     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
17837     warn2 'library was not.'
17838   fi
17839
17840   if test "$gle_halfassed" = yes ; then
17841     echo ''
17842     warn2 'More specifically, we found the headers, but not the'
17843     warn2 'libraries; so either GLE is half-installed on this'
17844     warn2 "system, or something else went wrong.  The \`config.log'"
17845     warn2 'file might contain some clues.'
17846   fi
17847
17848   echo ''
17849   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
17850   warn2 'will not be built or installed.  You might want to consider'
17851   warn2 'installing GLE and re-running configure.  You can find the'
17852   warn2 'GLE library at <http://www.linas.org/gle/>'
17853
17854  fi
17855 fi
17856
17857
17858 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
17859   warn 'Use of XReadDisplay was requested, but it was not found.'
17860 fi
17861
17862 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
17863   warn 'Use of Kerberos was requested, but it was not found.'
17864 fi
17865
17866 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
17867   warn 'Use of PAM was requested, but it was not found.'
17868 fi
17869
17870 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
17871   warn 'Use of shadow passwords was requested, but they were not found.'
17872 fi
17873
17874 if test "$ac_macosx" = yes ; then
17875   if test "$enable_locking" = yes ; then
17876     warn  "You have specified --enable-locking on MacOS X."
17877     warn2 "THIS DOES NOT WORK!  Don't do this!"
17878   fi
17879 fi
17880
17881
17882 # You are in a twisty maze of namespaces and syntaxes, all alike.
17883 # Fuck the skull of Unix.
17884 #
17885 bindir=`eval eval eval eval eval eval eval echo $bindir`
17886 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
17887 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
17888
17889 # canonicalize slashes.
17890 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
17891 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
17892 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
17893
17894
17895 # Sanity check the hackdir
17896 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
17897   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
17898     echo ""
17899     as_fn_error $? "\"--with-hackdir=${bindir}/${bad_choice}\" won't work.
17900                    There will be an executable installed with that name, so
17901                    that can't be the name of a directory as well.  Please
17902                    re-configure with a different directory name." "$LINENO" 5
17903   fi
17904 done
17905
17906
17907 do_dir_warning=no
17908
17909 # Now let's warn if there's a previous RPM version already installed.
17910 # But don't bother with this test if we are currently *building* an RPM.
17911
17912 if test -z "$RPM_PACKAGE_VERSION" ; then
17913
17914   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
17915
17916   # M4 sucks!!
17917
17918   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
17919         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
17920         head -1`
17921
17922
17923   if test \! -z "$rpmv" ; then
17924     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
17925     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
17926
17927     warning=no
17928     warnL "There is already an installed RPM of xscreensaver $rpmv"
17929     warn2 'on this system.  You might want to remove it ("rpm -ve")'
17930     warn2 'before running "make install" in this directory.'
17931     echo ""
17932     warn2 "Alternately, you could build this version of xscreensaver"
17933     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
17934     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
17935     warn2 "See the RPM documentation for more info."
17936     echo ""
17937
17938     if test "$rpmbdir" = "$rpmhdir" ; then
17939       warn2 "The RPM version was installed in $rpmbdir/."
17940       do_dir_warning=yes
17941     else
17942       warn2 "The RPM version was installed in $rpmbdir/,"
17943       warn2 "with demos in $rpmhdir/."
17944     fi
17945   fi
17946 fi
17947
17948 # Also warn if there's a Debian package installed.
17949 #
17950 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
17951 debv=''
17952 for dpkg in $debnames ; do
17953   if test -z "$debv"; then
17954     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
17955   fi
17956 done
17957
17958 if test \! -z "$debv" ; then
17959   debbdir=`dpkg -L $debnames 2>/dev/null | \
17960             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
17961   debhdir=`dpkg -L $debnames 2>/dev/null | \
17962             sed -n 's@^\(.*/\)popsquares$@\1@p'`
17963   if test -z "$debbdir" ; then debbdir='???'; fi
17964   if test -z "$debhdir" ; then debhdir='???'; fi
17965
17966   warning=no
17967   warnL "There is already an installed dpkg of xscreensaver"
17968   warn2 "version \"$debv\" on this system."
17969   echo ""
17970   warn2 "The dpkg was installed in $debbdir,"
17971   warn2 "with demos in $debhdir."
17972 fi
17973
17974
17975 if test "${bindir}" = "${HACKDIR}" ; then
17976   do_dir_warning=yes
17977 fi
17978
17979 if test "$do_dir_warning" = yes; then
17980   echo ""
17981   echo "$warnsep"
17982   echo ""
17983   echo '      When you run "make install", the "xscreensaver",'
17984   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
17985   echo "      will be installed in ${bindir}/."
17986   echo ""
17987   echo "      The various graphics demos (200+ different executables) will"
17988   echo "      be installed in ${HACKDIR}/."
17989   echo ""
17990   echo "      If you would prefer the demos to be installed elsewhere,"
17991   echo "      you should re-run configure with the --with-hackdir=DIR"
17992   echo "      option.  For more information, run \`./configure --help'."
17993   warning=yes
17994 fi
17995
17996 if test "$warning" != no; then
17997   echo '' ; echo "$warnsep" ; echo ''
17998 fi
17999
18000 if test "$do_dir_warning" = no; then
18001   if test "$warning" = no; then
18002     echo ''
18003   fi
18004   echo "User programs will be installed in ${bindir}/"
18005   echo "Screen savers will be installed in ${HACKDIR}/"
18006   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
18007   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
18008   echo ''
18009 fi