From http://www.jwz.org/xscreensaver/xscreensaver-5.29.tar.gz
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18   emulate sh
19   NULLCMD=:
20   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23   setopt NO_GLOB_SUBST
24 else
25   case `(set -o) 2>/dev/null` in #(
26   *posix*) :
27     set -o posix ;; #(
28   *) :
29      ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45   as_echo='print -r --'
46   as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48   as_echo='printf %s\n'
49   as_echo_n='printf %s'
50 else
51   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53     as_echo_n='/usr/ucb/echo -n'
54   else
55     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56     as_echo_n_body='eval
57       arg=$1;
58       case $arg in #(
59       *"$as_nl"*)
60         expr "X$arg" : "X\\(.*\\)$as_nl";
61         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62       esac;
63       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64     '
65     export as_echo_n_body
66     as_echo_n='sh -c $as_echo_n_body as_echo'
67   fi
68   export as_echo_body
69   as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74   PATH_SEPARATOR=:
75   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77       PATH_SEPARATOR=';'
78   }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order.  Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" ""        $as_nl"
88
89 # Find who we are.  Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92   *[\\/]* ) as_myself=$0 ;;
93   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96   IFS=$as_save_IFS
97   test -z "$as_dir" && as_dir=.
98     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99   done
100 IFS=$as_save_IFS
101
102      ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107   as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111   exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there.  '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136   # into an infinite loop, continuously re-executing ourselves.
137   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138     _as_can_reexec=no; export _as_can_reexec;
139     # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147   *v*x* | *x*v* ) as_opts=-vx ;;
148   *v* ) as_opts=-v ;;
149   *x* ) as_opts=-x ;;
150   * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157   fi
158   # We don't want this to propagate to other subprocesses.
159           { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162   emulate sh
163   NULLCMD=:
164   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165   # is contrary to our usage.  Disable this feature.
166   alias -g '\${1+\"\$@\"}'='\"\$@\"'
167   setopt NO_GLOB_SUBST
168 else
169   case \`(set -o) 2>/dev/null\` in #(
170   *posix*) :
171     set -o posix ;; #(
172   *) :
173      ;;
174 esac
175 fi
176 "
177   as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191   exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200   if (eval "$as_required") 2>/dev/null; then :
201   as_have_required=yes
202 else
203   as_have_required=no
204 fi
205   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212   IFS=$as_save_IFS
213   test -z "$as_dir" && as_dir=.
214   as_found=:
215   case $as_dir in #(
216          /*)
217            for as_base in sh bash ksh sh5; do
218              # Try only shells that exist, to save several forks.
219              as_shell=$as_dir/$as_base
220              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222   CONFIG_SHELL=$as_shell as_have_required=yes
223                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224   break 2
225 fi
226 fi
227            done;;
228        esac
229   as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233   CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238       if test "x$CONFIG_SHELL" != x; then :
239   export CONFIG_SHELL
240              # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248   *v*x* | *x*v* ) as_opts=-vx ;;
249   *v* ) as_opts=-v ;;
250   *x* ) as_opts=-x ;;
251   * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260     if test x$as_have_required = xno; then :
261   $as_echo "$0: This script requires a shell more modern than all"
262   $as_echo "$0: the shells that I found on your system."
263   if test x${ZSH_VERSION+set} = xset ; then
264     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266   else
267     $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271   fi
272   exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290   { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299   return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307   set +e
308   as_fn_set_status $1
309   exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318   case $as_dir in #(
319   -*) as_dir=./$as_dir;;
320   esac
321   test -d "$as_dir" || eval $as_mkdir_p || {
322     as_dirs=
323     while :; do
324       case $as_dir in #(
325       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326       *) as_qdir=$as_dir;;
327       esac
328       as_dirs="'$as_qdir' $as_dirs"
329       as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331          X"$as_dir" : 'X\(//\)[^/]' \| \
332          X"$as_dir" : 'X\(//\)$' \| \
333          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336             s//\1/
337             q
338           }
339           /^X\(\/\/\)[^/].*/{
340             s//\1/
341             q
342           }
343           /^X\(\/\/\)$/{
344             s//\1/
345             q
346           }
347           /^X\(\/\).*/{
348             s//\1/
349             q
350           }
351           s/.*/./; q'`
352       test -d "$as_dir" && break
353     done
354     test -z "$as_dirs" || eval "mkdir $as_dirs"
355   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365   test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374   eval 'as_fn_append ()
375   {
376     eval $1+=\$2
377   }'
378 else
379   as_fn_append ()
380   {
381     eval $1=\$$1\$2
382   }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391   eval 'as_fn_arith ()
392   {
393     as_val=$(( $* ))
394   }'
395 else
396   as_fn_arith ()
397   {
398     as_val=`expr "$@" || test $? -eq 1`
399   }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410   as_status=$1; test $as_status -eq 0 && as_status=1
411   if test "$4"; then
412     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414   fi
415   $as_echo "$as_me: error: $2" >&2
416   as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420    test "X`expr 00001 : '.*\(...\)'`" = X001; then
421   as_expr=expr
422 else
423   as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427   as_basename=basename
428 else
429   as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433   as_dirname=dirname
434 else
435   as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440          X"$0" : 'X\(//\)$' \| \
441          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443     sed '/^.*\/\([^/][^/]*\)\/*$/{
444             s//\1/
445             q
446           }
447           /^X\/\(\/\/\)$/{
448             s//\1/
449             q
450           }
451           /^X\/\(\/\).*/{
452             s//\1/
453             q
454           }
455           s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465   as_lineno_1=$LINENO as_lineno_1a=$LINENO
466   as_lineno_2=$LINENO as_lineno_2a=$LINENO
467   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470   sed -n '
471     p
472     /[$]LINENO/=
473   ' <$as_myself |
474     sed '
475       s/[$]LINENO.*/&-/
476       t lineno
477       b
478       :lineno
479       N
480       :loop
481       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482       t loop
483       s/-\n.*//
484     ' >$as_me.lineno &&
485   chmod +x "$as_me.lineno" ||
486     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489   # already done that, so ensure we don't try to do so again and fall
490   # in an infinite loop.  This has already happened in practice.
491   _as_can_reexec=no; export _as_can_reexec
492   # Don't try to exec as it changes $[0], causing all sort of problems
493   # (the dirname of $[0] is not the place where we might find the
494   # original and so on.  Autoconf is especially sensitive to this).
495   . "./$as_me.lineno"
496   # Exit status is that of the last command.
497   exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503   case `echo 'xy\c'` in
504   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
505   xy)  ECHO_C='\c';;
506   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507        ECHO_T=' ';;
508   esac;;
509 *)
510   ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515   rm -f conf$$.dir/conf$$.file
516 else
517   rm -f conf$$.dir
518   mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521   if ln -s conf$$.file conf$$ 2>/dev/null; then
522     as_ln_s='ln -s'
523     # ... but there are two gotchas:
524     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526     # In both cases, we have to default to `cp -pR'.
527     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528       as_ln_s='cp -pR'
529   elif ln conf$$.file conf$$ 2>/dev/null; then
530     as_ln_s=ln
531   else
532     as_ln_s='cp -pR'
533   fi
534 else
535   as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541   as_mkdir_p='mkdir -p "$as_dir"'
542 else
543   test -d ./-p && rmdir ./-p
544   as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="driver/subprocs.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 #  include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 #  include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 ac_subst_vars='LTLIBOBJS
623 LIBOBJS
624 DEPEND_DEFINES
625 DEPEND_FLAGS
626 DEPEND
627 APPDEFAULTS
628 GTK_EXTRA_OBJS
629 HACK_CONF_DIR
630 PO_DATADIR
631 GTK_DATADIR
632 HACKDIR_FULL
633 HACKDIR
634 NOGNOME
635 GNOME22
636 GNOME24
637 GLFONT_OBJS
638 GLFPS_OBJS
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 XMU_LIBS
655 XMU_OBJS
656 XMU_SRCS
657 PASSWD_OBJS
658 PASSWD_SRCS
659 MEN_OSX
660 SCRIPTS_OSX
661 EXES_OSX
662 OBJCC
663 WITH_BROWSER
664 DEFAULT_TEXT_FILE
665 DEFAULT_IMAGE_DIRECTORY
666 DEFAULT_IMAGES_P
667 NEW_LOGIN_COMMAND_P
668 NEW_LOGIN_COMMAND
669 COMMENT_PAM_CHECK_ACCOUNT
670 HAVE_PAM_FAIL_DELAY
671 INSTALL_PAM
672 NEED_SETUID
673 INSTALL_DIRS
674 SETUID_HACKS
675 INSTALL_SETUID
676 PASSWD_LIBS
677 XINERAMA_LIBS
678 XDPMS_LIBS
679 GLE_LIBS
680 GL_LIBS
681 PTY_LIBS
682 XPM_LIBS
683 HACK_LIBS
684 JPEG_LIBS
685 XML_LIBS
686 GTK_LIBS
687 MOTIF_LIBS
688 SAVER_LIBS
689 ALL_DEMO_PROGRAMS
690 PREFERRED_DEMO_PROGRAM
691 INCLUDES
692 gnome_url_show_program
693 gnome_open_program
694 pkg_config
695 login_manager_tmp
696 MKINSTALLDIRS
697 POSUB
698 POFILES
699 PO_IN_DATADIR_FALSE
700 PO_IN_DATADIR_TRUE
701 INTLLIBS
702 INSTOBJEXT
703 GMOFILES
704 CATOBJEXT
705 CATALOGS
706 MSGFMT_OPTS
707 GETTEXT_PACKAGE
708 DATADIRNAME
709 ALL_LINGUAS
710 GMSGFMT
711 MSGFMT
712 MSGMERGE
713 XGETTEXT
714 INTLTOOL_POLICY_RULE
715 INTLTOOL_SERVICE_RULE
716 INTLTOOL_THEME_RULE
717 INTLTOOL_SCHEMAS_RULE
718 INTLTOOL_CAVES_RULE
719 INTLTOOL_XML_NOMERGE_RULE
720 INTLTOOL_XML_RULE
721 INTLTOOL_KBD_RULE
722 INTLTOOL_XAM_RULE
723 INTLTOOL_UI_RULE
724 INTLTOOL_SOUNDLIST_RULE
725 INTLTOOL_SHEET_RULE
726 INTLTOOL_SERVER_RULE
727 INTLTOOL_PONG_RULE
728 INTLTOOL_OAF_RULE
729 INTLTOOL_PROP_RULE
730 INTLTOOL_KEYS_RULE
731 INTLTOOL_DIRECTORY_RULE
732 INTLTOOL_DESKTOP_RULE
733 intltool__v_merge_options_0
734 intltool__v_merge_options_
735 INTLTOOL_V_MERGE_OPTIONS
736 INTLTOOL__v_MERGE_0
737 INTLTOOL__v_MERGE_
738 INTLTOOL_V_MERGE
739 AM_DEFAULT_VERBOSITY
740 INTLTOOL_EXTRACT
741 INTLTOOL_MERGE
742 INTLTOOL_UPDATE
743 USE_NLS
744 X_EXTRA_LIBS
745 X_LIBS
746 X_PRE_LIBS
747 X_CFLAGS
748 XMKMF
749 PERL
750 EGREP
751 GREP
752 SET_MAKE
753 INSTALL_DATA
754 INSTALL_SCRIPT
755 INSTALL_PROGRAM
756 CPP
757 PTHREAD_CFLAGS
758 PTHREAD_LIBS
759 PTHREAD_CC
760 ax_pthread_config
761 OBJEXT
762 EXEEXT
763 ac_ct_CC
764 CPPFLAGS
765 LDFLAGS
766 CFLAGS
767 CC
768 host_os
769 host_vendor
770 host_cpu
771 host
772 build_os
773 build_vendor
774 build_cpu
775 build
776 target_alias
777 host_alias
778 build_alias
779 LIBS
780 ECHO_T
781 ECHO_N
782 ECHO_C
783 DEFS
784 mandir
785 localedir
786 libdir
787 psdir
788 pdfdir
789 dvidir
790 htmldir
791 infodir
792 docdir
793 oldincludedir
794 includedir
795 localstatedir
796 sharedstatedir
797 sysconfdir
798 datadir
799 datarootdir
800 libexecdir
801 sbindir
802 bindir
803 program_transform_name
804 prefix
805 exec_prefix
806 PACKAGE_URL
807 PACKAGE_BUGREPORT
808 PACKAGE_STRING
809 PACKAGE_VERSION
810 PACKAGE_TARNAME
811 PACKAGE_NAME
812 PATH_SEPARATOR
813 SHELL'
814 ac_subst_files=''
815 ac_user_opts='
816 enable_option_checking
817 with_x_app_defaults
818 with_pthread
819 enable_largefile
820 with_x
821 enable_nls
822 with_hackdir
823 enable_subdir
824 with_configdir
825 with_dpms_ext
826 with_xinerama_ext
827 with_xinput_ext
828 with_xf86vmode_ext
829 with_xf86gamma_ext
830 with_randr_ext
831 with_proc_interrupts
832 enable_locking
833 enable_root_passwd
834 with_pam
835 with_pam_service_name
836 enable_pam_check_account_type
837 with_kerberos
838 with_shadow
839 with_passwd_helper
840 with_login_manager
841 with_gtk
842 with_motif
843 with_gl
844 with_gle
845 with_gles
846 with_pixbuf
847 with_xpm
848 with_jpeg
849 with_xshm_ext
850 with_xdbe_ext
851 with_readdisplay
852 with_image_directory
853 with_text_file
854 with_browser
855 with_setuid_hacks
856 '
857       ac_precious_vars='build_alias
858 host_alias
859 target_alias
860 CC
861 CFLAGS
862 LDFLAGS
863 LIBS
864 CPPFLAGS
865 CPP
866 XMKMF'
867
868
869 # Initialize some variables set by options.
870 ac_init_help=
871 ac_init_version=false
872 ac_unrecognized_opts=
873 ac_unrecognized_sep=
874 # The variables have the same names as the options, with
875 # dashes changed to underlines.
876 cache_file=/dev/null
877 exec_prefix=NONE
878 no_create=
879 no_recursion=
880 prefix=NONE
881 program_prefix=NONE
882 program_suffix=NONE
883 program_transform_name=s,x,x,
884 silent=
885 site=
886 srcdir=
887 verbose=
888 x_includes=NONE
889 x_libraries=NONE
890
891 # Installation directory options.
892 # These are left unexpanded so users can "make install exec_prefix=/foo"
893 # and all the variables that are supposed to be based on exec_prefix
894 # by default will actually change.
895 # Use braces instead of parens because sh, perl, etc. also accept them.
896 # (The list follows the same order as the GNU Coding Standards.)
897 bindir='${exec_prefix}/bin'
898 sbindir='${exec_prefix}/sbin'
899 libexecdir='${exec_prefix}/libexec'
900 datarootdir='${prefix}/share'
901 datadir='${datarootdir}'
902 sysconfdir='${prefix}/etc'
903 sharedstatedir='${prefix}/com'
904 localstatedir='${prefix}/var'
905 includedir='${prefix}/include'
906 oldincludedir='/usr/include'
907 docdir='${datarootdir}/doc/${PACKAGE}'
908 infodir='${datarootdir}/info'
909 htmldir='${docdir}'
910 dvidir='${docdir}'
911 pdfdir='${docdir}'
912 psdir='${docdir}'
913 libdir='${exec_prefix}/lib'
914 localedir='${datarootdir}/locale'
915 mandir='${datarootdir}/man'
916
917 ac_prev=
918 ac_dashdash=
919 for ac_option
920 do
921   # If the previous option needs an argument, assign it.
922   if test -n "$ac_prev"; then
923     eval $ac_prev=\$ac_option
924     ac_prev=
925     continue
926   fi
927
928   case $ac_option in
929   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
930   *=)   ac_optarg= ;;
931   *)    ac_optarg=yes ;;
932   esac
933
934   # Accept the important Cygnus configure options, so we can diagnose typos.
935
936   case $ac_dashdash$ac_option in
937   --)
938     ac_dashdash=yes ;;
939
940   -bindir | --bindir | --bindi | --bind | --bin | --bi)
941     ac_prev=bindir ;;
942   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
943     bindir=$ac_optarg ;;
944
945   -build | --build | --buil | --bui | --bu)
946     ac_prev=build_alias ;;
947   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
948     build_alias=$ac_optarg ;;
949
950   -cache-file | --cache-file | --cache-fil | --cache-fi \
951   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
952     ac_prev=cache_file ;;
953   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
954   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
955     cache_file=$ac_optarg ;;
956
957   --config-cache | -C)
958     cache_file=config.cache ;;
959
960   -datadir | --datadir | --datadi | --datad)
961     ac_prev=datadir ;;
962   -datadir=* | --datadir=* | --datadi=* | --datad=*)
963     datadir=$ac_optarg ;;
964
965   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
966   | --dataroo | --dataro | --datar)
967     ac_prev=datarootdir ;;
968   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
969   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
970     datarootdir=$ac_optarg ;;
971
972   -disable-* | --disable-*)
973     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
974     # Reject names that are not valid shell variable names.
975     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
976       as_fn_error $? "invalid feature name: $ac_useropt"
977     ac_useropt_orig=$ac_useropt
978     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
979     case $ac_user_opts in
980       *"
981 "enable_$ac_useropt"
982 "*) ;;
983       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
984          ac_unrecognized_sep=', ';;
985     esac
986     eval enable_$ac_useropt=no ;;
987
988   -docdir | --docdir | --docdi | --doc | --do)
989     ac_prev=docdir ;;
990   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
991     docdir=$ac_optarg ;;
992
993   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
994     ac_prev=dvidir ;;
995   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
996     dvidir=$ac_optarg ;;
997
998   -enable-* | --enable-*)
999     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1000     # Reject names that are not valid shell variable names.
1001     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1002       as_fn_error $? "invalid feature name: $ac_useropt"
1003     ac_useropt_orig=$ac_useropt
1004     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1005     case $ac_user_opts in
1006       *"
1007 "enable_$ac_useropt"
1008 "*) ;;
1009       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1010          ac_unrecognized_sep=', ';;
1011     esac
1012     eval enable_$ac_useropt=\$ac_optarg ;;
1013
1014   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1015   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1016   | --exec | --exe | --ex)
1017     ac_prev=exec_prefix ;;
1018   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1019   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1020   | --exec=* | --exe=* | --ex=*)
1021     exec_prefix=$ac_optarg ;;
1022
1023   -gas | --gas | --ga | --g)
1024     # Obsolete; use --with-gas.
1025     with_gas=yes ;;
1026
1027   -help | --help | --hel | --he | -h)
1028     ac_init_help=long ;;
1029   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1030     ac_init_help=recursive ;;
1031   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1032     ac_init_help=short ;;
1033
1034   -host | --host | --hos | --ho)
1035     ac_prev=host_alias ;;
1036   -host=* | --host=* | --hos=* | --ho=*)
1037     host_alias=$ac_optarg ;;
1038
1039   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1040     ac_prev=htmldir ;;
1041   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1042   | --ht=*)
1043     htmldir=$ac_optarg ;;
1044
1045   -includedir | --includedir | --includedi | --included | --include \
1046   | --includ | --inclu | --incl | --inc)
1047     ac_prev=includedir ;;
1048   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1049   | --includ=* | --inclu=* | --incl=* | --inc=*)
1050     includedir=$ac_optarg ;;
1051
1052   -infodir | --infodir | --infodi | --infod | --info | --inf)
1053     ac_prev=infodir ;;
1054   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1055     infodir=$ac_optarg ;;
1056
1057   -libdir | --libdir | --libdi | --libd)
1058     ac_prev=libdir ;;
1059   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1060     libdir=$ac_optarg ;;
1061
1062   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1063   | --libexe | --libex | --libe)
1064     ac_prev=libexecdir ;;
1065   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1066   | --libexe=* | --libex=* | --libe=*)
1067     libexecdir=$ac_optarg ;;
1068
1069   -localedir | --localedir | --localedi | --localed | --locale)
1070     ac_prev=localedir ;;
1071   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1072     localedir=$ac_optarg ;;
1073
1074   -localstatedir | --localstatedir | --localstatedi | --localstated \
1075   | --localstate | --localstat | --localsta | --localst | --locals)
1076     ac_prev=localstatedir ;;
1077   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1078   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1079     localstatedir=$ac_optarg ;;
1080
1081   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1082     ac_prev=mandir ;;
1083   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1084     mandir=$ac_optarg ;;
1085
1086   -nfp | --nfp | --nf)
1087     # Obsolete; use --without-fp.
1088     with_fp=no ;;
1089
1090   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1091   | --no-cr | --no-c | -n)
1092     no_create=yes ;;
1093
1094   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1095   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1096     no_recursion=yes ;;
1097
1098   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1099   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1100   | --oldin | --oldi | --old | --ol | --o)
1101     ac_prev=oldincludedir ;;
1102   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1103   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1104   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1105     oldincludedir=$ac_optarg ;;
1106
1107   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1108     ac_prev=prefix ;;
1109   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1110     prefix=$ac_optarg ;;
1111
1112   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1113   | --program-pre | --program-pr | --program-p)
1114     ac_prev=program_prefix ;;
1115   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1116   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1117     program_prefix=$ac_optarg ;;
1118
1119   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1120   | --program-suf | --program-su | --program-s)
1121     ac_prev=program_suffix ;;
1122   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1123   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1124     program_suffix=$ac_optarg ;;
1125
1126   -program-transform-name | --program-transform-name \
1127   | --program-transform-nam | --program-transform-na \
1128   | --program-transform-n | --program-transform- \
1129   | --program-transform | --program-transfor \
1130   | --program-transfo | --program-transf \
1131   | --program-trans | --program-tran \
1132   | --progr-tra | --program-tr | --program-t)
1133     ac_prev=program_transform_name ;;
1134   -program-transform-name=* | --program-transform-name=* \
1135   | --program-transform-nam=* | --program-transform-na=* \
1136   | --program-transform-n=* | --program-transform-=* \
1137   | --program-transform=* | --program-transfor=* \
1138   | --program-transfo=* | --program-transf=* \
1139   | --program-trans=* | --program-tran=* \
1140   | --progr-tra=* | --program-tr=* | --program-t=*)
1141     program_transform_name=$ac_optarg ;;
1142
1143   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1144     ac_prev=pdfdir ;;
1145   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1146     pdfdir=$ac_optarg ;;
1147
1148   -psdir | --psdir | --psdi | --psd | --ps)
1149     ac_prev=psdir ;;
1150   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1151     psdir=$ac_optarg ;;
1152
1153   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1154   | -silent | --silent | --silen | --sile | --sil)
1155     silent=yes ;;
1156
1157   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1158     ac_prev=sbindir ;;
1159   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1160   | --sbi=* | --sb=*)
1161     sbindir=$ac_optarg ;;
1162
1163   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1164   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1165   | --sharedst | --shareds | --shared | --share | --shar \
1166   | --sha | --sh)
1167     ac_prev=sharedstatedir ;;
1168   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1169   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1170   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1171   | --sha=* | --sh=*)
1172     sharedstatedir=$ac_optarg ;;
1173
1174   -site | --site | --sit)
1175     ac_prev=site ;;
1176   -site=* | --site=* | --sit=*)
1177     site=$ac_optarg ;;
1178
1179   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1180     ac_prev=srcdir ;;
1181   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1182     srcdir=$ac_optarg ;;
1183
1184   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1185   | --syscon | --sysco | --sysc | --sys | --sy)
1186     ac_prev=sysconfdir ;;
1187   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1188   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1189     sysconfdir=$ac_optarg ;;
1190
1191   -target | --target | --targe | --targ | --tar | --ta | --t)
1192     ac_prev=target_alias ;;
1193   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1194     target_alias=$ac_optarg ;;
1195
1196   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1197     verbose=yes ;;
1198
1199   -version | --version | --versio | --versi | --vers | -V)
1200     ac_init_version=: ;;
1201
1202   -with-* | --with-*)
1203     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1204     # Reject names that are not valid shell variable names.
1205     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1206       as_fn_error $? "invalid package name: $ac_useropt"
1207     ac_useropt_orig=$ac_useropt
1208     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1209     case $ac_user_opts in
1210       *"
1211 "with_$ac_useropt"
1212 "*) ;;
1213       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1214          ac_unrecognized_sep=', ';;
1215     esac
1216     eval with_$ac_useropt=\$ac_optarg ;;
1217
1218   -without-* | --without-*)
1219     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1220     # Reject names that are not valid shell variable names.
1221     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1222       as_fn_error $? "invalid package name: $ac_useropt"
1223     ac_useropt_orig=$ac_useropt
1224     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1225     case $ac_user_opts in
1226       *"
1227 "with_$ac_useropt"
1228 "*) ;;
1229       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1230          ac_unrecognized_sep=', ';;
1231     esac
1232     eval with_$ac_useropt=no ;;
1233
1234   --x)
1235     # Obsolete; use --with-x.
1236     with_x=yes ;;
1237
1238   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1239   | --x-incl | --x-inc | --x-in | --x-i)
1240     ac_prev=x_includes ;;
1241   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1242   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1243     x_includes=$ac_optarg ;;
1244
1245   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1246   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1247     ac_prev=x_libraries ;;
1248   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1249   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1250     x_libraries=$ac_optarg ;;
1251
1252   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1253 Try \`$0 --help' for more information"
1254     ;;
1255
1256   *=*)
1257     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1258     # Reject names that are not valid shell variable names.
1259     case $ac_envvar in #(
1260       '' | [0-9]* | *[!_$as_cr_alnum]* )
1261       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1262     esac
1263     eval $ac_envvar=\$ac_optarg
1264     export $ac_envvar ;;
1265
1266   *)
1267     # FIXME: should be removed in autoconf 3.0.
1268     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1269     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1270       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1271     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1272     ;;
1273
1274   esac
1275 done
1276
1277 if test -n "$ac_prev"; then
1278   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1279   as_fn_error $? "missing argument to $ac_option"
1280 fi
1281
1282 if test -n "$ac_unrecognized_opts"; then
1283   case $enable_option_checking in
1284     no) ;;
1285     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1286     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1287   esac
1288 fi
1289
1290 # Check all directory arguments for consistency.
1291 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1292                 datadir sysconfdir sharedstatedir localstatedir includedir \
1293                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1294                 libdir localedir mandir
1295 do
1296   eval ac_val=\$$ac_var
1297   # Remove trailing slashes.
1298   case $ac_val in
1299     */ )
1300       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1301       eval $ac_var=\$ac_val;;
1302   esac
1303   # Be sure to have absolute directory names.
1304   case $ac_val in
1305     [\\/$]* | ?:[\\/]* )  continue;;
1306     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1307   esac
1308   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1309 done
1310
1311 # There might be people who depend on the old broken behavior: `$host'
1312 # used to hold the argument of --host etc.
1313 # FIXME: To remove some day.
1314 build=$build_alias
1315 host=$host_alias
1316 target=$target_alias
1317
1318 # FIXME: To remove some day.
1319 if test "x$host_alias" != x; then
1320   if test "x$build_alias" = x; then
1321     cross_compiling=maybe
1322   elif test "x$build_alias" != "x$host_alias"; then
1323     cross_compiling=yes
1324   fi
1325 fi
1326
1327 ac_tool_prefix=
1328 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1329
1330 test "$silent" = yes && exec 6>/dev/null
1331
1332
1333 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1334 ac_ls_di=`ls -di .` &&
1335 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1336   as_fn_error $? "working directory cannot be determined"
1337 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1338   as_fn_error $? "pwd does not report name of working directory"
1339
1340
1341 # Find the source files, if location was not specified.
1342 if test -z "$srcdir"; then
1343   ac_srcdir_defaulted=yes
1344   # Try the directory containing this script, then the parent directory.
1345   ac_confdir=`$as_dirname -- "$as_myself" ||
1346 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1347          X"$as_myself" : 'X\(//\)[^/]' \| \
1348          X"$as_myself" : 'X\(//\)$' \| \
1349          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1350 $as_echo X"$as_myself" |
1351     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1352             s//\1/
1353             q
1354           }
1355           /^X\(\/\/\)[^/].*/{
1356             s//\1/
1357             q
1358           }
1359           /^X\(\/\/\)$/{
1360             s//\1/
1361             q
1362           }
1363           /^X\(\/\).*/{
1364             s//\1/
1365             q
1366           }
1367           s/.*/./; q'`
1368   srcdir=$ac_confdir
1369   if test ! -r "$srcdir/$ac_unique_file"; then
1370     srcdir=..
1371   fi
1372 else
1373   ac_srcdir_defaulted=no
1374 fi
1375 if test ! -r "$srcdir/$ac_unique_file"; then
1376   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1377   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1378 fi
1379 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1380 ac_abs_confdir=`(
1381         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1382         pwd)`
1383 # When building in place, set srcdir=.
1384 if test "$ac_abs_confdir" = "$ac_pwd"; then
1385   srcdir=.
1386 fi
1387 # Remove unnecessary trailing slashes from srcdir.
1388 # Double slashes in file names in object file debugging info
1389 # mess up M-x gdb in Emacs.
1390 case $srcdir in
1391 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1392 esac
1393 for ac_var in $ac_precious_vars; do
1394   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1395   eval ac_env_${ac_var}_value=\$${ac_var}
1396   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1397   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1398 done
1399
1400 #
1401 # Report the --help message.
1402 #
1403 if test "$ac_init_help" = "long"; then
1404   # Omit some internal or obsolete options to make the list less imposing.
1405   # This message is too long to be a string in the A/UX 3.1 sh.
1406   cat <<_ACEOF
1407 \`configure' configures this package to adapt to many kinds of systems.
1408
1409 Usage: $0 [OPTION]... [VAR=VALUE]...
1410
1411 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1412 VAR=VALUE.  See below for descriptions of some of the useful variables.
1413
1414 Defaults for the options are specified in brackets.
1415
1416
1417 Configuration:
1418
1419   -h, --help              display this help and exit
1420       --help=short        display options specific to this package
1421       --help=recursive    display the short help of all the included packages
1422   -V, --version           display version information and exit
1423   -q, --quiet, --silent   do not print \`checking ...' messages
1424       --cache-file=FILE   cache test results in FILE [disabled]
1425   -C, --config-cache      alias for \`--cache-file=config.cache'
1426   -n, --no-create         do not create output files
1427       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1428
1429 Installation directories:
1430   --prefix=PREFIX         install architecture-independent files in PREFIX
1431                           [$ac_default_prefix]
1432   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1433                           [PREFIX]
1434
1435 By default, \`make install' will install all the files in
1436 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1437 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438 for instance \`--prefix=\$HOME'.
1439
1440 For better control, use the options below.
1441
1442 Fine tuning of the installation directories:
1443   --bindir=DIR            user executables [EPREFIX/bin]
1444   --libexecdir=DIR        program executables [EPREFIX/libexec]
1445   --libdir=DIR            object code libraries [EPREFIX/lib]
1446   --includedir=DIR        C header files [PREFIX/include]
1447   --x-includes=DIR        X include files are in DIR
1448   --x-libraries=DIR       X library files are in DIR
1449   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1450   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1451   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1452   --mandir=DIR            man documentation [DATAROOTDIR/man]
1453   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1454   --htmldir=DIR           html documentation [DOCDIR]
1455   --dvidir=DIR            dvi documentation [DOCDIR]
1456   --pdfdir=DIR            pdf documentation [DOCDIR]
1457   --psdir=DIR             ps documentation [DOCDIR]
1458 _ACEOF
1459
1460   cat <<\_ACEOF
1461
1462 X features:
1463   --x-includes=DIR    X include files are in DIR
1464   --x-libraries=DIR   X library files are in DIR
1465
1466 System types:
1467   --build=BUILD     configure for building on BUILD [guessed]
1468   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1469 _ACEOF
1470 fi
1471
1472 if test -n "$ac_init_help"; then
1473
1474   cat <<\_ACEOF
1475
1476 Optional Features:
1477   --disable-option-checking  ignore unrecognized --enable/--with options
1478   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1479   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1480   --disable-largefile     omit support for large files
1481   --disable-nls           do not use Native Language Support
1482
1483 Screen locking options:
1484   --enable-locking        Compile in support for locking the display.
1485   --disable-locking       Do not allow locking at all.
1486
1487   --enable-root-passwd        Allow root passwd to unlock screen.
1488   --disable-root-passwd       Do not allow that.
1489   --enable-pam-check-account-type
1490                           Whether PAM should check the result of account
1491                           modules when authenticating. Only do this if you
1492                           have account configured properly on your system.
1493
1494 Optional Packages:
1495   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1496   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1497
1498   --with-pthread          Enables POSIX threads, for SMP support.
1499
1500 Installation options:
1501   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1502                           Default: `PREFIX/libexec/xscreensaver/'
1503   --with-configdir=DIR    Where to install the data files that describe each
1504                           of the display modes to the GUI.
1505                           Default: `PREFIX/share/xscreensaver/config/'
1506   --with-x-app-defaults=DIR
1507                            Where to install xscreensaver configuration file.
1508
1509   --with-dpms-ext         Include support for the DPMS extension.
1510   --with-xinerama-ext     Include support for the XINERAMA extension.
1511   --with-xinput-ext       Include support for the XInput extension.
1512   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1513   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1514   --with-randr-ext        Include support for the X Resize+Rotate extension.
1515   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1516                           file to notice keyboard activity.
1517   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1518   --with-pam-service-name NAME arg is the name of the PAM service that
1519                           xscreensaver will authenticate as.
1520   --with-kerberos         Include support for Kerberos authentication.
1521   --with-shadow           Include support for shadow password authentication.
1522   --with-passwd-helper    Include support for an external password
1523                           verification helper program.
1524   --with-login-manager    Put a "New Login" button on the unlock dialog that
1525                           runs a login manager like gdmflexiserver or kdmctl.
1526
1527 User interface options:
1528
1529   --with-gtk              Use the Gtk toolkit for the user interface.
1530   --with-motif            Use the Motif toolkit for the user interface
1531                           (no longer supported.)
1532
1533 Graphics options:
1534
1535   --with-gl               Build those demos which depend on OpenGL.
1536   --with-gle              Build those demos which depend on GLE
1537                           (the OpenGL "extrusion" library.)
1538   --with-gles             Target OpenGL ES 1.x API instead of OpenGL 1.3.
1539   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1540                           demos, which will make it possible for them to read
1541                           GIF, JPEG, and PNG files as well.
1542   --with-xpm              Include support for XPM files in some demos.
1543                           (Not needed if Pixbuf is used.)
1544   --with-jpeg             Include support for the JPEG library.
1545   --with-xshm-ext         Include support for the Shared Memory extension.
1546   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1547   --with-readdisplay      Include support for the XReadDisplay extension.
1548   --with-image-directory  Arg is the default directory from which some demos
1549                           will choose random images to display.
1550   --with-text-file=FILE   By default, some demos may display this file.
1551   --with-browser=BROWSER  Specify the web browser used to show the help URL.
1552   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1553                           (which is needed in order to ping other hosts.)
1554
1555
1556 Some influential environment variables:
1557   CC          C compiler command
1558   CFLAGS      C compiler flags
1559   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1560               nonstandard directory <lib dir>
1561   LIBS        libraries to pass to the linker, e.g. -l<library>
1562   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1563               you have headers in a nonstandard directory <include dir>
1564   CPP         C preprocessor
1565   XMKMF       Path to xmkmf, Makefile generator for X Window System
1566
1567 Use these variables to override the choices made by `configure' or to help
1568 it to find libraries and programs with nonstandard names/locations.
1569
1570 Report bugs to the package provider.
1571 _ACEOF
1572 ac_status=$?
1573 fi
1574
1575 if test "$ac_init_help" = "recursive"; then
1576   # If there are subdirs, report their specific --help.
1577   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1578     test -d "$ac_dir" ||
1579       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1580       continue
1581     ac_builddir=.
1582
1583 case "$ac_dir" in
1584 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585 *)
1586   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1587   # A ".." for each directory in $ac_dir_suffix.
1588   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1589   case $ac_top_builddir_sub in
1590   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1591   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1592   esac ;;
1593 esac
1594 ac_abs_top_builddir=$ac_pwd
1595 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1596 # for backward compatibility:
1597 ac_top_builddir=$ac_top_build_prefix
1598
1599 case $srcdir in
1600   .)  # We are building in place.
1601     ac_srcdir=.
1602     ac_top_srcdir=$ac_top_builddir_sub
1603     ac_abs_top_srcdir=$ac_pwd ;;
1604   [\\/]* | ?:[\\/]* )  # Absolute name.
1605     ac_srcdir=$srcdir$ac_dir_suffix;
1606     ac_top_srcdir=$srcdir
1607     ac_abs_top_srcdir=$srcdir ;;
1608   *) # Relative name.
1609     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1610     ac_top_srcdir=$ac_top_build_prefix$srcdir
1611     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1612 esac
1613 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1614
1615     cd "$ac_dir" || { ac_status=$?; continue; }
1616     # Check for guested configure.
1617     if test -f "$ac_srcdir/configure.gnu"; then
1618       echo &&
1619       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1620     elif test -f "$ac_srcdir/configure"; then
1621       echo &&
1622       $SHELL "$ac_srcdir/configure" --help=recursive
1623     else
1624       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1625     fi || ac_status=$?
1626     cd "$ac_pwd" || { ac_status=$?; break; }
1627   done
1628 fi
1629
1630 test -n "$ac_init_help" && exit $ac_status
1631 if $ac_init_version; then
1632   cat <<\_ACEOF
1633 configure
1634 generated by GNU Autoconf 2.69
1635
1636 Copyright (C) 2012 Free Software Foundation, Inc.
1637 This configure script is free software; the Free Software Foundation
1638 gives unlimited permission to copy, distribute and modify it.
1639 _ACEOF
1640   exit
1641 fi
1642
1643 ## ------------------------ ##
1644 ## Autoconf initialization. ##
1645 ## ------------------------ ##
1646
1647 # ac_fn_c_try_compile LINENO
1648 # --------------------------
1649 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1650 ac_fn_c_try_compile ()
1651 {
1652   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1653   rm -rf conftest.$ac_objext
1654   if { { ac_try="$ac_compile"
1655 case "(($ac_try" in
1656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1657   *) ac_try_echo=$ac_try;;
1658 esac
1659 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1660 $as_echo "$ac_try_echo"; } >&5
1661   (eval "$ac_compile") 2>conftest.err
1662   ac_status=$?
1663   if test -s conftest.err; then
1664     grep -v '^ *+' conftest.err >conftest.er1
1665     cat conftest.er1 >&5
1666     mv -f conftest.er1 conftest.err
1667   fi
1668   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1669   test $ac_status = 0; } && {
1670          test -z "$ac_c_werror_flag" ||
1671          test ! -s conftest.err
1672        } && test -s conftest.$ac_objext; then :
1673   ac_retval=0
1674 else
1675   $as_echo "$as_me: failed program was:" >&5
1676 sed 's/^/| /' conftest.$ac_ext >&5
1677
1678         ac_retval=1
1679 fi
1680   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1681   as_fn_set_status $ac_retval
1682
1683 } # ac_fn_c_try_compile
1684
1685 # ac_fn_c_try_link LINENO
1686 # -----------------------
1687 # Try to link conftest.$ac_ext, and return whether this succeeded.
1688 ac_fn_c_try_link ()
1689 {
1690   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691   rm -rf conftest.$ac_objext conftest$ac_exeext
1692   if { { ac_try="$ac_link"
1693 case "(($ac_try" in
1694   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695   *) ac_try_echo=$ac_try;;
1696 esac
1697 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698 $as_echo "$ac_try_echo"; } >&5
1699   (eval "$ac_link") 2>conftest.err
1700   ac_status=$?
1701   if test -s conftest.err; then
1702     grep -v '^ *+' conftest.err >conftest.er1
1703     cat conftest.er1 >&5
1704     mv -f conftest.er1 conftest.err
1705   fi
1706   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707   test $ac_status = 0; } && {
1708          test -z "$ac_c_werror_flag" ||
1709          test ! -s conftest.err
1710        } && test -s conftest$ac_exeext && {
1711          test "$cross_compiling" = yes ||
1712          test -x conftest$ac_exeext
1713        }; then :
1714   ac_retval=0
1715 else
1716   $as_echo "$as_me: failed program was:" >&5
1717 sed 's/^/| /' conftest.$ac_ext >&5
1718
1719         ac_retval=1
1720 fi
1721   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1722   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1723   # interfere with the next link command; also delete a directory that is
1724   # left behind by Apple's compiler.  We do this before executing the actions.
1725   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1726   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1727   as_fn_set_status $ac_retval
1728
1729 } # ac_fn_c_try_link
1730
1731 # ac_fn_c_try_run LINENO
1732 # ----------------------
1733 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1734 # that executables *can* be run.
1735 ac_fn_c_try_run ()
1736 {
1737   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1738   if { { ac_try="$ac_link"
1739 case "(($ac_try" in
1740   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1741   *) ac_try_echo=$ac_try;;
1742 esac
1743 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1744 $as_echo "$ac_try_echo"; } >&5
1745   (eval "$ac_link") 2>&5
1746   ac_status=$?
1747   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1748   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1749   { { case "(($ac_try" in
1750   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1751   *) ac_try_echo=$ac_try;;
1752 esac
1753 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1754 $as_echo "$ac_try_echo"; } >&5
1755   (eval "$ac_try") 2>&5
1756   ac_status=$?
1757   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1758   test $ac_status = 0; }; }; then :
1759   ac_retval=0
1760 else
1761   $as_echo "$as_me: program exited with status $ac_status" >&5
1762        $as_echo "$as_me: failed program was:" >&5
1763 sed 's/^/| /' conftest.$ac_ext >&5
1764
1765        ac_retval=$ac_status
1766 fi
1767   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1768   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1769   as_fn_set_status $ac_retval
1770
1771 } # ac_fn_c_try_run
1772
1773 # ac_fn_c_try_cpp LINENO
1774 # ----------------------
1775 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1776 ac_fn_c_try_cpp ()
1777 {
1778   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1779   if { { ac_try="$ac_cpp conftest.$ac_ext"
1780 case "(($ac_try" in
1781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782   *) ac_try_echo=$ac_try;;
1783 esac
1784 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785 $as_echo "$ac_try_echo"; } >&5
1786   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1787   ac_status=$?
1788   if test -s conftest.err; then
1789     grep -v '^ *+' conftest.err >conftest.er1
1790     cat conftest.er1 >&5
1791     mv -f conftest.er1 conftest.err
1792   fi
1793   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794   test $ac_status = 0; } > conftest.i && {
1795          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1796          test ! -s conftest.err
1797        }; then :
1798   ac_retval=0
1799 else
1800   $as_echo "$as_me: failed program was:" >&5
1801 sed 's/^/| /' conftest.$ac_ext >&5
1802
1803     ac_retval=1
1804 fi
1805   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1806   as_fn_set_status $ac_retval
1807
1808 } # ac_fn_c_try_cpp
1809
1810 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1811 # -------------------------------------------------------
1812 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1813 # the include files in INCLUDES and setting the cache variable VAR
1814 # accordingly.
1815 ac_fn_c_check_header_mongrel ()
1816 {
1817   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818   if eval \${$3+:} false; then :
1819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820 $as_echo_n "checking for $2... " >&6; }
1821 if eval \${$3+:} false; then :
1822   $as_echo_n "(cached) " >&6
1823 fi
1824 eval ac_res=\$$3
1825                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1826 $as_echo "$ac_res" >&6; }
1827 else
1828   # Is the header compilable?
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1830 $as_echo_n "checking $2 usability... " >&6; }
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832 /* end confdefs.h.  */
1833 $4
1834 #include <$2>
1835 _ACEOF
1836 if ac_fn_c_try_compile "$LINENO"; then :
1837   ac_header_compiler=yes
1838 else
1839   ac_header_compiler=no
1840 fi
1841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1843 $as_echo "$ac_header_compiler" >&6; }
1844
1845 # Is the header present?
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1847 $as_echo_n "checking $2 presence... " >&6; }
1848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1849 /* end confdefs.h.  */
1850 #include <$2>
1851 _ACEOF
1852 if ac_fn_c_try_cpp "$LINENO"; then :
1853   ac_header_preproc=yes
1854 else
1855   ac_header_preproc=no
1856 fi
1857 rm -rf conftest.err conftest.i conftest.$ac_ext
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1859 $as_echo "$ac_header_preproc" >&6; }
1860
1861 # So?  What about this header?
1862 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1863   yes:no: )
1864     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1865 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1866     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868     ;;
1869   no:yes:* )
1870     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1871 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1872     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1873 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1874     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1875 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1876     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1877 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1878     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1879 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1880     ;;
1881 esac
1882   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1883 $as_echo_n "checking for $2... " >&6; }
1884 if eval \${$3+:} false; then :
1885   $as_echo_n "(cached) " >&6
1886 else
1887   eval "$3=\$ac_header_compiler"
1888 fi
1889 eval ac_res=\$$3
1890                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891 $as_echo "$ac_res" >&6; }
1892 fi
1893   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1894
1895 } # ac_fn_c_check_header_mongrel
1896
1897 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1898 # -------------------------------------------------------
1899 # Tests whether HEADER exists and can be compiled using the include files in
1900 # INCLUDES, setting the cache variable VAR accordingly.
1901 ac_fn_c_check_header_compile ()
1902 {
1903   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1905 $as_echo_n "checking for $2... " >&6; }
1906 if eval \${$3+:} false; then :
1907   $as_echo_n "(cached) " >&6
1908 else
1909   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1910 /* end confdefs.h.  */
1911 $4
1912 #include <$2>
1913 _ACEOF
1914 if ac_fn_c_try_compile "$LINENO"; then :
1915   eval "$3=yes"
1916 else
1917   eval "$3=no"
1918 fi
1919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1920 fi
1921 eval ac_res=\$$3
1922                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923 $as_echo "$ac_res" >&6; }
1924   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1925
1926 } # ac_fn_c_check_header_compile
1927
1928 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1929 # -------------------------------------------
1930 # Tests whether TYPE exists after having included INCLUDES, setting cache
1931 # variable VAR accordingly.
1932 ac_fn_c_check_type ()
1933 {
1934   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936 $as_echo_n "checking for $2... " >&6; }
1937 if eval \${$3+:} false; then :
1938   $as_echo_n "(cached) " >&6
1939 else
1940   eval "$3=no"
1941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942 /* end confdefs.h.  */
1943 $4
1944 int
1945 main ()
1946 {
1947 if (sizeof ($2))
1948          return 0;
1949   ;
1950   return 0;
1951 }
1952 _ACEOF
1953 if ac_fn_c_try_compile "$LINENO"; then :
1954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955 /* end confdefs.h.  */
1956 $4
1957 int
1958 main ()
1959 {
1960 if (sizeof (($2)))
1961             return 0;
1962   ;
1963   return 0;
1964 }
1965 _ACEOF
1966 if ac_fn_c_try_compile "$LINENO"; then :
1967
1968 else
1969   eval "$3=yes"
1970 fi
1971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972 fi
1973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974 fi
1975 eval ac_res=\$$3
1976                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977 $as_echo "$ac_res" >&6; }
1978   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1979
1980 } # ac_fn_c_check_type
1981
1982 # ac_fn_c_check_func LINENO FUNC VAR
1983 # ----------------------------------
1984 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1985 ac_fn_c_check_func ()
1986 {
1987   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1989 $as_echo_n "checking for $2... " >&6; }
1990 if eval \${$3+:} false; then :
1991   $as_echo_n "(cached) " >&6
1992 else
1993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1994 /* end confdefs.h.  */
1995 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1996    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1997 #define $2 innocuous_$2
1998
1999 /* System header to define __stub macros and hopefully few prototypes,
2000     which can conflict with char $2 (); below.
2001     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2002     <limits.h> exists even on freestanding compilers.  */
2003
2004 #ifdef __STDC__
2005 # include <limits.h>
2006 #else
2007 # include <assert.h>
2008 #endif
2009
2010 #undef $2
2011
2012 /* Override any GCC internal prototype to avoid an error.
2013    Use char because int might match the return type of a GCC
2014    builtin and then its argument prototype would still apply.  */
2015 #ifdef __cplusplus
2016 extern "C"
2017 #endif
2018 char $2 ();
2019 /* The GNU C library defines this for functions which it implements
2020     to always fail with ENOSYS.  Some functions are actually named
2021     something starting with __ and the normal name is an alias.  */
2022 #if defined __stub_$2 || defined __stub___$2
2023 choke me
2024 #endif
2025
2026 int
2027 main ()
2028 {
2029 return $2 ();
2030   ;
2031   return 0;
2032 }
2033 _ACEOF
2034 if ac_fn_c_try_link "$LINENO"; then :
2035   eval "$3=yes"
2036 else
2037   eval "$3=no"
2038 fi
2039 rm -f core conftest.err conftest.$ac_objext \
2040     conftest$ac_exeext conftest.$ac_ext
2041 fi
2042 eval ac_res=\$$3
2043                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2044 $as_echo "$ac_res" >&6; }
2045   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2046
2047 } # ac_fn_c_check_func
2048 cat >config.log <<_ACEOF
2049 This file contains any messages produced by compilers while
2050 running configure, to aid debugging if configure makes a mistake.
2051
2052 It was created by $as_me, which was
2053 generated by GNU Autoconf 2.69.  Invocation command line was
2054
2055   $ $0 $@
2056
2057 _ACEOF
2058 exec 5>>config.log
2059 {
2060 cat <<_ASUNAME
2061 ## --------- ##
2062 ## Platform. ##
2063 ## --------- ##
2064
2065 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2066 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2067 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2068 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2069 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2070
2071 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2072 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2073
2074 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2075 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2076 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2077 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2078 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2079 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2080 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2081
2082 _ASUNAME
2083
2084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2085 for as_dir in $PATH
2086 do
2087   IFS=$as_save_IFS
2088   test -z "$as_dir" && as_dir=.
2089     $as_echo "PATH: $as_dir"
2090   done
2091 IFS=$as_save_IFS
2092
2093 } >&5
2094
2095 cat >&5 <<_ACEOF
2096
2097
2098 ## ----------- ##
2099 ## Core tests. ##
2100 ## ----------- ##
2101
2102 _ACEOF
2103
2104
2105 # Keep a trace of the command line.
2106 # Strip out --no-create and --no-recursion so they do not pile up.
2107 # Strip out --silent because we don't want to record it for future runs.
2108 # Also quote any args containing shell meta-characters.
2109 # Make two passes to allow for proper duplicate-argument suppression.
2110 ac_configure_args=
2111 ac_configure_args0=
2112 ac_configure_args1=
2113 ac_must_keep_next=false
2114 for ac_pass in 1 2
2115 do
2116   for ac_arg
2117   do
2118     case $ac_arg in
2119     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2120     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2121     | -silent | --silent | --silen | --sile | --sil)
2122       continue ;;
2123     *\'*)
2124       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2125     esac
2126     case $ac_pass in
2127     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2128     2)
2129       as_fn_append ac_configure_args1 " '$ac_arg'"
2130       if test $ac_must_keep_next = true; then
2131         ac_must_keep_next=false # Got value, back to normal.
2132       else
2133         case $ac_arg in
2134           *=* | --config-cache | -C | -disable-* | --disable-* \
2135           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2136           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2137           | -with-* | --with-* | -without-* | --without-* | --x)
2138             case "$ac_configure_args0 " in
2139               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2140             esac
2141             ;;
2142           -* ) ac_must_keep_next=true ;;
2143         esac
2144       fi
2145       as_fn_append ac_configure_args " '$ac_arg'"
2146       ;;
2147     esac
2148   done
2149 done
2150 { ac_configure_args0=; unset ac_configure_args0;}
2151 { ac_configure_args1=; unset ac_configure_args1;}
2152
2153 # When interrupted or exit'd, cleanup temporary files, and complete
2154 # config.log.  We remove comments because anyway the quotes in there
2155 # would cause problems or look ugly.
2156 # WARNING: Use '\'' to represent an apostrophe within the trap.
2157 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2158 trap 'exit_status=$?
2159   # Save into config.log some information that might help in debugging.
2160   {
2161     echo
2162
2163     $as_echo "## ---------------- ##
2164 ## Cache variables. ##
2165 ## ---------------- ##"
2166     echo
2167     # The following way of writing the cache mishandles newlines in values,
2168 (
2169   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2170     eval ac_val=\$$ac_var
2171     case $ac_val in #(
2172     *${as_nl}*)
2173       case $ac_var in #(
2174       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2175 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2176       esac
2177       case $ac_var in #(
2178       _ | IFS | as_nl) ;; #(
2179       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2180       *) { eval $ac_var=; unset $ac_var;} ;;
2181       esac ;;
2182     esac
2183   done
2184   (set) 2>&1 |
2185     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2186     *${as_nl}ac_space=\ *)
2187       sed -n \
2188         "s/'\''/'\''\\\\'\'''\''/g;
2189           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2190       ;; #(
2191     *)
2192       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2193       ;;
2194     esac |
2195     sort
2196 )
2197     echo
2198
2199     $as_echo "## ----------------- ##
2200 ## Output variables. ##
2201 ## ----------------- ##"
2202     echo
2203     for ac_var in $ac_subst_vars
2204     do
2205       eval ac_val=\$$ac_var
2206       case $ac_val in
2207       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2208       esac
2209       $as_echo "$ac_var='\''$ac_val'\''"
2210     done | sort
2211     echo
2212
2213     if test -n "$ac_subst_files"; then
2214       $as_echo "## ------------------- ##
2215 ## File substitutions. ##
2216 ## ------------------- ##"
2217       echo
2218       for ac_var in $ac_subst_files
2219       do
2220         eval ac_val=\$$ac_var
2221         case $ac_val in
2222         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2223         esac
2224         $as_echo "$ac_var='\''$ac_val'\''"
2225       done | sort
2226       echo
2227     fi
2228
2229     if test -s confdefs.h; then
2230       $as_echo "## ----------- ##
2231 ## confdefs.h. ##
2232 ## ----------- ##"
2233       echo
2234       cat confdefs.h
2235       echo
2236     fi
2237     test "$ac_signal" != 0 &&
2238       $as_echo "$as_me: caught signal $ac_signal"
2239     $as_echo "$as_me: exit $exit_status"
2240   } >&5
2241   rm -f core *.core core.conftest.* &&
2242     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2243     exit $exit_status
2244 ' 0
2245 for ac_signal in 1 2 13 15; do
2246   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2247 done
2248 ac_signal=0
2249
2250 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2251 rm -f -r conftest* confdefs.h
2252
2253 $as_echo "/* confdefs.h */" > confdefs.h
2254
2255 # Predefined preprocessor variables.
2256
2257 cat >>confdefs.h <<_ACEOF
2258 #define PACKAGE_NAME "$PACKAGE_NAME"
2259 _ACEOF
2260
2261 cat >>confdefs.h <<_ACEOF
2262 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2263 _ACEOF
2264
2265 cat >>confdefs.h <<_ACEOF
2266 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2267 _ACEOF
2268
2269 cat >>confdefs.h <<_ACEOF
2270 #define PACKAGE_STRING "$PACKAGE_STRING"
2271 _ACEOF
2272
2273 cat >>confdefs.h <<_ACEOF
2274 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2275 _ACEOF
2276
2277 cat >>confdefs.h <<_ACEOF
2278 #define PACKAGE_URL "$PACKAGE_URL"
2279 _ACEOF
2280
2281
2282 # Let the site file select an alternate cache file if it wants to.
2283 # Prefer an explicitly selected file to automatically selected ones.
2284 ac_site_file1=NONE
2285 ac_site_file2=NONE
2286 if test -n "$CONFIG_SITE"; then
2287   # We do not want a PATH search for config.site.
2288   case $CONFIG_SITE in #((
2289     -*)  ac_site_file1=./$CONFIG_SITE;;
2290     */*) ac_site_file1=$CONFIG_SITE;;
2291     *)   ac_site_file1=./$CONFIG_SITE;;
2292   esac
2293 elif test "x$prefix" != xNONE; then
2294   ac_site_file1=$prefix/share/config.site
2295   ac_site_file2=$prefix/etc/config.site
2296 else
2297   ac_site_file1=$ac_default_prefix/share/config.site
2298   ac_site_file2=$ac_default_prefix/etc/config.site
2299 fi
2300 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2301 do
2302   test "x$ac_site_file" = xNONE && continue
2303   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2304     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2305 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2306     sed 's/^/| /' "$ac_site_file" >&5
2307     . "$ac_site_file" \
2308       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2309 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2310 as_fn_error $? "failed to load site script $ac_site_file
2311 See \`config.log' for more details" "$LINENO" 5; }
2312   fi
2313 done
2314
2315 if test -r "$cache_file"; then
2316   # Some versions of bash will fail to source /dev/null (special files
2317   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2318   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2319     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2320 $as_echo "$as_me: loading cache $cache_file" >&6;}
2321     case $cache_file in
2322       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2323       *)                      . "./$cache_file";;
2324     esac
2325   fi
2326 else
2327   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2328 $as_echo "$as_me: creating cache $cache_file" >&6;}
2329   >$cache_file
2330 fi
2331
2332 # Check that the precious variables saved in the cache have kept the same
2333 # value.
2334 ac_cache_corrupted=false
2335 for ac_var in $ac_precious_vars; do
2336   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2337   eval ac_new_set=\$ac_env_${ac_var}_set
2338   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2339   eval ac_new_val=\$ac_env_${ac_var}_value
2340   case $ac_old_set,$ac_new_set in
2341     set,)
2342       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2343 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2344       ac_cache_corrupted=: ;;
2345     ,set)
2346       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2347 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2348       ac_cache_corrupted=: ;;
2349     ,);;
2350     *)
2351       if test "x$ac_old_val" != "x$ac_new_val"; then
2352         # differences in whitespace do not lead to failure.
2353         ac_old_val_w=`echo x $ac_old_val`
2354         ac_new_val_w=`echo x $ac_new_val`
2355         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2356           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2357 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2358           ac_cache_corrupted=:
2359         else
2360           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2361 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2362           eval $ac_var=\$ac_old_val
2363         fi
2364         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2365 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2366         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2367 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2368       fi;;
2369   esac
2370   # Pass precious variables to config.status.
2371   if test "$ac_new_set" = set; then
2372     case $ac_new_val in
2373     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2374     *) ac_arg=$ac_var=$ac_new_val ;;
2375     esac
2376     case " $ac_configure_args " in
2377       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2378       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2379     esac
2380   fi
2381 done
2382 if $ac_cache_corrupted; then
2383   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2384 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2385   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2386 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2387   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2388 fi
2389 ## -------------------- ##
2390 ## Main body of script. ##
2391 ## -------------------- ##
2392
2393 ac_ext=c
2394 ac_cpp='$CPP $CPPFLAGS'
2395 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2396 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2397 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2398
2399
2400 ac_config_headers="$ac_config_headers config.h"
2401
2402
2403 echo "current directory: `pwd`"
2404 echo "command line was: $0 $@"
2405
2406 ###############################################################################
2407 #
2408 #       Autoheader stuff
2409 #
2410 ###############################################################################
2411
2412
2413
2414
2415
2416
2417
2418 # This only ever existed in X11R4 and X11R5.
2419 #AH_TEMPLATE([HAVE_XIDLE_EXTENSION],
2420 #           [Define this if you have the XIDLE extension installed. If you
2421 #           have the XIDLE extension, this is recommended.  (You have this
2422 #           extension if the file /usr/include/X11/extensions/xidle.h
2423 #           exists.) Turning on this flag lets XScreenSaver work better with
2424 #           servers which support this extension; but it will still work
2425 #           with servers which do not suport it, so it's a good idea to
2426 #           compile in support for it if you can.])
2427
2428 # Using this extension will crash your X server and make fading not work.
2429 #AH_TEMPLATE([HAVE_MIT_SAVER_EXTENSION],
2430 #           [Define this if you have the MIT-SCREEN-SAVER extension
2431 #            installed.  See the caveats about this extension, above.
2432 #            (It's available if /usr/include/X11/extensions/scrnsaver.h
2433 #            exists.)])
2434
2435 # This only ever existed on SGI hardware.
2436 #AH_TEMPLATE([HAVE_SGI_SAVER_EXTENSION],
2437 #           [Define this if you have the SGI SCREEN_SAVER extension.  This is
2438 #           standard on Irix systems, and not available elsewhere.])
2439
2440 # This only ever existed on SGI hardware.
2441 #AH_TEMPLATE([HAVE_SGI_VC_EXTENSION],
2442 #           [Define this if you have the SGI-VIDEO-CONTROL extension.  This
2443 #           is standard on Irix systems, and not available elsewhere.])
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558 # After checking to see that --srcdir is correct (which AC_INIT does)
2559 # check for some random other files that come later in the tar file,
2560 # to make sure everything is here.
2561 #
2562 for d in driver utils hacks hacks/glx ; do
2563   f=$srcdir/$d/Makefile.in
2564   if test \! -r $f ; then
2565     echo ""
2566     echo "ERROR: The package is incomplete: $f does not exist."
2567     echo "       This probably means that your download was truncated."
2568     echo ""
2569     exit 1
2570   fi
2571 done
2572
2573 ###############################################################################
2574 #
2575 #       Query AX_PTHREAD, and figure out which compiler gets used.
2576 #
2577 ###############################################################################
2578
2579
2580
2581
2582 ###############################################################################
2583 #
2584 #       Function to figure out how to run the compiler.
2585 #
2586 ###############################################################################
2587
2588
2589
2590
2591 ###############################################################################
2592 #
2593 #       Check for availability of various gcc command-line options.
2594 #
2595 ###############################################################################
2596
2597
2598
2599
2600
2601
2602
2603 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2604 # around an Apple-specific gcc bug.
2605 #
2606
2607
2608 ###############################################################################
2609 #
2610 #       Function to figure out how to disable // comments in ANSI C code.
2611 #
2612 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2613 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2614 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2615 #       so much for compatibility!)
2616 #
2617 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2618 #       declarations preceed statements, without resorting to "-pedantic".
2619 #       This means that there is no way to get gcc3 to issue warnings that
2620 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2621 #       also drowning in totally useless warnings.  Thank you master may I
2622 #       have another.
2623 #
2624 #       So, I give up, let's just use -pedantic.
2625 #
2626 ###############################################################################
2627
2628
2629
2630
2631
2632
2633 ###############################################################################
2634 #
2635 #       Function to figure out how to create directory trees.
2636 #
2637 ###############################################################################
2638
2639
2640
2641
2642 ###############################################################################
2643 #
2644 #       Function to check whether gettimeofday() exists, and how to call it.
2645 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2646 #
2647 ###############################################################################
2648
2649
2650
2651
2652 ###############################################################################
2653 #
2654 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2655 #
2656 ###############################################################################
2657
2658 # M4 sucks!!  perl sucks too!!
2659
2660 perl_version_cmd='print $]'
2661
2662
2663
2664
2665
2666 ###############################################################################
2667 #
2668 #       Function to demand "bc".  Losers.
2669 #
2670 ###############################################################################
2671
2672
2673
2674 ###############################################################################
2675 #
2676 #       Functions to check how to do ICMP PING requests.
2677 #
2678 ###############################################################################
2679
2680
2681
2682
2683
2684
2685 ###############################################################################
2686 #
2687 #       Functions to check for various X11 crap.
2688 #
2689 ###############################################################################
2690
2691 # Try and find the app-defaults directory.
2692 # It sucks that autoconf doesn't do this already...
2693 #
2694
2695
2696 ###############################################################################
2697 #
2698 #       Handle the --with-x-app-defaults option HERE
2699 #
2700 ###############################################################################
2701
2702
2703 # Check whether --with-x-app-defaults was given.
2704 if test "${with_x_app_defaults+set}" = set; then :
2705   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2706 else
2707   eval ac_x_app_defaults="$withval"
2708 fi
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720 # Random special-cases for X on certain pathological OSes.
2721 # You know who you are.
2722 #
2723
2724
2725
2726
2727
2728 ###############################################################################
2729 #
2730 #       Some utility functions to make checking for X things easier.
2731 #
2732 ###############################################################################
2733
2734 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2735 #
2736
2737
2738 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2739 #
2740
2741
2742 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2743 #
2744
2745
2746
2747 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2748 # Use this sparingly; it probably doesn't work very well on X programs.
2749 #
2750
2751
2752 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2753 # (But not the -L directories!)
2754 #
2755
2756
2757
2758
2759 # Usage: HANDLE_X_PATH_ARG([variable_name],
2760 #                          [--command-line-option],
2761 #                          [descriptive string])
2762 #
2763 # All of the --with options take three forms:
2764 #
2765 #   --with-foo (or --with-foo=yes)
2766 #   --without-foo (or --with-foo=no)
2767 #   --with-foo=/DIR
2768 #
2769 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2770 # a directory (string beginning with a slash) it checks to see whether
2771 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2772 # as appropriate.
2773 #
2774
2775
2776
2777
2778 ###############################################################################
2779 ###############################################################################
2780 #
2781 #       End of function definitions.  Now start actually executing stuff.
2782 #
2783 ###############################################################################
2784 ###############################################################################
2785
2786 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2787 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2788 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2789
2790
2791 # random compiler setup
2792 ac_aux_dir=
2793 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2794   if test -f "$ac_dir/install-sh"; then
2795     ac_aux_dir=$ac_dir
2796     ac_install_sh="$ac_aux_dir/install-sh -c"
2797     break
2798   elif test -f "$ac_dir/install.sh"; then
2799     ac_aux_dir=$ac_dir
2800     ac_install_sh="$ac_aux_dir/install.sh -c"
2801     break
2802   elif test -f "$ac_dir/shtool"; then
2803     ac_aux_dir=$ac_dir
2804     ac_install_sh="$ac_aux_dir/shtool install -c"
2805     break
2806   fi
2807 done
2808 if test -z "$ac_aux_dir"; then
2809   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2810 fi
2811
2812 # These three variables are undocumented and unsupported,
2813 # and are intended to be withdrawn in a future Autoconf release.
2814 # They can cause serious problems if a builder's source tree is in a directory
2815 # whose full name contains unusual characters.
2816 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2817 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2818 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2819
2820
2821 # Make sure we can run config.sub.
2822 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2823   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2824
2825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2826 $as_echo_n "checking build system type... " >&6; }
2827 if ${ac_cv_build+:} false; then :
2828   $as_echo_n "(cached) " >&6
2829 else
2830   ac_build_alias=$build_alias
2831 test "x$ac_build_alias" = x &&
2832   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2833 test "x$ac_build_alias" = x &&
2834   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2835 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2836   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2837
2838 fi
2839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2840 $as_echo "$ac_cv_build" >&6; }
2841 case $ac_cv_build in
2842 *-*-*) ;;
2843 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2844 esac
2845 build=$ac_cv_build
2846 ac_save_IFS=$IFS; IFS='-'
2847 set x $ac_cv_build
2848 shift
2849 build_cpu=$1
2850 build_vendor=$2
2851 shift; shift
2852 # Remember, the first character of IFS is used to create $*,
2853 # except with old shells:
2854 build_os=$*
2855 IFS=$ac_save_IFS
2856 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2857
2858
2859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2860 $as_echo_n "checking host system type... " >&6; }
2861 if ${ac_cv_host+:} false; then :
2862   $as_echo_n "(cached) " >&6
2863 else
2864   if test "x$host_alias" = x; then
2865   ac_cv_host=$ac_cv_build
2866 else
2867   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2868     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2869 fi
2870
2871 fi
2872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2873 $as_echo "$ac_cv_host" >&6; }
2874 case $ac_cv_host in
2875 *-*-*) ;;
2876 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2877 esac
2878 host=$ac_cv_host
2879 ac_save_IFS=$IFS; IFS='-'
2880 set x $ac_cv_host
2881 shift
2882 host_cpu=$1
2883 host_vendor=$2
2884 shift; shift
2885 # Remember, the first character of IFS is used to create $*,
2886 # except with old shells:
2887 host_os=$*
2888 IFS=$ac_save_IFS
2889 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2890
2891
2892
2893 ac_original_cc=$CC
2894 ac_ext=c
2895 ac_cpp='$CPP $CPPFLAGS'
2896 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2897 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2898 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2899 if test -n "$ac_tool_prefix"; then
2900   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2901 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2903 $as_echo_n "checking for $ac_word... " >&6; }
2904 if ${ac_cv_prog_CC+:} false; then :
2905   $as_echo_n "(cached) " >&6
2906 else
2907   if test -n "$CC"; then
2908   ac_cv_prog_CC="$CC" # Let the user override the test.
2909 else
2910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2911 for as_dir in $PATH
2912 do
2913   IFS=$as_save_IFS
2914   test -z "$as_dir" && as_dir=.
2915     for ac_exec_ext in '' $ac_executable_extensions; do
2916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2917     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2919     break 2
2920   fi
2921 done
2922   done
2923 IFS=$as_save_IFS
2924
2925 fi
2926 fi
2927 CC=$ac_cv_prog_CC
2928 if test -n "$CC"; then
2929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2930 $as_echo "$CC" >&6; }
2931 else
2932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2933 $as_echo "no" >&6; }
2934 fi
2935
2936
2937 fi
2938 if test -z "$ac_cv_prog_CC"; then
2939   ac_ct_CC=$CC
2940   # Extract the first word of "gcc", so it can be a program name with args.
2941 set dummy gcc; ac_word=$2
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2943 $as_echo_n "checking for $ac_word... " >&6; }
2944 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2945   $as_echo_n "(cached) " >&6
2946 else
2947   if test -n "$ac_ct_CC"; then
2948   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2949 else
2950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2951 for as_dir in $PATH
2952 do
2953   IFS=$as_save_IFS
2954   test -z "$as_dir" && as_dir=.
2955     for ac_exec_ext in '' $ac_executable_extensions; do
2956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2957     ac_cv_prog_ac_ct_CC="gcc"
2958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2959     break 2
2960   fi
2961 done
2962   done
2963 IFS=$as_save_IFS
2964
2965 fi
2966 fi
2967 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2968 if test -n "$ac_ct_CC"; then
2969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2970 $as_echo "$ac_ct_CC" >&6; }
2971 else
2972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2973 $as_echo "no" >&6; }
2974 fi
2975
2976   if test "x$ac_ct_CC" = x; then
2977     CC=""
2978   else
2979     case $cross_compiling:$ac_tool_warned in
2980 yes:)
2981 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2982 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2983 ac_tool_warned=yes ;;
2984 esac
2985     CC=$ac_ct_CC
2986   fi
2987 else
2988   CC="$ac_cv_prog_CC"
2989 fi
2990
2991 if test -z "$CC"; then
2992           if test -n "$ac_tool_prefix"; then
2993     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2994 set dummy ${ac_tool_prefix}cc; ac_word=$2
2995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2996 $as_echo_n "checking for $ac_word... " >&6; }
2997 if ${ac_cv_prog_CC+:} false; then :
2998   $as_echo_n "(cached) " >&6
2999 else
3000   if test -n "$CC"; then
3001   ac_cv_prog_CC="$CC" # Let the user override the test.
3002 else
3003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3004 for as_dir in $PATH
3005 do
3006   IFS=$as_save_IFS
3007   test -z "$as_dir" && as_dir=.
3008     for ac_exec_ext in '' $ac_executable_extensions; do
3009   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3010     ac_cv_prog_CC="${ac_tool_prefix}cc"
3011     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3012     break 2
3013   fi
3014 done
3015   done
3016 IFS=$as_save_IFS
3017
3018 fi
3019 fi
3020 CC=$ac_cv_prog_CC
3021 if test -n "$CC"; then
3022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3023 $as_echo "$CC" >&6; }
3024 else
3025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3026 $as_echo "no" >&6; }
3027 fi
3028
3029
3030   fi
3031 fi
3032 if test -z "$CC"; then
3033   # Extract the first word of "cc", so it can be a program name with args.
3034 set dummy cc; ac_word=$2
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3036 $as_echo_n "checking for $ac_word... " >&6; }
3037 if ${ac_cv_prog_CC+:} false; then :
3038   $as_echo_n "(cached) " >&6
3039 else
3040   if test -n "$CC"; then
3041   ac_cv_prog_CC="$CC" # Let the user override the test.
3042 else
3043   ac_prog_rejected=no
3044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3045 for as_dir in $PATH
3046 do
3047   IFS=$as_save_IFS
3048   test -z "$as_dir" && as_dir=.
3049     for ac_exec_ext in '' $ac_executable_extensions; do
3050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3051     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3052        ac_prog_rejected=yes
3053        continue
3054      fi
3055     ac_cv_prog_CC="cc"
3056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3057     break 2
3058   fi
3059 done
3060   done
3061 IFS=$as_save_IFS
3062
3063 if test $ac_prog_rejected = yes; then
3064   # We found a bogon in the path, so make sure we never use it.
3065   set dummy $ac_cv_prog_CC
3066   shift
3067   if test $# != 0; then
3068     # We chose a different compiler from the bogus one.
3069     # However, it has the same basename, so the bogon will be chosen
3070     # first if we set CC to just the basename; use the full file name.
3071     shift
3072     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3073   fi
3074 fi
3075 fi
3076 fi
3077 CC=$ac_cv_prog_CC
3078 if test -n "$CC"; then
3079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3080 $as_echo "$CC" >&6; }
3081 else
3082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3083 $as_echo "no" >&6; }
3084 fi
3085
3086
3087 fi
3088 if test -z "$CC"; then
3089   if test -n "$ac_tool_prefix"; then
3090   for ac_prog in cl.exe
3091   do
3092     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3093 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3095 $as_echo_n "checking for $ac_word... " >&6; }
3096 if ${ac_cv_prog_CC+:} false; then :
3097   $as_echo_n "(cached) " >&6
3098 else
3099   if test -n "$CC"; then
3100   ac_cv_prog_CC="$CC" # Let the user override the test.
3101 else
3102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3103 for as_dir in $PATH
3104 do
3105   IFS=$as_save_IFS
3106   test -z "$as_dir" && as_dir=.
3107     for ac_exec_ext in '' $ac_executable_extensions; do
3108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3109     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3111     break 2
3112   fi
3113 done
3114   done
3115 IFS=$as_save_IFS
3116
3117 fi
3118 fi
3119 CC=$ac_cv_prog_CC
3120 if test -n "$CC"; then
3121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3122 $as_echo "$CC" >&6; }
3123 else
3124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3125 $as_echo "no" >&6; }
3126 fi
3127
3128
3129     test -n "$CC" && break
3130   done
3131 fi
3132 if test -z "$CC"; then
3133   ac_ct_CC=$CC
3134   for ac_prog in cl.exe
3135 do
3136   # Extract the first word of "$ac_prog", so it can be a program name with args.
3137 set dummy $ac_prog; ac_word=$2
3138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3139 $as_echo_n "checking for $ac_word... " >&6; }
3140 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3141   $as_echo_n "(cached) " >&6
3142 else
3143   if test -n "$ac_ct_CC"; then
3144   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3145 else
3146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3147 for as_dir in $PATH
3148 do
3149   IFS=$as_save_IFS
3150   test -z "$as_dir" && as_dir=.
3151     for ac_exec_ext in '' $ac_executable_extensions; do
3152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3153     ac_cv_prog_ac_ct_CC="$ac_prog"
3154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3155     break 2
3156   fi
3157 done
3158   done
3159 IFS=$as_save_IFS
3160
3161 fi
3162 fi
3163 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3164 if test -n "$ac_ct_CC"; then
3165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3166 $as_echo "$ac_ct_CC" >&6; }
3167 else
3168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3169 $as_echo "no" >&6; }
3170 fi
3171
3172
3173   test -n "$ac_ct_CC" && break
3174 done
3175
3176   if test "x$ac_ct_CC" = x; then
3177     CC=""
3178   else
3179     case $cross_compiling:$ac_tool_warned in
3180 yes:)
3181 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3182 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3183 ac_tool_warned=yes ;;
3184 esac
3185     CC=$ac_ct_CC
3186   fi
3187 fi
3188
3189 fi
3190
3191
3192 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3193 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3194 as_fn_error $? "no acceptable C compiler found in \$PATH
3195 See \`config.log' for more details" "$LINENO" 5; }
3196
3197 # Provide some information about the compiler.
3198 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3199 set X $ac_compile
3200 ac_compiler=$2
3201 for ac_option in --version -v -V -qversion; do
3202   { { ac_try="$ac_compiler $ac_option >&5"
3203 case "(($ac_try" in
3204   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3205   *) ac_try_echo=$ac_try;;
3206 esac
3207 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3208 $as_echo "$ac_try_echo"; } >&5
3209   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3210   ac_status=$?
3211   if test -s conftest.err; then
3212     sed '10a\
3213 ... rest of stderr output deleted ...
3214          10q' conftest.err >conftest.er1
3215     cat conftest.er1 >&5
3216   fi
3217   rm -rf conftest.er1 conftest.err
3218   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3219   test $ac_status = 0; }
3220 done
3221
3222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3223 /* end confdefs.h.  */
3224
3225 int
3226 main ()
3227 {
3228
3229   ;
3230   return 0;
3231 }
3232 _ACEOF
3233 ac_clean_files_save=$ac_clean_files
3234 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3235 # Try to create an executable without -o first, disregard a.out.
3236 # It will help us diagnose broken compilers, and finding out an intuition
3237 # of exeext.
3238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3239 $as_echo_n "checking whether the C compiler works... " >&6; }
3240 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3241
3242 # The possible output files:
3243 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3244
3245 ac_rmfiles=
3246 for ac_file in $ac_files
3247 do
3248   case $ac_file in
3249     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3250     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3251   esac
3252 done
3253 rm -f $ac_rmfiles
3254
3255 if { { ac_try="$ac_link_default"
3256 case "(($ac_try" in
3257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3258   *) ac_try_echo=$ac_try;;
3259 esac
3260 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3261 $as_echo "$ac_try_echo"; } >&5
3262   (eval "$ac_link_default") 2>&5
3263   ac_status=$?
3264   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3265   test $ac_status = 0; }; then :
3266   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3267 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3268 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3269 # so that the user can short-circuit this test for compilers unknown to
3270 # Autoconf.
3271 for ac_file in $ac_files ''
3272 do
3273   test -f "$ac_file" || continue
3274   case $ac_file in
3275     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3276         ;;
3277     [ab].out )
3278         # We found the default executable, but exeext='' is most
3279         # certainly right.
3280         break;;
3281     *.* )
3282         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3283         then :; else
3284            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3285         fi
3286         # We set ac_cv_exeext here because the later test for it is not
3287         # safe: cross compilers may not add the suffix if given an `-o'
3288         # argument, so we may need to know it at that point already.
3289         # Even if this section looks crufty: it has the advantage of
3290         # actually working.
3291         break;;
3292     * )
3293         break;;
3294   esac
3295 done
3296 test "$ac_cv_exeext" = no && ac_cv_exeext=
3297
3298 else
3299   ac_file=''
3300 fi
3301 if test -z "$ac_file"; then :
3302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3303 $as_echo "no" >&6; }
3304 $as_echo "$as_me: failed program was:" >&5
3305 sed 's/^/| /' conftest.$ac_ext >&5
3306
3307 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3308 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3309 as_fn_error 77 "C compiler cannot create executables
3310 See \`config.log' for more details" "$LINENO" 5; }
3311 else
3312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3313 $as_echo "yes" >&6; }
3314 fi
3315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3316 $as_echo_n "checking for C compiler default output file name... " >&6; }
3317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3318 $as_echo "$ac_file" >&6; }
3319 ac_exeext=$ac_cv_exeext
3320
3321 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3322 ac_clean_files=$ac_clean_files_save
3323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3324 $as_echo_n "checking for suffix of executables... " >&6; }
3325 if { { ac_try="$ac_link"
3326 case "(($ac_try" in
3327   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3328   *) ac_try_echo=$ac_try;;
3329 esac
3330 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3331 $as_echo "$ac_try_echo"; } >&5
3332   (eval "$ac_link") 2>&5
3333   ac_status=$?
3334   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3335   test $ac_status = 0; }; then :
3336   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3337 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3338 # work properly (i.e., refer to `conftest.exe'), while it won't with
3339 # `rm'.
3340 for ac_file in conftest.exe conftest conftest.*; do
3341   test -f "$ac_file" || continue
3342   case $ac_file in
3343     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3344     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3345           break;;
3346     * ) break;;
3347   esac
3348 done
3349 else
3350   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3351 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3352 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3353 See \`config.log' for more details" "$LINENO" 5; }
3354 fi
3355 rm -rf conftest conftest$ac_cv_exeext
3356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3357 $as_echo "$ac_cv_exeext" >&6; }
3358
3359 rm -rf conftest.$ac_ext
3360 EXEEXT=$ac_cv_exeext
3361 ac_exeext=$EXEEXT
3362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3363 /* end confdefs.h.  */
3364 #include <stdio.h>
3365 int
3366 main ()
3367 {
3368 FILE *f = fopen ("conftest.out", "w");
3369  return ferror (f) || fclose (f) != 0;
3370
3371   ;
3372   return 0;
3373 }
3374 _ACEOF
3375 ac_clean_files="$ac_clean_files conftest.out"
3376 # Check that the compiler produces executables we can run.  If not, either
3377 # the compiler is broken, or we cross compile.
3378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3379 $as_echo_n "checking whether we are cross compiling... " >&6; }
3380 if test "$cross_compiling" != yes; then
3381   { { ac_try="$ac_link"
3382 case "(($ac_try" in
3383   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3384   *) ac_try_echo=$ac_try;;
3385 esac
3386 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3387 $as_echo "$ac_try_echo"; } >&5
3388   (eval "$ac_link") 2>&5
3389   ac_status=$?
3390   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3391   test $ac_status = 0; }
3392   if { ac_try='./conftest$ac_cv_exeext'
3393   { { case "(($ac_try" in
3394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3395   *) ac_try_echo=$ac_try;;
3396 esac
3397 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3398 $as_echo "$ac_try_echo"; } >&5
3399   (eval "$ac_try") 2>&5
3400   ac_status=$?
3401   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3402   test $ac_status = 0; }; }; then
3403     cross_compiling=no
3404   else
3405     if test "$cross_compiling" = maybe; then
3406         cross_compiling=yes
3407     else
3408         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3409 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3410 as_fn_error $? "cannot run C compiled programs.
3411 If you meant to cross compile, use \`--host'.
3412 See \`config.log' for more details" "$LINENO" 5; }
3413     fi
3414   fi
3415 fi
3416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3417 $as_echo "$cross_compiling" >&6; }
3418
3419 rm -rf conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3420 ac_clean_files=$ac_clean_files_save
3421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3422 $as_echo_n "checking for suffix of object files... " >&6; }
3423 if ${ac_cv_objext+:} false; then :
3424   $as_echo_n "(cached) " >&6
3425 else
3426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3427 /* end confdefs.h.  */
3428
3429 int
3430 main ()
3431 {
3432
3433   ;
3434   return 0;
3435 }
3436 _ACEOF
3437 rm -rf conftest.o conftest.obj
3438 if { { ac_try="$ac_compile"
3439 case "(($ac_try" in
3440   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3441   *) ac_try_echo=$ac_try;;
3442 esac
3443 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3444 $as_echo "$ac_try_echo"; } >&5
3445   (eval "$ac_compile") 2>&5
3446   ac_status=$?
3447   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3448   test $ac_status = 0; }; then :
3449   for ac_file in conftest.o conftest.obj conftest.*; do
3450   test -f "$ac_file" || continue;
3451   case $ac_file in
3452     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3453     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3454        break;;
3455   esac
3456 done
3457 else
3458   $as_echo "$as_me: failed program was:" >&5
3459 sed 's/^/| /' conftest.$ac_ext >&5
3460
3461 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3462 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3463 as_fn_error $? "cannot compute suffix of object files: cannot compile
3464 See \`config.log' for more details" "$LINENO" 5; }
3465 fi
3466 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
3467 fi
3468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3469 $as_echo "$ac_cv_objext" >&6; }
3470 OBJEXT=$ac_cv_objext
3471 ac_objext=$OBJEXT
3472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3473 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3474 if ${ac_cv_c_compiler_gnu+:} false; then :
3475   $as_echo_n "(cached) " >&6
3476 else
3477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3478 /* end confdefs.h.  */
3479
3480 int
3481 main ()
3482 {
3483 #ifndef __GNUC__
3484        choke me
3485 #endif
3486
3487   ;
3488   return 0;
3489 }
3490 _ACEOF
3491 if ac_fn_c_try_compile "$LINENO"; then :
3492   ac_compiler_gnu=yes
3493 else
3494   ac_compiler_gnu=no
3495 fi
3496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3497 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3498
3499 fi
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3501 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3502 if test $ac_compiler_gnu = yes; then
3503   GCC=yes
3504 else
3505   GCC=
3506 fi
3507 ac_test_CFLAGS=${CFLAGS+set}
3508 ac_save_CFLAGS=$CFLAGS
3509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3510 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3511 if ${ac_cv_prog_cc_g+:} false; then :
3512   $as_echo_n "(cached) " >&6
3513 else
3514   ac_save_c_werror_flag=$ac_c_werror_flag
3515    ac_c_werror_flag=yes
3516    ac_cv_prog_cc_g=no
3517    CFLAGS="-g"
3518    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3519 /* end confdefs.h.  */
3520
3521 int
3522 main ()
3523 {
3524
3525   ;
3526   return 0;
3527 }
3528 _ACEOF
3529 if ac_fn_c_try_compile "$LINENO"; then :
3530   ac_cv_prog_cc_g=yes
3531 else
3532   CFLAGS=""
3533       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3534 /* end confdefs.h.  */
3535
3536 int
3537 main ()
3538 {
3539
3540   ;
3541   return 0;
3542 }
3543 _ACEOF
3544 if ac_fn_c_try_compile "$LINENO"; then :
3545
3546 else
3547   ac_c_werror_flag=$ac_save_c_werror_flag
3548          CFLAGS="-g"
3549          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3550 /* end confdefs.h.  */
3551
3552 int
3553 main ()
3554 {
3555
3556   ;
3557   return 0;
3558 }
3559 _ACEOF
3560 if ac_fn_c_try_compile "$LINENO"; then :
3561   ac_cv_prog_cc_g=yes
3562 fi
3563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3564 fi
3565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3566 fi
3567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3568    ac_c_werror_flag=$ac_save_c_werror_flag
3569 fi
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3571 $as_echo "$ac_cv_prog_cc_g" >&6; }
3572 if test "$ac_test_CFLAGS" = set; then
3573   CFLAGS=$ac_save_CFLAGS
3574 elif test $ac_cv_prog_cc_g = yes; then
3575   if test "$GCC" = yes; then
3576     CFLAGS="-g -O2"
3577   else
3578     CFLAGS="-g"
3579   fi
3580 else
3581   if test "$GCC" = yes; then
3582     CFLAGS="-O2"
3583   else
3584     CFLAGS=
3585   fi
3586 fi
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3588 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3589 if ${ac_cv_prog_cc_c89+:} false; then :
3590   $as_echo_n "(cached) " >&6
3591 else
3592   ac_cv_prog_cc_c89=no
3593 ac_save_CC=$CC
3594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3595 /* end confdefs.h.  */
3596 #include <stdarg.h>
3597 #include <stdio.h>
3598 struct stat;
3599 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3600 struct buf { int x; };
3601 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3602 static char *e (p, i)
3603      char **p;
3604      int i;
3605 {
3606   return p[i];
3607 }
3608 static char *f (char * (*g) (char **, int), char **p, ...)
3609 {
3610   char *s;
3611   va_list v;
3612   va_start (v,p);
3613   s = g (p, va_arg (v,int));
3614   va_end (v);
3615   return s;
3616 }
3617
3618 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3619    function prototypes and stuff, but not '\xHH' hex character constants.
3620    These don't provoke an error unfortunately, instead are silently treated
3621    as 'x'.  The following induces an error, until -std is added to get
3622    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3623    array size at least.  It's necessary to write '\x00'==0 to get something
3624    that's true only with -std.  */
3625 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3626
3627 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3628    inside strings and character constants.  */
3629 #define FOO(x) 'x'
3630 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3631
3632 int test (int i, double x);
3633 struct s1 {int (*f) (int a);};
3634 struct s2 {int (*f) (double a);};
3635 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3636 int argc;
3637 char **argv;
3638 int
3639 main ()
3640 {
3641 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3642   ;
3643   return 0;
3644 }
3645 _ACEOF
3646 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3647         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3648 do
3649   CC="$ac_save_CC $ac_arg"
3650   if ac_fn_c_try_compile "$LINENO"; then :
3651   ac_cv_prog_cc_c89=$ac_arg
3652 fi
3653 rm -f core conftest.err conftest.$ac_objext
3654   test "x$ac_cv_prog_cc_c89" != "xno" && break
3655 done
3656 rm -rf conftest.$ac_ext
3657 CC=$ac_save_CC
3658
3659 fi
3660 # AC_CACHE_VAL
3661 case "x$ac_cv_prog_cc_c89" in
3662   x)
3663     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3664 $as_echo "none needed" >&6; } ;;
3665   xno)
3666     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3667 $as_echo "unsupported" >&6; } ;;
3668   *)
3669     CC="$CC $ac_cv_prog_cc_c89"
3670     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3671 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3672 esac
3673 if test "x$ac_cv_prog_cc_c89" != xno; then :
3674
3675 fi
3676
3677 ac_ext=c
3678 ac_cpp='$CPP $CPPFLAGS'
3679 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3680 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3681 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3682
3683
3684 have_pthread=no
3685   with_pthread_req=unspecified
3686
3687   # AX_PTHREAD is from the GNU Autoconf Archive.
3688   # https://savannah.gnu.org/projects/autoconf-archive/
3689   # ===========================================================================
3690 #        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
3691 # ===========================================================================
3692 #
3693 # SYNOPSIS
3694 #
3695 #   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
3696 #
3697 # DESCRIPTION
3698 #
3699 #   This macro figures out how to build C programs using POSIX threads. It
3700 #   sets the PTHREAD_LIBS output variable to the threads library and linker
3701 #   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
3702 #   flags that are needed. (The user can also force certain compiler
3703 #   flags/libs to be tested by setting these environment variables.)
3704 #
3705 #   Also sets PTHREAD_CC to any special C compiler that is needed for
3706 #   multi-threaded programs (defaults to the value of CC otherwise). (This
3707 #   is necessary on AIX to use the special cc_r compiler alias.)
3708 #
3709 #   NOTE: You are assumed to not only compile your program with these flags,
3710 #   but also link it with them as well. e.g. you should link with
3711 #   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
3712 #
3713 #   If you are only building threads programs, you may wish to use these
3714 #   variables in your default LIBS, CFLAGS, and CC:
3715 #
3716 #     LIBS="$PTHREAD_LIBS $LIBS"
3717 #     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
3718 #     CC="$PTHREAD_CC"
3719 #
3720 #   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
3721 #   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
3722 #   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
3723 #
3724 #   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
3725 #   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
3726 #   PTHREAD_CFLAGS.
3727 #
3728 #   ACTION-IF-FOUND is a list of shell commands to run if a threads library
3729 #   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
3730 #   is not found. If ACTION-IF-FOUND is not specified, the default action
3731 #   will define HAVE_PTHREAD.
3732 #
3733 #   Please let the authors know if this macro fails on any platform, or if
3734 #   you have any other suggestions or comments. This macro was based on work
3735 #   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
3736 #   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
3737 #   Alejandro Forero Cuervo to the autoconf macro repository. We are also
3738 #   grateful for the helpful feedback of numerous users.
3739 #
3740 #   Updated for Autoconf 2.68 by Daniel Richard G.
3741 #
3742 # LICENSE
3743 #
3744 #   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
3745 #   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
3746 #
3747 #   This program is free software: you can redistribute it and/or modify it
3748 #   under the terms of the GNU General Public License as published by the
3749 #   Free Software Foundation, either version 3 of the License, or (at your
3750 #   option) any later version.
3751 #
3752 #   This program is distributed in the hope that it will be useful, but
3753 #   WITHOUT ANY WARRANTY; without even the implied warranty of
3754 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
3755 #   Public License for more details.
3756 #
3757 #   You should have received a copy of the GNU General Public License along
3758 #   with this program. If not, see <http://www.gnu.org/licenses/>.
3759 #
3760 #   As a special exception, the respective Autoconf Macro's copyright owner
3761 #   gives unlimited permission to copy, distribute and modify the configure
3762 #   scripts that are the output of Autoconf when processing the Macro. You
3763 #   need not follow the terms of the GNU General Public License when using
3764 #   or distributing such scripts, even though portions of the text of the
3765 #   Macro appear in them. The GNU General Public License (GPL) does govern
3766 #   all other use of the material that constitutes the Autoconf Macro.
3767 #
3768 #   This special exception to the GPL applies to versions of the Autoconf
3769 #   Macro released by the Autoconf Archive. When you make and distribute a
3770 #   modified version of the Autoconf Macro, you may extend this special
3771 #   exception to the GPL to apply to your modified version as well.
3772
3773 #serial 21
3774
3775 # This is what autoupdate's m4 run will expand.  It fires
3776 # the warning (with _au_warn_XXX), outputs it into the
3777 # updated configure.ac (with AC_DIAGNOSE), and then outputs
3778 # the replacement expansion.
3779
3780
3781 # This is an auxiliary macro that is also run when
3782 # autoupdate runs m4.  It simply calls m4_warning, but
3783 # we need a wrapper so that each warning is emitted only
3784 # once.  We break the quoting in m4_warning's argument in
3785 # order to expand this macro's arguments, not AU_DEFUN's.
3786
3787
3788 # Finally, this is the expansion that is picked up by
3789 # autoconf.  It tells the user to run autoupdate, and
3790 # then outputs the replacement expansion.  We do not care
3791 # about autoupdate's warning because that contains
3792 # information on what to do *after* running autoupdate.
3793
3794
3795
3796   # This affects CC, LIBS, and CFLAGS, instead of defining new variables.
3797
3798
3799 # Check whether --with-pthread was given.
3800 if test "${with_pthread+set}" = set; then :
3801   withval=$with_pthread; with_pthread="$withval"; with_pthread_req="$withval"
3802 else
3803   with_pthread=yes
3804 fi
3805
3806
3807   if test "$with_pthread" = yes; then
3808     # AX_PTHREAD might want a different compiler.
3809
3810
3811 ac_ext=c
3812 ac_cpp='$CPP $CPPFLAGS'
3813 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3814 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3815 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3816
3817 ax_pthread_ok=no
3818
3819 # We used to check for pthread.h first, but this fails if pthread.h
3820 # requires special compiler flags (e.g. on True64 or Sequent).
3821 # It gets checked for in the link test anyway.
3822
3823 # First of all, check if the user has set any of the PTHREAD_LIBS,
3824 # etcetera environment variables, and if threads linking works using
3825 # them:
3826 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
3827         save_CFLAGS="$CFLAGS"
3828         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
3829         save_LIBS="$LIBS"
3830         LIBS="$PTHREAD_LIBS $LIBS"
3831         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
3832 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
3833         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3834 /* end confdefs.h.  */
3835
3836 /* Override any GCC internal prototype to avoid an error.
3837    Use char because int might match the return type of a GCC
3838    builtin and then its argument prototype would still apply.  */
3839 #ifdef __cplusplus
3840 extern "C"
3841 #endif
3842 char pthread_join ();
3843 int
3844 main ()
3845 {
3846 return pthread_join ();
3847   ;
3848   return 0;
3849 }
3850 _ACEOF
3851 if ac_fn_c_try_link "$LINENO"; then :
3852   ax_pthread_ok=yes
3853 fi
3854 rm -f core conftest.err conftest.$ac_objext \
3855     conftest$ac_exeext conftest.$ac_ext
3856         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
3857 $as_echo "$ax_pthread_ok" >&6; }
3858         if test x"$ax_pthread_ok" = xno; then
3859                 PTHREAD_LIBS=""
3860                 PTHREAD_CFLAGS=""
3861         fi
3862         LIBS="$save_LIBS"
3863         CFLAGS="$save_CFLAGS"
3864 fi
3865
3866 # We must check for the threads library under a number of different
3867 # names; the ordering is very important because some systems
3868 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
3869 # libraries is broken (non-POSIX).
3870
3871 # Create a list of thread flags to try.  Items starting with a "-" are
3872 # C compiler flags, and other items are library names, except for "none"
3873 # which indicates that we try without any flags at all, and "pthread-config"
3874 # which is a program returning the flags for the Pth emulation library.
3875
3876 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3877
3878 # The ordering *is* (sometimes) important.  Some notes on the
3879 # individual items follow:
3880
3881 # pthreads: AIX (must check this before -lpthread)
3882 # none: in case threads are in libc; should be tried before -Kthread and
3883 #       other compiler flags to prevent continual compiler warnings
3884 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
3885 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
3886 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3887 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
3888 # -pthreads: Solaris/gcc
3889 # -mthreads: Mingw32/gcc, Lynx/gcc
3890 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
3891 #      doesn't hurt to check since this sometimes defines pthreads too;
3892 #      also defines -D_REENTRANT)
3893 #      ... -mt is also the pthreads flag for HP/aCC
3894 # pthread: Linux, etcetera
3895 # --thread-safe: KAI C++
3896 # pthread-config: use pthread-config program (for GNU Pth library)
3897
3898 case ${host_os} in
3899         solaris*)
3900
3901         # On Solaris (at least, for some versions), libc contains stubbed
3902         # (non-functional) versions of the pthreads routines, so link-based
3903         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
3904         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
3905         # a function called by this macro, so we could check for that, but
3906         # who knows whether they'll stub that too in a future libc.)  So,
3907         # we'll just look for -pthreads and -lpthread first:
3908
3909         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
3910         ;;
3911
3912         darwin*)
3913         ax_pthread_flags="-pthread $ax_pthread_flags"
3914         ;;
3915 esac
3916
3917 # Clang doesn't consider unrecognized options an error unless we specify
3918 # -Werror. We throw in some extra Clang-specific options to ensure that
3919 # this doesn't happen for GCC, which also accepts -Werror.
3920
3921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
3922 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
3923 save_CFLAGS="$CFLAGS"
3924 ax_pthread_extra_flags="-Werror"
3925 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
3926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3927 /* end confdefs.h.  */
3928 int foo(void);
3929 int
3930 main ()
3931 {
3932 foo()
3933   ;
3934   return 0;
3935 }
3936 _ACEOF
3937 if ac_fn_c_try_compile "$LINENO"; then :
3938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3939 $as_echo "yes" >&6; }
3940 else
3941   ax_pthread_extra_flags=
3942                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3943 $as_echo "no" >&6; }
3944 fi
3945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3946 CFLAGS="$save_CFLAGS"
3947
3948 if test x"$ax_pthread_ok" = xno; then
3949 for flag in $ax_pthread_flags; do
3950
3951         case $flag in
3952                 none)
3953                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
3954 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
3955                 ;;
3956
3957                 -*)
3958                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
3959 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
3960                 PTHREAD_CFLAGS="$flag"
3961                 ;;
3962
3963                 pthread-config)
3964                 # Extract the first word of "pthread-config", so it can be a program name with args.
3965 set dummy pthread-config; ac_word=$2
3966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3967 $as_echo_n "checking for $ac_word... " >&6; }
3968 if ${ac_cv_prog_ax_pthread_config+:} false; then :
3969   $as_echo_n "(cached) " >&6
3970 else
3971   if test -n "$ax_pthread_config"; then
3972   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
3973 else
3974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3975 for as_dir in $PATH
3976 do
3977   IFS=$as_save_IFS
3978   test -z "$as_dir" && as_dir=.
3979     for ac_exec_ext in '' $ac_executable_extensions; do
3980   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3981     ac_cv_prog_ax_pthread_config="yes"
3982     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3983     break 2
3984   fi
3985 done
3986   done
3987 IFS=$as_save_IFS
3988
3989   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
3990 fi
3991 fi
3992 ax_pthread_config=$ac_cv_prog_ax_pthread_config
3993 if test -n "$ax_pthread_config"; then
3994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
3995 $as_echo "$ax_pthread_config" >&6; }
3996 else
3997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3998 $as_echo "no" >&6; }
3999 fi
4000
4001
4002                 if test x"$ax_pthread_config" = xno; then continue; fi
4003                 PTHREAD_CFLAGS="`pthread-config --cflags`"
4004                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
4005                 ;;
4006
4007                 *)
4008                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
4009 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
4010                 PTHREAD_LIBS="-l$flag"
4011                 ;;
4012         esac
4013
4014         save_LIBS="$LIBS"
4015         save_CFLAGS="$CFLAGS"
4016         LIBS="$PTHREAD_LIBS $LIBS"
4017         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
4018
4019         # Check for various functions.  We must include pthread.h,
4020         # since some functions may be macros.  (On the Sequent, we
4021         # need a special flag -Kthread to make this header compile.)
4022         # We check for pthread_join because it is in -lpthread on IRIX
4023         # while pthread_create is in libc.  We check for pthread_attr_init
4024         # due to DEC craziness with -lpthreads.  We check for
4025         # pthread_cleanup_push because it is one of the few pthread
4026         # functions on Solaris that doesn't have a non-functional libc stub.
4027         # We try pthread_create on general principles.
4028         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4029 /* end confdefs.h.  */
4030 #include <pthread.h>
4031                         static void routine(void *a) { a = 0; }
4032                         static void *start_routine(void *a) { return a; }
4033 int
4034 main ()
4035 {
4036 pthread_t th; pthread_attr_t attr;
4037                         pthread_create(&th, 0, start_routine, 0);
4038                         pthread_join(th, 0);
4039                         pthread_attr_init(&attr);
4040                         pthread_cleanup_push(routine, 0);
4041                         pthread_cleanup_pop(0) /* ; */
4042   ;
4043   return 0;
4044 }
4045 _ACEOF
4046 if ac_fn_c_try_link "$LINENO"; then :
4047   ax_pthread_ok=yes
4048 fi
4049 rm -f core conftest.err conftest.$ac_objext \
4050     conftest$ac_exeext conftest.$ac_ext
4051
4052         LIBS="$save_LIBS"
4053         CFLAGS="$save_CFLAGS"
4054
4055         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
4056 $as_echo "$ax_pthread_ok" >&6; }
4057         if test "x$ax_pthread_ok" = xyes; then
4058                 break;
4059         fi
4060
4061         PTHREAD_LIBS=""
4062         PTHREAD_CFLAGS=""
4063 done
4064 fi
4065
4066 # Various other checks:
4067 if test "x$ax_pthread_ok" = xyes; then
4068         save_LIBS="$LIBS"
4069         LIBS="$PTHREAD_LIBS $LIBS"
4070         save_CFLAGS="$CFLAGS"
4071         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
4072
4073         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
4074         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
4075 $as_echo_n "checking for joinable pthread attribute... " >&6; }
4076         attr_name=unknown
4077         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
4078             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4079 /* end confdefs.h.  */
4080 #include <pthread.h>
4081 int
4082 main ()
4083 {
4084 int attr = $attr; return attr /* ; */
4085   ;
4086   return 0;
4087 }
4088 _ACEOF
4089 if ac_fn_c_try_link "$LINENO"; then :
4090   attr_name=$attr; break
4091 fi
4092 rm -f core conftest.err conftest.$ac_objext \
4093     conftest$ac_exeext conftest.$ac_ext
4094         done
4095         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
4096 $as_echo "$attr_name" >&6; }
4097         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
4098
4099 cat >>confdefs.h <<_ACEOF
4100 #define PTHREAD_CREATE_JOINABLE $attr_name
4101 _ACEOF
4102
4103         fi
4104
4105         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
4106 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
4107         flag=no
4108         case ${host_os} in
4109             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
4110             osf* | hpux*) flag="-D_REENTRANT";;
4111             solaris*)
4112             if test "$GCC" = "yes"; then
4113                 flag="-D_REENTRANT"
4114             else
4115                 # TODO: What about Clang on Solaris?
4116                 flag="-mt -D_REENTRANT"
4117             fi
4118             ;;
4119         esac
4120         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
4121 $as_echo "$flag" >&6; }
4122         if test "x$flag" != xno; then
4123             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
4124         fi
4125
4126         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
4127 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
4128 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
4129   $as_echo_n "(cached) " >&6
4130 else
4131
4132                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4133 /* end confdefs.h.  */
4134 #include <pthread.h>
4135 int
4136 main ()
4137 {
4138 int i = PTHREAD_PRIO_INHERIT;
4139   ;
4140   return 0;
4141 }
4142 _ACEOF
4143 if ac_fn_c_try_link "$LINENO"; then :
4144   ax_cv_PTHREAD_PRIO_INHERIT=yes
4145 else
4146   ax_cv_PTHREAD_PRIO_INHERIT=no
4147 fi
4148 rm -f core conftest.err conftest.$ac_objext \
4149     conftest$ac_exeext conftest.$ac_ext
4150
4151 fi
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
4153 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
4154         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
4155
4156 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
4157
4158 fi
4159
4160         LIBS="$save_LIBS"
4161         CFLAGS="$save_CFLAGS"
4162
4163         # More AIX lossage: compile with *_r variant
4164         if test "x$GCC" != xyes; then
4165             case $host_os in
4166                 aix*)
4167                 case "x/$CC" in #(
4168   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
4169     #handle absolute path differently from PATH based program lookup
4170                    case "x$CC" in #(
4171   x/*) :
4172     if as_fn_executable_p ${CC}_r; then :
4173   PTHREAD_CC="${CC}_r"
4174 fi ;; #(
4175   *) :
4176     for ac_prog in ${CC}_r
4177 do
4178   # Extract the first word of "$ac_prog", so it can be a program name with args.
4179 set dummy $ac_prog; ac_word=$2
4180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4181 $as_echo_n "checking for $ac_word... " >&6; }
4182 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
4183   $as_echo_n "(cached) " >&6
4184 else
4185   if test -n "$PTHREAD_CC"; then
4186   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
4187 else
4188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4189 for as_dir in $PATH
4190 do
4191   IFS=$as_save_IFS
4192   test -z "$as_dir" && as_dir=.
4193     for ac_exec_ext in '' $ac_executable_extensions; do
4194   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4195     ac_cv_prog_PTHREAD_CC="$ac_prog"
4196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4197     break 2
4198   fi
4199 done
4200   done
4201 IFS=$as_save_IFS
4202
4203 fi
4204 fi
4205 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
4206 if test -n "$PTHREAD_CC"; then
4207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
4208 $as_echo "$PTHREAD_CC" >&6; }
4209 else
4210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4211 $as_echo "no" >&6; }
4212 fi
4213
4214
4215   test -n "$PTHREAD_CC" && break
4216 done
4217 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
4218  ;;
4219 esac ;; #(
4220   *) :
4221      ;;
4222 esac
4223                 ;;
4224             esac
4225         fi
4226 fi
4227
4228 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
4229
4230
4231
4232
4233
4234 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
4235 if test x"$ax_pthread_ok" = xyes; then
4236         if test "$CC" = "$PTHREAD_CC" -o -z "$ac_original_cc"; then
4237         have_pthread=yes
4238       else
4239         ac_prog_cc_no_pthread=yes
4240       fi
4241
4242         :
4243 else
4244         ax_pthread_ok=no
4245
4246 fi
4247 ac_ext=c
4248 ac_cpp='$CPP $CPPFLAGS'
4249 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4250 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4251 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4252
4253
4254
4255     if test "$have_pthread" = yes; then
4256       $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
4257
4258       CC=$PTHREAD_CC
4259     fi
4260   fi
4261  # Needs ac_original_cc.
4262
4263
4264
4265   if test -z "$GCC"; then
4266     # not using GCC
4267     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to request ANSI compilation" >&5
4268 $as_echo_n "checking how to request ANSI compilation... " >&6; }
4269     case "$host" in
4270       *-hpux* )
4271         { $as_echo "$as_me:${as_lineno-$LINENO}: result: HPUX: adding -Ae" >&5
4272 $as_echo "HPUX: adding -Ae" >&6; }
4273         CC="$CC -Ae"
4274       ;;
4275       *-aix* )
4276         { $as_echo "$as_me:${as_lineno-$LINENO}: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
4277 $as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
4278         CC="$CC -qlanglvl=ansi -qhalt=e"
4279       ;;
4280       *-dec-* )
4281         { $as_echo "$as_me:${as_lineno-$LINENO}: result: DEC: adding -std1 -ieee" >&5
4282 $as_echo "DEC: adding -std1 -ieee" >&6; }
4283         CC="$CC -std1"
4284       ;;
4285       *)
4286         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no idea" >&5
4287 $as_echo "no idea" >&6; }
4288       ;;
4289     esac
4290   else
4291     # using GCC
4292     case "$host" in
4293       *-solaris*)
4294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris: adding -D__EXTENSIONS__" >&5
4295 $as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
4296         CC="$CC -D__EXTENSIONS__"
4297       ;;
4298     esac
4299   fi
4300
4301   OBJCC="$CC"
4302
4303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler works on ANSI C" >&5
4304 $as_echo_n "checking whether the compiler works on ANSI C... " >&6; }
4305   if test "$cross_compiling" = yes; then :
4306   as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
4307 else
4308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4309 /* end confdefs.h.  */
4310  main(int ac, char **av) { return 0; }
4311 _ACEOF
4312 if ac_fn_c_try_run "$LINENO"; then :
4313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4314 $as_echo "yes" >&6; }
4315 else
4316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4317 $as_echo "no" >&6; }
4318      as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
4319 fi
4320 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4321   conftest.$ac_objext conftest.beam conftest.$ac_ext
4322 fi
4323
4324
4325   if test -n "$GCC"; then
4326     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on gcc compiler warnings." >&5
4327 $as_echo "Turning on gcc compiler warnings." >&6; }
4328     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
4329     OBJCC="$OBJCC -Wall"
4330     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
4331     # and so perhaps now we can do without -pedantic?
4332   else
4333     case "$host" in
4334       *-irix5* |*-irix6.0-3* )
4335         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on SGI compiler warnings." >&5
4336 $as_echo "Turning on SGI compiler warnings." >&6; }
4337         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
4338       ;;
4339 #     *-dec-osf* )
4340 #       if test -z "$GCC"; then
4341 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
4342 #         CC="$CC -migrate -w0 -verbose -warnprotos"
4343 #       fi
4344 #     ;;
4345     esac
4346   fi
4347
4348 if test -n "$GCC"; then
4349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wno-overlength-strings" >&5
4350 $as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
4351 if ${ac_cv_gcc_accepts_no_overlength+:} false; then :
4352   $as_echo_n "(cached) " >&6
4353 else
4354   rm -rf conftest.$ac_ext
4355      touch conftest.$ac_ext
4356      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4357           grep unrecognized >/dev/null ); then
4358        ac_cv_gcc_accepts_no_overlength=no
4359      else
4360        ac_cv_gcc_accepts_no_overlength=yes
4361        CC="$CC -Wno-overlength-strings"
4362      fi
4363 fi
4364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_overlength" >&5
4365 $as_echo "$ac_cv_gcc_accepts_no_overlength" >&6; }
4366    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
4367   fi
4368
4369 if test -n "$GCC"; then
4370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wdeclaration-after-statement" >&5
4371 $as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
4372 if ${ac_cv_gcc_accepts_no_decl_after+:} false; then :
4373   $as_echo_n "(cached) " >&6
4374 else
4375   rm -rf conftest.$ac_ext
4376      touch conftest.$ac_ext
4377      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4378           grep unrecognized >/dev/null ); then
4379        ac_cv_gcc_accepts_no_decl_after=no
4380      else
4381        ac_cv_gcc_accepts_no_decl_after=yes
4382        CC="$CC -Wdeclaration-after-statement"
4383      fi
4384 fi
4385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_decl_after" >&5
4386 $as_echo "$ac_cv_gcc_accepts_no_decl_after" >&6; }
4387    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
4388   fi
4389
4390 if test -n "$GCC"; then
4391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -no-cpp-precomp" >&5
4392 $as_echo_n "checking whether gcc accepts -no-cpp-precomp... " >&6; }
4393 if ${ac_cv_gcc_accepts_no_cpp_precomp+:} false; then :
4394   $as_echo_n "(cached) " >&6
4395 else
4396   rm -rf conftest.$ac_ext
4397      touch conftest.$ac_ext
4398      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4399           grep unrecognized >/dev/null ); then
4400        ac_cv_gcc_accepts_no_cpp_precomp=no
4401      else
4402        ac_cv_gcc_accepts_no_cpp_precomp=yes
4403        CC="$CC -no-cpp-precomp"
4404      fi
4405 fi
4406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
4407 $as_echo "$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
4408    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
4409   fi
4410
4411 if test -n "$GCC"; then
4412
4413   case "$host" in
4414     *-darwin* )
4415       # Fucking Apple let // comments sneak into OpenGL headers, so
4416       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
4417     ;;
4418    *)
4419      if test -n "$GCC"; then
4420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -std=c89" >&5
4421 $as_echo_n "checking whether gcc accepts -std=c89... " >&6; }
4422 if ${ac_cv_gcc_accepts_std+:} false; then :
4423   $as_echo_n "(cached) " >&6
4424 else
4425   rm -rf conftest.$ac_ext
4426      touch conftest.$ac_ext
4427      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4428           grep unrecognized >/dev/null ); then
4429        ac_cv_gcc_accepts_std=no
4430      else
4431        ac_cv_gcc_accepts_std=yes
4432        CC="$CC -std=c89"
4433      fi
4434 fi
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_std" >&5
4436 $as_echo "$ac_cv_gcc_accepts_std" >&6; }
4437    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
4438   fi
4439
4440    ;;
4441   esac
4442
4443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling C++ comments in ANSI C code." >&5
4444 $as_echo "Disabling C++ comments in ANSI C code." >&6; }
4445    #
4446    # The reason that // comments are banned from xscreensaver is that gcc is
4447    # basically the only compiler in the world that supports them in C code.
4448    # All other vendors support them only in their C++ compilers, not in their
4449    # ANSI C compilers.  This means that it's a portability problem: every time
4450    # these comments have snuck into the xscreensaver source code, I've gotten
4451    # complaints about it the next day.  So we turn off support for them in gcc
4452    # as well to prevent them from accidentially slipping in.
4453    #
4454    if test "$ac_gcc_accepts_std" = yes ; then
4455      #
4456      # -std=c89 defines __STRICT_ANSI__, which we don't want.
4457      # (That appears to be the only additional preprocessor symbol
4458      # it defines, in addition to the syntax changes it makes.)
4459      #
4460      # -std=gnu89 is no good, because // comments were a GNU extension
4461      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
4462      # with -std=gnu89 but not with -std=c89.)
4463      #
4464      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
4465      CC="$CC -U__STRICT_ANSI__"
4466 #   else
4467 #     # The old way:
4468 #     CC="$CC -Wp,-lang-c89"
4469    fi
4470   fi
4471
4472 ac_ext=c
4473 ac_cpp='$CPP $CPPFLAGS'
4474 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4475 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4476 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4478 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4479 # On Suns, sometimes $CPP names a directory.
4480 if test -n "$CPP" && test -d "$CPP"; then
4481   CPP=
4482 fi
4483 if test -z "$CPP"; then
4484   if ${ac_cv_prog_CPP+:} false; then :
4485   $as_echo_n "(cached) " >&6
4486 else
4487       # Double quotes because CPP needs to be expanded
4488     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4489     do
4490       ac_preproc_ok=false
4491 for ac_c_preproc_warn_flag in '' yes
4492 do
4493   # Use a header file that comes with gcc, so configuring glibc
4494   # with a fresh cross-compiler works.
4495   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4496   # <limits.h> exists even on freestanding compilers.
4497   # On the NeXT, cc -E runs the code through the compiler's parser,
4498   # not just through cpp. "Syntax error" is here to catch this case.
4499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4500 /* end confdefs.h.  */
4501 #ifdef __STDC__
4502 # include <limits.h>
4503 #else
4504 # include <assert.h>
4505 #endif
4506                      Syntax error
4507 _ACEOF
4508 if ac_fn_c_try_cpp "$LINENO"; then :
4509
4510 else
4511   # Broken: fails on valid input.
4512 continue
4513 fi
4514 rm -rf conftest.err conftest.i conftest.$ac_ext
4515
4516   # OK, works on sane cases.  Now check whether nonexistent headers
4517   # can be detected and how.
4518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4519 /* end confdefs.h.  */
4520 #include <ac_nonexistent.h>
4521 _ACEOF
4522 if ac_fn_c_try_cpp "$LINENO"; then :
4523   # Broken: success on invalid input.
4524 continue
4525 else
4526   # Passes both tests.
4527 ac_preproc_ok=:
4528 break
4529 fi
4530 rm -rf conftest.err conftest.i conftest.$ac_ext
4531
4532 done
4533 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4534 rm -rf conftest.i conftest.err conftest.$ac_ext
4535 if $ac_preproc_ok; then :
4536   break
4537 fi
4538
4539     done
4540     ac_cv_prog_CPP=$CPP
4541
4542 fi
4543   CPP=$ac_cv_prog_CPP
4544 else
4545   ac_cv_prog_CPP=$CPP
4546 fi
4547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4548 $as_echo "$CPP" >&6; }
4549 ac_preproc_ok=false
4550 for ac_c_preproc_warn_flag in '' yes
4551 do
4552   # Use a header file that comes with gcc, so configuring glibc
4553   # with a fresh cross-compiler works.
4554   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4555   # <limits.h> exists even on freestanding compilers.
4556   # On the NeXT, cc -E runs the code through the compiler's parser,
4557   # not just through cpp. "Syntax error" is here to catch this case.
4558   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4559 /* end confdefs.h.  */
4560 #ifdef __STDC__
4561 # include <limits.h>
4562 #else
4563 # include <assert.h>
4564 #endif
4565                      Syntax error
4566 _ACEOF
4567 if ac_fn_c_try_cpp "$LINENO"; then :
4568
4569 else
4570   # Broken: fails on valid input.
4571 continue
4572 fi
4573 rm -rf conftest.err conftest.i conftest.$ac_ext
4574
4575   # OK, works on sane cases.  Now check whether nonexistent headers
4576   # can be detected and how.
4577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4578 /* end confdefs.h.  */
4579 #include <ac_nonexistent.h>
4580 _ACEOF
4581 if ac_fn_c_try_cpp "$LINENO"; then :
4582   # Broken: success on invalid input.
4583 continue
4584 else
4585   # Passes both tests.
4586 ac_preproc_ok=:
4587 break
4588 fi
4589 rm -rf conftest.err conftest.i conftest.$ac_ext
4590
4591 done
4592 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4593 rm -rf conftest.i conftest.err conftest.$ac_ext
4594 if $ac_preproc_ok; then :
4595
4596 else
4597   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4598 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4599 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4600 See \`config.log' for more details" "$LINENO" 5; }
4601 fi
4602
4603 ac_ext=c
4604 ac_cpp='$CPP $CPPFLAGS'
4605 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4606 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4607 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4608
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4610 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4611 if ${ac_cv_c_const+:} false; then :
4612   $as_echo_n "(cached) " >&6
4613 else
4614   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615 /* end confdefs.h.  */
4616
4617 int
4618 main ()
4619 {
4620
4621 #ifndef __cplusplus
4622   /* Ultrix mips cc rejects this sort of thing.  */
4623   typedef int charset[2];
4624   const charset cs = { 0, 0 };
4625   /* SunOS 4.1.1 cc rejects this.  */
4626   char const *const *pcpcc;
4627   char **ppc;
4628   /* NEC SVR4.0.2 mips cc rejects this.  */
4629   struct point {int x, y;};
4630   static struct point const zero = {0,0};
4631   /* AIX XL C 1.02.0.0 rejects this.
4632      It does not let you subtract one const X* pointer from another in
4633      an arm of an if-expression whose if-part is not a constant
4634      expression */
4635   const char *g = "string";
4636   pcpcc = &g + (g ? g-g : 0);
4637   /* HPUX 7.0 cc rejects these. */
4638   ++pcpcc;
4639   ppc = (char**) pcpcc;
4640   pcpcc = (char const *const *) ppc;
4641   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4642     char tx;
4643     char *t = &tx;
4644     char const *s = 0 ? (char *) 0 : (char const *) 0;
4645
4646     *t++ = 0;
4647     if (s) return 0;
4648   }
4649   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4650     int x[] = {25, 17};
4651     const int *foo = &x[0];
4652     ++foo;
4653   }
4654   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4655     typedef const int *iptr;
4656     iptr p = 0;
4657     ++p;
4658   }
4659   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4660        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4661     struct s { int j; const int *ap[3]; } bx;
4662     struct s *b = &bx; b->j = 5;
4663   }
4664   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4665     const int foo = 10;
4666     if (!foo) return 0;
4667   }
4668   return !cs[0] && !zero.x;
4669 #endif
4670
4671   ;
4672   return 0;
4673 }
4674 _ACEOF
4675 if ac_fn_c_try_compile "$LINENO"; then :
4676   ac_cv_c_const=yes
4677 else
4678   ac_cv_c_const=no
4679 fi
4680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4681 fi
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4683 $as_echo "$ac_cv_c_const" >&6; }
4684 if test $ac_cv_c_const = no; then
4685
4686 $as_echo "#define const /**/" >>confdefs.h
4687
4688 fi
4689
4690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4691 $as_echo_n "checking for inline... " >&6; }
4692 if ${ac_cv_c_inline+:} false; then :
4693   $as_echo_n "(cached) " >&6
4694 else
4695   ac_cv_c_inline=no
4696 for ac_kw in inline __inline__ __inline; do
4697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4698 /* end confdefs.h.  */
4699 #ifndef __cplusplus
4700 typedef int foo_t;
4701 static $ac_kw foo_t static_foo () {return 0; }
4702 $ac_kw foo_t foo () {return 0; }
4703 #endif
4704
4705 _ACEOF
4706 if ac_fn_c_try_compile "$LINENO"; then :
4707   ac_cv_c_inline=$ac_kw
4708 fi
4709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4710   test "$ac_cv_c_inline" != no && break
4711 done
4712
4713 fi
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4715 $as_echo "$ac_cv_c_inline" >&6; }
4716
4717 case $ac_cv_c_inline in
4718   inline | yes) ;;
4719   *)
4720     case $ac_cv_c_inline in
4721       no) ac_val=;;
4722       *) ac_val=$ac_cv_c_inline;;
4723     esac
4724     cat >>confdefs.h <<_ACEOF
4725 #ifndef __cplusplus
4726 #define inline $ac_val
4727 #endif
4728 _ACEOF
4729     ;;
4730 esac
4731
4732
4733 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4734   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bc" >&5
4735 $as_echo_n "checking for bc... " >&6; }
4736   if test "$ac_bc_result" = "15" ; then
4737     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4738 $as_echo "yes" >&6; }
4739   else
4740     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4741 $as_echo "no" >&6; }
4742     echo ''
4743     as_fn_error $? "Your system doesn't have \"bc\", which has been a standard
4744                   part of Unix since the 1970s.  Come back when your vendor
4745                   has grown a clue." "$LINENO" 5
4746   fi
4747
4748
4749 # stuff for Makefiles
4750 # Find a good install program.  We prefer a C program (faster),
4751 # so one script is as good as another.  But avoid the broken or
4752 # incompatible versions:
4753 # SysV /etc/install, /usr/sbin/install
4754 # SunOS /usr/etc/install
4755 # IRIX /sbin/install
4756 # AIX /bin/install
4757 # AmigaOS /C/install, which installs bootblocks on floppy discs
4758 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4759 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4760 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4761 # OS/2's system install, which has a completely different semantic
4762 # ./install, which can be erroneously created by make from ./install.sh.
4763 # Reject install programs that cannot install multiple files.
4764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4765 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4766 if test -z "$INSTALL"; then
4767 if ${ac_cv_path_install+:} false; then :
4768   $as_echo_n "(cached) " >&6
4769 else
4770   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4771 for as_dir in $PATH
4772 do
4773   IFS=$as_save_IFS
4774   test -z "$as_dir" && as_dir=.
4775     # Account for people who put trailing slashes in PATH elements.
4776 case $as_dir/ in #((
4777   ./ | .// | /[cC]/* | \
4778   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4779   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4780   /usr/ucb/* ) ;;
4781   *)
4782     # OSF1 and SCO ODT 3.0 have their own names for install.
4783     # Don't use installbsd from OSF since it installs stuff as root
4784     # by default.
4785     for ac_prog in ginstall scoinst install; do
4786       for ac_exec_ext in '' $ac_executable_extensions; do
4787         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4788           if test $ac_prog = install &&
4789             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4790             # AIX install.  It has an incompatible calling convention.
4791             :
4792           elif test $ac_prog = install &&
4793             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4794             # program-specific install script used by HP pwplus--don't use.
4795             :
4796           else
4797             rm -rf conftest.one conftest.two conftest.dir
4798             echo one > conftest.one
4799             echo two > conftest.two
4800             mkdir conftest.dir
4801             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4802               test -s conftest.one && test -s conftest.two &&
4803               test -s conftest.dir/conftest.one &&
4804               test -s conftest.dir/conftest.two
4805             then
4806               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4807               break 3
4808             fi
4809           fi
4810         fi
4811       done
4812     done
4813     ;;
4814 esac
4815
4816   done
4817 IFS=$as_save_IFS
4818
4819 rm -rf conftest.one conftest.two conftest.dir
4820
4821 fi
4822   if test "${ac_cv_path_install+set}" = set; then
4823     INSTALL=$ac_cv_path_install
4824   else
4825     # As a last resort, use the slow shell script.  Don't cache a
4826     # value for INSTALL within a source directory, because that will
4827     # break other packages using the cache if that directory is
4828     # removed, or if the value is a relative name.
4829     INSTALL=$ac_install_sh
4830   fi
4831 fi
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4833 $as_echo "$INSTALL" >&6; }
4834
4835 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4836 # It thinks the first close brace ends the variable substitution.
4837 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4838
4839 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4840
4841 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4842
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4844 $as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4845 if ${ac_cv_install_d_creates_dirs+:} false; then :
4846   $as_echo_n "(cached) " >&6
4847 else
4848   ac_cv_install_d_creates_dirs=no
4849      rm -rf conftestdir
4850      if mkdir conftestdir; then
4851        cd conftestdir 2>/dev/null
4852        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4853        if test -d dir1/dir2/. ; then
4854          ac_cv_install_d_creates_dirs=yes
4855        fi
4856        cd .. 2>/dev/null
4857        rm -rf conftestdir
4858      fi
4859
4860 fi
4861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_install_d_creates_dirs" >&5
4862 $as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4863
4864   if test "$ac_cv_install_d_creates_dirs" = no ; then
4865     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"mkdir -p\" creates intermediate directories" >&5
4866 $as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4867 if ${ac_cv_mkdir_p_creates_dirs+:} false; then :
4868   $as_echo_n "(cached) " >&6
4869 else
4870   ac_cv_mkdir_p_creates_dirs=no
4871        rm -rf conftestdir
4872        if mkdir conftestdir; then
4873          cd conftestdir 2>/dev/null
4874          mkdir -p dir1/dir2 >/dev/null 2>&1
4875          if test -d dir1/dir2/. ; then
4876            ac_cv_mkdir_p_creates_dirs=yes
4877          fi
4878          cd .. 2>/dev/null
4879          rm -rf conftestdir
4880        fi
4881
4882 fi
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_p_creates_dirs" >&5
4884 $as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4885   fi
4886
4887   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4888     INSTALL_DIRS='${INSTALL} -d'
4889   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4890     INSTALL_DIRS='mkdir -p'
4891   else
4892     # any other ideas?
4893     INSTALL_DIRS='${INSTALL} -d'
4894   fi
4895
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4897 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4898 set x ${MAKE-make}
4899 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4900 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4901   $as_echo_n "(cached) " >&6
4902 else
4903   cat >conftest.make <<\_ACEOF
4904 SHELL = /bin/sh
4905 all:
4906         @echo '@@@%%%=$(MAKE)=@@@%%%'
4907 _ACEOF
4908 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4909 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4910   *@@@%%%=?*=@@@%%%*)
4911     eval ac_cv_prog_make_${ac_make}_set=yes;;
4912   *)
4913     eval ac_cv_prog_make_${ac_make}_set=no;;
4914 esac
4915 rm -rf conftest.make
4916 fi
4917 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4919 $as_echo "yes" >&6; }
4920   SET_MAKE=
4921 else
4922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4923 $as_echo "no" >&6; }
4924   SET_MAKE="MAKE=${MAKE-make}"
4925 fi
4926
4927
4928 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4929 # That's wrong: it should be set to '${INSTALL}', so that one can
4930 # implement the "install-strip" target properly (strip executables,
4931 # but do not try to strip scripts.)
4932 #
4933 INSTALL_SCRIPT='${INSTALL}'
4934
4935 # random libc stuff
4936
4937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4938 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4939 if ${ac_cv_path_GREP+:} false; then :
4940   $as_echo_n "(cached) " >&6
4941 else
4942   if test -z "$GREP"; then
4943   ac_path_GREP_found=false
4944   # Loop through the user's path and test for each of PROGNAME-LIST
4945   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4946 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4947 do
4948   IFS=$as_save_IFS
4949   test -z "$as_dir" && as_dir=.
4950     for ac_prog in grep ggrep; do
4951     for ac_exec_ext in '' $ac_executable_extensions; do
4952       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4953       as_fn_executable_p "$ac_path_GREP" || continue
4954 # Check for GNU ac_path_GREP and select it if it is found.
4955   # Check for GNU $ac_path_GREP
4956 case `"$ac_path_GREP" --version 2>&1` in
4957 *GNU*)
4958   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4959 *)
4960   ac_count=0
4961   $as_echo_n 0123456789 >"conftest.in"
4962   while :
4963   do
4964     cat "conftest.in" "conftest.in" >"conftest.tmp"
4965     mv "conftest.tmp" "conftest.in"
4966     cp "conftest.in" "conftest.nl"
4967     $as_echo 'GREP' >> "conftest.nl"
4968     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4969     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4970     as_fn_arith $ac_count + 1 && ac_count=$as_val
4971     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4972       # Best one so far, save it but keep looking for a better one
4973       ac_cv_path_GREP="$ac_path_GREP"
4974       ac_path_GREP_max=$ac_count
4975     fi
4976     # 10*(2^10) chars as input seems more than enough
4977     test $ac_count -gt 10 && break
4978   done
4979   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4980 esac
4981
4982       $ac_path_GREP_found && break 3
4983     done
4984   done
4985   done
4986 IFS=$as_save_IFS
4987   if test -z "$ac_cv_path_GREP"; then
4988     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4989   fi
4990 else
4991   ac_cv_path_GREP=$GREP
4992 fi
4993
4994 fi
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4996 $as_echo "$ac_cv_path_GREP" >&6; }
4997  GREP="$ac_cv_path_GREP"
4998
4999
5000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5001 $as_echo_n "checking for egrep... " >&6; }
5002 if ${ac_cv_path_EGREP+:} false; then :
5003   $as_echo_n "(cached) " >&6
5004 else
5005   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5006    then ac_cv_path_EGREP="$GREP -E"
5007    else
5008      if test -z "$EGREP"; then
5009   ac_path_EGREP_found=false
5010   # Loop through the user's path and test for each of PROGNAME-LIST
5011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5013 do
5014   IFS=$as_save_IFS
5015   test -z "$as_dir" && as_dir=.
5016     for ac_prog in egrep; do
5017     for ac_exec_ext in '' $ac_executable_extensions; do
5018       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5019       as_fn_executable_p "$ac_path_EGREP" || continue
5020 # Check for GNU ac_path_EGREP and select it if it is found.
5021   # Check for GNU $ac_path_EGREP
5022 case `"$ac_path_EGREP" --version 2>&1` in
5023 *GNU*)
5024   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5025 *)
5026   ac_count=0
5027   $as_echo_n 0123456789 >"conftest.in"
5028   while :
5029   do
5030     cat "conftest.in" "conftest.in" >"conftest.tmp"
5031     mv "conftest.tmp" "conftest.in"
5032     cp "conftest.in" "conftest.nl"
5033     $as_echo 'EGREP' >> "conftest.nl"
5034     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5035     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5036     as_fn_arith $ac_count + 1 && ac_count=$as_val
5037     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5038       # Best one so far, save it but keep looking for a better one
5039       ac_cv_path_EGREP="$ac_path_EGREP"
5040       ac_path_EGREP_max=$ac_count
5041     fi
5042     # 10*(2^10) chars as input seems more than enough
5043     test $ac_count -gt 10 && break
5044   done
5045   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
5046 esac
5047
5048       $ac_path_EGREP_found && break 3
5049     done
5050   done
5051   done
5052 IFS=$as_save_IFS
5053   if test -z "$ac_cv_path_EGREP"; then
5054     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5055   fi
5056 else
5057   ac_cv_path_EGREP=$EGREP
5058 fi
5059
5060    fi
5061 fi
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5063 $as_echo "$ac_cv_path_EGREP" >&6; }
5064  EGREP="$ac_cv_path_EGREP"
5065
5066
5067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5068 $as_echo_n "checking for ANSI C header files... " >&6; }
5069 if ${ac_cv_header_stdc+:} false; then :
5070   $as_echo_n "(cached) " >&6
5071 else
5072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5073 /* end confdefs.h.  */
5074 #include <stdlib.h>
5075 #include <stdarg.h>
5076 #include <string.h>
5077 #include <float.h>
5078
5079 int
5080 main ()
5081 {
5082
5083   ;
5084   return 0;
5085 }
5086 _ACEOF
5087 if ac_fn_c_try_compile "$LINENO"; then :
5088   ac_cv_header_stdc=yes
5089 else
5090   ac_cv_header_stdc=no
5091 fi
5092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5093
5094 if test $ac_cv_header_stdc = yes; then
5095   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5097 /* end confdefs.h.  */
5098 #include <string.h>
5099
5100 _ACEOF
5101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5102   $EGREP "memchr" >/dev/null 2>&1; then :
5103
5104 else
5105   ac_cv_header_stdc=no
5106 fi
5107 rm -rf conftest*
5108
5109 fi
5110
5111 if test $ac_cv_header_stdc = yes; then
5112   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5114 /* end confdefs.h.  */
5115 #include <stdlib.h>
5116
5117 _ACEOF
5118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5119   $EGREP "free" >/dev/null 2>&1; then :
5120
5121 else
5122   ac_cv_header_stdc=no
5123 fi
5124 rm -rf conftest*
5125
5126 fi
5127
5128 if test $ac_cv_header_stdc = yes; then
5129   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5130   if test "$cross_compiling" = yes; then :
5131   :
5132 else
5133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5134 /* end confdefs.h.  */
5135 #include <ctype.h>
5136 #include <stdlib.h>
5137 #if ((' ' & 0x0FF) == 0x020)
5138 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5139 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5140 #else
5141 # define ISLOWER(c) \
5142                    (('a' <= (c) && (c) <= 'i') \
5143                      || ('j' <= (c) && (c) <= 'r') \
5144                      || ('s' <= (c) && (c) <= 'z'))
5145 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5146 #endif
5147
5148 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5149 int
5150 main ()
5151 {
5152   int i;
5153   for (i = 0; i < 256; i++)
5154     if (XOR (islower (i), ISLOWER (i))
5155         || toupper (i) != TOUPPER (i))
5156       return 2;
5157   return 0;
5158 }
5159 _ACEOF
5160 if ac_fn_c_try_run "$LINENO"; then :
5161
5162 else
5163   ac_cv_header_stdc=no
5164 fi
5165 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5166   conftest.$ac_objext conftest.beam conftest.$ac_ext
5167 fi
5168
5169 fi
5170 fi
5171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5172 $as_echo "$ac_cv_header_stdc" >&6; }
5173 if test $ac_cv_header_stdc = yes; then
5174
5175 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5176
5177 fi
5178
5179 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5180 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5181                   inttypes.h stdint.h unistd.h
5182 do :
5183   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5184 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5185 "
5186 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5187   cat >>confdefs.h <<_ACEOF
5188 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5189 _ACEOF
5190
5191 fi
5192
5193 done
5194
5195
5196 for ac_header in unistd.h
5197 do :
5198   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
5199 if test "x$ac_cv_header_unistd_h" = xyes; then :
5200   cat >>confdefs.h <<_ACEOF
5201 #define HAVE_UNISTD_H 1
5202 _ACEOF
5203
5204 fi
5205
5206 done
5207
5208 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
5209 if test "x$ac_cv_type_mode_t" = xyes; then :
5210
5211 else
5212
5213 cat >>confdefs.h <<_ACEOF
5214 #define mode_t int
5215 _ACEOF
5216
5217 fi
5218
5219 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
5220 if test "x$ac_cv_type_pid_t" = xyes; then :
5221
5222 else
5223
5224 cat >>confdefs.h <<_ACEOF
5225 #define pid_t int
5226 _ACEOF
5227
5228 fi
5229
5230 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
5231 if test "x$ac_cv_type_size_t" = xyes; then :
5232
5233 else
5234
5235 cat >>confdefs.h <<_ACEOF
5236 #define size_t unsigned int
5237 _ACEOF
5238
5239 fi
5240
5241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
5242 $as_echo_n "checking return type of signal handlers... " >&6; }
5243 if ${ac_cv_type_signal+:} false; then :
5244   $as_echo_n "(cached) " >&6
5245 else
5246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5247 /* end confdefs.h.  */
5248 #include <sys/types.h>
5249 #include <signal.h>
5250
5251 int
5252 main ()
5253 {
5254 return *(signal (0, 0)) (0) == 1;
5255   ;
5256   return 0;
5257 }
5258 _ACEOF
5259 if ac_fn_c_try_compile "$LINENO"; then :
5260   ac_cv_type_signal=int
5261 else
5262   ac_cv_type_signal=void
5263 fi
5264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5265 fi
5266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
5267 $as_echo "$ac_cv_type_signal" >&6; }
5268
5269 cat >>confdefs.h <<_ACEOF
5270 #define RETSIGTYPE $ac_cv_type_signal
5271 _ACEOF
5272
5273
5274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
5275 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5276 if ${ac_cv_header_time+:} false; then :
5277   $as_echo_n "(cached) " >&6
5278 else
5279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5280 /* end confdefs.h.  */
5281 #include <sys/types.h>
5282 #include <sys/time.h>
5283 #include <time.h>
5284
5285 int
5286 main ()
5287 {
5288 if ((struct tm *) 0)
5289 return 0;
5290   ;
5291   return 0;
5292 }
5293 _ACEOF
5294 if ac_fn_c_try_compile "$LINENO"; then :
5295   ac_cv_header_time=yes
5296 else
5297   ac_cv_header_time=no
5298 fi
5299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5300 fi
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
5302 $as_echo "$ac_cv_header_time" >&6; }
5303 if test $ac_cv_header_time = yes; then
5304
5305 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
5306
5307 fi
5308
5309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
5310 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5311 if ${ac_cv_header_sys_wait_h+:} false; then :
5312   $as_echo_n "(cached) " >&6
5313 else
5314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5315 /* end confdefs.h.  */
5316 #include <sys/types.h>
5317 #include <sys/wait.h>
5318 #ifndef WEXITSTATUS
5319 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5320 #endif
5321 #ifndef WIFEXITED
5322 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5323 #endif
5324
5325 int
5326 main ()
5327 {
5328   int s;
5329   wait (&s);
5330   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5331   ;
5332   return 0;
5333 }
5334 _ACEOF
5335 if ac_fn_c_try_compile "$LINENO"; then :
5336   ac_cv_header_sys_wait_h=yes
5337 else
5338   ac_cv_header_sys_wait_h=no
5339 fi
5340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5341 fi
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
5343 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
5344 if test $ac_cv_header_sys_wait_h = yes; then
5345
5346 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
5347
5348 fi
5349
5350 ac_header_dirent=no
5351 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5352   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
5354 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5355 if eval \${$as_ac_Header+:} false; then :
5356   $as_echo_n "(cached) " >&6
5357 else
5358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5359 /* end confdefs.h.  */
5360 #include <sys/types.h>
5361 #include <$ac_hdr>
5362
5363 int
5364 main ()
5365 {
5366 if ((DIR *) 0)
5367 return 0;
5368   ;
5369   return 0;
5370 }
5371 _ACEOF
5372 if ac_fn_c_try_compile "$LINENO"; then :
5373   eval "$as_ac_Header=yes"
5374 else
5375   eval "$as_ac_Header=no"
5376 fi
5377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5378 fi
5379 eval ac_res=\$$as_ac_Header
5380                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5381 $as_echo "$ac_res" >&6; }
5382 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5383   cat >>confdefs.h <<_ACEOF
5384 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5385 _ACEOF
5386
5387 ac_header_dirent=$ac_hdr; break
5388 fi
5389
5390 done
5391 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5392 if test $ac_header_dirent = dirent.h; then
5393   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
5394 $as_echo_n "checking for library containing opendir... " >&6; }
5395 if ${ac_cv_search_opendir+:} false; then :
5396   $as_echo_n "(cached) " >&6
5397 else
5398   ac_func_search_save_LIBS=$LIBS
5399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5400 /* end confdefs.h.  */
5401
5402 /* Override any GCC internal prototype to avoid an error.
5403    Use char because int might match the return type of a GCC
5404    builtin and then its argument prototype would still apply.  */
5405 #ifdef __cplusplus
5406 extern "C"
5407 #endif
5408 char opendir ();
5409 int
5410 main ()
5411 {
5412 return opendir ();
5413   ;
5414   return 0;
5415 }
5416 _ACEOF
5417 for ac_lib in '' dir; do
5418   if test -z "$ac_lib"; then
5419     ac_res="none required"
5420   else
5421     ac_res=-l$ac_lib
5422     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5423   fi
5424   if ac_fn_c_try_link "$LINENO"; then :
5425   ac_cv_search_opendir=$ac_res
5426 fi
5427 rm -f core conftest.err conftest.$ac_objext \
5428     conftest$ac_exeext
5429   if ${ac_cv_search_opendir+:} false; then :
5430   break
5431 fi
5432 done
5433 if ${ac_cv_search_opendir+:} false; then :
5434
5435 else
5436   ac_cv_search_opendir=no
5437 fi
5438 rm conftest.$ac_ext
5439 LIBS=$ac_func_search_save_LIBS
5440 fi
5441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
5442 $as_echo "$ac_cv_search_opendir" >&6; }
5443 ac_res=$ac_cv_search_opendir
5444 if test "$ac_res" != no; then :
5445   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5446
5447 fi
5448
5449 else
5450   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
5451 $as_echo_n "checking for library containing opendir... " >&6; }
5452 if ${ac_cv_search_opendir+:} false; then :
5453   $as_echo_n "(cached) " >&6
5454 else
5455   ac_func_search_save_LIBS=$LIBS
5456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5457 /* end confdefs.h.  */
5458
5459 /* Override any GCC internal prototype to avoid an error.
5460    Use char because int might match the return type of a GCC
5461    builtin and then its argument prototype would still apply.  */
5462 #ifdef __cplusplus
5463 extern "C"
5464 #endif
5465 char opendir ();
5466 int
5467 main ()
5468 {
5469 return opendir ();
5470   ;
5471   return 0;
5472 }
5473 _ACEOF
5474 for ac_lib in '' x; do
5475   if test -z "$ac_lib"; then
5476     ac_res="none required"
5477   else
5478     ac_res=-l$ac_lib
5479     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5480   fi
5481   if ac_fn_c_try_link "$LINENO"; then :
5482   ac_cv_search_opendir=$ac_res
5483 fi
5484 rm -f core conftest.err conftest.$ac_objext \
5485     conftest$ac_exeext
5486   if ${ac_cv_search_opendir+:} false; then :
5487   break
5488 fi
5489 done
5490 if ${ac_cv_search_opendir+:} false; then :
5491
5492 else
5493   ac_cv_search_opendir=no
5494 fi
5495 rm conftest.$ac_ext
5496 LIBS=$ac_func_search_save_LIBS
5497 fi
5498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
5499 $as_echo "$ac_cv_search_opendir" >&6; }
5500 ac_res=$ac_cv_search_opendir
5501 if test "$ac_res" != no; then :
5502   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5503
5504 fi
5505
5506 fi
5507
5508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call gettimeofday" >&5
5509 $as_echo_n "checking how to call gettimeofday... " >&6; }
5510   if ${ac_cv_gettimeofday_args+:} false; then :
5511   $as_echo_n "(cached) " >&6
5512 else
5513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5514 /* end confdefs.h.  */
5515 #include <stdlib.h>
5516                     #include <sys/time.h>
5517 int
5518 main ()
5519 {
5520 struct timeval tv; struct timezone tzp;
5521                     gettimeofday(&tv, &tzp);
5522   ;
5523   return 0;
5524 }
5525 _ACEOF
5526 if ac_fn_c_try_compile "$LINENO"; then :
5527   ac_gettimeofday_args=2
5528 else
5529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5530 /* end confdefs.h.  */
5531 #include <stdlib.h>
5532                                     #include <sys/time.h>
5533 int
5534 main ()
5535 {
5536 struct timeval tv; gettimeofday(&tv);
5537   ;
5538   return 0;
5539 }
5540 _ACEOF
5541 if ac_fn_c_try_compile "$LINENO"; then :
5542   ac_gettimeofday_args=1
5543 else
5544   ac_gettimeofday_args=0
5545 fi
5546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5547 fi
5548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5549     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5550 fi
5551
5552   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5553   if test "$ac_gettimeofday_args" = 1 ; then
5554     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5555
5556     { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
5557 $as_echo "one argument" >&6; }
5558   elif test "$ac_gettimeofday_args" = 2 ; then
5559     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5560
5561     $as_echo "#define GETTIMEOFDAY_TWO_ARGS 1" >>confdefs.h
5562
5563     { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
5564 $as_echo "two arguments" >&6; }
5565   else
5566     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
5567 $as_echo "unknown" >&6; }
5568   fi
5569
5570 # Check whether --enable-largefile was given.
5571 if test "${enable_largefile+set}" = set; then :
5572   enableval=$enable_largefile;
5573 fi
5574
5575 if test "$enable_largefile" != no; then
5576
5577   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5578 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5579 if ${ac_cv_sys_largefile_CC+:} false; then :
5580   $as_echo_n "(cached) " >&6
5581 else
5582   ac_cv_sys_largefile_CC=no
5583      if test "$GCC" != yes; then
5584        ac_save_CC=$CC
5585        while :; do
5586          # IRIX 6.2 and later do not support large files by default,
5587          # so use the C compiler's -n32 option if that helps.
5588          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5589 /* end confdefs.h.  */
5590 #include <sys/types.h>
5591  /* Check that off_t can represent 2**63 - 1 correctly.
5592     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5593     since some C++ compilers masquerading as C compilers
5594     incorrectly reject 9223372036854775807.  */
5595 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5596   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5597                        && LARGE_OFF_T % 2147483647 == 1)
5598                       ? 1 : -1];
5599 int
5600 main ()
5601 {
5602
5603   ;
5604   return 0;
5605 }
5606 _ACEOF
5607          if ac_fn_c_try_compile "$LINENO"; then :
5608   break
5609 fi
5610 rm -f core conftest.err conftest.$ac_objext
5611          CC="$CC -n32"
5612          if ac_fn_c_try_compile "$LINENO"; then :
5613   ac_cv_sys_largefile_CC=' -n32'; break
5614 fi
5615 rm -f core conftest.err conftest.$ac_objext
5616          break
5617        done
5618        CC=$ac_save_CC
5619        rm -rf conftest.$ac_ext
5620     fi
5621 fi
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5623 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5624   if test "$ac_cv_sys_largefile_CC" != no; then
5625     CC=$CC$ac_cv_sys_largefile_CC
5626   fi
5627
5628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5629 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5630 if ${ac_cv_sys_file_offset_bits+:} false; then :
5631   $as_echo_n "(cached) " >&6
5632 else
5633   while :; do
5634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5635 /* end confdefs.h.  */
5636 #include <sys/types.h>
5637  /* Check that off_t can represent 2**63 - 1 correctly.
5638     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5639     since some C++ compilers masquerading as C compilers
5640     incorrectly reject 9223372036854775807.  */
5641 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5642   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5643                        && LARGE_OFF_T % 2147483647 == 1)
5644                       ? 1 : -1];
5645 int
5646 main ()
5647 {
5648
5649   ;
5650   return 0;
5651 }
5652 _ACEOF
5653 if ac_fn_c_try_compile "$LINENO"; then :
5654   ac_cv_sys_file_offset_bits=no; break
5655 fi
5656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5657   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5658 /* end confdefs.h.  */
5659 #define _FILE_OFFSET_BITS 64
5660 #include <sys/types.h>
5661  /* Check that off_t can represent 2**63 - 1 correctly.
5662     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5663     since some C++ compilers masquerading as C compilers
5664     incorrectly reject 9223372036854775807.  */
5665 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5666   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5667                        && LARGE_OFF_T % 2147483647 == 1)
5668                       ? 1 : -1];
5669 int
5670 main ()
5671 {
5672
5673   ;
5674   return 0;
5675 }
5676 _ACEOF
5677 if ac_fn_c_try_compile "$LINENO"; then :
5678   ac_cv_sys_file_offset_bits=64; break
5679 fi
5680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5681   ac_cv_sys_file_offset_bits=unknown
5682   break
5683 done
5684 fi
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5686 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5687 case $ac_cv_sys_file_offset_bits in #(
5688   no | unknown) ;;
5689   *)
5690 cat >>confdefs.h <<_ACEOF
5691 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5692 _ACEOF
5693 ;;
5694 esac
5695 rm -rf conftest*
5696   if test $ac_cv_sys_file_offset_bits = unknown; then
5697     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5698 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5699 if ${ac_cv_sys_large_files+:} false; then :
5700   $as_echo_n "(cached) " >&6
5701 else
5702   while :; do
5703   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5704 /* end confdefs.h.  */
5705 #include <sys/types.h>
5706  /* Check that off_t can represent 2**63 - 1 correctly.
5707     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5708     since some C++ compilers masquerading as C compilers
5709     incorrectly reject 9223372036854775807.  */
5710 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5711   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5712                        && LARGE_OFF_T % 2147483647 == 1)
5713                       ? 1 : -1];
5714 int
5715 main ()
5716 {
5717
5718   ;
5719   return 0;
5720 }
5721 _ACEOF
5722 if ac_fn_c_try_compile "$LINENO"; then :
5723   ac_cv_sys_large_files=no; break
5724 fi
5725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5727 /* end confdefs.h.  */
5728 #define _LARGE_FILES 1
5729 #include <sys/types.h>
5730  /* Check that off_t can represent 2**63 - 1 correctly.
5731     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5732     since some C++ compilers masquerading as C compilers
5733     incorrectly reject 9223372036854775807.  */
5734 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5735   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5736                        && LARGE_OFF_T % 2147483647 == 1)
5737                       ? 1 : -1];
5738 int
5739 main ()
5740 {
5741
5742   ;
5743   return 0;
5744 }
5745 _ACEOF
5746 if ac_fn_c_try_compile "$LINENO"; then :
5747   ac_cv_sys_large_files=1; break
5748 fi
5749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5750   ac_cv_sys_large_files=unknown
5751   break
5752 done
5753 fi
5754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5755 $as_echo "$ac_cv_sys_large_files" >&6; }
5756 case $ac_cv_sys_large_files in #(
5757   no | unknown) ;;
5758   *)
5759 cat >>confdefs.h <<_ACEOF
5760 #define _LARGE_FILES $ac_cv_sys_large_files
5761 _ACEOF
5762 ;;
5763 esac
5764 rm -rf conftest*
5765   fi
5766
5767
5768 fi
5769
5770 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5771 do :
5772   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5773 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5774 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5775   cat >>confdefs.h <<_ACEOF
5776 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5777 _ACEOF
5778
5779 fi
5780 done
5781
5782 for ac_func in sigaction syslog realpath setrlimit
5783 do :
5784   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5785 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5786 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5787   cat >>confdefs.h <<_ACEOF
5788 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5789 _ACEOF
5790
5791 fi
5792 done
5793
5794 for ac_func in setlocale
5795 do :
5796   ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
5797 if test "x$ac_cv_func_setlocale" = xyes; then :
5798   cat >>confdefs.h <<_ACEOF
5799 #define HAVE_SETLOCALE 1
5800 _ACEOF
5801
5802 fi
5803 done
5804
5805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmp" >&5
5806 $as_echo_n "checking for struct icmp... " >&6; }
5807 if ${ac_cv_have_icmp+:} false; then :
5808   $as_echo_n "(cached) " >&6
5809 else
5810   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5811 /* end confdefs.h.  */
5812 #include <stdlib.h>
5813                    #include <stdio.h>
5814                    #include <math.h>
5815                    #include <unistd.h>
5816                    #include <limits.h>
5817                    #include <signal.h>
5818                    #include <fcntl.h>
5819                    #include <sys/types.h>
5820                    #include <sys/time.h>
5821                    #include <sys/ipc.h>
5822                    #include <sys/shm.h>
5823                    #include <sys/socket.h>
5824                    #include <netinet/in_systm.h>
5825                    #include <netinet/in.h>
5826                    #include <netinet/ip.h>
5827                    #include <netinet/ip_icmp.h>
5828                    #include <netinet/udp.h>
5829                    #include <arpa/inet.h>
5830                    #include <netdb.h>
5831 int
5832 main ()
5833 {
5834 struct icmp i;
5835                    struct sockaddr s;
5836                    struct sockaddr_in si;
5837                    struct ip ip;
5838                    i.icmp_type = ICMP_ECHO;
5839                    i.icmp_code = 0;
5840                    i.icmp_cksum = 0;
5841                    i.icmp_id = 0;
5842                    i.icmp_seq = 0;
5843                    si.sin_family = AF_INET;
5844                    #if defined(__DECC) || defined(_IP_VHL)
5845                    ip.ip_vhl = 0;
5846                    #else
5847                    ip.ip_hl = 0;
5848                    #endif
5849
5850   ;
5851   return 0;
5852 }
5853 _ACEOF
5854 if ac_fn_c_try_compile "$LINENO"; then :
5855   ac_cv_have_icmp=yes
5856 else
5857   ac_cv_have_icmp=no
5858 fi
5859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5860 fi
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmp" >&5
5862 $as_echo "$ac_cv_have_icmp" >&6; }
5863  if test "$ac_cv_have_icmp" = yes ; then
5864    $as_echo "#define HAVE_ICMP 1" >>confdefs.h
5865
5866  fi
5867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmphdr" >&5
5868 $as_echo_n "checking for struct icmphdr... " >&6; }
5869 if ${ac_cv_have_icmphdr+:} false; then :
5870   $as_echo_n "(cached) " >&6
5871 else
5872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5873 /* end confdefs.h.  */
5874 #include <stdlib.h>
5875                    #include <stdio.h>
5876                    #include <math.h>
5877                    #include <unistd.h>
5878                    #include <limits.h>
5879                    #include <signal.h>
5880                    #include <fcntl.h>
5881                    #include <sys/types.h>
5882                    #include <sys/time.h>
5883                    #include <sys/ipc.h>
5884                    #include <sys/shm.h>
5885                    #include <sys/socket.h>
5886                    #include <netinet/in_systm.h>
5887                    #include <netinet/in.h>
5888                    #include <netinet/ip.h>
5889                    #include <netinet/ip_icmp.h>
5890                    #include <netinet/udp.h>
5891                    #include <arpa/inet.h>
5892                    #include <netdb.h>
5893 int
5894 main ()
5895 {
5896 struct icmphdr i;
5897                    struct sockaddr s;
5898                    struct sockaddr_in si;
5899                    struct ip ip;
5900                    i.type = ICMP_ECHO;
5901                    i.code = 0;
5902                    i.checksum = 0;
5903                    i.un.echo.id = 0;
5904                    i.un.echo.sequence = 0;
5905                    si.sin_family = AF_INET;
5906                    ip.ip_hl = 0;
5907   ;
5908   return 0;
5909 }
5910 _ACEOF
5911 if ac_fn_c_try_compile "$LINENO"; then :
5912   ac_cv_have_icmphdr=yes
5913 else
5914   ac_cv_have_icmphdr=no
5915 fi
5916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5917 fi
5918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmphdr" >&5
5919 $as_echo "$ac_cv_have_icmphdr" >&6; }
5920  if test "$ac_cv_have_icmphdr" = yes ; then
5921    $as_echo "#define HAVE_ICMPHDR 1" >>confdefs.h
5922
5923  fi
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs" >&5
5925 $as_echo_n "checking for getifaddrs... " >&6; }
5926 if ${ac_cv_have_getifaddrs+:} false; then :
5927   $as_echo_n "(cached) " >&6
5928 else
5929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5930 /* end confdefs.h.  */
5931 #include <stdlib.h>
5932                    #include <unistd.h>
5933                    #include <arpa/inet.h>
5934                    #include <ifaddrs.h>
5935 int
5936 main ()
5937 {
5938 struct ifaddrs *ifa;
5939                    getifaddrs (&ifa);
5940                    ifa->ifa_next = 0;
5941                    ifa->ifa_addr->sa_family = 0;
5942   ;
5943   return 0;
5944 }
5945 _ACEOF
5946 if ac_fn_c_try_compile "$LINENO"; then :
5947   ac_cv_have_getifaddrs=yes
5948 else
5949   ac_cv_have_getifaddrs=no
5950 fi
5951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5952 fi
5953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getifaddrs" >&5
5954 $as_echo "$ac_cv_have_getifaddrs" >&6; }
5955  if test "$ac_cv_have_getifaddrs" = yes ; then
5956    $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
5957
5958  fi
5959 for ac_header in crypt.h sys/select.h
5960 do :
5961   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5962 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5963 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5964   cat >>confdefs.h <<_ACEOF
5965 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5966 _ACEOF
5967
5968 fi
5969
5970 done
5971
5972 for ac_prog in perl5 perl
5973 do
5974   # Extract the first word of "$ac_prog", so it can be a program name with args.
5975 set dummy $ac_prog; ac_word=$2
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977 $as_echo_n "checking for $ac_word... " >&6; }
5978 if ${ac_cv_path_PERL+:} false; then :
5979   $as_echo_n "(cached) " >&6
5980 else
5981   case $PERL in
5982   [\\/]* | ?:[\\/]*)
5983   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5984   ;;
5985   *)
5986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987 for as_dir in $PATH
5988 do
5989   IFS=$as_save_IFS
5990   test -z "$as_dir" && as_dir=.
5991     for ac_exec_ext in '' $ac_executable_extensions; do
5992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5993     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5995     break 2
5996   fi
5997 done
5998   done
5999 IFS=$as_save_IFS
6000
6001   ;;
6002 esac
6003 fi
6004 PERL=$ac_cv_path_PERL
6005 if test -n "$PERL"; then
6006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
6007 $as_echo "$PERL" >&6; }
6008 else
6009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6010 $as_echo "no" >&6; }
6011 fi
6012
6013
6014   test -n "$PERL" && break
6015 done
6016
6017   if test -z "$PERL" ; then
6018     PERL_VERSION=0
6019   else
6020     { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5
6021 $as_echo_n "checking perl version... " >&6; }
6022 if ${ac_cv_perl_version+:} false; then :
6023   $as_echo_n "(cached) " >&6
6024 else
6025   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6026 fi
6027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_perl_version" >&5
6028 $as_echo "$ac_cv_perl_version" >&6; }
6029     PERL_VERSION=$ac_cv_perl_version
6030   fi
6031
6032
6033 if test -z "$PERL" ; then
6034   # don't let it be blank...
6035   PERL=/usr/bin/perl
6036 fi
6037
6038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
6039 $as_echo_n "checking for X... " >&6; }
6040
6041
6042 # Check whether --with-x was given.
6043 if test "${with_x+set}" = set; then :
6044   withval=$with_x;
6045 fi
6046
6047 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6048 if test "x$with_x" = xno; then
6049   # The user explicitly disabled X.
6050   have_x=disabled
6051 else
6052   case $x_includes,$x_libraries in #(
6053     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
6054     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
6055   $as_echo_n "(cached) " >&6
6056 else
6057   # One or both of the vars are not set, and there is no cached value.
6058 ac_x_includes=no ac_x_libraries=no
6059 rm -f -r conftest.dir
6060 if mkdir conftest.dir; then
6061   cd conftest.dir
6062   cat >Imakefile <<'_ACEOF'
6063 incroot:
6064         @echo incroot='${INCROOT}'
6065 usrlibdir:
6066         @echo usrlibdir='${USRLIBDIR}'
6067 libdir:
6068         @echo libdir='${LIBDIR}'
6069 _ACEOF
6070   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6071     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6072     for ac_var in incroot usrlibdir libdir; do
6073       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6074     done
6075     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6076     for ac_extension in a so sl dylib la dll; do
6077       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6078          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6079         ac_im_usrlibdir=$ac_im_libdir; break
6080       fi
6081     done
6082     # Screen out bogus values from the imake configuration.  They are
6083     # bogus both because they are the default anyway, and because
6084     # using them would break gcc on systems where it needs fixed includes.
6085     case $ac_im_incroot in
6086         /usr/include) ac_x_includes= ;;
6087         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6088     esac
6089     case $ac_im_usrlibdir in
6090         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6091         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6092     esac
6093   fi
6094   cd ..
6095   rm -f -r conftest.dir
6096 fi
6097
6098 # Standard set of common directories for X headers.
6099 # Check X11 before X11Rn because it is often a symlink to the current release.
6100 ac_x_header_dirs='
6101 /usr/X11/include
6102 /usr/X11R7/include
6103 /usr/X11R6/include
6104 /usr/X11R5/include
6105 /usr/X11R4/include
6106
6107 /usr/include/X11
6108 /usr/include/X11R7
6109 /usr/include/X11R6
6110 /usr/include/X11R5
6111 /usr/include/X11R4
6112
6113 /usr/local/X11/include
6114 /usr/local/X11R7/include
6115 /usr/local/X11R6/include
6116 /usr/local/X11R5/include
6117 /usr/local/X11R4/include
6118
6119 /usr/local/include/X11
6120 /usr/local/include/X11R7
6121 /usr/local/include/X11R6
6122 /usr/local/include/X11R5
6123 /usr/local/include/X11R4
6124
6125 /usr/X386/include
6126 /usr/x386/include
6127 /usr/XFree86/include/X11
6128
6129 /usr/include
6130 /usr/local/include
6131 /usr/unsupported/include
6132 /usr/athena/include
6133 /usr/local/x11r5/include
6134 /usr/lpp/Xamples/include
6135
6136 /usr/openwin/include
6137 /usr/openwin/share/include'
6138
6139 if test "$ac_x_includes" = no; then
6140   # Guess where to find include files, by looking for Xlib.h.
6141   # First, try using that file with no special directory specified.
6142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6143 /* end confdefs.h.  */
6144 #include <X11/Xlib.h>
6145 _ACEOF
6146 if ac_fn_c_try_cpp "$LINENO"; then :
6147   # We can compile using X headers with no special include directory.
6148 ac_x_includes=
6149 else
6150   for ac_dir in $ac_x_header_dirs; do
6151   if test -r "$ac_dir/X11/Xlib.h"; then
6152     ac_x_includes=$ac_dir
6153     break
6154   fi
6155 done
6156 fi
6157 rm -rf conftest.err conftest.i conftest.$ac_ext
6158 fi # $ac_x_includes = no
6159
6160 if test "$ac_x_libraries" = no; then
6161   # Check for the libraries.
6162   # See if we find them without any special options.
6163   # Don't add to $LIBS permanently.
6164   ac_save_LIBS=$LIBS
6165   LIBS="-lX11 $LIBS"
6166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6167 /* end confdefs.h.  */
6168 #include <X11/Xlib.h>
6169 int
6170 main ()
6171 {
6172 XrmInitialize ()
6173   ;
6174   return 0;
6175 }
6176 _ACEOF
6177 if ac_fn_c_try_link "$LINENO"; then :
6178   LIBS=$ac_save_LIBS
6179 # We can link X programs with no special library path.
6180 ac_x_libraries=
6181 else
6182   LIBS=$ac_save_LIBS
6183 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6184 do
6185   # Don't even attempt the hair of trying to link an X program!
6186   for ac_extension in a so sl dylib la dll; do
6187     if test -r "$ac_dir/libX11.$ac_extension"; then
6188       ac_x_libraries=$ac_dir
6189       break 2
6190     fi
6191   done
6192 done
6193 fi
6194 rm -f core conftest.err conftest.$ac_objext \
6195     conftest$ac_exeext conftest.$ac_ext
6196 fi # $ac_x_libraries = no
6197
6198 case $ac_x_includes,$ac_x_libraries in #(
6199   no,* | *,no | *\'*)
6200     # Didn't find X, or a directory has "'" in its name.
6201     ac_cv_have_x="have_x=no";; #(
6202   *)
6203     # Record where we found X for the cache.
6204     ac_cv_have_x="have_x=yes\
6205         ac_x_includes='$ac_x_includes'\
6206         ac_x_libraries='$ac_x_libraries'"
6207 esac
6208 fi
6209 ;; #(
6210     *) have_x=yes;;
6211   esac
6212   eval "$ac_cv_have_x"
6213 fi # $with_x != no
6214
6215 if test "$have_x" != yes; then
6216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
6217 $as_echo "$have_x" >&6; }
6218   no_x=yes
6219 else
6220   # If each of the values was on the command line, it overrides each guess.
6221   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6222   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6223   # Update the cache value to reflect the command line values.
6224   ac_cv_have_x="have_x=yes\
6225         ac_x_includes='$x_includes'\
6226         ac_x_libraries='$x_libraries'"
6227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
6228 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
6229 fi
6230
6231 if test "$no_x" = yes; then
6232   # Not all programs may use this symbol, but it does not hurt to define it.
6233
6234 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
6235
6236   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6237 else
6238   if test -n "$x_includes"; then
6239     X_CFLAGS="$X_CFLAGS -I$x_includes"
6240   fi
6241
6242   # It would also be nice to do this for all -L options, not just this one.
6243   if test -n "$x_libraries"; then
6244     X_LIBS="$X_LIBS -L$x_libraries"
6245     # For Solaris; some versions of Sun CC require a space after -R and
6246     # others require no space.  Words are not sufficient . . . .
6247     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
6248 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
6249     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6250     ac_xsave_c_werror_flag=$ac_c_werror_flag
6251     ac_c_werror_flag=yes
6252     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6253 /* end confdefs.h.  */
6254
6255 int
6256 main ()
6257 {
6258
6259   ;
6260   return 0;
6261 }
6262 _ACEOF
6263 if ac_fn_c_try_link "$LINENO"; then :
6264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6265 $as_echo "no" >&6; }
6266        X_LIBS="$X_LIBS -R$x_libraries"
6267 else
6268   LIBS="$ac_xsave_LIBS -R $x_libraries"
6269        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6270 /* end confdefs.h.  */
6271
6272 int
6273 main ()
6274 {
6275
6276   ;
6277   return 0;
6278 }
6279 _ACEOF
6280 if ac_fn_c_try_link "$LINENO"; then :
6281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6282 $as_echo "yes" >&6; }
6283           X_LIBS="$X_LIBS -R $x_libraries"
6284 else
6285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
6286 $as_echo "neither works" >&6; }
6287 fi
6288 rm -f core conftest.err conftest.$ac_objext \
6289     conftest$ac_exeext conftest.$ac_ext
6290 fi
6291 rm -f core conftest.err conftest.$ac_objext \
6292     conftest$ac_exeext conftest.$ac_ext
6293     ac_c_werror_flag=$ac_xsave_c_werror_flag
6294     LIBS=$ac_xsave_LIBS
6295   fi
6296
6297   # Check for system-dependent libraries X programs must link with.
6298   # Do this before checking for the system-independent R6 libraries
6299   # (-lICE), since we may need -lsocket or whatever for X linking.
6300
6301   if test "$ISC" = yes; then
6302     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6303   else
6304     # Martyn Johnson says this is needed for Ultrix, if the X
6305     # libraries were built with DECnet support.  And Karl Berry says
6306     # the Alpha needs dnet_stub (dnet does not exist).
6307     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6308     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6309 /* end confdefs.h.  */
6310
6311 /* Override any GCC internal prototype to avoid an error.
6312    Use char because int might match the return type of a GCC
6313    builtin and then its argument prototype would still apply.  */
6314 #ifdef __cplusplus
6315 extern "C"
6316 #endif
6317 char XOpenDisplay ();
6318 int
6319 main ()
6320 {
6321 return XOpenDisplay ();
6322   ;
6323   return 0;
6324 }
6325 _ACEOF
6326 if ac_fn_c_try_link "$LINENO"; then :
6327
6328 else
6329   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
6330 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
6331 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
6332   $as_echo_n "(cached) " >&6
6333 else
6334   ac_check_lib_save_LIBS=$LIBS
6335 LIBS="-ldnet  $LIBS"
6336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6337 /* end confdefs.h.  */
6338
6339 /* Override any GCC internal prototype to avoid an error.
6340    Use char because int might match the return type of a GCC
6341    builtin and then its argument prototype would still apply.  */
6342 #ifdef __cplusplus
6343 extern "C"
6344 #endif
6345 char dnet_ntoa ();
6346 int
6347 main ()
6348 {
6349 return dnet_ntoa ();
6350   ;
6351   return 0;
6352 }
6353 _ACEOF
6354 if ac_fn_c_try_link "$LINENO"; then :
6355   ac_cv_lib_dnet_dnet_ntoa=yes
6356 else
6357   ac_cv_lib_dnet_dnet_ntoa=no
6358 fi
6359 rm -f core conftest.err conftest.$ac_objext \
6360     conftest$ac_exeext conftest.$ac_ext
6361 LIBS=$ac_check_lib_save_LIBS
6362 fi
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6364 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6365 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
6366   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6367 fi
6368
6369     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6370       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
6371 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
6372 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
6373   $as_echo_n "(cached) " >&6
6374 else
6375   ac_check_lib_save_LIBS=$LIBS
6376 LIBS="-ldnet_stub  $LIBS"
6377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6378 /* end confdefs.h.  */
6379
6380 /* Override any GCC internal prototype to avoid an error.
6381    Use char because int might match the return type of a GCC
6382    builtin and then its argument prototype would still apply.  */
6383 #ifdef __cplusplus
6384 extern "C"
6385 #endif
6386 char dnet_ntoa ();
6387 int
6388 main ()
6389 {
6390 return dnet_ntoa ();
6391   ;
6392   return 0;
6393 }
6394 _ACEOF
6395 if ac_fn_c_try_link "$LINENO"; then :
6396   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6397 else
6398   ac_cv_lib_dnet_stub_dnet_ntoa=no
6399 fi
6400 rm -f core conftest.err conftest.$ac_objext \
6401     conftest$ac_exeext conftest.$ac_ext
6402 LIBS=$ac_check_lib_save_LIBS
6403 fi
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6405 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6406 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
6407   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6408 fi
6409
6410     fi
6411 fi
6412 rm -f core conftest.err conftest.$ac_objext \
6413     conftest$ac_exeext conftest.$ac_ext
6414     LIBS="$ac_xsave_LIBS"
6415
6416     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6417     # to get the SysV transport functions.
6418     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6419     # needs -lnsl.
6420     # The nsl library prevents programs from opening the X display
6421     # on Irix 5.2, according to T.E. Dickey.
6422     # The functions gethostbyname, getservbyname, and inet_addr are
6423     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6424     ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
6425 if test "x$ac_cv_func_gethostbyname" = xyes; then :
6426
6427 fi
6428
6429     if test $ac_cv_func_gethostbyname = no; then
6430       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
6431 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
6432 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
6433   $as_echo_n "(cached) " >&6
6434 else
6435   ac_check_lib_save_LIBS=$LIBS
6436 LIBS="-lnsl  $LIBS"
6437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6438 /* end confdefs.h.  */
6439
6440 /* Override any GCC internal prototype to avoid an error.
6441    Use char because int might match the return type of a GCC
6442    builtin and then its argument prototype would still apply.  */
6443 #ifdef __cplusplus
6444 extern "C"
6445 #endif
6446 char gethostbyname ();
6447 int
6448 main ()
6449 {
6450 return gethostbyname ();
6451   ;
6452   return 0;
6453 }
6454 _ACEOF
6455 if ac_fn_c_try_link "$LINENO"; then :
6456   ac_cv_lib_nsl_gethostbyname=yes
6457 else
6458   ac_cv_lib_nsl_gethostbyname=no
6459 fi
6460 rm -f core conftest.err conftest.$ac_objext \
6461     conftest$ac_exeext conftest.$ac_ext
6462 LIBS=$ac_check_lib_save_LIBS
6463 fi
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
6465 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
6466 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
6467   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6468 fi
6469
6470       if test $ac_cv_lib_nsl_gethostbyname = no; then
6471         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
6472 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
6473 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
6474   $as_echo_n "(cached) " >&6
6475 else
6476   ac_check_lib_save_LIBS=$LIBS
6477 LIBS="-lbsd  $LIBS"
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479 /* end confdefs.h.  */
6480
6481 /* Override any GCC internal prototype to avoid an error.
6482    Use char because int might match the return type of a GCC
6483    builtin and then its argument prototype would still apply.  */
6484 #ifdef __cplusplus
6485 extern "C"
6486 #endif
6487 char gethostbyname ();
6488 int
6489 main ()
6490 {
6491 return gethostbyname ();
6492   ;
6493   return 0;
6494 }
6495 _ACEOF
6496 if ac_fn_c_try_link "$LINENO"; then :
6497   ac_cv_lib_bsd_gethostbyname=yes
6498 else
6499   ac_cv_lib_bsd_gethostbyname=no
6500 fi
6501 rm -f core conftest.err conftest.$ac_objext \
6502     conftest$ac_exeext conftest.$ac_ext
6503 LIBS=$ac_check_lib_save_LIBS
6504 fi
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
6506 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
6507 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
6508   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6509 fi
6510
6511       fi
6512     fi
6513
6514     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6515     # socket/setsockopt and other routines are undefined under SCO ODT
6516     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6517     # on later versions), says Simon Leinen: it contains gethostby*
6518     # variants that don't use the name server (or something).  -lsocket
6519     # must be given before -lnsl if both are needed.  We assume that
6520     # if connect needs -lnsl, so does gethostbyname.
6521     ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
6522 if test "x$ac_cv_func_connect" = xyes; then :
6523
6524 fi
6525
6526     if test $ac_cv_func_connect = no; then
6527       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
6528 $as_echo_n "checking for connect in -lsocket... " >&6; }
6529 if ${ac_cv_lib_socket_connect+:} false; then :
6530   $as_echo_n "(cached) " >&6
6531 else
6532   ac_check_lib_save_LIBS=$LIBS
6533 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6535 /* end confdefs.h.  */
6536
6537 /* Override any GCC internal prototype to avoid an error.
6538    Use char because int might match the return type of a GCC
6539    builtin and then its argument prototype would still apply.  */
6540 #ifdef __cplusplus
6541 extern "C"
6542 #endif
6543 char connect ();
6544 int
6545 main ()
6546 {
6547 return connect ();
6548   ;
6549   return 0;
6550 }
6551 _ACEOF
6552 if ac_fn_c_try_link "$LINENO"; then :
6553   ac_cv_lib_socket_connect=yes
6554 else
6555   ac_cv_lib_socket_connect=no
6556 fi
6557 rm -f core conftest.err conftest.$ac_objext \
6558     conftest$ac_exeext conftest.$ac_ext
6559 LIBS=$ac_check_lib_save_LIBS
6560 fi
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
6562 $as_echo "$ac_cv_lib_socket_connect" >&6; }
6563 if test "x$ac_cv_lib_socket_connect" = xyes; then :
6564   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6565 fi
6566
6567     fi
6568
6569     # Guillermo Gomez says -lposix is necessary on A/UX.
6570     ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
6571 if test "x$ac_cv_func_remove" = xyes; then :
6572
6573 fi
6574
6575     if test $ac_cv_func_remove = no; then
6576       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
6577 $as_echo_n "checking for remove in -lposix... " >&6; }
6578 if ${ac_cv_lib_posix_remove+:} false; then :
6579   $as_echo_n "(cached) " >&6
6580 else
6581   ac_check_lib_save_LIBS=$LIBS
6582 LIBS="-lposix  $LIBS"
6583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6584 /* end confdefs.h.  */
6585
6586 /* Override any GCC internal prototype to avoid an error.
6587    Use char because int might match the return type of a GCC
6588    builtin and then its argument prototype would still apply.  */
6589 #ifdef __cplusplus
6590 extern "C"
6591 #endif
6592 char remove ();
6593 int
6594 main ()
6595 {
6596 return remove ();
6597   ;
6598   return 0;
6599 }
6600 _ACEOF
6601 if ac_fn_c_try_link "$LINENO"; then :
6602   ac_cv_lib_posix_remove=yes
6603 else
6604   ac_cv_lib_posix_remove=no
6605 fi
6606 rm -f core conftest.err conftest.$ac_objext \
6607     conftest$ac_exeext conftest.$ac_ext
6608 LIBS=$ac_check_lib_save_LIBS
6609 fi
6610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
6611 $as_echo "$ac_cv_lib_posix_remove" >&6; }
6612 if test "x$ac_cv_lib_posix_remove" = xyes; then :
6613   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6614 fi
6615
6616     fi
6617
6618     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6619     ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
6620 if test "x$ac_cv_func_shmat" = xyes; then :
6621
6622 fi
6623
6624     if test $ac_cv_func_shmat = no; then
6625       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
6626 $as_echo_n "checking for shmat in -lipc... " >&6; }
6627 if ${ac_cv_lib_ipc_shmat+:} false; then :
6628   $as_echo_n "(cached) " >&6
6629 else
6630   ac_check_lib_save_LIBS=$LIBS
6631 LIBS="-lipc  $LIBS"
6632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6633 /* end confdefs.h.  */
6634
6635 /* Override any GCC internal prototype to avoid an error.
6636    Use char because int might match the return type of a GCC
6637    builtin and then its argument prototype would still apply.  */
6638 #ifdef __cplusplus
6639 extern "C"
6640 #endif
6641 char shmat ();
6642 int
6643 main ()
6644 {
6645 return shmat ();
6646   ;
6647   return 0;
6648 }
6649 _ACEOF
6650 if ac_fn_c_try_link "$LINENO"; then :
6651   ac_cv_lib_ipc_shmat=yes
6652 else
6653   ac_cv_lib_ipc_shmat=no
6654 fi
6655 rm -f core conftest.err conftest.$ac_objext \
6656     conftest$ac_exeext conftest.$ac_ext
6657 LIBS=$ac_check_lib_save_LIBS
6658 fi
6659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
6660 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
6661 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
6662   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6663 fi
6664
6665     fi
6666   fi
6667
6668   # Check for libraries that X11R6 Xt/Xaw programs need.
6669   ac_save_LDFLAGS=$LDFLAGS
6670   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6671   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6672   # check for ICE first), but we must link in the order -lSM -lICE or
6673   # we get undefined symbols.  So assume we have SM if we have ICE.
6674   # These have to be linked with before -lX11, unlike the other
6675   # libraries we check for below, so use a different variable.
6676   # John Interrante, Karl Berry
6677   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
6678 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
6679 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
6680   $as_echo_n "(cached) " >&6
6681 else
6682   ac_check_lib_save_LIBS=$LIBS
6683 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6685 /* end confdefs.h.  */
6686
6687 /* Override any GCC internal prototype to avoid an error.
6688    Use char because int might match the return type of a GCC
6689    builtin and then its argument prototype would still apply.  */
6690 #ifdef __cplusplus
6691 extern "C"
6692 #endif
6693 char IceConnectionNumber ();
6694 int
6695 main ()
6696 {
6697 return IceConnectionNumber ();
6698   ;
6699   return 0;
6700 }
6701 _ACEOF
6702 if ac_fn_c_try_link "$LINENO"; then :
6703   ac_cv_lib_ICE_IceConnectionNumber=yes
6704 else
6705   ac_cv_lib_ICE_IceConnectionNumber=no
6706 fi
6707 rm -f core conftest.err conftest.$ac_objext \
6708     conftest$ac_exeext conftest.$ac_ext
6709 LIBS=$ac_check_lib_save_LIBS
6710 fi
6711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6712 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
6713 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
6714   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6715 fi
6716
6717   LDFLAGS=$ac_save_LDFLAGS
6718
6719 fi
6720
6721
6722 if test "$have_x" != yes; then
6723   as_fn_error $? "Couldn't find X11 headers/libs.  Try \`$0 --help'." "$LINENO" 5
6724 fi
6725
6726
6727     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X app-defaults directory" >&5
6728 $as_echo_n "checking for X app-defaults directory... " >&6; }
6729 if ${ac_cv_x_app_defaults+:} false; then :
6730   $as_echo_n "(cached) " >&6
6731 else
6732
6733   rm -fr conftestdir
6734   if mkdir conftestdir; then
6735     cd conftestdir 2>/dev/null
6736     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6737     cat > Imakefile <<'EOF'
6738 acfindx:
6739         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6740 EOF
6741     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6742       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6743       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6744     fi
6745     cd .. 2>/dev/null
6746     rm -fr conftestdir
6747   fi
6748       if test x"$ac_x_app_defaults" = x; then
6749
6750   # Look for the directory under a standard set of common directories.
6751   # Check X11 before X11Rn because it's often a symlink to the current release.
6752   for ac_dir in                                 \
6753     /usr/X11/lib/app-defaults                   \
6754     /usr/X11R6/lib/app-defaults                 \
6755     /usr/X11R6/lib/X11/app-defaults             \
6756     /usr/X11R5/lib/app-defaults                 \
6757     /usr/X11R5/lib/X11/app-defaults             \
6758     /usr/X11R4/lib/app-defaults                 \
6759     /usr/X11R4/lib/X11/app-defaults             \
6760                                                 \
6761     /usr/lib/X11/app-defaults                   \
6762     /usr/lib/X11R6/app-defaults                 \
6763     /usr/lib/X11R5/app-defaults                 \
6764     /usr/lib/X11R4/app-defaults                 \
6765                                                 \
6766     /usr/local/X11/lib/app-defaults             \
6767     /usr/local/X11R6/lib/app-defaults           \
6768     /usr/local/X11R5/lib/app-defaults           \
6769     /usr/local/X11R4/lib/app-defaults           \
6770                                                 \
6771     /usr/local/lib/X11/app-defaults             \
6772     /usr/local/lib/X11R6/app-defaults           \
6773     /usr/local/lib/X11R6/X11/app-defaults       \
6774     /usr/local/lib/X11R5/app-defaults           \
6775     /usr/local/lib/X11R5/X11/app-defaults       \
6776     /usr/local/lib/X11R4/app-defaults           \
6777     /usr/local/lib/X11R4/X11/app-defaults       \
6778                                                 \
6779     /usr/X386/lib/X11/app-defaults              \
6780     /usr/x386/lib/X11/app-defaults              \
6781     /usr/XFree86/lib/X11/app-defaults           \
6782                                                 \
6783     /usr/lib/X11/app-defaults                   \
6784     /usr/local/lib/X11/app-defaults             \
6785     /usr/unsupported/lib/X11/app-defaults       \
6786     /usr/athena/lib/X11/app-defaults            \
6787     /usr/local/x11r5/lib/X11/app-defaults       \
6788     /usr/lpp/Xamples/lib/X11/app-defaults       \
6789     /lib/usr/lib/X11/app-defaults               \
6790                                                 \
6791     /usr/openwin/lib/app-defaults               \
6792     /usr/openwin/lib/X11/app-defaults           \
6793     /usr/openwin/share/lib/app-defaults         \
6794     /usr/openwin/share/lib/X11/app-defaults     \
6795                                                 \
6796     /X11R6/lib/app-defaults                     \
6797     /X11R5/lib/app-defaults                     \
6798     /X11R4/lib/app-defaults                     \
6799     ; \
6800   do
6801     if test -d "$ac_dir"; then
6802       ac_x_app_defaults=$ac_dir
6803       break
6804     fi
6805   done
6806
6807       fi
6808       if test x"$ac_x_app_defaults" = x; then
6809         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6810       else
6811         # Record where we found app-defaults for the cache.
6812         ac_cv_x_app_defaults="$ac_x_app_defaults"
6813       fi
6814 fi
6815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x_app_defaults" >&5
6816 $as_echo "$ac_cv_x_app_defaults" >&6; }
6817     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6818 case "$host" in
6819     *-hpux*)
6820
6821       # The following arcana was gleaned from conversations with
6822       # Eric Schwartz <erics@col.hp.com>:
6823       #
6824       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6825       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6826       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6827       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6828       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6829       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6830       # you don't need any -I or -L arguments.
6831       #
6832       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6833       # are the same division as 10.x.  However, there are no symlinks to
6834       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6835       # arguments are always necessary.
6836       #
6837       # However, X11R6 was available on HPUX 9.x as a patch: if that
6838       # patch was installed, then all of X11R6 went in to
6839       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6840       #
6841       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6842       # whether R5 was available as a patch; R6 undoubtedly was not.)
6843       #
6844       # So.  We try and use the highest numbered pair of
6845       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6846       # that are available.  We do not mix and match different versions
6847       # of X.
6848       #
6849       # Question I still don't know the answer to: (do you?)
6850       #
6851       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6852       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6853       #     that contrib directory?  Did it contain so-called "standard"
6854       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6855       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6856       #     be a situation where one had to reach into the R5 headers and
6857       #     libs to find Xmu?  That is, must both R6 and R5 directories
6858       #     be on the -I and -L lists in that case?
6859       #
6860       for version in X11R6 X11R5 X11R4 ; do
6861         # if either pair of directories exists...
6862         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6863         then
6864            # if contrib exists, use it...
6865            if test -d /usr/contrib/$version/include ; then
6866              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6867              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6868            fi
6869            # if the "standard" one exists, use it.
6870            if test -d /usr/include/$version ; then
6871              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6872              X_LIBS="$X_LIBS -L/usr/lib/$version"
6873            fi
6874            # since at least one of the pair exists, go no farther.
6875            break
6876         fi
6877       done
6878
6879       # Now find Motif.  Thanks for not making xmkmf find this by
6880       # default, you losers.
6881       #
6882       if test -d /usr/include/Motif2.1 ; then
6883         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6884         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6885       elif test -d /usr/include/Motif1.2 ; then
6886         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6887         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6888       elif test -d /usr/include/Motif1.1 ; then
6889         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6890         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6891       fi
6892
6893       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6894       #
6895       if test -d /opt/graphics/OpenGL/include ; then
6896         # HP-UX 10.20 puts it here
6897         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6898         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6899       elif test -d /opt/Mesa/lib ; then
6900         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6901         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6902       fi
6903
6904
6905       if test -d /opt/xpm/lib/X11 ; then
6906         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6907         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6908       fi
6909
6910       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6911       # in /usr/local/, unless there is already an xscreensaver in
6912       # /usr/local/bin/.  This can be overridden with the --prefix arg
6913       # to configure.  I'm not sure this is the right thing to do, but
6914       # Richard Lloyd says so...
6915       #
6916       if test \! -x /usr/local/bin/xscreensaver ; then
6917         ac_default_prefix=/opt/xscreensaver
6918       fi
6919
6920     ;;
6921     *-solaris*)
6922
6923       # Thanks for not making xmkmf find this by default, pinheads.
6924       # And thanks for moving things around again, too.  Is this
6925       # really the standard location now?  What happened to the
6926       # joke that this kind of thing went in /opt?
6927       # cthomp says "answer: CDE (Common Disorganized Environment)"
6928       #
6929       if test -f /usr/dt/include/Xm/Xm.h ; then
6930         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6931         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6932
6933         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6934         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcmp in -lgen" >&5
6935 $as_echo_n "checking for regcmp in -lgen... " >&6; }
6936 if ${ac_cv_lib_gen_regcmp+:} false; then :
6937   $as_echo_n "(cached) " >&6
6938 else
6939   ac_check_lib_save_LIBS=$LIBS
6940 LIBS="-lgen  $LIBS"
6941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6942 /* end confdefs.h.  */
6943
6944 /* Override any GCC internal prototype to avoid an error.
6945    Use char because int might match the return type of a GCC
6946    builtin and then its argument prototype would still apply.  */
6947 #ifdef __cplusplus
6948 extern "C"
6949 #endif
6950 char regcmp ();
6951 int
6952 main ()
6953 {
6954 return regcmp ();
6955   ;
6956   return 0;
6957 }
6958 _ACEOF
6959 if ac_fn_c_try_link "$LINENO"; then :
6960   ac_cv_lib_gen_regcmp=yes
6961 else
6962   ac_cv_lib_gen_regcmp=no
6963 fi
6964 rm -f core conftest.err conftest.$ac_objext \
6965     conftest$ac_exeext conftest.$ac_ext
6966 LIBS=$ac_check_lib_save_LIBS
6967 fi
6968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_regcmp" >&5
6969 $as_echo "$ac_cv_lib_gen_regcmp" >&6; }
6970 if test "x$ac_cv_lib_gen_regcmp" = xyes; then :
6971   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6972 fi
6973
6974       fi
6975
6976     ;;
6977     *-darwin*)
6978
6979       # On MacOS X (10.x with "fink"), many things are under /sw/.
6980       #
6981       if test -d /sw/include ; then
6982         X_CFLAGS="-I/sw/include $X_CFLAGS"
6983         X_LIBS="-L/sw/lib $X_LIBS"
6984       fi
6985     ;;
6986   esac
6987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPointer" >&5
6988 $as_echo_n "checking for XPointer... " >&6; }
6989 if ${ac_cv_xpointer+:} false; then :
6990   $as_echo_n "(cached) " >&6
6991 else
6992
6993   ac_save_CPPFLAGS="$CPPFLAGS"
6994   if test \! -z "$includedir" ; then
6995     CPPFLAGS="$CPPFLAGS -I$includedir"
6996   fi
6997   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6998   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
6999   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7000 /* end confdefs.h.  */
7001 #include <X11/Xlib.h>
7002 int
7003 main ()
7004 {
7005 XPointer foo = (XPointer) 0;
7006   ;
7007   return 0;
7008 }
7009 _ACEOF
7010 if ac_fn_c_try_compile "$LINENO"; then :
7011   ac_cv_xpointer=yes
7012 else
7013   ac_cv_xpointer=no
7014 fi
7015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7016   CPPFLAGS="$ac_save_CPPFLAGS"
7017 fi
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xpointer" >&5
7019 $as_echo "$ac_cv_xpointer" >&6; }
7020   if test "$ac_cv_xpointer" != yes; then
7021    $as_echo "#define XPointer char*" >>confdefs.h
7022
7023   fi
7024
7025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is MacOS X" >&5
7026 $as_echo_n "checking whether this is MacOS X... " >&6; }
7027   ac_macosx=no
7028   case "$host" in
7029     *-apple-darwin* )
7030       ac_macosx=yes
7031     ;;
7032   esac
7033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_macosx" >&5
7034 $as_echo "$ac_macosx" >&6; }
7035
7036
7037 ###############################################################################
7038 #
7039 #       Gettext support
7040 #
7041 ###############################################################################
7042
7043
7044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
7045 $as_echo_n "checking whether NLS is requested... " >&6; }
7046     # Check whether --enable-nls was given.
7047 if test "${enable_nls+set}" = set; then :
7048   enableval=$enable_nls; USE_NLS=$enableval
7049 else
7050   USE_NLS=yes
7051 fi
7052
7053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
7054 $as_echo "$USE_NLS" >&6; }
7055
7056
7057
7058
7059 case "$am__api_version" in
7060     1.01234)
7061         as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5
7062     ;;
7063     *)
7064     ;;
7065 esac
7066
7067 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7068 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
7069 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7070 if test -n ""; then
7071     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= " >&5
7072 $as_echo_n "checking for intltool >= ... " >&6; }
7073     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5
7074 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
7075     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
7076         as_fn_error $? "Your intltool is too old.  You need intltool  or later." "$LINENO" 5
7077 fi
7078
7079 # Extract the first word of "intltool-update", so it can be a program name with args.
7080 set dummy intltool-update; ac_word=$2
7081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7082 $as_echo_n "checking for $ac_word... " >&6; }
7083 if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then :
7084   $as_echo_n "(cached) " >&6
7085 else
7086   case $INTLTOOL_UPDATE in
7087   [\\/]* | ?:[\\/]*)
7088   ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
7089   ;;
7090   *)
7091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7092 for as_dir in $PATH
7093 do
7094   IFS=$as_save_IFS
7095   test -z "$as_dir" && as_dir=.
7096     for ac_exec_ext in '' $ac_executable_extensions; do
7097   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7098     ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
7099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7100     break 2
7101   fi
7102 done
7103   done
7104 IFS=$as_save_IFS
7105
7106   ;;
7107 esac
7108 fi
7109 INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
7110 if test -n "$INTLTOOL_UPDATE"; then
7111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5
7112 $as_echo "$INTLTOOL_UPDATE" >&6; }
7113 else
7114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7115 $as_echo "no" >&6; }
7116 fi
7117
7118
7119 # Extract the first word of "intltool-merge", so it can be a program name with args.
7120 set dummy intltool-merge; ac_word=$2
7121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7122 $as_echo_n "checking for $ac_word... " >&6; }
7123 if ${ac_cv_path_INTLTOOL_MERGE+:} false; then :
7124   $as_echo_n "(cached) " >&6
7125 else
7126   case $INTLTOOL_MERGE in
7127   [\\/]* | ?:[\\/]*)
7128   ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
7129   ;;
7130   *)
7131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7132 for as_dir in $PATH
7133 do
7134   IFS=$as_save_IFS
7135   test -z "$as_dir" && as_dir=.
7136     for ac_exec_ext in '' $ac_executable_extensions; do
7137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7138     ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
7139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7140     break 2
7141   fi
7142 done
7143   done
7144 IFS=$as_save_IFS
7145
7146   ;;
7147 esac
7148 fi
7149 INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
7150 if test -n "$INTLTOOL_MERGE"; then
7151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5
7152 $as_echo "$INTLTOOL_MERGE" >&6; }
7153 else
7154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7155 $as_echo "no" >&6; }
7156 fi
7157
7158
7159 # Extract the first word of "intltool-extract", so it can be a program name with args.
7160 set dummy intltool-extract; ac_word=$2
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7162 $as_echo_n "checking for $ac_word... " >&6; }
7163 if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then :
7164   $as_echo_n "(cached) " >&6
7165 else
7166   case $INTLTOOL_EXTRACT in
7167   [\\/]* | ?:[\\/]*)
7168   ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
7169   ;;
7170   *)
7171   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7172 for as_dir in $PATH
7173 do
7174   IFS=$as_save_IFS
7175   test -z "$as_dir" && as_dir=.
7176     for ac_exec_ext in '' $ac_executable_extensions; do
7177   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7178     ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
7179     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7180     break 2
7181   fi
7182 done
7183   done
7184 IFS=$as_save_IFS
7185
7186   ;;
7187 esac
7188 fi
7189 INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
7190 if test -n "$INTLTOOL_EXTRACT"; then
7191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5
7192 $as_echo "$INTLTOOL_EXTRACT" >&6; }
7193 else
7194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7195 $as_echo "no" >&6; }
7196 fi
7197
7198
7199 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
7200     as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5
7201 fi
7202
7203 if test -z "$AM_DEFAULT_VERBOSITY"; then
7204   AM_DEFAULT_VERBOSITY=1
7205 fi
7206
7207
7208 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
7209 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
7210 INTLTOOL__v_MERGE_0='@echo "  ITMRG " $@;'
7211
7212
7213
7214
7215 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
7216 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
7217 intltool__v_merge_options_0='-q'
7218
7219
7220
7221
7222   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 $< $@'
7223 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 $< $@'
7224      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 $< $@'
7225      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 $< $@'
7226       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 $< $@'
7227      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 $< $@'
7228    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 $< $@'
7229     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 $< $@'
7230 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 $< $@'
7231        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 $< $@'
7232       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 $< $@'
7233 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
7234       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 $< $@'
7235 else
7236       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'
7237 fi
7238       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 $< $@'
7239       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 $< $@'
7240     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 $< $@'
7241   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 $< $@'
7242     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 $< $@'
7243     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 $< $@'
7244    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 $< $@'
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342 # Check the gettext tools to make sure they are GNU
7343 # Extract the first word of "xgettext", so it can be a program name with args.
7344 set dummy xgettext; ac_word=$2
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7346 $as_echo_n "checking for $ac_word... " >&6; }
7347 if ${ac_cv_path_XGETTEXT+:} false; then :
7348   $as_echo_n "(cached) " >&6
7349 else
7350   case $XGETTEXT in
7351   [\\/]* | ?:[\\/]*)
7352   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7353   ;;
7354   *)
7355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7356 for as_dir in $PATH
7357 do
7358   IFS=$as_save_IFS
7359   test -z "$as_dir" && as_dir=.
7360     for ac_exec_ext in '' $ac_executable_extensions; do
7361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7362     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
7363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7364     break 2
7365   fi
7366 done
7367   done
7368 IFS=$as_save_IFS
7369
7370   ;;
7371 esac
7372 fi
7373 XGETTEXT=$ac_cv_path_XGETTEXT
7374 if test -n "$XGETTEXT"; then
7375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
7376 $as_echo "$XGETTEXT" >&6; }
7377 else
7378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379 $as_echo "no" >&6; }
7380 fi
7381
7382
7383 # Extract the first word of "msgmerge", so it can be a program name with args.
7384 set dummy msgmerge; ac_word=$2
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7386 $as_echo_n "checking for $ac_word... " >&6; }
7387 if ${ac_cv_path_MSGMERGE+:} false; then :
7388   $as_echo_n "(cached) " >&6
7389 else
7390   case $MSGMERGE in
7391   [\\/]* | ?:[\\/]*)
7392   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
7393   ;;
7394   *)
7395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7396 for as_dir in $PATH
7397 do
7398   IFS=$as_save_IFS
7399   test -z "$as_dir" && as_dir=.
7400     for ac_exec_ext in '' $ac_executable_extensions; do
7401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7402     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
7403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7404     break 2
7405   fi
7406 done
7407   done
7408 IFS=$as_save_IFS
7409
7410   ;;
7411 esac
7412 fi
7413 MSGMERGE=$ac_cv_path_MSGMERGE
7414 if test -n "$MSGMERGE"; then
7415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
7416 $as_echo "$MSGMERGE" >&6; }
7417 else
7418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7419 $as_echo "no" >&6; }
7420 fi
7421
7422
7423 # Extract the first word of "msgfmt", so it can be a program name with args.
7424 set dummy msgfmt; ac_word=$2
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7426 $as_echo_n "checking for $ac_word... " >&6; }
7427 if ${ac_cv_path_MSGFMT+:} false; then :
7428   $as_echo_n "(cached) " >&6
7429 else
7430   case $MSGFMT in
7431   [\\/]* | ?:[\\/]*)
7432   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7433   ;;
7434   *)
7435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7436 for as_dir in $PATH
7437 do
7438   IFS=$as_save_IFS
7439   test -z "$as_dir" && as_dir=.
7440     for ac_exec_ext in '' $ac_executable_extensions; do
7441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7442     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
7443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7444     break 2
7445   fi
7446 done
7447   done
7448 IFS=$as_save_IFS
7449
7450   ;;
7451 esac
7452 fi
7453 MSGFMT=$ac_cv_path_MSGFMT
7454 if test -n "$MSGFMT"; then
7455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
7456 $as_echo "$MSGFMT" >&6; }
7457 else
7458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7459 $as_echo "no" >&6; }
7460 fi
7461
7462
7463 # Extract the first word of "gmsgfmt", so it can be a program name with args.
7464 set dummy gmsgfmt; ac_word=$2
7465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7466 $as_echo_n "checking for $ac_word... " >&6; }
7467 if ${ac_cv_path_GMSGFMT+:} false; then :
7468   $as_echo_n "(cached) " >&6
7469 else
7470   case $GMSGFMT in
7471   [\\/]* | ?:[\\/]*)
7472   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7473   ;;
7474   *)
7475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7476 for as_dir in $PATH
7477 do
7478   IFS=$as_save_IFS
7479   test -z "$as_dir" && as_dir=.
7480     for ac_exec_ext in '' $ac_executable_extensions; do
7481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7482     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7484     break 2
7485   fi
7486 done
7487   done
7488 IFS=$as_save_IFS
7489
7490   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7491   ;;
7492 esac
7493 fi
7494 GMSGFMT=$ac_cv_path_GMSGFMT
7495 if test -n "$GMSGFMT"; then
7496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
7497 $as_echo "$GMSGFMT" >&6; }
7498 else
7499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7500 $as_echo "no" >&6; }
7501 fi
7502
7503
7504 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
7505     as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
7506 fi
7507 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
7508 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
7509 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
7510 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
7511     as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
7512 fi
7513
7514 # Substitute ALL_LINGUAS so we can use it in po/Makefile
7515
7516
7517 # Set DATADIRNAME correctly if it is not set yet
7518 # (copied from glib-gettext.m4)
7519 if test -z "$DATADIRNAME"; then
7520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7521 /* end confdefs.h.  */
7522
7523 int
7524 main ()
7525 {
7526 extern int _nl_msg_cat_cntr;
7527                        return _nl_msg_cat_cntr
7528   ;
7529   return 0;
7530 }
7531 _ACEOF
7532 if ac_fn_c_try_link "$LINENO"; then :
7533   DATADIRNAME=share
7534 else
7535   case $host in
7536     *-*-solaris*)
7537                         ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7538 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7539   DATADIRNAME=share
7540 else
7541   DATADIRNAME=lib
7542 fi
7543
7544     ;;
7545     *)
7546     DATADIRNAME=lib
7547     ;;
7548     esac
7549 fi
7550 rm -f core conftest.err conftest.$ac_objext \
7551     conftest$ac_exeext conftest.$ac_ext
7552 fi
7553
7554
7555
7556
7557
7558 GETTEXT_PACKAGE=xscreensaver
7559
7560 cat >>confdefs.h <<_ACEOF
7561 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7562 _ACEOF
7563
7564
7565 cat >>confdefs.h <<_ACEOF
7566 #define PACKAGE "$GETTEXT_PACKAGE"
7567 _ACEOF
7568
7569
7570
7571 ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
7572
7573    for ac_header in locale.h
7574 do :
7575   ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
7576 if test "x$ac_cv_header_locale_h" = xyes; then :
7577   cat >>confdefs.h <<_ACEOF
7578 #define HAVE_LOCALE_H 1
7579 _ACEOF
7580
7581 fi
7582
7583 done
7584
7585     if test $ac_cv_header_locale_h = yes; then
7586     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
7587 $as_echo_n "checking for LC_MESSAGES... " >&6; }
7588 if ${am_cv_val_LC_MESSAGES+:} false; then :
7589   $as_echo_n "(cached) " >&6
7590 else
7591   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7592 /* end confdefs.h.  */
7593 #include <locale.h>
7594 int
7595 main ()
7596 {
7597 return LC_MESSAGES
7598   ;
7599   return 0;
7600 }
7601 _ACEOF
7602 if ac_fn_c_try_link "$LINENO"; then :
7603   am_cv_val_LC_MESSAGES=yes
7604 else
7605   am_cv_val_LC_MESSAGES=no
7606 fi
7607 rm -f core conftest.err conftest.$ac_objext \
7608     conftest$ac_exeext conftest.$ac_ext
7609 fi
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
7611 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
7612     if test $am_cv_val_LC_MESSAGES = yes; then
7613
7614 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
7615
7616     fi
7617   fi
7618      USE_NLS=yes
7619
7620
7621     gt_cv_have_gettext=no
7622
7623     CATOBJEXT=NONE
7624     XGETTEXT=:
7625     INTLLIBS=
7626
7627     ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
7628 if test "x$ac_cv_header_libintl_h" = xyes; then :
7629   gt_cv_func_dgettext_libintl="no"
7630       libintl_extra_libs=""
7631
7632       #
7633       # First check in libc
7634       #
7635       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
7636 $as_echo_n "checking for ngettext in libc... " >&6; }
7637 if ${gt_cv_func_ngettext_libc+:} false; then :
7638   $as_echo_n "(cached) " >&6
7639 else
7640   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7641 /* end confdefs.h.  */
7642
7643 #include <libintl.h>
7644
7645 int
7646 main ()
7647 {
7648 return !ngettext ("","", 1)
7649   ;
7650   return 0;
7651 }
7652 _ACEOF
7653 if ac_fn_c_try_link "$LINENO"; then :
7654   gt_cv_func_ngettext_libc=yes
7655 else
7656   gt_cv_func_ngettext_libc=no
7657 fi
7658 rm -f core conftest.err conftest.$ac_objext \
7659     conftest$ac_exeext conftest.$ac_ext
7660
7661 fi
7662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
7663 $as_echo "$gt_cv_func_ngettext_libc" >&6; }
7664
7665       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7666               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
7667 $as_echo_n "checking for dgettext in libc... " >&6; }
7668 if ${gt_cv_func_dgettext_libc+:} false; then :
7669   $as_echo_n "(cached) " >&6
7670 else
7671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7672 /* end confdefs.h.  */
7673
7674 #include <libintl.h>
7675
7676 int
7677 main ()
7678 {
7679 return !dgettext ("","")
7680   ;
7681   return 0;
7682 }
7683 _ACEOF
7684 if ac_fn_c_try_link "$LINENO"; then :
7685   gt_cv_func_dgettext_libc=yes
7686 else
7687   gt_cv_func_dgettext_libc=no
7688 fi
7689 rm -f core conftest.err conftest.$ac_objext \
7690     conftest$ac_exeext conftest.$ac_ext
7691
7692 fi
7693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
7694 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
7695       fi
7696
7697       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7698         for ac_func in bind_textdomain_codeset
7699 do :
7700   ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7701 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7702   cat >>confdefs.h <<_ACEOF
7703 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
7704 _ACEOF
7705
7706 fi
7707 done
7708
7709       fi
7710
7711       #
7712       # If we don't have everything we want, check in libintl
7713       #
7714       if test "$gt_cv_func_dgettext_libc" != "yes" \
7715          || test "$gt_cv_func_ngettext_libc" != "yes" \
7716          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7717
7718         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
7719 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
7720 if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
7721   $as_echo_n "(cached) " >&6
7722 else
7723   ac_check_lib_save_LIBS=$LIBS
7724 LIBS="-lintl  $LIBS"
7725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7726 /* end confdefs.h.  */
7727
7728 /* Override any GCC internal prototype to avoid an error.
7729    Use char because int might match the return type of a GCC
7730    builtin and then its argument prototype would still apply.  */
7731 #ifdef __cplusplus
7732 extern "C"
7733 #endif
7734 char bindtextdomain ();
7735 int
7736 main ()
7737 {
7738 return bindtextdomain ();
7739   ;
7740   return 0;
7741 }
7742 _ACEOF
7743 if ac_fn_c_try_link "$LINENO"; then :
7744   ac_cv_lib_intl_bindtextdomain=yes
7745 else
7746   ac_cv_lib_intl_bindtextdomain=no
7747 fi
7748 rm -f core conftest.err conftest.$ac_objext \
7749     conftest$ac_exeext conftest.$ac_ext
7750 LIBS=$ac_check_lib_save_LIBS
7751 fi
7752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
7753 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
7754 if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
7755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
7756 $as_echo_n "checking for ngettext in -lintl... " >&6; }
7757 if ${ac_cv_lib_intl_ngettext+:} false; then :
7758   $as_echo_n "(cached) " >&6
7759 else
7760   ac_check_lib_save_LIBS=$LIBS
7761 LIBS="-lintl  $LIBS"
7762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7763 /* end confdefs.h.  */
7764
7765 /* Override any GCC internal prototype to avoid an error.
7766    Use char because int might match the return type of a GCC
7767    builtin and then its argument prototype would still apply.  */
7768 #ifdef __cplusplus
7769 extern "C"
7770 #endif
7771 char ngettext ();
7772 int
7773 main ()
7774 {
7775 return ngettext ();
7776   ;
7777   return 0;
7778 }
7779 _ACEOF
7780 if ac_fn_c_try_link "$LINENO"; then :
7781   ac_cv_lib_intl_ngettext=yes
7782 else
7783   ac_cv_lib_intl_ngettext=no
7784 fi
7785 rm -f core conftest.err conftest.$ac_objext \
7786     conftest$ac_exeext conftest.$ac_ext
7787 LIBS=$ac_check_lib_save_LIBS
7788 fi
7789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
7790 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
7791 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
7792   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
7793 $as_echo_n "checking for dgettext in -lintl... " >&6; }
7794 if ${ac_cv_lib_intl_dgettext+:} false; then :
7795   $as_echo_n "(cached) " >&6
7796 else
7797   ac_check_lib_save_LIBS=$LIBS
7798 LIBS="-lintl  $LIBS"
7799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7800 /* end confdefs.h.  */
7801
7802 /* Override any GCC internal prototype to avoid an error.
7803    Use char because int might match the return type of a GCC
7804    builtin and then its argument prototype would still apply.  */
7805 #ifdef __cplusplus
7806 extern "C"
7807 #endif
7808 char dgettext ();
7809 int
7810 main ()
7811 {
7812 return dgettext ();
7813   ;
7814   return 0;
7815 }
7816 _ACEOF
7817 if ac_fn_c_try_link "$LINENO"; then :
7818   ac_cv_lib_intl_dgettext=yes
7819 else
7820   ac_cv_lib_intl_dgettext=no
7821 fi
7822 rm -f core conftest.err conftest.$ac_objext \
7823     conftest$ac_exeext conftest.$ac_ext
7824 LIBS=$ac_check_lib_save_LIBS
7825 fi
7826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
7827 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
7828 if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
7829   gt_cv_func_dgettext_libintl=yes
7830 fi
7831
7832 fi
7833
7834 fi
7835
7836
7837         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7838           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
7839 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
7840           { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
7841 $as_echo "" >&6; }
7842           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
7843 $as_echo_n "checking for ngettext in -lintl... " >&6; }
7844 if ${ac_cv_lib_intl_ngettext+:} false; then :
7845   $as_echo_n "(cached) " >&6
7846 else
7847   ac_check_lib_save_LIBS=$LIBS
7848 LIBS="-lintl -liconv $LIBS"
7849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7850 /* end confdefs.h.  */
7851
7852 /* Override any GCC internal prototype to avoid an error.
7853    Use char because int might match the return type of a GCC
7854    builtin and then its argument prototype would still apply.  */
7855 #ifdef __cplusplus
7856 extern "C"
7857 #endif
7858 char ngettext ();
7859 int
7860 main ()
7861 {
7862 return ngettext ();
7863   ;
7864   return 0;
7865 }
7866 _ACEOF
7867 if ac_fn_c_try_link "$LINENO"; then :
7868   ac_cv_lib_intl_ngettext=yes
7869 else
7870   ac_cv_lib_intl_ngettext=no
7871 fi
7872 rm -f core conftest.err conftest.$ac_objext \
7873     conftest$ac_exeext conftest.$ac_ext
7874 LIBS=$ac_check_lib_save_LIBS
7875 fi
7876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
7877 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
7878 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
7879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
7880 $as_echo_n "checking for dcgettext in -lintl... " >&6; }
7881 if ${ac_cv_lib_intl_dcgettext+:} false; then :
7882   $as_echo_n "(cached) " >&6
7883 else
7884   ac_check_lib_save_LIBS=$LIBS
7885 LIBS="-lintl -liconv $LIBS"
7886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7887 /* end confdefs.h.  */
7888
7889 /* Override any GCC internal prototype to avoid an error.
7890    Use char because int might match the return type of a GCC
7891    builtin and then its argument prototype would still apply.  */
7892 #ifdef __cplusplus
7893 extern "C"
7894 #endif
7895 char dcgettext ();
7896 int
7897 main ()
7898 {
7899 return dcgettext ();
7900   ;
7901   return 0;
7902 }
7903 _ACEOF
7904 if ac_fn_c_try_link "$LINENO"; then :
7905   ac_cv_lib_intl_dcgettext=yes
7906 else
7907   ac_cv_lib_intl_dcgettext=no
7908 fi
7909 rm -f core conftest.err conftest.$ac_objext \
7910     conftest$ac_exeext conftest.$ac_ext
7911 LIBS=$ac_check_lib_save_LIBS
7912 fi
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
7914 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
7915 if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
7916   gt_cv_func_dgettext_libintl=yes
7917                         libintl_extra_libs=-liconv
7918 else
7919   :
7920 fi
7921
7922 else
7923   :
7924 fi
7925
7926         fi
7927
7928         #
7929         # If we found libintl, then check in it for bind_textdomain_codeset();
7930         # we'll prefer libc if neither have bind_textdomain_codeset(),
7931         # and both have dgettext and ngettext
7932         #
7933         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7934           glib_save_LIBS="$LIBS"
7935           LIBS="$LIBS -lintl $libintl_extra_libs"
7936           unset ac_cv_func_bind_textdomain_codeset
7937           for ac_func in bind_textdomain_codeset
7938 do :
7939   ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7940 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7941   cat >>confdefs.h <<_ACEOF
7942 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
7943 _ACEOF
7944
7945 fi
7946 done
7947
7948           LIBS="$glib_save_LIBS"
7949
7950           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7951             gt_cv_func_dgettext_libc=no
7952           else
7953             if test "$gt_cv_func_dgettext_libc" = "yes" \
7954                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
7955               gt_cv_func_dgettext_libintl=no
7956             fi
7957           fi
7958         fi
7959       fi
7960
7961       if test "$gt_cv_func_dgettext_libc" = "yes" \
7962         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7963         gt_cv_have_gettext=yes
7964       fi
7965
7966       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7967         INTLLIBS="-lintl $libintl_extra_libs"
7968       fi
7969
7970       if test "$gt_cv_have_gettext" = "yes"; then
7971
7972 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
7973
7974         # Extract the first word of "msgfmt", so it can be a program name with args.
7975 set dummy msgfmt; ac_word=$2
7976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7977 $as_echo_n "checking for $ac_word... " >&6; }
7978 if ${ac_cv_path_MSGFMT+:} false; then :
7979   $as_echo_n "(cached) " >&6
7980 else
7981   case "$MSGFMT" in
7982   /*)
7983   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7984   ;;
7985   *)
7986   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7987   for ac_dir in $PATH; do
7988     test -z "$ac_dir" && ac_dir=.
7989     if test -f $ac_dir/$ac_word; then
7990       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7991         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7992         break
7993       fi
7994     fi
7995   done
7996   IFS="$ac_save_ifs"
7997   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7998   ;;
7999 esac
8000 fi
8001 MSGFMT="$ac_cv_path_MSGFMT"
8002 if test "$MSGFMT" != "no"; then
8003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
8004 $as_echo "$MSGFMT" >&6; }
8005 else
8006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8007 $as_echo "no" >&6; }
8008 fi
8009         if test "$MSGFMT" != "no"; then
8010           glib_save_LIBS="$LIBS"
8011           LIBS="$LIBS $INTLLIBS"
8012           for ac_func in dcgettext
8013 do :
8014   ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
8015 if test "x$ac_cv_func_dcgettext" = xyes; then :
8016   cat >>confdefs.h <<_ACEOF
8017 #define HAVE_DCGETTEXT 1
8018 _ACEOF
8019
8020 fi
8021 done
8022
8023           MSGFMT_OPTS=
8024           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
8025 $as_echo_n "checking if msgfmt accepts -c... " >&6; }
8026           cat >conftest.foo <<_ACEOF
8027
8028 msgid ""
8029 msgstr ""
8030 "Content-Type: text/plain; charset=UTF-8\n"
8031 "Project-Id-Version: test 1.0\n"
8032 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
8033 "Last-Translator: test <foo@bar.xx>\n"
8034 "Language-Team: C <LL@li.org>\n"
8035 "MIME-Version: 1.0\n"
8036 "Content-Transfer-Encoding: 8bit\n"
8037
8038 _ACEOF
8039 if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
8040   ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
8041   ac_status=$?
8042   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8043   test $ac_status = 0; }; then
8044   MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8045 $as_echo "yes" >&6; }
8046 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8047 $as_echo "no" >&6; }
8048 echo "$as_me: failed input was:" >&5
8049 sed 's/^/| /' conftest.foo >&5
8050 fi
8051
8052           # Extract the first word of "gmsgfmt", so it can be a program name with args.
8053 set dummy gmsgfmt; ac_word=$2
8054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8055 $as_echo_n "checking for $ac_word... " >&6; }
8056 if ${ac_cv_path_GMSGFMT+:} false; then :
8057   $as_echo_n "(cached) " >&6
8058 else
8059   case $GMSGFMT in
8060   [\\/]* | ?:[\\/]*)
8061   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8062   ;;
8063   *)
8064   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8065 for as_dir in $PATH
8066 do
8067   IFS=$as_save_IFS
8068   test -z "$as_dir" && as_dir=.
8069     for ac_exec_ext in '' $ac_executable_extensions; do
8070   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8071     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8072     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8073     break 2
8074   fi
8075 done
8076   done
8077 IFS=$as_save_IFS
8078
8079   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8080   ;;
8081 esac
8082 fi
8083 GMSGFMT=$ac_cv_path_GMSGFMT
8084 if test -n "$GMSGFMT"; then
8085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
8086 $as_echo "$GMSGFMT" >&6; }
8087 else
8088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8089 $as_echo "no" >&6; }
8090 fi
8091
8092
8093           # Extract the first word of "xgettext", so it can be a program name with args.
8094 set dummy xgettext; ac_word=$2
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8096 $as_echo_n "checking for $ac_word... " >&6; }
8097 if ${ac_cv_path_XGETTEXT+:} false; then :
8098   $as_echo_n "(cached) " >&6
8099 else
8100   case "$XGETTEXT" in
8101   /*)
8102   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8103   ;;
8104   *)
8105   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8106   for ac_dir in $PATH; do
8107     test -z "$ac_dir" && ac_dir=.
8108     if test -f $ac_dir/$ac_word; then
8109       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8110         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8111         break
8112       fi
8113     fi
8114   done
8115   IFS="$ac_save_ifs"
8116   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8117   ;;
8118 esac
8119 fi
8120 XGETTEXT="$ac_cv_path_XGETTEXT"
8121 if test "$XGETTEXT" != ":"; then
8122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
8123 $as_echo "$XGETTEXT" >&6; }
8124 else
8125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8126 $as_echo "no" >&6; }
8127 fi
8128
8129           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8130 /* end confdefs.h.  */
8131
8132 int
8133 main ()
8134 {
8135 extern int _nl_msg_cat_cntr;
8136                          return _nl_msg_cat_cntr
8137   ;
8138   return 0;
8139 }
8140 _ACEOF
8141 if ac_fn_c_try_link "$LINENO"; then :
8142   CATOBJEXT=.gmo
8143              DATADIRNAME=share
8144 else
8145   case $host in
8146             *-*-solaris*)
8147                                                                 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
8148 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
8149   CATOBJEXT=.gmo
8150                DATADIRNAME=share
8151 else
8152   CATOBJEXT=.mo
8153                DATADIRNAME=lib
8154 fi
8155
8156             ;;
8157             *-*-openbsd*)
8158             CATOBJEXT=.mo
8159             DATADIRNAME=share
8160             ;;
8161             *)
8162             CATOBJEXT=.mo
8163             DATADIRNAME=lib
8164             ;;
8165             esac
8166 fi
8167 rm -f core conftest.err conftest.$ac_objext \
8168     conftest$ac_exeext conftest.$ac_ext
8169           LIBS="$glib_save_LIBS"
8170           INSTOBJEXT=.mo
8171         else
8172           gt_cv_have_gettext=no
8173         fi
8174       fi
8175
8176 fi
8177
8178
8179
8180     if test "$gt_cv_have_gettext" = "yes" ; then
8181
8182 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
8183
8184     fi
8185
8186         if test "$XGETTEXT" != ":"; then
8187                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8188         : ;
8189       else
8190         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
8191 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
8192         XGETTEXT=":"
8193       fi
8194     fi
8195
8196     # We need to process the po/ directory.
8197     POSUB=po
8198
8199     ac_config_commands="$ac_config_commands default-1"
8200
8201
8202                 for lang in $ALL_LINGUAS; do
8203       GMOFILES="$GMOFILES $lang.gmo"
8204       POFILES="$POFILES $lang.po"
8205     done
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219    if test "$gt_cv_have_gettext" = "yes"; then
8220      if test "x$ALL_LINGUAS" = "x"; then
8221        LINGUAS=
8222      else
8223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
8224 $as_echo_n "checking for catalogs to be installed... " >&6; }
8225        NEW_LINGUAS=
8226        for presentlang in $ALL_LINGUAS; do
8227          useit=no
8228          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
8229            desiredlanguages="$LINGUAS"
8230          else
8231            desiredlanguages="$ALL_LINGUAS"
8232          fi
8233          for desiredlang in $desiredlanguages; do
8234            # Use the presentlang catalog if desiredlang is
8235            #   a. equal to presentlang, or
8236            #   b. a variant of presentlang (because in this case,
8237            #      presentlang can be used as a fallback for messages
8238            #      which are not translated in the desiredlang catalog).
8239            case "$desiredlang" in
8240              "$presentlang"*) useit=yes;;
8241            esac
8242          done
8243          if test $useit = yes; then
8244            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8245          fi
8246        done
8247        LINGUAS=$NEW_LINGUAS
8248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
8249 $as_echo "$LINGUAS" >&6; }
8250      fi
8251
8252           if test -n "$LINGUAS"; then
8253        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8254      fi
8255    fi
8256
8257             MKINSTALLDIRS=
8258    if test -n "$ac_aux_dir"; then
8259      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8260    fi
8261    if test -z "$MKINSTALLDIRS"; then
8262      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8263    fi
8264
8265
8266          test -d po || mkdir po
8267    if test "x$srcdir" != "x."; then
8268      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8269        posrcprefix="$srcdir/"
8270      else
8271        posrcprefix="../$srcdir/"
8272      fi
8273    else
8274      posrcprefix="../"
8275    fi
8276    rm -f po/POTFILES
8277    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8278         < $srcdir/po/POTFILES.in > po/POTFILES
8279
8280 MKINSTALLDIRS="$INSTALL_DIRS"
8281
8282
8283 ###############################################################################
8284 #
8285 #       Check for -lXmu (some fucked up vendors don't ship it...)
8286 #
8287 ###############################################################################
8288
8289 have_xmu=no
8290
8291   ac_save_CPPFLAGS="$CPPFLAGS"
8292   if test \! -z "$includedir" ; then
8293     CPPFLAGS="$CPPFLAGS -I$includedir"
8294   fi
8295   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8296   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8297   ac_fn_c_check_header_compile "$LINENO" "X11/Xmu/Error.h" "ac_cv_header_X11_Xmu_Error_h" "#include <stdlib.h>
8298                    #include <stdio.h>
8299                    #include <X11/Intrinsic.h>
8300 "
8301 if test "x$ac_cv_header_X11_Xmu_Error_h" = xyes; then :
8302   have_xmu=yes
8303 fi
8304
8305
8306   CPPFLAGS="$ac_save_CPPFLAGS"
8307 if test "$have_xmu" = no ; then
8308   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8309   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8310   XMU_LIBS=''
8311 else
8312   XMU_SRCS=''
8313   XMU_OBJS=''
8314   XMU_LIBS='-lXmu'
8315   $as_echo "#define HAVE_XMU 1" >>confdefs.h
8316
8317 fi
8318
8319
8320 ###############################################################################
8321 #
8322 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8323 #       See comp.windows.x FAQ question 124.  The right fix is to
8324 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8325 #
8326 ###############################################################################
8327
8328 if test "$have_xmu" = yes ; then
8329   case "$host" in
8330     *-sunos4*)
8331     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8332 $as_echo_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... " >&6; }
8333 if ${ac_cv_sunos_xmu_bug+:} false; then :
8334   $as_echo_n "(cached) " >&6
8335 else
8336   ac_save_LDFLAGS="$LDFLAGS"
8337                     if test \! -z "$x_libraries" ; then
8338                       LDFLAGS="$LDFLAGS -L$x_libraries"
8339                     fi
8340                     # Note: this trick never works!  (Generally.)
8341                     # We're only getting away with using AC_TRY_LINK
8342                     # with X libraries because we know it's SunOS.
8343                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8344                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8345 /* end confdefs.h.  */
8346
8347 int
8348 main ()
8349 {
8350
8351   ;
8352   return 0;
8353 }
8354 _ACEOF
8355 if ac_fn_c_try_link "$LINENO"; then :
8356   ac_cv_sunos_xmu_bug=no
8357 else
8358   ac_cv_sunos_xmu_bug=yes
8359 fi
8360 rm -f core conftest.err conftest.$ac_objext \
8361     conftest$ac_exeext conftest.$ac_ext
8362                     LDFLAGS="$ac_save_LDFLAGS"
8363 fi
8364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sunos_xmu_bug" >&5
8365 $as_echo "$ac_cv_sunos_xmu_bug" >&6; }
8366     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8367       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler understands -static" >&5
8368 $as_echo_n "checking whether the compiler understands -static... " >&6; }
8369 if ${ac_cv_ld_static+:} false; then :
8370   $as_echo_n "(cached) " >&6
8371 else
8372   ac_save_LDFLAGS="$LDFLAGS"
8373                       LDFLAGS="$LDFLAGS -static"
8374                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8375 /* end confdefs.h.  */
8376
8377 int
8378 main ()
8379 {
8380
8381   ;
8382   return 0;
8383 }
8384 _ACEOF
8385 if ac_fn_c_try_link "$LINENO"; then :
8386   ac_cv_ld_static=yes
8387 else
8388   ac_cv_ld_static=no
8389 fi
8390 rm -f core conftest.err conftest.$ac_objext \
8391     conftest$ac_exeext conftest.$ac_ext
8392                     LDFLAGS="$ac_save_LDFLAGS"
8393 fi
8394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ld_static" >&5
8395 $as_echo "$ac_cv_ld_static" >&6; }
8396       if test "$ac_cv_ld_static" = yes ; then
8397         LDFLAGS="$LDFLAGS -static"
8398       else
8399         LDFLAGS="$LDFLAGS -Bstatic"
8400       fi
8401     fi
8402     ;;
8403   esac
8404 fi
8405
8406
8407 ###############################################################################
8408 #
8409 #       Handle the --with-hackdir option
8410 #
8411 ###############################################################################
8412
8413 have_hackdir=yes
8414 with_hackdir_req=unspecified
8415
8416 # Check whether --with-hackdir was given.
8417 if test "${with_hackdir+set}" = set; then :
8418   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
8419 else
8420   with_hackdir=yes
8421 fi
8422
8423
8424 if test x"$with_hackdir" = xyes; then
8425   HACKDIR='${libexecdir}/xscreensaver'
8426 elif test x"$with_hackdir" = xno; then
8427   HACKDIR='${bindir}'
8428 else
8429   HACKDIR=$with_hackdir
8430 fi
8431
8432 # canonicalize slashes.
8433 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8434
8435 # Expand HACKDIR as HACKDIR_FULL
8436 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
8437
8438 # This option used to be called --enable-subdir; make sure that is no longer
8439 # used, since configure brain-damagedly ignores unknown --enable options.
8440
8441 obsolete_enable=
8442 # Check whether --enable-subdir was given.
8443 if test "${enable_subdir+set}" = set; then :
8444   enableval=$enable_subdir; obsolete_enable=yes
8445 fi
8446
8447 if test -n "$obsolete_enable"; then
8448   echo "error: the --enable-subdir option has been replaced with"
8449   echo "       the new --with-hackdir option; see \`configure --help'"
8450   echo "       for more information."
8451   exit 1
8452 fi
8453
8454
8455 ###############################################################################
8456 #
8457 #       Handle the --with-configdir option
8458 #       Help for --with-x-app-defaults option added.
8459 #
8460 ###############################################################################
8461
8462 have_configdir=yes
8463 with_configdir_req=unspecified
8464
8465 # Check whether --with-configdir was given.
8466 if test "${with_configdir+set}" = set; then :
8467   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
8468 else
8469   with_configdir=yes
8470 fi
8471
8472
8473 if test x"$with_configdir" = xyes; then
8474   HACK_CONF_DIR='${datadir}/xscreensaver/config'
8475 elif test x"$with_configdir" = xno; then
8476   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8477   exit 1
8478 else
8479   # there must be a better way than this...
8480   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8481     # absolute path
8482     HACK_CONF_DIR=$with_configdir
8483   else
8484     # relative path
8485     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8486   fi
8487 fi
8488
8489
8490
8491
8492 ###############################################################################
8493 #
8494 #       Check for the SGI SCREEN_SAVER server extension.
8495 #
8496 ###############################################################################
8497
8498 #have_sgi=no
8499 #with_sgi_req=unspecified
8500 #AC_ARG_WITH(sgi-ext,
8501 #[Except where noted, all of the --with options below can also take a
8502 #directory argument: for example, `--with-motif=/opt/Motif'.  That would
8503 #cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
8504 #to be added to the -L list, assuming those directories exist.
8505 #
8506 #By default, support for each of these options will be built in, if the
8507 #relevant library routines exist.  At run time, they will then be used
8508 #only if the X server being used supports them.  Each --with option has
8509 #a corresponding --without option, to override building support for them
8510 #at all.
8511 #
8512 #Screen blanking and idle-detection options:
8513 #
8514 #  --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.],
8515 #  [with_sgi="$withval"; with_sgi_req="$withval"],[with_sgi=yes])
8516 #
8517 #HANDLE_X_PATH_ARG(with_sgi, --with-sgi-ext, SGI SCREEN_SAVER)
8518 #
8519 #if test "$with_sgi" = yes; then
8520 #  AC_CHECK_X_HEADER(X11/extensions/XScreenSaver.h,
8521 #                    [have_sgi=yes
8522 #                     AC_DEFINE(HAVE_SGI_SAVER_EXTENSION)],,
8523 #                    [#include <X11/Xlib.h>])
8524 #
8525 #elif test "$with_sgi" != no; then
8526 #  echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8527 #  exit 1
8528 #fi
8529
8530
8531 ###############################################################################
8532 #
8533 #       Check for the XIDLE server extension.
8534 #
8535 ###############################################################################
8536
8537 #have_xidle=no
8538 #with_xidle_req=unspecified
8539 #AC_ARG_WITH(xidle-ext,
8540 #[  --with-xidle-ext        Include support for the XIDLE extension.],
8541 #  [with_xidle="$withval"; with_xidle_req="$withval"],[with_xidle=yes])
8542 #
8543 #HANDLE_X_PATH_ARG(with_xidle, --with-xidle-ext, XIDLE)
8544 #
8545 #if test "$with_xidle" = yes; then
8546 #  AC_CHECK_X_HEADER(X11/extensions/xidle.h,
8547 #                    [have_xidle=yes
8548 #                     AC_DEFINE(HAVE_XIDLE_EXTENSION)],,
8549 #                    [#include <X11/Xlib.h>])
8550 #elif test "$with_xidle" != no; then
8551 #  echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
8552 #  exit 1
8553 #fi
8554
8555
8556 ###############################################################################
8557 #
8558 #       Check for the SGI-VIDEO-CONTROL server extension.
8559 #
8560 ###############################################################################
8561
8562 #have_sgivc=no
8563 #with_sgivc_req=unspecified
8564 #AC_ARG_WITH(sgivc-ext,
8565 #[  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.],
8566 #  [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
8567 #
8568 #HANDLE_X_PATH_ARG(with_sgivc, --with-sgivc-ext, SGI-VIDEO-CONTROL)
8569 #
8570 #if test "$with_sgivc" = yes; then
8571 #
8572 #  # first check for XSGIvc.h
8573 #  AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes],,
8574 #                    [#include <X11/Xlib.h>])
8575 #
8576 #  # if that succeeded, then check for the -lXsgivc
8577 #  if test "$have_sgivc" = yes; then
8578 #    have_sgivc=no
8579 #    AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
8580 #                  [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [true],
8581 #                  -lXext -lX11)
8582 #  fi
8583 #
8584 #  # if that succeeded, then we've really got it.
8585 #  if test "$have_sgivc" = yes; then
8586 #    AC_DEFINE(HAVE_SGI_VC_EXTENSION)
8587 #  fi
8588 #
8589 #elif test "$with_sgivc" != no; then
8590 #  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
8591 #  exit 1
8592 #fi
8593
8594
8595 ###############################################################################
8596 #
8597 #       Check for the DPMS server extension.
8598 #
8599 ###############################################################################
8600
8601 have_dpms=no
8602 with_dpms_req=unspecified
8603
8604 # Check whether --with-dpms-ext was given.
8605 if test "${with_dpms_ext+set}" = set; then :
8606   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
8607 else
8608   with_dpms=yes
8609 fi
8610
8611
8612
8613    case "$with_dpms" in
8614     yes) ;;
8615     no)  ;;
8616
8617     /*)
8618      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS headers" >&5
8619 $as_echo_n "checking for DPMS headers... " >&6; }
8620      d=$with_dpms/include
8621      if test -d $d; then
8622        X_CFLAGS="-I$d $X_CFLAGS"
8623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8624 $as_echo "$d" >&6; }
8625      else
8626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8627 $as_echo "not found ($d: no such directory)" >&6; }
8628      fi
8629
8630      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS libs" >&5
8631 $as_echo_n "checking for DPMS libs... " >&6; }
8632      d=$with_dpms/lib
8633      if test -d $d; then
8634        X_LIBS="-L$d $X_LIBS"
8635        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8636 $as_echo "$d" >&6; }
8637      else
8638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8639 $as_echo "not found ($d: no such directory)" >&6; }
8640      fi
8641
8642      # replace the directory string with "yes".
8643      with_dpms_req="yes"
8644      with_dpms=$with_dpms_req
8645      ;;
8646
8647     *)
8648      echo ""
8649      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
8650      echo "       If it is a directory, then \`DIR/include' will be added to"
8651      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8652      exit 1
8653      ;;
8654    esac
8655
8656
8657 if test "$with_dpms" = yes; then
8658
8659   # first check for dpms.h
8660
8661   ac_save_CPPFLAGS="$CPPFLAGS"
8662   if test \! -z "$includedir" ; then
8663     CPPFLAGS="$CPPFLAGS -I$includedir"
8664   fi
8665   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8666   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8667   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/dpms.h" "ac_cv_header_X11_extensions_dpms_h" "#include <X11/Xlib.h>
8668                      #include <X11/Xmd.h>
8669 "
8670 if test "x$ac_cv_header_X11_extensions_dpms_h" = xyes; then :
8671   have_dpms=yes
8672 fi
8673
8674
8675   CPPFLAGS="$ac_save_CPPFLAGS"
8676
8677   # if that succeeded, then check for the DPMS code in the libraries
8678   if test "$have_dpms" = yes; then
8679
8680     # first look in -lXext (this is where it is with XFree86 4.0)
8681     have_dpms=no
8682
8683   ac_save_CPPFLAGS="$CPPFLAGS"
8684   ac_save_LDFLAGS="$LDFLAGS"
8685 #  ac_save_LIBS="$LIBS"
8686
8687   if test \! -z "$includedir" ; then
8688     CPPFLAGS="$CPPFLAGS -I$includedir"
8689   fi
8690   # note: $X_CFLAGS includes $x_includes
8691   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8692
8693   if test \! -z "$libdir" ; then
8694     LDFLAGS="$LDFLAGS -L$libdir"
8695   fi
8696   # note: $X_LIBS includes $x_libraries
8697   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8698
8699   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8700   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8701   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXext" >&5
8702 $as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
8703 if ${ac_cv_lib_Xext_DPMSInfo+:} false; then :
8704   $as_echo_n "(cached) " >&6
8705 else
8706   ac_check_lib_save_LIBS=$LIBS
8707 LIBS="-lXext -lXext -lX11 $LIBS"
8708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8709 /* end confdefs.h.  */
8710
8711 /* Override any GCC internal prototype to avoid an error.
8712    Use char because int might match the return type of a GCC
8713    builtin and then its argument prototype would still apply.  */
8714 #ifdef __cplusplus
8715 extern "C"
8716 #endif
8717 char DPMSInfo ();
8718 int
8719 main ()
8720 {
8721 return DPMSInfo ();
8722   ;
8723   return 0;
8724 }
8725 _ACEOF
8726 if ac_fn_c_try_link "$LINENO"; then :
8727   ac_cv_lib_Xext_DPMSInfo=yes
8728 else
8729   ac_cv_lib_Xext_DPMSInfo=no
8730 fi
8731 rm -f core conftest.err conftest.$ac_objext \
8732     conftest$ac_exeext conftest.$ac_ext
8733 LIBS=$ac_check_lib_save_LIBS
8734 fi
8735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_DPMSInfo" >&5
8736 $as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
8737 if test "x$ac_cv_lib_Xext_DPMSInfo" = xyes; then :
8738   have_dpms=yes
8739 else
8740   true
8741 fi
8742
8743   CPPFLAGS="$ac_save_CPPFLAGS"
8744   LDFLAGS="$ac_save_LDFLAGS"
8745 #  LIBS="$ac_save_LIBS"
8746
8747
8748     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
8749     if test "$have_dpms" = no; then
8750
8751   ac_save_CPPFLAGS="$CPPFLAGS"
8752   ac_save_LDFLAGS="$LDFLAGS"
8753 #  ac_save_LIBS="$LIBS"
8754
8755   if test \! -z "$includedir" ; then
8756     CPPFLAGS="$CPPFLAGS -I$includedir"
8757   fi
8758   # note: $X_CFLAGS includes $x_includes
8759   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8760
8761   if test \! -z "$libdir" ; then
8762     LDFLAGS="$LDFLAGS -L$libdir"
8763   fi
8764   # note: $X_LIBS includes $x_libraries
8765   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8766
8767   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8768   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8769   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXdpms" >&5
8770 $as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
8771 if ${ac_cv_lib_Xdpms_DPMSInfo+:} false; then :
8772   $as_echo_n "(cached) " >&6
8773 else
8774   ac_check_lib_save_LIBS=$LIBS
8775 LIBS="-lXdpms -lXext -lX11 $LIBS"
8776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8777 /* end confdefs.h.  */
8778
8779 /* Override any GCC internal prototype to avoid an error.
8780    Use char because int might match the return type of a GCC
8781    builtin and then its argument prototype would still apply.  */
8782 #ifdef __cplusplus
8783 extern "C"
8784 #endif
8785 char DPMSInfo ();
8786 int
8787 main ()
8788 {
8789 return DPMSInfo ();
8790   ;
8791   return 0;
8792 }
8793 _ACEOF
8794 if ac_fn_c_try_link "$LINENO"; then :
8795   ac_cv_lib_Xdpms_DPMSInfo=yes
8796 else
8797   ac_cv_lib_Xdpms_DPMSInfo=no
8798 fi
8799 rm -f core conftest.err conftest.$ac_objext \
8800     conftest$ac_exeext conftest.$ac_ext
8801 LIBS=$ac_check_lib_save_LIBS
8802 fi
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
8804 $as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
8805 if test "x$ac_cv_lib_Xdpms_DPMSInfo" = xyes; then :
8806   have_dpms=yes; XDPMS_LIBS="-lXdpms"
8807 else
8808   true
8809 fi
8810
8811   CPPFLAGS="$ac_save_CPPFLAGS"
8812   LDFLAGS="$ac_save_LDFLAGS"
8813 #  LIBS="$ac_save_LIBS"
8814
8815     fi
8816   fi
8817
8818
8819   # if that succeeded, then we've really got it.
8820   if test "$have_dpms" = yes; then
8821     $as_echo "#define HAVE_DPMS_EXTENSION 1" >>confdefs.h
8822
8823   fi
8824
8825 elif test "$with_dpms" != no; then
8826   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
8827   exit 1
8828 fi
8829
8830
8831 ###############################################################################
8832 #
8833 #       Check for the XINERAMA server extension.
8834 #
8835 ###############################################################################
8836
8837 have_xinerama=no
8838 with_xinerama_req=unspecified
8839
8840 # Check whether --with-xinerama-ext was given.
8841 if test "${with_xinerama_ext+set}" = set; then :
8842   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
8843 else
8844   with_xinerama=yes
8845 fi
8846
8847
8848
8849    case "$with_xinerama" in
8850     yes) ;;
8851     no)  ;;
8852
8853     /*)
8854      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA headers" >&5
8855 $as_echo_n "checking for XINERAMA headers... " >&6; }
8856      d=$with_xinerama/include
8857      if test -d $d; then
8858        X_CFLAGS="-I$d $X_CFLAGS"
8859        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8860 $as_echo "$d" >&6; }
8861      else
8862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8863 $as_echo "not found ($d: no such directory)" >&6; }
8864      fi
8865
8866      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA libs" >&5
8867 $as_echo_n "checking for XINERAMA libs... " >&6; }
8868      d=$with_xinerama/lib
8869      if test -d $d; then
8870        X_LIBS="-L$d $X_LIBS"
8871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8872 $as_echo "$d" >&6; }
8873      else
8874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8875 $as_echo "not found ($d: no such directory)" >&6; }
8876      fi
8877
8878      # replace the directory string with "yes".
8879      with_xinerama_req="yes"
8880      with_xinerama=$with_xinerama_req
8881      ;;
8882
8883     *)
8884      echo ""
8885      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
8886      echo "       If it is a directory, then \`DIR/include' will be added to"
8887      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8888      exit 1
8889      ;;
8890    esac
8891
8892
8893 if test "$with_xinerama" = yes; then
8894
8895   # first check for Xinerama.h
8896
8897   ac_save_CPPFLAGS="$CPPFLAGS"
8898   if test \! -z "$includedir" ; then
8899     CPPFLAGS="$CPPFLAGS -I$includedir"
8900   fi
8901   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8902   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8903   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "#include <X11/Xlib.h>
8904 "
8905 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = xyes; then :
8906   have_xinerama=yes
8907 fi
8908
8909
8910   CPPFLAGS="$ac_save_CPPFLAGS"
8911
8912   # if that succeeded, then check for the XINERAMA code in the libraries
8913   if test "$have_xinerama" = yes; then
8914
8915     # first look in -lXext
8916     have_xinerama=no
8917
8918   ac_save_CPPFLAGS="$CPPFLAGS"
8919   ac_save_LDFLAGS="$LDFLAGS"
8920 #  ac_save_LIBS="$LIBS"
8921
8922   if test \! -z "$includedir" ; then
8923     CPPFLAGS="$CPPFLAGS -I$includedir"
8924   fi
8925   # note: $X_CFLAGS includes $x_includes
8926   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8927
8928   if test \! -z "$libdir" ; then
8929     LDFLAGS="$LDFLAGS -L$libdir"
8930   fi
8931   # note: $X_LIBS includes $x_libraries
8932   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8933
8934   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8935   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8936   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXext" >&5
8937 $as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
8938 if ${ac_cv_lib_Xext_XineramaQueryScreens+:} false; then :
8939   $as_echo_n "(cached) " >&6
8940 else
8941   ac_check_lib_save_LIBS=$LIBS
8942 LIBS="-lXext -lXext -lX11 $LIBS"
8943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8944 /* end confdefs.h.  */
8945
8946 /* Override any GCC internal prototype to avoid an error.
8947    Use char because int might match the return type of a GCC
8948    builtin and then its argument prototype would still apply.  */
8949 #ifdef __cplusplus
8950 extern "C"
8951 #endif
8952 char XineramaQueryScreens ();
8953 int
8954 main ()
8955 {
8956 return XineramaQueryScreens ();
8957   ;
8958   return 0;
8959 }
8960 _ACEOF
8961 if ac_fn_c_try_link "$LINENO"; then :
8962   ac_cv_lib_Xext_XineramaQueryScreens=yes
8963 else
8964   ac_cv_lib_Xext_XineramaQueryScreens=no
8965 fi
8966 rm -f core conftest.err conftest.$ac_objext \
8967     conftest$ac_exeext conftest.$ac_ext
8968 LIBS=$ac_check_lib_save_LIBS
8969 fi
8970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
8971 $as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
8972 if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = xyes; then :
8973   have_xinerama=yes
8974 else
8975   true
8976 fi
8977
8978   CPPFLAGS="$ac_save_CPPFLAGS"
8979   LDFLAGS="$ac_save_LDFLAGS"
8980 #  LIBS="$ac_save_LIBS"
8981
8982
8983     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
8984     if test "$have_xinerama" = no; then
8985
8986   ac_save_CPPFLAGS="$CPPFLAGS"
8987   ac_save_LDFLAGS="$LDFLAGS"
8988 #  ac_save_LIBS="$LIBS"
8989
8990   if test \! -z "$includedir" ; then
8991     CPPFLAGS="$CPPFLAGS -I$includedir"
8992   fi
8993   # note: $X_CFLAGS includes $x_includes
8994   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8995
8996   if test \! -z "$libdir" ; then
8997     LDFLAGS="$LDFLAGS -L$libdir"
8998   fi
8999   # note: $X_LIBS includes $x_libraries
9000   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9001
9002   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9003   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9004   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXinerama" >&5
9005 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
9006 if ${ac_cv_lib_Xinerama_XineramaQueryScreens+:} false; then :
9007   $as_echo_n "(cached) " >&6
9008 else
9009   ac_check_lib_save_LIBS=$LIBS
9010 LIBS="-lXinerama -lXext -lX11 $LIBS"
9011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9012 /* end confdefs.h.  */
9013
9014 /* Override any GCC internal prototype to avoid an error.
9015    Use char because int might match the return type of a GCC
9016    builtin and then its argument prototype would still apply.  */
9017 #ifdef __cplusplus
9018 extern "C"
9019 #endif
9020 char XineramaQueryScreens ();
9021 int
9022 main ()
9023 {
9024 return XineramaQueryScreens ();
9025   ;
9026   return 0;
9027 }
9028 _ACEOF
9029 if ac_fn_c_try_link "$LINENO"; then :
9030   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
9031 else
9032   ac_cv_lib_Xinerama_XineramaQueryScreens=no
9033 fi
9034 rm -f core conftest.err conftest.$ac_objext \
9035     conftest$ac_exeext conftest.$ac_ext
9036 LIBS=$ac_check_lib_save_LIBS
9037 fi
9038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
9039 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
9040 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = xyes; then :
9041   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
9042 else
9043   true
9044 fi
9045
9046   CPPFLAGS="$ac_save_CPPFLAGS"
9047   LDFLAGS="$ac_save_LDFLAGS"
9048 #  LIBS="$ac_save_LIBS"
9049
9050     fi
9051   fi
9052
9053   # if that succeeded, then we've really got it.
9054   if test "$have_xinerama" = yes; then
9055     $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
9056
9057   fi
9058
9059 elif test "$with_xinerama" != no; then
9060   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
9061   exit 1
9062 fi
9063
9064
9065 ###############################################################################
9066 #
9067 #       Check for the XINPUT server extension.
9068 #
9069 ###############################################################################
9070
9071 have_xinput=no
9072 with_xinput_req=unspecified
9073
9074 # Check whether --with-xinput-ext was given.
9075 if test "${with_xinput_ext+set}" = set; then :
9076   withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
9077 else
9078   with_xinput=yes
9079 fi
9080
9081
9082
9083    case "$with_xinput" in
9084     yes) ;;
9085     no)  ;;
9086
9087     /*)
9088      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT headers" >&5
9089 $as_echo_n "checking for XINPUT headers... " >&6; }
9090      d=$with_xinput/include
9091      if test -d $d; then
9092        X_CFLAGS="-I$d $X_CFLAGS"
9093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9094 $as_echo "$d" >&6; }
9095      else
9096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9097 $as_echo "not found ($d: no such directory)" >&6; }
9098      fi
9099
9100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT libs" >&5
9101 $as_echo_n "checking for XINPUT libs... " >&6; }
9102      d=$with_xinput/lib
9103      if test -d $d; then
9104        X_LIBS="-L$d $X_LIBS"
9105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9106 $as_echo "$d" >&6; }
9107      else
9108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9109 $as_echo "not found ($d: no such directory)" >&6; }
9110      fi
9111
9112      # replace the directory string with "yes".
9113      with_xinput_req="yes"
9114      with_xinput=$with_xinput_req
9115      ;;
9116
9117     *)
9118      echo ""
9119      echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
9120      echo "       If it is a directory, then \`DIR/include' will be added to"
9121      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9122      exit 1
9123      ;;
9124    esac
9125
9126
9127 if test "$with_xinput" = yes; then
9128
9129   # first check for Xinput.h
9130
9131   ac_save_CPPFLAGS="$CPPFLAGS"
9132   if test \! -z "$includedir" ; then
9133     CPPFLAGS="$CPPFLAGS -I$includedir"
9134   fi
9135   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9136   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9137   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XInput.h" "ac_cv_header_X11_extensions_XInput_h" "#include <X11/Xlib.h>
9138 "
9139 if test "x$ac_cv_header_X11_extensions_XInput_h" = xyes; then :
9140   have_xinput=yes
9141 fi
9142
9143
9144   CPPFLAGS="$ac_save_CPPFLAGS"
9145
9146   # if that succeeded, then check for libXi
9147   if test "$have_xinput" = yes; then
9148     have_xinput=no
9149
9150   ac_save_CPPFLAGS="$CPPFLAGS"
9151   ac_save_LDFLAGS="$LDFLAGS"
9152 #  ac_save_LIBS="$LIBS"
9153
9154   if test \! -z "$includedir" ; then
9155     CPPFLAGS="$CPPFLAGS -I$includedir"
9156   fi
9157   # note: $X_CFLAGS includes $x_includes
9158   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9159
9160   if test \! -z "$libdir" ; then
9161     LDFLAGS="$LDFLAGS -L$libdir"
9162   fi
9163   # note: $X_LIBS includes $x_libraries
9164   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9165
9166   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9167   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9168   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XListInputDevices in -lXi" >&5
9169 $as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
9170 if ${ac_cv_lib_Xi_XListInputDevices+:} false; then :
9171   $as_echo_n "(cached) " >&6
9172 else
9173   ac_check_lib_save_LIBS=$LIBS
9174 LIBS="-lXi -lXext -lX11 $LIBS"
9175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9176 /* end confdefs.h.  */
9177
9178 /* Override any GCC internal prototype to avoid an error.
9179    Use char because int might match the return type of a GCC
9180    builtin and then its argument prototype would still apply.  */
9181 #ifdef __cplusplus
9182 extern "C"
9183 #endif
9184 char XListInputDevices ();
9185 int
9186 main ()
9187 {
9188 return XListInputDevices ();
9189   ;
9190   return 0;
9191 }
9192 _ACEOF
9193 if ac_fn_c_try_link "$LINENO"; then :
9194   ac_cv_lib_Xi_XListInputDevices=yes
9195 else
9196   ac_cv_lib_Xi_XListInputDevices=no
9197 fi
9198 rm -f core conftest.err conftest.$ac_objext \
9199     conftest$ac_exeext conftest.$ac_ext
9200 LIBS=$ac_check_lib_save_LIBS
9201 fi
9202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xi_XListInputDevices" >&5
9203 $as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
9204 if test "x$ac_cv_lib_Xi_XListInputDevices" = xyes; then :
9205   have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
9206 else
9207   true
9208 fi
9209
9210   CPPFLAGS="$ac_save_CPPFLAGS"
9211   LDFLAGS="$ac_save_LDFLAGS"
9212 #  LIBS="$ac_save_LIBS"
9213
9214   fi
9215
9216   # if that succeeded, then we've really got it.
9217   if test "$have_xinput" = yes; then
9218     $as_echo "#define HAVE_XINPUT 1" >>confdefs.h
9219
9220   fi
9221
9222 elif test "$with_xinput" != no; then
9223   echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
9224   exit 1
9225 fi
9226
9227
9228 ###############################################################################
9229 #
9230 #       Check for the XF86VMODE server extension (for virtual screens.)
9231 #
9232 ###############################################################################
9233
9234 have_xf86vmode=no
9235 with_xf86vmode_req=unspecified
9236
9237 # Check whether --with-xf86vmode-ext was given.
9238 if test "${with_xf86vmode_ext+set}" = set; then :
9239   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
9240 else
9241   with_xf86vmode=yes
9242 fi
9243
9244
9245
9246    case "$with_xf86vmode" in
9247     yes) ;;
9248     no)  ;;
9249
9250     /*)
9251      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode headers" >&5
9252 $as_echo_n "checking for xf86vmode headers... " >&6; }
9253      d=$with_xf86vmode/include
9254      if test -d $d; then
9255        X_CFLAGS="-I$d $X_CFLAGS"
9256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9257 $as_echo "$d" >&6; }
9258      else
9259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9260 $as_echo "not found ($d: no such directory)" >&6; }
9261      fi
9262
9263      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode libs" >&5
9264 $as_echo_n "checking for xf86vmode libs... " >&6; }
9265      d=$with_xf86vmode/lib
9266      if test -d $d; then
9267        X_LIBS="-L$d $X_LIBS"
9268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9269 $as_echo "$d" >&6; }
9270      else
9271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9272 $as_echo "not found ($d: no such directory)" >&6; }
9273      fi
9274
9275      # replace the directory string with "yes".
9276      with_xf86vmode_req="yes"
9277      with_xf86vmode=$with_xf86vmode_req
9278      ;;
9279
9280     *)
9281      echo ""
9282      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
9283      echo "       If it is a directory, then \`DIR/include' will be added to"
9284      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9285      exit 1
9286      ;;
9287    esac
9288
9289
9290 VIDMODE_LIBS=""
9291
9292 if test "$with_xf86vmode" = yes; then
9293
9294   # first check for xf86vmode.h
9295
9296   ac_save_CPPFLAGS="$CPPFLAGS"
9297   if test \! -z "$includedir" ; then
9298     CPPFLAGS="$CPPFLAGS -I$includedir"
9299   fi
9300   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9301   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9302   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9303 "
9304 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9305   have_xf86vmode=yes
9306 fi
9307
9308
9309   CPPFLAGS="$ac_save_CPPFLAGS"
9310
9311   # if that succeeded, then check for the -lXxf86vm
9312   if test "$have_xf86vmode" = yes; then
9313     have_xf86vmode=no
9314
9315   ac_save_CPPFLAGS="$CPPFLAGS"
9316   ac_save_LDFLAGS="$LDFLAGS"
9317 #  ac_save_LIBS="$LIBS"
9318
9319   if test \! -z "$includedir" ; then
9320     CPPFLAGS="$CPPFLAGS -I$includedir"
9321   fi
9322   # note: $X_CFLAGS includes $x_includes
9323   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9324
9325   if test \! -z "$libdir" ; then
9326     LDFLAGS="$LDFLAGS -L$libdir"
9327   fi
9328   # note: $X_LIBS includes $x_libraries
9329   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9330
9331   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9332   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9333   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
9334 $as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
9335 if ${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+:} false; then :
9336   $as_echo_n "(cached) " >&6
9337 else
9338   ac_check_lib_save_LIBS=$LIBS
9339 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9341 /* end confdefs.h.  */
9342
9343 /* Override any GCC internal prototype to avoid an error.
9344    Use char because int might match the return type of a GCC
9345    builtin and then its argument prototype would still apply.  */
9346 #ifdef __cplusplus
9347 extern "C"
9348 #endif
9349 char XF86VidModeGetViewPort ();
9350 int
9351 main ()
9352 {
9353 return XF86VidModeGetViewPort ();
9354   ;
9355   return 0;
9356 }
9357 _ACEOF
9358 if ac_fn_c_try_link "$LINENO"; then :
9359   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
9360 else
9361   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
9362 fi
9363 rm -f core conftest.err conftest.$ac_objext \
9364     conftest$ac_exeext conftest.$ac_ext
9365 LIBS=$ac_check_lib_save_LIBS
9366 fi
9367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
9368 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
9369 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = xyes; then :
9370   have_xf86vmode=yes;
9371                    VIDMODE_LIBS="-lXxf86vm";
9372                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
9373 else
9374   true
9375 fi
9376
9377   CPPFLAGS="$ac_save_CPPFLAGS"
9378   LDFLAGS="$ac_save_LDFLAGS"
9379 #  LIBS="$ac_save_LIBS"
9380
9381   fi
9382
9383   # if that succeeded, then we've really got it.
9384   if test "$have_xf86vmode" = yes; then
9385     $as_echo "#define HAVE_XF86VMODE 1" >>confdefs.h
9386
9387   fi
9388
9389 elif test "$with_xf86vmode" != no; then
9390   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
9391   exit 1
9392 fi
9393
9394
9395 ###############################################################################
9396 #
9397 #       Check for the XF86VMODE server extension (for gamma fading.)
9398 #
9399 ###############################################################################
9400
9401 have_xf86gamma=no
9402 have_xf86gamma_ramp=no
9403 with_xf86gamma_req=unspecified
9404
9405 # Check whether --with-xf86gamma-ext was given.
9406 if test "${with_xf86gamma_ext+set}" = set; then :
9407   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
9408 else
9409   with_xf86gamma=yes
9410 fi
9411
9412
9413
9414    case "$with_xf86gamma" in
9415     yes) ;;
9416     no)  ;;
9417
9418     /*)
9419      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma headers" >&5
9420 $as_echo_n "checking for xf86gamma headers... " >&6; }
9421      d=$with_xf86gamma/include
9422      if test -d $d; then
9423        X_CFLAGS="-I$d $X_CFLAGS"
9424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9425 $as_echo "$d" >&6; }
9426      else
9427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9428 $as_echo "not found ($d: no such directory)" >&6; }
9429      fi
9430
9431      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma libs" >&5
9432 $as_echo_n "checking for xf86gamma libs... " >&6; }
9433      d=$with_xf86gamma/lib
9434      if test -d $d; then
9435        X_LIBS="-L$d $X_LIBS"
9436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9437 $as_echo "$d" >&6; }
9438      else
9439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9440 $as_echo "not found ($d: no such directory)" >&6; }
9441      fi
9442
9443      # replace the directory string with "yes".
9444      with_xf86gamma_req="yes"
9445      with_xf86gamma=$with_xf86gamma_req
9446      ;;
9447
9448     *)
9449      echo ""
9450      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
9451      echo "       If it is a directory, then \`DIR/include' will be added to"
9452      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9453      exit 1
9454      ;;
9455    esac
9456
9457
9458 if test "$with_xf86gamma" = yes; then
9459
9460   # first check for xf86vmode.h, if we haven't already
9461   if test "$have_xf86vmode" = yes; then
9462     have_xf86gamma=yes
9463   else
9464
9465   ac_save_CPPFLAGS="$CPPFLAGS"
9466   if test \! -z "$includedir" ; then
9467     CPPFLAGS="$CPPFLAGS -I$includedir"
9468   fi
9469   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9470   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9471   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9472 "
9473 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9474   have_xf86gamma=yes
9475 fi
9476
9477
9478   CPPFLAGS="$ac_save_CPPFLAGS"
9479   fi
9480
9481   # if that succeeded, then check for the -lXxf86vm
9482   if test "$have_xf86gamma" = yes; then
9483     have_xf86gamma=no
9484
9485   ac_save_CPPFLAGS="$CPPFLAGS"
9486   ac_save_LDFLAGS="$LDFLAGS"
9487 #  ac_save_LIBS="$LIBS"
9488
9489   if test \! -z "$includedir" ; then
9490     CPPFLAGS="$CPPFLAGS -I$includedir"
9491   fi
9492   # note: $X_CFLAGS includes $x_includes
9493   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9494
9495   if test \! -z "$libdir" ; then
9496     LDFLAGS="$LDFLAGS -L$libdir"
9497   fi
9498   # note: $X_LIBS includes $x_libraries
9499   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9500
9501   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9502   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9503   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
9504 $as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
9505 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+:} false; then :
9506   $as_echo_n "(cached) " >&6
9507 else
9508   ac_check_lib_save_LIBS=$LIBS
9509 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9511 /* end confdefs.h.  */
9512
9513 /* Override any GCC internal prototype to avoid an error.
9514    Use char because int might match the return type of a GCC
9515    builtin and then its argument prototype would still apply.  */
9516 #ifdef __cplusplus
9517 extern "C"
9518 #endif
9519 char XF86VidModeSetGamma ();
9520 int
9521 main ()
9522 {
9523 return XF86VidModeSetGamma ();
9524   ;
9525   return 0;
9526 }
9527 _ACEOF
9528 if ac_fn_c_try_link "$LINENO"; then :
9529   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
9530 else
9531   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
9532 fi
9533 rm -f core conftest.err conftest.$ac_objext \
9534     conftest$ac_exeext conftest.$ac_ext
9535 LIBS=$ac_check_lib_save_LIBS
9536 fi
9537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
9538 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
9539 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = xyes; then :
9540   have_xf86gamma=yes
9541 else
9542   true
9543 fi
9544
9545   CPPFLAGS="$ac_save_CPPFLAGS"
9546   LDFLAGS="$ac_save_LDFLAGS"
9547 #  LIBS="$ac_save_LIBS"
9548
9549   fi
9550
9551   # check for the Ramp versions of the functions too.
9552   if test "$have_xf86gamma" = yes; then
9553     have_xf86gamma_ramp=no
9554
9555   ac_save_CPPFLAGS="$CPPFLAGS"
9556   ac_save_LDFLAGS="$LDFLAGS"
9557 #  ac_save_LIBS="$LIBS"
9558
9559   if test \! -z "$includedir" ; then
9560     CPPFLAGS="$CPPFLAGS -I$includedir"
9561   fi
9562   # note: $X_CFLAGS includes $x_includes
9563   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9564
9565   if test \! -z "$libdir" ; then
9566     LDFLAGS="$LDFLAGS -L$libdir"
9567   fi
9568   # note: $X_LIBS includes $x_libraries
9569   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9570
9571   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9572   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9573   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
9574 $as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
9575 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+:} false; then :
9576   $as_echo_n "(cached) " >&6
9577 else
9578   ac_check_lib_save_LIBS=$LIBS
9579 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9581 /* end confdefs.h.  */
9582
9583 /* Override any GCC internal prototype to avoid an error.
9584    Use char because int might match the return type of a GCC
9585    builtin and then its argument prototype would still apply.  */
9586 #ifdef __cplusplus
9587 extern "C"
9588 #endif
9589 char XF86VidModeSetGammaRamp ();
9590 int
9591 main ()
9592 {
9593 return XF86VidModeSetGammaRamp ();
9594   ;
9595   return 0;
9596 }
9597 _ACEOF
9598 if ac_fn_c_try_link "$LINENO"; then :
9599   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
9600 else
9601   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
9602 fi
9603 rm -f core conftest.err conftest.$ac_objext \
9604     conftest$ac_exeext conftest.$ac_ext
9605 LIBS=$ac_check_lib_save_LIBS
9606 fi
9607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
9608 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
9609 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = xyes; then :
9610   have_xf86gamma_ramp=yes
9611 else
9612   true
9613 fi
9614
9615   CPPFLAGS="$ac_save_CPPFLAGS"
9616   LDFLAGS="$ac_save_LDFLAGS"
9617 #  LIBS="$ac_save_LIBS"
9618
9619   fi
9620
9621   # if those tests succeeded, then we've really got the functions.
9622   if test "$have_xf86gamma" = yes; then
9623     $as_echo "#define HAVE_XF86VMODE_GAMMA 1" >>confdefs.h
9624
9625   fi
9626
9627   if test "$have_xf86gamma_ramp" = yes; then
9628     $as_echo "#define HAVE_XF86VMODE_GAMMA_RAMP 1" >>confdefs.h
9629
9630   fi
9631
9632   # pull in the lib, if we haven't already
9633   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
9634     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
9635   fi
9636
9637 elif test "$with_xf86gamma" != no; then
9638   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
9639   exit 1
9640 fi
9641
9642
9643 ###############################################################################
9644 #
9645 #       Check for the RANDR (Resize and Rotate) server extension.
9646 #
9647 #       We need this to detect when the resolution of the desktop
9648 #       has changed out from under us (this is a newer, different
9649 #       mechanism than the XF86VMODE virtual viewports.)
9650 #
9651 ###############################################################################
9652
9653 have_randr=no
9654 with_randr_req=unspecified
9655
9656 # Check whether --with-randr-ext was given.
9657 if test "${with_randr_ext+set}" = set; then :
9658   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
9659 else
9660   with_randr=yes
9661 fi
9662
9663
9664
9665    case "$with_randr" in
9666     yes) ;;
9667     no)  ;;
9668
9669     /*)
9670      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR headers" >&5
9671 $as_echo_n "checking for RANDR headers... " >&6; }
9672      d=$with_randr/include
9673      if test -d $d; then
9674        X_CFLAGS="-I$d $X_CFLAGS"
9675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9676 $as_echo "$d" >&6; }
9677      else
9678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9679 $as_echo "not found ($d: no such directory)" >&6; }
9680      fi
9681
9682      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR libs" >&5
9683 $as_echo_n "checking for RANDR libs... " >&6; }
9684      d=$with_randr/lib
9685      if test -d $d; then
9686        X_LIBS="-L$d $X_LIBS"
9687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9688 $as_echo "$d" >&6; }
9689      else
9690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9691 $as_echo "not found ($d: no such directory)" >&6; }
9692      fi
9693
9694      # replace the directory string with "yes".
9695      with_randr_req="yes"
9696      with_randr=$with_randr_req
9697      ;;
9698
9699     *)
9700      echo ""
9701      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
9702      echo "       If it is a directory, then \`DIR/include' will be added to"
9703      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9704      exit 1
9705      ;;
9706    esac
9707
9708
9709 if test "$with_randr" = yes; then
9710
9711   # first check for Xrandr.h
9712
9713   ac_save_CPPFLAGS="$CPPFLAGS"
9714   if test \! -z "$includedir" ; then
9715     CPPFLAGS="$CPPFLAGS -I$includedir"
9716   fi
9717   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9718   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9719   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "#include <X11/Xlib.h>
9720 "
9721 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = xyes; then :
9722   have_randr=yes
9723 fi
9724
9725
9726   CPPFLAGS="$ac_save_CPPFLAGS"
9727
9728   # if that succeeded, then check for the XRR code in the libraries
9729   if test "$have_randr" = yes; then
9730
9731     # RANDR probably needs -lXrender
9732     xrender_libs=
9733
9734   ac_save_CPPFLAGS="$CPPFLAGS"
9735   ac_save_LDFLAGS="$LDFLAGS"
9736 #  ac_save_LIBS="$LIBS"
9737
9738   if test \! -z "$includedir" ; then
9739     CPPFLAGS="$CPPFLAGS -I$includedir"
9740   fi
9741   # note: $X_CFLAGS includes $x_includes
9742   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9743
9744   if test \! -z "$libdir" ; then
9745     LDFLAGS="$LDFLAGS -L$libdir"
9746   fi
9747   # note: $X_LIBS includes $x_libraries
9748   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9749
9750   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9751   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9752   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderSetSubpixelOrder in -lXrender" >&5
9753 $as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
9754 if ${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+:} false; then :
9755   $as_echo_n "(cached) " >&6
9756 else
9757   ac_check_lib_save_LIBS=$LIBS
9758 LIBS="-lXrender -lXext -lX11 $LIBS"
9759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9760 /* end confdefs.h.  */
9761
9762 /* Override any GCC internal prototype to avoid an error.
9763    Use char because int might match the return type of a GCC
9764    builtin and then its argument prototype would still apply.  */
9765 #ifdef __cplusplus
9766 extern "C"
9767 #endif
9768 char XRenderSetSubpixelOrder ();
9769 int
9770 main ()
9771 {
9772 return XRenderSetSubpixelOrder ();
9773   ;
9774   return 0;
9775 }
9776 _ACEOF
9777 if ac_fn_c_try_link "$LINENO"; then :
9778   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
9779 else
9780   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
9781 fi
9782 rm -f core conftest.err conftest.$ac_objext \
9783     conftest$ac_exeext conftest.$ac_ext
9784 LIBS=$ac_check_lib_save_LIBS
9785 fi
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
9787 $as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
9788 if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = xyes; then :
9789   xrender_libs="-lXrender"
9790 else
9791   true
9792 fi
9793
9794   CPPFLAGS="$ac_save_CPPFLAGS"
9795   LDFLAGS="$ac_save_LDFLAGS"
9796 #  LIBS="$ac_save_LIBS"
9797
9798
9799     # first look for RANDR in -lXext
9800     have_randr=no
9801
9802   ac_save_CPPFLAGS="$CPPFLAGS"
9803   ac_save_LDFLAGS="$LDFLAGS"
9804 #  ac_save_LIBS="$LIBS"
9805
9806   if test \! -z "$includedir" ; then
9807     CPPFLAGS="$CPPFLAGS -I$includedir"
9808   fi
9809   # note: $X_CFLAGS includes $x_includes
9810   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9811
9812   if test \! -z "$libdir" ; then
9813     LDFLAGS="$LDFLAGS -L$libdir"
9814   fi
9815   # note: $X_LIBS includes $x_libraries
9816   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9817
9818   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9819   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9820   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXext" >&5
9821 $as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
9822 if ${ac_cv_lib_Xext_XRRGetScreenInfo+:} false; then :
9823   $as_echo_n "(cached) " >&6
9824 else
9825   ac_check_lib_save_LIBS=$LIBS
9826 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
9827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9828 /* end confdefs.h.  */
9829
9830 /* Override any GCC internal prototype to avoid an error.
9831    Use char because int might match the return type of a GCC
9832    builtin and then its argument prototype would still apply.  */
9833 #ifdef __cplusplus
9834 extern "C"
9835 #endif
9836 char XRRGetScreenInfo ();
9837 int
9838 main ()
9839 {
9840 return XRRGetScreenInfo ();
9841   ;
9842   return 0;
9843 }
9844 _ACEOF
9845 if ac_fn_c_try_link "$LINENO"; then :
9846   ac_cv_lib_Xext_XRRGetScreenInfo=yes
9847 else
9848   ac_cv_lib_Xext_XRRGetScreenInfo=no
9849 fi
9850 rm -f core conftest.err conftest.$ac_objext \
9851     conftest$ac_exeext conftest.$ac_ext
9852 LIBS=$ac_check_lib_save_LIBS
9853 fi
9854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
9855 $as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
9856 if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = xyes; then :
9857   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
9858 else
9859   true
9860 fi
9861
9862   CPPFLAGS="$ac_save_CPPFLAGS"
9863   LDFLAGS="$ac_save_LDFLAGS"
9864 #  LIBS="$ac_save_LIBS"
9865
9866
9867     # if that failed, look in -lXrandr
9868     if test "$have_randr" = no; then
9869
9870   ac_save_CPPFLAGS="$CPPFLAGS"
9871   ac_save_LDFLAGS="$LDFLAGS"
9872 #  ac_save_LIBS="$LIBS"
9873
9874   if test \! -z "$includedir" ; then
9875     CPPFLAGS="$CPPFLAGS -I$includedir"
9876   fi
9877   # note: $X_CFLAGS includes $x_includes
9878   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9879
9880   if test \! -z "$libdir" ; then
9881     LDFLAGS="$LDFLAGS -L$libdir"
9882   fi
9883   # note: $X_LIBS includes $x_libraries
9884   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9885
9886   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9887   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9888   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
9889 $as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
9890 if ${ac_cv_lib_Xrandr_XRRGetScreenInfo+:} false; then :
9891   $as_echo_n "(cached) " >&6
9892 else
9893   ac_check_lib_save_LIBS=$LIBS
9894 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
9895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9896 /* end confdefs.h.  */
9897
9898 /* Override any GCC internal prototype to avoid an error.
9899    Use char because int might match the return type of a GCC
9900    builtin and then its argument prototype would still apply.  */
9901 #ifdef __cplusplus
9902 extern "C"
9903 #endif
9904 char XRRGetScreenInfo ();
9905 int
9906 main ()
9907 {
9908 return XRRGetScreenInfo ();
9909   ;
9910   return 0;
9911 }
9912 _ACEOF
9913 if ac_fn_c_try_link "$LINENO"; then :
9914   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
9915 else
9916   ac_cv_lib_Xrandr_XRRGetScreenInfo=no
9917 fi
9918 rm -f core conftest.err conftest.$ac_objext \
9919     conftest$ac_exeext conftest.$ac_ext
9920 LIBS=$ac_check_lib_save_LIBS
9921 fi
9922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
9923 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
9924 if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = xyes; then :
9925   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
9926 else
9927   true
9928 fi
9929
9930   CPPFLAGS="$ac_save_CPPFLAGS"
9931   LDFLAGS="$ac_save_LDFLAGS"
9932 #  LIBS="$ac_save_LIBS"
9933
9934     fi
9935   fi
9936
9937   # if that succeeded, then we've really got it.
9938   if test "$have_randr" = yes; then
9939     $as_echo "#define HAVE_RANDR 1" >>confdefs.h
9940
9941
9942     # Now check for version 1.2 in the same libs.
9943     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
9944     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources" >&5
9945 $as_echo_n "checking for XRRGetScreenResources... " >&6; }
9946 if ${ac_cv_randr_12+:} false; then :
9947   $as_echo_n "(cached) " >&6
9948 else
9949   ac_cv_randr_12=no
9950
9951   ac_save_CPPFLAGS="$CPPFLAGS"
9952   if test \! -z "$includedir" ; then
9953     CPPFLAGS="$CPPFLAGS -I$includedir"
9954   fi
9955   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9956   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9958 /* end confdefs.h.  */
9959 #include <stdlib.h>
9960                          #include <X11/Xlib.h>
9961                          #include <X11/extensions/Xrandr.h>
9962 int
9963 main ()
9964 {
9965 XRRScreenResources *res =
9966                            XRRGetScreenResources (0, 0);
9967   ;
9968   return 0;
9969 }
9970 _ACEOF
9971 if ac_fn_c_try_compile "$LINENO"; then :
9972   ac_cv_randr_12=yes
9973 else
9974   ac_cv_randr_12=no
9975 fi
9976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9977   CPPFLAGS="$ac_save_CPPFLAGS"
9978 fi
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_randr_12" >&5
9980 $as_echo "$ac_cv_randr_12" >&6; }
9981     if test "$ac_cv_randr_12" = yes ; then
9982       $as_echo "#define HAVE_RANDR_12 1" >>confdefs.h
9983
9984     fi
9985 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
9986 #                  [true], $SAVER_LIBS)
9987   fi
9988
9989
9990 elif test "$with_randr" != no; then
9991   echo "error: must be yes or no: --with-randr-ext=$with_randr"
9992   exit 1
9993 fi
9994
9995
9996 ###############################################################################
9997 #
9998 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
9999 #       using other XF86 stuff.)
10000 #
10001 ###############################################################################
10002
10003 have_xf86miscsetgrabkeysstate=no
10004 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
10005
10006   ac_save_CPPFLAGS="$CPPFLAGS"
10007   ac_save_LDFLAGS="$LDFLAGS"
10008 #  ac_save_LIBS="$LIBS"
10009
10010   if test \! -z "$includedir" ; then
10011     CPPFLAGS="$CPPFLAGS -I$includedir"
10012   fi
10013   # note: $X_CFLAGS includes $x_includes
10014   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10015
10016   if test \! -z "$libdir" ; then
10017     LDFLAGS="$LDFLAGS -L$libdir"
10018   fi
10019   # note: $X_LIBS includes $x_libraries
10020   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10021
10022   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10023   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10024   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
10025 $as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
10026 if ${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+:} false; then :
10027   $as_echo_n "(cached) " >&6
10028 else
10029   ac_check_lib_save_LIBS=$LIBS
10030 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
10031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10032 /* end confdefs.h.  */
10033
10034 /* Override any GCC internal prototype to avoid an error.
10035    Use char because int might match the return type of a GCC
10036    builtin and then its argument prototype would still apply.  */
10037 #ifdef __cplusplus
10038 extern "C"
10039 #endif
10040 char XF86MiscSetGrabKeysState ();
10041 int
10042 main ()
10043 {
10044 return XF86MiscSetGrabKeysState ();
10045   ;
10046   return 0;
10047 }
10048 _ACEOF
10049 if ac_fn_c_try_link "$LINENO"; then :
10050   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
10051 else
10052   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
10053 fi
10054 rm -f core conftest.err conftest.$ac_objext \
10055     conftest$ac_exeext conftest.$ac_ext
10056 LIBS=$ac_check_lib_save_LIBS
10057 fi
10058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
10059 $as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
10060 if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = xyes; then :
10061   have_xf86miscsetgrabkeysstate=yes
10062 else
10063   true
10064 fi
10065
10066   CPPFLAGS="$ac_save_CPPFLAGS"
10067   LDFLAGS="$ac_save_LDFLAGS"
10068 #  LIBS="$ac_save_LIBS"
10069
10070   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
10071     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
10072     $as_echo "#define HAVE_XF86MISCSETGRABKEYSSTATE 1" >>confdefs.h
10073
10074   fi
10075 fi
10076
10077
10078 ###############################################################################
10079 #
10080 #       Check for HP XHPDisableReset and XHPEnableReset.
10081 #
10082 ###############################################################################
10083
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XHPDisableReset in X11/XHPlib.h" >&5
10085 $as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
10086
10087   ac_save_CPPFLAGS="$CPPFLAGS"
10088   if test \! -z "$includedir" ; then
10089     CPPFLAGS="$CPPFLAGS -I$includedir"
10090   fi
10091   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10092   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10094 /* end confdefs.h.  */
10095 #include <X11/XHPlib.h>
10096
10097 _ACEOF
10098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10099   $EGREP "XHPDisableReset" >/dev/null 2>&1; then :
10100   $as_echo "#define HAVE_XHPDISABLERESET 1" >>confdefs.h
10101
10102                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10103                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10104 $as_echo "yes" >&6; }
10105 else
10106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10107 $as_echo "no" >&6; }
10108 fi
10109 rm -rf conftest*
10110
10111   CPPFLAGS="$ac_save_CPPFLAGS"
10112
10113
10114 ###############################################################################
10115 #
10116 #       Check for /proc/interrupts.
10117 #
10118 ###############################################################################
10119
10120 have_proc_interrupts=no
10121 with_proc_interrupts_req=unspecified
10122
10123 # Check whether --with-proc-interrupts was given.
10124 if test "${with_proc_interrupts+set}" = set; then :
10125   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
10126 else
10127   with_proc_interrupts=yes
10128 fi
10129
10130
10131 if test "$with_proc_interrupts" = yes; then
10132
10133   # Note that we may be building in an environment (e.g. Debian buildd chroot)
10134   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
10135   # check that it has the bits we need, but otherwise we'll just go on faith.
10136   #
10137   have_proc_interrupts=yes
10138
10139   if test -f /proc/interrupts; then
10140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /proc/interrupts contains keyboard data" >&5
10141 $as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
10142 if ${ac_cv_have_proc_interrupts+:} false; then :
10143   $as_echo_n "(cached) " >&6
10144 else
10145   ac_cv_have_proc_interrupts=no
10146      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
10147        ac_cv_have_proc_interrupts=yes
10148      fi
10149
10150 fi
10151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_proc_interrupts" >&5
10152 $as_echo "$ac_cv_have_proc_interrupts" >&6; }
10153    have_proc_interrupts=$ac_cv_have_proc_interrupts
10154   fi
10155
10156   if test "$have_proc_interrupts" = yes; then
10157     $as_echo "#define HAVE_PROC_INTERRUPTS 1" >>confdefs.h
10158
10159   fi
10160
10161 elif test "$with_proc_interrupts" != no; then
10162   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
10163   exit 1
10164 fi
10165
10166
10167 ###############################################################################
10168 #
10169 #       The --enable-locking option
10170 #
10171 ###############################################################################
10172
10173 # Check whether --enable-locking was given.
10174 if test "${enable_locking+set}" = set; then :
10175   enableval=$enable_locking; enable_locking="$enableval"
10176 else
10177   if test "$ac_macosx" = yes; then
10178     # We can't lock on MacOS X, so default to not compiling in support for it.
10179     # But allow --enable-locking to override that, so I can debug Linux locking
10180     # under MacOS X11.
10181     enable_locking=no
10182    else
10183     enable_locking=yes
10184    fi
10185 fi
10186
10187 if test "$enable_locking" = yes; then
10188   true
10189 elif test "$enable_locking" = no; then
10190   $as_echo "#define NO_LOCKING 1" >>confdefs.h
10191
10192 else
10193   echo "error: must be yes or no: --enable-locking=$enable_locking"
10194   exit 1
10195 fi
10196
10197
10198 ###############################################################################
10199 #
10200 #       Whether to allow root password to unblank.
10201 #
10202 ###############################################################################
10203 # Check whether --enable-root-passwd was given.
10204 if test "${enable_root_passwd+set}" = set; then :
10205   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
10206 else
10207   enable_root_passwd=yes
10208 fi
10209
10210 if test "$enable_root_passwd" = yes; then
10211   $as_echo "#define ALLOW_ROOT_PASSWD 1" >>confdefs.h
10212
10213   true
10214 elif test "$enable_root_passwd" != no; then
10215   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
10216   exit 1
10217 fi
10218
10219 ###############################################################################
10220 #
10221 #       Check for PAM.
10222 #
10223 ###############################################################################
10224
10225 case "$host" in
10226   *-solaris*)
10227    # Solaris systems tend to come with PAM misconfigured.
10228    #  Don't build it by default, even if the headers exist.
10229    with_pam_default=no
10230    ;;
10231   *)
10232    # Default to building PAM support on all other systems, if it exists.
10233    with_pam_default=yes
10234   ;;
10235 esac
10236
10237 have_pam=no
10238 with_pam_req=unspecified
10239
10240
10241 # Check whether --with-pam was given.
10242 if test "${with_pam+set}" = set; then :
10243   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
10244 else
10245   with_pam=$with_pam_default
10246 fi
10247
10248
10249
10250 # Check whether --with-pam_service_name was given.
10251 if test "${with_pam_service_name+set}" = set; then :
10252   withval=$with_pam_service_name; pam_service_name="$withval"
10253 else
10254   pam_service_name="xscreensaver"
10255 fi
10256
10257
10258 # Check whether --enable-pam-check-account-type was given.
10259 if test "${enable_pam_check_account_type+set}" = set; then :
10260   enableval=$enable_pam_check_account_type; enable_pam_check_account_type="$enableval"
10261 else
10262   enable_pam_check_account_type=no
10263 fi
10264
10265 if test "$enable_pam_check_account_type" = yes ; then
10266   $as_echo "#define PAM_CHECK_ACCOUNT_TYPE 1" >>confdefs.h
10267
10268   true
10269 elif test "$enable_pam_check_account_type" != no ; then
10270   echo "error: must be yes or no: --enable-pam-check-account-type=$enable_pam_check_account_type"
10271   exit 1
10272 fi
10273
10274
10275    case "$with_pam" in
10276     yes) ;;
10277     no)  ;;
10278
10279     /*)
10280      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM headers" >&5
10281 $as_echo_n "checking for PAM headers... " >&6; }
10282      d=$with_pam/include
10283      if test -d $d; then
10284        X_CFLAGS="-I$d $X_CFLAGS"
10285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10286 $as_echo "$d" >&6; }
10287      else
10288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10289 $as_echo "not found ($d: no such directory)" >&6; }
10290      fi
10291
10292      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM libs" >&5
10293 $as_echo_n "checking for PAM libs... " >&6; }
10294      d=$with_pam/lib
10295      if test -d $d; then
10296        X_LIBS="-L$d $X_LIBS"
10297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10298 $as_echo "$d" >&6; }
10299      else
10300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10301 $as_echo "not found ($d: no such directory)" >&6; }
10302      fi
10303
10304      # replace the directory string with "yes".
10305      with_pam_req="yes"
10306      with_pam=$with_pam_req
10307      ;;
10308
10309     *)
10310      echo ""
10311      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
10312      echo "       If it is a directory, then \`DIR/include' will be added to"
10313      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10314      exit 1
10315      ;;
10316    esac
10317
10318
10319 if test "$enable_locking" = yes -a "$with_pam" = yes; then
10320   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM" >&5
10321 $as_echo_n "checking for PAM... " >&6; }
10322 if ${ac_cv_pam+:} false; then :
10323   $as_echo_n "(cached) " >&6
10324 else
10325
10326   ac_save_CPPFLAGS="$CPPFLAGS"
10327   if test \! -z "$includedir" ; then
10328     CPPFLAGS="$CPPFLAGS -I$includedir"
10329   fi
10330   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10331   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10332   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10333 /* end confdefs.h.  */
10334 #include <security/pam_appl.h>
10335 int
10336 main ()
10337 {
10338
10339   ;
10340   return 0;
10341 }
10342 _ACEOF
10343 if ac_fn_c_try_compile "$LINENO"; then :
10344   ac_cv_pam=yes
10345 else
10346   ac_cv_pam=no
10347 fi
10348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10349   CPPFLAGS="$ac_save_CPPFLAGS"
10350 fi
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pam" >&5
10352 $as_echo "$ac_cv_pam" >&6; }
10353   if test "$ac_cv_pam" = yes ; then
10354     have_pam=yes
10355     $as_echo "#define HAVE_PAM 1" >>confdefs.h
10356
10357     cat >>confdefs.h <<_ACEOF
10358 #define PAM_SERVICE_NAME "$pam_service_name"
10359 _ACEOF
10360
10361
10362     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
10363
10364     # libpam typically requires dlopen and dlsym.  On FreeBSD,
10365     # those are in libc.  On Linux and Solaris, they're in libdl.
10366     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10367 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10368 if ${ac_cv_lib_dl_dlopen+:} false; then :
10369   $as_echo_n "(cached) " >&6
10370 else
10371   ac_check_lib_save_LIBS=$LIBS
10372 LIBS="-ldl  $LIBS"
10373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10374 /* end confdefs.h.  */
10375
10376 /* Override any GCC internal prototype to avoid an error.
10377    Use char because int might match the return type of a GCC
10378    builtin and then its argument prototype would still apply.  */
10379 #ifdef __cplusplus
10380 extern "C"
10381 #endif
10382 char dlopen ();
10383 int
10384 main ()
10385 {
10386 return dlopen ();
10387   ;
10388   return 0;
10389 }
10390 _ACEOF
10391 if ac_fn_c_try_link "$LINENO"; then :
10392   ac_cv_lib_dl_dlopen=yes
10393 else
10394   ac_cv_lib_dl_dlopen=no
10395 fi
10396 rm -f core conftest.err conftest.$ac_objext \
10397     conftest$ac_exeext conftest.$ac_ext
10398 LIBS=$ac_check_lib_save_LIBS
10399 fi
10400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10401 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10402 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10403   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
10404 fi
10405
10406
10407     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
10408     have_timedwait=no
10409     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lc" >&5
10410 $as_echo_n "checking for sigtimedwait in -lc... " >&6; }
10411 if ${ac_cv_lib_c_sigtimedwait+:} false; then :
10412   $as_echo_n "(cached) " >&6
10413 else
10414   ac_check_lib_save_LIBS=$LIBS
10415 LIBS="-lc  $LIBS"
10416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10417 /* end confdefs.h.  */
10418
10419 /* Override any GCC internal prototype to avoid an error.
10420    Use char because int might match the return type of a GCC
10421    builtin and then its argument prototype would still apply.  */
10422 #ifdef __cplusplus
10423 extern "C"
10424 #endif
10425 char sigtimedwait ();
10426 int
10427 main ()
10428 {
10429 return sigtimedwait ();
10430   ;
10431   return 0;
10432 }
10433 _ACEOF
10434 if ac_fn_c_try_link "$LINENO"; then :
10435   ac_cv_lib_c_sigtimedwait=yes
10436 else
10437   ac_cv_lib_c_sigtimedwait=no
10438 fi
10439 rm -f core conftest.err conftest.$ac_objext \
10440     conftest$ac_exeext conftest.$ac_ext
10441 LIBS=$ac_check_lib_save_LIBS
10442 fi
10443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigtimedwait" >&5
10444 $as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
10445 if test "x$ac_cv_lib_c_sigtimedwait" = xyes; then :
10446   have_timedwait=yes
10447                   $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
10448
10449 fi
10450
10451     if test "$have_timedwait" = no ; then
10452       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lrt" >&5
10453 $as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
10454 if ${ac_cv_lib_rt_sigtimedwait+:} false; then :
10455   $as_echo_n "(cached) " >&6
10456 else
10457   ac_check_lib_save_LIBS=$LIBS
10458 LIBS="-lrt  $LIBS"
10459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10460 /* end confdefs.h.  */
10461
10462 /* Override any GCC internal prototype to avoid an error.
10463    Use char because int might match the return type of a GCC
10464    builtin and then its argument prototype would still apply.  */
10465 #ifdef __cplusplus
10466 extern "C"
10467 #endif
10468 char sigtimedwait ();
10469 int
10470 main ()
10471 {
10472 return sigtimedwait ();
10473   ;
10474   return 0;
10475 }
10476 _ACEOF
10477 if ac_fn_c_try_link "$LINENO"; then :
10478   ac_cv_lib_rt_sigtimedwait=yes
10479 else
10480   ac_cv_lib_rt_sigtimedwait=no
10481 fi
10482 rm -f core conftest.err conftest.$ac_objext \
10483     conftest$ac_exeext conftest.$ac_ext
10484 LIBS=$ac_check_lib_save_LIBS
10485 fi
10486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sigtimedwait" >&5
10487 $as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
10488 if test "x$ac_cv_lib_rt_sigtimedwait" = xyes; then :
10489   have_timedwait=yes
10490                                       $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
10491
10492                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
10493 fi
10494
10495     fi
10496
10497     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call pam_strerror" >&5
10498 $as_echo_n "checking how to call pam_strerror... " >&6; }
10499     if ${ac_cv_pam_strerror_args+:} false; then :
10500   $as_echo_n "(cached) " >&6
10501 else
10502
10503   ac_save_CPPFLAGS="$CPPFLAGS"
10504   if test \! -z "$includedir" ; then
10505     CPPFLAGS="$CPPFLAGS -I$includedir"
10506   fi
10507   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10508   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10510 /* end confdefs.h.  */
10511 #include <stdio.h>
10512                         #include <stdlib.h>
10513                         #include <security/pam_appl.h>
10514 int
10515 main ()
10516 {
10517 pam_handle_t *pamh = 0;
10518                         char *s = pam_strerror(pamh, PAM_SUCCESS);
10519   ;
10520   return 0;
10521 }
10522 _ACEOF
10523 if ac_fn_c_try_compile "$LINENO"; then :
10524   ac_pam_strerror_args=2
10525 else
10526
10527   ac_save_CPPFLAGS="$CPPFLAGS"
10528   if test \! -z "$includedir" ; then
10529     CPPFLAGS="$CPPFLAGS -I$includedir"
10530   fi
10531   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10532   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10533   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10534 /* end confdefs.h.  */
10535 #include <stdio.h>
10536                                           #include <stdlib.h>
10537                                           #include <security/pam_appl.h>
10538 int
10539 main ()
10540 {
10541 char *s =
10542                                            pam_strerror(PAM_SUCCESS);
10543   ;
10544   return 0;
10545 }
10546 _ACEOF
10547 if ac_fn_c_try_compile "$LINENO"; then :
10548   ac_pam_strerror_args=1
10549 else
10550   ac_pam_strerror_args=0
10551 fi
10552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10553   CPPFLAGS="$ac_save_CPPFLAGS"
10554 fi
10555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10556   CPPFLAGS="$ac_save_CPPFLAGS"
10557       ac_cv_pam_strerror_args=$ac_pam_strerror_args
10558 fi
10559
10560     ac_pam_strerror_args=$ac_cv_pam_strerror_args
10561     if test "$ac_pam_strerror_args" = 1 ; then
10562       { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
10563 $as_echo "one argument" >&6; }
10564     elif test "$ac_pam_strerror_args" = 2 ; then
10565       $as_echo "#define PAM_STRERROR_TWO_ARGS 1" >>confdefs.h
10566
10567       { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
10568 $as_echo "two arguments" >&6; }
10569     else
10570       { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
10571 $as_echo "unknown" >&6; }
10572     fi
10573
10574 # Check pam_fail_delay
10575     { $as_echo "$as_me:${as_lineno-$LINENO}: checking pam_fail_delay in -lpam" >&5
10576 $as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
10577     if ${ac_cv_pam_fail_delay+:} false; then :
10578   $as_echo_n "(cached) " >&6
10579 else
10580   ac_save_LDFLAGS="$LDFLAGS"
10581       LDFLAGS="-lpam"
10582       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10583 /* end confdefs.h.  */
10584 #include <security/pam_appl.h>
10585 int
10586 main ()
10587 {
10588 pam_handle_t *pamh = 0;
10589                    unsigned int usec = 1;
10590                    int status = pam_fail_delay (pamh, usec);
10591   ;
10592   return 0;
10593 }
10594 _ACEOF
10595 if ac_fn_c_try_link "$LINENO"; then :
10596   ac_pam_fail_delay=yes
10597 else
10598   ac_pam_fail_delay=no
10599 fi
10600 rm -f core conftest.err conftest.$ac_objext \
10601     conftest$ac_exeext conftest.$ac_ext
10602       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
10603       LDFLAGS=$ac_save_LDFLAGS
10604 fi
10605
10606
10607       if test "$ac_pam_fail_delay" = yes ; then
10608         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10609 $as_echo "yes" >&6; }
10610         $as_echo "#define HAVE_PAM_FAIL_DELAY 1" >>confdefs.h
10611
10612       else
10613         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10614 $as_echo "no" >&6; }
10615       fi
10616
10617   fi
10618 fi
10619
10620
10621 ###############################################################################
10622 #
10623 #       Check for Kerberos.
10624 #
10625 ###############################################################################
10626
10627 have_kerberos=no
10628 have_kerberos5=no
10629 with_kerberos_req=unspecified
10630
10631
10632 # Check whether --with-kerberos was given.
10633 if test "${with_kerberos+set}" = set; then :
10634   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
10635 else
10636   with_kerberos=yes
10637 fi
10638
10639
10640
10641    case "$with_kerberos" in
10642     yes) ;;
10643     no)  ;;
10644
10645     /*)
10646      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos headers" >&5
10647 $as_echo_n "checking for Kerberos headers... " >&6; }
10648      d=$with_kerberos/include
10649      if test -d $d; then
10650        X_CFLAGS="-I$d $X_CFLAGS"
10651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10652 $as_echo "$d" >&6; }
10653      else
10654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10655 $as_echo "not found ($d: no such directory)" >&6; }
10656      fi
10657
10658      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos libs" >&5
10659 $as_echo_n "checking for Kerberos libs... " >&6; }
10660      d=$with_kerberos/lib
10661      if test -d $d; then
10662        X_LIBS="-L$d $X_LIBS"
10663        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10664 $as_echo "$d" >&6; }
10665      else
10666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10667 $as_echo "not found ($d: no such directory)" >&6; }
10668      fi
10669
10670      # replace the directory string with "yes".
10671      with_kerberos_req="yes"
10672      with_kerberos=$with_kerberos_req
10673      ;;
10674
10675     *)
10676      echo ""
10677      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
10678      echo "       If it is a directory, then \`DIR/include' will be added to"
10679      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10680      exit 1
10681      ;;
10682    esac
10683
10684
10685 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
10686   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 4" >&5
10687 $as_echo_n "checking for Kerberos 4... " >&6; }
10688 if ${ac_cv_kerberos+:} false; then :
10689   $as_echo_n "(cached) " >&6
10690 else
10691
10692   ac_save_CPPFLAGS="$CPPFLAGS"
10693   if test \! -z "$includedir" ; then
10694     CPPFLAGS="$CPPFLAGS -I$includedir"
10695   fi
10696   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10697   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10699 /* end confdefs.h.  */
10700 #include <krb.h>
10701 int
10702 main ()
10703 {
10704
10705   ;
10706   return 0;
10707 }
10708 _ACEOF
10709 if ac_fn_c_try_compile "$LINENO"; then :
10710   ac_cv_kerberos=yes
10711 else
10712   ac_cv_kerberos=no
10713 fi
10714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10715   CPPFLAGS="$ac_save_CPPFLAGS"
10716 fi
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos" >&5
10718 $as_echo "$ac_cv_kerberos" >&6; }
10719   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 5" >&5
10720 $as_echo_n "checking for Kerberos 5... " >&6; }
10721 if ${ac_cv_kerberos5+:} false; then :
10722   $as_echo_n "(cached) " >&6
10723 else
10724
10725   ac_save_CPPFLAGS="$CPPFLAGS"
10726   if test \! -z "$includedir" ; then
10727     CPPFLAGS="$CPPFLAGS -I$includedir"
10728   fi
10729   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10730   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10731   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10732 /* end confdefs.h.  */
10733 #include <kerberosIV/krb.h>
10734 int
10735 main ()
10736 {
10737
10738   ;
10739   return 0;
10740 }
10741 _ACEOF
10742 if ac_fn_c_try_compile "$LINENO"; then :
10743   ac_cv_kerberos5=yes
10744 else
10745   ac_cv_kerberos5=no
10746 fi
10747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10748   CPPFLAGS="$ac_save_CPPFLAGS"
10749 fi
10750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos5" >&5
10751 $as_echo "$ac_cv_kerberos5" >&6; }
10752
10753   if test "$ac_cv_kerberos" = yes ; then
10754     have_kerberos=yes
10755     $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10756
10757   fi
10758
10759   if test "$ac_cv_kerberos5" = yes ; then
10760
10761     # Andrew Snare <ajs@pigpond.com> wrote:
10762     #
10763     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
10764     # (krb4) was also available.  This turns out not to be the case with
10765     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
10766     # is optional.
10767     #
10768     # So, disable kerberosV support if libkrb4 can't be found.
10769     # This is not the best solution, but it makes the compile not fail.
10770     #
10771
10772   ac_save_CPPFLAGS="$CPPFLAGS"
10773   ac_save_LDFLAGS="$LDFLAGS"
10774 #  ac_save_LIBS="$LIBS"
10775
10776   if test \! -z "$includedir" ; then
10777     CPPFLAGS="$CPPFLAGS -I$includedir"
10778   fi
10779   # note: $X_CFLAGS includes $x_includes
10780   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10781
10782   if test \! -z "$libdir" ; then
10783     LDFLAGS="$LDFLAGS -L$libdir"
10784   fi
10785   # note: $X_LIBS includes $x_libraries
10786   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10787
10788   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10789   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10790   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_tf_realm in -lkrb4" >&5
10791 $as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
10792 if ${ac_cv_lib_krb4_krb_get_tf_realm+:} false; then :
10793   $as_echo_n "(cached) " >&6
10794 else
10795   ac_check_lib_save_LIBS=$LIBS
10796 LIBS="-lkrb4  $LIBS"
10797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10798 /* end confdefs.h.  */
10799
10800 /* Override any GCC internal prototype to avoid an error.
10801    Use char because int might match the return type of a GCC
10802    builtin and then its argument prototype would still apply.  */
10803 #ifdef __cplusplus
10804 extern "C"
10805 #endif
10806 char krb_get_tf_realm ();
10807 int
10808 main ()
10809 {
10810 return krb_get_tf_realm ();
10811   ;
10812   return 0;
10813 }
10814 _ACEOF
10815 if ac_fn_c_try_link "$LINENO"; then :
10816   ac_cv_lib_krb4_krb_get_tf_realm=yes
10817 else
10818   ac_cv_lib_krb4_krb_get_tf_realm=no
10819 fi
10820 rm -f core conftest.err conftest.$ac_objext \
10821     conftest$ac_exeext conftest.$ac_ext
10822 LIBS=$ac_check_lib_save_LIBS
10823 fi
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
10825 $as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
10826 if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = xyes; then :
10827   have_kerberos=yes
10828 else
10829   have_kerberos=no
10830 fi
10831
10832   CPPFLAGS="$ac_save_CPPFLAGS"
10833   LDFLAGS="$ac_save_LDFLAGS"
10834 #  LIBS="$ac_save_LIBS"
10835
10836     if test "$have_kerberos" = yes ; then
10837       have_kerberos5=yes
10838       $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10839
10840       $as_echo "#define HAVE_KERBEROS5 1" >>confdefs.h
10841
10842     else
10843       have_kerberos5=no
10844       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
10845 $as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
10846     fi
10847
10848   fi
10849
10850   if test "$have_kerberos5" = yes ; then
10851     # from Matt Knopp <mhat@infocalypse.netlag.com>
10852     # (who got it from amu@mit.edu)
10853
10854     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
10855
10856     # jwz: MacOS X uses -lkrb5, but not -lcrypt
10857
10858   ac_save_CPPFLAGS="$CPPFLAGS"
10859   ac_save_LDFLAGS="$LDFLAGS"
10860 #  ac_save_LIBS="$LIBS"
10861
10862   if test \! -z "$includedir" ; then
10863     CPPFLAGS="$CPPFLAGS -I$includedir"
10864   fi
10865   # note: $X_CFLAGS includes $x_includes
10866   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10867
10868   if test \! -z "$libdir" ; then
10869     LDFLAGS="$LDFLAGS -L$libdir"
10870   fi
10871   # note: $X_LIBS includes $x_libraries
10872   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10873
10874   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10875   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10876   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
10877 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
10878 if ${ac_cv_lib_crypt_crypt+:} false; then :
10879   $as_echo_n "(cached) " >&6
10880 else
10881   ac_check_lib_save_LIBS=$LIBS
10882 LIBS="-lcrypt  $LIBS"
10883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10884 /* end confdefs.h.  */
10885
10886 /* Override any GCC internal prototype to avoid an error.
10887    Use char because int might match the return type of a GCC
10888    builtin and then its argument prototype would still apply.  */
10889 #ifdef __cplusplus
10890 extern "C"
10891 #endif
10892 char crypt ();
10893 int
10894 main ()
10895 {
10896 return crypt ();
10897   ;
10898   return 0;
10899 }
10900 _ACEOF
10901 if ac_fn_c_try_link "$LINENO"; then :
10902   ac_cv_lib_crypt_crypt=yes
10903 else
10904   ac_cv_lib_crypt_crypt=no
10905 fi
10906 rm -f core conftest.err conftest.$ac_objext \
10907     conftest$ac_exeext conftest.$ac_ext
10908 LIBS=$ac_check_lib_save_LIBS
10909 fi
10910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
10911 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
10912 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
10913   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
10914 fi
10915
10916   CPPFLAGS="$ac_save_CPPFLAGS"
10917   LDFLAGS="$ac_save_LDFLAGS"
10918 #  LIBS="$ac_save_LIBS"
10919
10920
10921   elif test "$have_kerberos" = yes ; then
10922     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
10923     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
10924   fi
10925
10926   if test "$have_kerberos" = yes ; then
10927     ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
10928 if test "x$ac_cv_func_res_search" = xyes; then :
10929
10930 else
10931   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
10932 $as_echo_n "checking for res_search in -lresolv... " >&6; }
10933 if ${ac_cv_lib_resolv_res_search+:} false; then :
10934   $as_echo_n "(cached) " >&6
10935 else
10936   ac_check_lib_save_LIBS=$LIBS
10937 LIBS="-lresolv  $LIBS"
10938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10939 /* end confdefs.h.  */
10940
10941 /* Override any GCC internal prototype to avoid an error.
10942    Use char because int might match the return type of a GCC
10943    builtin and then its argument prototype would still apply.  */
10944 #ifdef __cplusplus
10945 extern "C"
10946 #endif
10947 char res_search ();
10948 int
10949 main ()
10950 {
10951 return res_search ();
10952   ;
10953   return 0;
10954 }
10955 _ACEOF
10956 if ac_fn_c_try_link "$LINENO"; then :
10957   ac_cv_lib_resolv_res_search=yes
10958 else
10959   ac_cv_lib_resolv_res_search=no
10960 fi
10961 rm -f core conftest.err conftest.$ac_objext \
10962     conftest$ac_exeext conftest.$ac_ext
10963 LIBS=$ac_check_lib_save_LIBS
10964 fi
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
10966 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
10967 if test "x$ac_cv_lib_resolv_res_search" = xyes; then :
10968   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
10969 else
10970   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
10971 $as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
10972
10973 fi
10974
10975 fi
10976
10977   fi
10978 fi
10979
10980
10981 ###############################################################################
10982 #
10983 #       Check for the nine billion variants of shadow passwords...
10984 #
10985 ###############################################################################
10986
10987 need_setuid=no
10988
10989 have_shadow=no
10990 with_shadow_req=unspecified
10991
10992
10993 # Check whether --with-shadow was given.
10994 if test "${with_shadow+set}" = set; then :
10995   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
10996 else
10997   with_shadow=yes
10998 fi
10999
11000
11001
11002    case "$with_shadow" in
11003     yes) ;;
11004     no)  ;;
11005
11006     /*)
11007      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password headers" >&5
11008 $as_echo_n "checking for shadow password headers... " >&6; }
11009      d=$with_shadow/include
11010      if test -d $d; then
11011        X_CFLAGS="-I$d $X_CFLAGS"
11012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11013 $as_echo "$d" >&6; }
11014      else
11015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11016 $as_echo "not found ($d: no such directory)" >&6; }
11017      fi
11018
11019      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password libs" >&5
11020 $as_echo_n "checking for shadow password libs... " >&6; }
11021      d=$with_shadow/lib
11022      if test -d $d; then
11023        X_LIBS="-L$d $X_LIBS"
11024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11025 $as_echo "$d" >&6; }
11026      else
11027        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11028 $as_echo "not found ($d: no such directory)" >&6; }
11029      fi
11030
11031      # replace the directory string with "yes".
11032      with_shadow_req="yes"
11033      with_shadow=$with_shadow_req
11034      ;;
11035
11036     *)
11037      echo ""
11038      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
11039      echo "       If it is a directory, then \`DIR/include' will be added to"
11040      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11041      exit 1
11042      ;;
11043    esac
11044
11045
11046 if test "$enable_locking" = no ; then
11047   with_shadow_req=no
11048   with_shadow=no
11049 fi
11050
11051
11052 ###############################################################################
11053 #
11054 #       Check for Sun "adjunct" passwords.
11055 #
11056 ###############################################################################
11057
11058 if test "$with_shadow" = yes ; then
11059   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sun-style shadow passwords" >&5
11060 $as_echo_n "checking for Sun-style shadow passwords... " >&6; }
11061 if ${ac_cv_sun_adjunct+:} false; then :
11062   $as_echo_n "(cached) " >&6
11063 else
11064
11065   ac_save_CPPFLAGS="$CPPFLAGS"
11066   if test \! -z "$includedir" ; then
11067     CPPFLAGS="$CPPFLAGS -I$includedir"
11068   fi
11069   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11070   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11072 /* end confdefs.h.  */
11073 #include <stdlib.h>
11074                                     #include <unistd.h>
11075                                     #include <sys/types.h>
11076                                     #include <sys/label.h>
11077                                     #include <sys/audit.h>
11078                                     #include <pwdadj.h>
11079 int
11080 main ()
11081 {
11082 struct passwd_adjunct *p = getpwanam("nobody");
11083                        const char *pw = p->pwa_passwd;
11084   ;
11085   return 0;
11086 }
11087 _ACEOF
11088 if ac_fn_c_try_compile "$LINENO"; then :
11089   ac_cv_sun_adjunct=yes
11090 else
11091   ac_cv_sun_adjunct=no
11092 fi
11093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11094   CPPFLAGS="$ac_save_CPPFLAGS"
11095 fi
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sun_adjunct" >&5
11097 $as_echo "$ac_cv_sun_adjunct" >&6; }
11098   if test "$ac_cv_sun_adjunct" = yes; then
11099     have_shadow_adjunct=yes
11100     have_shadow=yes
11101     need_setuid=yes
11102   fi
11103 fi
11104
11105
11106 ###############################################################################
11107 #
11108 #       Check for DEC and SCO so-called "enhanced" security.
11109 #
11110 ###############################################################################
11111
11112 if test "$with_shadow" = yes ; then
11113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DEC-style shadow passwords" >&5
11114 $as_echo_n "checking for DEC-style shadow passwords... " >&6; }
11115 if ${ac_cv_enhanced_passwd+:} false; then :
11116   $as_echo_n "(cached) " >&6
11117 else
11118
11119   ac_save_CPPFLAGS="$CPPFLAGS"
11120   if test \! -z "$includedir" ; then
11121     CPPFLAGS="$CPPFLAGS -I$includedir"
11122   fi
11123   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11124   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11126 /* end confdefs.h.  */
11127 #include <stdlib.h>
11128                                     #include <unistd.h>
11129                                     #include <sys/types.h>
11130                                     #include <pwd.h>
11131                                     #include <sys/security.h>
11132                                     #include <prot.h>
11133 int
11134 main ()
11135 {
11136 struct pr_passwd *p;
11137                        const char *pw;
11138                        set_auth_parameters(0, 0);
11139                        check_auth_parameters();
11140                        p = getprpwnam("nobody");
11141                        pw = p->ufld.fd_encrypt;
11142   ;
11143   return 0;
11144 }
11145 _ACEOF
11146 if ac_fn_c_try_compile "$LINENO"; then :
11147   ac_cv_enhanced_passwd=yes
11148 else
11149   ac_cv_enhanced_passwd=no
11150 fi
11151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11152   CPPFLAGS="$ac_save_CPPFLAGS"
11153 fi
11154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enhanced_passwd" >&5
11155 $as_echo "$ac_cv_enhanced_passwd" >&6; }
11156   if test $ac_cv_enhanced_passwd = yes; then
11157     have_shadow_enhanced=yes
11158     have_shadow=yes
11159     need_setuid=yes
11160
11161     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
11162     # (I'm told it needs -lcurses too, but I don't understand why.)
11163     # But on DEC, it's in -lsecurity.
11164     #
11165     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lprot" >&5
11166 $as_echo_n "checking for getprpwnam in -lprot... " >&6; }
11167 if ${ac_cv_lib_prot_getprpwnam+:} false; then :
11168   $as_echo_n "(cached) " >&6
11169 else
11170   ac_check_lib_save_LIBS=$LIBS
11171 LIBS="-lprot -lx $LIBS"
11172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11173 /* end confdefs.h.  */
11174
11175 /* Override any GCC internal prototype to avoid an error.
11176    Use char because int might match the return type of a GCC
11177    builtin and then its argument prototype would still apply.  */
11178 #ifdef __cplusplus
11179 extern "C"
11180 #endif
11181 char getprpwnam ();
11182 int
11183 main ()
11184 {
11185 return getprpwnam ();
11186   ;
11187   return 0;
11188 }
11189 _ACEOF
11190 if ac_fn_c_try_link "$LINENO"; then :
11191   ac_cv_lib_prot_getprpwnam=yes
11192 else
11193   ac_cv_lib_prot_getprpwnam=no
11194 fi
11195 rm -f core conftest.err conftest.$ac_objext \
11196     conftest$ac_exeext conftest.$ac_ext
11197 LIBS=$ac_check_lib_save_LIBS
11198 fi
11199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getprpwnam" >&5
11200 $as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
11201 if test "x$ac_cv_lib_prot_getprpwnam" = xyes; then :
11202   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
11203 else
11204   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lsecurity" >&5
11205 $as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
11206 if ${ac_cv_lib_security_getprpwnam+:} false; then :
11207   $as_echo_n "(cached) " >&6
11208 else
11209   ac_check_lib_save_LIBS=$LIBS
11210 LIBS="-lsecurity  $LIBS"
11211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11212 /* end confdefs.h.  */
11213
11214 /* Override any GCC internal prototype to avoid an error.
11215    Use char because int might match the return type of a GCC
11216    builtin and then its argument prototype would still apply.  */
11217 #ifdef __cplusplus
11218 extern "C"
11219 #endif
11220 char getprpwnam ();
11221 int
11222 main ()
11223 {
11224 return getprpwnam ();
11225   ;
11226   return 0;
11227 }
11228 _ACEOF
11229 if ac_fn_c_try_link "$LINENO"; then :
11230   ac_cv_lib_security_getprpwnam=yes
11231 else
11232   ac_cv_lib_security_getprpwnam=no
11233 fi
11234 rm -f core conftest.err conftest.$ac_objext \
11235     conftest$ac_exeext conftest.$ac_ext
11236 LIBS=$ac_check_lib_save_LIBS
11237 fi
11238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_getprpwnam" >&5
11239 $as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
11240 if test "x$ac_cv_lib_security_getprpwnam" = xyes; then :
11241   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
11242 fi
11243
11244 fi
11245
11246   fi
11247 fi
11248
11249 ###############################################################################
11250 #
11251 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
11252 #
11253 ###############################################################################
11254
11255 if test "$with_shadow" = yes ; then
11256   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HP-style shadow passwords" >&5
11257 $as_echo_n "checking for HP-style shadow passwords... " >&6; }
11258 if ${ac_cv_hpux_passwd+:} false; then :
11259   $as_echo_n "(cached) " >&6
11260 else
11261
11262   ac_save_CPPFLAGS="$CPPFLAGS"
11263   if test \! -z "$includedir" ; then
11264     CPPFLAGS="$CPPFLAGS -I$includedir"
11265   fi
11266   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11267   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11269 /* end confdefs.h.  */
11270 #include <stdlib.h>
11271                                     #include <unistd.h>
11272                                     #include <sys/types.h>
11273                                     #include <pwd.h>
11274                                     #include <hpsecurity.h>
11275                                     #include <prot.h>
11276 int
11277 main ()
11278 {
11279 struct s_passwd *p = getspwnam("nobody");
11280                        const char *pw = p->pw_passwd;
11281   ;
11282   return 0;
11283 }
11284 _ACEOF
11285 if ac_fn_c_try_compile "$LINENO"; then :
11286   ac_cv_hpux_passwd=yes
11287 else
11288   ac_cv_hpux_passwd=no
11289 fi
11290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11291   CPPFLAGS="$ac_save_CPPFLAGS"
11292 fi
11293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_hpux_passwd" >&5
11294 $as_echo "$ac_cv_hpux_passwd" >&6; }
11295   if test "$ac_cv_hpux_passwd" = yes; then
11296     have_shadow_hpux=yes
11297     have_shadow=yes
11298     need_setuid=yes
11299
11300     # on HPUX, bigcrypt is in -lsec
11301     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsec" >&5
11302 $as_echo_n "checking for bigcrypt in -lsec... " >&6; }
11303 if ${ac_cv_lib_sec_bigcrypt+:} false; then :
11304   $as_echo_n "(cached) " >&6
11305 else
11306   ac_check_lib_save_LIBS=$LIBS
11307 LIBS="-lsec  $LIBS"
11308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11309 /* end confdefs.h.  */
11310
11311 /* Override any GCC internal prototype to avoid an error.
11312    Use char because int might match the return type of a GCC
11313    builtin and then its argument prototype would still apply.  */
11314 #ifdef __cplusplus
11315 extern "C"
11316 #endif
11317 char bigcrypt ();
11318 int
11319 main ()
11320 {
11321 return bigcrypt ();
11322   ;
11323   return 0;
11324 }
11325 _ACEOF
11326 if ac_fn_c_try_link "$LINENO"; then :
11327   ac_cv_lib_sec_bigcrypt=yes
11328 else
11329   ac_cv_lib_sec_bigcrypt=no
11330 fi
11331 rm -f core conftest.err conftest.$ac_objext \
11332     conftest$ac_exeext conftest.$ac_ext
11333 LIBS=$ac_check_lib_save_LIBS
11334 fi
11335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_bigcrypt" >&5
11336 $as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
11337 if test "x$ac_cv_lib_sec_bigcrypt" = xyes; then :
11338   PASSWD_LIBS="$PASSWD_LIBS -lsec"
11339 fi
11340
11341   fi
11342 fi
11343
11344
11345 ###############################################################################
11346 #
11347 #       Check for FreeBSD-style shadow passwords.
11348 #
11349 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
11350 #       password systems -- except you only get stuff in the pw_passwd field
11351 #       if the running program is setuid.  So, guess that we've got this
11352 #       lossage to contend with if /etc/master.passwd exists, and default to
11353 #       a setuid installation.
11354 #
11355 ###############################################################################
11356
11357 if test "$with_shadow" = yes ; then
11358   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeBSD-style shadow passwords" >&5
11359 $as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
11360 if ${ac_cv_master_passwd+:} false; then :
11361   $as_echo_n "(cached) " >&6
11362 else
11363   if test -f /etc/master.passwd ; then
11364                     ac_cv_master_passwd=yes
11365                   else
11366                     ac_cv_master_passwd=no
11367                   fi
11368 fi
11369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_master_passwd" >&5
11370 $as_echo "$ac_cv_master_passwd" >&6; }
11371   if test "$ac_cv_master_passwd" = yes; then
11372     need_setuid=yes
11373   fi
11374 fi
11375
11376
11377 ###############################################################################
11378 #
11379 #       Check for traditional (ha!) shadow passwords.
11380 #
11381 ###############################################################################
11382
11383 if test "$with_shadow" = yes ; then
11384   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic shadow passwords" >&5
11385 $as_echo_n "checking for generic shadow passwords... " >&6; }
11386 if ${ac_cv_shadow+:} false; then :
11387   $as_echo_n "(cached) " >&6
11388 else
11389
11390   ac_save_CPPFLAGS="$CPPFLAGS"
11391   if test \! -z "$includedir" ; then
11392     CPPFLAGS="$CPPFLAGS -I$includedir"
11393   fi
11394   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11395   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11397 /* end confdefs.h.  */
11398 #include <stdlib.h>
11399                                     #include <unistd.h>
11400                                     #include <sys/types.h>
11401                                     #include <pwd.h>
11402                                     #include <shadow.h>
11403 int
11404 main ()
11405 {
11406 struct spwd *p = getspnam("nobody");
11407                        const char *pw = p->sp_pwdp;
11408   ;
11409   return 0;
11410 }
11411 _ACEOF
11412 if ac_fn_c_try_compile "$LINENO"; then :
11413   ac_cv_shadow=yes
11414 else
11415   ac_cv_shadow=no
11416 fi
11417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11418   CPPFLAGS="$ac_save_CPPFLAGS"
11419 fi
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_shadow" >&5
11421 $as_echo "$ac_cv_shadow" >&6; }
11422   if test "$ac_cv_shadow" = yes; then
11423     have_shadow=yes
11424     need_setuid=yes
11425
11426     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
11427     have_getspnam=no
11428     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lc" >&5
11429 $as_echo_n "checking for getspnam in -lc... " >&6; }
11430 if ${ac_cv_lib_c_getspnam+:} false; then :
11431   $as_echo_n "(cached) " >&6
11432 else
11433   ac_check_lib_save_LIBS=$LIBS
11434 LIBS="-lc  $LIBS"
11435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11436 /* end confdefs.h.  */
11437
11438 /* Override any GCC internal prototype to avoid an error.
11439    Use char because int might match the return type of a GCC
11440    builtin and then its argument prototype would still apply.  */
11441 #ifdef __cplusplus
11442 extern "C"
11443 #endif
11444 char getspnam ();
11445 int
11446 main ()
11447 {
11448 return getspnam ();
11449   ;
11450   return 0;
11451 }
11452 _ACEOF
11453 if ac_fn_c_try_link "$LINENO"; then :
11454   ac_cv_lib_c_getspnam=yes
11455 else
11456   ac_cv_lib_c_getspnam=no
11457 fi
11458 rm -f core conftest.err conftest.$ac_objext \
11459     conftest$ac_exeext conftest.$ac_ext
11460 LIBS=$ac_check_lib_save_LIBS
11461 fi
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_getspnam" >&5
11463 $as_echo "$ac_cv_lib_c_getspnam" >&6; }
11464 if test "x$ac_cv_lib_c_getspnam" = xyes; then :
11465   have_getspnam=yes
11466 fi
11467
11468     if test "$have_getspnam" = no ; then
11469       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
11470 $as_echo_n "checking for getspnam in -lgen... " >&6; }
11471 if ${ac_cv_lib_gen_getspnam+:} false; then :
11472   $as_echo_n "(cached) " >&6
11473 else
11474   ac_check_lib_save_LIBS=$LIBS
11475 LIBS="-lgen  $LIBS"
11476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477 /* end confdefs.h.  */
11478
11479 /* Override any GCC internal prototype to avoid an error.
11480    Use char because int might match the return type of a GCC
11481    builtin and then its argument prototype would still apply.  */
11482 #ifdef __cplusplus
11483 extern "C"
11484 #endif
11485 char getspnam ();
11486 int
11487 main ()
11488 {
11489 return getspnam ();
11490   ;
11491   return 0;
11492 }
11493 _ACEOF
11494 if ac_fn_c_try_link "$LINENO"; then :
11495   ac_cv_lib_gen_getspnam=yes
11496 else
11497   ac_cv_lib_gen_getspnam=no
11498 fi
11499 rm -f core conftest.err conftest.$ac_objext \
11500     conftest$ac_exeext conftest.$ac_ext
11501 LIBS=$ac_check_lib_save_LIBS
11502 fi
11503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
11504 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
11505 if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
11506   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
11507 fi
11508
11509     fi
11510   fi
11511 fi
11512
11513
11514 ###############################################################################
11515 #
11516 #       Check for other libraries needed for non-shadow passwords.
11517 #
11518 ###############################################################################
11519
11520 if test "$enable_locking" = yes ; then
11521
11522   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
11523   have_crypt=no
11524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lc" >&5
11525 $as_echo_n "checking for crypt in -lc... " >&6; }
11526 if ${ac_cv_lib_c_crypt+:} false; then :
11527   $as_echo_n "(cached) " >&6
11528 else
11529   ac_check_lib_save_LIBS=$LIBS
11530 LIBS="-lc  $LIBS"
11531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11532 /* end confdefs.h.  */
11533
11534 /* Override any GCC internal prototype to avoid an error.
11535    Use char because int might match the return type of a GCC
11536    builtin and then its argument prototype would still apply.  */
11537 #ifdef __cplusplus
11538 extern "C"
11539 #endif
11540 char crypt ();
11541 int
11542 main ()
11543 {
11544 return crypt ();
11545   ;
11546   return 0;
11547 }
11548 _ACEOF
11549 if ac_fn_c_try_link "$LINENO"; then :
11550   ac_cv_lib_c_crypt=yes
11551 else
11552   ac_cv_lib_c_crypt=no
11553 fi
11554 rm -f core conftest.err conftest.$ac_objext \
11555     conftest$ac_exeext conftest.$ac_ext
11556 LIBS=$ac_check_lib_save_LIBS
11557 fi
11558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_crypt" >&5
11559 $as_echo "$ac_cv_lib_c_crypt" >&6; }
11560 if test "x$ac_cv_lib_c_crypt" = xyes; then :
11561   have_crypt=yes
11562 fi
11563
11564   if test "$have_crypt" = no ; then
11565     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11566 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
11567 if ${ac_cv_lib_crypt_crypt+:} false; then :
11568   $as_echo_n "(cached) " >&6
11569 else
11570   ac_check_lib_save_LIBS=$LIBS
11571 LIBS="-lcrypt  $LIBS"
11572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11573 /* end confdefs.h.  */
11574
11575 /* Override any GCC internal prototype to avoid an error.
11576    Use char because int might match the return type of a GCC
11577    builtin and then its argument prototype would still apply.  */
11578 #ifdef __cplusplus
11579 extern "C"
11580 #endif
11581 char crypt ();
11582 int
11583 main ()
11584 {
11585 return crypt ();
11586   ;
11587   return 0;
11588 }
11589 _ACEOF
11590 if ac_fn_c_try_link "$LINENO"; then :
11591   ac_cv_lib_crypt_crypt=yes
11592 else
11593   ac_cv_lib_crypt_crypt=no
11594 fi
11595 rm -f core conftest.err conftest.$ac_objext \
11596     conftest$ac_exeext conftest.$ac_ext
11597 LIBS=$ac_check_lib_save_LIBS
11598 fi
11599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
11600 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11601 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
11602   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11603 fi
11604
11605   fi
11606 fi
11607
11608
11609 # Most of the above shadow mechanisms will have set need_setuid to yes,
11610 # if they were found.  But, on some systems, we need setuid even when
11611 # using plain old vanilla passwords.
11612 #
11613 if test "$enable_locking" = yes ; then
11614   case "$host" in
11615     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
11616       need_setuid=yes
11617     ;;
11618   esac
11619 fi
11620
11621
11622 if test "$have_shadow_adjunct" = yes ; then
11623   $as_echo "#define HAVE_ADJUNCT_PASSWD 1" >>confdefs.h
11624
11625 elif test "$have_shadow_enhanced" = yes ; then
11626   $as_echo "#define HAVE_ENHANCED_PASSWD 1" >>confdefs.h
11627
11628 elif test "$have_shadow_hpux" = yes ; then
11629   $as_echo "#define HAVE_HPUX_PASSWD 1" >>confdefs.h
11630
11631 elif test "$have_shadow" = yes ; then
11632   $as_echo "#define HAVE_SHADOW_PASSWD 1" >>confdefs.h
11633
11634 fi
11635
11636
11637 ###############################################################################
11638 #
11639 #       Check for external password helper
11640 #       On SuSE, instead of having xscreensaver be a setuid program, they
11641 #       fork an external program that takes the password on stdin, and
11642 #       returns true if that password is a valid one.  Then only that
11643 #       smaller program needs to be setuid.
11644 #
11645 #       (Note that this external program is not a GUI: the GUI is still
11646 #       all in xscreensaver itself; the external program just does auth.)
11647 #
11648 ###############################################################################
11649
11650 have_passwd_helper=no
11651 with_passwd_helper_req=unspecified
11652
11653
11654 # Check whether --with-passwd-helper was given.
11655 if test "${with_passwd_helper+set}" = set; then :
11656   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
11657 else
11658   with_passwd_helper=no
11659 fi
11660
11661 # no HANDLE_X_PATH_ARG for this one
11662
11663 if test "$enable_locking" = no ; then
11664   with_passwd_helper_req=no
11665   with_passwd_helper=no
11666 fi
11667
11668 case "$with_passwd_helper" in
11669   ""|no) : ;;
11670   /*)
11671     cat >>confdefs.h <<_ACEOF
11672 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
11673 _ACEOF
11674
11675     have_passwd_helper=yes;;
11676   *)
11677     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
11678     exit 1
11679 esac
11680
11681
11682 ###############################################################################
11683 #
11684 #       Check for a login manager for a "New Login" button on the lock dialog.
11685 #       Usually this will be "/usr/bin/gdmflexiserver".
11686 #
11687 ###############################################################################
11688
11689 with_login_manager_req=unspecified
11690 default_login_manager_1='gdmflexiserver -ls'
11691 default_login_manager_2='kdmctl reserve'
11692
11693
11694 # Check whether --with-login-manager was given.
11695 if test "${with_login_manager+set}" = set; then :
11696   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
11697 else
11698   with_login_manager=yes
11699 fi
11700
11701 # no HANDLE_X_PATH_ARG for this one
11702
11703 if test "$enable_locking" = no ; then
11704   with_login_manager_req=no
11705   with_login_manager=no
11706 fi
11707
11708 case "$with_login_manager_req" in
11709   no)
11710     with_login_manager=""
11711   ;;
11712
11713   yes|unspecified)
11714     # Try both defaults, use the one that exists.
11715
11716     set dummy $default_login_manager_1 ; login_manager_tmp=$2
11717     unset ac_cv_path_login_manager_tmp  # don't cache
11718     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11719 set dummy $login_manager_tmp; ac_word=$2
11720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11721 $as_echo_n "checking for $ac_word... " >&6; }
11722 if ${ac_cv_path_login_manager_tmp+:} false; then :
11723   $as_echo_n "(cached) " >&6
11724 else
11725   case $login_manager_tmp in
11726   [\\/]* | ?:[\\/]*)
11727   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11728   ;;
11729   *)
11730   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11731 for as_dir in $PATH
11732 do
11733   IFS=$as_save_IFS
11734   test -z "$as_dir" && as_dir=.
11735     for ac_exec_ext in '' $ac_executable_extensions; do
11736   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11737     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11738     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11739     break 2
11740   fi
11741 done
11742   done
11743 IFS=$as_save_IFS
11744
11745   ;;
11746 esac
11747 fi
11748 login_manager_tmp=$ac_cv_path_login_manager_tmp
11749 if test -n "$login_manager_tmp"; then
11750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11751 $as_echo "$login_manager_tmp" >&6; }
11752 else
11753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11754 $as_echo "no" >&6; }
11755 fi
11756
11757
11758     if test ! -z "$login_manager_tmp" ; then
11759       with_login_manager="$default_login_manager_1"
11760     else
11761       set dummy $default_login_manager_2 ; login_manager_tmp=$2
11762       unset ac_cv_path_login_manager_tmp  # don't cache
11763       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11764 set dummy $login_manager_tmp; ac_word=$2
11765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11766 $as_echo_n "checking for $ac_word... " >&6; }
11767 if ${ac_cv_path_login_manager_tmp+:} false; then :
11768   $as_echo_n "(cached) " >&6
11769 else
11770   case $login_manager_tmp in
11771   [\\/]* | ?:[\\/]*)
11772   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11773   ;;
11774   *)
11775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11776 for as_dir in $PATH
11777 do
11778   IFS=$as_save_IFS
11779   test -z "$as_dir" && as_dir=.
11780     for ac_exec_ext in '' $ac_executable_extensions; do
11781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11782     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11784     break 2
11785   fi
11786 done
11787   done
11788 IFS=$as_save_IFS
11789
11790   ;;
11791 esac
11792 fi
11793 login_manager_tmp=$ac_cv_path_login_manager_tmp
11794 if test -n "$login_manager_tmp"; then
11795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11796 $as_echo "$login_manager_tmp" >&6; }
11797 else
11798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11799 $as_echo "no" >&6; }
11800 fi
11801
11802
11803       if test ! -z "$login_manager_tmp" ; then
11804         with_login_manager="$default_login_manager_2"
11805       else
11806         with_login_manager=""
11807       fi
11808     fi
11809   ;;
11810
11811   /*)
11812     # absolute path specified on cmd line
11813     set dummy $with_login_manager_req ; login_manager_tmp=$2
11814     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $login_manager_tmp" >&5
11815 $as_echo_n "checking for $login_manager_tmp... " >&6; }
11816     if test -x "$login_manager_tmp" ; then
11817       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11818 $as_echo "yes" >&6; }
11819     else
11820       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11821 $as_echo "no" >&6; }
11822       with_login_manager=""
11823     fi
11824   ;;
11825
11826   *)
11827     # relative path specified on cmd line
11828     set dummy $with_login_manager_req ; login_manager_tmp=$2
11829     unset ac_cv_path_login_manager_tmp    # don't cache
11830     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11831 set dummy $login_manager_tmp; ac_word=$2
11832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11833 $as_echo_n "checking for $ac_word... " >&6; }
11834 if ${ac_cv_path_login_manager_tmp+:} false; then :
11835   $as_echo_n "(cached) " >&6
11836 else
11837   case $login_manager_tmp in
11838   [\\/]* | ?:[\\/]*)
11839   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11840   ;;
11841   *)
11842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11843 for as_dir in $PATH
11844 do
11845   IFS=$as_save_IFS
11846   test -z "$as_dir" && as_dir=.
11847     for ac_exec_ext in '' $ac_executable_extensions; do
11848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11849     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11851     break 2
11852   fi
11853 done
11854   done
11855 IFS=$as_save_IFS
11856
11857   ;;
11858 esac
11859 fi
11860 login_manager_tmp=$ac_cv_path_login_manager_tmp
11861 if test -n "$login_manager_tmp"; then
11862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11863 $as_echo "$login_manager_tmp" >&6; }
11864 else
11865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11866 $as_echo "no" >&6; }
11867 fi
11868
11869
11870     if test -z "$login_manager_tmp" ; then
11871       with_login_manager=""
11872     else
11873       with_login_manager="$login_manager_tmp"
11874     fi
11875   ;;
11876 esac
11877 ac_cv_login_manager_program="$with_login_manager"
11878
11879 NEW_LOGIN_COMMAND_P=''
11880 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
11881
11882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for login manager" >&5
11883 $as_echo_n "checking for login manager... " >&6; }
11884 if test -z "$NEW_LOGIN_COMMAND" ; then
11885   NEW_LOGIN_COMMAND="$default_login_manager_1"
11886   NEW_LOGIN_COMMAND_P='! '
11887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND (disabled)" >&5
11888 $as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
11889 else
11890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND" >&5
11891 $as_echo "$NEW_LOGIN_COMMAND" >&6; }
11892 fi
11893
11894
11895 ###############################################################################
11896 #
11897 #       Check for -lgtk (and Gnome stuff)
11898 #
11899 ###############################################################################
11900
11901 have_gtk=no
11902 with_gtk_req=unspecified
11903
11904 # Check whether --with-gtk was given.
11905 if test "${with_gtk+set}" = set; then :
11906   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
11907 else
11908   with_gtk=yes
11909 fi
11910
11911
11912 # if --with-gtk=/directory/ was specified, remember that directory so that
11913 # we can also look for the `gtk-config' program in that directory.
11914 case "$with_gtk" in
11915   /*)
11916     gtk_dir="$with_gtk"
11917     ;;
11918   *)
11919     gtk_dir=""
11920     ;;
11921 esac
11922
11923
11924    case "$with_gtk" in
11925     yes) ;;
11926     no)  ;;
11927
11928     /*)
11929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk headers" >&5
11930 $as_echo_n "checking for Gtk headers... " >&6; }
11931      d=$with_gtk/include
11932      if test -d $d; then
11933        X_CFLAGS="-I$d $X_CFLAGS"
11934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11935 $as_echo "$d" >&6; }
11936      else
11937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11938 $as_echo "not found ($d: no such directory)" >&6; }
11939      fi
11940
11941      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
11942 $as_echo_n "checking for Gtk libs... " >&6; }
11943      d=$with_gtk/lib
11944      if test -d $d; then
11945        X_LIBS="-L$d $X_LIBS"
11946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11947 $as_echo "$d" >&6; }
11948      else
11949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11950 $as_echo "not found ($d: no such directory)" >&6; }
11951      fi
11952
11953      # replace the directory string with "yes".
11954      with_gtk_req="yes"
11955      with_gtk=$with_gtk_req
11956      ;;
11957
11958     *)
11959      echo ""
11960      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
11961      echo "       If it is a directory, then \`DIR/include' will be added to"
11962      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11963      exit 1
11964      ;;
11965    esac
11966
11967
11968 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
11969   echo "error: must be yes or no: --with-gtk=$with_gtk"
11970   exit 1
11971 fi
11972
11973
11974 parse_gtk_version_string() {
11975   # M4 sucks!!
11976
11977   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
11978   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
11979
11980   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
11981   if test -z "$ac_gtk_version"; then
11982     ac_gtk_version=unknown
11983     ac_gtk_version_string=unknown
11984   fi
11985 }
11986
11987 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
11988 # if the user specified --with-gtk=/foo/ then look there.
11989 #
11990 gtk_path="$PATH"
11991 if test ! -z "$gtk_dir"; then
11992   # canonicalize slashes.
11993   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
11994   gtk_path="$foo:$gtk_path"
11995 fi
11996
11997 for ac_prog in pkg-config
11998 do
11999   # Extract the first word of "$ac_prog", so it can be a program name with args.
12000 set dummy $ac_prog; ac_word=$2
12001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12002 $as_echo_n "checking for $ac_word... " >&6; }
12003 if ${ac_cv_path_pkg_config+:} false; then :
12004   $as_echo_n "(cached) " >&6
12005 else
12006   case $pkg_config in
12007   [\\/]* | ?:[\\/]*)
12008   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
12009   ;;
12010   *)
12011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12012 for as_dir in $gtk_path
12013 do
12014   IFS=$as_save_IFS
12015   test -z "$as_dir" && as_dir=.
12016     for ac_exec_ext in '' $ac_executable_extensions; do
12017   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12018     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
12019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12020     break 2
12021   fi
12022 done
12023   done
12024 IFS=$as_save_IFS
12025
12026   ;;
12027 esac
12028 fi
12029 pkg_config=$ac_cv_path_pkg_config
12030 if test -n "$pkg_config"; then
12031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config" >&5
12032 $as_echo "$pkg_config" >&6; }
12033 else
12034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12035 $as_echo "no" >&6; }
12036 fi
12037
12038
12039   test -n "$pkg_config" && break
12040 done
12041
12042
12043 if test -z "$pkg_config" ; then
12044   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found!" >&5
12045 $as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
12046   pkg_config="false"
12047 fi
12048
12049
12050 # Utility function for running pkg-config-based tests...
12051 #
12052 pkgs=''
12053 pkg_check_version() {
12054   if test "$ok" = yes ; then
12055     req="$1"
12056     min="$2"
12057     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $req" >&5
12058 $as_echo_n "checking for $req... " >&6; }
12059     if $pkg_config --exists "$req" ; then
12060       vers=`$pkg_config --modversion "$req"`
12061       if $pkg_config --exists "$req >= $min" ; then
12062         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers" >&5
12063 $as_echo "$vers" >&6; }
12064         pkgs="$pkgs $req"
12065         return 1
12066       else
12067         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers (wanted >= $min)" >&5
12068 $as_echo "$vers (wanted >= $min)" >&6; }
12069         ok=no
12070         return 0
12071       fi
12072     else
12073       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12074 $as_echo "no" >&6; }
12075       ok=no
12076       return 0
12077     fi
12078   fi
12079 }
12080
12081
12082 jurassic_gtk=no
12083 gtk_halfassed=no
12084
12085 if test "$with_gtk" = yes; then
12086   have_gtk=no
12087
12088   ok="yes"
12089   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
12090   pkg_check_version         gmodule-2.0  2.0.0
12091   pkg_check_version          libxml-2.0  2.4.6
12092   pkg_check_version        libglade-2.0  1.99.0
12093   pkg_check_version      gdk-pixbuf-2.0  2.0.0
12094   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
12095   have_gtk="$ok"
12096
12097   if test "$have_gtk" = no; then
12098     if test -n "$ac_gtk_version_string" ; then
12099       gtk_halfassed="$ac_gtk_version_string"
12100       gtk_halfassed_lib="$req"
12101     fi
12102   fi
12103
12104   if test "$have_gtk" = yes; then
12105     parse_gtk_version_string
12106     jurassic_gtk=no
12107   fi
12108
12109   if test "$have_gtk" = yes; then
12110     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk includes" >&5
12111 $as_echo_n "checking for Gtk includes... " >&6; }
12112 if ${ac_cv_gtk_config_cflags+:} false; then :
12113   $as_echo_n "(cached) " >&6
12114 else
12115   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
12116 fi
12117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_cflags" >&5
12118 $as_echo "$ac_cv_gtk_config_cflags" >&6; }
12119     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
12120 $as_echo_n "checking for Gtk libs... " >&6; }
12121 if ${ac_cv_gtk_config_libs+:} false; then :
12122   $as_echo_n "(cached) " >&6
12123 else
12124   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
12125 fi
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_libs" >&5
12127 $as_echo "$ac_cv_gtk_config_libs" >&6; }
12128   fi
12129
12130   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12131   ac_gtk_config_libs=$ac_cv_gtk_config_libs
12132
12133   GTK_EXTRA_OBJS=""
12134   GTK_DATADIR=""
12135   if test "$have_gtk" = yes; then
12136     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
12137     GTK_DATADIR="$GTK_DATADIR/share"
12138   fi
12139
12140   if test "$have_gtk" = yes; then
12141     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
12142     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
12143     $as_echo "#define HAVE_GTK 1" >>confdefs.h
12144
12145     $as_echo "#define HAVE_GTK2 1" >>confdefs.h
12146
12147     $as_echo "#define HAVE_XML 1" >>confdefs.h
12148
12149   fi
12150
12151 fi
12152
12153
12154 # Check for the various Gnome help and URL loading programs.
12155 #
12156 WITH_BROWSER=gnome-open
12157 if test "$have_gtk" = yes; then
12158   for ac_prog in gnome-open
12159 do
12160   # Extract the first word of "$ac_prog", so it can be a program name with args.
12161 set dummy $ac_prog; ac_word=$2
12162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12163 $as_echo_n "checking for $ac_word... " >&6; }
12164 if ${ac_cv_prog_gnome_open_program+:} false; then :
12165   $as_echo_n "(cached) " >&6
12166 else
12167   if test -n "$gnome_open_program"; then
12168   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
12169 else
12170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12171 for as_dir in $PATH
12172 do
12173   IFS=$as_save_IFS
12174   test -z "$as_dir" && as_dir=.
12175     for ac_exec_ext in '' $ac_executable_extensions; do
12176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12177     ac_cv_prog_gnome_open_program="$ac_prog"
12178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12179     break 2
12180   fi
12181 done
12182   done
12183 IFS=$as_save_IFS
12184
12185 fi
12186 fi
12187 gnome_open_program=$ac_cv_prog_gnome_open_program
12188 if test -n "$gnome_open_program"; then
12189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_open_program" >&5
12190 $as_echo "$gnome_open_program" >&6; }
12191 else
12192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12193 $as_echo "no" >&6; }
12194 fi
12195
12196
12197   test -n "$gnome_open_program" && break
12198 done
12199
12200   for ac_prog in gnome-url-show
12201 do
12202   # Extract the first word of "$ac_prog", so it can be a program name with args.
12203 set dummy $ac_prog; ac_word=$2
12204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12205 $as_echo_n "checking for $ac_word... " >&6; }
12206 if ${ac_cv_prog_gnome_url_show_program+:} false; then :
12207   $as_echo_n "(cached) " >&6
12208 else
12209   if test -n "$gnome_url_show_program"; then
12210   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
12211 else
12212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12213 for as_dir in $PATH
12214 do
12215   IFS=$as_save_IFS
12216   test -z "$as_dir" && as_dir=.
12217     for ac_exec_ext in '' $ac_executable_extensions; do
12218   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12219     ac_cv_prog_gnome_url_show_program="$ac_prog"
12220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12221     break 2
12222   fi
12223 done
12224   done
12225 IFS=$as_save_IFS
12226
12227 fi
12228 fi
12229 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
12230 if test -n "$gnome_url_show_program"; then
12231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_url_show_program" >&5
12232 $as_echo "$gnome_url_show_program" >&6; }
12233 else
12234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12235 $as_echo "no" >&6; }
12236 fi
12237
12238
12239   test -n "$gnome_url_show_program" && break
12240 done
12241
12242 fi
12243
12244
12245 ###############################################################################
12246 #
12247 #       Check for -lXm.
12248 #
12249 ###############################################################################
12250
12251 have_motif=no
12252 with_motif_req=unspecified
12253
12254 # Check whether --with-motif was given.
12255 if test "${with_motif+set}" = set; then :
12256   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
12257 else
12258   with_motif=no
12259 fi
12260
12261
12262
12263    case "$with_motif" in
12264     yes) ;;
12265     no)  ;;
12266
12267     /*)
12268      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif headers" >&5
12269 $as_echo_n "checking for Motif headers... " >&6; }
12270      d=$with_motif/include
12271      if test -d $d; then
12272        X_CFLAGS="-I$d $X_CFLAGS"
12273        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12274 $as_echo "$d" >&6; }
12275      else
12276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12277 $as_echo "not found ($d: no such directory)" >&6; }
12278      fi
12279
12280      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif libs" >&5
12281 $as_echo_n "checking for Motif libs... " >&6; }
12282      d=$with_motif/lib
12283      if test -d $d; then
12284        X_LIBS="-L$d $X_LIBS"
12285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12286 $as_echo "$d" >&6; }
12287      else
12288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12289 $as_echo "not found ($d: no such directory)" >&6; }
12290      fi
12291
12292      # replace the directory string with "yes".
12293      with_motif_req="yes"
12294      with_motif=$with_motif_req
12295      ;;
12296
12297     *)
12298      echo ""
12299      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12300      echo "       If it is a directory, then \`DIR/include' will be added to"
12301      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12302      exit 1
12303      ;;
12304    esac
12305
12306
12307 if test "$with_motif" != yes -a "$with_motif" != no ; then
12308   echo "error: must be yes or no: --with-motif=$with_motif"
12309   exit 1
12310 fi
12311
12312 if test "$with_motif" = yes; then
12313   have_motif=no
12314
12315   ac_save_CPPFLAGS="$CPPFLAGS"
12316   if test \! -z "$includedir" ; then
12317     CPPFLAGS="$CPPFLAGS -I$includedir"
12318   fi
12319   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12320   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12321   ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "#include <stdlib.h>
12322                      #include <stdio.h>
12323                      #include <X11/Intrinsic.h>
12324 "
12325 if test "x$ac_cv_header_Xm_Xm_h" = xyes; then :
12326   have_motif=yes
12327                      $as_echo "#define HAVE_MOTIF 1" >>confdefs.h
12328
12329                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12330 fi
12331
12332
12333   CPPFLAGS="$ac_save_CPPFLAGS"
12334 fi
12335
12336
12337 if test "$have_motif" = yes; then
12338
12339   ac_save_CPPFLAGS="$CPPFLAGS"
12340   if test \! -z "$includedir" ; then
12341     CPPFLAGS="$CPPFLAGS -I$includedir"
12342   fi
12343   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12344   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12345   ac_fn_c_check_header_compile "$LINENO" "Xm/ComboBox.h" "ac_cv_header_Xm_ComboBox_h" "#include <stdlib.h>
12346                      #include <stdio.h>
12347                      #include <X11/Intrinsic.h>
12348 "
12349 if test "x$ac_cv_header_Xm_ComboBox_h" = xyes; then :
12350   $as_echo "#define HAVE_XMCOMBOBOX 1" >>confdefs.h
12351
12352 fi
12353
12354
12355   CPPFLAGS="$ac_save_CPPFLAGS"
12356 fi
12357
12358
12359 ###############################################################################
12360 #
12361 #       Checking whether Motif is really Lesstif.
12362 #
12363 ###############################################################################
12364
12365 have_lesstif=no
12366 if test "$have_motif" = yes ; then
12367   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif is really LessTif" >&5
12368 $as_echo_n "checking whether Motif is really LessTif... " >&6; }
12369 if ${ac_cv_have_lesstif+:} false; then :
12370   $as_echo_n "(cached) " >&6
12371 else
12372
12373   ac_save_CPPFLAGS="$CPPFLAGS"
12374   if test \! -z "$includedir" ; then
12375     CPPFLAGS="$CPPFLAGS -I$includedir"
12376   fi
12377   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12378   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12380 /* end confdefs.h.  */
12381 #include <Xm/Xm.h>
12382 int
12383 main ()
12384 {
12385 long vers = LesstifVersion;
12386   ;
12387   return 0;
12388 }
12389 _ACEOF
12390 if ac_fn_c_try_compile "$LINENO"; then :
12391   ac_cv_have_lesstif=yes
12392 else
12393   ac_cv_have_lesstif=no
12394 fi
12395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12396   CPPFLAGS="$ac_save_CPPFLAGS"
12397 fi
12398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lesstif" >&5
12399 $as_echo "$ac_cv_have_lesstif" >&6; }
12400   have_lesstif=$ac_cv_have_lesstif
12401 fi
12402
12403
12404 lesstif_version=unknown
12405 lesstif_version_string=unknown
12406
12407 if test "$have_lesstif" = yes ; then
12408   ltv=unknown
12409   echo unknown > conftest-lt
12410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking LessTif version number" >&5
12411 $as_echo_n "checking LessTif version number... " >&6; }
12412 if ${ac_cv_lesstif_version_string+:} false; then :
12413   $as_echo_n "(cached) " >&6
12414 else
12415
12416   ac_save_CPPFLAGS="$CPPFLAGS"
12417   if test \! -z "$includedir" ; then
12418     CPPFLAGS="$CPPFLAGS -I$includedir"
12419   fi
12420   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12421   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12422   if test "$cross_compiling" = yes; then :
12423   ac_cv_lesstif_version=unknown
12424                      ac_cv_lesstif_version_string=unknown
12425 else
12426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12427 /* end confdefs.h.  */
12428 #include <stdio.h>
12429                      #include <Xm/Xm.h>
12430                      int main() {
12431                        FILE *f = fopen("conftest-lt", "w");
12432                        if (!f) exit(1);
12433                        fprintf(f, "%d %d.%d\n", LesstifVersion,
12434                           LESSTIF_VERSION, LESSTIF_REVISION);
12435                        fclose(f);
12436                        exit(0);
12437                      }
12438 _ACEOF
12439 if ac_fn_c_try_run "$LINENO"; then :
12440   ltv=`cat conftest-lt`
12441                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
12442                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
12443 else
12444   ac_cv_lesstif_version=unknown
12445                      ac_cv_lesstif_version_string=unknown
12446 fi
12447 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12448   conftest.$ac_objext conftest.beam conftest.$ac_ext
12449 fi
12450
12451   CPPFLAGS="$ac_save_CPPFLAGS"
12452 fi
12453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lesstif_version_string" >&5
12454 $as_echo "$ac_cv_lesstif_version_string" >&6; }
12455   rm -rf conftest-lt
12456   lesstif_version=$ac_cv_lesstif_version
12457   lesstif_version_string=$ac_cv_lesstif_version_string
12458
12459 fi
12460
12461
12462 if test "$have_motif" = yes ; then
12463   mtv=unknown
12464   echo unknown > conftest-mt
12465   { $as_echo "$as_me:${as_lineno-$LINENO}: checking Motif version number" >&5
12466 $as_echo_n "checking Motif version number... " >&6; }
12467 if ${ac_cv_motif_version_string+:} false; then :
12468   $as_echo_n "(cached) " >&6
12469 else
12470
12471   ac_save_CPPFLAGS="$CPPFLAGS"
12472   if test \! -z "$includedir" ; then
12473     CPPFLAGS="$CPPFLAGS -I$includedir"
12474   fi
12475   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12476   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12477   if test "$cross_compiling" = yes; then :
12478   ac_cv_motif_version=unknown
12479                      ac_cv_motif_version_string=unknown
12480 else
12481   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12482 /* end confdefs.h.  */
12483 #include <stdio.h>
12484                      #include <Xm/Xm.h>
12485                      int main() {
12486                        FILE *f = fopen("conftest-mt", "w");
12487                        if (!f) exit(1);
12488                        fprintf(f, "%d %d.%d\n", XmVersion,
12489                           XmVERSION, XmREVISION);
12490                        fclose(f);
12491                        exit(0);
12492                      }
12493 _ACEOF
12494 if ac_fn_c_try_run "$LINENO"; then :
12495   mtv=`cat conftest-mt`
12496                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
12497                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
12498 else
12499   ac_cv_motif_version=unknown
12500                      ac_cv_motif_version_string=unknown
12501 fi
12502 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12503   conftest.$ac_objext conftest.beam conftest.$ac_ext
12504 fi
12505
12506   CPPFLAGS="$ac_save_CPPFLAGS"
12507 fi
12508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_motif_version_string" >&5
12509 $as_echo "$ac_cv_motif_version_string" >&6; }
12510   rm -rf conftest-mt
12511   motif_version=$ac_cv_motif_version
12512   motif_version_string=$ac_cv_motif_version_string
12513
12514 fi
12515
12516
12517 ###############################################################################
12518 #
12519 #       Checking whether Motif requires -lXpm.
12520 #
12521 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
12522 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
12523 #       of the library whether to build the XPM code into libXm, or whether
12524 #       to rely on an external libXm.  So the only way to tell whether XPM is
12525 #       a link-time requirement is to examine libXm.a, which is very
12526 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
12527 #       always link against XPM if the XPM lib exists (and this will be a
12528 #       no-op if libXm happens to already have the XPM code in it.)
12529 #
12530 ###############################################################################
12531
12532 motif_requires_xpm=no
12533 if test "$have_motif" = yes ; then
12534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif requires XPM" >&5
12535 $as_echo_n "checking whether Motif requires XPM... " >&6; }
12536    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
12537    then
12538      motif_requires_xpm=yes
12539      { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
12540 $as_echo "maybe" >&6; }
12541    else
12542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12543 $as_echo "no" >&6; }
12544    fi
12545 fi
12546
12547
12548 ###############################################################################
12549 #
12550 #       Checking whether Motif requires -lXp.
12551 #
12552 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
12553 #       Extension".   Why this extension isn't in -lXext with all the others,
12554 #       I have no idea.
12555 #
12556 ###############################################################################
12557
12558 have_xp_ext=no
12559 if test "$have_motif" = yes ; then
12560    have_xp_ext=no
12561
12562   ac_save_CPPFLAGS="$CPPFLAGS"
12563   ac_save_LDFLAGS="$LDFLAGS"
12564 #  ac_save_LIBS="$LIBS"
12565
12566   if test \! -z "$includedir" ; then
12567     CPPFLAGS="$CPPFLAGS -I$includedir"
12568   fi
12569   # note: $X_CFLAGS includes $x_includes
12570   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12571
12572   if test \! -z "$libdir" ; then
12573     LDFLAGS="$LDFLAGS -L$libdir"
12574   fi
12575   # note: $X_LIBS includes $x_libraries
12576   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12577
12578   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12579   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12580   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpQueryExtension in -lXp" >&5
12581 $as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
12582 if ${ac_cv_lib_Xp_XpQueryExtension+:} false; then :
12583   $as_echo_n "(cached) " >&6
12584 else
12585   ac_check_lib_save_LIBS=$LIBS
12586 LIBS="-lXp -lX11 -lXext -lm $LIBS"
12587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12588 /* end confdefs.h.  */
12589
12590 /* Override any GCC internal prototype to avoid an error.
12591    Use char because int might match the return type of a GCC
12592    builtin and then its argument prototype would still apply.  */
12593 #ifdef __cplusplus
12594 extern "C"
12595 #endif
12596 char XpQueryExtension ();
12597 int
12598 main ()
12599 {
12600 return XpQueryExtension ();
12601   ;
12602   return 0;
12603 }
12604 _ACEOF
12605 if ac_fn_c_try_link "$LINENO"; then :
12606   ac_cv_lib_Xp_XpQueryExtension=yes
12607 else
12608   ac_cv_lib_Xp_XpQueryExtension=no
12609 fi
12610 rm -f core conftest.err conftest.$ac_objext \
12611     conftest$ac_exeext conftest.$ac_ext
12612 LIBS=$ac_check_lib_save_LIBS
12613 fi
12614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
12615 $as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
12616 if test "x$ac_cv_lib_Xp_XpQueryExtension" = xyes; then :
12617   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
12618 else
12619   true
12620 fi
12621
12622   CPPFLAGS="$ac_save_CPPFLAGS"
12623   LDFLAGS="$ac_save_LDFLAGS"
12624 #  LIBS="$ac_save_LIBS"
12625
12626 fi
12627
12628
12629 ###############################################################################
12630 #
12631 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
12632 #
12633 ###############################################################################
12634
12635 have_xintl=no
12636 if test "$have_motif" = yes ; then
12637
12638   ac_save_CPPFLAGS="$CPPFLAGS"
12639   ac_save_LDFLAGS="$LDFLAGS"
12640 #  ac_save_LIBS="$LIBS"
12641
12642   if test \! -z "$includedir" ; then
12643     CPPFLAGS="$CPPFLAGS -I$includedir"
12644   fi
12645   # note: $X_CFLAGS includes $x_includes
12646   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12647
12648   if test \! -z "$libdir" ; then
12649     LDFLAGS="$LDFLAGS -L$libdir"
12650   fi
12651   # note: $X_LIBS includes $x_libraries
12652   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12653
12654   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12655   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12656   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Xsetlocale in -lXintl" >&5
12657 $as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
12658 if ${ac_cv_lib_Xintl__Xsetlocale+:} false; then :
12659   $as_echo_n "(cached) " >&6
12660 else
12661   ac_check_lib_save_LIBS=$LIBS
12662 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
12663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12664 /* end confdefs.h.  */
12665
12666 /* Override any GCC internal prototype to avoid an error.
12667    Use char because int might match the return type of a GCC
12668    builtin and then its argument prototype would still apply.  */
12669 #ifdef __cplusplus
12670 extern "C"
12671 #endif
12672 char _Xsetlocale ();
12673 int
12674 main ()
12675 {
12676 return _Xsetlocale ();
12677   ;
12678   return 0;
12679 }
12680 _ACEOF
12681 if ac_fn_c_try_link "$LINENO"; then :
12682   ac_cv_lib_Xintl__Xsetlocale=yes
12683 else
12684   ac_cv_lib_Xintl__Xsetlocale=no
12685 fi
12686 rm -f core conftest.err conftest.$ac_objext \
12687     conftest$ac_exeext conftest.$ac_ext
12688 LIBS=$ac_check_lib_save_LIBS
12689 fi
12690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
12691 $as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
12692 if test "x$ac_cv_lib_Xintl__Xsetlocale" = xyes; then :
12693   have_xintl=yes
12694 else
12695   have_xintl=no
12696 fi
12697
12698   CPPFLAGS="$ac_save_CPPFLAGS"
12699   LDFLAGS="$ac_save_LDFLAGS"
12700 #  LIBS="$ac_save_LIBS"
12701
12702   if test "$have_xintl" = yes; then
12703     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
12704   fi
12705 fi
12706
12707
12708 ###############################################################################
12709 #
12710 #       Check for -lGL or -lMesaGL.
12711 #
12712 ###############################################################################
12713
12714 have_gl=no
12715 ac_have_mesa_gl=no
12716 with_gl_req=unspecified
12717 gl_halfassed=no
12718
12719 # Check whether --with-gl was given.
12720 if test "${with_gl+set}" = set; then :
12721   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
12722 else
12723   with_gl=yes
12724 fi
12725
12726
12727
12728    case "$with_gl" in
12729     yes) ;;
12730     no)  ;;
12731
12732     /*)
12733      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL headers" >&5
12734 $as_echo_n "checking for GL headers... " >&6; }
12735      d=$with_gl/include
12736      if test -d $d; then
12737        X_CFLAGS="-I$d $X_CFLAGS"
12738        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12739 $as_echo "$d" >&6; }
12740      else
12741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12742 $as_echo "not found ($d: no such directory)" >&6; }
12743      fi
12744
12745      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL libs" >&5
12746 $as_echo_n "checking for GL libs... " >&6; }
12747      d=$with_gl/lib
12748      if test -d $d; then
12749        X_LIBS="-L$d $X_LIBS"
12750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12751 $as_echo "$d" >&6; }
12752      else
12753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12754 $as_echo "not found ($d: no such directory)" >&6; }
12755      fi
12756
12757      # replace the directory string with "yes".
12758      with_gl_req="yes"
12759      with_gl=$with_gl_req
12760      ;;
12761
12762     *)
12763      echo ""
12764      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
12765      echo "       If it is a directory, then \`DIR/include' will be added to"
12766      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12767      exit 1
12768      ;;
12769    esac
12770
12771
12772 ac_mesagl_version=unknown
12773 ac_mesagl_version_string=unknown
12774
12775 if test "$with_gl" = yes; then
12776
12777   ac_save_CPPFLAGS="$CPPFLAGS"
12778   if test \! -z "$includedir" ; then
12779     CPPFLAGS="$CPPFLAGS -I$includedir"
12780   fi
12781   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12782   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12783   ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
12784 if test "x$ac_cv_header_GL_gl_h" = xyes; then :
12785   have_gl=yes
12786 else
12787   have_gl=no
12788 fi
12789
12790
12791   CPPFLAGS="$ac_save_CPPFLAGS"
12792   if test "$have_gl" = yes ; then
12793
12794   ac_save_CPPFLAGS="$CPPFLAGS"
12795   if test \! -z "$includedir" ; then
12796     CPPFLAGS="$CPPFLAGS -I$includedir"
12797   fi
12798   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12799   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12800   ac_fn_c_check_header_compile "$LINENO" "GL/glx.h" "ac_cv_header_GL_glx_h" "#include <GL/gl.h>
12801 "
12802 if test "x$ac_cv_header_GL_glx_h" = xyes; then :
12803   have_gl=yes
12804 else
12805   have_gl=no
12806 fi
12807
12808
12809   CPPFLAGS="$ac_save_CPPFLAGS"
12810   fi
12811
12812   # If we have the headers, try and figure out which vendor it's from.
12813   #
12814   if test "$have_gl" = yes ; then
12815
12816     # We need to know whether it's MesaGL so that we know which libraries
12817     # to link against.
12818     #
12819     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GL is really MesaGL" >&5
12820 $as_echo_n "checking whether GL is really MesaGL... " >&6; }
12821 if ${ac_cv_have_mesa_gl+:} false; then :
12822   $as_echo_n "(cached) " >&6
12823 else
12824   ac_cv_have_mesa_gl=no
12825        if test "$ac_macosx" = no; then
12826          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
12827          # It's not really Mesa, is it?
12828
12829   ac_save_CPPFLAGS="$CPPFLAGS"
12830   if test \! -z "$includedir" ; then
12831     CPPFLAGS="$CPPFLAGS -I$includedir"
12832   fi
12833   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12834   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12835   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12836 /* end confdefs.h.  */
12837 #include <GL/glx.h>
12838
12839 _ACEOF
12840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12841   $EGREP "Mesa|MESA" >/dev/null 2>&1; then :
12842   ac_cv_have_mesa_gl=yes
12843 fi
12844 rm -rf conftest*
12845
12846   CPPFLAGS="$ac_save_CPPFLAGS"
12847        fi
12848 fi
12849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mesa_gl" >&5
12850 $as_echo "$ac_cv_have_mesa_gl" >&6; }
12851     ac_have_mesa_gl=$ac_cv_have_mesa_gl
12852
12853     gl_lib_1=""
12854     GL_LIBS=""
12855
12856     if test "$ac_macosx" = yes; then
12857
12858       # Without these, every link against libGL gets a bunch of useless
12859       # warnings.
12860       #
12861       osx_crud="-bind_at_load -multiply_defined suppress"
12862       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
12863 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
12864       GL_LIBS="$GL_LIBS $osx_crud"
12865       unset osx_crud
12866
12867       # New lossage in 10.5.0: without this, we get:
12868       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
12869       #
12870       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
12871       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
12872
12873       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
12874 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
12875       GL_LIBS="$GL_LIBS $osx_crud"
12876       unset osx_crud
12877
12878       # New lossage in 10.6.8: we can't allow -L/opt/local/lib to be in the
12879       # link line, or at runtime XQueryExtension gets a segv due to some kind
12880       # of library version skew.  Libs must come from /usr/X11/lib even if
12881       # $prefix and/or $exec_prefix are set to /opt/local/.
12882       #
12883       { $as_echo "$as_me:${as_lineno-$LINENO}: result: omitting \"$libdir\" from LDFLAGS" >&5
12884 $as_echo "omitting \"$libdir\" from LDFLAGS" >&6; }
12885       libdir=''
12886
12887     fi
12888
12889
12890     # Some versions of MesaGL are compiled to require -lpthread.
12891     # So if the Mesa headers exist, and -lpthread exists, then always
12892     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
12893     #
12894     # Oftentimes, AX_PTHREAD will bring in -lpthread as well; but that ends
12895     # up before -l(Mesa)GL, instead of after where it would belong.
12896     #
12897     if test "$ac_have_mesa_gl" = yes; then
12898       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
12899 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
12900 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
12901   $as_echo_n "(cached) " >&6
12902 else
12903   ac_check_lib_save_LIBS=$LIBS
12904 LIBS="-lpthread  $LIBS"
12905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12906 /* end confdefs.h.  */
12907
12908 /* Override any GCC internal prototype to avoid an error.
12909    Use char because int might match the return type of a GCC
12910    builtin and then its argument prototype would still apply.  */
12911 #ifdef __cplusplus
12912 extern "C"
12913 #endif
12914 char pthread_create ();
12915 int
12916 main ()
12917 {
12918 return pthread_create ();
12919   ;
12920   return 0;
12921 }
12922 _ACEOF
12923 if ac_fn_c_try_link "$LINENO"; then :
12924   ac_cv_lib_pthread_pthread_create=yes
12925 else
12926   ac_cv_lib_pthread_pthread_create=no
12927 fi
12928 rm -f core conftest.err conftest.$ac_objext \
12929     conftest$ac_exeext conftest.$ac_ext
12930 LIBS=$ac_check_lib_save_LIBS
12931 fi
12932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
12933 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
12934 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
12935   GL_LIBS="-lpthread"
12936 fi
12937
12938     fi
12939
12940
12941     # If we have Mesa headers, check to see if we can link against -lMesaGL.
12942     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
12943     # Else, warn that GL is busted.  (We have the headers, but no libs.)
12944     #
12945
12946     if test "$ac_have_mesa_gl" = yes ; then
12947
12948   ac_save_CPPFLAGS="$CPPFLAGS"
12949   ac_save_LDFLAGS="$LDFLAGS"
12950 #  ac_save_LIBS="$LIBS"
12951
12952   if test \! -z "$includedir" ; then
12953     CPPFLAGS="$CPPFLAGS -I$includedir"
12954   fi
12955   # note: $X_CFLAGS includes $x_includes
12956   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12957
12958   if test \! -z "$libdir" ; then
12959     LDFLAGS="$LDFLAGS -L$libdir"
12960   fi
12961   # note: $X_LIBS includes $x_libraries
12962   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12963
12964   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12965   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12966   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lMesaGL" >&5
12967 $as_echo_n "checking for glXCreateContext in -lMesaGL... " >&6; }
12968 if ${ac_cv_lib_MesaGL_glXCreateContext+:} false; then :
12969   $as_echo_n "(cached) " >&6
12970 else
12971   ac_check_lib_save_LIBS=$LIBS
12972 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
12973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12974 /* end confdefs.h.  */
12975
12976 /* Override any GCC internal prototype to avoid an error.
12977    Use char because int might match the return type of a GCC
12978    builtin and then its argument prototype would still apply.  */
12979 #ifdef __cplusplus
12980 extern "C"
12981 #endif
12982 char glXCreateContext ();
12983 int
12984 main ()
12985 {
12986 return glXCreateContext ();
12987   ;
12988   return 0;
12989 }
12990 _ACEOF
12991 if ac_fn_c_try_link "$LINENO"; then :
12992   ac_cv_lib_MesaGL_glXCreateContext=yes
12993 else
12994   ac_cv_lib_MesaGL_glXCreateContext=no
12995 fi
12996 rm -f core conftest.err conftest.$ac_objext \
12997     conftest$ac_exeext conftest.$ac_ext
12998 LIBS=$ac_check_lib_save_LIBS
12999 fi
13000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
13001 $as_echo "$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
13002 if test "x$ac_cv_lib_MesaGL_glXCreateContext" = xyes; then :
13003   gl_lib_1="MesaGL"
13004                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
13005 fi
13006
13007   CPPFLAGS="$ac_save_CPPFLAGS"
13008   LDFLAGS="$ac_save_LDFLAGS"
13009 #  LIBS="$ac_save_LIBS"
13010
13011     fi
13012
13013     if test "$gl_lib_1" = "" ; then
13014
13015   ac_save_CPPFLAGS="$CPPFLAGS"
13016   ac_save_LDFLAGS="$LDFLAGS"
13017 #  ac_save_LIBS="$LIBS"
13018
13019   if test \! -z "$includedir" ; then
13020     CPPFLAGS="$CPPFLAGS -I$includedir"
13021   fi
13022   # note: $X_CFLAGS includes $x_includes
13023   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13024
13025   if test \! -z "$libdir" ; then
13026     LDFLAGS="$LDFLAGS -L$libdir"
13027   fi
13028   # note: $X_LIBS includes $x_libraries
13029   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13030
13031   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13032   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13033   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lGL" >&5
13034 $as_echo_n "checking for glXCreateContext in -lGL... " >&6; }
13035 if ${ac_cv_lib_GL_glXCreateContext+:} false; then :
13036   $as_echo_n "(cached) " >&6
13037 else
13038   ac_check_lib_save_LIBS=$LIBS
13039 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
13040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13041 /* end confdefs.h.  */
13042
13043 /* Override any GCC internal prototype to avoid an error.
13044    Use char because int might match the return type of a GCC
13045    builtin and then its argument prototype would still apply.  */
13046 #ifdef __cplusplus
13047 extern "C"
13048 #endif
13049 char glXCreateContext ();
13050 int
13051 main ()
13052 {
13053 return glXCreateContext ();
13054   ;
13055   return 0;
13056 }
13057 _ACEOF
13058 if ac_fn_c_try_link "$LINENO"; then :
13059   ac_cv_lib_GL_glXCreateContext=yes
13060 else
13061   ac_cv_lib_GL_glXCreateContext=no
13062 fi
13063 rm -f core conftest.err conftest.$ac_objext \
13064     conftest$ac_exeext conftest.$ac_ext
13065 LIBS=$ac_check_lib_save_LIBS
13066 fi
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_glXCreateContext" >&5
13068 $as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; }
13069 if test "x$ac_cv_lib_GL_glXCreateContext" = xyes; then :
13070   gl_lib_1="GL"
13071                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
13072 fi
13073
13074   CPPFLAGS="$ac_save_CPPFLAGS"
13075   LDFLAGS="$ac_save_LDFLAGS"
13076 #  LIBS="$ac_save_LIBS"
13077
13078     fi
13079
13080     if test "$gl_lib_1" = "" ; then
13081       # we have headers, but no libs -- bail.
13082       have_gl=no
13083       ac_have_mesa_gl=no
13084       gl_halfassed=yes
13085     else
13086       # linking works -- we can build the GL hacks.
13087       $as_echo "#define HAVE_GL 1" >>confdefs.h
13088
13089       if test "$ac_have_mesa_gl" = yes ; then
13090         $as_echo "#define HAVE_MESA_GL 1" >>confdefs.h
13091
13092       fi
13093     fi
13094   fi
13095
13096
13097   # Now that we know we have GL headers and libs, do some more GL testing.
13098   #
13099
13100   if test "$have_gl" = yes ; then
13101     # If it's MesaGL, we'd like to issue a warning if the version number
13102     # is less than or equal to 2.6, because that version had a security bug.
13103     #
13104     if test "$ac_have_mesa_gl" = yes; then
13105
13106       { $as_echo "$as_me:${as_lineno-$LINENO}: checking MesaGL version number" >&5
13107 $as_echo_n "checking MesaGL version number... " >&6; }
13108 if ${ac_cv_mesagl_version_string+:} false; then :
13109   $as_echo_n "(cached) " >&6
13110 else
13111   cat > conftest.$ac_ext <<EOF
13112 #line 13116 "configure"
13113 #include "confdefs.h"
13114 #include <GL/gl.h>
13115 #ifndef MESA_MAJOR_VERSION
13116 # include <GL/xmesa.h>
13117 # ifdef XMESA_MAJOR_VERSION
13118    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
13119       we have to check the XMesa version number (the number of the X protocol
13120       support, which seems to be the same as the Mesa version number.)
13121     */
13122 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
13123 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
13124 # else
13125    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
13126       so we have no way of telling what version of Mesa this is at all.
13127       So, we'll guess that the osmesa version (the "offscreen protocol")
13128       is less than or equal to the real mesa version number.  Except that
13129       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
13130       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
13131     */
13132 # include <GL/osmesa.h>
13133 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
13134 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
13135 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
13136 #   undef MESA_MINOR_VERSION
13137 #   define MESA_MINOR_VERSION 4 or newer, probably?
13138 #  endif
13139 # endif
13140 #endif
13141 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
13142 EOF
13143
13144          ac_save_CPPFLAGS="$CPPFLAGS"
13145          if test \! -z "$includedir" ; then
13146            CPPFLAGS="$CPPFLAGS -I$includedir"
13147          fi
13148          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13149
13150          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
13151
13152          # M4 sucks!!
13153
13154           mglv=`echo "$mglv" | sed -n \
13155              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
13156
13157
13158          rm -rf conftest.$ac_ext
13159
13160          CPPFLAGS="$ac_save_CPPFLAGS"
13161
13162          if test "$mglv" = ""; then
13163            ac_mesagl_version=unknown
13164            ac_mesagl_version_string=unknown
13165          else
13166            ac_mesagl_version_string="$mglv"
13167            # M4 sucks!!
13168
13169            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
13170            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
13171
13172            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
13173            if test -z "$ac_mesagl_version"; then
13174              ac_mesagl_version=unknown
13175              ac_mesagl_version_string=unknown
13176            fi
13177          fi
13178          ac_cv_mesagl_version=$ac_mesagl_version
13179          ac_cv_mesagl_version_string=$ac_mesagl_version_string
13180
13181 fi
13182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mesagl_version_string" >&5
13183 $as_echo "$ac_cv_mesagl_version_string" >&6; }
13184       ac_mesagl_version=$ac_cv_mesagl_version
13185       ac_mesagl_version_string=$ac_cv_mesagl_version_string
13186     fi
13187
13188
13189     # Check for OpenGL 1.1 features.
13190     #
13191
13192   ac_save_CPPFLAGS="$CPPFLAGS"
13193   ac_save_LDFLAGS="$LDFLAGS"
13194 #  ac_save_LIBS="$LIBS"
13195
13196   if test \! -z "$includedir" ; then
13197     CPPFLAGS="$CPPFLAGS -I$includedir"
13198   fi
13199   # note: $X_CFLAGS includes $x_includes
13200   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13201
13202   if test \! -z "$libdir" ; then
13203     LDFLAGS="$LDFLAGS -L$libdir"
13204   fi
13205   # note: $X_LIBS includes $x_libraries
13206   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13207
13208   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13209   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13210   as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
13211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBindTexture in -l$gl_lib_1" >&5
13212 $as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
13213 if eval \${$as_ac_Lib+:} false; then :
13214   $as_echo_n "(cached) " >&6
13215 else
13216   ac_check_lib_save_LIBS=$LIBS
13217 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
13218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13219 /* end confdefs.h.  */
13220
13221 /* Override any GCC internal prototype to avoid an error.
13222    Use char because int might match the return type of a GCC
13223    builtin and then its argument prototype would still apply.  */
13224 #ifdef __cplusplus
13225 extern "C"
13226 #endif
13227 char glBindTexture ();
13228 int
13229 main ()
13230 {
13231 return glBindTexture ();
13232   ;
13233   return 0;
13234 }
13235 _ACEOF
13236 if ac_fn_c_try_link "$LINENO"; then :
13237   eval "$as_ac_Lib=yes"
13238 else
13239   eval "$as_ac_Lib=no"
13240 fi
13241 rm -f core conftest.err conftest.$ac_objext \
13242     conftest$ac_exeext conftest.$ac_ext
13243 LIBS=$ac_check_lib_save_LIBS
13244 fi
13245 eval ac_res=\$$as_ac_Lib
13246                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13247 $as_echo "$ac_res" >&6; }
13248 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13249   $as_echo "#define HAVE_GLBINDTEXTURE 1" >>confdefs.h
13250
13251 else
13252   true
13253 fi
13254
13255   CPPFLAGS="$ac_save_CPPFLAGS"
13256   LDFLAGS="$ac_save_LDFLAGS"
13257 #  LIBS="$ac_save_LIBS"
13258
13259   fi
13260
13261 elif test "$with_gl" != no; then
13262   echo "error: must be yes or no: --with-gl=$with_gl"
13263   exit 1
13264 fi
13265
13266
13267 ###############################################################################
13268 #
13269 #       Check for -lgle.
13270 #
13271 ###############################################################################
13272
13273 have_gle=no
13274 with_gle_req=unspecified
13275 gle_halfassed=no
13276
13277 # Check whether --with-gle was given.
13278 if test "${with_gle+set}" = set; then :
13279   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
13280 else
13281   with_gle=yes
13282 fi
13283
13284
13285
13286    case "$with_gle" in
13287     yes) ;;
13288     no)  ;;
13289
13290     /*)
13291      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE headers" >&5
13292 $as_echo_n "checking for GLE headers... " >&6; }
13293      d=$with_gle/include
13294      if test -d $d; then
13295        X_CFLAGS="-I$d $X_CFLAGS"
13296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13297 $as_echo "$d" >&6; }
13298      else
13299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13300 $as_echo "not found ($d: no such directory)" >&6; }
13301      fi
13302
13303      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE libs" >&5
13304 $as_echo_n "checking for GLE libs... " >&6; }
13305      d=$with_gle/lib
13306      if test -d $d; then
13307        X_LIBS="-L$d $X_LIBS"
13308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13309 $as_echo "$d" >&6; }
13310      else
13311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13312 $as_echo "not found ($d: no such directory)" >&6; }
13313      fi
13314
13315      # replace the directory string with "yes".
13316      with_gle_req="yes"
13317      with_gle=$with_gle_req
13318      ;;
13319
13320     *)
13321      echo ""
13322      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
13323      echo "       If it is a directory, then \`DIR/include' will be added to"
13324      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13325      exit 1
13326      ;;
13327    esac
13328
13329
13330 GLE_LIBS=""
13331
13332 if test "$have_gl" = no ; then
13333  true
13334 elif test "$with_gle" = yes; then
13335
13336
13337   ac_save_CPPFLAGS="$CPPFLAGS"
13338   if test \! -z "$includedir" ; then
13339     CPPFLAGS="$CPPFLAGS -I$includedir"
13340   fi
13341   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13342   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13343   ac_fn_c_check_header_compile "$LINENO" "GL/gle.h" "ac_cv_header_GL_gle_h" "#include <GL/gl.h>
13344 "
13345 if test "x$ac_cv_header_GL_gle_h" = xyes; then :
13346   have_gle3=yes
13347 else
13348   have_gle3=no
13349 fi
13350
13351
13352   CPPFLAGS="$ac_save_CPPFLAGS"
13353   if test "$have_gle3" = yes ; then
13354     have_gle=yes;
13355   else
13356
13357   ac_save_CPPFLAGS="$CPPFLAGS"
13358   if test \! -z "$includedir" ; then
13359     CPPFLAGS="$CPPFLAGS -I$includedir"
13360   fi
13361   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13362   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13363   ac_fn_c_check_header_compile "$LINENO" "GL/gutil.h" "ac_cv_header_GL_gutil_h" "#include <GL/gl.h>
13364 "
13365 if test "x$ac_cv_header_GL_gutil_h" = xyes; then :
13366   have_gle=yes
13367 else
13368   have_gle=no
13369 fi
13370
13371
13372   CPPFLAGS="$ac_save_CPPFLAGS"
13373     if test "$have_gle" = yes ; then
13374
13375   ac_save_CPPFLAGS="$CPPFLAGS"
13376   if test \! -z "$includedir" ; then
13377     CPPFLAGS="$CPPFLAGS -I$includedir"
13378   fi
13379   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13380   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13381   ac_fn_c_check_header_compile "$LINENO" "GL/tube.h" "ac_cv_header_GL_tube_h" "#include <GL/gl.h>
13382 "
13383 if test "x$ac_cv_header_GL_tube_h" = xyes; then :
13384   have_gle=yes
13385 else
13386   have_gle=no
13387 fi
13388
13389
13390   CPPFLAGS="$ac_save_CPPFLAGS"
13391     fi
13392   fi
13393
13394   if test "$have_gle" = yes ; then
13395     have_gle=no
13396     gle_halfassed=yes
13397
13398   ac_save_CPPFLAGS="$CPPFLAGS"
13399   ac_save_LDFLAGS="$LDFLAGS"
13400 #  ac_save_LIBS="$LIBS"
13401
13402   if test \! -z "$includedir" ; then
13403     CPPFLAGS="$CPPFLAGS -I$includedir"
13404   fi
13405   # note: $X_CFLAGS includes $x_includes
13406   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13407
13408   if test \! -z "$libdir" ; then
13409     LDFLAGS="$LDFLAGS -L$libdir"
13410   fi
13411   # note: $X_LIBS includes $x_libraries
13412   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13413
13414   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13415   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13416   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gleCreateGC in -lgle" >&5
13417 $as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
13418 if ${ac_cv_lib_gle_gleCreateGC+:} false; then :
13419   $as_echo_n "(cached) " >&6
13420 else
13421   ac_check_lib_save_LIBS=$LIBS
13422 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
13423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13424 /* end confdefs.h.  */
13425
13426 /* Override any GCC internal prototype to avoid an error.
13427    Use char because int might match the return type of a GCC
13428    builtin and then its argument prototype would still apply.  */
13429 #ifdef __cplusplus
13430 extern "C"
13431 #endif
13432 char gleCreateGC ();
13433 int
13434 main ()
13435 {
13436 return gleCreateGC ();
13437   ;
13438   return 0;
13439 }
13440 _ACEOF
13441 if ac_fn_c_try_link "$LINENO"; then :
13442   ac_cv_lib_gle_gleCreateGC=yes
13443 else
13444   ac_cv_lib_gle_gleCreateGC=no
13445 fi
13446 rm -f core conftest.err conftest.$ac_objext \
13447     conftest$ac_exeext conftest.$ac_ext
13448 LIBS=$ac_check_lib_save_LIBS
13449 fi
13450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_gleCreateGC" >&5
13451 $as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
13452 if test "x$ac_cv_lib_gle_gleCreateGC" = xyes; then :
13453   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
13454 fi
13455
13456   CPPFLAGS="$ac_save_CPPFLAGS"
13457   LDFLAGS="$ac_save_LDFLAGS"
13458 #  LIBS="$ac_save_LIBS"
13459
13460   fi
13461   if test "$have_gle" = yes ; then
13462     have_gle=no
13463     gle_halfassed=yes
13464
13465     # sometimes the libmatrix stuff is included in libgle.  look there first.
13466 #
13467 # I don't get it.  For some reason, this test passes on SGI, as if
13468 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
13469 # Yet the link is succeeding.  Why???
13470 #
13471 #    AC_CHECK_X_LIB(gle, uview_direction_d,
13472 #                   [have_gle=yes; gle_halfassed=no],
13473 #                   [], $GL_LIBS -lX11 -lXext -lm)
13474
13475     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
13476     # *sigh*
13477     if test "$have_gle3" = yes ; then
13478
13479   ac_save_CPPFLAGS="$CPPFLAGS"
13480   ac_save_LDFLAGS="$LDFLAGS"
13481 #  ac_save_LIBS="$LIBS"
13482
13483   if test \! -z "$includedir" ; then
13484     CPPFLAGS="$CPPFLAGS -I$includedir"
13485   fi
13486   # note: $X_CFLAGS includes $x_includes
13487   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13488
13489   if test \! -z "$libdir" ; then
13490     LDFLAGS="$LDFLAGS -L$libdir"
13491   fi
13492   # note: $X_LIBS includes $x_libraries
13493   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13494
13495   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13496   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13497   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction in -lgle" >&5
13498 $as_echo_n "checking for uview_direction in -lgle... " >&6; }
13499 if ${ac_cv_lib_gle_uview_direction+:} false; then :
13500   $as_echo_n "(cached) " >&6
13501 else
13502   ac_check_lib_save_LIBS=$LIBS
13503 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
13504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13505 /* end confdefs.h.  */
13506
13507 /* Override any GCC internal prototype to avoid an error.
13508    Use char because int might match the return type of a GCC
13509    builtin and then its argument prototype would still apply.  */
13510 #ifdef __cplusplus
13511 extern "C"
13512 #endif
13513 char uview_direction ();
13514 int
13515 main ()
13516 {
13517 return uview_direction ();
13518   ;
13519   return 0;
13520 }
13521 _ACEOF
13522 if ac_fn_c_try_link "$LINENO"; then :
13523   ac_cv_lib_gle_uview_direction=yes
13524 else
13525   ac_cv_lib_gle_uview_direction=no
13526 fi
13527 rm -f core conftest.err conftest.$ac_objext \
13528     conftest$ac_exeext conftest.$ac_ext
13529 LIBS=$ac_check_lib_save_LIBS
13530 fi
13531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_uview_direction" >&5
13532 $as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
13533 if test "x$ac_cv_lib_gle_uview_direction" = xyes; then :
13534   have_gle=yes; gle_halfassed=no
13535 fi
13536
13537   CPPFLAGS="$ac_save_CPPFLAGS"
13538   LDFLAGS="$ac_save_LDFLAGS"
13539 #  LIBS="$ac_save_LIBS"
13540
13541     fi
13542     # if it wasn't in libgle, then look in libmatrix.
13543     if test "$have_gle" = no ; then
13544
13545   ac_save_CPPFLAGS="$CPPFLAGS"
13546   ac_save_LDFLAGS="$LDFLAGS"
13547 #  ac_save_LIBS="$LIBS"
13548
13549   if test \! -z "$includedir" ; then
13550     CPPFLAGS="$CPPFLAGS -I$includedir"
13551   fi
13552   # note: $X_CFLAGS includes $x_includes
13553   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13554
13555   if test \! -z "$libdir" ; then
13556     LDFLAGS="$LDFLAGS -L$libdir"
13557   fi
13558   # note: $X_LIBS includes $x_libraries
13559   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13560
13561   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13562   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction_d in -lmatrix" >&5
13564 $as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
13565 if ${ac_cv_lib_matrix_uview_direction_d+:} false; then :
13566   $as_echo_n "(cached) " >&6
13567 else
13568   ac_check_lib_save_LIBS=$LIBS
13569 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
13570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13571 /* end confdefs.h.  */
13572
13573 /* Override any GCC internal prototype to avoid an error.
13574    Use char because int might match the return type of a GCC
13575    builtin and then its argument prototype would still apply.  */
13576 #ifdef __cplusplus
13577 extern "C"
13578 #endif
13579 char uview_direction_d ();
13580 int
13581 main ()
13582 {
13583 return uview_direction_d ();
13584   ;
13585   return 0;
13586 }
13587 _ACEOF
13588 if ac_fn_c_try_link "$LINENO"; then :
13589   ac_cv_lib_matrix_uview_direction_d=yes
13590 else
13591   ac_cv_lib_matrix_uview_direction_d=no
13592 fi
13593 rm -f core conftest.err conftest.$ac_objext \
13594     conftest$ac_exeext conftest.$ac_ext
13595 LIBS=$ac_check_lib_save_LIBS
13596 fi
13597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_matrix_uview_direction_d" >&5
13598 $as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
13599 if test "x$ac_cv_lib_matrix_uview_direction_d" = xyes; then :
13600   have_gle=yes; gle_halfassed=no;
13601                       GLE_LIBS="$GLE_LIBS -lmatrix"
13602 fi
13603
13604   CPPFLAGS="$ac_save_CPPFLAGS"
13605   LDFLAGS="$ac_save_LDFLAGS"
13606 #  LIBS="$ac_save_LIBS"
13607
13608     fi
13609   fi
13610
13611   if test "$have_gle" = yes ; then
13612     $as_echo "#define HAVE_GLE 1" >>confdefs.h
13613
13614     if test "$have_gle3" = yes ; then
13615       $as_echo "#define HAVE_GLE3 1" >>confdefs.h
13616
13617     fi
13618   fi
13619
13620 elif test "$with_gle" != no; then
13621   echo "error: must be yes or no: --with-gle=$with_gle"
13622   exit 1
13623
13624 fi
13625
13626
13627 ###############################################################################
13628 #
13629 #       Handle --with-gles
13630 #
13631 ###############################################################################
13632
13633 with_gles_req=unspecified
13634
13635 # Check whether --with-gles was given.
13636 if test "${with_gles+set}" = set; then :
13637   withval=$with_gles; with_gles="$withval"; with_gles_req="$withval"
13638 else
13639   with_gles=no
13640 fi
13641
13642
13643
13644    case "$with_gles" in
13645     yes) ;;
13646     no)  ;;
13647
13648     /*)
13649      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES headers" >&5
13650 $as_echo_n "checking for JWZGLES headers... " >&6; }
13651      d=$with_gles/include
13652      if test -d $d; then
13653        X_CFLAGS="-I$d $X_CFLAGS"
13654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13655 $as_echo "$d" >&6; }
13656      else
13657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13658 $as_echo "not found ($d: no such directory)" >&6; }
13659      fi
13660
13661      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES libs" >&5
13662 $as_echo_n "checking for JWZGLES libs... " >&6; }
13663      d=$with_gles/lib
13664      if test -d $d; then
13665        X_LIBS="-L$d $X_LIBS"
13666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13667 $as_echo "$d" >&6; }
13668      else
13669        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13670 $as_echo "not found ($d: no such directory)" >&6; }
13671      fi
13672
13673      # replace the directory string with "yes".
13674      with_gles_req="yes"
13675      with_gles=$with_gles_req
13676      ;;
13677
13678     *)
13679      echo ""
13680      echo "error: argument to --with-gles must be \"yes\", \"no\", or a directory."
13681      echo "       If it is a directory, then \`DIR/include' will be added to"
13682      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13683      exit 1
13684      ;;
13685    esac
13686
13687
13688 if test "$with_gles" = yes; then
13689   have_gles=yes
13690   $as_echo "#define HAVE_JWZGLES 1" >>confdefs.h
13691
13692   JWZGLES_OBJS="jwzgles.o"
13693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OpenGL ES compatiblity shim" >&5
13694 $as_echo "using OpenGL ES compatiblity shim" >&6; }
13695 elif test "$with_gles" != no; then
13696   echo "error: must be yes or no: --with-gles=$with_xpm"
13697   exit 1
13698 fi
13699
13700 # May want to phase out glBitmap even in a non-GLES world.
13701 #
13702 if test "$have_gles" = yes; then
13703   GLFPS_OBJS="fps-gl.o glxfonts.o texfont.o"
13704   GLFONT_OBJS=""
13705 else
13706   $as_echo "#define HAVE_GLBITMAP 1" >>confdefs.h
13707
13708   GLFPS_OBJS="fps-gl.o glxfonts.o"
13709   GLFONT_OBJS="texfont.o"
13710 fi
13711
13712
13713 ###############################################################################
13714 #
13715 #       Check for -lgdk_pixbuf.
13716 #       These tests are for gdk_pixbuf usage of the hacks,
13717 #       not xscreensaver-demo (thus we have to test again to get
13718 #       the libraries right: don't want to pull in all of GTK
13719 #       for the hacks.)
13720 #
13721 ###############################################################################
13722
13723 have_gdk_pixbuf=no
13724 with_gdk_pixbuf_req=unspecified
13725
13726 # Check whether --with-pixbuf was given.
13727 if test "${with_pixbuf+set}" = set; then :
13728   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
13729 else
13730   with_gdk_pixbuf=yes
13731 fi
13732
13733
13734 # if --with-pixbuf=/directory/ was specified, remember that directory so that
13735 # we can also look for the `gdk-pixbuf-config' program in that directory.
13736 case "$with_gdk_pixbuf" in
13737   /*)
13738     gdk_pixbuf_dir="$with_gdk_pixbuf"
13739     ;;
13740   *)
13741     gdk_pixbuf_dir=""
13742     ;;
13743 esac
13744
13745
13746    case "$with_gdk_pixbuf" in
13747     yes) ;;
13748     no)  ;;
13749
13750     /*)
13751      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF headers" >&5
13752 $as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
13753      d=$with_gdk_pixbuf/include
13754      if test -d $d; then
13755        X_CFLAGS="-I$d $X_CFLAGS"
13756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13757 $as_echo "$d" >&6; }
13758      else
13759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13760 $as_echo "not found ($d: no such directory)" >&6; }
13761      fi
13762
13763      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF libs" >&5
13764 $as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
13765      d=$with_gdk_pixbuf/lib
13766      if test -d $d; then
13767        X_LIBS="-L$d $X_LIBS"
13768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13769 $as_echo "$d" >&6; }
13770      else
13771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13772 $as_echo "not found ($d: no such directory)" >&6; }
13773      fi
13774
13775      # replace the directory string with "yes".
13776      with_gdk_pixbuf_req="yes"
13777      with_gdk_pixbuf=$with_gdk_pixbuf_req
13778      ;;
13779
13780     *)
13781      echo ""
13782      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
13783      echo "       If it is a directory, then \`DIR/include' will be added to"
13784      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13785      exit 1
13786      ;;
13787    esac
13788
13789
13790 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
13791   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
13792   exit 1
13793 fi
13794
13795 if test "$with_gdk_pixbuf" = yes; then
13796   have_gdk_pixbuf=no
13797
13798   pkgs=''
13799   ok="yes"
13800
13801   pkg_check_version gdk-pixbuf-2.0      2.0.0
13802   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
13803   have_gdk_pixbuf="$ok"
13804
13805   if test "$have_gdk_pixbuf" = yes; then
13806     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf includes" >&5
13807 $as_echo_n "checking for gdk-pixbuf includes... " >&6; }
13808 if ${ac_cv_gdk_pixbuf_config_cflags+:} false; then :
13809   $as_echo_n "(cached) " >&6
13810 else
13811   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
13812 fi
13813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
13814 $as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
13815     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf libs" >&5
13816 $as_echo_n "checking for gdk-pixbuf libs... " >&6; }
13817 if ${ac_cv_gdk_pixbuf_config_libs+:} false; then :
13818   $as_echo_n "(cached) " >&6
13819 else
13820   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
13821 fi
13822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_libs" >&5
13823 $as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
13824   fi
13825
13826   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
13827   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
13828
13829
13830   if test "$have_gdk_pixbuf" = yes; then
13831     #
13832     # we appear to have pixbuf; check for headers/libs to be sure.
13833     #
13834     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
13835     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
13836
13837     have_gdk_pixbuf=no
13838
13839     # check for header A...
13840
13841   ac_save_CPPFLAGS="$CPPFLAGS"
13842   if test \! -z "$includedir" ; then
13843     CPPFLAGS="$CPPFLAGS -I$includedir"
13844   fi
13845   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13846   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13847   ac_fn_c_check_header_mongrel "$LINENO" "gdk-pixbuf/gdk-pixbuf.h" "ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" "$ac_includes_default"
13848 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = xyes; then :
13849   have_gdk_pixbuf=yes
13850 fi
13851
13852
13853   CPPFLAGS="$ac_save_CPPFLAGS"
13854
13855     # if that worked, check for header B...
13856     if test "$have_gdk_pixbuf" = yes; then
13857       have_gdk_pixbuf=no
13858       gdk_pixbuf_halfassed=yes
13859
13860   ac_save_CPPFLAGS="$CPPFLAGS"
13861   if test \! -z "$includedir" ; then
13862     CPPFLAGS="$CPPFLAGS -I$includedir"
13863   fi
13864   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13865   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13866   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"
13867 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = xyes; then :
13868   have_gdk_pixbuf=yes
13869                          gdk_pixbuf_halfassed=no
13870 fi
13871
13872
13873   CPPFLAGS="$ac_save_CPPFLAGS"
13874
13875       # yay, it has a new name in Gtk 2.x...
13876       if test "$have_gdk_pixbuf" = no; then
13877         have_gdk_pixbuf=no
13878         gdk_pixbuf_halfassed=yes
13879
13880   ac_save_CPPFLAGS="$CPPFLAGS"
13881   if test \! -z "$includedir" ; then
13882     CPPFLAGS="$CPPFLAGS -I$includedir"
13883   fi
13884   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13885   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13886   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"
13887 if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = xyes; then :
13888   have_gdk_pixbuf=yes
13889                            gdk_pixbuf_halfassed=no
13890 fi
13891
13892
13893   CPPFLAGS="$ac_save_CPPFLAGS"
13894       fi
13895     fi
13896     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
13897   fi
13898
13899   if test "$have_gdk_pixbuf" = yes; then
13900     # we have the headers, now check for the libraries
13901     have_gdk_pixbuf=no
13902     gdk_pixbuf_halfassed=yes
13903
13904     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability..." >&5
13905 $as_echo "checking for gdk_pixbuf usability..." >&6; }
13906
13907     # library A...
13908
13909   ac_save_CPPFLAGS="$CPPFLAGS"
13910   ac_save_LDFLAGS="$LDFLAGS"
13911 #  ac_save_LIBS="$LIBS"
13912
13913   if test \! -z "$includedir" ; then
13914     CPPFLAGS="$CPPFLAGS -I$includedir"
13915   fi
13916   # note: $X_CFLAGS includes $x_includes
13917   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13918
13919   if test \! -z "$libdir" ; then
13920     LDFLAGS="$LDFLAGS -L$libdir"
13921   fi
13922   # note: $X_LIBS includes $x_libraries
13923   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13924
13925   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13926   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13927   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_new_from_file in -lc" >&5
13928 $as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
13929 if ${ac_cv_lib_c_gdk_pixbuf_new_from_file+:} false; then :
13930   $as_echo_n "(cached) " >&6
13931 else
13932   ac_check_lib_save_LIBS=$LIBS
13933 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
13934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13935 /* end confdefs.h.  */
13936
13937 /* Override any GCC internal prototype to avoid an error.
13938    Use char because int might match the return type of a GCC
13939    builtin and then its argument prototype would still apply.  */
13940 #ifdef __cplusplus
13941 extern "C"
13942 #endif
13943 char gdk_pixbuf_new_from_file ();
13944 int
13945 main ()
13946 {
13947 return gdk_pixbuf_new_from_file ();
13948   ;
13949   return 0;
13950 }
13951 _ACEOF
13952 if ac_fn_c_try_link "$LINENO"; then :
13953   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
13954 else
13955   ac_cv_lib_c_gdk_pixbuf_new_from_file=no
13956 fi
13957 rm -f core conftest.err conftest.$ac_objext \
13958     conftest$ac_exeext conftest.$ac_ext
13959 LIBS=$ac_check_lib_save_LIBS
13960 fi
13961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
13962 $as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
13963 if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = xyes; then :
13964   have_gdk_pixbuf=yes
13965 fi
13966
13967   CPPFLAGS="$ac_save_CPPFLAGS"
13968   LDFLAGS="$ac_save_LDFLAGS"
13969 #  LIBS="$ac_save_LIBS"
13970
13971     # library B...
13972     if test "$have_gdk_pixbuf" = yes; then
13973       have_gdk_pixbuf=no
13974
13975   ac_save_CPPFLAGS="$CPPFLAGS"
13976   ac_save_LDFLAGS="$LDFLAGS"
13977 #  ac_save_LIBS="$LIBS"
13978
13979   if test \! -z "$includedir" ; then
13980     CPPFLAGS="$CPPFLAGS -I$includedir"
13981   fi
13982   # note: $X_CFLAGS includes $x_includes
13983   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13984
13985   if test \! -z "$libdir" ; then
13986     LDFLAGS="$LDFLAGS -L$libdir"
13987   fi
13988   # note: $X_LIBS includes $x_libraries
13989   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13990
13991   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13992   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13993   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_xlib_init in -lc" >&5
13994 $as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
13995 if ${ac_cv_lib_c_gdk_pixbuf_xlib_init+:} false; then :
13996   $as_echo_n "(cached) " >&6
13997 else
13998   ac_check_lib_save_LIBS=$LIBS
13999 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
14000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14001 /* end confdefs.h.  */
14002
14003 /* Override any GCC internal prototype to avoid an error.
14004    Use char because int might match the return type of a GCC
14005    builtin and then its argument prototype would still apply.  */
14006 #ifdef __cplusplus
14007 extern "C"
14008 #endif
14009 char gdk_pixbuf_xlib_init ();
14010 int
14011 main ()
14012 {
14013 return gdk_pixbuf_xlib_init ();
14014   ;
14015   return 0;
14016 }
14017 _ACEOF
14018 if ac_fn_c_try_link "$LINENO"; then :
14019   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
14020 else
14021   ac_cv_lib_c_gdk_pixbuf_xlib_init=no
14022 fi
14023 rm -f core conftest.err conftest.$ac_objext \
14024     conftest$ac_exeext conftest.$ac_ext
14025 LIBS=$ac_check_lib_save_LIBS
14026 fi
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
14028 $as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
14029 if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = xyes; then :
14030   have_gdk_pixbuf=yes
14031                       gdk_pixbuf_halfassed=no
14032 fi
14033
14034   CPPFLAGS="$ac_save_CPPFLAGS"
14035   LDFLAGS="$ac_save_LDFLAGS"
14036 #  LIBS="$ac_save_LIBS"
14037
14038     fi
14039   fi
14040
14041   if test "$have_gdk_pixbuf" = yes; then
14042     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
14043     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
14044     $as_echo "#define HAVE_GDK_PIXBUF 1" >>confdefs.h
14045
14046   else
14047     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability... no" >&5
14048 $as_echo "checking for gdk_pixbuf usability... no" >&6; }
14049   fi
14050
14051   if test "$have_gdk_pixbuf" = yes; then
14052
14053   ac_save_CPPFLAGS="$CPPFLAGS"
14054   ac_save_LDFLAGS="$LDFLAGS"
14055 #  ac_save_LIBS="$LIBS"
14056
14057   if test \! -z "$includedir" ; then
14058     CPPFLAGS="$CPPFLAGS -I$includedir"
14059   fi
14060   # note: $X_CFLAGS includes $x_includes
14061   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14062
14063   if test \! -z "$libdir" ; then
14064     LDFLAGS="$LDFLAGS -L$libdir"
14065   fi
14066   # note: $X_LIBS includes $x_libraries
14067   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14068
14069   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14070   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14071   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
14072 $as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
14073 if ${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+:} false; then :
14074   $as_echo_n "(cached) " >&6
14075 else
14076   ac_check_lib_save_LIBS=$LIBS
14077 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
14078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14079 /* end confdefs.h.  */
14080
14081 /* Override any GCC internal prototype to avoid an error.
14082    Use char because int might match the return type of a GCC
14083    builtin and then its argument prototype would still apply.  */
14084 #ifdef __cplusplus
14085 extern "C"
14086 #endif
14087 char gdk_pixbuf_apply_embedded_orientation ();
14088 int
14089 main ()
14090 {
14091 return gdk_pixbuf_apply_embedded_orientation ();
14092   ;
14093   return 0;
14094 }
14095 _ACEOF
14096 if ac_fn_c_try_link "$LINENO"; then :
14097   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
14098 else
14099   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
14100 fi
14101 rm -f core conftest.err conftest.$ac_objext \
14102     conftest$ac_exeext conftest.$ac_ext
14103 LIBS=$ac_check_lib_save_LIBS
14104 fi
14105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
14106 $as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
14107 if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = xyes; then :
14108   $as_echo "#define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1" >>confdefs.h
14109
14110 fi
14111
14112   CPPFLAGS="$ac_save_CPPFLAGS"
14113   LDFLAGS="$ac_save_LDFLAGS"
14114 #  LIBS="$ac_save_LIBS"
14115
14116   fi
14117 fi
14118
14119
14120 ###############################################################################
14121 #
14122 #       Check for -lXpm.
14123 #
14124 ###############################################################################
14125
14126 have_xpm=no
14127 with_xpm_req=unspecified
14128
14129 # Check whether --with-xpm was given.
14130 if test "${with_xpm+set}" = set; then :
14131   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
14132 else
14133   with_xpm=yes
14134 fi
14135
14136
14137
14138    case "$with_xpm" in
14139     yes) ;;
14140     no)  ;;
14141
14142     /*)
14143      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM headers" >&5
14144 $as_echo_n "checking for XPM headers... " >&6; }
14145      d=$with_xpm/include
14146      if test -d $d; then
14147        X_CFLAGS="-I$d $X_CFLAGS"
14148        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14149 $as_echo "$d" >&6; }
14150      else
14151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14152 $as_echo "not found ($d: no such directory)" >&6; }
14153      fi
14154
14155      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM libs" >&5
14156 $as_echo_n "checking for XPM libs... " >&6; }
14157      d=$with_xpm/lib
14158      if test -d $d; then
14159        X_LIBS="-L$d $X_LIBS"
14160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14161 $as_echo "$d" >&6; }
14162      else
14163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14164 $as_echo "not found ($d: no such directory)" >&6; }
14165      fi
14166
14167      # replace the directory string with "yes".
14168      with_xpm_req="yes"
14169      with_xpm=$with_xpm_req
14170      ;;
14171
14172     *)
14173      echo ""
14174      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
14175      echo "       If it is a directory, then \`DIR/include' will be added to"
14176      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14177      exit 1
14178      ;;
14179    esac
14180
14181
14182 if test "$with_xpm" = yes; then
14183
14184   ac_save_CPPFLAGS="$CPPFLAGS"
14185   if test \! -z "$includedir" ; then
14186     CPPFLAGS="$CPPFLAGS -I$includedir"
14187   fi
14188   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14189   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14190   ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "#include <X11/Xlib.h>
14191 "
14192 if test "x$ac_cv_header_X11_xpm_h" = xyes; then :
14193   have_xpm=yes
14194                     $as_echo "#define HAVE_XPM 1" >>confdefs.h
14195
14196                     XPM_LIBS="-lXpm $XPM_LIBS"
14197 fi
14198
14199
14200   CPPFLAGS="$ac_save_CPPFLAGS"
14201 elif test "$with_xpm" != no; then
14202   echo "error: must be yes or no: --with-xpm=$with_xpm"
14203   exit 1
14204 fi
14205
14206 # See comment near $motif_requires_xpm, above.
14207 # Need to do this here, after both Motif and XPM have been checked for.
14208 #
14209 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
14210   if test "$motif_requires_xpm" = yes ; then
14211     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
14212   fi
14213 fi
14214
14215 if test "$XPM_LIBS" = "" ; then
14216   XPM_LIBS=$(MINIXPM)
14217 fi
14218
14219
14220 ###############################################################################
14221 #
14222 #       Check for -ljpeg
14223 #
14224 ###############################################################################
14225
14226 have_jpeg=no
14227 with_jpeg_req=unspecified
14228 jpeg_halfassed=no
14229
14230 # Check whether --with-jpeg was given.
14231 if test "${with_jpeg+set}" = set; then :
14232   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
14233 else
14234   with_jpeg=yes
14235 fi
14236
14237
14238
14239    case "$with_jpeg" in
14240     yes) ;;
14241     no)  ;;
14242
14243     /*)
14244      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG headers" >&5
14245 $as_echo_n "checking for JPEG headers... " >&6; }
14246      d=$with_jpeg/include
14247      if test -d $d; then
14248        X_CFLAGS="-I$d $X_CFLAGS"
14249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14250 $as_echo "$d" >&6; }
14251      else
14252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14253 $as_echo "not found ($d: no such directory)" >&6; }
14254      fi
14255
14256      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG libs" >&5
14257 $as_echo_n "checking for JPEG libs... " >&6; }
14258      d=$with_jpeg/lib
14259      if test -d $d; then
14260        X_LIBS="-L$d $X_LIBS"
14261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14262 $as_echo "$d" >&6; }
14263      else
14264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14265 $as_echo "not found ($d: no such directory)" >&6; }
14266      fi
14267
14268      # replace the directory string with "yes".
14269      with_jpeg_req="yes"
14270      with_jpeg=$with_jpeg_req
14271      ;;
14272
14273     *)
14274      echo ""
14275      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
14276      echo "       If it is a directory, then \`DIR/include' will be added to"
14277      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14278      exit 1
14279      ;;
14280    esac
14281
14282
14283 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
14284   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
14285   exit 1
14286 fi
14287
14288 if test "$with_jpeg" = yes; then
14289
14290   have_jpeg=no
14291
14292   ac_save_CPPFLAGS="$CPPFLAGS"
14293   if test \! -z "$includedir" ; then
14294     CPPFLAGS="$CPPFLAGS -I$includedir"
14295   fi
14296   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14297   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14298   ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
14299 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
14300   have_jpeg=yes
14301 fi
14302
14303
14304   CPPFLAGS="$ac_save_CPPFLAGS"
14305
14306   if test "$have_jpeg" = yes; then
14307     # we have the header, now check for the library
14308     have_jpeg=no
14309     jpeg_halfassed=yes
14310
14311   ac_save_CPPFLAGS="$CPPFLAGS"
14312   ac_save_LDFLAGS="$LDFLAGS"
14313 #  ac_save_LIBS="$LIBS"
14314
14315   if test \! -z "$includedir" ; then
14316     CPPFLAGS="$CPPFLAGS -I$includedir"
14317   fi
14318   # note: $X_CFLAGS includes $x_includes
14319   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14320
14321   if test \! -z "$libdir" ; then
14322     LDFLAGS="$LDFLAGS -L$libdir"
14323   fi
14324   # note: $X_LIBS includes $x_libraries
14325   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14326
14327   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14328   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14329   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_start_compress in -ljpeg" >&5
14330 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
14331 if ${ac_cv_lib_jpeg_jpeg_start_compress+:} false; then :
14332   $as_echo_n "(cached) " >&6
14333 else
14334   ac_check_lib_save_LIBS=$LIBS
14335 LIBS="-ljpeg  $LIBS"
14336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14337 /* end confdefs.h.  */
14338
14339 /* Override any GCC internal prototype to avoid an error.
14340    Use char because int might match the return type of a GCC
14341    builtin and then its argument prototype would still apply.  */
14342 #ifdef __cplusplus
14343 extern "C"
14344 #endif
14345 char jpeg_start_compress ();
14346 int
14347 main ()
14348 {
14349 return jpeg_start_compress ();
14350   ;
14351   return 0;
14352 }
14353 _ACEOF
14354 if ac_fn_c_try_link "$LINENO"; then :
14355   ac_cv_lib_jpeg_jpeg_start_compress=yes
14356 else
14357   ac_cv_lib_jpeg_jpeg_start_compress=no
14358 fi
14359 rm -f core conftest.err conftest.$ac_objext \
14360     conftest$ac_exeext conftest.$ac_ext
14361 LIBS=$ac_check_lib_save_LIBS
14362 fi
14363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
14364 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
14365 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = xyes; then :
14366   have_jpeg=yes
14367                     jpeg_halfassed=no
14368                     JPEG_LIBS="-ljpeg"
14369                     $as_echo "#define HAVE_JPEGLIB 1" >>confdefs.h
14370
14371 fi
14372
14373   CPPFLAGS="$ac_save_CPPFLAGS"
14374   LDFLAGS="$ac_save_LDFLAGS"
14375 #  LIBS="$ac_save_LIBS"
14376
14377   fi
14378 fi
14379
14380
14381 ###############################################################################
14382 #
14383 #       Check for pty support: this allows 'phosphor' and 'apple2'
14384 #       to run curses-based programs, or be used as terminal windows.
14385 #
14386 ###############################################################################
14387
14388 PTY_LIBS=
14389 for ac_header in pty.h util.h
14390 do :
14391   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14392 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14393 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14394   cat >>confdefs.h <<_ACEOF
14395 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14396 _ACEOF
14397
14398 fi
14399
14400 done
14401
14402
14403   ac_save_CPPFLAGS="$CPPFLAGS"
14404   ac_save_LDFLAGS="$LDFLAGS"
14405 #  ac_save_LIBS="$LIBS"
14406
14407   if test \! -z "$includedir" ; then
14408     CPPFLAGS="$CPPFLAGS -I$includedir"
14409   fi
14410   # note: $X_CFLAGS includes $x_includes
14411   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14412
14413   if test \! -z "$libdir" ; then
14414     LDFLAGS="$LDFLAGS -L$libdir"
14415   fi
14416   # note: $X_LIBS includes $x_libraries
14417   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14418
14419   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14420   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14421   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
14422 $as_echo_n "checking for forkpty in -lutil... " >&6; }
14423 if ${ac_cv_lib_util_forkpty+:} false; then :
14424   $as_echo_n "(cached) " >&6
14425 else
14426   ac_check_lib_save_LIBS=$LIBS
14427 LIBS="-lutil  $LIBS"
14428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14429 /* end confdefs.h.  */
14430
14431 /* Override any GCC internal prototype to avoid an error.
14432    Use char because int might match the return type of a GCC
14433    builtin and then its argument prototype would still apply.  */
14434 #ifdef __cplusplus
14435 extern "C"
14436 #endif
14437 char forkpty ();
14438 int
14439 main ()
14440 {
14441 return forkpty ();
14442   ;
14443   return 0;
14444 }
14445 _ACEOF
14446 if ac_fn_c_try_link "$LINENO"; then :
14447   ac_cv_lib_util_forkpty=yes
14448 else
14449   ac_cv_lib_util_forkpty=no
14450 fi
14451 rm -f core conftest.err conftest.$ac_objext \
14452     conftest$ac_exeext conftest.$ac_ext
14453 LIBS=$ac_check_lib_save_LIBS
14454 fi
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
14456 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
14457 if test "x$ac_cv_lib_util_forkpty" = xyes; then :
14458   PTY_LIBS="-lutil"
14459                 ac_have_forkpty=yes
14460                 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
14461
14462 fi
14463
14464   CPPFLAGS="$ac_save_CPPFLAGS"
14465   LDFLAGS="$ac_save_LDFLAGS"
14466 #  LIBS="$ac_save_LIBS"
14467
14468
14469 if test "$ac_have_forkpty" != yes ; then
14470   # we don't need (or have) -lutil on MacOS 10.4.2...
14471
14472   ac_save_CPPFLAGS="$CPPFLAGS"
14473   ac_save_LDFLAGS="$LDFLAGS"
14474 #  ac_save_LIBS="$LIBS"
14475
14476   if test \! -z "$includedir" ; then
14477     CPPFLAGS="$CPPFLAGS -I$includedir"
14478   fi
14479   # note: $X_CFLAGS includes $x_includes
14480   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14481
14482   if test \! -z "$libdir" ; then
14483     LDFLAGS="$LDFLAGS -L$libdir"
14484   fi
14485   # note: $X_LIBS includes $x_libraries
14486   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14487
14488   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14489   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14490   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lc" >&5
14491 $as_echo_n "checking for forkpty in -lc... " >&6; }
14492 if ${ac_cv_lib_c_forkpty+:} false; then :
14493   $as_echo_n "(cached) " >&6
14494 else
14495   ac_check_lib_save_LIBS=$LIBS
14496 LIBS="-lc  $LIBS"
14497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14498 /* end confdefs.h.  */
14499
14500 /* Override any GCC internal prototype to avoid an error.
14501    Use char because int might match the return type of a GCC
14502    builtin and then its argument prototype would still apply.  */
14503 #ifdef __cplusplus
14504 extern "C"
14505 #endif
14506 char forkpty ();
14507 int
14508 main ()
14509 {
14510 return forkpty ();
14511   ;
14512   return 0;
14513 }
14514 _ACEOF
14515 if ac_fn_c_try_link "$LINENO"; then :
14516   ac_cv_lib_c_forkpty=yes
14517 else
14518   ac_cv_lib_c_forkpty=no
14519 fi
14520 rm -f core conftest.err conftest.$ac_objext \
14521     conftest$ac_exeext conftest.$ac_ext
14522 LIBS=$ac_check_lib_save_LIBS
14523 fi
14524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_forkpty" >&5
14525 $as_echo "$ac_cv_lib_c_forkpty" >&6; }
14526 if test "x$ac_cv_lib_c_forkpty" = xyes; then :
14527   PTY_LIBS=""
14528                   $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
14529
14530 fi
14531
14532   CPPFLAGS="$ac_save_CPPFLAGS"
14533   LDFLAGS="$ac_save_LDFLAGS"
14534 #  LIBS="$ac_save_LIBS"
14535
14536 fi
14537
14538 ###############################################################################
14539 #
14540 #       Check for the XSHM server extension.
14541 #
14542 ###############################################################################
14543
14544 have_xshm=no
14545 with_xshm_req=unspecified
14546
14547 # Check whether --with-xshm-ext was given.
14548 if test "${with_xshm_ext+set}" = set; then :
14549   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
14550 else
14551   with_xshm=yes
14552 fi
14553
14554
14555
14556    case "$with_xshm" in
14557     yes) ;;
14558     no)  ;;
14559
14560     /*)
14561      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM headers" >&5
14562 $as_echo_n "checking for XSHM headers... " >&6; }
14563      d=$with_xshm/include
14564      if test -d $d; then
14565        X_CFLAGS="-I$d $X_CFLAGS"
14566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14567 $as_echo "$d" >&6; }
14568      else
14569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14570 $as_echo "not found ($d: no such directory)" >&6; }
14571      fi
14572
14573      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM libs" >&5
14574 $as_echo_n "checking for XSHM libs... " >&6; }
14575      d=$with_xshm/lib
14576      if test -d $d; then
14577        X_LIBS="-L$d $X_LIBS"
14578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14579 $as_echo "$d" >&6; }
14580      else
14581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14582 $as_echo "not found ($d: no such directory)" >&6; }
14583      fi
14584
14585      # replace the directory string with "yes".
14586      with_xshm_req="yes"
14587      with_xshm=$with_xshm_req
14588      ;;
14589
14590     *)
14591      echo ""
14592      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
14593      echo "       If it is a directory, then \`DIR/include' will be added to"
14594      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14595      exit 1
14596      ;;
14597    esac
14598
14599
14600 if test "$with_xshm" = yes; then
14601
14602   # first check for Xshm.h.
14603
14604   ac_save_CPPFLAGS="$CPPFLAGS"
14605   if test \! -z "$includedir" ; then
14606     CPPFLAGS="$CPPFLAGS -I$includedir"
14607   fi
14608   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14609   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14610   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XShm.h" "ac_cv_header_X11_extensions_XShm_h" "#include <X11/Xlib.h>
14611 "
14612 if test "x$ac_cv_header_X11_extensions_XShm_h" = xyes; then :
14613   have_xshm=yes
14614 fi
14615
14616
14617   CPPFLAGS="$ac_save_CPPFLAGS"
14618
14619   # if that succeeded, then check for sys/ipc.h.
14620   if test "$have_xshm" = yes; then
14621     have_xshm=no
14622
14623   ac_save_CPPFLAGS="$CPPFLAGS"
14624   if test \! -z "$includedir" ; then
14625     CPPFLAGS="$CPPFLAGS -I$includedir"
14626   fi
14627   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14628   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14629   ac_fn_c_check_header_mongrel "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
14630 if test "x$ac_cv_header_sys_ipc_h" = xyes; then :
14631   have_xshm=yes
14632 fi
14633
14634
14635   CPPFLAGS="$ac_save_CPPFLAGS"
14636   fi
14637
14638   # if that succeeded, then check for sys/shm.h.
14639   if test "$have_xshm" = yes; then
14640     have_xshm=no
14641
14642   ac_save_CPPFLAGS="$CPPFLAGS"
14643   if test \! -z "$includedir" ; then
14644     CPPFLAGS="$CPPFLAGS -I$includedir"
14645   fi
14646   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14647   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14648   ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
14649 if test "x$ac_cv_header_sys_shm_h" = xyes; then :
14650   have_xshm=yes
14651 fi
14652
14653
14654   CPPFLAGS="$ac_save_CPPFLAGS"
14655   fi
14656
14657   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
14658   # to exist, but the library code to not exist.  And even better, the library
14659   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
14660   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
14661   # that's not quite right, but close enough.)
14662   #
14663   case "$host" in
14664     *-aix*)
14665       if  `uname -v` -eq 3 ; then
14666         have_xshm=no
14667
14668   ac_save_CPPFLAGS="$CPPFLAGS"
14669   ac_save_LDFLAGS="$LDFLAGS"
14670 #  ac_save_LIBS="$LIBS"
14671
14672   if test \! -z "$includedir" ; then
14673     CPPFLAGS="$CPPFLAGS -I$includedir"
14674   fi
14675   # note: $X_CFLAGS includes $x_includes
14676   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14677
14678   if test \! -z "$libdir" ; then
14679     LDFLAGS="$LDFLAGS -L$libdir"
14680   fi
14681   # note: $X_LIBS includes $x_libraries
14682   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14683
14684   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14685   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14686   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryExtension in -lXextSam" >&5
14687 $as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
14688 if ${ac_cv_lib_XextSam_XShmQueryExtension+:} false; then :
14689   $as_echo_n "(cached) " >&6
14690 else
14691   ac_check_lib_save_LIBS=$LIBS
14692 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
14693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14694 /* end confdefs.h.  */
14695
14696 /* Override any GCC internal prototype to avoid an error.
14697    Use char because int might match the return type of a GCC
14698    builtin and then its argument prototype would still apply.  */
14699 #ifdef __cplusplus
14700 extern "C"
14701 #endif
14702 char XShmQueryExtension ();
14703 int
14704 main ()
14705 {
14706 return XShmQueryExtension ();
14707   ;
14708   return 0;
14709 }
14710 _ACEOF
14711 if ac_fn_c_try_link "$LINENO"; then :
14712   ac_cv_lib_XextSam_XShmQueryExtension=yes
14713 else
14714   ac_cv_lib_XextSam_XShmQueryExtension=no
14715 fi
14716 rm -f core conftest.err conftest.$ac_objext \
14717     conftest$ac_exeext conftest.$ac_ext
14718 LIBS=$ac_check_lib_save_LIBS
14719 fi
14720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
14721 $as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
14722 if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = xyes; then :
14723   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
14724 else
14725   true
14726 fi
14727
14728   CPPFLAGS="$ac_save_CPPFLAGS"
14729   LDFLAGS="$ac_save_LDFLAGS"
14730 #  LIBS="$ac_save_LIBS"
14731
14732       fi
14733     ;;
14734   esac
14735
14736   # if that succeeded, then we've really got it.
14737   if test "$have_xshm" = yes; then
14738     $as_echo "#define HAVE_XSHM_EXTENSION 1" >>confdefs.h
14739
14740   fi
14741
14742 elif test "$with_xshm" != no; then
14743   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
14744   exit 1
14745 fi
14746
14747
14748 ###############################################################################
14749 #
14750 #       Check for the DOUBLE-BUFFER server extension.
14751 #
14752 ###############################################################################
14753
14754 have_xdbe=no
14755 with_xdbe_req=unspecified
14756
14757 # Check whether --with-xdbe-ext was given.
14758 if test "${with_xdbe_ext+set}" = set; then :
14759   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
14760 else
14761   with_xdbe=yes
14762 fi
14763
14764
14765
14766    case "$with_xdbe" in
14767     yes) ;;
14768     no)  ;;
14769
14770     /*)
14771      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER headers" >&5
14772 $as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
14773      d=$with_xdbe/include
14774      if test -d $d; then
14775        X_CFLAGS="-I$d $X_CFLAGS"
14776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14777 $as_echo "$d" >&6; }
14778      else
14779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14780 $as_echo "not found ($d: no such directory)" >&6; }
14781      fi
14782
14783      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER libs" >&5
14784 $as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
14785      d=$with_xdbe/lib
14786      if test -d $d; then
14787        X_LIBS="-L$d $X_LIBS"
14788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14789 $as_echo "$d" >&6; }
14790      else
14791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14792 $as_echo "not found ($d: no such directory)" >&6; }
14793      fi
14794
14795      # replace the directory string with "yes".
14796      with_xdbe_req="yes"
14797      with_xdbe=$with_xdbe_req
14798      ;;
14799
14800     *)
14801      echo ""
14802      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
14803      echo "       If it is a directory, then \`DIR/include' will be added to"
14804      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14805      exit 1
14806      ;;
14807    esac
14808
14809
14810 if test "$with_xdbe" = yes; then
14811
14812
14813   ac_save_CPPFLAGS="$CPPFLAGS"
14814   if test \! -z "$includedir" ; then
14815     CPPFLAGS="$CPPFLAGS -I$includedir"
14816   fi
14817   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14818   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14819   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xdbe.h" "ac_cv_header_X11_extensions_Xdbe_h" "#include <X11/Xlib.h>
14820 "
14821 if test "x$ac_cv_header_X11_extensions_Xdbe_h" = xyes; then :
14822   have_xdbe=yes
14823 fi
14824
14825
14826   CPPFLAGS="$ac_save_CPPFLAGS"
14827   if test "$have_xdbe" = yes; then
14828     $as_echo "#define HAVE_DOUBLE_BUFFER_EXTENSION 1" >>confdefs.h
14829
14830   fi
14831
14832 elif test "$with_xdbe" != no; then
14833   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
14834   exit 1
14835 fi
14836
14837
14838 ###############################################################################
14839 #
14840 #       Check for the SGI XReadDisplay server extension.
14841 #
14842 #       Note: this has to be down here, rather than up with the other server
14843 #       extension tests, so that the output of `configure --help' is in the
14844 #       right order.  Arrgh!
14845 #
14846 ###############################################################################
14847
14848 have_readdisplay=no
14849 with_readdisplay_req=unspecified
14850
14851 # Check whether --with-readdisplay was given.
14852 if test "${with_readdisplay+set}" = set; then :
14853   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
14854 else
14855   with_readdisplay=yes
14856 fi
14857
14858
14859
14860    case "$with_readdisplay" in
14861     yes) ;;
14862     no)  ;;
14863
14864     /*)
14865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay headers" >&5
14866 $as_echo_n "checking for XReadDisplay headers... " >&6; }
14867      d=$with_readdisplay/include
14868      if test -d $d; then
14869        X_CFLAGS="-I$d $X_CFLAGS"
14870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14871 $as_echo "$d" >&6; }
14872      else
14873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14874 $as_echo "not found ($d: no such directory)" >&6; }
14875      fi
14876
14877      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay libs" >&5
14878 $as_echo_n "checking for XReadDisplay libs... " >&6; }
14879      d=$with_readdisplay/lib
14880      if test -d $d; then
14881        X_LIBS="-L$d $X_LIBS"
14882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14883 $as_echo "$d" >&6; }
14884      else
14885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14886 $as_echo "not found ($d: no such directory)" >&6; }
14887      fi
14888
14889      # replace the directory string with "yes".
14890      with_readdisplay_req="yes"
14891      with_readdisplay=$with_readdisplay_req
14892      ;;
14893
14894     *)
14895      echo ""
14896      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
14897      echo "       If it is a directory, then \`DIR/include' will be added to"
14898      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14899      exit 1
14900      ;;
14901    esac
14902
14903
14904 if test "$with_readdisplay" = yes; then
14905
14906   ac_save_CPPFLAGS="$CPPFLAGS"
14907   if test \! -z "$includedir" ; then
14908     CPPFLAGS="$CPPFLAGS -I$includedir"
14909   fi
14910   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14911   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14912   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/readdisplay.h" "ac_cv_header_X11_extensions_readdisplay_h" "#include <X11/Xlib.h>
14913 "
14914 if test "x$ac_cv_header_X11_extensions_readdisplay_h" = xyes; then :
14915   $as_echo "#define HAVE_READ_DISPLAY_EXTENSION 1" >>confdefs.h
14916
14917 fi
14918
14919
14920   CPPFLAGS="$ac_save_CPPFLAGS"
14921 elif test "$with_readdisplay" != no; then
14922   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
14923   exit 1
14924 fi
14925
14926
14927 ###############################################################################
14928 #
14929 #       Check for a directory full of images to use as the default value
14930 #       of the "imageDirectory" preference.
14931 #
14932 ###############################################################################
14933
14934 have_imagedir=no
14935 with_imagedir_req=unspecified
14936
14937
14938 # Check whether --with-image-directory was given.
14939 if test "${with_image_directory+set}" = set; then :
14940   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
14941 else
14942   with_imagedir=yes
14943 fi
14944
14945 # no HANDLE_X_PATH_ARG for this one
14946
14947 case "$with_imagedir" in
14948   /*)
14949     # absolute path
14950     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $with_imagedir" >&5
14951 $as_echo_n "checking for image directory $with_imagedir... " >&6; }
14952     if test -d "$with_imagedir" ; then
14953       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14954 $as_echo "yes" >&6; }
14955     else
14956       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14957 $as_echo "no" >&6; }
14958       with_imagedir=""
14959     fi
14960   ;;
14961   yes)
14962     with_imagedir=""
14963
14964     #### Could use some more defaults here...
14965     for dd in \
14966       "/usr/share/backgrounds/images/"          \
14967       "/usr/share/wallpapers/"                  \
14968       "/Library/Desktop Pictures/"              \
14969     ; do
14970       if test -z "$with_imagedir"; then
14971         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $dd" >&5
14972 $as_echo_n "checking for image directory $dd... " >&6; }
14973         if test -d "$dd" ; then
14974           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14975 $as_echo "yes" >&6; }
14976           with_imagedir="$dd"
14977         else
14978           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14979 $as_echo "no" >&6; }
14980         fi
14981       fi
14982     done
14983
14984   ;;
14985   no)
14986     with_imagedir=""
14987   ;;
14988
14989   *)
14990     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
14991     exit 1
14992   ;;
14993 esac
14994 ac_cv_imagedir="$with_imagedir"
14995
14996 DEFAULT_IMAGES_P='True'
14997 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
14998
14999 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
15000   DEFAULT_IMAGES_P='False'
15001 fi
15002
15003
15004 ###############################################################################
15005 #
15006 #       Pick a text file to use as the default of the "textFile" preference.
15007 #       Any old file will do, but preferably one that will make interesting
15008 #       shapes when displayed by "starwars" and "fontglide".
15009 #
15010 ###############################################################################
15011
15012 have_textfile=no
15013 with_textfile_req=unspecified
15014
15015
15016 # Check whether --with-text-file was given.
15017 if test "${with_text_file+set}" = set; then :
15018   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
15019 else
15020   with_textfile=yes
15021 fi
15022
15023 # no HANDLE_X_PATH_ARG for this one
15024
15025 case "$with_textfile" in
15026   /*)
15027     # absolute path
15028     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $with_textfile" >&5
15029 $as_echo_n "checking for text file $with_textfile... " >&6; }
15030     if test -f "$with_textfile" ; then
15031       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15032 $as_echo "yes" >&6; }
15033     else
15034       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15035 $as_echo "no" >&6; }
15036       with_textfile=""
15037     fi
15038   ;;
15039   yes)
15040     with_textfile=""
15041
15042     #### Could use some more defaults here...
15043     for f in \
15044       "/usr/X11R6/lib/X11/doc/README"              \
15045       "/usr/share/doc/xserver-common/copyright"    \
15046       "/usr/share/doc/xserver-xorg-core/copyright" \
15047       "/usr/X11R6/README"                          \
15048       "/usr/share/doc/libX11*/COPYING"             \
15049       "/usr/X11/share/X11/doc/README*"             \
15050       "/usr/share/doc/debian/debian-manifesto"     \
15051     ; do
15052       if test -z "$with_textfile"; then
15053         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $f" >&5
15054 $as_echo_n "checking for text file $f... " >&6; }
15055         f=`/bin/ls $f 2>&- | head -1`
15056         if test -f "$f" ; then
15057           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15058 $as_echo "yes" >&6; }
15059           with_textfile="$f"
15060         else
15061           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15062 $as_echo "no" >&6; }
15063         fi
15064       fi
15065     done
15066
15067   ;;
15068   no)
15069     with_textfile=""
15070   ;;
15071
15072   *)
15073     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
15074     exit 1
15075   ;;
15076 esac
15077 ac_cv_textfile="$with_textfile"
15078
15079 DEFAULT_TEXT_FILE="$ac_cv_textfile"
15080
15081
15082 ###############################################################################
15083 #
15084 #       Check the browser to see help URL
15085 #
15086 ###############################################################################
15087
15088 have_browser=no
15089 with_browser_req=unspecified
15090
15091
15092 # Check whether --with-browser was given.
15093 if test "${with_browser+set}" = set; then :
15094   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
15095 else
15096   with_browser=no
15097 fi
15098
15099 # no HANDLE_X_PATH_ARG for this one
15100
15101 case "$with_browser" in
15102   no )
15103   ;;
15104   * )
15105     WITH_BROWSER=$with_browser
15106     gnome_open_program=$with_browser
15107     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for browser $with_browser" >&5
15108 $as_echo_n "checking for browser $with_browser... " >&6; }
15109     with_browser_fullpath=`which $with_browser 2>/dev/null`
15110     case $with_browser_fullpath in
15111          /* )
15112                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15113 $as_echo "yes" >&6; }
15114                  have_browser=yes
15115                  ;;
15116         * )
15117                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15118 $as_echo "no" >&6; }
15119 # Only warning: we don't want to install all packages for the
15120 # dependency of the browser in building stage...
15121                echo "WARNING: browser not found: --with-browser=$with_browser"
15122                ;;
15123     esac
15124   ;;
15125 esac
15126 ac_cv_browser="$with_browser"
15127
15128 ###############################################################################
15129 #
15130 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
15131 #       This should be safe, but let's give people the option.
15132 #
15133 ###############################################################################
15134
15135 setuid_hacks_default=no
15136 setuid_hacks="$setuid_hacks_default"
15137
15138 # Check whether --with-setuid-hacks was given.
15139 if test "${with_setuid_hacks+set}" = set; then :
15140   withval=$with_setuid_hacks; setuid_hacks="$withval"
15141 else
15142   setuid_hacks="$setuid_hacks_default"
15143 fi
15144
15145
15146
15147    case "$setuid_hacks" in
15148     yes) ;;
15149     no)  ;;
15150
15151     /*)
15152      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks headers" >&5
15153 $as_echo_n "checking for setuid hacks headers... " >&6; }
15154      d=$setuid_hacks/include
15155      if test -d $d; then
15156        X_CFLAGS="-I$d $X_CFLAGS"
15157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15158 $as_echo "$d" >&6; }
15159      else
15160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15161 $as_echo "not found ($d: no such directory)" >&6; }
15162      fi
15163
15164      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks libs" >&5
15165 $as_echo_n "checking for setuid hacks libs... " >&6; }
15166      d=$setuid_hacks/lib
15167      if test -d $d; then
15168        X_LIBS="-L$d $X_LIBS"
15169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15170 $as_echo "$d" >&6; }
15171      else
15172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15173 $as_echo "not found ($d: no such directory)" >&6; }
15174      fi
15175
15176      # replace the directory string with "yes".
15177      setuid_hacks_req="yes"
15178      setuid_hacks=$setuid_hacks_req
15179      ;;
15180
15181     *)
15182      echo ""
15183      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
15184      echo "       If it is a directory, then \`DIR/include' will be added to"
15185      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15186      exit 1
15187      ;;
15188    esac
15189
15190
15191 if test "$setuid_hacks" = yes; then
15192   true
15193 elif test "$setuid_hacks" != no; then
15194   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
15195   exit 1
15196 fi
15197
15198
15199 ###############################################################################
15200 #
15201 #       Done testing.  Now, set up the various -I and -L variables,
15202 #       and decide which GUI program to build by default.
15203 #
15204 ###############################################################################
15205
15206 DEPEND=makedepend
15207 DEPEND_FLAGS=
15208 DEPEND_DEFINES=
15209
15210
15211 if test \! -z "$includedir" ; then
15212   INCLUDES="$INCLUDES -I$includedir"
15213 fi
15214
15215 if test \! -z "$libdir" ; then
15216   LDFLAGS="$LDFLAGS -L$libdir"
15217 fi
15218
15219
15220 PREFERRED_DEMO_PROGRAM=''
15221 ALL_DEMO_PROGRAMS=
15222 if test "$have_motif" = yes; then
15223   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
15224   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
15225 fi
15226 if test "$have_gtk" = yes; then
15227   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
15228   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
15229 fi
15230
15231
15232 if test "$have_kerberos" = yes; then
15233   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
15234   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
15235 fi
15236 if test "$have_pam" = yes; then
15237   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
15238   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
15239   INSTALL_PAM="install-pam"
15240 fi
15241 if test "$enable_pam_check_account_type" = yes; then
15242   COMMENT_PAM_CHECK_ACCOUNT=""
15243 else
15244   COMMENT_PAM_CHECK_ACCOUNT="#"
15245 fi
15246 if test "$have_passwd_helper" = yes; then
15247   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
15248   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
15249 fi
15250   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
15251   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
15252
15253
15254 if test "$enable_locking" = yes; then
15255   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
15256   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
15257 else
15258   LOCK_SRCS='$(NOLOCK_SRCS_1)'
15259   LOCK_OBJS='$(NOLOCK_OBJS_1)'
15260 fi
15261
15262 if test "$ac_macosx" = yes; then
15263   EXES_OSX='$(EXES_OSX)'
15264   SCRIPTS_OSX='$(SCRIPTS_OSX)'
15265   MEN_OSX='$(MEN_OSX)'
15266 else
15267   EXES_OSX=
15268   SCRIPTS_OSX=
15269   MEN_OSX=
15270 fi
15271
15272
15273 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
15274
15275 if test "$need_setuid" = yes; then
15276   NEED_SETUID=yes
15277 else
15278   NEED_SETUID=no
15279 fi
15280
15281 if test "$setuid_hacks" = yes; then
15282   SETUID_HACKS=yes
15283 else
15284   SETUID_HACKS=no
15285 fi
15286
15287 tab='   '
15288 if test "$have_gl" = yes; then
15289   GL_EXES='$(GL_EXES)'
15290   SUID_EXES='$(SUID_EXES)'
15291   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
15292   GL_UTIL_EXES='$(GL_UTIL_EXES)'
15293   GL_MEN='$(GL_MEN)'
15294   GL_KLUDGE=" "
15295 else
15296   GL_KLUDGE="-"
15297 fi
15298
15299 if test "$have_gle" = yes; then
15300   GLE_EXES='$(GLE_EXES)'
15301   GLE_KLUDGE=" "
15302 else
15303   GLE_KLUDGE="-"
15304 fi
15305
15306 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
15307  JPEG_EXES='$(JPEG_EXES)'
15308 fi
15309
15310
15311 # Another substitution in the XScreenSaver.ad.in file:
15312 #
15313 if test "$gnome_open_program" != ''; then
15314   GNOME24=''
15315   GNOME22='!    '
15316   NOGNOME='!    '
15317 elif test "$gnome_url_show_program" != ''; then
15318   GNOME24='!    '
15319   GNOME22=''
15320   NOGNOME='!    '
15321 else
15322   GNOME24='!    '
15323   GNOME22='!    '
15324   NOGNOME=''
15325 fi
15326
15327
15328 # Set PO_DATADIR to something sensible.
15329 #
15330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale directory" >&5
15331 $as_echo_n "checking for locale directory... " >&6; }
15332 if test -n "$GTK_DATADIR" ; then
15333   PO_DATADIR="$GTK_DATADIR"
15334 elif test "$have_gtk" = yes; then
15335   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15336   PO_DATADIR="$PO_DATADIR/share"
15337 fi
15338
15339 if test -z "$PO_DATADIR" ; then
15340   #
15341   # #### Total fucking kludge --
15342   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
15343   # but of course we need to expand all the nested variables to do that...
15344   #
15345   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
15346   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
15347 fi
15348
15349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PO_DATADIR/locale" >&5
15350 $as_echo "$PO_DATADIR/locale" >&6; }
15351
15352
15353 # canonicalize slashes.
15354 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
15355
15356 # gcc 3.0 likes to issue this warning for every file:
15357 #
15358 # cc1: warning: changing search order for system directory "/usr/local/include"
15359 # cc1: warning:   as it has already been specified as a non-system directory
15360 #
15361 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
15362 # Which *should* be totally redundant, and thus an ok thing to delete?
15363 #
15364 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
15365
15366
15367 ###############################################################################
15368 #
15369 #       Perform substitutions and write Makefiles.
15370 #
15371 ###############################################################################
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441 APPDEFAULTS=$ac_x_app_defaults
15442
15443
15444
15445
15446
15447
15448
15449 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile driver/xscreensaver.pam hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
15450
15451 cat >confcache <<\_ACEOF
15452 # This file is a shell script that caches the results of configure
15453 # tests run on this system so they can be shared between configure
15454 # scripts and configure runs, see configure's option --config-cache.
15455 # It is not useful on other systems.  If it contains results you don't
15456 # want to keep, you may remove or edit it.
15457 #
15458 # config.status only pays attention to the cache file if you give it
15459 # the --recheck option to rerun configure.
15460 #
15461 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15462 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15463 # following values.
15464
15465 _ACEOF
15466
15467 # The following way of writing the cache mishandles newlines in values,
15468 # but we know of no workaround that is simple, portable, and efficient.
15469 # So, we kill variables containing newlines.
15470 # Ultrix sh set writes to stderr and can't be redirected directly,
15471 # and sets the high bit in the cache file unless we assign to the vars.
15472 (
15473   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15474     eval ac_val=\$$ac_var
15475     case $ac_val in #(
15476     *${as_nl}*)
15477       case $ac_var in #(
15478       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15479 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15480       esac
15481       case $ac_var in #(
15482       _ | IFS | as_nl) ;; #(
15483       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15484       *) { eval $ac_var=; unset $ac_var;} ;;
15485       esac ;;
15486     esac
15487   done
15488
15489   (set) 2>&1 |
15490     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15491     *${as_nl}ac_space=\ *)
15492       # `set' does not quote correctly, so add quotes: double-quote
15493       # substitution turns \\\\ into \\, and sed turns \\ into \.
15494       sed -n \
15495         "s/'/'\\\\''/g;
15496           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15497       ;; #(
15498     *)
15499       # `set' quotes correctly as required by POSIX, so do not add quotes.
15500       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15501       ;;
15502     esac |
15503     sort
15504 ) |
15505   sed '
15506      /^ac_cv_env_/b end
15507      t clear
15508      :clear
15509      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15510      t end
15511      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15512      :end' >>confcache
15513 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15514   if test -w "$cache_file"; then
15515     if test "x$cache_file" != "x/dev/null"; then
15516       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15517 $as_echo "$as_me: updating cache $cache_file" >&6;}
15518       if test ! -f "$cache_file" || test -h "$cache_file"; then
15519         cat confcache >"$cache_file"
15520       else
15521         case $cache_file in #(
15522         */* | ?:*)
15523           mv -f confcache "$cache_file"$$ &&
15524           mv -f "$cache_file"$$ "$cache_file" ;; #(
15525         *)
15526           mv -f confcache "$cache_file" ;;
15527         esac
15528       fi
15529     fi
15530   else
15531     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15532 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15533   fi
15534 fi
15535 rm -f confcache
15536
15537 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15538 # Let make expand exec_prefix.
15539 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15540
15541 DEFS=-DHAVE_CONFIG_H
15542
15543 ac_libobjs=
15544 ac_ltlibobjs=
15545 U=
15546 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15547   # 1. Remove the extension, and $U if already installed.
15548   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15549   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15550   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15551   #    will be set to the directory where LIBOBJS objects are built.
15552   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15553   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15554 done
15555 LIBOBJS=$ac_libobjs
15556
15557 LTLIBOBJS=$ac_ltlibobjs
15558
15559
15560
15561   ac_config_commands="$ac_config_commands po/stamp-it"
15562
15563
15564
15565 : "${CONFIG_STATUS=./config.status}"
15566 ac_write_fail=0
15567 ac_clean_files_save=$ac_clean_files
15568 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15569 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15570 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15571 as_write_fail=0
15572 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15573 #! $SHELL
15574 # Generated by $as_me.
15575 # Run this file to recreate the current configuration.
15576 # Compiler output produced by configure, useful for debugging
15577 # configure, is in config.log if it exists.
15578
15579 debug=false
15580 ac_cs_recheck=false
15581 ac_cs_silent=false
15582
15583 SHELL=\${CONFIG_SHELL-$SHELL}
15584 export SHELL
15585 _ASEOF
15586 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15587 ## -------------------- ##
15588 ## M4sh Initialization. ##
15589 ## -------------------- ##
15590
15591 # Be more Bourne compatible
15592 DUALCASE=1; export DUALCASE # for MKS sh
15593 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15594   emulate sh
15595   NULLCMD=:
15596   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15597   # is contrary to our usage.  Disable this feature.
15598   alias -g '${1+"$@"}'='"$@"'
15599   setopt NO_GLOB_SUBST
15600 else
15601   case `(set -o) 2>/dev/null` in #(
15602   *posix*) :
15603     set -o posix ;; #(
15604   *) :
15605      ;;
15606 esac
15607 fi
15608
15609
15610 as_nl='
15611 '
15612 export as_nl
15613 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15614 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15615 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15616 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15617 # Prefer a ksh shell builtin over an external printf program on Solaris,
15618 # but without wasting forks for bash or zsh.
15619 if test -z "$BASH_VERSION$ZSH_VERSION" \
15620     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15621   as_echo='print -r --'
15622   as_echo_n='print -rn --'
15623 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15624   as_echo='printf %s\n'
15625   as_echo_n='printf %s'
15626 else
15627   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15628     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15629     as_echo_n='/usr/ucb/echo -n'
15630   else
15631     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15632     as_echo_n_body='eval
15633       arg=$1;
15634       case $arg in #(
15635       *"$as_nl"*)
15636         expr "X$arg" : "X\\(.*\\)$as_nl";
15637         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15638       esac;
15639       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15640     '
15641     export as_echo_n_body
15642     as_echo_n='sh -c $as_echo_n_body as_echo'
15643   fi
15644   export as_echo_body
15645   as_echo='sh -c $as_echo_body as_echo'
15646 fi
15647
15648 # The user is always right.
15649 if test "${PATH_SEPARATOR+set}" != set; then
15650   PATH_SEPARATOR=:
15651   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15652     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15653       PATH_SEPARATOR=';'
15654   }
15655 fi
15656
15657
15658 # IFS
15659 # We need space, tab and new line, in precisely that order.  Quoting is
15660 # there to prevent editors from complaining about space-tab.
15661 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15662 # splitting by setting IFS to empty value.)
15663 IFS=" ""        $as_nl"
15664
15665 # Find who we are.  Look in the path if we contain no directory separator.
15666 as_myself=
15667 case $0 in #((
15668   *[\\/]* ) as_myself=$0 ;;
15669   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15670 for as_dir in $PATH
15671 do
15672   IFS=$as_save_IFS
15673   test -z "$as_dir" && as_dir=.
15674     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15675   done
15676 IFS=$as_save_IFS
15677
15678      ;;
15679 esac
15680 # We did not find ourselves, most probably we were run as `sh COMMAND'
15681 # in which case we are not to be found in the path.
15682 if test "x$as_myself" = x; then
15683   as_myself=$0
15684 fi
15685 if test ! -f "$as_myself"; then
15686   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15687   exit 1
15688 fi
15689
15690 # Unset variables that we do not need and which cause bugs (e.g. in
15691 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15692 # suppresses any "Segmentation fault" message there.  '((' could
15693 # trigger a bug in pdksh 5.2.14.
15694 for as_var in BASH_ENV ENV MAIL MAILPATH
15695 do eval test x\${$as_var+set} = xset \
15696   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15697 done
15698 PS1='$ '
15699 PS2='> '
15700 PS4='+ '
15701
15702 # NLS nuisances.
15703 LC_ALL=C
15704 export LC_ALL
15705 LANGUAGE=C
15706 export LANGUAGE
15707
15708 # CDPATH.
15709 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15710
15711
15712 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15713 # ----------------------------------------
15714 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15715 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15716 # script with STATUS, using 1 if that was 0.
15717 as_fn_error ()
15718 {
15719   as_status=$1; test $as_status -eq 0 && as_status=1
15720   if test "$4"; then
15721     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15722     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15723   fi
15724   $as_echo "$as_me: error: $2" >&2
15725   as_fn_exit $as_status
15726 } # as_fn_error
15727
15728
15729 # as_fn_set_status STATUS
15730 # -----------------------
15731 # Set $? to STATUS, without forking.
15732 as_fn_set_status ()
15733 {
15734   return $1
15735 } # as_fn_set_status
15736
15737 # as_fn_exit STATUS
15738 # -----------------
15739 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15740 as_fn_exit ()
15741 {
15742   set +e
15743   as_fn_set_status $1
15744   exit $1
15745 } # as_fn_exit
15746
15747 # as_fn_unset VAR
15748 # ---------------
15749 # Portably unset VAR.
15750 as_fn_unset ()
15751 {
15752   { eval $1=; unset $1;}
15753 }
15754 as_unset=as_fn_unset
15755 # as_fn_append VAR VALUE
15756 # ----------------------
15757 # Append the text in VALUE to the end of the definition contained in VAR. Take
15758 # advantage of any shell optimizations that allow amortized linear growth over
15759 # repeated appends, instead of the typical quadratic growth present in naive
15760 # implementations.
15761 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15762   eval 'as_fn_append ()
15763   {
15764     eval $1+=\$2
15765   }'
15766 else
15767   as_fn_append ()
15768   {
15769     eval $1=\$$1\$2
15770   }
15771 fi # as_fn_append
15772
15773 # as_fn_arith ARG...
15774 # ------------------
15775 # Perform arithmetic evaluation on the ARGs, and store the result in the
15776 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15777 # must be portable across $(()) and expr.
15778 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15779   eval 'as_fn_arith ()
15780   {
15781     as_val=$(( $* ))
15782   }'
15783 else
15784   as_fn_arith ()
15785   {
15786     as_val=`expr "$@" || test $? -eq 1`
15787   }
15788 fi # as_fn_arith
15789
15790
15791 if expr a : '\(a\)' >/dev/null 2>&1 &&
15792    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15793   as_expr=expr
15794 else
15795   as_expr=false
15796 fi
15797
15798 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15799   as_basename=basename
15800 else
15801   as_basename=false
15802 fi
15803
15804 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15805   as_dirname=dirname
15806 else
15807   as_dirname=false
15808 fi
15809
15810 as_me=`$as_basename -- "$0" ||
15811 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15812          X"$0" : 'X\(//\)$' \| \
15813          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15814 $as_echo X/"$0" |
15815     sed '/^.*\/\([^/][^/]*\)\/*$/{
15816             s//\1/
15817             q
15818           }
15819           /^X\/\(\/\/\)$/{
15820             s//\1/
15821             q
15822           }
15823           /^X\/\(\/\).*/{
15824             s//\1/
15825             q
15826           }
15827           s/.*/./; q'`
15828
15829 # Avoid depending upon Character Ranges.
15830 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15831 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15832 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15833 as_cr_digits='0123456789'
15834 as_cr_alnum=$as_cr_Letters$as_cr_digits
15835
15836 ECHO_C= ECHO_N= ECHO_T=
15837 case `echo -n x` in #(((((
15838 -n*)
15839   case `echo 'xy\c'` in
15840   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15841   xy)  ECHO_C='\c';;
15842   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15843        ECHO_T=' ';;
15844   esac;;
15845 *)
15846   ECHO_N='-n';;
15847 esac
15848
15849 rm -f conf$$ conf$$.exe conf$$.file
15850 if test -d conf$$.dir; then
15851   rm -f conf$$.dir/conf$$.file
15852 else
15853   rm -f conf$$.dir
15854   mkdir conf$$.dir 2>/dev/null
15855 fi
15856 if (echo >conf$$.file) 2>/dev/null; then
15857   if ln -s conf$$.file conf$$ 2>/dev/null; then
15858     as_ln_s='ln -s'
15859     # ... but there are two gotchas:
15860     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15861     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15862     # In both cases, we have to default to `cp -pR'.
15863     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15864       as_ln_s='cp -pR'
15865   elif ln conf$$.file conf$$ 2>/dev/null; then
15866     as_ln_s=ln
15867   else
15868     as_ln_s='cp -pR'
15869   fi
15870 else
15871   as_ln_s='cp -pR'
15872 fi
15873 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15874 rmdir conf$$.dir 2>/dev/null
15875
15876
15877 # as_fn_mkdir_p
15878 # -------------
15879 # Create "$as_dir" as a directory, including parents if necessary.
15880 as_fn_mkdir_p ()
15881 {
15882
15883   case $as_dir in #(
15884   -*) as_dir=./$as_dir;;
15885   esac
15886   test -d "$as_dir" || eval $as_mkdir_p || {
15887     as_dirs=
15888     while :; do
15889       case $as_dir in #(
15890       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15891       *) as_qdir=$as_dir;;
15892       esac
15893       as_dirs="'$as_qdir' $as_dirs"
15894       as_dir=`$as_dirname -- "$as_dir" ||
15895 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15896          X"$as_dir" : 'X\(//\)[^/]' \| \
15897          X"$as_dir" : 'X\(//\)$' \| \
15898          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15899 $as_echo X"$as_dir" |
15900     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15901             s//\1/
15902             q
15903           }
15904           /^X\(\/\/\)[^/].*/{
15905             s//\1/
15906             q
15907           }
15908           /^X\(\/\/\)$/{
15909             s//\1/
15910             q
15911           }
15912           /^X\(\/\).*/{
15913             s//\1/
15914             q
15915           }
15916           s/.*/./; q'`
15917       test -d "$as_dir" && break
15918     done
15919     test -z "$as_dirs" || eval "mkdir $as_dirs"
15920   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15921
15922
15923 } # as_fn_mkdir_p
15924 if mkdir -p . 2>/dev/null; then
15925   as_mkdir_p='mkdir -p "$as_dir"'
15926 else
15927   test -d ./-p && rmdir ./-p
15928   as_mkdir_p=false
15929 fi
15930
15931
15932 # as_fn_executable_p FILE
15933 # -----------------------
15934 # Test if FILE is an executable regular file.
15935 as_fn_executable_p ()
15936 {
15937   test -f "$1" && test -x "$1"
15938 } # as_fn_executable_p
15939 as_test_x='test -x'
15940 as_executable_p=as_fn_executable_p
15941
15942 # Sed expression to map a string onto a valid CPP name.
15943 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15944
15945 # Sed expression to map a string onto a valid variable name.
15946 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15947
15948
15949 exec 6>&1
15950 ## ----------------------------------- ##
15951 ## Main body of $CONFIG_STATUS script. ##
15952 ## ----------------------------------- ##
15953 _ASEOF
15954 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15955
15956 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15957 # Save the log message, to keep $0 and so on meaningful, and to
15958 # report actual input values of CONFIG_FILES etc. instead of their
15959 # values after options handling.
15960 ac_log="
15961 This file was extended by $as_me, which was
15962 generated by GNU Autoconf 2.69.  Invocation command line was
15963
15964   CONFIG_FILES    = $CONFIG_FILES
15965   CONFIG_HEADERS  = $CONFIG_HEADERS
15966   CONFIG_LINKS    = $CONFIG_LINKS
15967   CONFIG_COMMANDS = $CONFIG_COMMANDS
15968   $ $0 $@
15969
15970 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15971 "
15972
15973 _ACEOF
15974
15975 case $ac_config_files in *"
15976 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15977 esac
15978
15979 case $ac_config_headers in *"
15980 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15981 esac
15982
15983
15984 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15985 # Files that config.status was made for.
15986 config_files="$ac_config_files"
15987 config_headers="$ac_config_headers"
15988 config_commands="$ac_config_commands"
15989
15990 _ACEOF
15991
15992 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15993 ac_cs_usage="\
15994 \`$as_me' instantiates files and other configuration actions
15995 from templates according to the current configuration.  Unless the files
15996 and actions are specified as TAGs, all are instantiated by default.
15997
15998 Usage: $0 [OPTION]... [TAG]...
15999
16000   -h, --help       print this help, then exit
16001   -V, --version    print version number and configuration settings, then exit
16002       --config     print configuration, then exit
16003   -q, --quiet, --silent
16004                    do not print progress messages
16005   -d, --debug      don't remove temporary files
16006       --recheck    update $as_me by reconfiguring in the same conditions
16007       --file=FILE[:TEMPLATE]
16008                    instantiate the configuration file FILE
16009       --header=FILE[:TEMPLATE]
16010                    instantiate the configuration header FILE
16011
16012 Configuration files:
16013 $config_files
16014
16015 Configuration headers:
16016 $config_headers
16017
16018 Configuration commands:
16019 $config_commands
16020
16021 Report bugs to the package provider."
16022
16023 _ACEOF
16024 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16025 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16026 ac_cs_version="\\
16027 config.status
16028 configured by $0, generated by GNU Autoconf 2.69,
16029   with options \\"\$ac_cs_config\\"
16030
16031 Copyright (C) 2012 Free Software Foundation, Inc.
16032 This config.status script is free software; the Free Software Foundation
16033 gives unlimited permission to copy, distribute and modify it."
16034
16035 ac_pwd='$ac_pwd'
16036 srcdir='$srcdir'
16037 INSTALL='$INSTALL'
16038 test -n "\$AWK" || AWK=awk
16039 _ACEOF
16040
16041 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16042 # The default lists apply if the user does not specify any file.
16043 ac_need_defaults=:
16044 while test $# != 0
16045 do
16046   case $1 in
16047   --*=?*)
16048     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16049     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16050     ac_shift=:
16051     ;;
16052   --*=)
16053     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16054     ac_optarg=
16055     ac_shift=:
16056     ;;
16057   *)
16058     ac_option=$1
16059     ac_optarg=$2
16060     ac_shift=shift
16061     ;;
16062   esac
16063
16064   case $ac_option in
16065   # Handling of the options.
16066   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16067     ac_cs_recheck=: ;;
16068   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16069     $as_echo "$ac_cs_version"; exit ;;
16070   --config | --confi | --conf | --con | --co | --c )
16071     $as_echo "$ac_cs_config"; exit ;;
16072   --debug | --debu | --deb | --de | --d | -d )
16073     debug=: ;;
16074   --file | --fil | --fi | --f )
16075     $ac_shift
16076     case $ac_optarg in
16077     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16078     '') as_fn_error $? "missing file argument" ;;
16079     esac
16080     as_fn_append CONFIG_FILES " '$ac_optarg'"
16081     ac_need_defaults=false;;
16082   --header | --heade | --head | --hea )
16083     $ac_shift
16084     case $ac_optarg in
16085     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16086     esac
16087     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16088     ac_need_defaults=false;;
16089   --he | --h)
16090     # Conflict between --help and --header
16091     as_fn_error $? "ambiguous option: \`$1'
16092 Try \`$0 --help' for more information.";;
16093   --help | --hel | -h )
16094     $as_echo "$ac_cs_usage"; exit ;;
16095   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16096   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16097     ac_cs_silent=: ;;
16098
16099   # This is an error.
16100   -*) as_fn_error $? "unrecognized option: \`$1'
16101 Try \`$0 --help' for more information." ;;
16102
16103   *) as_fn_append ac_config_targets " $1"
16104      ac_need_defaults=false ;;
16105
16106   esac
16107   shift
16108 done
16109
16110 ac_configure_extra_args=
16111
16112 if $ac_cs_silent; then
16113   exec 6>/dev/null
16114   ac_configure_extra_args="$ac_configure_extra_args --silent"
16115 fi
16116
16117 _ACEOF
16118 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16119 if \$ac_cs_recheck; then
16120   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16121   shift
16122   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16123   CONFIG_SHELL='$SHELL'
16124   export CONFIG_SHELL
16125   exec "\$@"
16126 fi
16127
16128 _ACEOF
16129 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16130 exec 5>>config.log
16131 {
16132   echo
16133   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16134 ## Running $as_me. ##
16135 _ASBOX
16136   $as_echo "$ac_log"
16137 } >&5
16138
16139 _ACEOF
16140 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16141 #
16142 # INIT-COMMANDS
16143 #
16144
16145
16146 _ACEOF
16147
16148 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16149
16150 # Handling of arguments.
16151 for ac_config_target in $ac_config_targets
16152 do
16153   case $ac_config_target in
16154     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
16155     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
16156     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16157     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
16158     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
16159     "driver/xscreensaver.pam") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.pam" ;;
16160     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
16161     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
16162     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
16163     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
16164     "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
16165
16166   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16167   esac
16168 done
16169
16170
16171 # If the user did not use the arguments to specify the items to instantiate,
16172 # then the envvar interface is used.  Set only those that are not.
16173 # We use the long form for the default assignment because of an extremely
16174 # bizarre bug on SunOS 4.1.3.
16175 if $ac_need_defaults; then
16176   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16177   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16178   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16179 fi
16180
16181 # Have a temporary directory for convenience.  Make it in the build tree
16182 # simply because there is no reason against having it here, and in addition,
16183 # creating and moving files from /tmp can sometimes cause problems.
16184 # Hook for its removal unless debugging.
16185 # Note that there is a small window in which the directory will not be cleaned:
16186 # after its creation but before its name has been assigned to `$tmp'.
16187 $debug ||
16188 {
16189   tmp= ac_tmp=
16190   trap 'exit_status=$?
16191   : "${ac_tmp:=$tmp}"
16192   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16193 ' 0
16194   trap 'as_fn_exit 1' 1 2 13 15
16195 }
16196 # Create a (secure) tmp directory for tmp files.
16197
16198 {
16199   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16200   test -d "$tmp"
16201 }  ||
16202 {
16203   tmp=./conf$$-$RANDOM
16204   (umask 077 && mkdir "$tmp")
16205 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16206 ac_tmp=$tmp
16207
16208 # Set up the scripts for CONFIG_FILES section.
16209 # No need to generate them if there are no CONFIG_FILES.
16210 # This happens for instance with `./config.status config.h'.
16211 if test -n "$CONFIG_FILES"; then
16212
16213
16214 ac_cr=`echo X | tr X '\015'`
16215 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16216 # But we know of no other shell where ac_cr would be empty at this
16217 # point, so we can use a bashism as a fallback.
16218 if test "x$ac_cr" = x; then
16219   eval ac_cr=\$\'\\r\'
16220 fi
16221 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16222 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16223   ac_cs_awk_cr='\\r'
16224 else
16225   ac_cs_awk_cr=$ac_cr
16226 fi
16227
16228 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16229 _ACEOF
16230
16231
16232 {
16233   echo "cat >conf$$subs.awk <<_ACEOF" &&
16234   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16235   echo "_ACEOF"
16236 } >conf$$subs.sh ||
16237   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16238 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16239 ac_delim='%!_!# '
16240 for ac_last_try in false false false false false :; do
16241   . ./conf$$subs.sh ||
16242     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16243
16244   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16245   if test $ac_delim_n = $ac_delim_num; then
16246     break
16247   elif $ac_last_try; then
16248     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16249   else
16250     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16251   fi
16252 done
16253 rm -f conf$$subs.sh
16254
16255 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16256 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16257 _ACEOF
16258 sed -n '
16259 h
16260 s/^/S["/; s/!.*/"]=/
16261 p
16262 g
16263 s/^[^!]*!//
16264 :repl
16265 t repl
16266 s/'"$ac_delim"'$//
16267 t delim
16268 :nl
16269 h
16270 s/\(.\{148\}\)..*/\1/
16271 t more1
16272 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16273 p
16274 n
16275 b repl
16276 :more1
16277 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16278 p
16279 g
16280 s/.\{148\}//
16281 t nl
16282 :delim
16283 h
16284 s/\(.\{148\}\)..*/\1/
16285 t more2
16286 s/["\\]/\\&/g; s/^/"/; s/$/"/
16287 p
16288 b
16289 :more2
16290 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16291 p
16292 g
16293 s/.\{148\}//
16294 t delim
16295 ' <conf$$subs.awk | sed '
16296 /^[^""]/{
16297   N
16298   s/\n//
16299 }
16300 ' >>$CONFIG_STATUS || ac_write_fail=1
16301 rm -f conf$$subs.awk
16302 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16303 _ACAWK
16304 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16305   for (key in S) S_is_set[key] = 1
16306   FS = "\a"
16307
16308 }
16309 {
16310   line = $ 0
16311   nfields = split(line, field, "@")
16312   substed = 0
16313   len = length(field[1])
16314   for (i = 2; i < nfields; i++) {
16315     key = field[i]
16316     keylen = length(key)
16317     if (S_is_set[key]) {
16318       value = S[key]
16319       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16320       len += length(value) + length(field[++i])
16321       substed = 1
16322     } else
16323       len += 1 + keylen
16324   }
16325
16326   print line
16327 }
16328
16329 _ACAWK
16330 _ACEOF
16331 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16332 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16333   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16334 else
16335   cat
16336 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16337   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16338 _ACEOF
16339
16340 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16341 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16342 # trailing colons and then remove the whole line if VPATH becomes empty
16343 # (actually we leave an empty line to preserve line numbers).
16344 if test "x$srcdir" = x.; then
16345   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16346 h
16347 s///
16348 s/^/:/
16349 s/[      ]*$/:/
16350 s/:\$(srcdir):/:/g
16351 s/:\${srcdir}:/:/g
16352 s/:@srcdir@:/:/g
16353 s/^:*//
16354 s/:*$//
16355 x
16356 s/\(=[   ]*\).*/\1/
16357 G
16358 s/\n//
16359 s/^[^=]*=[       ]*$//
16360 }'
16361 fi
16362
16363 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16364 fi # test -n "$CONFIG_FILES"
16365
16366 # Set up the scripts for CONFIG_HEADERS section.
16367 # No need to generate them if there are no CONFIG_HEADERS.
16368 # This happens for instance with `./config.status Makefile'.
16369 if test -n "$CONFIG_HEADERS"; then
16370 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16371 BEGIN {
16372 _ACEOF
16373
16374 # Transform confdefs.h into an awk script `defines.awk', embedded as
16375 # here-document in config.status, that substitutes the proper values into
16376 # config.h.in to produce config.h.
16377
16378 # Create a delimiter string that does not exist in confdefs.h, to ease
16379 # handling of long lines.
16380 ac_delim='%!_!# '
16381 for ac_last_try in false false :; do
16382   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16383   if test -z "$ac_tt"; then
16384     break
16385   elif $ac_last_try; then
16386     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16387   else
16388     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16389   fi
16390 done
16391
16392 # For the awk script, D is an array of macro values keyed by name,
16393 # likewise P contains macro parameters if any.  Preserve backslash
16394 # newline sequences.
16395
16396 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16397 sed -n '
16398 s/.\{148\}/&'"$ac_delim"'/g
16399 t rset
16400 :rset
16401 s/^[     ]*#[    ]*define[       ][      ]*/ /
16402 t def
16403 d
16404 :def
16405 s/\\$//
16406 t bsnl
16407 s/["\\]/\\&/g
16408 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16409 D["\1"]=" \3"/p
16410 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16411 d
16412 :bsnl
16413 s/["\\]/\\&/g
16414 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16415 D["\1"]=" \3\\\\\\n"\\/p
16416 t cont
16417 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16418 t cont
16419 d
16420 :cont
16421 n
16422 s/.\{148\}/&'"$ac_delim"'/g
16423 t clear
16424 :clear
16425 s/\\$//
16426 t bsnlc
16427 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16428 d
16429 :bsnlc
16430 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16431 b cont
16432 ' <confdefs.h | sed '
16433 s/'"$ac_delim"'/"\\\
16434 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16435
16436 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16437   for (key in D) D_is_set[key] = 1
16438   FS = "\a"
16439 }
16440 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16441   line = \$ 0
16442   split(line, arg, " ")
16443   if (arg[1] == "#") {
16444     defundef = arg[2]
16445     mac1 = arg[3]
16446   } else {
16447     defundef = substr(arg[1], 2)
16448     mac1 = arg[2]
16449   }
16450   split(mac1, mac2, "(") #)
16451   macro = mac2[1]
16452   prefix = substr(line, 1, index(line, defundef) - 1)
16453   if (D_is_set[macro]) {
16454     # Preserve the white space surrounding the "#".
16455     print prefix "define", macro P[macro] D[macro]
16456     next
16457   } else {
16458     # Replace #undef with comments.  This is necessary, for example,
16459     # in the case of _POSIX_SOURCE, which is predefined and required
16460     # on some systems where configure will not decide to define it.
16461     if (defundef == "undef") {
16462       print "/*", prefix defundef, macro, "*/"
16463       next
16464     }
16465   }
16466 }
16467 { print }
16468 _ACAWK
16469 _ACEOF
16470 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16471   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16472 fi # test -n "$CONFIG_HEADERS"
16473
16474
16475 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
16476 shift
16477 for ac_tag
16478 do
16479   case $ac_tag in
16480   :[FHLC]) ac_mode=$ac_tag; continue;;
16481   esac
16482   case $ac_mode$ac_tag in
16483   :[FHL]*:*);;
16484   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16485   :[FH]-) ac_tag=-:-;;
16486   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16487   esac
16488   ac_save_IFS=$IFS
16489   IFS=:
16490   set x $ac_tag
16491   IFS=$ac_save_IFS
16492   shift
16493   ac_file=$1
16494   shift
16495
16496   case $ac_mode in
16497   :L) ac_source=$1;;
16498   :[FH])
16499     ac_file_inputs=
16500     for ac_f
16501     do
16502       case $ac_f in
16503       -) ac_f="$ac_tmp/stdin";;
16504       *) # Look for the file first in the build tree, then in the source tree
16505          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16506          # because $ac_f cannot contain `:'.
16507          test -f "$ac_f" ||
16508            case $ac_f in
16509            [\\/$]*) false;;
16510            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16511            esac ||
16512            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16513       esac
16514       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16515       as_fn_append ac_file_inputs " '$ac_f'"
16516     done
16517
16518     # Let's still pretend it is `configure' which instantiates (i.e., don't
16519     # use $as_me), people would be surprised to read:
16520     #    /* config.h.  Generated by config.status.  */
16521     configure_input='Generated from '`
16522           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16523         `' by configure.'
16524     if test x"$ac_file" != x-; then
16525       configure_input="$ac_file.  $configure_input"
16526       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16527 $as_echo "$as_me: creating $ac_file" >&6;}
16528     fi
16529     # Neutralize special characters interpreted by sed in replacement strings.
16530     case $configure_input in #(
16531     *\&* | *\|* | *\\* )
16532        ac_sed_conf_input=`$as_echo "$configure_input" |
16533        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16534     *) ac_sed_conf_input=$configure_input;;
16535     esac
16536
16537     case $ac_tag in
16538     *:-:* | *:-) cat >"$ac_tmp/stdin" \
16539       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16540     esac
16541     ;;
16542   esac
16543
16544   ac_dir=`$as_dirname -- "$ac_file" ||
16545 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16546          X"$ac_file" : 'X\(//\)[^/]' \| \
16547          X"$ac_file" : 'X\(//\)$' \| \
16548          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16549 $as_echo X"$ac_file" |
16550     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16551             s//\1/
16552             q
16553           }
16554           /^X\(\/\/\)[^/].*/{
16555             s//\1/
16556             q
16557           }
16558           /^X\(\/\/\)$/{
16559             s//\1/
16560             q
16561           }
16562           /^X\(\/\).*/{
16563             s//\1/
16564             q
16565           }
16566           s/.*/./; q'`
16567   as_dir="$ac_dir"; as_fn_mkdir_p
16568   ac_builddir=.
16569
16570 case "$ac_dir" in
16571 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16572 *)
16573   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16574   # A ".." for each directory in $ac_dir_suffix.
16575   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16576   case $ac_top_builddir_sub in
16577   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16578   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16579   esac ;;
16580 esac
16581 ac_abs_top_builddir=$ac_pwd
16582 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16583 # for backward compatibility:
16584 ac_top_builddir=$ac_top_build_prefix
16585
16586 case $srcdir in
16587   .)  # We are building in place.
16588     ac_srcdir=.
16589     ac_top_srcdir=$ac_top_builddir_sub
16590     ac_abs_top_srcdir=$ac_pwd ;;
16591   [\\/]* | ?:[\\/]* )  # Absolute name.
16592     ac_srcdir=$srcdir$ac_dir_suffix;
16593     ac_top_srcdir=$srcdir
16594     ac_abs_top_srcdir=$srcdir ;;
16595   *) # Relative name.
16596     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16597     ac_top_srcdir=$ac_top_build_prefix$srcdir
16598     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16599 esac
16600 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16601
16602
16603   case $ac_mode in
16604   :F)
16605   #
16606   # CONFIG_FILE
16607   #
16608
16609   case $INSTALL in
16610   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16611   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16612   esac
16613 _ACEOF
16614
16615 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16616 # If the template does not know about datarootdir, expand it.
16617 # FIXME: This hack should be removed a few years after 2.60.
16618 ac_datarootdir_hack=; ac_datarootdir_seen=
16619 ac_sed_dataroot='
16620 /datarootdir/ {
16621   p
16622   q
16623 }
16624 /@datadir@/p
16625 /@docdir@/p
16626 /@infodir@/p
16627 /@localedir@/p
16628 /@mandir@/p'
16629 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16630 *datarootdir*) ac_datarootdir_seen=yes;;
16631 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16632   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16633 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16634 _ACEOF
16635 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16636   ac_datarootdir_hack='
16637   s&@datadir@&$datadir&g
16638   s&@docdir@&$docdir&g
16639   s&@infodir@&$infodir&g
16640   s&@localedir@&$localedir&g
16641   s&@mandir@&$mandir&g
16642   s&\\\${datarootdir}&$datarootdir&g' ;;
16643 esac
16644 _ACEOF
16645
16646 # Neutralize VPATH when `$srcdir' = `.'.
16647 # Shell code in configure.ac might set extrasub.
16648 # FIXME: do we really want to maintain this feature?
16649 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16650 ac_sed_extra="$ac_vpsub
16651 $extrasub
16652 _ACEOF
16653 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16654 :t
16655 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16656 s|@configure_input@|$ac_sed_conf_input|;t t
16657 s&@top_builddir@&$ac_top_builddir_sub&;t t
16658 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16659 s&@srcdir@&$ac_srcdir&;t t
16660 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16661 s&@top_srcdir@&$ac_top_srcdir&;t t
16662 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16663 s&@builddir@&$ac_builddir&;t t
16664 s&@abs_builddir@&$ac_abs_builddir&;t t
16665 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16666 s&@INSTALL@&$ac_INSTALL&;t t
16667 $ac_datarootdir_hack
16668 "
16669 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16670   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16671
16672 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16673   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16674   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16675       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16676   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16677 which seems to be undefined.  Please make sure it is defined" >&5
16678 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16679 which seems to be undefined.  Please make sure it is defined" >&2;}
16680
16681   rm -f "$ac_tmp/stdin"
16682   case $ac_file in
16683   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16684   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16685   esac \
16686   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16687  ;;
16688   :H)
16689   #
16690   # CONFIG_HEADER
16691   #
16692   if test x"$ac_file" != x-; then
16693     {
16694       $as_echo "/* $configure_input  */" \
16695       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16696     } >"$ac_tmp/config.h" \
16697       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16698     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16699       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16700 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16701     else
16702       rm -f "$ac_file"
16703       mv "$ac_tmp/config.h" "$ac_file" \
16704         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16705     fi
16706   else
16707     $as_echo "/* $configure_input  */" \
16708       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16709       || as_fn_error $? "could not create -" "$LINENO" 5
16710   fi
16711  ;;
16712
16713   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16714 $as_echo "$as_me: executing $ac_file commands" >&6;}
16715  ;;
16716   esac
16717
16718
16719   case $ac_file$ac_mode in
16720     "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
16721         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
16722       esac ;;
16723     "po/stamp-it":C)
16724     if  ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
16725        as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5
16726     fi
16727     rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
16728     >"po/stamp-it.tmp"
16729     sed '/^#/d
16730          s/^[[].*] *//
16731          /^[    ]*$/d
16732         '"s|^|  $ac_top_srcdir/|" \
16733       "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
16734
16735     sed '/^POTFILES =/,/[^\\]$/ {
16736                 /^POTFILES =/!d
16737                 r po/POTFILES
16738           }
16739          ' "po/Makefile.in" >"po/Makefile"
16740     rm -f "po/Makefile.tmp"
16741     mv "po/stamp-it.tmp" "po/stamp-it"
16742    ;;
16743
16744   esac
16745 done # for ac_tag
16746
16747
16748 as_fn_exit 0
16749 _ACEOF
16750 ac_clean_files=$ac_clean_files_save
16751
16752 test $ac_write_fail = 0 ||
16753   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16754
16755
16756 # configure is writing to config.log, and then calls config.status.
16757 # config.status does its own redirection, appending to config.log.
16758 # Unfortunately, on DOS this fails, as config.log is still kept open
16759 # by configure, so config.status won't be able to write to it; its
16760 # output is simply discarded.  So we exec the FD to /dev/null,
16761 # effectively closing config.log, so it can be properly (re)opened and
16762 # appended to by config.status.  When coming back to configure, we
16763 # need to make the FD available again.
16764 if test "$no_create" != yes; then
16765   ac_cs_success=:
16766   ac_config_status_args=
16767   test "$silent" = yes &&
16768     ac_config_status_args="$ac_config_status_args --quiet"
16769   exec 5>/dev/null
16770   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16771   exec 5>>config.log
16772   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16773   # would make configure fail if this is the last instruction.
16774   $ac_cs_success || as_fn_exit 1
16775 fi
16776 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16777   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16778 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16779 fi
16780
16781
16782 ###############################################################################
16783 #
16784 #       Print some warnings at the end.
16785 #
16786 ###############################################################################
16787
16788 warn_prefix_1="    Warning:"
16789 warn_prefix_2="       Note:"
16790 warn_prefix="$warn_prefix_1"
16791
16792 warning=no
16793 warnsep='    #################################################################'
16794
16795 warnpre() {
16796   if test "$warning" = no ; then
16797     echo '' ; echo "$warnsep" ; echo ''
16798     warning=yes
16799   fi
16800 }
16801
16802 warn() {
16803   warnpre
16804   if test "$warning" = long ; then echo '' ; fi
16805   warning=yes
16806   rest="$@"
16807   echo "$warn_prefix $rest"
16808 }
16809
16810 warnL() {
16811   was=$warning
16812   warnpre
16813   warning=yes
16814   if test "$was" != no ; then echo '' ; fi
16815   rest="$@"
16816   echo "$warn_prefix $rest"
16817 }
16818
16819 warn2() {
16820   rest="$@"
16821   echo "             $rest"
16822   warning=long
16823 }
16824
16825 note() {
16826   warn_prefix="$warn_prefix_2"
16827   warn $@
16828   warn_prefix="$warn_prefix_1"
16829 }
16830
16831 noteL() {
16832   warn_prefix="$warn_prefix_2"
16833   warnL $@
16834   warn_prefix="$warn_prefix_1"
16835 }
16836
16837
16838 # ac_prog_cc_no_pthread normally only happens on AIX, because according
16839 # to AX_PTHREAD, AIX needs CC=xlc_r or CC=cc_r to do threads.
16840 # If CC is specified, it takes precedence over --with-pthread.
16841 if test "$ac_prog_cc_no_pthread" ; then
16842   warnL "You requested $ac_original_cc for the C compiler, but it doesn't"
16843   warn2 "support POSIX threads."
16844   echo ""
16845   warn2 "If you have multiple CPU cores, try CC=$PTHREAD_CC."
16846 elif test "$with_pthread_req" = yes -a "$have_pthread" = no ; then
16847   warn 'POSIX threads were requested, but were not found.'
16848 fi
16849
16850 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
16851   warn 'The SGI saver extension was requested, but was not found.'
16852 fi
16853
16854 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
16855   warn 'The XIdle extension was requested, but was not found.'
16856 fi
16857
16858 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
16859   warn 'The XSHM extension was requested, but was not found.'
16860 fi
16861
16862 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
16863   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
16864 fi
16865
16866 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
16867   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
16868 fi
16869
16870 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
16871   warn 'The DPMS extension was requested, but was not found.'
16872 fi
16873
16874 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
16875   warn 'The Xinerama extension was requested, but was not found.'
16876 fi
16877
16878 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
16879   warn 'The XF86VMODE extension was requested, but was not found.'
16880 fi
16881
16882 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
16883   warn 'The RANDR extension was requested, but was not found.'
16884 fi
16885
16886 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
16887   warn "Checking of /proc/interrupts was requested, but it's bogus."
16888 fi
16889
16890 if test "$pkg_config" = false ; then
16891   warnL 'The "pkg-config" program was not found.  Without that,'
16892   warn2 "detection of the various GTK libraries won't work."
16893 else
16894   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
16895   if test "x$pkgerr" != "x" ; then
16896     warnL 'The "pkg-config" program produces errors.  This often causes'
16897     warn2 "detection of the various GTK libraries to malfunction."
16898     warn2 "The errors are:"
16899     echo ''
16900     echo "$pkgerr" | sed 's/^/             > /g'
16901   fi
16902 fi
16903
16904 if test "$gtk_halfassed" != no ; then
16905   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
16906   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
16907   warn2 "Perhaps some of the development packages are not installed?"
16908   if test "$have_gtk" = yes ; then
16909     v="$ac_gtk_version_string"
16910     warn2 "GTK $v is also installed, so it will be used instead."
16911     warn2 "Please read the above output and the \`config.log' file"
16912     warn2 "for more details."
16913   fi
16914 fi
16915
16916 motif_warn2() {
16917   warn2 'Though the Motif front-end to xscreensaver is still'
16918   warn2 'maintained, it is no longer being updated with new'
16919   warn2 'features: all new development on the xscreensaver-demo'
16920   warn2 'program is happening in the GTK version, and not in the'
16921   warn2 'Motif version.  It is recommended that you build against'
16922   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
16923 }
16924
16925 if test "$have_motif" = no -a "$have_gtk" = no; then
16926
16927   if test "$with_motif" = yes; then
16928     warnL "Neither the GTK nor Motif libraries were found; the"
16929     warn2 "\`xscreensaver-demo' program requires one of these."
16930     echo ''
16931     motif_warn2
16932   else
16933     warnL "The GTK libraries do not seem to be available; the"
16934     warn2 "\`xscreensaver-demo' program requires them."
16935 #   echo ''
16936 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
16937 #   warn2 "\`--with-motif' option) but that is NOT recommended."
16938 #   motif_warn2
16939   fi
16940
16941 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
16942   warnL "Use of Motif was requested, but it wasn't found;"
16943   warn2 "Gtk will be used instead."
16944
16945 elif test "$jurassic_gtk" = yes ; then
16946
16947   pref_gtk=2.0
16948
16949   v="$ac_gtk_version_string"
16950   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
16951     warnL "Use of Gtk was requested, but its version number is unknown;"
16952   elif test "$with_gtk_req" = yes ; then
16953     warnL "Use of Gtk was requested, but it is version $v;"
16954   else
16955     warnL "Gtk was found on this system, but it is version $v;"
16956   fi
16957
16958   warn2 "Gtk $pref_gtk or newer is required."
16959
16960 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
16961   warnL "Use of Gtk was requested, but it wasn't found."
16962 fi
16963
16964
16965 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
16966   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
16967   warn2 "headers were not found.  That can't be good.  Please"
16968   warn2 "install the GDK-Pixbuf development kit and re-configure."
16969 fi
16970
16971 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
16972
16973   preferred_lesstif=0.92
16974
16975   if test "$lesstif_version" = unknown; then
16976     warnL "Unable to determine the LessTif version number!"
16977     warn2 "Make sure you are using version $preferred_lesstif or newer."
16978     warn2 "See <http://www.lesstif.org/>."
16979
16980   elif test \! $lesstif_version -gt 82; then
16981     warnL "LessTif version $lesstif_version_string is being used."
16982     warn2 "LessTif versions 0.82 and earlier are too buggy to"
16983     warn2 "use with XScreenSaver; it is strongly recommended"
16984     warn2 "that you upgrade to at least version $preferred_lesstif!"
16985     warn2 "See <http://www.lesstif.org/>."
16986   fi
16987 fi
16988
16989
16990 if test "$have_motif" = yes -a "$have_gtk" = no ; then
16991   warn  'Motif is being used, and GTK is not.'
16992   echo  ''
16993   motif_warn2
16994 fi
16995
16996
16997 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
16998   warnL 'Use of XPM was requested, but it was not found.'
16999 fi
17000
17001 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
17002   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
17003 fi
17004
17005 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
17006    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
17007
17008   if test "$with_gdk_pixbuf_req" = yes ; then
17009     true
17010   elif test "$with_gdk_pixbuf_req" = no ; then
17011     warnL 'The GDK-Pixbuf library is not being used.'
17012   else
17013     warnL 'The GDK-Pixbuf library was not found.'
17014   fi
17015
17016   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
17017     true
17018   elif test "$with_xpm_req" = no ; then
17019     warnL 'The XPM library is not being used.'
17020   else
17021     warnL 'The XPM library was not found.'
17022   fi
17023
17024   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
17025     warn2 'The XPM library is being used instead.'
17026   fi
17027
17028   if test "$gdk_pixbuf_halfassed" = yes ; then
17029     echo ''
17030     warn2 'More specifically, we found the headers, but not the'
17031     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
17032     warn2 "system, or something else went wrong.  The \`config.log'"
17033     warn2 'file might contain some clues.'
17034   fi
17035
17036   echo ''
17037   warn2 'Some of the demos will not use images as much as they could.'
17038   warn2 'You should consider installing GDK-Pixbuf and re-running'
17039   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
17040   warn2 'provides support for more image formats.)'
17041 fi
17042
17043
17044 if test "$have_jpeg" = no ; then
17045   if test "$with_jpeg_req" = yes ; then
17046     warnL 'Use of libjpeg was requested, but it was not found.'
17047   elif test "$with_jpeg_req" = no ; then
17048     noteL 'The JPEG library is not being used.'
17049   else
17050     noteL 'The JPEG library was not found.'
17051   fi
17052
17053   if test "$jpeg_halfassed" = yes ; then
17054     echo ''
17055     warn2 'More specifically, we found the headers, but not the'
17056     warn2 'library; so either JPEG is half-installed on this'
17057     warn2 "system, or something else went wrong.  The \`config.log'"
17058     warn2 'file might contain some clues.'
17059     echo ''
17060   fi
17061
17062   if test "$have_gdk_pixbuf" = no ; then
17063     warn2 "This means that it won't be possible for the image-manipulating"
17064     warn2 "display modes to load files from disk; and it also means that"
17065     warn2 "the \`webcollage' program will be much slower."
17066   else
17067     warn2 "This means the \`webcollage' program will be much slower."
17068   fi
17069 fi
17070
17071
17072 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
17073   preferred_mesagl=3.4
17074   mgv="$ac_mesagl_version_string"
17075   pgl="$preferred_mesagl"
17076
17077   if test "$ac_mesagl_version" = unknown; then
17078     true
17079     # warnL "Unable to determine the MesaGL version number!"
17080     # warn2 "Make sure you are using version $preferred_mesagl or newer."
17081
17082   elif test \! "$ac_mesagl_version" -gt 2006; then
17083     warnL "MesaGL version number is $mgv --"
17084     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
17085     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
17086
17087   elif test \! "$ac_mesagl_version" -gt 3003; then
17088     warnL "MesaGL version number is $mgv --"
17089     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
17090     warn2 "that you upgrade to $pgl or newer."
17091   fi
17092 fi
17093
17094 if test "$have_gl" = no ; then
17095   if test "$with_gl_req" = yes ; then
17096     warnL 'Use of GL was requested, but it was not found.'
17097   elif test "$with_gl_req" = no ; then
17098     noteL 'The OpenGL 3D library is not being used.'
17099   else
17100     noteL 'The OpenGL 3D library was not found.'
17101   fi
17102
17103   if test "$gl_halfassed" = yes ; then
17104     echo ''
17105     warn2 'More specifically, we found the headers, but not the'
17106     warn2 'libraries; so either GL is half-installed on this'
17107     warn2 "system, or something else went wrong.  The \`config.log'"
17108     warn2 'file might contain some clues.'
17109   fi
17110
17111   echo ''
17112   warn2 'Those demos which use 3D will not be built or installed.'
17113   warn2 'You might want to consider installing OpenGL and'
17114   warn2 're-running configure.'
17115
17116 fi
17117
17118
17119 if test "$have_gl" = yes -a "$have_gle" = no ; then
17120
17121  # nobody cares about this; don't print the warning unless it was
17122  # requested and not found, or halfway-found.
17123  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
17124
17125   if test "$with_gle_req" = yes ; then
17126     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
17127     warn2 'it was not found (though the OpenGL library was found, and'
17128     warn2 'is being used.)'
17129   elif test "$with_gle_req" = no ; then
17130     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
17131     warn2 'library is not.'
17132   else
17133     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
17134     warn2 'library was not.'
17135   fi
17136
17137   if test "$gle_halfassed" = yes ; then
17138     echo ''
17139     warn2 'More specifically, we found the headers, but not the'
17140     warn2 'libraries; so either GLE is half-installed on this'
17141     warn2 "system, or something else went wrong.  The \`config.log'"
17142     warn2 'file might contain some clues.'
17143   fi
17144
17145   echo ''
17146   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
17147   warn2 'will not be built or installed.  You might want to consider'
17148   warn2 'installing GLE and re-running configure.  You can find the'
17149   warn2 'GLE library at <http://www.linas.org/gle/>'
17150
17151  fi
17152 fi
17153
17154
17155 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
17156   warn 'Use of XReadDisplay was requested, but it was not found.'
17157 fi
17158
17159 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
17160   warn 'Use of Kerberos was requested, but it was not found.'
17161 fi
17162
17163 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
17164   warn 'Use of PAM was requested, but it was not found.'
17165 fi
17166
17167 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
17168   warn 'Use of shadow passwords was requested, but they were not found.'
17169 fi
17170
17171 if test "$ac_macosx" = yes ; then
17172   if test "$enable_locking" = yes ; then
17173     warn  "You have specified --enable-locking on MacOS X."
17174     warn2 "THIS DOES NOT WORK!  Don't do this!"
17175   fi
17176 fi
17177
17178
17179 # You are in a twisty maze of namespaces and syntaxes, all alike.
17180 # Fuck the skull of Unix.
17181 #
17182 bindir=`eval eval eval eval eval eval eval echo $bindir`
17183 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
17184 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
17185
17186 # canonicalize slashes.
17187 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
17188 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
17189 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
17190
17191
17192 # Sanity check the hackdir
17193 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
17194   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
17195     echo ""
17196     as_fn_error $? "\"--with-hackdir=${bindir}/${bad_choice}\" won't work.
17197                    There will be an executable installed with that name, so
17198                    that can't be the name of a directory as well.  Please
17199                    re-configure with a different directory name." "$LINENO" 5
17200   fi
17201 done
17202
17203
17204 do_dir_warning=no
17205
17206 # Now let's warn if there's a previous RPM version already installed.
17207 # But don't bother with this test if we are currently *building* an RPM.
17208
17209 if test -z "$RPM_PACKAGE_VERSION" ; then
17210
17211   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
17212
17213   # M4 sucks!!
17214
17215   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
17216         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
17217         head -1`
17218
17219
17220   if test \! -z "$rpmv" ; then
17221     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
17222     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
17223
17224     warning=no
17225     warnL "There is already an installed RPM of xscreensaver $rpmv"
17226     warn2 'on this system.  You might want to remove it ("rpm -ve")'
17227     warn2 'before running "make install" in this directory.'
17228     echo ""
17229     warn2 "Alternately, you could build this version of xscreensaver"
17230     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
17231     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
17232     warn2 "See the RPM documentation for more info."
17233     echo ""
17234
17235     if test "$rpmbdir" = "$rpmhdir" ; then
17236       warn2 "The RPM version was installed in $rpmbdir/."
17237       do_dir_warning=yes
17238     else
17239       warn2 "The RPM version was installed in $rpmbdir/,"
17240       warn2 "with demos in $rpmhdir/."
17241     fi
17242   fi
17243 fi
17244
17245 # Also warn if there's a Debian package installed.
17246 #
17247 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
17248 debv=''
17249 for dpkg in $debnames ; do
17250   if test -z "$debv"; then
17251     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
17252   fi
17253 done
17254
17255 if test \! -z "$debv" ; then
17256   debbdir=`dpkg -L $debnames 2>/dev/null | \
17257             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
17258   debhdir=`dpkg -L $debnames 2>/dev/null | \
17259             sed -n 's@^\(.*/\)popsquares$@\1@p'`
17260   if test -z "$debbdir" ; then debbdir='???'; fi
17261   if test -z "$debhdir" ; then debhdir='???'; fi
17262
17263   warning=no
17264   warnL "There is already an installed dpkg of xscreensaver"
17265   warn2 "version \"$debv\" on this system."
17266   echo ""
17267   warn2 "The dpkg was installed in $debbdir,"
17268   warn2 "with demos in $debhdir."
17269 fi
17270
17271
17272 if test "${bindir}" = "${HACKDIR}" ; then
17273   do_dir_warning=yes
17274 fi
17275
17276 if test "$do_dir_warning" = yes; then
17277   echo ""
17278   echo "$warnsep"
17279   echo ""
17280   echo '      When you run "make install", the "xscreensaver",'
17281   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
17282   echo "      will be installed in ${bindir}/."
17283   echo ""
17284   echo "      The various graphics demos (200+ different executables) will"
17285   echo "      be installed in ${HACKDIR}/."
17286   echo ""
17287   echo "      If you would prefer the demos to be installed elsewhere,"
17288   echo "      you should re-run configure with the --with-hackdir=DIR"
17289   echo "      option.  For more information, run \`./configure --help'."
17290   warning=yes
17291 fi
17292
17293 if test "$warning" != no; then
17294   echo '' ; echo "$warnsep" ; echo ''
17295 fi
17296
17297 if test "$do_dir_warning" = no; then
17298   if test "$warning" = no; then
17299     echo ''
17300   fi
17301   echo "User programs will be installed in ${bindir}/"
17302   echo "Screen savers will be installed in ${HACKDIR}/"
17303   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
17304   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
17305   echo ''
17306 fi