From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18   emulate sh
19   NULLCMD=:
20   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23   setopt NO_GLOB_SUBST
24 else
25   case `(set -o) 2>/dev/null` in #(
26   *posix*) :
27     set -o posix ;; #(
28   *) :
29      ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45   as_echo='print -r --'
46   as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48   as_echo='printf %s\n'
49   as_echo_n='printf %s'
50 else
51   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53     as_echo_n='/usr/ucb/echo -n'
54   else
55     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56     as_echo_n_body='eval
57       arg=$1;
58       case $arg in #(
59       *"$as_nl"*)
60         expr "X$arg" : "X\\(.*\\)$as_nl";
61         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62       esac;
63       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64     '
65     export as_echo_n_body
66     as_echo_n='sh -c $as_echo_n_body as_echo'
67   fi
68   export as_echo_body
69   as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74   PATH_SEPARATOR=:
75   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77       PATH_SEPARATOR=';'
78   }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order.  Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" ""        $as_nl"
88
89 # Find who we are.  Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92   *[\\/]* ) as_myself=$0 ;;
93   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96   IFS=$as_save_IFS
97   test -z "$as_dir" && as_dir=.
98     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99   done
100 IFS=$as_save_IFS
101
102      ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107   as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111   exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there.  '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136   # into an infinite loop, continuously re-executing ourselves.
137   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138     _as_can_reexec=no; export _as_can_reexec;
139     # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147   *v*x* | *x*v* ) as_opts=-vx ;;
148   *v* ) as_opts=-v ;;
149   *x* ) as_opts=-x ;;
150   * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157   fi
158   # We don't want this to propagate to other subprocesses.
159           { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162   emulate sh
163   NULLCMD=:
164   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165   # is contrary to our usage.  Disable this feature.
166   alias -g '\${1+\"\$@\"}'='\"\$@\"'
167   setopt NO_GLOB_SUBST
168 else
169   case \`(set -o) 2>/dev/null\` in #(
170   *posix*) :
171     set -o posix ;; #(
172   *) :
173      ;;
174 esac
175 fi
176 "
177   as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191   exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200   if (eval "$as_required") 2>/dev/null; then :
201   as_have_required=yes
202 else
203   as_have_required=no
204 fi
205   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212   IFS=$as_save_IFS
213   test -z "$as_dir" && as_dir=.
214   as_found=:
215   case $as_dir in #(
216          /*)
217            for as_base in sh bash ksh sh5; do
218              # Try only shells that exist, to save several forks.
219              as_shell=$as_dir/$as_base
220              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222   CONFIG_SHELL=$as_shell as_have_required=yes
223                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224   break 2
225 fi
226 fi
227            done;;
228        esac
229   as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233   CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238       if test "x$CONFIG_SHELL" != x; then :
239   export CONFIG_SHELL
240              # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248   *v*x* | *x*v* ) as_opts=-vx ;;
249   *v* ) as_opts=-v ;;
250   *x* ) as_opts=-x ;;
251   * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260     if test x$as_have_required = xno; then :
261   $as_echo "$0: This script requires a shell more modern than all"
262   $as_echo "$0: the shells that I found on your system."
263   if test x${ZSH_VERSION+set} = xset ; then
264     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266   else
267     $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271   fi
272   exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290   { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299   return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307   set +e
308   as_fn_set_status $1
309   exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318   case $as_dir in #(
319   -*) as_dir=./$as_dir;;
320   esac
321   test -d "$as_dir" || eval $as_mkdir_p || {
322     as_dirs=
323     while :; do
324       case $as_dir in #(
325       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326       *) as_qdir=$as_dir;;
327       esac
328       as_dirs="'$as_qdir' $as_dirs"
329       as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331          X"$as_dir" : 'X\(//\)[^/]' \| \
332          X"$as_dir" : 'X\(//\)$' \| \
333          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336             s//\1/
337             q
338           }
339           /^X\(\/\/\)[^/].*/{
340             s//\1/
341             q
342           }
343           /^X\(\/\/\)$/{
344             s//\1/
345             q
346           }
347           /^X\(\/\).*/{
348             s//\1/
349             q
350           }
351           s/.*/./; q'`
352       test -d "$as_dir" && break
353     done
354     test -z "$as_dirs" || eval "mkdir $as_dirs"
355   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365   test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374   eval 'as_fn_append ()
375   {
376     eval $1+=\$2
377   }'
378 else
379   as_fn_append ()
380   {
381     eval $1=\$$1\$2
382   }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391   eval 'as_fn_arith ()
392   {
393     as_val=$(( $* ))
394   }'
395 else
396   as_fn_arith ()
397   {
398     as_val=`expr "$@" || test $? -eq 1`
399   }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410   as_status=$1; test $as_status -eq 0 && as_status=1
411   if test "$4"; then
412     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414   fi
415   $as_echo "$as_me: error: $2" >&2
416   as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420    test "X`expr 00001 : '.*\(...\)'`" = X001; then
421   as_expr=expr
422 else
423   as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427   as_basename=basename
428 else
429   as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433   as_dirname=dirname
434 else
435   as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440          X"$0" : 'X\(//\)$' \| \
441          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443     sed '/^.*\/\([^/][^/]*\)\/*$/{
444             s//\1/
445             q
446           }
447           /^X\/\(\/\/\)$/{
448             s//\1/
449             q
450           }
451           /^X\/\(\/\).*/{
452             s//\1/
453             q
454           }
455           s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465   as_lineno_1=$LINENO as_lineno_1a=$LINENO
466   as_lineno_2=$LINENO as_lineno_2a=$LINENO
467   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470   sed -n '
471     p
472     /[$]LINENO/=
473   ' <$as_myself |
474     sed '
475       s/[$]LINENO.*/&-/
476       t lineno
477       b
478       :lineno
479       N
480       :loop
481       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482       t loop
483       s/-\n.*//
484     ' >$as_me.lineno &&
485   chmod +x "$as_me.lineno" ||
486     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489   # already done that, so ensure we don't try to do so again and fall
490   # in an infinite loop.  This has already happened in practice.
491   _as_can_reexec=no; export _as_can_reexec
492   # Don't try to exec as it changes $[0], causing all sort of problems
493   # (the dirname of $[0] is not the place where we might find the
494   # original and so on.  Autoconf is especially sensitive to this).
495   . "./$as_me.lineno"
496   # Exit status is that of the last command.
497   exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503   case `echo 'xy\c'` in
504   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
505   xy)  ECHO_C='\c';;
506   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507        ECHO_T=' ';;
508   esac;;
509 *)
510   ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515   rm -f conf$$.dir/conf$$.file
516 else
517   rm -f conf$$.dir
518   mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521   if ln -s conf$$.file conf$$ 2>/dev/null; then
522     as_ln_s='ln -s'
523     # ... but there are two gotchas:
524     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526     # In both cases, we have to default to `cp -pR'.
527     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528       as_ln_s='cp -pR'
529   elif ln conf$$.file conf$$ 2>/dev/null; then
530     as_ln_s=ln
531   else
532     as_ln_s='cp -pR'
533   fi
534 else
535   as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541   as_mkdir_p='mkdir -p "$as_dir"'
542 else
543   test -d ./-p && rmdir ./-p
544   as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="driver/subprocs.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 #  include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 #  include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 ac_subst_vars='LTLIBOBJS
623 LIBOBJS
624 DEPEND_DEFINES
625 DEPEND_FLAGS
626 DEPEND
627 APPDEFAULTS
628 ANIM_LIBS
629 ANIM_OBJS
630 GTK_EXTRA_OBJS
631 HACK_CONF_DIR
632 PO_DATADIR
633 GTK_DATADIR
634 HACKDIR_FULL
635 HACKDIR
636 NOGNOME
637 GNOME22
638 GNOME24
639 JWZGLES_OBJS
640 GLE_KLUDGE
641 GLE_EXES
642 GL_KLUDGE
643 GL_MEN
644 GL_UTIL_EXES
645 SUID_EXES
646 RETIRED_GL_EXES
647 GL_EXES
648 JPEG_EXES
649 LOCK_OBJS
650 LOCK_SRCS
651 SAVER_GL_LIBS
652 SAVER_GL_OBJS
653 SAVER_GL_SRCS
654 XFT_LIBS
655 XFT_OBJS
656 XFT_SRCS
657 XMU_LIBS
658 XMU_OBJS
659 XMU_SRCS
660 PASSWD_OBJS
661 PASSWD_SRCS
662 MEN_OSX
663 SCRIPTS_OSX
664 EXES_OSX
665 OBJCC
666 COMMENT_DEMO_GLADE2_GTK_2_22_TAIL
667 COMMENT_DEMO_GLADE2_GTK_2_22_HEAD
668 WITH_BROWSER
669 DEFAULT_TEXT_FILE
670 DEFAULT_IMAGE_DIRECTORY
671 DEFAULT_IMAGES_P
672 NEW_LOGIN_COMMAND_P
673 NEW_LOGIN_COMMAND
674 COMMENT_PAM_CHECK_ACCOUNT
675 HAVE_PAM_FAIL_DELAY
676 INSTALL_PAM
677 NEED_SETUID
678 INSTALL_DIRS
679 SETUID_HACKS
680 INSTALL_SETUID
681 PASSWD_LIBS
682 XINERAMA_LIBS
683 XDPMS_LIBS
684 GLE_LIBS
685 GL_LIBS
686 PTY_LIBS
687 XPM_LIBS
688 HACK_LIBS
689 JPEG_LIBS
690 XML_LIBS
691 GTK_LIBS
692 MOTIF_LIBS
693 SAVER_LIBS
694 ALL_DEMO_PROGRAMS
695 PREFERRED_DEMO_PROGRAM
696 INCLUDES
697 gnome_url_show_program
698 gnome_open_program
699 pkg_config
700 login_manager_tmp
701 MKINSTALLDIRS
702 POSUB
703 POFILES
704 PO_IN_DATADIR_FALSE
705 PO_IN_DATADIR_TRUE
706 INTLLIBS
707 INSTOBJEXT
708 GMOFILES
709 DATADIRNAME
710 CATOBJEXT
711 CATALOGS
712 MSGFMT_OPTS
713 GETTEXT_PACKAGE
714 ALL_LINGUAS
715 GMSGFMT
716 MSGFMT
717 MSGMERGE
718 XGETTEXT
719 INTLTOOL_POLICY_RULE
720 INTLTOOL_SERVICE_RULE
721 INTLTOOL_THEME_RULE
722 INTLTOOL_SCHEMAS_RULE
723 INTLTOOL_CAVES_RULE
724 INTLTOOL_XML_NOMERGE_RULE
725 INTLTOOL_XML_RULE
726 INTLTOOL_KBD_RULE
727 INTLTOOL_XAM_RULE
728 INTLTOOL_UI_RULE
729 INTLTOOL_SOUNDLIST_RULE
730 INTLTOOL_SHEET_RULE
731 INTLTOOL_SERVER_RULE
732 INTLTOOL_PONG_RULE
733 INTLTOOL_OAF_RULE
734 INTLTOOL_PROP_RULE
735 INTLTOOL_KEYS_RULE
736 INTLTOOL_DIRECTORY_RULE
737 INTLTOOL_DESKTOP_RULE
738 intltool__v_merge_options_0
739 intltool__v_merge_options_
740 INTLTOOL_V_MERGE_OPTIONS
741 INTLTOOL__v_MERGE_0
742 INTLTOOL__v_MERGE_
743 INTLTOOL_V_MERGE
744 AM_DEFAULT_VERBOSITY
745 INTLTOOL_EXTRACT
746 INTLTOOL_MERGE
747 INTLTOOL_UPDATE
748 USE_NLS
749 X_EXTRA_LIBS
750 X_LIBS
751 X_PRE_LIBS
752 X_CFLAGS
753 XMKMF
754 PERL
755 EGREP
756 GREP
757 SET_MAKE
758 INSTALL_DATA
759 INSTALL_SCRIPT
760 INSTALL_PROGRAM
761 CPP
762 PTHREAD_CFLAGS
763 PTHREAD_LIBS
764 PTHREAD_CC
765 ax_pthread_config
766 OBJEXT
767 EXEEXT
768 ac_ct_CC
769 CPPFLAGS
770 LDFLAGS
771 CFLAGS
772 CC
773 host_os
774 host_vendor
775 host_cpu
776 host
777 build_os
778 build_vendor
779 build_cpu
780 build
781 target_alias
782 host_alias
783 build_alias
784 LIBS
785 ECHO_T
786 ECHO_N
787 ECHO_C
788 DEFS
789 mandir
790 localedir
791 libdir
792 psdir
793 pdfdir
794 dvidir
795 htmldir
796 infodir
797 docdir
798 oldincludedir
799 includedir
800 localstatedir
801 sharedstatedir
802 sysconfdir
803 datadir
804 datarootdir
805 libexecdir
806 sbindir
807 bindir
808 program_transform_name
809 prefix
810 exec_prefix
811 PACKAGE_URL
812 PACKAGE_BUGREPORT
813 PACKAGE_STRING
814 PACKAGE_VERSION
815 PACKAGE_TARNAME
816 PACKAGE_NAME
817 PATH_SEPARATOR
818 SHELL'
819 ac_subst_files=''
820 ac_user_opts='
821 enable_option_checking
822 with_x_app_defaults
823 with_pthread
824 enable_largefile
825 with_x
826 enable_nls
827 with_hackdir
828 enable_subdir
829 with_configdir
830 with_dpms_ext
831 with_xinerama_ext
832 with_xinput_ext
833 with_xf86vmode_ext
834 with_xf86gamma_ext
835 with_randr_ext
836 with_proc_interrupts
837 enable_locking
838 enable_root_passwd
839 with_pam
840 with_pam_service_name
841 enable_pam_check_account_type
842 with_kerberos
843 with_shadow
844 with_passwd_helper
845 with_login_manager
846 with_gtk
847 with_motif
848 with_gl
849 with_gle
850 with_gles
851 with_pixbuf
852 with_xpm
853 with_jpeg
854 with_xft
855 with_xshm_ext
856 with_xdbe_ext
857 with_readdisplay
858 with_image_directory
859 with_text_file
860 with_browser
861 with_setuid_hacks
862 with_record_animation
863 '
864       ac_precious_vars='build_alias
865 host_alias
866 target_alias
867 CC
868 CFLAGS
869 LDFLAGS
870 LIBS
871 CPPFLAGS
872 CPP
873 XMKMF'
874
875
876 # Initialize some variables set by options.
877 ac_init_help=
878 ac_init_version=false
879 ac_unrecognized_opts=
880 ac_unrecognized_sep=
881 # The variables have the same names as the options, with
882 # dashes changed to underlines.
883 cache_file=/dev/null
884 exec_prefix=NONE
885 no_create=
886 no_recursion=
887 prefix=NONE
888 program_prefix=NONE
889 program_suffix=NONE
890 program_transform_name=s,x,x,
891 silent=
892 site=
893 srcdir=
894 verbose=
895 x_includes=NONE
896 x_libraries=NONE
897
898 # Installation directory options.
899 # These are left unexpanded so users can "make install exec_prefix=/foo"
900 # and all the variables that are supposed to be based on exec_prefix
901 # by default will actually change.
902 # Use braces instead of parens because sh, perl, etc. also accept them.
903 # (The list follows the same order as the GNU Coding Standards.)
904 bindir='${exec_prefix}/bin'
905 sbindir='${exec_prefix}/sbin'
906 libexecdir='${exec_prefix}/libexec'
907 datarootdir='${prefix}/share'
908 datadir='${datarootdir}'
909 sysconfdir='${prefix}/etc'
910 sharedstatedir='${prefix}/com'
911 localstatedir='${prefix}/var'
912 includedir='${prefix}/include'
913 oldincludedir='/usr/include'
914 docdir='${datarootdir}/doc/${PACKAGE}'
915 infodir='${datarootdir}/info'
916 htmldir='${docdir}'
917 dvidir='${docdir}'
918 pdfdir='${docdir}'
919 psdir='${docdir}'
920 libdir='${exec_prefix}/lib'
921 localedir='${datarootdir}/locale'
922 mandir='${datarootdir}/man'
923
924 ac_prev=
925 ac_dashdash=
926 for ac_option
927 do
928   # If the previous option needs an argument, assign it.
929   if test -n "$ac_prev"; then
930     eval $ac_prev=\$ac_option
931     ac_prev=
932     continue
933   fi
934
935   case $ac_option in
936   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
937   *=)   ac_optarg= ;;
938   *)    ac_optarg=yes ;;
939   esac
940
941   # Accept the important Cygnus configure options, so we can diagnose typos.
942
943   case $ac_dashdash$ac_option in
944   --)
945     ac_dashdash=yes ;;
946
947   -bindir | --bindir | --bindi | --bind | --bin | --bi)
948     ac_prev=bindir ;;
949   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
950     bindir=$ac_optarg ;;
951
952   -build | --build | --buil | --bui | --bu)
953     ac_prev=build_alias ;;
954   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
955     build_alias=$ac_optarg ;;
956
957   -cache-file | --cache-file | --cache-fil | --cache-fi \
958   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
959     ac_prev=cache_file ;;
960   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
961   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
962     cache_file=$ac_optarg ;;
963
964   --config-cache | -C)
965     cache_file=config.cache ;;
966
967   -datadir | --datadir | --datadi | --datad)
968     ac_prev=datadir ;;
969   -datadir=* | --datadir=* | --datadi=* | --datad=*)
970     datadir=$ac_optarg ;;
971
972   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
973   | --dataroo | --dataro | --datar)
974     ac_prev=datarootdir ;;
975   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
976   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
977     datarootdir=$ac_optarg ;;
978
979   -disable-* | --disable-*)
980     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
981     # Reject names that are not valid shell variable names.
982     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
983       as_fn_error $? "invalid feature name: $ac_useropt"
984     ac_useropt_orig=$ac_useropt
985     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
986     case $ac_user_opts in
987       *"
988 "enable_$ac_useropt"
989 "*) ;;
990       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
991          ac_unrecognized_sep=', ';;
992     esac
993     eval enable_$ac_useropt=no ;;
994
995   -docdir | --docdir | --docdi | --doc | --do)
996     ac_prev=docdir ;;
997   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
998     docdir=$ac_optarg ;;
999
1000   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1001     ac_prev=dvidir ;;
1002   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1003     dvidir=$ac_optarg ;;
1004
1005   -enable-* | --enable-*)
1006     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1007     # Reject names that are not valid shell variable names.
1008     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1009       as_fn_error $? "invalid feature name: $ac_useropt"
1010     ac_useropt_orig=$ac_useropt
1011     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1012     case $ac_user_opts in
1013       *"
1014 "enable_$ac_useropt"
1015 "*) ;;
1016       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1017          ac_unrecognized_sep=', ';;
1018     esac
1019     eval enable_$ac_useropt=\$ac_optarg ;;
1020
1021   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1022   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1023   | --exec | --exe | --ex)
1024     ac_prev=exec_prefix ;;
1025   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1026   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1027   | --exec=* | --exe=* | --ex=*)
1028     exec_prefix=$ac_optarg ;;
1029
1030   -gas | --gas | --ga | --g)
1031     # Obsolete; use --with-gas.
1032     with_gas=yes ;;
1033
1034   -help | --help | --hel | --he | -h)
1035     ac_init_help=long ;;
1036   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1037     ac_init_help=recursive ;;
1038   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1039     ac_init_help=short ;;
1040
1041   -host | --host | --hos | --ho)
1042     ac_prev=host_alias ;;
1043   -host=* | --host=* | --hos=* | --ho=*)
1044     host_alias=$ac_optarg ;;
1045
1046   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1047     ac_prev=htmldir ;;
1048   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1049   | --ht=*)
1050     htmldir=$ac_optarg ;;
1051
1052   -includedir | --includedir | --includedi | --included | --include \
1053   | --includ | --inclu | --incl | --inc)
1054     ac_prev=includedir ;;
1055   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1056   | --includ=* | --inclu=* | --incl=* | --inc=*)
1057     includedir=$ac_optarg ;;
1058
1059   -infodir | --infodir | --infodi | --infod | --info | --inf)
1060     ac_prev=infodir ;;
1061   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1062     infodir=$ac_optarg ;;
1063
1064   -libdir | --libdir | --libdi | --libd)
1065     ac_prev=libdir ;;
1066   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1067     libdir=$ac_optarg ;;
1068
1069   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1070   | --libexe | --libex | --libe)
1071     ac_prev=libexecdir ;;
1072   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1073   | --libexe=* | --libex=* | --libe=*)
1074     libexecdir=$ac_optarg ;;
1075
1076   -localedir | --localedir | --localedi | --localed | --locale)
1077     ac_prev=localedir ;;
1078   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1079     localedir=$ac_optarg ;;
1080
1081   -localstatedir | --localstatedir | --localstatedi | --localstated \
1082   | --localstate | --localstat | --localsta | --localst | --locals)
1083     ac_prev=localstatedir ;;
1084   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1085   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1086     localstatedir=$ac_optarg ;;
1087
1088   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1089     ac_prev=mandir ;;
1090   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1091     mandir=$ac_optarg ;;
1092
1093   -nfp | --nfp | --nf)
1094     # Obsolete; use --without-fp.
1095     with_fp=no ;;
1096
1097   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1098   | --no-cr | --no-c | -n)
1099     no_create=yes ;;
1100
1101   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1102   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1103     no_recursion=yes ;;
1104
1105   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1106   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1107   | --oldin | --oldi | --old | --ol | --o)
1108     ac_prev=oldincludedir ;;
1109   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1110   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1111   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1112     oldincludedir=$ac_optarg ;;
1113
1114   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1115     ac_prev=prefix ;;
1116   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1117     prefix=$ac_optarg ;;
1118
1119   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1120   | --program-pre | --program-pr | --program-p)
1121     ac_prev=program_prefix ;;
1122   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1123   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1124     program_prefix=$ac_optarg ;;
1125
1126   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1127   | --program-suf | --program-su | --program-s)
1128     ac_prev=program_suffix ;;
1129   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1130   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1131     program_suffix=$ac_optarg ;;
1132
1133   -program-transform-name | --program-transform-name \
1134   | --program-transform-nam | --program-transform-na \
1135   | --program-transform-n | --program-transform- \
1136   | --program-transform | --program-transfor \
1137   | --program-transfo | --program-transf \
1138   | --program-trans | --program-tran \
1139   | --progr-tra | --program-tr | --program-t)
1140     ac_prev=program_transform_name ;;
1141   -program-transform-name=* | --program-transform-name=* \
1142   | --program-transform-nam=* | --program-transform-na=* \
1143   | --program-transform-n=* | --program-transform-=* \
1144   | --program-transform=* | --program-transfor=* \
1145   | --program-transfo=* | --program-transf=* \
1146   | --program-trans=* | --program-tran=* \
1147   | --progr-tra=* | --program-tr=* | --program-t=*)
1148     program_transform_name=$ac_optarg ;;
1149
1150   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1151     ac_prev=pdfdir ;;
1152   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1153     pdfdir=$ac_optarg ;;
1154
1155   -psdir | --psdir | --psdi | --psd | --ps)
1156     ac_prev=psdir ;;
1157   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1158     psdir=$ac_optarg ;;
1159
1160   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1161   | -silent | --silent | --silen | --sile | --sil)
1162     silent=yes ;;
1163
1164   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1165     ac_prev=sbindir ;;
1166   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1167   | --sbi=* | --sb=*)
1168     sbindir=$ac_optarg ;;
1169
1170   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1171   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1172   | --sharedst | --shareds | --shared | --share | --shar \
1173   | --sha | --sh)
1174     ac_prev=sharedstatedir ;;
1175   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1176   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1177   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1178   | --sha=* | --sh=*)
1179     sharedstatedir=$ac_optarg ;;
1180
1181   -site | --site | --sit)
1182     ac_prev=site ;;
1183   -site=* | --site=* | --sit=*)
1184     site=$ac_optarg ;;
1185
1186   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1187     ac_prev=srcdir ;;
1188   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1189     srcdir=$ac_optarg ;;
1190
1191   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1192   | --syscon | --sysco | --sysc | --sys | --sy)
1193     ac_prev=sysconfdir ;;
1194   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1195   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1196     sysconfdir=$ac_optarg ;;
1197
1198   -target | --target | --targe | --targ | --tar | --ta | --t)
1199     ac_prev=target_alias ;;
1200   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1201     target_alias=$ac_optarg ;;
1202
1203   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1204     verbose=yes ;;
1205
1206   -version | --version | --versio | --versi | --vers | -V)
1207     ac_init_version=: ;;
1208
1209   -with-* | --with-*)
1210     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1211     # Reject names that are not valid shell variable names.
1212     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1213       as_fn_error $? "invalid package name: $ac_useropt"
1214     ac_useropt_orig=$ac_useropt
1215     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216     case $ac_user_opts in
1217       *"
1218 "with_$ac_useropt"
1219 "*) ;;
1220       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1221          ac_unrecognized_sep=', ';;
1222     esac
1223     eval with_$ac_useropt=\$ac_optarg ;;
1224
1225   -without-* | --without-*)
1226     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1227     # Reject names that are not valid shell variable names.
1228     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1229       as_fn_error $? "invalid package name: $ac_useropt"
1230     ac_useropt_orig=$ac_useropt
1231     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1232     case $ac_user_opts in
1233       *"
1234 "with_$ac_useropt"
1235 "*) ;;
1236       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1237          ac_unrecognized_sep=', ';;
1238     esac
1239     eval with_$ac_useropt=no ;;
1240
1241   --x)
1242     # Obsolete; use --with-x.
1243     with_x=yes ;;
1244
1245   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1246   | --x-incl | --x-inc | --x-in | --x-i)
1247     ac_prev=x_includes ;;
1248   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1249   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1250     x_includes=$ac_optarg ;;
1251
1252   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1253   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1254     ac_prev=x_libraries ;;
1255   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1256   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1257     x_libraries=$ac_optarg ;;
1258
1259   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1260 Try \`$0 --help' for more information"
1261     ;;
1262
1263   *=*)
1264     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1265     # Reject names that are not valid shell variable names.
1266     case $ac_envvar in #(
1267       '' | [0-9]* | *[!_$as_cr_alnum]* )
1268       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1269     esac
1270     eval $ac_envvar=\$ac_optarg
1271     export $ac_envvar ;;
1272
1273   *)
1274     # FIXME: should be removed in autoconf 3.0.
1275     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1276     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1277       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1278     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1279     ;;
1280
1281   esac
1282 done
1283
1284 if test -n "$ac_prev"; then
1285   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1286   as_fn_error $? "missing argument to $ac_option"
1287 fi
1288
1289 if test -n "$ac_unrecognized_opts"; then
1290   case $enable_option_checking in
1291     no) ;;
1292     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1293     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1294   esac
1295 fi
1296
1297 # Check all directory arguments for consistency.
1298 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1299                 datadir sysconfdir sharedstatedir localstatedir includedir \
1300                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1301                 libdir localedir mandir
1302 do
1303   eval ac_val=\$$ac_var
1304   # Remove trailing slashes.
1305   case $ac_val in
1306     */ )
1307       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1308       eval $ac_var=\$ac_val;;
1309   esac
1310   # Be sure to have absolute directory names.
1311   case $ac_val in
1312     [\\/$]* | ?:[\\/]* )  continue;;
1313     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1314   esac
1315   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1316 done
1317
1318 # There might be people who depend on the old broken behavior: `$host'
1319 # used to hold the argument of --host etc.
1320 # FIXME: To remove some day.
1321 build=$build_alias
1322 host=$host_alias
1323 target=$target_alias
1324
1325 # FIXME: To remove some day.
1326 if test "x$host_alias" != x; then
1327   if test "x$build_alias" = x; then
1328     cross_compiling=maybe
1329   elif test "x$build_alias" != "x$host_alias"; then
1330     cross_compiling=yes
1331   fi
1332 fi
1333
1334 ac_tool_prefix=
1335 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1336
1337 test "$silent" = yes && exec 6>/dev/null
1338
1339
1340 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1341 ac_ls_di=`ls -di .` &&
1342 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1343   as_fn_error $? "working directory cannot be determined"
1344 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1345   as_fn_error $? "pwd does not report name of working directory"
1346
1347
1348 # Find the source files, if location was not specified.
1349 if test -z "$srcdir"; then
1350   ac_srcdir_defaulted=yes
1351   # Try the directory containing this script, then the parent directory.
1352   ac_confdir=`$as_dirname -- "$as_myself" ||
1353 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1354          X"$as_myself" : 'X\(//\)[^/]' \| \
1355          X"$as_myself" : 'X\(//\)$' \| \
1356          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1357 $as_echo X"$as_myself" |
1358     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1359             s//\1/
1360             q
1361           }
1362           /^X\(\/\/\)[^/].*/{
1363             s//\1/
1364             q
1365           }
1366           /^X\(\/\/\)$/{
1367             s//\1/
1368             q
1369           }
1370           /^X\(\/\).*/{
1371             s//\1/
1372             q
1373           }
1374           s/.*/./; q'`
1375   srcdir=$ac_confdir
1376   if test ! -r "$srcdir/$ac_unique_file"; then
1377     srcdir=..
1378   fi
1379 else
1380   ac_srcdir_defaulted=no
1381 fi
1382 if test ! -r "$srcdir/$ac_unique_file"; then
1383   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1384   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1385 fi
1386 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1387 ac_abs_confdir=`(
1388         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1389         pwd)`
1390 # When building in place, set srcdir=.
1391 if test "$ac_abs_confdir" = "$ac_pwd"; then
1392   srcdir=.
1393 fi
1394 # Remove unnecessary trailing slashes from srcdir.
1395 # Double slashes in file names in object file debugging info
1396 # mess up M-x gdb in Emacs.
1397 case $srcdir in
1398 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1399 esac
1400 for ac_var in $ac_precious_vars; do
1401   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1402   eval ac_env_${ac_var}_value=\$${ac_var}
1403   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1404   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1405 done
1406
1407 #
1408 # Report the --help message.
1409 #
1410 if test "$ac_init_help" = "long"; then
1411   # Omit some internal or obsolete options to make the list less imposing.
1412   # This message is too long to be a string in the A/UX 3.1 sh.
1413   cat <<_ACEOF
1414 \`configure' configures this package to adapt to many kinds of systems.
1415
1416 Usage: $0 [OPTION]... [VAR=VALUE]...
1417
1418 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1419 VAR=VALUE.  See below for descriptions of some of the useful variables.
1420
1421 Defaults for the options are specified in brackets.
1422
1423
1424 Configuration:
1425
1426   -h, --help              display this help and exit
1427       --help=short        display options specific to this package
1428       --help=recursive    display the short help of all the included packages
1429   -V, --version           display version information and exit
1430   -q, --quiet, --silent   do not print \`checking ...' messages
1431       --cache-file=FILE   cache test results in FILE [disabled]
1432   -C, --config-cache      alias for \`--cache-file=config.cache'
1433   -n, --no-create         do not create output files
1434       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1435
1436 Installation directories:
1437   --prefix=PREFIX         install architecture-independent files in PREFIX
1438                           [$ac_default_prefix]
1439   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1440                           [PREFIX]
1441
1442 By default, \`make install' will install all the files in
1443 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1444 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1445 for instance \`--prefix=\$HOME'.
1446
1447 For better control, use the options below.
1448
1449 Fine tuning of the installation directories:
1450   --bindir=DIR            user executables [EPREFIX/bin]
1451   --libexecdir=DIR        program executables [EPREFIX/libexec]
1452   --libdir=DIR            object code libraries [EPREFIX/lib]
1453   --includedir=DIR        C header files [PREFIX/include]
1454   --x-includes=DIR        X include files are in DIR
1455   --x-libraries=DIR       X library files are in DIR
1456   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1457   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1458   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1459   --mandir=DIR            man documentation [DATAROOTDIR/man]
1460   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1461   --htmldir=DIR           html documentation [DOCDIR]
1462   --dvidir=DIR            dvi documentation [DOCDIR]
1463   --pdfdir=DIR            pdf documentation [DOCDIR]
1464   --psdir=DIR             ps documentation [DOCDIR]
1465 _ACEOF
1466
1467   cat <<\_ACEOF
1468
1469 X features:
1470   --x-includes=DIR    X include files are in DIR
1471   --x-libraries=DIR   X library files are in DIR
1472
1473 System types:
1474   --build=BUILD     configure for building on BUILD [guessed]
1475   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1476 _ACEOF
1477 fi
1478
1479 if test -n "$ac_init_help"; then
1480
1481   cat <<\_ACEOF
1482
1483 Optional Features:
1484   --disable-option-checking  ignore unrecognized --enable/--with options
1485   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1486   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1487   --disable-largefile     omit support for large files
1488   --disable-nls           do not use Native Language Support
1489
1490 Screen locking options:
1491   --enable-locking        Compile in support for locking the display.
1492   --disable-locking       Do not allow locking at all.
1493
1494   --enable-root-passwd        Allow root passwd to unlock screen.
1495   --disable-root-passwd       Do not allow that.
1496   --enable-pam-check-account-type
1497                           Whether PAM should check the result of account
1498                           modules when authenticating. Only do this if you
1499                           have account configured properly on your system.
1500
1501 Optional Packages:
1502   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1503   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1504
1505   --with-pthread          Enables POSIX threads, for SMP support.
1506
1507 Installation options:
1508   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1509                           Default: `PREFIX/libexec/xscreensaver/'
1510   --with-configdir=DIR    Where to install the data files that describe each
1511                           of the display modes to the GUI.
1512                           Default: `PREFIX/share/xscreensaver/config/'
1513   --with-x-app-defaults=DIR
1514                            Where to install xscreensaver configuration file.
1515
1516   --with-dpms-ext         Include support for the DPMS extension.
1517   --with-xinerama-ext     Include support for the XINERAMA extension.
1518   --with-xinput-ext       Include support for the XInput extension.
1519   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1520   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1521   --with-randr-ext        Include support for the X Resize+Rotate extension.
1522   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1523                           file to notice keyboard activity.
1524   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1525   --with-pam-service-name NAME arg is the name of the PAM service that
1526                           xscreensaver will authenticate as.
1527   --with-kerberos         Include support for Kerberos authentication.
1528   --with-shadow           Include support for shadow password authentication.
1529   --with-passwd-helper    Include support for an external password
1530                           verification helper program.
1531   --with-login-manager    Put a "New Login" button on the unlock dialog that
1532                           runs a login manager like gdmflexiserver or kdmctl.
1533
1534 User interface options:
1535
1536   --with-gtk              Use the Gtk toolkit for the user interface.
1537   --with-motif            Use the Motif toolkit for the user interface
1538                           (no longer supported.)
1539
1540 Graphics options:
1541
1542   --with-gl               Build those demos which depend on OpenGL.
1543   --with-gle              Build those demos which depend on GLE
1544                           (the OpenGL "extrusion" library.)
1545   --with-gles             Target OpenGL ES 1.x API instead of OpenGL 1.3.
1546   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1547                           demos, which will make it possible for them to read
1548                           GIF, JPEG, and PNG files as well.
1549   --with-xpm              Include support for XPM files in some demos.
1550                           (Not needed if Pixbuf is used.)
1551   --with-jpeg             Include support for the JPEG library.
1552   --with-xft              Include support for the X Freetype library.
1553   --with-xshm-ext         Include support for the Shared Memory extension.
1554   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1555   --with-readdisplay      Include support for the XReadDisplay extension.
1556   --with-image-directory  Arg is the default directory from which some demos
1557                           will choose random images to display.
1558   --with-text-file=FILE   By default, some demos may display this file.
1559   --with-browser=BROWSER  Specify the web browser used to show the help URL.
1560   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1561                           (which is needed in order to ping other hosts.)
1562
1563   --with-record-animation Include code for generating MP4 videos.
1564
1565
1566 Some influential environment variables:
1567   CC          C compiler command
1568   CFLAGS      C compiler flags
1569   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1570               nonstandard directory <lib dir>
1571   LIBS        libraries to pass to the linker, e.g. -l<library>
1572   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1573               you have headers in a nonstandard directory <include dir>
1574   CPP         C preprocessor
1575   XMKMF       Path to xmkmf, Makefile generator for X Window System
1576
1577 Use these variables to override the choices made by `configure' or to help
1578 it to find libraries and programs with nonstandard names/locations.
1579
1580 Report bugs to the package provider.
1581 _ACEOF
1582 ac_status=$?
1583 fi
1584
1585 if test "$ac_init_help" = "recursive"; then
1586   # If there are subdirs, report their specific --help.
1587   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1588     test -d "$ac_dir" ||
1589       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1590       continue
1591     ac_builddir=.
1592
1593 case "$ac_dir" in
1594 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1595 *)
1596   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1597   # A ".." for each directory in $ac_dir_suffix.
1598   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1599   case $ac_top_builddir_sub in
1600   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1601   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1602   esac ;;
1603 esac
1604 ac_abs_top_builddir=$ac_pwd
1605 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1606 # for backward compatibility:
1607 ac_top_builddir=$ac_top_build_prefix
1608
1609 case $srcdir in
1610   .)  # We are building in place.
1611     ac_srcdir=.
1612     ac_top_srcdir=$ac_top_builddir_sub
1613     ac_abs_top_srcdir=$ac_pwd ;;
1614   [\\/]* | ?:[\\/]* )  # Absolute name.
1615     ac_srcdir=$srcdir$ac_dir_suffix;
1616     ac_top_srcdir=$srcdir
1617     ac_abs_top_srcdir=$srcdir ;;
1618   *) # Relative name.
1619     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1620     ac_top_srcdir=$ac_top_build_prefix$srcdir
1621     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1622 esac
1623 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1624
1625     cd "$ac_dir" || { ac_status=$?; continue; }
1626     # Check for guested configure.
1627     if test -f "$ac_srcdir/configure.gnu"; then
1628       echo &&
1629       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1630     elif test -f "$ac_srcdir/configure"; then
1631       echo &&
1632       $SHELL "$ac_srcdir/configure" --help=recursive
1633     else
1634       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1635     fi || ac_status=$?
1636     cd "$ac_pwd" || { ac_status=$?; break; }
1637   done
1638 fi
1639
1640 test -n "$ac_init_help" && exit $ac_status
1641 if $ac_init_version; then
1642   cat <<\_ACEOF
1643 configure
1644 generated by GNU Autoconf 2.69
1645
1646 Copyright (C) 2012 Free Software Foundation, Inc.
1647 This configure script is free software; the Free Software Foundation
1648 gives unlimited permission to copy, distribute and modify it.
1649 _ACEOF
1650   exit
1651 fi
1652
1653 ## ------------------------ ##
1654 ## Autoconf initialization. ##
1655 ## ------------------------ ##
1656
1657 # ac_fn_c_try_compile LINENO
1658 # --------------------------
1659 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1660 ac_fn_c_try_compile ()
1661 {
1662   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1663   rm -rf conftest.$ac_objext
1664   if { { ac_try="$ac_compile"
1665 case "(($ac_try" in
1666   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1667   *) ac_try_echo=$ac_try;;
1668 esac
1669 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1670 $as_echo "$ac_try_echo"; } >&5
1671   (eval "$ac_compile") 2>conftest.err
1672   ac_status=$?
1673   if test -s conftest.err; then
1674     grep -v '^ *+' conftest.err >conftest.er1
1675     cat conftest.er1 >&5
1676     mv -f conftest.er1 conftest.err
1677   fi
1678   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1679   test $ac_status = 0; } && {
1680          test -z "$ac_c_werror_flag" ||
1681          test ! -s conftest.err
1682        } && test -s conftest.$ac_objext; then :
1683   ac_retval=0
1684 else
1685   $as_echo "$as_me: failed program was:" >&5
1686 sed 's/^/| /' conftest.$ac_ext >&5
1687
1688         ac_retval=1
1689 fi
1690   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1691   as_fn_set_status $ac_retval
1692
1693 } # ac_fn_c_try_compile
1694
1695 # ac_fn_c_try_link LINENO
1696 # -----------------------
1697 # Try to link conftest.$ac_ext, and return whether this succeeded.
1698 ac_fn_c_try_link ()
1699 {
1700   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1701   rm -rf conftest.$ac_objext conftest$ac_exeext
1702   if { { ac_try="$ac_link"
1703 case "(($ac_try" in
1704   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705   *) ac_try_echo=$ac_try;;
1706 esac
1707 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708 $as_echo "$ac_try_echo"; } >&5
1709   (eval "$ac_link") 2>conftest.err
1710   ac_status=$?
1711   if test -s conftest.err; then
1712     grep -v '^ *+' conftest.err >conftest.er1
1713     cat conftest.er1 >&5
1714     mv -f conftest.er1 conftest.err
1715   fi
1716   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1717   test $ac_status = 0; } && {
1718          test -z "$ac_c_werror_flag" ||
1719          test ! -s conftest.err
1720        } && test -s conftest$ac_exeext && {
1721          test "$cross_compiling" = yes ||
1722          test -x conftest$ac_exeext
1723        }; then :
1724   ac_retval=0
1725 else
1726   $as_echo "$as_me: failed program was:" >&5
1727 sed 's/^/| /' conftest.$ac_ext >&5
1728
1729         ac_retval=1
1730 fi
1731   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1732   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1733   # interfere with the next link command; also delete a directory that is
1734   # left behind by Apple's compiler.  We do this before executing the actions.
1735   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1736   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1737   as_fn_set_status $ac_retval
1738
1739 } # ac_fn_c_try_link
1740
1741 # ac_fn_c_try_run LINENO
1742 # ----------------------
1743 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1744 # that executables *can* be run.
1745 ac_fn_c_try_run ()
1746 {
1747   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1748   if { { ac_try="$ac_link"
1749 case "(($ac_try" in
1750   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1751   *) ac_try_echo=$ac_try;;
1752 esac
1753 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1754 $as_echo "$ac_try_echo"; } >&5
1755   (eval "$ac_link") 2>&5
1756   ac_status=$?
1757   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1758   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1759   { { case "(($ac_try" in
1760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1761   *) ac_try_echo=$ac_try;;
1762 esac
1763 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1764 $as_echo "$ac_try_echo"; } >&5
1765   (eval "$ac_try") 2>&5
1766   ac_status=$?
1767   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1768   test $ac_status = 0; }; }; then :
1769   ac_retval=0
1770 else
1771   $as_echo "$as_me: program exited with status $ac_status" >&5
1772        $as_echo "$as_me: failed program was:" >&5
1773 sed 's/^/| /' conftest.$ac_ext >&5
1774
1775        ac_retval=$ac_status
1776 fi
1777   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1778   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1779   as_fn_set_status $ac_retval
1780
1781 } # ac_fn_c_try_run
1782
1783 # ac_fn_c_try_cpp LINENO
1784 # ----------------------
1785 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1786 ac_fn_c_try_cpp ()
1787 {
1788   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1789   if { { ac_try="$ac_cpp conftest.$ac_ext"
1790 case "(($ac_try" in
1791   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1792   *) ac_try_echo=$ac_try;;
1793 esac
1794 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1795 $as_echo "$ac_try_echo"; } >&5
1796   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1797   ac_status=$?
1798   if test -s conftest.err; then
1799     grep -v '^ *+' conftest.err >conftest.er1
1800     cat conftest.er1 >&5
1801     mv -f conftest.er1 conftest.err
1802   fi
1803   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804   test $ac_status = 0; } > conftest.i && {
1805          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1806          test ! -s conftest.err
1807        }; then :
1808   ac_retval=0
1809 else
1810   $as_echo "$as_me: failed program was:" >&5
1811 sed 's/^/| /' conftest.$ac_ext >&5
1812
1813     ac_retval=1
1814 fi
1815   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1816   as_fn_set_status $ac_retval
1817
1818 } # ac_fn_c_try_cpp
1819
1820 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1821 # -------------------------------------------------------
1822 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1823 # the include files in INCLUDES and setting the cache variable VAR
1824 # accordingly.
1825 ac_fn_c_check_header_mongrel ()
1826 {
1827   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828   if eval \${$3+:} false; then :
1829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1830 $as_echo_n "checking for $2... " >&6; }
1831 if eval \${$3+:} false; then :
1832   $as_echo_n "(cached) " >&6
1833 fi
1834 eval ac_res=\$$3
1835                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1836 $as_echo "$ac_res" >&6; }
1837 else
1838   # Is the header compilable?
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1840 $as_echo_n "checking $2 usability... " >&6; }
1841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1842 /* end confdefs.h.  */
1843 $4
1844 #include <$2>
1845 _ACEOF
1846 if ac_fn_c_try_compile "$LINENO"; then :
1847   ac_header_compiler=yes
1848 else
1849   ac_header_compiler=no
1850 fi
1851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1853 $as_echo "$ac_header_compiler" >&6; }
1854
1855 # Is the header present?
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1857 $as_echo_n "checking $2 presence... " >&6; }
1858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1859 /* end confdefs.h.  */
1860 #include <$2>
1861 _ACEOF
1862 if ac_fn_c_try_cpp "$LINENO"; then :
1863   ac_header_preproc=yes
1864 else
1865   ac_header_preproc=no
1866 fi
1867 rm -rf conftest.err conftest.i conftest.$ac_ext
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1869 $as_echo "$ac_header_preproc" >&6; }
1870
1871 # So?  What about this header?
1872 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1873   yes:no: )
1874     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1875 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1876     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1877 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1878     ;;
1879   no:yes:* )
1880     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1881 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1882     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1883 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1884     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1885 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1886     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1887 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1888     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1889 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1890     ;;
1891 esac
1892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1893 $as_echo_n "checking for $2... " >&6; }
1894 if eval \${$3+:} false; then :
1895   $as_echo_n "(cached) " >&6
1896 else
1897   eval "$3=\$ac_header_compiler"
1898 fi
1899 eval ac_res=\$$3
1900                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1901 $as_echo "$ac_res" >&6; }
1902 fi
1903   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1904
1905 } # ac_fn_c_check_header_mongrel
1906
1907 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1908 # -------------------------------------------------------
1909 # Tests whether HEADER exists and can be compiled using the include files in
1910 # INCLUDES, setting the cache variable VAR accordingly.
1911 ac_fn_c_check_header_compile ()
1912 {
1913   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915 $as_echo_n "checking for $2... " >&6; }
1916 if eval \${$3+:} false; then :
1917   $as_echo_n "(cached) " >&6
1918 else
1919   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1920 /* end confdefs.h.  */
1921 $4
1922 #include <$2>
1923 _ACEOF
1924 if ac_fn_c_try_compile "$LINENO"; then :
1925   eval "$3=yes"
1926 else
1927   eval "$3=no"
1928 fi
1929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1930 fi
1931 eval ac_res=\$$3
1932                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1933 $as_echo "$ac_res" >&6; }
1934   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1935
1936 } # ac_fn_c_check_header_compile
1937
1938 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1939 # -------------------------------------------
1940 # Tests whether TYPE exists after having included INCLUDES, setting cache
1941 # variable VAR accordingly.
1942 ac_fn_c_check_type ()
1943 {
1944   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1945   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1946 $as_echo_n "checking for $2... " >&6; }
1947 if eval \${$3+:} false; then :
1948   $as_echo_n "(cached) " >&6
1949 else
1950   eval "$3=no"
1951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952 /* end confdefs.h.  */
1953 $4
1954 int
1955 main ()
1956 {
1957 if (sizeof ($2))
1958          return 0;
1959   ;
1960   return 0;
1961 }
1962 _ACEOF
1963 if ac_fn_c_try_compile "$LINENO"; then :
1964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965 /* end confdefs.h.  */
1966 $4
1967 int
1968 main ()
1969 {
1970 if (sizeof (($2)))
1971             return 0;
1972   ;
1973   return 0;
1974 }
1975 _ACEOF
1976 if ac_fn_c_try_compile "$LINENO"; then :
1977
1978 else
1979   eval "$3=yes"
1980 fi
1981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1982 fi
1983 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1984 fi
1985 eval ac_res=\$$3
1986                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1987 $as_echo "$ac_res" >&6; }
1988   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1989
1990 } # ac_fn_c_check_type
1991
1992 # ac_fn_c_check_func LINENO FUNC VAR
1993 # ----------------------------------
1994 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1995 ac_fn_c_check_func ()
1996 {
1997   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1998   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1999 $as_echo_n "checking for $2... " >&6; }
2000 if eval \${$3+:} false; then :
2001   $as_echo_n "(cached) " >&6
2002 else
2003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004 /* end confdefs.h.  */
2005 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2006    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2007 #define $2 innocuous_$2
2008
2009 /* System header to define __stub macros and hopefully few prototypes,
2010     which can conflict with char $2 (); below.
2011     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2012     <limits.h> exists even on freestanding compilers.  */
2013
2014 #ifdef __STDC__
2015 # include <limits.h>
2016 #else
2017 # include <assert.h>
2018 #endif
2019
2020 #undef $2
2021
2022 /* Override any GCC internal prototype to avoid an error.
2023    Use char because int might match the return type of a GCC
2024    builtin and then its argument prototype would still apply.  */
2025 #ifdef __cplusplus
2026 extern "C"
2027 #endif
2028 char $2 ();
2029 /* The GNU C library defines this for functions which it implements
2030     to always fail with ENOSYS.  Some functions are actually named
2031     something starting with __ and the normal name is an alias.  */
2032 #if defined __stub_$2 || defined __stub___$2
2033 choke me
2034 #endif
2035
2036 int
2037 main ()
2038 {
2039 return $2 ();
2040   ;
2041   return 0;
2042 }
2043 _ACEOF
2044 if ac_fn_c_try_link "$LINENO"; then :
2045   eval "$3=yes"
2046 else
2047   eval "$3=no"
2048 fi
2049 rm -f core conftest.err conftest.$ac_objext \
2050     conftest$ac_exeext conftest.$ac_ext
2051 fi
2052 eval ac_res=\$$3
2053                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2054 $as_echo "$ac_res" >&6; }
2055   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2056
2057 } # ac_fn_c_check_func
2058
2059 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2060 # ----------------------------------------------------
2061 # Tries to find if the field MEMBER exists in type AGGR, after including
2062 # INCLUDES, setting cache variable VAR accordingly.
2063 ac_fn_c_check_member ()
2064 {
2065   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2067 $as_echo_n "checking for $2.$3... " >&6; }
2068 if eval \${$4+:} false; then :
2069   $as_echo_n "(cached) " >&6
2070 else
2071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072 /* end confdefs.h.  */
2073 $5
2074 int
2075 main ()
2076 {
2077 static $2 ac_aggr;
2078 if (ac_aggr.$3)
2079 return 0;
2080   ;
2081   return 0;
2082 }
2083 _ACEOF
2084 if ac_fn_c_try_compile "$LINENO"; then :
2085   eval "$4=yes"
2086 else
2087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088 /* end confdefs.h.  */
2089 $5
2090 int
2091 main ()
2092 {
2093 static $2 ac_aggr;
2094 if (sizeof ac_aggr.$3)
2095 return 0;
2096   ;
2097   return 0;
2098 }
2099 _ACEOF
2100 if ac_fn_c_try_compile "$LINENO"; then :
2101   eval "$4=yes"
2102 else
2103   eval "$4=no"
2104 fi
2105 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106 fi
2107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108 fi
2109 eval ac_res=\$$4
2110                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2111 $as_echo "$ac_res" >&6; }
2112   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2113
2114 } # ac_fn_c_check_member
2115 cat >config.log <<_ACEOF
2116 This file contains any messages produced by compilers while
2117 running configure, to aid debugging if configure makes a mistake.
2118
2119 It was created by $as_me, which was
2120 generated by GNU Autoconf 2.69.  Invocation command line was
2121
2122   $ $0 $@
2123
2124 _ACEOF
2125 exec 5>>config.log
2126 {
2127 cat <<_ASUNAME
2128 ## --------- ##
2129 ## Platform. ##
2130 ## --------- ##
2131
2132 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2133 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2134 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2135 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2136 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2137
2138 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2139 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2140
2141 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2142 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2143 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2144 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2145 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2146 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2147 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2148
2149 _ASUNAME
2150
2151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2152 for as_dir in $PATH
2153 do
2154   IFS=$as_save_IFS
2155   test -z "$as_dir" && as_dir=.
2156     $as_echo "PATH: $as_dir"
2157   done
2158 IFS=$as_save_IFS
2159
2160 } >&5
2161
2162 cat >&5 <<_ACEOF
2163
2164
2165 ## ----------- ##
2166 ## Core tests. ##
2167 ## ----------- ##
2168
2169 _ACEOF
2170
2171
2172 # Keep a trace of the command line.
2173 # Strip out --no-create and --no-recursion so they do not pile up.
2174 # Strip out --silent because we don't want to record it for future runs.
2175 # Also quote any args containing shell meta-characters.
2176 # Make two passes to allow for proper duplicate-argument suppression.
2177 ac_configure_args=
2178 ac_configure_args0=
2179 ac_configure_args1=
2180 ac_must_keep_next=false
2181 for ac_pass in 1 2
2182 do
2183   for ac_arg
2184   do
2185     case $ac_arg in
2186     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2187     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2188     | -silent | --silent | --silen | --sile | --sil)
2189       continue ;;
2190     *\'*)
2191       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2192     esac
2193     case $ac_pass in
2194     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2195     2)
2196       as_fn_append ac_configure_args1 " '$ac_arg'"
2197       if test $ac_must_keep_next = true; then
2198         ac_must_keep_next=false # Got value, back to normal.
2199       else
2200         case $ac_arg in
2201           *=* | --config-cache | -C | -disable-* | --disable-* \
2202           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2203           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2204           | -with-* | --with-* | -without-* | --without-* | --x)
2205             case "$ac_configure_args0 " in
2206               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2207             esac
2208             ;;
2209           -* ) ac_must_keep_next=true ;;
2210         esac
2211       fi
2212       as_fn_append ac_configure_args " '$ac_arg'"
2213       ;;
2214     esac
2215   done
2216 done
2217 { ac_configure_args0=; unset ac_configure_args0;}
2218 { ac_configure_args1=; unset ac_configure_args1;}
2219
2220 # When interrupted or exit'd, cleanup temporary files, and complete
2221 # config.log.  We remove comments because anyway the quotes in there
2222 # would cause problems or look ugly.
2223 # WARNING: Use '\'' to represent an apostrophe within the trap.
2224 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2225 trap 'exit_status=$?
2226   # Save into config.log some information that might help in debugging.
2227   {
2228     echo
2229
2230     $as_echo "## ---------------- ##
2231 ## Cache variables. ##
2232 ## ---------------- ##"
2233     echo
2234     # The following way of writing the cache mishandles newlines in values,
2235 (
2236   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2237     eval ac_val=\$$ac_var
2238     case $ac_val in #(
2239     *${as_nl}*)
2240       case $ac_var in #(
2241       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2242 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2243       esac
2244       case $ac_var in #(
2245       _ | IFS | as_nl) ;; #(
2246       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2247       *) { eval $ac_var=; unset $ac_var;} ;;
2248       esac ;;
2249     esac
2250   done
2251   (set) 2>&1 |
2252     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2253     *${as_nl}ac_space=\ *)
2254       sed -n \
2255         "s/'\''/'\''\\\\'\'''\''/g;
2256           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2257       ;; #(
2258     *)
2259       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2260       ;;
2261     esac |
2262     sort
2263 )
2264     echo
2265
2266     $as_echo "## ----------------- ##
2267 ## Output variables. ##
2268 ## ----------------- ##"
2269     echo
2270     for ac_var in $ac_subst_vars
2271     do
2272       eval ac_val=\$$ac_var
2273       case $ac_val in
2274       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2275       esac
2276       $as_echo "$ac_var='\''$ac_val'\''"
2277     done | sort
2278     echo
2279
2280     if test -n "$ac_subst_files"; then
2281       $as_echo "## ------------------- ##
2282 ## File substitutions. ##
2283 ## ------------------- ##"
2284       echo
2285       for ac_var in $ac_subst_files
2286       do
2287         eval ac_val=\$$ac_var
2288         case $ac_val in
2289         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2290         esac
2291         $as_echo "$ac_var='\''$ac_val'\''"
2292       done | sort
2293       echo
2294     fi
2295
2296     if test -s confdefs.h; then
2297       $as_echo "## ----------- ##
2298 ## confdefs.h. ##
2299 ## ----------- ##"
2300       echo
2301       cat confdefs.h
2302       echo
2303     fi
2304     test "$ac_signal" != 0 &&
2305       $as_echo "$as_me: caught signal $ac_signal"
2306     $as_echo "$as_me: exit $exit_status"
2307   } >&5
2308   rm -f core *.core core.conftest.* &&
2309     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2310     exit $exit_status
2311 ' 0
2312 for ac_signal in 1 2 13 15; do
2313   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2314 done
2315 ac_signal=0
2316
2317 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2318 rm -f -r conftest* confdefs.h
2319
2320 $as_echo "/* confdefs.h */" > confdefs.h
2321
2322 # Predefined preprocessor variables.
2323
2324 cat >>confdefs.h <<_ACEOF
2325 #define PACKAGE_NAME "$PACKAGE_NAME"
2326 _ACEOF
2327
2328 cat >>confdefs.h <<_ACEOF
2329 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2330 _ACEOF
2331
2332 cat >>confdefs.h <<_ACEOF
2333 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2334 _ACEOF
2335
2336 cat >>confdefs.h <<_ACEOF
2337 #define PACKAGE_STRING "$PACKAGE_STRING"
2338 _ACEOF
2339
2340 cat >>confdefs.h <<_ACEOF
2341 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2342 _ACEOF
2343
2344 cat >>confdefs.h <<_ACEOF
2345 #define PACKAGE_URL "$PACKAGE_URL"
2346 _ACEOF
2347
2348
2349 # Let the site file select an alternate cache file if it wants to.
2350 # Prefer an explicitly selected file to automatically selected ones.
2351 ac_site_file1=NONE
2352 ac_site_file2=NONE
2353 if test -n "$CONFIG_SITE"; then
2354   # We do not want a PATH search for config.site.
2355   case $CONFIG_SITE in #((
2356     -*)  ac_site_file1=./$CONFIG_SITE;;
2357     */*) ac_site_file1=$CONFIG_SITE;;
2358     *)   ac_site_file1=./$CONFIG_SITE;;
2359   esac
2360 elif test "x$prefix" != xNONE; then
2361   ac_site_file1=$prefix/share/config.site
2362   ac_site_file2=$prefix/etc/config.site
2363 else
2364   ac_site_file1=$ac_default_prefix/share/config.site
2365   ac_site_file2=$ac_default_prefix/etc/config.site
2366 fi
2367 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2368 do
2369   test "x$ac_site_file" = xNONE && continue
2370   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2371     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2372 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2373     sed 's/^/| /' "$ac_site_file" >&5
2374     . "$ac_site_file" \
2375       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2376 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2377 as_fn_error $? "failed to load site script $ac_site_file
2378 See \`config.log' for more details" "$LINENO" 5; }
2379   fi
2380 done
2381
2382 if test -r "$cache_file"; then
2383   # Some versions of bash will fail to source /dev/null (special files
2384   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2385   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2386     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2387 $as_echo "$as_me: loading cache $cache_file" >&6;}
2388     case $cache_file in
2389       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2390       *)                      . "./$cache_file";;
2391     esac
2392   fi
2393 else
2394   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2395 $as_echo "$as_me: creating cache $cache_file" >&6;}
2396   >$cache_file
2397 fi
2398
2399 # Check that the precious variables saved in the cache have kept the same
2400 # value.
2401 ac_cache_corrupted=false
2402 for ac_var in $ac_precious_vars; do
2403   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2404   eval ac_new_set=\$ac_env_${ac_var}_set
2405   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2406   eval ac_new_val=\$ac_env_${ac_var}_value
2407   case $ac_old_set,$ac_new_set in
2408     set,)
2409       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2410 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2411       ac_cache_corrupted=: ;;
2412     ,set)
2413       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2414 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2415       ac_cache_corrupted=: ;;
2416     ,);;
2417     *)
2418       if test "x$ac_old_val" != "x$ac_new_val"; then
2419         # differences in whitespace do not lead to failure.
2420         ac_old_val_w=`echo x $ac_old_val`
2421         ac_new_val_w=`echo x $ac_new_val`
2422         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2423           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2424 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2425           ac_cache_corrupted=:
2426         else
2427           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2428 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2429           eval $ac_var=\$ac_old_val
2430         fi
2431         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2432 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2433         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2434 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2435       fi;;
2436   esac
2437   # Pass precious variables to config.status.
2438   if test "$ac_new_set" = set; then
2439     case $ac_new_val in
2440     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2441     *) ac_arg=$ac_var=$ac_new_val ;;
2442     esac
2443     case " $ac_configure_args " in
2444       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2445       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2446     esac
2447   fi
2448 done
2449 if $ac_cache_corrupted; then
2450   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2451 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2452   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2453 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2454   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2455 fi
2456 ## -------------------- ##
2457 ## Main body of script. ##
2458 ## -------------------- ##
2459
2460 ac_ext=c
2461 ac_cpp='$CPP $CPPFLAGS'
2462 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2463 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2465
2466
2467 ac_config_headers="$ac_config_headers config.h"
2468
2469
2470 echo "current directory: `pwd`"
2471 echo "command line was: $0 $@"
2472
2473 ###############################################################################
2474 #
2475 #       Autoheader stuff
2476 #
2477 ###############################################################################
2478
2479
2480
2481
2482
2483
2484
2485 # This only ever existed in X11R4 and X11R5.
2486 #AH_TEMPLATE([HAVE_XIDLE_EXTENSION],
2487 #           [Define this if you have the XIDLE extension installed. If you
2488 #           have the XIDLE extension, this is recommended.  (You have this
2489 #           extension if the file /usr/include/X11/extensions/xidle.h
2490 #           exists.) Turning on this flag lets XScreenSaver work better with
2491 #           servers which support this extension; but it will still work
2492 #           with servers which do not suport it, so it's a good idea to
2493 #           compile in support for it if you can.])
2494
2495 # Using this extension will crash your X server and make fading not work.
2496 #AH_TEMPLATE([HAVE_MIT_SAVER_EXTENSION],
2497 #           [Define this if you have the MIT-SCREEN-SAVER extension
2498 #            installed.  See the caveats about this extension, above.
2499 #            (It's available if /usr/include/X11/extensions/scrnsaver.h
2500 #            exists.)])
2501
2502 # This only ever existed on SGI hardware.
2503 #AH_TEMPLATE([HAVE_SGI_SAVER_EXTENSION],
2504 #           [Define this if you have the SGI SCREEN_SAVER extension.  This is
2505 #           standard on Irix systems, and not available elsewhere.])
2506
2507 # This only ever existed on SGI hardware.
2508 #AH_TEMPLATE([HAVE_SGI_VC_EXTENSION],
2509 #           [Define this if you have the SGI-VIDEO-CONTROL extension.  This
2510 #           is standard on Irix systems, and not available elsewhere.])
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629 # After checking to see that --srcdir is correct (which AC_INIT does)
2630 # check for some random other files that come later in the tar file,
2631 # to make sure everything is here.
2632 #
2633 for d in utils jwxyz hacks hacks/glx driver ; do
2634   f=$srcdir/$d/Makefile.in
2635   if test \! -r $f ; then
2636     echo ""
2637     echo "ERROR: The package is incomplete: $f does not exist."
2638     echo "       This probably means that your download was truncated."
2639     echo ""
2640     exit 1
2641   fi
2642 done
2643
2644 ###############################################################################
2645 #
2646 #       Query AX_PTHREAD, and figure out which compiler gets used.
2647 #
2648 ###############################################################################
2649
2650
2651
2652
2653 ###############################################################################
2654 #
2655 #       Function to figure out how to run the compiler.
2656 #
2657 ###############################################################################
2658
2659
2660
2661
2662 ###############################################################################
2663 #
2664 #       Check for availability of various gcc command-line options.
2665 #
2666 ###############################################################################
2667
2668
2669
2670
2671
2672
2673
2674 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2675 # around an Apple-specific gcc bug.
2676 #
2677
2678
2679 ###############################################################################
2680 #
2681 #       Function to figure out how to disable // comments in ANSI C code.
2682 #
2683 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2684 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2685 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2686 #       so much for compatibility!)
2687 #
2688 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2689 #       declarations preceed statements, without resorting to "-pedantic".
2690 #       This means that there is no way to get gcc3 to issue warnings that
2691 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2692 #       also drowning in totally useless warnings.  Thank you master may I
2693 #       have another.
2694 #
2695 #       So, I give up, let's just use -pedantic.
2696 #
2697 ###############################################################################
2698
2699
2700
2701
2702
2703
2704 ###############################################################################
2705 #
2706 #       Function to figure out how to create directory trees.
2707 #
2708 ###############################################################################
2709
2710
2711
2712
2713 ###############################################################################
2714 #
2715 #       Function to check whether gettimeofday() exists, and how to call it.
2716 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2717 #
2718 ###############################################################################
2719
2720
2721
2722
2723 ###############################################################################
2724 #
2725 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2726 #
2727 ###############################################################################
2728
2729 # M4 sucks!!  perl sucks too!!
2730
2731 perl_version_cmd='print $]'
2732
2733
2734
2735
2736
2737 ###############################################################################
2738 #
2739 #       Function to demand "bc".  Losers.
2740 #
2741 ###############################################################################
2742
2743
2744
2745 ###############################################################################
2746 #
2747 #       Functions to check how to do ICMP PING requests.
2748 #
2749 ###############################################################################
2750
2751
2752
2753
2754
2755
2756 ###############################################################################
2757 #
2758 #       Functions to check for various X11 crap.
2759 #
2760 ###############################################################################
2761
2762 # Try and find the app-defaults directory.
2763 # It sucks that autoconf doesn't do this already...
2764 #
2765
2766
2767 ###############################################################################
2768 #
2769 #       Handle the --with-x-app-defaults option HERE
2770 #
2771 ###############################################################################
2772
2773
2774 # Check whether --with-x-app-defaults was given.
2775 if test "${with_x_app_defaults+set}" = set; then :
2776   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2777 else
2778   eval ac_x_app_defaults="$withval"
2779 fi
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791 # Random special-cases for X on certain pathological OSes.
2792 # You know who you are.
2793 #
2794
2795
2796
2797
2798
2799 ###############################################################################
2800 #
2801 #       Some utility functions to make checking for X things easier.
2802 #
2803 ###############################################################################
2804
2805 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2806 #
2807
2808
2809 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2810 #
2811
2812
2813 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2814 #
2815
2816
2817
2818 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2819 # Use this sparingly; it probably doesn't work very well on X programs.
2820 #
2821
2822
2823 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2824 # (But not the -L directories!)
2825 #
2826
2827
2828
2829
2830 # Usage: HANDLE_X_PATH_ARG([variable_name],
2831 #                          [--command-line-option],
2832 #                          [descriptive string])
2833 #
2834 # All of the --with options take three forms:
2835 #
2836 #   --with-foo (or --with-foo=yes)
2837 #   --without-foo (or --with-foo=no)
2838 #   --with-foo=/DIR
2839 #
2840 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2841 # a directory (string beginning with a slash) it checks to see whether
2842 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2843 # as appropriate.
2844 #
2845
2846
2847
2848
2849 ###############################################################################
2850 ###############################################################################
2851 #
2852 #       End of function definitions.  Now start actually executing stuff.
2853 #
2854 ###############################################################################
2855 ###############################################################################
2856
2857 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2858 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2859 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2860
2861
2862 # random compiler setup
2863 ac_aux_dir=
2864 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2865   if test -f "$ac_dir/install-sh"; then
2866     ac_aux_dir=$ac_dir
2867     ac_install_sh="$ac_aux_dir/install-sh -c"
2868     break
2869   elif test -f "$ac_dir/install.sh"; then
2870     ac_aux_dir=$ac_dir
2871     ac_install_sh="$ac_aux_dir/install.sh -c"
2872     break
2873   elif test -f "$ac_dir/shtool"; then
2874     ac_aux_dir=$ac_dir
2875     ac_install_sh="$ac_aux_dir/shtool install -c"
2876     break
2877   fi
2878 done
2879 if test -z "$ac_aux_dir"; then
2880   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2881 fi
2882
2883 # These three variables are undocumented and unsupported,
2884 # and are intended to be withdrawn in a future Autoconf release.
2885 # They can cause serious problems if a builder's source tree is in a directory
2886 # whose full name contains unusual characters.
2887 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2888 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2889 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2890
2891
2892 # Make sure we can run config.sub.
2893 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2894   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2895
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2897 $as_echo_n "checking build system type... " >&6; }
2898 if ${ac_cv_build+:} false; then :
2899   $as_echo_n "(cached) " >&6
2900 else
2901   ac_build_alias=$build_alias
2902 test "x$ac_build_alias" = x &&
2903   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2904 test "x$ac_build_alias" = x &&
2905   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2906 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2907   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2908
2909 fi
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2911 $as_echo "$ac_cv_build" >&6; }
2912 case $ac_cv_build in
2913 *-*-*) ;;
2914 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2915 esac
2916 build=$ac_cv_build
2917 ac_save_IFS=$IFS; IFS='-'
2918 set x $ac_cv_build
2919 shift
2920 build_cpu=$1
2921 build_vendor=$2
2922 shift; shift
2923 # Remember, the first character of IFS is used to create $*,
2924 # except with old shells:
2925 build_os=$*
2926 IFS=$ac_save_IFS
2927 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2928
2929
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2931 $as_echo_n "checking host system type... " >&6; }
2932 if ${ac_cv_host+:} false; then :
2933   $as_echo_n "(cached) " >&6
2934 else
2935   if test "x$host_alias" = x; then
2936   ac_cv_host=$ac_cv_build
2937 else
2938   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2939     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2940 fi
2941
2942 fi
2943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2944 $as_echo "$ac_cv_host" >&6; }
2945 case $ac_cv_host in
2946 *-*-*) ;;
2947 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2948 esac
2949 host=$ac_cv_host
2950 ac_save_IFS=$IFS; IFS='-'
2951 set x $ac_cv_host
2952 shift
2953 host_cpu=$1
2954 host_vendor=$2
2955 shift; shift
2956 # Remember, the first character of IFS is used to create $*,
2957 # except with old shells:
2958 host_os=$*
2959 IFS=$ac_save_IFS
2960 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2961
2962
2963
2964 ac_original_cc=$CC
2965 ac_ext=c
2966 ac_cpp='$CPP $CPPFLAGS'
2967 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2968 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2969 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2970 if test -n "$ac_tool_prefix"; then
2971   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2972 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2974 $as_echo_n "checking for $ac_word... " >&6; }
2975 if ${ac_cv_prog_CC+:} false; then :
2976   $as_echo_n "(cached) " >&6
2977 else
2978   if test -n "$CC"; then
2979   ac_cv_prog_CC="$CC" # Let the user override the test.
2980 else
2981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2982 for as_dir in $PATH
2983 do
2984   IFS=$as_save_IFS
2985   test -z "$as_dir" && as_dir=.
2986     for ac_exec_ext in '' $ac_executable_extensions; do
2987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2988     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2990     break 2
2991   fi
2992 done
2993   done
2994 IFS=$as_save_IFS
2995
2996 fi
2997 fi
2998 CC=$ac_cv_prog_CC
2999 if test -n "$CC"; then
3000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3001 $as_echo "$CC" >&6; }
3002 else
3003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3004 $as_echo "no" >&6; }
3005 fi
3006
3007
3008 fi
3009 if test -z "$ac_cv_prog_CC"; then
3010   ac_ct_CC=$CC
3011   # Extract the first word of "gcc", so it can be a program name with args.
3012 set dummy gcc; ac_word=$2
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3014 $as_echo_n "checking for $ac_word... " >&6; }
3015 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3016   $as_echo_n "(cached) " >&6
3017 else
3018   if test -n "$ac_ct_CC"; then
3019   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3020 else
3021 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3022 for as_dir in $PATH
3023 do
3024   IFS=$as_save_IFS
3025   test -z "$as_dir" && as_dir=.
3026     for ac_exec_ext in '' $ac_executable_extensions; do
3027   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3028     ac_cv_prog_ac_ct_CC="gcc"
3029     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3030     break 2
3031   fi
3032 done
3033   done
3034 IFS=$as_save_IFS
3035
3036 fi
3037 fi
3038 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3039 if test -n "$ac_ct_CC"; then
3040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3041 $as_echo "$ac_ct_CC" >&6; }
3042 else
3043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3044 $as_echo "no" >&6; }
3045 fi
3046
3047   if test "x$ac_ct_CC" = x; then
3048     CC=""
3049   else
3050     case $cross_compiling:$ac_tool_warned in
3051 yes:)
3052 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3053 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3054 ac_tool_warned=yes ;;
3055 esac
3056     CC=$ac_ct_CC
3057   fi
3058 else
3059   CC="$ac_cv_prog_CC"
3060 fi
3061
3062 if test -z "$CC"; then
3063           if test -n "$ac_tool_prefix"; then
3064     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3065 set dummy ${ac_tool_prefix}cc; ac_word=$2
3066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3067 $as_echo_n "checking for $ac_word... " >&6; }
3068 if ${ac_cv_prog_CC+:} false; then :
3069   $as_echo_n "(cached) " >&6
3070 else
3071   if test -n "$CC"; then
3072   ac_cv_prog_CC="$CC" # Let the user override the test.
3073 else
3074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3075 for as_dir in $PATH
3076 do
3077   IFS=$as_save_IFS
3078   test -z "$as_dir" && as_dir=.
3079     for ac_exec_ext in '' $ac_executable_extensions; do
3080   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3081     ac_cv_prog_CC="${ac_tool_prefix}cc"
3082     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3083     break 2
3084   fi
3085 done
3086   done
3087 IFS=$as_save_IFS
3088
3089 fi
3090 fi
3091 CC=$ac_cv_prog_CC
3092 if test -n "$CC"; then
3093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3094 $as_echo "$CC" >&6; }
3095 else
3096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3097 $as_echo "no" >&6; }
3098 fi
3099
3100
3101   fi
3102 fi
3103 if test -z "$CC"; then
3104   # Extract the first word of "cc", so it can be a program name with args.
3105 set dummy cc; ac_word=$2
3106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3107 $as_echo_n "checking for $ac_word... " >&6; }
3108 if ${ac_cv_prog_CC+:} false; then :
3109   $as_echo_n "(cached) " >&6
3110 else
3111   if test -n "$CC"; then
3112   ac_cv_prog_CC="$CC" # Let the user override the test.
3113 else
3114   ac_prog_rejected=no
3115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3116 for as_dir in $PATH
3117 do
3118   IFS=$as_save_IFS
3119   test -z "$as_dir" && as_dir=.
3120     for ac_exec_ext in '' $ac_executable_extensions; do
3121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3122     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3123        ac_prog_rejected=yes
3124        continue
3125      fi
3126     ac_cv_prog_CC="cc"
3127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3128     break 2
3129   fi
3130 done
3131   done
3132 IFS=$as_save_IFS
3133
3134 if test $ac_prog_rejected = yes; then
3135   # We found a bogon in the path, so make sure we never use it.
3136   set dummy $ac_cv_prog_CC
3137   shift
3138   if test $# != 0; then
3139     # We chose a different compiler from the bogus one.
3140     # However, it has the same basename, so the bogon will be chosen
3141     # first if we set CC to just the basename; use the full file name.
3142     shift
3143     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3144   fi
3145 fi
3146 fi
3147 fi
3148 CC=$ac_cv_prog_CC
3149 if test -n "$CC"; then
3150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3151 $as_echo "$CC" >&6; }
3152 else
3153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3154 $as_echo "no" >&6; }
3155 fi
3156
3157
3158 fi
3159 if test -z "$CC"; then
3160   if test -n "$ac_tool_prefix"; then
3161   for ac_prog in cl.exe
3162   do
3163     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3164 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3166 $as_echo_n "checking for $ac_word... " >&6; }
3167 if ${ac_cv_prog_CC+:} false; then :
3168   $as_echo_n "(cached) " >&6
3169 else
3170   if test -n "$CC"; then
3171   ac_cv_prog_CC="$CC" # Let the user override the test.
3172 else
3173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3174 for as_dir in $PATH
3175 do
3176   IFS=$as_save_IFS
3177   test -z "$as_dir" && as_dir=.
3178     for ac_exec_ext in '' $ac_executable_extensions; do
3179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3180     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3182     break 2
3183   fi
3184 done
3185   done
3186 IFS=$as_save_IFS
3187
3188 fi
3189 fi
3190 CC=$ac_cv_prog_CC
3191 if test -n "$CC"; then
3192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3193 $as_echo "$CC" >&6; }
3194 else
3195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3196 $as_echo "no" >&6; }
3197 fi
3198
3199
3200     test -n "$CC" && break
3201   done
3202 fi
3203 if test -z "$CC"; then
3204   ac_ct_CC=$CC
3205   for ac_prog in cl.exe
3206 do
3207   # Extract the first word of "$ac_prog", so it can be a program name with args.
3208 set dummy $ac_prog; ac_word=$2
3209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3210 $as_echo_n "checking for $ac_word... " >&6; }
3211 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3212   $as_echo_n "(cached) " >&6
3213 else
3214   if test -n "$ac_ct_CC"; then
3215   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3216 else
3217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3218 for as_dir in $PATH
3219 do
3220   IFS=$as_save_IFS
3221   test -z "$as_dir" && as_dir=.
3222     for ac_exec_ext in '' $ac_executable_extensions; do
3223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3224     ac_cv_prog_ac_ct_CC="$ac_prog"
3225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3226     break 2
3227   fi
3228 done
3229   done
3230 IFS=$as_save_IFS
3231
3232 fi
3233 fi
3234 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3235 if test -n "$ac_ct_CC"; then
3236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3237 $as_echo "$ac_ct_CC" >&6; }
3238 else
3239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3240 $as_echo "no" >&6; }
3241 fi
3242
3243
3244   test -n "$ac_ct_CC" && break
3245 done
3246
3247   if test "x$ac_ct_CC" = x; then
3248     CC=""
3249   else
3250     case $cross_compiling:$ac_tool_warned in
3251 yes:)
3252 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3253 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3254 ac_tool_warned=yes ;;
3255 esac
3256     CC=$ac_ct_CC
3257   fi
3258 fi
3259
3260 fi
3261
3262
3263 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3264 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3265 as_fn_error $? "no acceptable C compiler found in \$PATH
3266 See \`config.log' for more details" "$LINENO" 5; }
3267
3268 # Provide some information about the compiler.
3269 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3270 set X $ac_compile
3271 ac_compiler=$2
3272 for ac_option in --version -v -V -qversion; do
3273   { { ac_try="$ac_compiler $ac_option >&5"
3274 case "(($ac_try" in
3275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3276   *) ac_try_echo=$ac_try;;
3277 esac
3278 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3279 $as_echo "$ac_try_echo"; } >&5
3280   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3281   ac_status=$?
3282   if test -s conftest.err; then
3283     sed '10a\
3284 ... rest of stderr output deleted ...
3285          10q' conftest.err >conftest.er1
3286     cat conftest.er1 >&5
3287   fi
3288   rm -rf conftest.er1 conftest.err
3289   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3290   test $ac_status = 0; }
3291 done
3292
3293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3294 /* end confdefs.h.  */
3295
3296 int
3297 main ()
3298 {
3299
3300   ;
3301   return 0;
3302 }
3303 _ACEOF
3304 ac_clean_files_save=$ac_clean_files
3305 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3306 # Try to create an executable without -o first, disregard a.out.
3307 # It will help us diagnose broken compilers, and finding out an intuition
3308 # of exeext.
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3310 $as_echo_n "checking whether the C compiler works... " >&6; }
3311 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3312
3313 # The possible output files:
3314 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3315
3316 ac_rmfiles=
3317 for ac_file in $ac_files
3318 do
3319   case $ac_file in
3320     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3321     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3322   esac
3323 done
3324 rm -f $ac_rmfiles
3325
3326 if { { ac_try="$ac_link_default"
3327 case "(($ac_try" in
3328   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3329   *) ac_try_echo=$ac_try;;
3330 esac
3331 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3332 $as_echo "$ac_try_echo"; } >&5
3333   (eval "$ac_link_default") 2>&5
3334   ac_status=$?
3335   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3336   test $ac_status = 0; }; then :
3337   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3338 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3339 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3340 # so that the user can short-circuit this test for compilers unknown to
3341 # Autoconf.
3342 for ac_file in $ac_files ''
3343 do
3344   test -f "$ac_file" || continue
3345   case $ac_file in
3346     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3347         ;;
3348     [ab].out )
3349         # We found the default executable, but exeext='' is most
3350         # certainly right.
3351         break;;
3352     *.* )
3353         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3354         then :; else
3355            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3356         fi
3357         # We set ac_cv_exeext here because the later test for it is not
3358         # safe: cross compilers may not add the suffix if given an `-o'
3359         # argument, so we may need to know it at that point already.
3360         # Even if this section looks crufty: it has the advantage of
3361         # actually working.
3362         break;;
3363     * )
3364         break;;
3365   esac
3366 done
3367 test "$ac_cv_exeext" = no && ac_cv_exeext=
3368
3369 else
3370   ac_file=''
3371 fi
3372 if test -z "$ac_file"; then :
3373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3374 $as_echo "no" >&6; }
3375 $as_echo "$as_me: failed program was:" >&5
3376 sed 's/^/| /' conftest.$ac_ext >&5
3377
3378 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3379 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3380 as_fn_error 77 "C compiler cannot create executables
3381 See \`config.log' for more details" "$LINENO" 5; }
3382 else
3383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3384 $as_echo "yes" >&6; }
3385 fi
3386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3387 $as_echo_n "checking for C compiler default output file name... " >&6; }
3388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3389 $as_echo "$ac_file" >&6; }
3390 ac_exeext=$ac_cv_exeext
3391
3392 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3393 ac_clean_files=$ac_clean_files_save
3394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3395 $as_echo_n "checking for suffix of executables... " >&6; }
3396 if { { ac_try="$ac_link"
3397 case "(($ac_try" in
3398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3399   *) ac_try_echo=$ac_try;;
3400 esac
3401 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3402 $as_echo "$ac_try_echo"; } >&5
3403   (eval "$ac_link") 2>&5
3404   ac_status=$?
3405   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3406   test $ac_status = 0; }; then :
3407   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3408 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3409 # work properly (i.e., refer to `conftest.exe'), while it won't with
3410 # `rm'.
3411 for ac_file in conftest.exe conftest conftest.*; do
3412   test -f "$ac_file" || continue
3413   case $ac_file in
3414     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3415     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3416           break;;
3417     * ) break;;
3418   esac
3419 done
3420 else
3421   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3422 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3423 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3424 See \`config.log' for more details" "$LINENO" 5; }
3425 fi
3426 rm -rf conftest conftest$ac_cv_exeext
3427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3428 $as_echo "$ac_cv_exeext" >&6; }
3429
3430 rm -rf conftest.$ac_ext
3431 EXEEXT=$ac_cv_exeext
3432 ac_exeext=$EXEEXT
3433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3434 /* end confdefs.h.  */
3435 #include <stdio.h>
3436 int
3437 main ()
3438 {
3439 FILE *f = fopen ("conftest.out", "w");
3440  return ferror (f) || fclose (f) != 0;
3441
3442   ;
3443   return 0;
3444 }
3445 _ACEOF
3446 ac_clean_files="$ac_clean_files conftest.out"
3447 # Check that the compiler produces executables we can run.  If not, either
3448 # the compiler is broken, or we cross compile.
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3450 $as_echo_n "checking whether we are cross compiling... " >&6; }
3451 if test "$cross_compiling" != yes; then
3452   { { ac_try="$ac_link"
3453 case "(($ac_try" in
3454   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3455   *) ac_try_echo=$ac_try;;
3456 esac
3457 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3458 $as_echo "$ac_try_echo"; } >&5
3459   (eval "$ac_link") 2>&5
3460   ac_status=$?
3461   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3462   test $ac_status = 0; }
3463   if { ac_try='./conftest$ac_cv_exeext'
3464   { { case "(($ac_try" in
3465   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3466   *) ac_try_echo=$ac_try;;
3467 esac
3468 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3469 $as_echo "$ac_try_echo"; } >&5
3470   (eval "$ac_try") 2>&5
3471   ac_status=$?
3472   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3473   test $ac_status = 0; }; }; then
3474     cross_compiling=no
3475   else
3476     if test "$cross_compiling" = maybe; then
3477         cross_compiling=yes
3478     else
3479         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3480 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3481 as_fn_error $? "cannot run C compiled programs.
3482 If you meant to cross compile, use \`--host'.
3483 See \`config.log' for more details" "$LINENO" 5; }
3484     fi
3485   fi
3486 fi
3487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3488 $as_echo "$cross_compiling" >&6; }
3489
3490 rm -rf conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3491 ac_clean_files=$ac_clean_files_save
3492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3493 $as_echo_n "checking for suffix of object files... " >&6; }
3494 if ${ac_cv_objext+:} false; then :
3495   $as_echo_n "(cached) " >&6
3496 else
3497   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3498 /* end confdefs.h.  */
3499
3500 int
3501 main ()
3502 {
3503
3504   ;
3505   return 0;
3506 }
3507 _ACEOF
3508 rm -rf conftest.o conftest.obj
3509 if { { ac_try="$ac_compile"
3510 case "(($ac_try" in
3511   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3512   *) ac_try_echo=$ac_try;;
3513 esac
3514 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3515 $as_echo "$ac_try_echo"; } >&5
3516   (eval "$ac_compile") 2>&5
3517   ac_status=$?
3518   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3519   test $ac_status = 0; }; then :
3520   for ac_file in conftest.o conftest.obj conftest.*; do
3521   test -f "$ac_file" || continue;
3522   case $ac_file in
3523     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3524     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3525        break;;
3526   esac
3527 done
3528 else
3529   $as_echo "$as_me: failed program was:" >&5
3530 sed 's/^/| /' conftest.$ac_ext >&5
3531
3532 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3533 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3534 as_fn_error $? "cannot compute suffix of object files: cannot compile
3535 See \`config.log' for more details" "$LINENO" 5; }
3536 fi
3537 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
3538 fi
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3540 $as_echo "$ac_cv_objext" >&6; }
3541 OBJEXT=$ac_cv_objext
3542 ac_objext=$OBJEXT
3543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3544 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3545 if ${ac_cv_c_compiler_gnu+:} false; then :
3546   $as_echo_n "(cached) " >&6
3547 else
3548   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3549 /* end confdefs.h.  */
3550
3551 int
3552 main ()
3553 {
3554 #ifndef __GNUC__
3555        choke me
3556 #endif
3557
3558   ;
3559   return 0;
3560 }
3561 _ACEOF
3562 if ac_fn_c_try_compile "$LINENO"; then :
3563   ac_compiler_gnu=yes
3564 else
3565   ac_compiler_gnu=no
3566 fi
3567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3568 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3569
3570 fi
3571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3572 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3573 if test $ac_compiler_gnu = yes; then
3574   GCC=yes
3575 else
3576   GCC=
3577 fi
3578 ac_test_CFLAGS=${CFLAGS+set}
3579 ac_save_CFLAGS=$CFLAGS
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3581 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3582 if ${ac_cv_prog_cc_g+:} false; then :
3583   $as_echo_n "(cached) " >&6
3584 else
3585   ac_save_c_werror_flag=$ac_c_werror_flag
3586    ac_c_werror_flag=yes
3587    ac_cv_prog_cc_g=no
3588    CFLAGS="-g"
3589    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3590 /* end confdefs.h.  */
3591
3592 int
3593 main ()
3594 {
3595
3596   ;
3597   return 0;
3598 }
3599 _ACEOF
3600 if ac_fn_c_try_compile "$LINENO"; then :
3601   ac_cv_prog_cc_g=yes
3602 else
3603   CFLAGS=""
3604       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3605 /* end confdefs.h.  */
3606
3607 int
3608 main ()
3609 {
3610
3611   ;
3612   return 0;
3613 }
3614 _ACEOF
3615 if ac_fn_c_try_compile "$LINENO"; then :
3616
3617 else
3618   ac_c_werror_flag=$ac_save_c_werror_flag
3619          CFLAGS="-g"
3620          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3621 /* end confdefs.h.  */
3622
3623 int
3624 main ()
3625 {
3626
3627   ;
3628   return 0;
3629 }
3630 _ACEOF
3631 if ac_fn_c_try_compile "$LINENO"; then :
3632   ac_cv_prog_cc_g=yes
3633 fi
3634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3635 fi
3636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3637 fi
3638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3639    ac_c_werror_flag=$ac_save_c_werror_flag
3640 fi
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3642 $as_echo "$ac_cv_prog_cc_g" >&6; }
3643 if test "$ac_test_CFLAGS" = set; then
3644   CFLAGS=$ac_save_CFLAGS
3645 elif test $ac_cv_prog_cc_g = yes; then
3646   if test "$GCC" = yes; then
3647     CFLAGS="-g -O2"
3648   else
3649     CFLAGS="-g"
3650   fi
3651 else
3652   if test "$GCC" = yes; then
3653     CFLAGS="-O2"
3654   else
3655     CFLAGS=
3656   fi
3657 fi
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3659 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3660 if ${ac_cv_prog_cc_c89+:} false; then :
3661   $as_echo_n "(cached) " >&6
3662 else
3663   ac_cv_prog_cc_c89=no
3664 ac_save_CC=$CC
3665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3666 /* end confdefs.h.  */
3667 #include <stdarg.h>
3668 #include <stdio.h>
3669 struct stat;
3670 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3671 struct buf { int x; };
3672 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3673 static char *e (p, i)
3674      char **p;
3675      int i;
3676 {
3677   return p[i];
3678 }
3679 static char *f (char * (*g) (char **, int), char **p, ...)
3680 {
3681   char *s;
3682   va_list v;
3683   va_start (v,p);
3684   s = g (p, va_arg (v,int));
3685   va_end (v);
3686   return s;
3687 }
3688
3689 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3690    function prototypes and stuff, but not '\xHH' hex character constants.
3691    These don't provoke an error unfortunately, instead are silently treated
3692    as 'x'.  The following induces an error, until -std is added to get
3693    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3694    array size at least.  It's necessary to write '\x00'==0 to get something
3695    that's true only with -std.  */
3696 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3697
3698 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3699    inside strings and character constants.  */
3700 #define FOO(x) 'x'
3701 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3702
3703 int test (int i, double x);
3704 struct s1 {int (*f) (int a);};
3705 struct s2 {int (*f) (double a);};
3706 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3707 int argc;
3708 char **argv;
3709 int
3710 main ()
3711 {
3712 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3713   ;
3714   return 0;
3715 }
3716 _ACEOF
3717 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3718         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3719 do
3720   CC="$ac_save_CC $ac_arg"
3721   if ac_fn_c_try_compile "$LINENO"; then :
3722   ac_cv_prog_cc_c89=$ac_arg
3723 fi
3724 rm -f core conftest.err conftest.$ac_objext
3725   test "x$ac_cv_prog_cc_c89" != "xno" && break
3726 done
3727 rm -rf conftest.$ac_ext
3728 CC=$ac_save_CC
3729
3730 fi
3731 # AC_CACHE_VAL
3732 case "x$ac_cv_prog_cc_c89" in
3733   x)
3734     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3735 $as_echo "none needed" >&6; } ;;
3736   xno)
3737     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3738 $as_echo "unsupported" >&6; } ;;
3739   *)
3740     CC="$CC $ac_cv_prog_cc_c89"
3741     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3742 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3743 esac
3744 if test "x$ac_cv_prog_cc_c89" != xno; then :
3745
3746 fi
3747
3748 ac_ext=c
3749 ac_cpp='$CPP $CPPFLAGS'
3750 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3751 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3752 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3753
3754
3755 have_pthread=no
3756   with_pthread_req=unspecified
3757
3758   # AX_PTHREAD is from the GNU Autoconf Archive.
3759   # https://savannah.gnu.org/projects/autoconf-archive/
3760   # ===========================================================================
3761 #        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
3762 # ===========================================================================
3763 #
3764 # SYNOPSIS
3765 #
3766 #   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
3767 #
3768 # DESCRIPTION
3769 #
3770 #   This macro figures out how to build C programs using POSIX threads. It
3771 #   sets the PTHREAD_LIBS output variable to the threads library and linker
3772 #   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
3773 #   flags that are needed. (The user can also force certain compiler
3774 #   flags/libs to be tested by setting these environment variables.)
3775 #
3776 #   Also sets PTHREAD_CC to any special C compiler that is needed for
3777 #   multi-threaded programs (defaults to the value of CC otherwise). (This
3778 #   is necessary on AIX to use the special cc_r compiler alias.)
3779 #
3780 #   NOTE: You are assumed to not only compile your program with these flags,
3781 #   but also link it with them as well. e.g. you should link with
3782 #   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
3783 #
3784 #   If you are only building threads programs, you may wish to use these
3785 #   variables in your default LIBS, CFLAGS, and CC:
3786 #
3787 #     LIBS="$PTHREAD_LIBS $LIBS"
3788 #     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
3789 #     CC="$PTHREAD_CC"
3790 #
3791 #   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
3792 #   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
3793 #   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
3794 #
3795 #   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
3796 #   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
3797 #   PTHREAD_CFLAGS.
3798 #
3799 #   ACTION-IF-FOUND is a list of shell commands to run if a threads library
3800 #   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
3801 #   is not found. If ACTION-IF-FOUND is not specified, the default action
3802 #   will define HAVE_PTHREAD.
3803 #
3804 #   Please let the authors know if this macro fails on any platform, or if
3805 #   you have any other suggestions or comments. This macro was based on work
3806 #   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
3807 #   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
3808 #   Alejandro Forero Cuervo to the autoconf macro repository. We are also
3809 #   grateful for the helpful feedback of numerous users.
3810 #
3811 #   Updated for Autoconf 2.68 by Daniel Richard G.
3812 #
3813 # LICENSE
3814 #
3815 #   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
3816 #   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
3817 #
3818 #   This program is free software: you can redistribute it and/or modify it
3819 #   under the terms of the GNU General Public License as published by the
3820 #   Free Software Foundation, either version 3 of the License, or (at your
3821 #   option) any later version.
3822 #
3823 #   This program is distributed in the hope that it will be useful, but
3824 #   WITHOUT ANY WARRANTY; without even the implied warranty of
3825 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
3826 #   Public License for more details.
3827 #
3828 #   You should have received a copy of the GNU General Public License along
3829 #   with this program. If not, see <http://www.gnu.org/licenses/>.
3830 #
3831 #   As a special exception, the respective Autoconf Macro's copyright owner
3832 #   gives unlimited permission to copy, distribute and modify the configure
3833 #   scripts that are the output of Autoconf when processing the Macro. You
3834 #   need not follow the terms of the GNU General Public License when using
3835 #   or distributing such scripts, even though portions of the text of the
3836 #   Macro appear in them. The GNU General Public License (GPL) does govern
3837 #   all other use of the material that constitutes the Autoconf Macro.
3838 #
3839 #   This special exception to the GPL applies to versions of the Autoconf
3840 #   Macro released by the Autoconf Archive. When you make and distribute a
3841 #   modified version of the Autoconf Macro, you may extend this special
3842 #   exception to the GPL to apply to your modified version as well.
3843
3844 #serial 21
3845
3846 # This is what autoupdate's m4 run will expand.  It fires
3847 # the warning (with _au_warn_XXX), outputs it into the
3848 # updated configure.ac (with AC_DIAGNOSE), and then outputs
3849 # the replacement expansion.
3850
3851
3852 # This is an auxiliary macro that is also run when
3853 # autoupdate runs m4.  It simply calls m4_warning, but
3854 # we need a wrapper so that each warning is emitted only
3855 # once.  We break the quoting in m4_warning's argument in
3856 # order to expand this macro's arguments, not AU_DEFUN's.
3857
3858
3859 # Finally, this is the expansion that is picked up by
3860 # autoconf.  It tells the user to run autoupdate, and
3861 # then outputs the replacement expansion.  We do not care
3862 # about autoupdate's warning because that contains
3863 # information on what to do *after* running autoupdate.
3864
3865
3866
3867   # This affects CC, LIBS, and CFLAGS, instead of defining new variables.
3868
3869
3870 # Check whether --with-pthread was given.
3871 if test "${with_pthread+set}" = set; then :
3872   withval=$with_pthread; with_pthread="$withval"; with_pthread_req="$withval"
3873 else
3874   with_pthread=yes
3875 fi
3876
3877
3878   if test "$with_pthread" = yes; then
3879     # AX_PTHREAD might want a different compiler.
3880
3881
3882 ac_ext=c
3883 ac_cpp='$CPP $CPPFLAGS'
3884 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3885 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3886 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3887
3888 ax_pthread_ok=no
3889
3890 # We used to check for pthread.h first, but this fails if pthread.h
3891 # requires special compiler flags (e.g. on True64 or Sequent).
3892 # It gets checked for in the link test anyway.
3893
3894 # First of all, check if the user has set any of the PTHREAD_LIBS,
3895 # etcetera environment variables, and if threads linking works using
3896 # them:
3897 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
3898         save_CFLAGS="$CFLAGS"
3899         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
3900         save_LIBS="$LIBS"
3901         LIBS="$PTHREAD_LIBS $LIBS"
3902         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
3903 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
3904         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3905 /* end confdefs.h.  */
3906
3907 /* Override any GCC internal prototype to avoid an error.
3908    Use char because int might match the return type of a GCC
3909    builtin and then its argument prototype would still apply.  */
3910 #ifdef __cplusplus
3911 extern "C"
3912 #endif
3913 char pthread_join ();
3914 int
3915 main ()
3916 {
3917 return pthread_join ();
3918   ;
3919   return 0;
3920 }
3921 _ACEOF
3922 if ac_fn_c_try_link "$LINENO"; then :
3923   ax_pthread_ok=yes
3924 fi
3925 rm -f core conftest.err conftest.$ac_objext \
3926     conftest$ac_exeext conftest.$ac_ext
3927         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
3928 $as_echo "$ax_pthread_ok" >&6; }
3929         if test x"$ax_pthread_ok" = xno; then
3930                 PTHREAD_LIBS=""
3931                 PTHREAD_CFLAGS=""
3932         fi
3933         LIBS="$save_LIBS"
3934         CFLAGS="$save_CFLAGS"
3935 fi
3936
3937 # We must check for the threads library under a number of different
3938 # names; the ordering is very important because some systems
3939 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
3940 # libraries is broken (non-POSIX).
3941
3942 # Create a list of thread flags to try.  Items starting with a "-" are
3943 # C compiler flags, and other items are library names, except for "none"
3944 # which indicates that we try without any flags at all, and "pthread-config"
3945 # which is a program returning the flags for the Pth emulation library.
3946
3947 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3948
3949 # The ordering *is* (sometimes) important.  Some notes on the
3950 # individual items follow:
3951
3952 # pthreads: AIX (must check this before -lpthread)
3953 # none: in case threads are in libc; should be tried before -Kthread and
3954 #       other compiler flags to prevent continual compiler warnings
3955 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
3956 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
3957 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3958 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
3959 # -pthreads: Solaris/gcc
3960 # -mthreads: Mingw32/gcc, Lynx/gcc
3961 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
3962 #      doesn't hurt to check since this sometimes defines pthreads too;
3963 #      also defines -D_REENTRANT)
3964 #      ... -mt is also the pthreads flag for HP/aCC
3965 # pthread: Linux, etcetera
3966 # --thread-safe: KAI C++
3967 # pthread-config: use pthread-config program (for GNU Pth library)
3968
3969 case ${host_os} in
3970         solaris*)
3971
3972         # On Solaris (at least, for some versions), libc contains stubbed
3973         # (non-functional) versions of the pthreads routines, so link-based
3974         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
3975         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
3976         # a function called by this macro, so we could check for that, but
3977         # who knows whether they'll stub that too in a future libc.)  So,
3978         # we'll just look for -pthreads and -lpthread first:
3979
3980         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
3981         ;;
3982
3983         darwin*)
3984         ax_pthread_flags="-pthread $ax_pthread_flags"
3985         ;;
3986 esac
3987
3988 # Clang doesn't consider unrecognized options an error unless we specify
3989 # -Werror. We throw in some extra Clang-specific options to ensure that
3990 # this doesn't happen for GCC, which also accepts -Werror.
3991
3992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
3993 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
3994 save_CFLAGS="$CFLAGS"
3995 ax_pthread_extra_flags="-Werror"
3996 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
3997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3998 /* end confdefs.h.  */
3999 int foo(void);
4000 int
4001 main ()
4002 {
4003 foo()
4004   ;
4005   return 0;
4006 }
4007 _ACEOF
4008 if ac_fn_c_try_compile "$LINENO"; then :
4009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4010 $as_echo "yes" >&6; }
4011 else
4012   ax_pthread_extra_flags=
4013                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4014 $as_echo "no" >&6; }
4015 fi
4016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4017 CFLAGS="$save_CFLAGS"
4018
4019 if test x"$ax_pthread_ok" = xno; then
4020 for flag in $ax_pthread_flags; do
4021
4022         case $flag in
4023                 none)
4024                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
4025 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
4026                 ;;
4027
4028                 -*)
4029                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
4030 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
4031                 PTHREAD_CFLAGS="$flag"
4032                 ;;
4033
4034                 pthread-config)
4035                 # Extract the first word of "pthread-config", so it can be a program name with args.
4036 set dummy pthread-config; ac_word=$2
4037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4038 $as_echo_n "checking for $ac_word... " >&6; }
4039 if ${ac_cv_prog_ax_pthread_config+:} false; then :
4040   $as_echo_n "(cached) " >&6
4041 else
4042   if test -n "$ax_pthread_config"; then
4043   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
4044 else
4045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4046 for as_dir in $PATH
4047 do
4048   IFS=$as_save_IFS
4049   test -z "$as_dir" && as_dir=.
4050     for ac_exec_ext in '' $ac_executable_extensions; do
4051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4052     ac_cv_prog_ax_pthread_config="yes"
4053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4054     break 2
4055   fi
4056 done
4057   done
4058 IFS=$as_save_IFS
4059
4060   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
4061 fi
4062 fi
4063 ax_pthread_config=$ac_cv_prog_ax_pthread_config
4064 if test -n "$ax_pthread_config"; then
4065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
4066 $as_echo "$ax_pthread_config" >&6; }
4067 else
4068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4069 $as_echo "no" >&6; }
4070 fi
4071
4072
4073                 if test x"$ax_pthread_config" = xno; then continue; fi
4074                 PTHREAD_CFLAGS="`pthread-config --cflags`"
4075                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
4076                 ;;
4077
4078                 *)
4079                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
4080 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
4081                 PTHREAD_LIBS="-l$flag"
4082                 ;;
4083         esac
4084
4085         save_LIBS="$LIBS"
4086         save_CFLAGS="$CFLAGS"
4087         LIBS="$PTHREAD_LIBS $LIBS"
4088         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
4089
4090         # Check for various functions.  We must include pthread.h,
4091         # since some functions may be macros.  (On the Sequent, we
4092         # need a special flag -Kthread to make this header compile.)
4093         # We check for pthread_join because it is in -lpthread on IRIX
4094         # while pthread_create is in libc.  We check for pthread_attr_init
4095         # due to DEC craziness with -lpthreads.  We check for
4096         # pthread_cleanup_push because it is one of the few pthread
4097         # functions on Solaris that doesn't have a non-functional libc stub.
4098         # We try pthread_create on general principles.
4099         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4100 /* end confdefs.h.  */
4101 #include <pthread.h>
4102                         static void routine(void *a) { a = 0; }
4103                         static void *start_routine(void *a) { return a; }
4104 int
4105 main ()
4106 {
4107 pthread_t th; pthread_attr_t attr;
4108                         pthread_create(&th, 0, start_routine, 0);
4109                         pthread_join(th, 0);
4110                         pthread_attr_init(&attr);
4111                         pthread_cleanup_push(routine, 0);
4112                         pthread_cleanup_pop(0) /* ; */
4113   ;
4114   return 0;
4115 }
4116 _ACEOF
4117 if ac_fn_c_try_link "$LINENO"; then :
4118   ax_pthread_ok=yes
4119 fi
4120 rm -f core conftest.err conftest.$ac_objext \
4121     conftest$ac_exeext conftest.$ac_ext
4122
4123         LIBS="$save_LIBS"
4124         CFLAGS="$save_CFLAGS"
4125
4126         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
4127 $as_echo "$ax_pthread_ok" >&6; }
4128         if test "x$ax_pthread_ok" = xyes; then
4129                 break;
4130         fi
4131
4132         PTHREAD_LIBS=""
4133         PTHREAD_CFLAGS=""
4134 done
4135 fi
4136
4137 # Various other checks:
4138 if test "x$ax_pthread_ok" = xyes; then
4139         save_LIBS="$LIBS"
4140         LIBS="$PTHREAD_LIBS $LIBS"
4141         save_CFLAGS="$CFLAGS"
4142         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
4143
4144         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
4145         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
4146 $as_echo_n "checking for joinable pthread attribute... " >&6; }
4147         attr_name=unknown
4148         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
4149             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4150 /* end confdefs.h.  */
4151 #include <pthread.h>
4152 int
4153 main ()
4154 {
4155 int attr = $attr; return attr /* ; */
4156   ;
4157   return 0;
4158 }
4159 _ACEOF
4160 if ac_fn_c_try_link "$LINENO"; then :
4161   attr_name=$attr; break
4162 fi
4163 rm -f core conftest.err conftest.$ac_objext \
4164     conftest$ac_exeext conftest.$ac_ext
4165         done
4166         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
4167 $as_echo "$attr_name" >&6; }
4168         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
4169
4170 cat >>confdefs.h <<_ACEOF
4171 #define PTHREAD_CREATE_JOINABLE $attr_name
4172 _ACEOF
4173
4174         fi
4175
4176         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
4177 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
4178         flag=no
4179         case ${host_os} in
4180             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
4181             osf* | hpux*) flag="-D_REENTRANT";;
4182             solaris*)
4183             if test "$GCC" = "yes"; then
4184                 flag="-D_REENTRANT"
4185             else
4186                 # TODO: What about Clang on Solaris?
4187                 flag="-mt -D_REENTRANT"
4188             fi
4189             ;;
4190         esac
4191         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
4192 $as_echo "$flag" >&6; }
4193         if test "x$flag" != xno; then
4194             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
4195         fi
4196
4197         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
4198 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
4199 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
4200   $as_echo_n "(cached) " >&6
4201 else
4202
4203                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4204 /* end confdefs.h.  */
4205 #include <pthread.h>
4206 int
4207 main ()
4208 {
4209 int i = PTHREAD_PRIO_INHERIT;
4210   ;
4211   return 0;
4212 }
4213 _ACEOF
4214 if ac_fn_c_try_link "$LINENO"; then :
4215   ax_cv_PTHREAD_PRIO_INHERIT=yes
4216 else
4217   ax_cv_PTHREAD_PRIO_INHERIT=no
4218 fi
4219 rm -f core conftest.err conftest.$ac_objext \
4220     conftest$ac_exeext conftest.$ac_ext
4221
4222 fi
4223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
4224 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
4225         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
4226
4227 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
4228
4229 fi
4230
4231         LIBS="$save_LIBS"
4232         CFLAGS="$save_CFLAGS"
4233
4234         # More AIX lossage: compile with *_r variant
4235         if test "x$GCC" != xyes; then
4236             case $host_os in
4237                 aix*)
4238                 case "x/$CC" in #(
4239   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
4240     #handle absolute path differently from PATH based program lookup
4241                    case "x$CC" in #(
4242   x/*) :
4243     if as_fn_executable_p ${CC}_r; then :
4244   PTHREAD_CC="${CC}_r"
4245 fi ;; #(
4246   *) :
4247     for ac_prog in ${CC}_r
4248 do
4249   # Extract the first word of "$ac_prog", so it can be a program name with args.
4250 set dummy $ac_prog; ac_word=$2
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4252 $as_echo_n "checking for $ac_word... " >&6; }
4253 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
4254   $as_echo_n "(cached) " >&6
4255 else
4256   if test -n "$PTHREAD_CC"; then
4257   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
4258 else
4259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4260 for as_dir in $PATH
4261 do
4262   IFS=$as_save_IFS
4263   test -z "$as_dir" && as_dir=.
4264     for ac_exec_ext in '' $ac_executable_extensions; do
4265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4266     ac_cv_prog_PTHREAD_CC="$ac_prog"
4267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4268     break 2
4269   fi
4270 done
4271   done
4272 IFS=$as_save_IFS
4273
4274 fi
4275 fi
4276 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
4277 if test -n "$PTHREAD_CC"; then
4278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
4279 $as_echo "$PTHREAD_CC" >&6; }
4280 else
4281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4282 $as_echo "no" >&6; }
4283 fi
4284
4285
4286   test -n "$PTHREAD_CC" && break
4287 done
4288 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
4289  ;;
4290 esac ;; #(
4291   *) :
4292      ;;
4293 esac
4294                 ;;
4295             esac
4296         fi
4297 fi
4298
4299 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
4300
4301
4302
4303
4304
4305 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
4306 if test x"$ax_pthread_ok" = xyes; then
4307         if test "$CC" = "$PTHREAD_CC" -o -z "$ac_original_cc"; then
4308         have_pthread=yes
4309       else
4310         ac_prog_cc_no_pthread=yes
4311       fi
4312
4313         :
4314 else
4315         ax_pthread_ok=no
4316
4317 fi
4318 ac_ext=c
4319 ac_cpp='$CPP $CPPFLAGS'
4320 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4321 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4322 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4323
4324
4325
4326     if test "$have_pthread" = yes; then
4327       $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
4328
4329       CC=$PTHREAD_CC
4330     fi
4331   fi
4332  # Needs ac_original_cc.
4333
4334
4335
4336   if test -z "$GCC"; then
4337     # not using GCC
4338     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to request ANSI compilation" >&5
4339 $as_echo_n "checking how to request ANSI compilation... " >&6; }
4340     case "$host" in
4341       *-hpux* )
4342         { $as_echo "$as_me:${as_lineno-$LINENO}: result: HPUX: adding -Ae" >&5
4343 $as_echo "HPUX: adding -Ae" >&6; }
4344         CC="$CC -Ae"
4345       ;;
4346       *-aix* )
4347         { $as_echo "$as_me:${as_lineno-$LINENO}: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
4348 $as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
4349         CC="$CC -qlanglvl=ansi -qhalt=e"
4350       ;;
4351       *-dec-* )
4352         { $as_echo "$as_me:${as_lineno-$LINENO}: result: DEC: adding -std1 -ieee" >&5
4353 $as_echo "DEC: adding -std1 -ieee" >&6; }
4354         CC="$CC -std1"
4355       ;;
4356       *)
4357         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no idea" >&5
4358 $as_echo "no idea" >&6; }
4359       ;;
4360     esac
4361   else
4362     # using GCC
4363     case "$host" in
4364       *-solaris*)
4365         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris: adding -D__EXTENSIONS__" >&5
4366 $as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
4367         CC="$CC -D__EXTENSIONS__"
4368       ;;
4369     esac
4370   fi
4371
4372   OBJCC="$CC"
4373
4374   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler works on ANSI C" >&5
4375 $as_echo_n "checking whether the compiler works on ANSI C... " >&6; }
4376   if test "$cross_compiling" = yes; then :
4377   as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
4378 else
4379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4380 /* end confdefs.h.  */
4381  main(int ac, char **av) { return 0; }
4382 _ACEOF
4383 if ac_fn_c_try_run "$LINENO"; then :
4384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4385 $as_echo "yes" >&6; }
4386 else
4387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4388 $as_echo "no" >&6; }
4389      as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5
4390 fi
4391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4392   conftest.$ac_objext conftest.beam conftest.$ac_ext
4393 fi
4394
4395
4396   if test -n "$GCC"; then
4397     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on gcc compiler warnings." >&5
4398 $as_echo "Turning on gcc compiler warnings." >&6; }
4399     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
4400     OBJCC="$OBJCC -Wall"
4401     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
4402     # and so perhaps now we can do without -pedantic?
4403   else
4404     case "$host" in
4405       *-irix5* |*-irix6.0-3* )
4406         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Turning on SGI compiler warnings." >&5
4407 $as_echo "Turning on SGI compiler warnings." >&6; }
4408         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
4409       ;;
4410 #     *-dec-osf* )
4411 #       if test -z "$GCC"; then
4412 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
4413 #         CC="$CC -migrate -w0 -verbose -warnprotos"
4414 #       fi
4415 #     ;;
4416     esac
4417   fi
4418
4419 if test -n "$GCC"; then
4420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wno-overlength-strings" >&5
4421 $as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
4422 if ${ac_cv_gcc_accepts_no_overlength+:} 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 -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4428           grep unrecognized >/dev/null ); then
4429        ac_cv_gcc_accepts_no_overlength=no
4430      else
4431        ac_cv_gcc_accepts_no_overlength=yes
4432        CC="$CC -Wno-overlength-strings"
4433      fi
4434 fi
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_overlength" >&5
4436 $as_echo "$ac_cv_gcc_accepts_no_overlength" >&6; }
4437    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
4438   fi
4439
4440 if test -n "$GCC"; then
4441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wdeclaration-after-statement" >&5
4442 $as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
4443 if ${ac_cv_gcc_accepts_no_decl_after+:} false; then :
4444   $as_echo_n "(cached) " >&6
4445 else
4446   rm -rf conftest.$ac_ext
4447      touch conftest.$ac_ext
4448      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4449           grep unrecognized >/dev/null ); then
4450        ac_cv_gcc_accepts_no_decl_after=no
4451      else
4452        ac_cv_gcc_accepts_no_decl_after=yes
4453        CC="$CC -Wdeclaration-after-statement"
4454      fi
4455 fi
4456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_decl_after" >&5
4457 $as_echo "$ac_cv_gcc_accepts_no_decl_after" >&6; }
4458    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
4459   fi
4460
4461 if test -n "$GCC"; then
4462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -no-cpp-precomp" >&5
4463 $as_echo_n "checking whether gcc accepts -no-cpp-precomp... " >&6; }
4464 if ${ac_cv_gcc_accepts_no_cpp_precomp+:} false; then :
4465   $as_echo_n "(cached) " >&6
4466 else
4467   rm -rf conftest.$ac_ext
4468      touch conftest.$ac_ext
4469      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4470           grep unrecognized >/dev/null ); then
4471        ac_cv_gcc_accepts_no_cpp_precomp=no
4472      else
4473        ac_cv_gcc_accepts_no_cpp_precomp=yes
4474        CC="$CC -no-cpp-precomp"
4475      fi
4476 fi
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
4478 $as_echo "$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
4479    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
4480   fi
4481
4482 if test -n "$GCC"; then
4483
4484   case "$host" in
4485     *-darwin* )
4486       # Fucking Apple let // comments sneak into OpenGL headers, so
4487       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
4488     ;;
4489    *)
4490      if test -n "$GCC"; then
4491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -std=c89" >&5
4492 $as_echo_n "checking whether gcc accepts -std=c89... " >&6; }
4493 if ${ac_cv_gcc_accepts_std+:} false; then :
4494   $as_echo_n "(cached) " >&6
4495 else
4496   rm -rf conftest.$ac_ext
4497      touch conftest.$ac_ext
4498      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
4499           grep unrecognized >/dev/null ); then
4500        ac_cv_gcc_accepts_std=no
4501      else
4502        ac_cv_gcc_accepts_std=yes
4503        CC="$CC -std=c89"
4504      fi
4505 fi
4506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_accepts_std" >&5
4507 $as_echo "$ac_cv_gcc_accepts_std" >&6; }
4508    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
4509   fi
4510
4511    ;;
4512   esac
4513
4514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling C++ comments in ANSI C code." >&5
4515 $as_echo "Disabling C++ comments in ANSI C code." >&6; }
4516    #
4517    # The reason that // comments are banned from xscreensaver is that gcc is
4518    # basically the only compiler in the world that supports them in C code.
4519    # All other vendors support them only in their C++ compilers, not in their
4520    # ANSI C compilers.  This means that it's a portability problem: every time
4521    # these comments have snuck into the xscreensaver source code, I've gotten
4522    # complaints about it the next day.  So we turn off support for them in gcc
4523    # as well to prevent them from accidentially slipping in.
4524    #
4525    if test "$ac_gcc_accepts_std" = yes ; then
4526      #
4527      # -std=c89 defines __STRICT_ANSI__, which we don't want.
4528      # (That appears to be the only additional preprocessor symbol
4529      # it defines, in addition to the syntax changes it makes.)
4530      #
4531      # -std=gnu89 is no good, because // comments were a GNU extension
4532      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
4533      # with -std=gnu89 but not with -std=c89.)
4534      #
4535      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
4536      CC="$CC -U__STRICT_ANSI__"
4537 #   else
4538 #     # The old way:
4539 #     CC="$CC -Wp,-lang-c89"
4540    fi
4541   fi
4542
4543 ac_ext=c
4544 ac_cpp='$CPP $CPPFLAGS'
4545 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4546 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4547 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4549 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4550 # On Suns, sometimes $CPP names a directory.
4551 if test -n "$CPP" && test -d "$CPP"; then
4552   CPP=
4553 fi
4554 if test -z "$CPP"; then
4555   if ${ac_cv_prog_CPP+:} false; then :
4556   $as_echo_n "(cached) " >&6
4557 else
4558       # Double quotes because CPP needs to be expanded
4559     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4560     do
4561       ac_preproc_ok=false
4562 for ac_c_preproc_warn_flag in '' yes
4563 do
4564   # Use a header file that comes with gcc, so configuring glibc
4565   # with a fresh cross-compiler works.
4566   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4567   # <limits.h> exists even on freestanding compilers.
4568   # On the NeXT, cc -E runs the code through the compiler's parser,
4569   # not just through cpp. "Syntax error" is here to catch this case.
4570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4571 /* end confdefs.h.  */
4572 #ifdef __STDC__
4573 # include <limits.h>
4574 #else
4575 # include <assert.h>
4576 #endif
4577                      Syntax error
4578 _ACEOF
4579 if ac_fn_c_try_cpp "$LINENO"; then :
4580
4581 else
4582   # Broken: fails on valid input.
4583 continue
4584 fi
4585 rm -rf conftest.err conftest.i conftest.$ac_ext
4586
4587   # OK, works on sane cases.  Now check whether nonexistent headers
4588   # can be detected and how.
4589   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4590 /* end confdefs.h.  */
4591 #include <ac_nonexistent.h>
4592 _ACEOF
4593 if ac_fn_c_try_cpp "$LINENO"; then :
4594   # Broken: success on invalid input.
4595 continue
4596 else
4597   # Passes both tests.
4598 ac_preproc_ok=:
4599 break
4600 fi
4601 rm -rf conftest.err conftest.i conftest.$ac_ext
4602
4603 done
4604 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4605 rm -rf conftest.i conftest.err conftest.$ac_ext
4606 if $ac_preproc_ok; then :
4607   break
4608 fi
4609
4610     done
4611     ac_cv_prog_CPP=$CPP
4612
4613 fi
4614   CPP=$ac_cv_prog_CPP
4615 else
4616   ac_cv_prog_CPP=$CPP
4617 fi
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4619 $as_echo "$CPP" >&6; }
4620 ac_preproc_ok=false
4621 for ac_c_preproc_warn_flag in '' yes
4622 do
4623   # Use a header file that comes with gcc, so configuring glibc
4624   # with a fresh cross-compiler works.
4625   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4626   # <limits.h> exists even on freestanding compilers.
4627   # On the NeXT, cc -E runs the code through the compiler's parser,
4628   # not just through cpp. "Syntax error" is here to catch this case.
4629   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4630 /* end confdefs.h.  */
4631 #ifdef __STDC__
4632 # include <limits.h>
4633 #else
4634 # include <assert.h>
4635 #endif
4636                      Syntax error
4637 _ACEOF
4638 if ac_fn_c_try_cpp "$LINENO"; then :
4639
4640 else
4641   # Broken: fails on valid input.
4642 continue
4643 fi
4644 rm -rf conftest.err conftest.i conftest.$ac_ext
4645
4646   # OK, works on sane cases.  Now check whether nonexistent headers
4647   # can be detected and how.
4648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4649 /* end confdefs.h.  */
4650 #include <ac_nonexistent.h>
4651 _ACEOF
4652 if ac_fn_c_try_cpp "$LINENO"; then :
4653   # Broken: success on invalid input.
4654 continue
4655 else
4656   # Passes both tests.
4657 ac_preproc_ok=:
4658 break
4659 fi
4660 rm -rf conftest.err conftest.i conftest.$ac_ext
4661
4662 done
4663 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4664 rm -rf conftest.i conftest.err conftest.$ac_ext
4665 if $ac_preproc_ok; then :
4666
4667 else
4668   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4669 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4670 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4671 See \`config.log' for more details" "$LINENO" 5; }
4672 fi
4673
4674 ac_ext=c
4675 ac_cpp='$CPP $CPPFLAGS'
4676 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4677 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4678 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4679
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4681 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4682 if ${ac_cv_c_const+:} false; then :
4683   $as_echo_n "(cached) " >&6
4684 else
4685   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4686 /* end confdefs.h.  */
4687
4688 int
4689 main ()
4690 {
4691
4692 #ifndef __cplusplus
4693   /* Ultrix mips cc rejects this sort of thing.  */
4694   typedef int charset[2];
4695   const charset cs = { 0, 0 };
4696   /* SunOS 4.1.1 cc rejects this.  */
4697   char const *const *pcpcc;
4698   char **ppc;
4699   /* NEC SVR4.0.2 mips cc rejects this.  */
4700   struct point {int x, y;};
4701   static struct point const zero = {0,0};
4702   /* AIX XL C 1.02.0.0 rejects this.
4703      It does not let you subtract one const X* pointer from another in
4704      an arm of an if-expression whose if-part is not a constant
4705      expression */
4706   const char *g = "string";
4707   pcpcc = &g + (g ? g-g : 0);
4708   /* HPUX 7.0 cc rejects these. */
4709   ++pcpcc;
4710   ppc = (char**) pcpcc;
4711   pcpcc = (char const *const *) ppc;
4712   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4713     char tx;
4714     char *t = &tx;
4715     char const *s = 0 ? (char *) 0 : (char const *) 0;
4716
4717     *t++ = 0;
4718     if (s) return 0;
4719   }
4720   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4721     int x[] = {25, 17};
4722     const int *foo = &x[0];
4723     ++foo;
4724   }
4725   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4726     typedef const int *iptr;
4727     iptr p = 0;
4728     ++p;
4729   }
4730   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4731        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4732     struct s { int j; const int *ap[3]; } bx;
4733     struct s *b = &bx; b->j = 5;
4734   }
4735   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4736     const int foo = 10;
4737     if (!foo) return 0;
4738   }
4739   return !cs[0] && !zero.x;
4740 #endif
4741
4742   ;
4743   return 0;
4744 }
4745 _ACEOF
4746 if ac_fn_c_try_compile "$LINENO"; then :
4747   ac_cv_c_const=yes
4748 else
4749   ac_cv_c_const=no
4750 fi
4751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4752 fi
4753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4754 $as_echo "$ac_cv_c_const" >&6; }
4755 if test $ac_cv_c_const = no; then
4756
4757 $as_echo "#define const /**/" >>confdefs.h
4758
4759 fi
4760
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4762 $as_echo_n "checking for inline... " >&6; }
4763 if ${ac_cv_c_inline+:} false; then :
4764   $as_echo_n "(cached) " >&6
4765 else
4766   ac_cv_c_inline=no
4767 for ac_kw in inline __inline__ __inline; do
4768   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4769 /* end confdefs.h.  */
4770 #ifndef __cplusplus
4771 typedef int foo_t;
4772 static $ac_kw foo_t static_foo () {return 0; }
4773 $ac_kw foo_t foo () {return 0; }
4774 #endif
4775
4776 _ACEOF
4777 if ac_fn_c_try_compile "$LINENO"; then :
4778   ac_cv_c_inline=$ac_kw
4779 fi
4780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4781   test "$ac_cv_c_inline" != no && break
4782 done
4783
4784 fi
4785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4786 $as_echo "$ac_cv_c_inline" >&6; }
4787
4788 case $ac_cv_c_inline in
4789   inline | yes) ;;
4790   *)
4791     case $ac_cv_c_inline in
4792       no) ac_val=;;
4793       *) ac_val=$ac_cv_c_inline;;
4794     esac
4795     cat >>confdefs.h <<_ACEOF
4796 #ifndef __cplusplus
4797 #define inline $ac_val
4798 #endif
4799 _ACEOF
4800     ;;
4801 esac
4802
4803
4804 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bc" >&5
4806 $as_echo_n "checking for bc... " >&6; }
4807   if test "$ac_bc_result" = "15" ; then
4808     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4809 $as_echo "yes" >&6; }
4810   else
4811     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812 $as_echo "no" >&6; }
4813     echo ''
4814     as_fn_error $? "Your system doesn't have \"bc\", which has been a standard
4815                   part of Unix since the 1970s.  Come back when your vendor
4816                   has grown a clue." "$LINENO" 5
4817   fi
4818
4819
4820 # stuff for Makefiles
4821 # Find a good install program.  We prefer a C program (faster),
4822 # so one script is as good as another.  But avoid the broken or
4823 # incompatible versions:
4824 # SysV /etc/install, /usr/sbin/install
4825 # SunOS /usr/etc/install
4826 # IRIX /sbin/install
4827 # AIX /bin/install
4828 # AmigaOS /C/install, which installs bootblocks on floppy discs
4829 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4830 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4831 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4832 # OS/2's system install, which has a completely different semantic
4833 # ./install, which can be erroneously created by make from ./install.sh.
4834 # Reject install programs that cannot install multiple files.
4835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4836 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4837 if test -z "$INSTALL"; then
4838 if ${ac_cv_path_install+:} false; then :
4839   $as_echo_n "(cached) " >&6
4840 else
4841   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4842 for as_dir in $PATH
4843 do
4844   IFS=$as_save_IFS
4845   test -z "$as_dir" && as_dir=.
4846     # Account for people who put trailing slashes in PATH elements.
4847 case $as_dir/ in #((
4848   ./ | .// | /[cC]/* | \
4849   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4850   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4851   /usr/ucb/* ) ;;
4852   *)
4853     # OSF1 and SCO ODT 3.0 have their own names for install.
4854     # Don't use installbsd from OSF since it installs stuff as root
4855     # by default.
4856     for ac_prog in ginstall scoinst install; do
4857       for ac_exec_ext in '' $ac_executable_extensions; do
4858         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4859           if test $ac_prog = install &&
4860             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4861             # AIX install.  It has an incompatible calling convention.
4862             :
4863           elif test $ac_prog = install &&
4864             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4865             # program-specific install script used by HP pwplus--don't use.
4866             :
4867           else
4868             rm -rf conftest.one conftest.two conftest.dir
4869             echo one > conftest.one
4870             echo two > conftest.two
4871             mkdir conftest.dir
4872             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4873               test -s conftest.one && test -s conftest.two &&
4874               test -s conftest.dir/conftest.one &&
4875               test -s conftest.dir/conftest.two
4876             then
4877               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4878               break 3
4879             fi
4880           fi
4881         fi
4882       done
4883     done
4884     ;;
4885 esac
4886
4887   done
4888 IFS=$as_save_IFS
4889
4890 rm -rf conftest.one conftest.two conftest.dir
4891
4892 fi
4893   if test "${ac_cv_path_install+set}" = set; then
4894     INSTALL=$ac_cv_path_install
4895   else
4896     # As a last resort, use the slow shell script.  Don't cache a
4897     # value for INSTALL within a source directory, because that will
4898     # break other packages using the cache if that directory is
4899     # removed, or if the value is a relative name.
4900     INSTALL=$ac_install_sh
4901   fi
4902 fi
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4904 $as_echo "$INSTALL" >&6; }
4905
4906 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4907 # It thinks the first close brace ends the variable substitution.
4908 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4909
4910 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4911
4912 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4913
4914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4915 $as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4916 if ${ac_cv_install_d_creates_dirs+:} false; then :
4917   $as_echo_n "(cached) " >&6
4918 else
4919   ac_cv_install_d_creates_dirs=no
4920      rm -rf conftestdir
4921      if mkdir conftestdir; then
4922        cd conftestdir 2>/dev/null
4923        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4924        if test -d dir1/dir2/. ; then
4925          ac_cv_install_d_creates_dirs=yes
4926        fi
4927        cd .. 2>/dev/null
4928        rm -rf conftestdir
4929      fi
4930
4931 fi
4932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_install_d_creates_dirs" >&5
4933 $as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4934
4935   if test "$ac_cv_install_d_creates_dirs" = no ; then
4936     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"mkdir -p\" creates intermediate directories" >&5
4937 $as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4938 if ${ac_cv_mkdir_p_creates_dirs+:} false; then :
4939   $as_echo_n "(cached) " >&6
4940 else
4941   ac_cv_mkdir_p_creates_dirs=no
4942        rm -rf conftestdir
4943        if mkdir conftestdir; then
4944          cd conftestdir 2>/dev/null
4945          mkdir -p dir1/dir2 >/dev/null 2>&1
4946          if test -d dir1/dir2/. ; then
4947            ac_cv_mkdir_p_creates_dirs=yes
4948          fi
4949          cd .. 2>/dev/null
4950          rm -rf conftestdir
4951        fi
4952
4953 fi
4954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_p_creates_dirs" >&5
4955 $as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4956   fi
4957
4958   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4959     INSTALL_DIRS='${INSTALL} -d'
4960   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4961     INSTALL_DIRS='mkdir -p'
4962   else
4963     # any other ideas?
4964     INSTALL_DIRS='${INSTALL} -d'
4965   fi
4966
4967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4968 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4969 set x ${MAKE-make}
4970 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4971 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4972   $as_echo_n "(cached) " >&6
4973 else
4974   cat >conftest.make <<\_ACEOF
4975 SHELL = /bin/sh
4976 all:
4977         @echo '@@@%%%=$(MAKE)=@@@%%%'
4978 _ACEOF
4979 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4980 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4981   *@@@%%%=?*=@@@%%%*)
4982     eval ac_cv_prog_make_${ac_make}_set=yes;;
4983   *)
4984     eval ac_cv_prog_make_${ac_make}_set=no;;
4985 esac
4986 rm -rf conftest.make
4987 fi
4988 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4990 $as_echo "yes" >&6; }
4991   SET_MAKE=
4992 else
4993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994 $as_echo "no" >&6; }
4995   SET_MAKE="MAKE=${MAKE-make}"
4996 fi
4997
4998
4999 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
5000 # That's wrong: it should be set to '${INSTALL}', so that one can
5001 # implement the "install-strip" target properly (strip executables,
5002 # but do not try to strip scripts.)
5003 #
5004 INSTALL_SCRIPT='${INSTALL}'
5005
5006 # random libc stuff
5007
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5009 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5010 if ${ac_cv_path_GREP+:} false; then :
5011   $as_echo_n "(cached) " >&6
5012 else
5013   if test -z "$GREP"; then
5014   ac_path_GREP_found=false
5015   # Loop through the user's path and test for each of PROGNAME-LIST
5016   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5017 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5018 do
5019   IFS=$as_save_IFS
5020   test -z "$as_dir" && as_dir=.
5021     for ac_prog in grep ggrep; do
5022     for ac_exec_ext in '' $ac_executable_extensions; do
5023       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5024       as_fn_executable_p "$ac_path_GREP" || continue
5025 # Check for GNU ac_path_GREP and select it if it is found.
5026   # Check for GNU $ac_path_GREP
5027 case `"$ac_path_GREP" --version 2>&1` in
5028 *GNU*)
5029   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5030 *)
5031   ac_count=0
5032   $as_echo_n 0123456789 >"conftest.in"
5033   while :
5034   do
5035     cat "conftest.in" "conftest.in" >"conftest.tmp"
5036     mv "conftest.tmp" "conftest.in"
5037     cp "conftest.in" "conftest.nl"
5038     $as_echo 'GREP' >> "conftest.nl"
5039     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5040     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5041     as_fn_arith $ac_count + 1 && ac_count=$as_val
5042     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5043       # Best one so far, save it but keep looking for a better one
5044       ac_cv_path_GREP="$ac_path_GREP"
5045       ac_path_GREP_max=$ac_count
5046     fi
5047     # 10*(2^10) chars as input seems more than enough
5048     test $ac_count -gt 10 && break
5049   done
5050   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
5051 esac
5052
5053       $ac_path_GREP_found && break 3
5054     done
5055   done
5056   done
5057 IFS=$as_save_IFS
5058   if test -z "$ac_cv_path_GREP"; then
5059     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5060   fi
5061 else
5062   ac_cv_path_GREP=$GREP
5063 fi
5064
5065 fi
5066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5067 $as_echo "$ac_cv_path_GREP" >&6; }
5068  GREP="$ac_cv_path_GREP"
5069
5070
5071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5072 $as_echo_n "checking for egrep... " >&6; }
5073 if ${ac_cv_path_EGREP+:} false; then :
5074   $as_echo_n "(cached) " >&6
5075 else
5076   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5077    then ac_cv_path_EGREP="$GREP -E"
5078    else
5079      if test -z "$EGREP"; then
5080   ac_path_EGREP_found=false
5081   # Loop through the user's path and test for each of PROGNAME-LIST
5082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5083 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5084 do
5085   IFS=$as_save_IFS
5086   test -z "$as_dir" && as_dir=.
5087     for ac_prog in egrep; do
5088     for ac_exec_ext in '' $ac_executable_extensions; do
5089       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5090       as_fn_executable_p "$ac_path_EGREP" || continue
5091 # Check for GNU ac_path_EGREP and select it if it is found.
5092   # Check for GNU $ac_path_EGREP
5093 case `"$ac_path_EGREP" --version 2>&1` in
5094 *GNU*)
5095   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5096 *)
5097   ac_count=0
5098   $as_echo_n 0123456789 >"conftest.in"
5099   while :
5100   do
5101     cat "conftest.in" "conftest.in" >"conftest.tmp"
5102     mv "conftest.tmp" "conftest.in"
5103     cp "conftest.in" "conftest.nl"
5104     $as_echo 'EGREP' >> "conftest.nl"
5105     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5106     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5107     as_fn_arith $ac_count + 1 && ac_count=$as_val
5108     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5109       # Best one so far, save it but keep looking for a better one
5110       ac_cv_path_EGREP="$ac_path_EGREP"
5111       ac_path_EGREP_max=$ac_count
5112     fi
5113     # 10*(2^10) chars as input seems more than enough
5114     test $ac_count -gt 10 && break
5115   done
5116   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
5117 esac
5118
5119       $ac_path_EGREP_found && break 3
5120     done
5121   done
5122   done
5123 IFS=$as_save_IFS
5124   if test -z "$ac_cv_path_EGREP"; then
5125     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5126   fi
5127 else
5128   ac_cv_path_EGREP=$EGREP
5129 fi
5130
5131    fi
5132 fi
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5134 $as_echo "$ac_cv_path_EGREP" >&6; }
5135  EGREP="$ac_cv_path_EGREP"
5136
5137
5138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5139 $as_echo_n "checking for ANSI C header files... " >&6; }
5140 if ${ac_cv_header_stdc+:} false; then :
5141   $as_echo_n "(cached) " >&6
5142 else
5143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5144 /* end confdefs.h.  */
5145 #include <stdlib.h>
5146 #include <stdarg.h>
5147 #include <string.h>
5148 #include <float.h>
5149
5150 int
5151 main ()
5152 {
5153
5154   ;
5155   return 0;
5156 }
5157 _ACEOF
5158 if ac_fn_c_try_compile "$LINENO"; then :
5159   ac_cv_header_stdc=yes
5160 else
5161   ac_cv_header_stdc=no
5162 fi
5163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5164
5165 if test $ac_cv_header_stdc = yes; then
5166   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5168 /* end confdefs.h.  */
5169 #include <string.h>
5170
5171 _ACEOF
5172 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5173   $EGREP "memchr" >/dev/null 2>&1; then :
5174
5175 else
5176   ac_cv_header_stdc=no
5177 fi
5178 rm -rf conftest*
5179
5180 fi
5181
5182 if test $ac_cv_header_stdc = yes; then
5183   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5185 /* end confdefs.h.  */
5186 #include <stdlib.h>
5187
5188 _ACEOF
5189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5190   $EGREP "free" >/dev/null 2>&1; then :
5191
5192 else
5193   ac_cv_header_stdc=no
5194 fi
5195 rm -rf conftest*
5196
5197 fi
5198
5199 if test $ac_cv_header_stdc = yes; then
5200   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5201   if test "$cross_compiling" = yes; then :
5202   :
5203 else
5204   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5205 /* end confdefs.h.  */
5206 #include <ctype.h>
5207 #include <stdlib.h>
5208 #if ((' ' & 0x0FF) == 0x020)
5209 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5210 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5211 #else
5212 # define ISLOWER(c) \
5213                    (('a' <= (c) && (c) <= 'i') \
5214                      || ('j' <= (c) && (c) <= 'r') \
5215                      || ('s' <= (c) && (c) <= 'z'))
5216 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5217 #endif
5218
5219 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5220 int
5221 main ()
5222 {
5223   int i;
5224   for (i = 0; i < 256; i++)
5225     if (XOR (islower (i), ISLOWER (i))
5226         || toupper (i) != TOUPPER (i))
5227       return 2;
5228   return 0;
5229 }
5230 _ACEOF
5231 if ac_fn_c_try_run "$LINENO"; then :
5232
5233 else
5234   ac_cv_header_stdc=no
5235 fi
5236 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5237   conftest.$ac_objext conftest.beam conftest.$ac_ext
5238 fi
5239
5240 fi
5241 fi
5242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5243 $as_echo "$ac_cv_header_stdc" >&6; }
5244 if test $ac_cv_header_stdc = yes; then
5245
5246 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5247
5248 fi
5249
5250 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5251 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5252                   inttypes.h stdint.h unistd.h
5253 do :
5254   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5255 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5256 "
5257 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5258   cat >>confdefs.h <<_ACEOF
5259 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5260 _ACEOF
5261
5262 fi
5263
5264 done
5265
5266
5267 for ac_header in unistd.h inttypes.h
5268 do :
5269   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5270 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5271 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5272   cat >>confdefs.h <<_ACEOF
5273 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5274 _ACEOF
5275
5276 fi
5277
5278 done
5279
5280 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
5281 if test "x$ac_cv_type_mode_t" = xyes; then :
5282
5283 else
5284
5285 cat >>confdefs.h <<_ACEOF
5286 #define mode_t int
5287 _ACEOF
5288
5289 fi
5290
5291 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
5292 if test "x$ac_cv_type_pid_t" = xyes; then :
5293
5294 else
5295
5296 cat >>confdefs.h <<_ACEOF
5297 #define pid_t int
5298 _ACEOF
5299
5300 fi
5301
5302 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
5303 if test "x$ac_cv_type_size_t" = xyes; then :
5304
5305 else
5306
5307 cat >>confdefs.h <<_ACEOF
5308 #define size_t unsigned int
5309 _ACEOF
5310
5311 fi
5312
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
5314 $as_echo_n "checking return type of signal handlers... " >&6; }
5315 if ${ac_cv_type_signal+:} false; then :
5316   $as_echo_n "(cached) " >&6
5317 else
5318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5319 /* end confdefs.h.  */
5320 #include <sys/types.h>
5321 #include <signal.h>
5322
5323 int
5324 main ()
5325 {
5326 return *(signal (0, 0)) (0) == 1;
5327   ;
5328   return 0;
5329 }
5330 _ACEOF
5331 if ac_fn_c_try_compile "$LINENO"; then :
5332   ac_cv_type_signal=int
5333 else
5334   ac_cv_type_signal=void
5335 fi
5336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5337 fi
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
5339 $as_echo "$ac_cv_type_signal" >&6; }
5340
5341 cat >>confdefs.h <<_ACEOF
5342 #define RETSIGTYPE $ac_cv_type_signal
5343 _ACEOF
5344
5345
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
5347 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5348 if ${ac_cv_header_time+:} false; then :
5349   $as_echo_n "(cached) " >&6
5350 else
5351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5352 /* end confdefs.h.  */
5353 #include <sys/types.h>
5354 #include <sys/time.h>
5355 #include <time.h>
5356
5357 int
5358 main ()
5359 {
5360 if ((struct tm *) 0)
5361 return 0;
5362   ;
5363   return 0;
5364 }
5365 _ACEOF
5366 if ac_fn_c_try_compile "$LINENO"; then :
5367   ac_cv_header_time=yes
5368 else
5369   ac_cv_header_time=no
5370 fi
5371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5372 fi
5373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
5374 $as_echo "$ac_cv_header_time" >&6; }
5375 if test $ac_cv_header_time = yes; then
5376
5377 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
5378
5379 fi
5380
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
5382 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5383 if ${ac_cv_header_sys_wait_h+:} false; then :
5384   $as_echo_n "(cached) " >&6
5385 else
5386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5387 /* end confdefs.h.  */
5388 #include <sys/types.h>
5389 #include <sys/wait.h>
5390 #ifndef WEXITSTATUS
5391 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5392 #endif
5393 #ifndef WIFEXITED
5394 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5395 #endif
5396
5397 int
5398 main ()
5399 {
5400   int s;
5401   wait (&s);
5402   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5403   ;
5404   return 0;
5405 }
5406 _ACEOF
5407 if ac_fn_c_try_compile "$LINENO"; then :
5408   ac_cv_header_sys_wait_h=yes
5409 else
5410   ac_cv_header_sys_wait_h=no
5411 fi
5412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5413 fi
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
5415 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
5416 if test $ac_cv_header_sys_wait_h = yes; then
5417
5418 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
5419
5420 fi
5421
5422 ac_header_dirent=no
5423 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5424   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
5426 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5427 if eval \${$as_ac_Header+:} false; then :
5428   $as_echo_n "(cached) " >&6
5429 else
5430   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5431 /* end confdefs.h.  */
5432 #include <sys/types.h>
5433 #include <$ac_hdr>
5434
5435 int
5436 main ()
5437 {
5438 if ((DIR *) 0)
5439 return 0;
5440   ;
5441   return 0;
5442 }
5443 _ACEOF
5444 if ac_fn_c_try_compile "$LINENO"; then :
5445   eval "$as_ac_Header=yes"
5446 else
5447   eval "$as_ac_Header=no"
5448 fi
5449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5450 fi
5451 eval ac_res=\$$as_ac_Header
5452                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5453 $as_echo "$ac_res" >&6; }
5454 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5455   cat >>confdefs.h <<_ACEOF
5456 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5457 _ACEOF
5458
5459 ac_header_dirent=$ac_hdr; break
5460 fi
5461
5462 done
5463 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5464 if test $ac_header_dirent = dirent.h; then
5465   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
5466 $as_echo_n "checking for library containing opendir... " >&6; }
5467 if ${ac_cv_search_opendir+:} false; then :
5468   $as_echo_n "(cached) " >&6
5469 else
5470   ac_func_search_save_LIBS=$LIBS
5471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5472 /* end confdefs.h.  */
5473
5474 /* Override any GCC internal prototype to avoid an error.
5475    Use char because int might match the return type of a GCC
5476    builtin and then its argument prototype would still apply.  */
5477 #ifdef __cplusplus
5478 extern "C"
5479 #endif
5480 char opendir ();
5481 int
5482 main ()
5483 {
5484 return opendir ();
5485   ;
5486   return 0;
5487 }
5488 _ACEOF
5489 for ac_lib in '' dir; do
5490   if test -z "$ac_lib"; then
5491     ac_res="none required"
5492   else
5493     ac_res=-l$ac_lib
5494     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5495   fi
5496   if ac_fn_c_try_link "$LINENO"; then :
5497   ac_cv_search_opendir=$ac_res
5498 fi
5499 rm -f core conftest.err conftest.$ac_objext \
5500     conftest$ac_exeext
5501   if ${ac_cv_search_opendir+:} false; then :
5502   break
5503 fi
5504 done
5505 if ${ac_cv_search_opendir+:} false; then :
5506
5507 else
5508   ac_cv_search_opendir=no
5509 fi
5510 rm conftest.$ac_ext
5511 LIBS=$ac_func_search_save_LIBS
5512 fi
5513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
5514 $as_echo "$ac_cv_search_opendir" >&6; }
5515 ac_res=$ac_cv_search_opendir
5516 if test "$ac_res" != no; then :
5517   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5518
5519 fi
5520
5521 else
5522   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
5523 $as_echo_n "checking for library containing opendir... " >&6; }
5524 if ${ac_cv_search_opendir+:} false; then :
5525   $as_echo_n "(cached) " >&6
5526 else
5527   ac_func_search_save_LIBS=$LIBS
5528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5529 /* end confdefs.h.  */
5530
5531 /* Override any GCC internal prototype to avoid an error.
5532    Use char because int might match the return type of a GCC
5533    builtin and then its argument prototype would still apply.  */
5534 #ifdef __cplusplus
5535 extern "C"
5536 #endif
5537 char opendir ();
5538 int
5539 main ()
5540 {
5541 return opendir ();
5542   ;
5543   return 0;
5544 }
5545 _ACEOF
5546 for ac_lib in '' x; do
5547   if test -z "$ac_lib"; then
5548     ac_res="none required"
5549   else
5550     ac_res=-l$ac_lib
5551     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5552   fi
5553   if ac_fn_c_try_link "$LINENO"; then :
5554   ac_cv_search_opendir=$ac_res
5555 fi
5556 rm -f core conftest.err conftest.$ac_objext \
5557     conftest$ac_exeext
5558   if ${ac_cv_search_opendir+:} false; then :
5559   break
5560 fi
5561 done
5562 if ${ac_cv_search_opendir+:} false; then :
5563
5564 else
5565   ac_cv_search_opendir=no
5566 fi
5567 rm conftest.$ac_ext
5568 LIBS=$ac_func_search_save_LIBS
5569 fi
5570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
5571 $as_echo "$ac_cv_search_opendir" >&6; }
5572 ac_res=$ac_cv_search_opendir
5573 if test "$ac_res" != no; then :
5574   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5575
5576 fi
5577
5578 fi
5579
5580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call gettimeofday" >&5
5581 $as_echo_n "checking how to call gettimeofday... " >&6; }
5582   if ${ac_cv_gettimeofday_args+:} false; then :
5583   $as_echo_n "(cached) " >&6
5584 else
5585   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5586 /* end confdefs.h.  */
5587 #include <stdlib.h>
5588                     #include <sys/time.h>
5589 int
5590 main ()
5591 {
5592 struct timeval tv; struct timezone tzp;
5593                     gettimeofday(&tv, &tzp);
5594   ;
5595   return 0;
5596 }
5597 _ACEOF
5598 if ac_fn_c_try_compile "$LINENO"; then :
5599   ac_gettimeofday_args=2
5600 else
5601   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5602 /* end confdefs.h.  */
5603 #include <stdlib.h>
5604                                     #include <sys/time.h>
5605 int
5606 main ()
5607 {
5608 struct timeval tv; gettimeofday(&tv);
5609   ;
5610   return 0;
5611 }
5612 _ACEOF
5613 if ac_fn_c_try_compile "$LINENO"; then :
5614   ac_gettimeofday_args=1
5615 else
5616   ac_gettimeofday_args=0
5617 fi
5618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5619 fi
5620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5621     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5622 fi
5623
5624   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5625   if test "$ac_gettimeofday_args" = 1 ; then
5626     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5627
5628     { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
5629 $as_echo "one argument" >&6; }
5630   elif test "$ac_gettimeofday_args" = 2 ; then
5631     $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
5632
5633     $as_echo "#define GETTIMEOFDAY_TWO_ARGS 1" >>confdefs.h
5634
5635     { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
5636 $as_echo "two arguments" >&6; }
5637   else
5638     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
5639 $as_echo "unknown" >&6; }
5640   fi
5641
5642 # Check whether --enable-largefile was given.
5643 if test "${enable_largefile+set}" = set; then :
5644   enableval=$enable_largefile;
5645 fi
5646
5647 if test "$enable_largefile" != no; then
5648
5649   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5650 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5651 if ${ac_cv_sys_largefile_CC+:} false; then :
5652   $as_echo_n "(cached) " >&6
5653 else
5654   ac_cv_sys_largefile_CC=no
5655      if test "$GCC" != yes; then
5656        ac_save_CC=$CC
5657        while :; do
5658          # IRIX 6.2 and later do not support large files by default,
5659          # so use the C compiler's -n32 option if that helps.
5660          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5661 /* end confdefs.h.  */
5662 #include <sys/types.h>
5663  /* Check that off_t can represent 2**63 - 1 correctly.
5664     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5665     since some C++ compilers masquerading as C compilers
5666     incorrectly reject 9223372036854775807.  */
5667 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5668   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5669                        && LARGE_OFF_T % 2147483647 == 1)
5670                       ? 1 : -1];
5671 int
5672 main ()
5673 {
5674
5675   ;
5676   return 0;
5677 }
5678 _ACEOF
5679          if ac_fn_c_try_compile "$LINENO"; then :
5680   break
5681 fi
5682 rm -f core conftest.err conftest.$ac_objext
5683          CC="$CC -n32"
5684          if ac_fn_c_try_compile "$LINENO"; then :
5685   ac_cv_sys_largefile_CC=' -n32'; break
5686 fi
5687 rm -f core conftest.err conftest.$ac_objext
5688          break
5689        done
5690        CC=$ac_save_CC
5691        rm -rf conftest.$ac_ext
5692     fi
5693 fi
5694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5695 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5696   if test "$ac_cv_sys_largefile_CC" != no; then
5697     CC=$CC$ac_cv_sys_largefile_CC
5698   fi
5699
5700   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5701 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5702 if ${ac_cv_sys_file_offset_bits+:} false; then :
5703   $as_echo_n "(cached) " >&6
5704 else
5705   while :; do
5706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5707 /* end confdefs.h.  */
5708 #include <sys/types.h>
5709  /* Check that off_t can represent 2**63 - 1 correctly.
5710     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5711     since some C++ compilers masquerading as C compilers
5712     incorrectly reject 9223372036854775807.  */
5713 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5714   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5715                        && LARGE_OFF_T % 2147483647 == 1)
5716                       ? 1 : -1];
5717 int
5718 main ()
5719 {
5720
5721   ;
5722   return 0;
5723 }
5724 _ACEOF
5725 if ac_fn_c_try_compile "$LINENO"; then :
5726   ac_cv_sys_file_offset_bits=no; break
5727 fi
5728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5730 /* end confdefs.h.  */
5731 #define _FILE_OFFSET_BITS 64
5732 #include <sys/types.h>
5733  /* Check that off_t can represent 2**63 - 1 correctly.
5734     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5735     since some C++ compilers masquerading as C compilers
5736     incorrectly reject 9223372036854775807.  */
5737 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5738   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5739                        && LARGE_OFF_T % 2147483647 == 1)
5740                       ? 1 : -1];
5741 int
5742 main ()
5743 {
5744
5745   ;
5746   return 0;
5747 }
5748 _ACEOF
5749 if ac_fn_c_try_compile "$LINENO"; then :
5750   ac_cv_sys_file_offset_bits=64; break
5751 fi
5752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5753   ac_cv_sys_file_offset_bits=unknown
5754   break
5755 done
5756 fi
5757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5758 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5759 case $ac_cv_sys_file_offset_bits in #(
5760   no | unknown) ;;
5761   *)
5762 cat >>confdefs.h <<_ACEOF
5763 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5764 _ACEOF
5765 ;;
5766 esac
5767 rm -rf conftest*
5768   if test $ac_cv_sys_file_offset_bits = unknown; then
5769     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5770 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5771 if ${ac_cv_sys_large_files+:} false; then :
5772   $as_echo_n "(cached) " >&6
5773 else
5774   while :; do
5775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5776 /* end confdefs.h.  */
5777 #include <sys/types.h>
5778  /* Check that off_t can represent 2**63 - 1 correctly.
5779     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5780     since some C++ compilers masquerading as C compilers
5781     incorrectly reject 9223372036854775807.  */
5782 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5783   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5784                        && LARGE_OFF_T % 2147483647 == 1)
5785                       ? 1 : -1];
5786 int
5787 main ()
5788 {
5789
5790   ;
5791   return 0;
5792 }
5793 _ACEOF
5794 if ac_fn_c_try_compile "$LINENO"; then :
5795   ac_cv_sys_large_files=no; break
5796 fi
5797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5799 /* end confdefs.h.  */
5800 #define _LARGE_FILES 1
5801 #include <sys/types.h>
5802  /* Check that off_t can represent 2**63 - 1 correctly.
5803     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5804     since some C++ compilers masquerading as C compilers
5805     incorrectly reject 9223372036854775807.  */
5806 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5807   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5808                        && LARGE_OFF_T % 2147483647 == 1)
5809                       ? 1 : -1];
5810 int
5811 main ()
5812 {
5813
5814   ;
5815   return 0;
5816 }
5817 _ACEOF
5818 if ac_fn_c_try_compile "$LINENO"; then :
5819   ac_cv_sys_large_files=1; break
5820 fi
5821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5822   ac_cv_sys_large_files=unknown
5823   break
5824 done
5825 fi
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5827 $as_echo "$ac_cv_sys_large_files" >&6; }
5828 case $ac_cv_sys_large_files in #(
5829   no | unknown) ;;
5830   *)
5831 cat >>confdefs.h <<_ACEOF
5832 #define _LARGE_FILES $ac_cv_sys_large_files
5833 _ACEOF
5834 ;;
5835 esac
5836 rm -rf conftest*
5837   fi
5838
5839
5840 fi
5841
5842 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5843 do :
5844   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5845 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5846 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5847   cat >>confdefs.h <<_ACEOF
5848 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5849 _ACEOF
5850
5851 fi
5852 done
5853
5854 for ac_func in sigaction syslog realpath setrlimit
5855 do :
5856   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5857 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5858 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5859   cat >>confdefs.h <<_ACEOF
5860 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5861 _ACEOF
5862
5863 fi
5864 done
5865
5866 for ac_func in setlocale
5867 do :
5868   ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
5869 if test "x$ac_cv_func_setlocale" = xyes; then :
5870   cat >>confdefs.h <<_ACEOF
5871 #define HAVE_SETLOCALE 1
5872 _ACEOF
5873
5874 fi
5875 done
5876
5877 for ac_func in getaddrinfo
5878 do :
5879   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
5880 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
5881   cat >>confdefs.h <<_ACEOF
5882 #define HAVE_GETADDRINFO 1
5883 _ACEOF
5884
5885 fi
5886 done
5887
5888 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
5889 "
5890 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
5891
5892 cat >>confdefs.h <<_ACEOF
5893 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
5894 _ACEOF
5895
5896
5897 fi
5898
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmp" >&5
5900 $as_echo_n "checking for struct icmp... " >&6; }
5901 if ${ac_cv_have_icmp+:} false; then :
5902   $as_echo_n "(cached) " >&6
5903 else
5904   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5905 /* end confdefs.h.  */
5906 #include <stdlib.h>
5907                    #include <stdio.h>
5908                    #include <math.h>
5909                    #include <unistd.h>
5910                    #include <limits.h>
5911                    #include <signal.h>
5912                    #include <fcntl.h>
5913                    #include <sys/types.h>
5914                    #include <sys/time.h>
5915                    #include <sys/ipc.h>
5916                    #include <sys/shm.h>
5917                    #include <sys/socket.h>
5918                    #include <netinet/in_systm.h>
5919                    #include <netinet/in.h>
5920                    #include <netinet/ip.h>
5921                    #include <netinet/ip_icmp.h>
5922                    #include <netinet/udp.h>
5923                    #include <arpa/inet.h>
5924                    #include <netdb.h>
5925 int
5926 main ()
5927 {
5928 struct icmp i;
5929                    struct sockaddr s;
5930                    struct sockaddr_in si;
5931                    struct ip ip;
5932                    i.icmp_type = ICMP_ECHO;
5933                    i.icmp_code = 0;
5934                    i.icmp_cksum = 0;
5935                    i.icmp_id = 0;
5936                    i.icmp_seq = 0;
5937                    si.sin_family = AF_INET;
5938                    #if defined(__DECC) || defined(_IP_VHL)
5939                    ip.ip_vhl = 0;
5940                    #else
5941                    ip.ip_hl = 0;
5942                    #endif
5943
5944   ;
5945   return 0;
5946 }
5947 _ACEOF
5948 if ac_fn_c_try_compile "$LINENO"; then :
5949   ac_cv_have_icmp=yes
5950 else
5951   ac_cv_have_icmp=no
5952 fi
5953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5954 fi
5955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmp" >&5
5956 $as_echo "$ac_cv_have_icmp" >&6; }
5957  if test "$ac_cv_have_icmp" = yes ; then
5958    $as_echo "#define HAVE_ICMP 1" >>confdefs.h
5959
5960  fi
5961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct icmphdr" >&5
5962 $as_echo_n "checking for struct icmphdr... " >&6; }
5963 if ${ac_cv_have_icmphdr+:} false; then :
5964   $as_echo_n "(cached) " >&6
5965 else
5966   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5967 /* end confdefs.h.  */
5968 #include <stdlib.h>
5969                    #include <stdio.h>
5970                    #include <math.h>
5971                    #include <unistd.h>
5972                    #include <limits.h>
5973                    #include <signal.h>
5974                    #include <fcntl.h>
5975                    #include <sys/types.h>
5976                    #include <sys/time.h>
5977                    #include <sys/ipc.h>
5978                    #include <sys/shm.h>
5979                    #include <sys/socket.h>
5980                    #include <netinet/in_systm.h>
5981                    #include <netinet/in.h>
5982                    #include <netinet/ip.h>
5983                    #include <netinet/ip_icmp.h>
5984                    #include <netinet/udp.h>
5985                    #include <arpa/inet.h>
5986                    #include <netdb.h>
5987 int
5988 main ()
5989 {
5990 struct icmphdr i;
5991                    struct sockaddr s;
5992                    struct sockaddr_in si;
5993                    struct ip ip;
5994                    i.type = ICMP_ECHO;
5995                    i.code = 0;
5996                    i.checksum = 0;
5997                    i.un.echo.id = 0;
5998                    i.un.echo.sequence = 0;
5999                    si.sin_family = AF_INET;
6000                    ip.ip_hl = 0;
6001   ;
6002   return 0;
6003 }
6004 _ACEOF
6005 if ac_fn_c_try_compile "$LINENO"; then :
6006   ac_cv_have_icmphdr=yes
6007 else
6008   ac_cv_have_icmphdr=no
6009 fi
6010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6011 fi
6012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_icmphdr" >&5
6013 $as_echo "$ac_cv_have_icmphdr" >&6; }
6014  if test "$ac_cv_have_icmphdr" = yes ; then
6015    $as_echo "#define HAVE_ICMPHDR 1" >>confdefs.h
6016
6017  fi
6018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs" >&5
6019 $as_echo_n "checking for getifaddrs... " >&6; }
6020 if ${ac_cv_have_getifaddrs+:} false; then :
6021   $as_echo_n "(cached) " >&6
6022 else
6023   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6024 /* end confdefs.h.  */
6025 #include <stdlib.h>
6026                    #include <unistd.h>
6027                    #include <arpa/inet.h>
6028                    #include <ifaddrs.h>
6029 int
6030 main ()
6031 {
6032 struct ifaddrs *ifa;
6033                    getifaddrs (&ifa);
6034                    ifa->ifa_next = 0;
6035                    ifa->ifa_addr->sa_family = 0;
6036   ;
6037   return 0;
6038 }
6039 _ACEOF
6040 if ac_fn_c_try_compile "$LINENO"; then :
6041   ac_cv_have_getifaddrs=yes
6042 else
6043   ac_cv_have_getifaddrs=no
6044 fi
6045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6046 fi
6047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getifaddrs" >&5
6048 $as_echo "$ac_cv_have_getifaddrs" >&6; }
6049  if test "$ac_cv_have_getifaddrs" = yes ; then
6050    $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
6051
6052  fi
6053 for ac_header in crypt.h sys/select.h
6054 do :
6055   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6056 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6057 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6058   cat >>confdefs.h <<_ACEOF
6059 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6060 _ACEOF
6061
6062 fi
6063
6064 done
6065
6066 for ac_prog in perl5 perl
6067 do
6068   # Extract the first word of "$ac_prog", so it can be a program name with args.
6069 set dummy $ac_prog; ac_word=$2
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6071 $as_echo_n "checking for $ac_word... " >&6; }
6072 if ${ac_cv_path_PERL+:} false; then :
6073   $as_echo_n "(cached) " >&6
6074 else
6075   case $PERL in
6076   [\\/]* | ?:[\\/]*)
6077   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6078   ;;
6079   *)
6080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081 for as_dir in $PATH
6082 do
6083   IFS=$as_save_IFS
6084   test -z "$as_dir" && as_dir=.
6085     for ac_exec_ext in '' $ac_executable_extensions; do
6086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6087     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6089     break 2
6090   fi
6091 done
6092   done
6093 IFS=$as_save_IFS
6094
6095   ;;
6096 esac
6097 fi
6098 PERL=$ac_cv_path_PERL
6099 if test -n "$PERL"; then
6100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
6101 $as_echo "$PERL" >&6; }
6102 else
6103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104 $as_echo "no" >&6; }
6105 fi
6106
6107
6108   test -n "$PERL" && break
6109 done
6110
6111   if test -z "$PERL" ; then
6112     PERL_VERSION=0
6113   else
6114     { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5
6115 $as_echo_n "checking perl version... " >&6; }
6116 if ${ac_cv_perl_version+:} false; then :
6117   $as_echo_n "(cached) " >&6
6118 else
6119   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6120 fi
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_perl_version" >&5
6122 $as_echo "$ac_cv_perl_version" >&6; }
6123     PERL_VERSION=$ac_cv_perl_version
6124   fi
6125
6126
6127 if test -z "$PERL" ; then
6128   # don't let it be blank...
6129   PERL=/usr/bin/perl
6130 fi
6131
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
6133 $as_echo_n "checking for X... " >&6; }
6134
6135
6136 # Check whether --with-x was given.
6137 if test "${with_x+set}" = set; then :
6138   withval=$with_x;
6139 fi
6140
6141 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6142 if test "x$with_x" = xno; then
6143   # The user explicitly disabled X.
6144   have_x=disabled
6145 else
6146   case $x_includes,$x_libraries in #(
6147     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
6148     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
6149   $as_echo_n "(cached) " >&6
6150 else
6151   # One or both of the vars are not set, and there is no cached value.
6152 ac_x_includes=no ac_x_libraries=no
6153 rm -f -r conftest.dir
6154 if mkdir conftest.dir; then
6155   cd conftest.dir
6156   cat >Imakefile <<'_ACEOF'
6157 incroot:
6158         @echo incroot='${INCROOT}'
6159 usrlibdir:
6160         @echo usrlibdir='${USRLIBDIR}'
6161 libdir:
6162         @echo libdir='${LIBDIR}'
6163 _ACEOF
6164   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6165     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6166     for ac_var in incroot usrlibdir libdir; do
6167       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6168     done
6169     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6170     for ac_extension in a so sl dylib la dll; do
6171       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6172          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6173         ac_im_usrlibdir=$ac_im_libdir; break
6174       fi
6175     done
6176     # Screen out bogus values from the imake configuration.  They are
6177     # bogus both because they are the default anyway, and because
6178     # using them would break gcc on systems where it needs fixed includes.
6179     case $ac_im_incroot in
6180         /usr/include) ac_x_includes= ;;
6181         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6182     esac
6183     case $ac_im_usrlibdir in
6184         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6185         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6186     esac
6187   fi
6188   cd ..
6189   rm -f -r conftest.dir
6190 fi
6191
6192 # Standard set of common directories for X headers.
6193 # Check X11 before X11Rn because it is often a symlink to the current release.
6194 ac_x_header_dirs='
6195 /usr/X11/include
6196 /usr/X11R7/include
6197 /usr/X11R6/include
6198 /usr/X11R5/include
6199 /usr/X11R4/include
6200
6201 /usr/include/X11
6202 /usr/include/X11R7
6203 /usr/include/X11R6
6204 /usr/include/X11R5
6205 /usr/include/X11R4
6206
6207 /usr/local/X11/include
6208 /usr/local/X11R7/include
6209 /usr/local/X11R6/include
6210 /usr/local/X11R5/include
6211 /usr/local/X11R4/include
6212
6213 /usr/local/include/X11
6214 /usr/local/include/X11R7
6215 /usr/local/include/X11R6
6216 /usr/local/include/X11R5
6217 /usr/local/include/X11R4
6218
6219 /usr/X386/include
6220 /usr/x386/include
6221 /usr/XFree86/include/X11
6222
6223 /usr/include
6224 /usr/local/include
6225 /usr/unsupported/include
6226 /usr/athena/include
6227 /usr/local/x11r5/include
6228 /usr/lpp/Xamples/include
6229
6230 /usr/openwin/include
6231 /usr/openwin/share/include'
6232
6233 if test "$ac_x_includes" = no; then
6234   # Guess where to find include files, by looking for Xlib.h.
6235   # First, try using that file with no special directory specified.
6236   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6237 /* end confdefs.h.  */
6238 #include <X11/Xlib.h>
6239 _ACEOF
6240 if ac_fn_c_try_cpp "$LINENO"; then :
6241   # We can compile using X headers with no special include directory.
6242 ac_x_includes=
6243 else
6244   for ac_dir in $ac_x_header_dirs; do
6245   if test -r "$ac_dir/X11/Xlib.h"; then
6246     ac_x_includes=$ac_dir
6247     break
6248   fi
6249 done
6250 fi
6251 rm -rf conftest.err conftest.i conftest.$ac_ext
6252 fi # $ac_x_includes = no
6253
6254 if test "$ac_x_libraries" = no; then
6255   # Check for the libraries.
6256   # See if we find them without any special options.
6257   # Don't add to $LIBS permanently.
6258   ac_save_LIBS=$LIBS
6259   LIBS="-lX11 $LIBS"
6260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6261 /* end confdefs.h.  */
6262 #include <X11/Xlib.h>
6263 int
6264 main ()
6265 {
6266 XrmInitialize ()
6267   ;
6268   return 0;
6269 }
6270 _ACEOF
6271 if ac_fn_c_try_link "$LINENO"; then :
6272   LIBS=$ac_save_LIBS
6273 # We can link X programs with no special library path.
6274 ac_x_libraries=
6275 else
6276   LIBS=$ac_save_LIBS
6277 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6278 do
6279   # Don't even attempt the hair of trying to link an X program!
6280   for ac_extension in a so sl dylib la dll; do
6281     if test -r "$ac_dir/libX11.$ac_extension"; then
6282       ac_x_libraries=$ac_dir
6283       break 2
6284     fi
6285   done
6286 done
6287 fi
6288 rm -f core conftest.err conftest.$ac_objext \
6289     conftest$ac_exeext conftest.$ac_ext
6290 fi # $ac_x_libraries = no
6291
6292 case $ac_x_includes,$ac_x_libraries in #(
6293   no,* | *,no | *\'*)
6294     # Didn't find X, or a directory has "'" in its name.
6295     ac_cv_have_x="have_x=no";; #(
6296   *)
6297     # Record where we found X for the cache.
6298     ac_cv_have_x="have_x=yes\
6299         ac_x_includes='$ac_x_includes'\
6300         ac_x_libraries='$ac_x_libraries'"
6301 esac
6302 fi
6303 ;; #(
6304     *) have_x=yes;;
6305   esac
6306   eval "$ac_cv_have_x"
6307 fi # $with_x != no
6308
6309 if test "$have_x" != yes; then
6310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
6311 $as_echo "$have_x" >&6; }
6312   no_x=yes
6313 else
6314   # If each of the values was on the command line, it overrides each guess.
6315   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6316   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6317   # Update the cache value to reflect the command line values.
6318   ac_cv_have_x="have_x=yes\
6319         ac_x_includes='$x_includes'\
6320         ac_x_libraries='$x_libraries'"
6321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
6322 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
6323 fi
6324
6325 if test "$no_x" = yes; then
6326   # Not all programs may use this symbol, but it does not hurt to define it.
6327
6328 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
6329
6330   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6331 else
6332   if test -n "$x_includes"; then
6333     X_CFLAGS="$X_CFLAGS -I$x_includes"
6334   fi
6335
6336   # It would also be nice to do this for all -L options, not just this one.
6337   if test -n "$x_libraries"; then
6338     X_LIBS="$X_LIBS -L$x_libraries"
6339     # For Solaris; some versions of Sun CC require a space after -R and
6340     # others require no space.  Words are not sufficient . . . .
6341     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
6342 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
6343     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6344     ac_xsave_c_werror_flag=$ac_c_werror_flag
6345     ac_c_werror_flag=yes
6346     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6347 /* end confdefs.h.  */
6348
6349 int
6350 main ()
6351 {
6352
6353   ;
6354   return 0;
6355 }
6356 _ACEOF
6357 if ac_fn_c_try_link "$LINENO"; then :
6358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6359 $as_echo "no" >&6; }
6360        X_LIBS="$X_LIBS -R$x_libraries"
6361 else
6362   LIBS="$ac_xsave_LIBS -R $x_libraries"
6363        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6364 /* end confdefs.h.  */
6365
6366 int
6367 main ()
6368 {
6369
6370   ;
6371   return 0;
6372 }
6373 _ACEOF
6374 if ac_fn_c_try_link "$LINENO"; then :
6375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6376 $as_echo "yes" >&6; }
6377           X_LIBS="$X_LIBS -R $x_libraries"
6378 else
6379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
6380 $as_echo "neither works" >&6; }
6381 fi
6382 rm -f core conftest.err conftest.$ac_objext \
6383     conftest$ac_exeext conftest.$ac_ext
6384 fi
6385 rm -f core conftest.err conftest.$ac_objext \
6386     conftest$ac_exeext conftest.$ac_ext
6387     ac_c_werror_flag=$ac_xsave_c_werror_flag
6388     LIBS=$ac_xsave_LIBS
6389   fi
6390
6391   # Check for system-dependent libraries X programs must link with.
6392   # Do this before checking for the system-independent R6 libraries
6393   # (-lICE), since we may need -lsocket or whatever for X linking.
6394
6395   if test "$ISC" = yes; then
6396     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6397   else
6398     # Martyn Johnson says this is needed for Ultrix, if the X
6399     # libraries were built with DECnet support.  And Karl Berry says
6400     # the Alpha needs dnet_stub (dnet does not exist).
6401     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6402     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6403 /* end confdefs.h.  */
6404
6405 /* Override any GCC internal prototype to avoid an error.
6406    Use char because int might match the return type of a GCC
6407    builtin and then its argument prototype would still apply.  */
6408 #ifdef __cplusplus
6409 extern "C"
6410 #endif
6411 char XOpenDisplay ();
6412 int
6413 main ()
6414 {
6415 return XOpenDisplay ();
6416   ;
6417   return 0;
6418 }
6419 _ACEOF
6420 if ac_fn_c_try_link "$LINENO"; then :
6421
6422 else
6423   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
6424 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
6425 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
6426   $as_echo_n "(cached) " >&6
6427 else
6428   ac_check_lib_save_LIBS=$LIBS
6429 LIBS="-ldnet  $LIBS"
6430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6431 /* end confdefs.h.  */
6432
6433 /* Override any GCC internal prototype to avoid an error.
6434    Use char because int might match the return type of a GCC
6435    builtin and then its argument prototype would still apply.  */
6436 #ifdef __cplusplus
6437 extern "C"
6438 #endif
6439 char dnet_ntoa ();
6440 int
6441 main ()
6442 {
6443 return dnet_ntoa ();
6444   ;
6445   return 0;
6446 }
6447 _ACEOF
6448 if ac_fn_c_try_link "$LINENO"; then :
6449   ac_cv_lib_dnet_dnet_ntoa=yes
6450 else
6451   ac_cv_lib_dnet_dnet_ntoa=no
6452 fi
6453 rm -f core conftest.err conftest.$ac_objext \
6454     conftest$ac_exeext conftest.$ac_ext
6455 LIBS=$ac_check_lib_save_LIBS
6456 fi
6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6458 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6459 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
6460   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6461 fi
6462
6463     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6464       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
6465 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
6466 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
6467   $as_echo_n "(cached) " >&6
6468 else
6469   ac_check_lib_save_LIBS=$LIBS
6470 LIBS="-ldnet_stub  $LIBS"
6471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6472 /* end confdefs.h.  */
6473
6474 /* Override any GCC internal prototype to avoid an error.
6475    Use char because int might match the return type of a GCC
6476    builtin and then its argument prototype would still apply.  */
6477 #ifdef __cplusplus
6478 extern "C"
6479 #endif
6480 char dnet_ntoa ();
6481 int
6482 main ()
6483 {
6484 return dnet_ntoa ();
6485   ;
6486   return 0;
6487 }
6488 _ACEOF
6489 if ac_fn_c_try_link "$LINENO"; then :
6490   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6491 else
6492   ac_cv_lib_dnet_stub_dnet_ntoa=no
6493 fi
6494 rm -f core conftest.err conftest.$ac_objext \
6495     conftest$ac_exeext conftest.$ac_ext
6496 LIBS=$ac_check_lib_save_LIBS
6497 fi
6498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6499 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6500 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
6501   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6502 fi
6503
6504     fi
6505 fi
6506 rm -f core conftest.err conftest.$ac_objext \
6507     conftest$ac_exeext conftest.$ac_ext
6508     LIBS="$ac_xsave_LIBS"
6509
6510     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6511     # to get the SysV transport functions.
6512     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6513     # needs -lnsl.
6514     # The nsl library prevents programs from opening the X display
6515     # on Irix 5.2, according to T.E. Dickey.
6516     # The functions gethostbyname, getservbyname, and inet_addr are
6517     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6518     ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
6519 if test "x$ac_cv_func_gethostbyname" = xyes; then :
6520
6521 fi
6522
6523     if test $ac_cv_func_gethostbyname = no; then
6524       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
6525 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
6526 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
6527   $as_echo_n "(cached) " >&6
6528 else
6529   ac_check_lib_save_LIBS=$LIBS
6530 LIBS="-lnsl  $LIBS"
6531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6532 /* end confdefs.h.  */
6533
6534 /* Override any GCC internal prototype to avoid an error.
6535    Use char because int might match the return type of a GCC
6536    builtin and then its argument prototype would still apply.  */
6537 #ifdef __cplusplus
6538 extern "C"
6539 #endif
6540 char gethostbyname ();
6541 int
6542 main ()
6543 {
6544 return gethostbyname ();
6545   ;
6546   return 0;
6547 }
6548 _ACEOF
6549 if ac_fn_c_try_link "$LINENO"; then :
6550   ac_cv_lib_nsl_gethostbyname=yes
6551 else
6552   ac_cv_lib_nsl_gethostbyname=no
6553 fi
6554 rm -f core conftest.err conftest.$ac_objext \
6555     conftest$ac_exeext conftest.$ac_ext
6556 LIBS=$ac_check_lib_save_LIBS
6557 fi
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
6559 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
6560 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
6561   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6562 fi
6563
6564       if test $ac_cv_lib_nsl_gethostbyname = no; then
6565         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
6566 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
6567 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
6568   $as_echo_n "(cached) " >&6
6569 else
6570   ac_check_lib_save_LIBS=$LIBS
6571 LIBS="-lbsd  $LIBS"
6572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6573 /* end confdefs.h.  */
6574
6575 /* Override any GCC internal prototype to avoid an error.
6576    Use char because int might match the return type of a GCC
6577    builtin and then its argument prototype would still apply.  */
6578 #ifdef __cplusplus
6579 extern "C"
6580 #endif
6581 char gethostbyname ();
6582 int
6583 main ()
6584 {
6585 return gethostbyname ();
6586   ;
6587   return 0;
6588 }
6589 _ACEOF
6590 if ac_fn_c_try_link "$LINENO"; then :
6591   ac_cv_lib_bsd_gethostbyname=yes
6592 else
6593   ac_cv_lib_bsd_gethostbyname=no
6594 fi
6595 rm -f core conftest.err conftest.$ac_objext \
6596     conftest$ac_exeext conftest.$ac_ext
6597 LIBS=$ac_check_lib_save_LIBS
6598 fi
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
6600 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
6601 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
6602   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6603 fi
6604
6605       fi
6606     fi
6607
6608     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6609     # socket/setsockopt and other routines are undefined under SCO ODT
6610     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6611     # on later versions), says Simon Leinen: it contains gethostby*
6612     # variants that don't use the name server (or something).  -lsocket
6613     # must be given before -lnsl if both are needed.  We assume that
6614     # if connect needs -lnsl, so does gethostbyname.
6615     ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
6616 if test "x$ac_cv_func_connect" = xyes; then :
6617
6618 fi
6619
6620     if test $ac_cv_func_connect = no; then
6621       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
6622 $as_echo_n "checking for connect in -lsocket... " >&6; }
6623 if ${ac_cv_lib_socket_connect+:} false; then :
6624   $as_echo_n "(cached) " >&6
6625 else
6626   ac_check_lib_save_LIBS=$LIBS
6627 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6629 /* end confdefs.h.  */
6630
6631 /* Override any GCC internal prototype to avoid an error.
6632    Use char because int might match the return type of a GCC
6633    builtin and then its argument prototype would still apply.  */
6634 #ifdef __cplusplus
6635 extern "C"
6636 #endif
6637 char connect ();
6638 int
6639 main ()
6640 {
6641 return connect ();
6642   ;
6643   return 0;
6644 }
6645 _ACEOF
6646 if ac_fn_c_try_link "$LINENO"; then :
6647   ac_cv_lib_socket_connect=yes
6648 else
6649   ac_cv_lib_socket_connect=no
6650 fi
6651 rm -f core conftest.err conftest.$ac_objext \
6652     conftest$ac_exeext conftest.$ac_ext
6653 LIBS=$ac_check_lib_save_LIBS
6654 fi
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
6656 $as_echo "$ac_cv_lib_socket_connect" >&6; }
6657 if test "x$ac_cv_lib_socket_connect" = xyes; then :
6658   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6659 fi
6660
6661     fi
6662
6663     # Guillermo Gomez says -lposix is necessary on A/UX.
6664     ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
6665 if test "x$ac_cv_func_remove" = xyes; then :
6666
6667 fi
6668
6669     if test $ac_cv_func_remove = no; then
6670       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
6671 $as_echo_n "checking for remove in -lposix... " >&6; }
6672 if ${ac_cv_lib_posix_remove+:} false; then :
6673   $as_echo_n "(cached) " >&6
6674 else
6675   ac_check_lib_save_LIBS=$LIBS
6676 LIBS="-lposix  $LIBS"
6677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6678 /* end confdefs.h.  */
6679
6680 /* Override any GCC internal prototype to avoid an error.
6681    Use char because int might match the return type of a GCC
6682    builtin and then its argument prototype would still apply.  */
6683 #ifdef __cplusplus
6684 extern "C"
6685 #endif
6686 char remove ();
6687 int
6688 main ()
6689 {
6690 return remove ();
6691   ;
6692   return 0;
6693 }
6694 _ACEOF
6695 if ac_fn_c_try_link "$LINENO"; then :
6696   ac_cv_lib_posix_remove=yes
6697 else
6698   ac_cv_lib_posix_remove=no
6699 fi
6700 rm -f core conftest.err conftest.$ac_objext \
6701     conftest$ac_exeext conftest.$ac_ext
6702 LIBS=$ac_check_lib_save_LIBS
6703 fi
6704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
6705 $as_echo "$ac_cv_lib_posix_remove" >&6; }
6706 if test "x$ac_cv_lib_posix_remove" = xyes; then :
6707   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6708 fi
6709
6710     fi
6711
6712     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6713     ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
6714 if test "x$ac_cv_func_shmat" = xyes; then :
6715
6716 fi
6717
6718     if test $ac_cv_func_shmat = no; then
6719       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
6720 $as_echo_n "checking for shmat in -lipc... " >&6; }
6721 if ${ac_cv_lib_ipc_shmat+:} false; then :
6722   $as_echo_n "(cached) " >&6
6723 else
6724   ac_check_lib_save_LIBS=$LIBS
6725 LIBS="-lipc  $LIBS"
6726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6727 /* end confdefs.h.  */
6728
6729 /* Override any GCC internal prototype to avoid an error.
6730    Use char because int might match the return type of a GCC
6731    builtin and then its argument prototype would still apply.  */
6732 #ifdef __cplusplus
6733 extern "C"
6734 #endif
6735 char shmat ();
6736 int
6737 main ()
6738 {
6739 return shmat ();
6740   ;
6741   return 0;
6742 }
6743 _ACEOF
6744 if ac_fn_c_try_link "$LINENO"; then :
6745   ac_cv_lib_ipc_shmat=yes
6746 else
6747   ac_cv_lib_ipc_shmat=no
6748 fi
6749 rm -f core conftest.err conftest.$ac_objext \
6750     conftest$ac_exeext conftest.$ac_ext
6751 LIBS=$ac_check_lib_save_LIBS
6752 fi
6753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
6754 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
6755 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
6756   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6757 fi
6758
6759     fi
6760   fi
6761
6762   # Check for libraries that X11R6 Xt/Xaw programs need.
6763   ac_save_LDFLAGS=$LDFLAGS
6764   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6765   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6766   # check for ICE first), but we must link in the order -lSM -lICE or
6767   # we get undefined symbols.  So assume we have SM if we have ICE.
6768   # These have to be linked with before -lX11, unlike the other
6769   # libraries we check for below, so use a different variable.
6770   # John Interrante, Karl Berry
6771   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
6772 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
6773 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
6774   $as_echo_n "(cached) " >&6
6775 else
6776   ac_check_lib_save_LIBS=$LIBS
6777 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6779 /* end confdefs.h.  */
6780
6781 /* Override any GCC internal prototype to avoid an error.
6782    Use char because int might match the return type of a GCC
6783    builtin and then its argument prototype would still apply.  */
6784 #ifdef __cplusplus
6785 extern "C"
6786 #endif
6787 char IceConnectionNumber ();
6788 int
6789 main ()
6790 {
6791 return IceConnectionNumber ();
6792   ;
6793   return 0;
6794 }
6795 _ACEOF
6796 if ac_fn_c_try_link "$LINENO"; then :
6797   ac_cv_lib_ICE_IceConnectionNumber=yes
6798 else
6799   ac_cv_lib_ICE_IceConnectionNumber=no
6800 fi
6801 rm -f core conftest.err conftest.$ac_objext \
6802     conftest$ac_exeext conftest.$ac_ext
6803 LIBS=$ac_check_lib_save_LIBS
6804 fi
6805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6806 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
6807 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
6808   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6809 fi
6810
6811   LDFLAGS=$ac_save_LDFLAGS
6812
6813 fi
6814
6815
6816 if test "$have_x" != yes; then
6817   as_fn_error $? "Couldn't find X11 headers/libs.  Try \`$0 --help'." "$LINENO" 5
6818 fi
6819
6820
6821     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X app-defaults directory" >&5
6822 $as_echo_n "checking for X app-defaults directory... " >&6; }
6823 if ${ac_cv_x_app_defaults+:} false; then :
6824   $as_echo_n "(cached) " >&6
6825 else
6826   # skip this, it's always wrong these days.
6827       #  AC_PATH_X_APP_DEFAULTS_XMKMF
6828       if test x"$ac_x_app_defaults" = x; then
6829         true
6830   # Look for the directory under a standard set of common directories.
6831   # Check X11 before X11Rn because it's often a symlink to the current release.
6832   for ac_dir in                                 \
6833                                                 \
6834     /usr/share/X11/app-defaults                 \
6835                                                 \
6836     /usr/X11/lib/app-defaults                   \
6837     /usr/X11R6/lib/app-defaults                 \
6838     /usr/X11R6/lib/X11/app-defaults             \
6839     /usr/X11R5/lib/app-defaults                 \
6840     /usr/X11R5/lib/X11/app-defaults             \
6841     /usr/X11R4/lib/app-defaults                 \
6842     /usr/X11R4/lib/X11/app-defaults             \
6843                                                 \
6844     /usr/lib/X11/app-defaults                   \
6845     /usr/lib/X11R6/app-defaults                 \
6846     /usr/lib/X11R5/app-defaults                 \
6847     /usr/lib/X11R4/app-defaults                 \
6848                                                 \
6849     /etc/X11/app-defaults                       \
6850                                                 \
6851     /usr/local/X11/lib/app-defaults             \
6852     /usr/local/X11R6/lib/app-defaults           \
6853     /usr/local/X11R5/lib/app-defaults           \
6854     /usr/local/X11R4/lib/app-defaults           \
6855                                                 \
6856     /usr/local/lib/X11/app-defaults             \
6857     /usr/local/lib/X11R6/app-defaults           \
6858     /usr/local/lib/X11R6/X11/app-defaults       \
6859     /usr/local/lib/X11R5/app-defaults           \
6860     /usr/local/lib/X11R5/X11/app-defaults       \
6861     /usr/local/lib/X11R4/app-defaults           \
6862     /usr/local/lib/X11R4/X11/app-defaults       \
6863                                                 \
6864     /usr/X386/lib/X11/app-defaults              \
6865     /usr/x386/lib/X11/app-defaults              \
6866     /usr/XFree86/lib/X11/app-defaults           \
6867                                                 \
6868     /usr/lib/X11/app-defaults                   \
6869     /usr/local/lib/X11/app-defaults             \
6870     /usr/unsupported/lib/X11/app-defaults       \
6871     /usr/athena/lib/X11/app-defaults            \
6872     /usr/local/x11r5/lib/X11/app-defaults       \
6873     /usr/lpp/Xamples/lib/X11/app-defaults       \
6874     /lib/usr/lib/X11/app-defaults               \
6875                                                 \
6876     /usr/openwin/lib/app-defaults               \
6877     /usr/openwin/lib/X11/app-defaults           \
6878     /usr/openwin/share/lib/app-defaults         \
6879     /usr/openwin/share/lib/X11/app-defaults     \
6880                                                 \
6881     /X11R6/lib/app-defaults                     \
6882     /X11R5/lib/app-defaults                     \
6883     /X11R4/lib/app-defaults                     \
6884     ; \
6885   do
6886     if test -d "$ac_dir"; then
6887       ac_x_app_defaults=$ac_dir
6888       break
6889     fi
6890   done
6891
6892       fi
6893       if test x"$ac_x_app_defaults" = x; then
6894         /bin/echo -n 'fallback: '
6895         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6896       else
6897         # Record where we found app-defaults for the cache.
6898         ac_cv_x_app_defaults="$ac_x_app_defaults"
6899       fi
6900 fi
6901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x_app_defaults" >&5
6902 $as_echo "$ac_cv_x_app_defaults" >&6; }
6903     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6904 case "$host" in
6905     *-hpux*)
6906
6907       # The following arcana was gleaned from conversations with
6908       # Eric Schwartz <erics@col.hp.com>:
6909       #
6910       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6911       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6912       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6913       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6914       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6915       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6916       # you don't need any -I or -L arguments.
6917       #
6918       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6919       # are the same division as 10.x.  However, there are no symlinks to
6920       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6921       # arguments are always necessary.
6922       #
6923       # However, X11R6 was available on HPUX 9.x as a patch: if that
6924       # patch was installed, then all of X11R6 went in to
6925       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6926       #
6927       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6928       # whether R5 was available as a patch; R6 undoubtedly was not.)
6929       #
6930       # So.  We try and use the highest numbered pair of
6931       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6932       # that are available.  We do not mix and match different versions
6933       # of X.
6934       #
6935       # Question I still don't know the answer to: (do you?)
6936       #
6937       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6938       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6939       #     that contrib directory?  Did it contain so-called "standard"
6940       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6941       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6942       #     be a situation where one had to reach into the R5 headers and
6943       #     libs to find Xmu?  That is, must both R6 and R5 directories
6944       #     be on the -I and -L lists in that case?
6945       #
6946       for version in X11R6 X11R5 X11R4 ; do
6947         # if either pair of directories exists...
6948         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6949         then
6950            # if contrib exists, use it...
6951            if test -d /usr/contrib/$version/include ; then
6952              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6953              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6954            fi
6955            # if the "standard" one exists, use it.
6956            if test -d /usr/include/$version ; then
6957              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6958              X_LIBS="$X_LIBS -L/usr/lib/$version"
6959            fi
6960            # since at least one of the pair exists, go no farther.
6961            break
6962         fi
6963       done
6964
6965       # Now find Motif.  Thanks for not making xmkmf find this by
6966       # default, you losers.
6967       #
6968       if test -d /usr/include/Motif2.1 ; then
6969         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6970         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6971       elif test -d /usr/include/Motif1.2 ; then
6972         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6973         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6974       elif test -d /usr/include/Motif1.1 ; then
6975         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6976         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6977       fi
6978
6979       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6980       #
6981       if test -d /opt/graphics/OpenGL/include ; then
6982         # HP-UX 10.20 puts it here
6983         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6984         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6985       elif test -d /opt/Mesa/lib ; then
6986         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6987         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6988       fi
6989
6990
6991       if test -d /opt/xpm/lib/X11 ; then
6992         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6993         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6994       fi
6995
6996       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6997       # in /usr/local/, unless there is already an xscreensaver in
6998       # /usr/local/bin/.  This can be overridden with the --prefix arg
6999       # to configure.  I'm not sure this is the right thing to do, but
7000       # Richard Lloyd says so...
7001       #
7002       if test \! -x /usr/local/bin/xscreensaver ; then
7003         ac_default_prefix=/opt/xscreensaver
7004       fi
7005
7006     ;;
7007     *-solaris*)
7008
7009       # Thanks for not making xmkmf find this by default, pinheads.
7010       # And thanks for moving things around again, too.  Is this
7011       # really the standard location now?  What happened to the
7012       # joke that this kind of thing went in /opt?
7013       # cthomp says "answer: CDE (Common Disorganized Environment)"
7014       #
7015       if test -f /usr/dt/include/Xm/Xm.h ; then
7016         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7017         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7018
7019         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7020         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcmp in -lgen" >&5
7021 $as_echo_n "checking for regcmp in -lgen... " >&6; }
7022 if ${ac_cv_lib_gen_regcmp+:} false; then :
7023   $as_echo_n "(cached) " >&6
7024 else
7025   ac_check_lib_save_LIBS=$LIBS
7026 LIBS="-lgen  $LIBS"
7027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7028 /* end confdefs.h.  */
7029
7030 /* Override any GCC internal prototype to avoid an error.
7031    Use char because int might match the return type of a GCC
7032    builtin and then its argument prototype would still apply.  */
7033 #ifdef __cplusplus
7034 extern "C"
7035 #endif
7036 char regcmp ();
7037 int
7038 main ()
7039 {
7040 return regcmp ();
7041   ;
7042   return 0;
7043 }
7044 _ACEOF
7045 if ac_fn_c_try_link "$LINENO"; then :
7046   ac_cv_lib_gen_regcmp=yes
7047 else
7048   ac_cv_lib_gen_regcmp=no
7049 fi
7050 rm -f core conftest.err conftest.$ac_objext \
7051     conftest$ac_exeext conftest.$ac_ext
7052 LIBS=$ac_check_lib_save_LIBS
7053 fi
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_regcmp" >&5
7055 $as_echo "$ac_cv_lib_gen_regcmp" >&6; }
7056 if test "x$ac_cv_lib_gen_regcmp" = xyes; then :
7057   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7058 fi
7059
7060       fi
7061
7062     ;;
7063     *-darwin*)
7064
7065       # On MacOS X (10.x with "fink"), many things are under /sw/.
7066       #
7067       if test -d /sw/include ; then
7068         X_CFLAGS="-I/sw/include $X_CFLAGS"
7069         X_LIBS="-L/sw/lib $X_LIBS"
7070       fi
7071     ;;
7072   esac
7073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPointer" >&5
7074 $as_echo_n "checking for XPointer... " >&6; }
7075 if ${ac_cv_xpointer+:} false; then :
7076   $as_echo_n "(cached) " >&6
7077 else
7078
7079   ac_save_CPPFLAGS="$CPPFLAGS"
7080   if test \! -z "$includedir" ; then
7081     CPPFLAGS="$CPPFLAGS -I$includedir"
7082   fi
7083   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7084   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7086 /* end confdefs.h.  */
7087 #include <X11/Xlib.h>
7088 int
7089 main ()
7090 {
7091 XPointer foo = (XPointer) 0;
7092   ;
7093   return 0;
7094 }
7095 _ACEOF
7096 if ac_fn_c_try_compile "$LINENO"; then :
7097   ac_cv_xpointer=yes
7098 else
7099   ac_cv_xpointer=no
7100 fi
7101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7102   CPPFLAGS="$ac_save_CPPFLAGS"
7103 fi
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xpointer" >&5
7105 $as_echo "$ac_cv_xpointer" >&6; }
7106   if test "$ac_cv_xpointer" != yes; then
7107    $as_echo "#define XPointer char*" >>confdefs.h
7108
7109   fi
7110
7111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is MacOS X" >&5
7112 $as_echo_n "checking whether this is MacOS X... " >&6; }
7113   ac_macosx=no
7114   case "$host" in
7115     *-apple-darwin* )
7116       ac_macosx=yes
7117     ;;
7118   esac
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_macosx" >&5
7120 $as_echo "$ac_macosx" >&6; }
7121
7122
7123 ###############################################################################
7124 #
7125 #       Gettext support
7126 #
7127 ###############################################################################
7128
7129
7130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
7131 $as_echo_n "checking whether NLS is requested... " >&6; }
7132     # Check whether --enable-nls was given.
7133 if test "${enable_nls+set}" = set; then :
7134   enableval=$enable_nls; USE_NLS=$enableval
7135 else
7136   USE_NLS=yes
7137 fi
7138
7139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
7140 $as_echo "$USE_NLS" >&6; }
7141
7142
7143
7144
7145 case "$am__api_version" in
7146     1.01234)
7147         as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5
7148     ;;
7149     *)
7150     ;;
7151 esac
7152
7153 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7154 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
7155 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7156 if test -n ""; then
7157     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= " >&5
7158 $as_echo_n "checking for intltool >= ... " >&6; }
7159     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5
7160 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
7161     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
7162         as_fn_error $? "Your intltool is too old.  You need intltool  or later." "$LINENO" 5
7163 fi
7164
7165 # Extract the first word of "intltool-update", so it can be a program name with args.
7166 set dummy intltool-update; ac_word=$2
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7168 $as_echo_n "checking for $ac_word... " >&6; }
7169 if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then :
7170   $as_echo_n "(cached) " >&6
7171 else
7172   case $INTLTOOL_UPDATE in
7173   [\\/]* | ?:[\\/]*)
7174   ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
7175   ;;
7176   *)
7177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7178 for as_dir in $PATH
7179 do
7180   IFS=$as_save_IFS
7181   test -z "$as_dir" && as_dir=.
7182     for ac_exec_ext in '' $ac_executable_extensions; do
7183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7184     ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
7185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7186     break 2
7187   fi
7188 done
7189   done
7190 IFS=$as_save_IFS
7191
7192   ;;
7193 esac
7194 fi
7195 INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
7196 if test -n "$INTLTOOL_UPDATE"; then
7197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5
7198 $as_echo "$INTLTOOL_UPDATE" >&6; }
7199 else
7200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7201 $as_echo "no" >&6; }
7202 fi
7203
7204
7205 # Extract the first word of "intltool-merge", so it can be a program name with args.
7206 set dummy intltool-merge; ac_word=$2
7207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7208 $as_echo_n "checking for $ac_word... " >&6; }
7209 if ${ac_cv_path_INTLTOOL_MERGE+:} false; then :
7210   $as_echo_n "(cached) " >&6
7211 else
7212   case $INTLTOOL_MERGE in
7213   [\\/]* | ?:[\\/]*)
7214   ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
7215   ;;
7216   *)
7217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7218 for as_dir in $PATH
7219 do
7220   IFS=$as_save_IFS
7221   test -z "$as_dir" && as_dir=.
7222     for ac_exec_ext in '' $ac_executable_extensions; do
7223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7224     ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
7225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7226     break 2
7227   fi
7228 done
7229   done
7230 IFS=$as_save_IFS
7231
7232   ;;
7233 esac
7234 fi
7235 INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
7236 if test -n "$INTLTOOL_MERGE"; then
7237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5
7238 $as_echo "$INTLTOOL_MERGE" >&6; }
7239 else
7240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241 $as_echo "no" >&6; }
7242 fi
7243
7244
7245 # Extract the first word of "intltool-extract", so it can be a program name with args.
7246 set dummy intltool-extract; ac_word=$2
7247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7248 $as_echo_n "checking for $ac_word... " >&6; }
7249 if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then :
7250   $as_echo_n "(cached) " >&6
7251 else
7252   case $INTLTOOL_EXTRACT in
7253   [\\/]* | ?:[\\/]*)
7254   ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
7255   ;;
7256   *)
7257   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7258 for as_dir in $PATH
7259 do
7260   IFS=$as_save_IFS
7261   test -z "$as_dir" && as_dir=.
7262     for ac_exec_ext in '' $ac_executable_extensions; do
7263   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7264     ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
7265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7266     break 2
7267   fi
7268 done
7269   done
7270 IFS=$as_save_IFS
7271
7272   ;;
7273 esac
7274 fi
7275 INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
7276 if test -n "$INTLTOOL_EXTRACT"; then
7277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5
7278 $as_echo "$INTLTOOL_EXTRACT" >&6; }
7279 else
7280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7281 $as_echo "no" >&6; }
7282 fi
7283
7284
7285 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
7286     as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5
7287 fi
7288
7289 if test -z "$AM_DEFAULT_VERBOSITY"; then
7290   AM_DEFAULT_VERBOSITY=1
7291 fi
7292
7293
7294 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
7295 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
7296 INTLTOOL__v_MERGE_0='@echo "  ITMRG " $@;'
7297
7298
7299
7300
7301 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
7302 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
7303 intltool__v_merge_options_0='-q'
7304
7305
7306
7307
7308   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 $< $@'
7309 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 $< $@'
7310      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 $< $@'
7311      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 $< $@'
7312       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 $< $@'
7313      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 $< $@'
7314    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 $< $@'
7315     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 $< $@'
7316 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 $< $@'
7317        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 $< $@'
7318       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 $< $@'
7319 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
7320       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 $< $@'
7321 else
7322       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'
7323 fi
7324       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 $< $@'
7325       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 $< $@'
7326     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 $< $@'
7327   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 $< $@'
7328     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 $< $@'
7329     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 $< $@'
7330    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 $< $@'
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428 # Check the gettext tools to make sure they are GNU
7429 # Extract the first word of "xgettext", so it can be a program name with args.
7430 set dummy xgettext; ac_word=$2
7431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432 $as_echo_n "checking for $ac_word... " >&6; }
7433 if ${ac_cv_path_XGETTEXT+:} false; then :
7434   $as_echo_n "(cached) " >&6
7435 else
7436   case $XGETTEXT in
7437   [\\/]* | ?:[\\/]*)
7438   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7439   ;;
7440   *)
7441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7442 for as_dir in $PATH
7443 do
7444   IFS=$as_save_IFS
7445   test -z "$as_dir" && as_dir=.
7446     for ac_exec_ext in '' $ac_executable_extensions; do
7447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7448     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
7449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7450     break 2
7451   fi
7452 done
7453   done
7454 IFS=$as_save_IFS
7455
7456   ;;
7457 esac
7458 fi
7459 XGETTEXT=$ac_cv_path_XGETTEXT
7460 if test -n "$XGETTEXT"; then
7461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
7462 $as_echo "$XGETTEXT" >&6; }
7463 else
7464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465 $as_echo "no" >&6; }
7466 fi
7467
7468
7469 # Extract the first word of "msgmerge", so it can be a program name with args.
7470 set dummy msgmerge; ac_word=$2
7471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7472 $as_echo_n "checking for $ac_word... " >&6; }
7473 if ${ac_cv_path_MSGMERGE+:} false; then :
7474   $as_echo_n "(cached) " >&6
7475 else
7476   case $MSGMERGE in
7477   [\\/]* | ?:[\\/]*)
7478   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
7479   ;;
7480   *)
7481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7482 for as_dir in $PATH
7483 do
7484   IFS=$as_save_IFS
7485   test -z "$as_dir" && as_dir=.
7486     for ac_exec_ext in '' $ac_executable_extensions; do
7487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7488     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
7489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7490     break 2
7491   fi
7492 done
7493   done
7494 IFS=$as_save_IFS
7495
7496   ;;
7497 esac
7498 fi
7499 MSGMERGE=$ac_cv_path_MSGMERGE
7500 if test -n "$MSGMERGE"; then
7501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
7502 $as_echo "$MSGMERGE" >&6; }
7503 else
7504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7505 $as_echo "no" >&6; }
7506 fi
7507
7508
7509 # Extract the first word of "msgfmt", so it can be a program name with args.
7510 set dummy msgfmt; ac_word=$2
7511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7512 $as_echo_n "checking for $ac_word... " >&6; }
7513 if ${ac_cv_path_MSGFMT+:} false; then :
7514   $as_echo_n "(cached) " >&6
7515 else
7516   case $MSGFMT in
7517   [\\/]* | ?:[\\/]*)
7518   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7519   ;;
7520   *)
7521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7522 for as_dir in $PATH
7523 do
7524   IFS=$as_save_IFS
7525   test -z "$as_dir" && as_dir=.
7526     for ac_exec_ext in '' $ac_executable_extensions; do
7527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7528     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
7529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7530     break 2
7531   fi
7532 done
7533   done
7534 IFS=$as_save_IFS
7535
7536   ;;
7537 esac
7538 fi
7539 MSGFMT=$ac_cv_path_MSGFMT
7540 if test -n "$MSGFMT"; then
7541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
7542 $as_echo "$MSGFMT" >&6; }
7543 else
7544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7545 $as_echo "no" >&6; }
7546 fi
7547
7548
7549 # Extract the first word of "gmsgfmt", so it can be a program name with args.
7550 set dummy gmsgfmt; ac_word=$2
7551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7552 $as_echo_n "checking for $ac_word... " >&6; }
7553 if ${ac_cv_path_GMSGFMT+:} false; then :
7554   $as_echo_n "(cached) " >&6
7555 else
7556   case $GMSGFMT in
7557   [\\/]* | ?:[\\/]*)
7558   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7559   ;;
7560   *)
7561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7562 for as_dir in $PATH
7563 do
7564   IFS=$as_save_IFS
7565   test -z "$as_dir" && as_dir=.
7566     for ac_exec_ext in '' $ac_executable_extensions; do
7567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7568     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7570     break 2
7571   fi
7572 done
7573   done
7574 IFS=$as_save_IFS
7575
7576   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7577   ;;
7578 esac
7579 fi
7580 GMSGFMT=$ac_cv_path_GMSGFMT
7581 if test -n "$GMSGFMT"; then
7582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
7583 $as_echo "$GMSGFMT" >&6; }
7584 else
7585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7586 $as_echo "no" >&6; }
7587 fi
7588
7589
7590 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
7591     as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
7592 fi
7593 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
7594 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
7595 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
7596 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
7597     as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
7598 fi
7599
7600 # Substitute ALL_LINGUAS so we can use it in po/Makefile
7601
7602
7603
7604
7605
7606 GETTEXT_PACKAGE=xscreensaver
7607
7608 cat >>confdefs.h <<_ACEOF
7609 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7610 _ACEOF
7611
7612
7613 cat >>confdefs.h <<_ACEOF
7614 #define PACKAGE "$GETTEXT_PACKAGE"
7615 _ACEOF
7616
7617
7618
7619 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"
7620
7621    for ac_header in locale.h
7622 do :
7623   ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
7624 if test "x$ac_cv_header_locale_h" = xyes; then :
7625   cat >>confdefs.h <<_ACEOF
7626 #define HAVE_LOCALE_H 1
7627 _ACEOF
7628
7629 fi
7630
7631 done
7632
7633     if test $ac_cv_header_locale_h = yes; then
7634     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
7635 $as_echo_n "checking for LC_MESSAGES... " >&6; }
7636 if ${am_cv_val_LC_MESSAGES+:} false; then :
7637   $as_echo_n "(cached) " >&6
7638 else
7639   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7640 /* end confdefs.h.  */
7641 #include <locale.h>
7642 int
7643 main ()
7644 {
7645 return LC_MESSAGES
7646   ;
7647   return 0;
7648 }
7649 _ACEOF
7650 if ac_fn_c_try_link "$LINENO"; then :
7651   am_cv_val_LC_MESSAGES=yes
7652 else
7653   am_cv_val_LC_MESSAGES=no
7654 fi
7655 rm -f core conftest.err conftest.$ac_objext \
7656     conftest$ac_exeext conftest.$ac_ext
7657 fi
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
7659 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
7660     if test $am_cv_val_LC_MESSAGES = yes; then
7661
7662 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
7663
7664     fi
7665   fi
7666      USE_NLS=yes
7667
7668
7669     gt_cv_have_gettext=no
7670
7671     CATOBJEXT=NONE
7672     XGETTEXT=:
7673     INTLLIBS=
7674
7675     ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
7676 if test "x$ac_cv_header_libintl_h" = xyes; then :
7677   gt_cv_func_dgettext_libintl="no"
7678       libintl_extra_libs=""
7679
7680       #
7681       # First check in libc
7682       #
7683       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
7684 $as_echo_n "checking for ngettext in libc... " >&6; }
7685 if ${gt_cv_func_ngettext_libc+:} false; then :
7686   $as_echo_n "(cached) " >&6
7687 else
7688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7689 /* end confdefs.h.  */
7690
7691 #include <libintl.h>
7692
7693 int
7694 main ()
7695 {
7696 return !ngettext ("","", 1)
7697   ;
7698   return 0;
7699 }
7700 _ACEOF
7701 if ac_fn_c_try_link "$LINENO"; then :
7702   gt_cv_func_ngettext_libc=yes
7703 else
7704   gt_cv_func_ngettext_libc=no
7705 fi
7706 rm -f core conftest.err conftest.$ac_objext \
7707     conftest$ac_exeext conftest.$ac_ext
7708
7709 fi
7710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
7711 $as_echo "$gt_cv_func_ngettext_libc" >&6; }
7712
7713       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7714               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
7715 $as_echo_n "checking for dgettext in libc... " >&6; }
7716 if ${gt_cv_func_dgettext_libc+:} false; then :
7717   $as_echo_n "(cached) " >&6
7718 else
7719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7720 /* end confdefs.h.  */
7721
7722 #include <libintl.h>
7723
7724 int
7725 main ()
7726 {
7727 return !dgettext ("","")
7728   ;
7729   return 0;
7730 }
7731 _ACEOF
7732 if ac_fn_c_try_link "$LINENO"; then :
7733   gt_cv_func_dgettext_libc=yes
7734 else
7735   gt_cv_func_dgettext_libc=no
7736 fi
7737 rm -f core conftest.err conftest.$ac_objext \
7738     conftest$ac_exeext conftest.$ac_ext
7739
7740 fi
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
7742 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
7743       fi
7744
7745       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7746         for ac_func in bind_textdomain_codeset
7747 do :
7748   ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7749 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7750   cat >>confdefs.h <<_ACEOF
7751 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
7752 _ACEOF
7753
7754 fi
7755 done
7756
7757       fi
7758
7759       #
7760       # If we don't have everything we want, check in libintl
7761       #
7762       if test "$gt_cv_func_dgettext_libc" != "yes" \
7763          || test "$gt_cv_func_ngettext_libc" != "yes" \
7764          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7765
7766         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
7767 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
7768 if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
7769   $as_echo_n "(cached) " >&6
7770 else
7771   ac_check_lib_save_LIBS=$LIBS
7772 LIBS="-lintl  $LIBS"
7773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7774 /* end confdefs.h.  */
7775
7776 /* Override any GCC internal prototype to avoid an error.
7777    Use char because int might match the return type of a GCC
7778    builtin and then its argument prototype would still apply.  */
7779 #ifdef __cplusplus
7780 extern "C"
7781 #endif
7782 char bindtextdomain ();
7783 int
7784 main ()
7785 {
7786 return bindtextdomain ();
7787   ;
7788   return 0;
7789 }
7790 _ACEOF
7791 if ac_fn_c_try_link "$LINENO"; then :
7792   ac_cv_lib_intl_bindtextdomain=yes
7793 else
7794   ac_cv_lib_intl_bindtextdomain=no
7795 fi
7796 rm -f core conftest.err conftest.$ac_objext \
7797     conftest$ac_exeext conftest.$ac_ext
7798 LIBS=$ac_check_lib_save_LIBS
7799 fi
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
7801 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
7802 if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
7803   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
7804 $as_echo_n "checking for ngettext in -lintl... " >&6; }
7805 if ${ac_cv_lib_intl_ngettext+:} false; then :
7806   $as_echo_n "(cached) " >&6
7807 else
7808   ac_check_lib_save_LIBS=$LIBS
7809 LIBS="-lintl  $LIBS"
7810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7811 /* end confdefs.h.  */
7812
7813 /* Override any GCC internal prototype to avoid an error.
7814    Use char because int might match the return type of a GCC
7815    builtin and then its argument prototype would still apply.  */
7816 #ifdef __cplusplus
7817 extern "C"
7818 #endif
7819 char ngettext ();
7820 int
7821 main ()
7822 {
7823 return ngettext ();
7824   ;
7825   return 0;
7826 }
7827 _ACEOF
7828 if ac_fn_c_try_link "$LINENO"; then :
7829   ac_cv_lib_intl_ngettext=yes
7830 else
7831   ac_cv_lib_intl_ngettext=no
7832 fi
7833 rm -f core conftest.err conftest.$ac_objext \
7834     conftest$ac_exeext conftest.$ac_ext
7835 LIBS=$ac_check_lib_save_LIBS
7836 fi
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
7838 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
7839 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
7840   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
7841 $as_echo_n "checking for dgettext in -lintl... " >&6; }
7842 if ${ac_cv_lib_intl_dgettext+:} false; then :
7843   $as_echo_n "(cached) " >&6
7844 else
7845   ac_check_lib_save_LIBS=$LIBS
7846 LIBS="-lintl  $LIBS"
7847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7848 /* end confdefs.h.  */
7849
7850 /* Override any GCC internal prototype to avoid an error.
7851    Use char because int might match the return type of a GCC
7852    builtin and then its argument prototype would still apply.  */
7853 #ifdef __cplusplus
7854 extern "C"
7855 #endif
7856 char dgettext ();
7857 int
7858 main ()
7859 {
7860 return dgettext ();
7861   ;
7862   return 0;
7863 }
7864 _ACEOF
7865 if ac_fn_c_try_link "$LINENO"; then :
7866   ac_cv_lib_intl_dgettext=yes
7867 else
7868   ac_cv_lib_intl_dgettext=no
7869 fi
7870 rm -f core conftest.err conftest.$ac_objext \
7871     conftest$ac_exeext conftest.$ac_ext
7872 LIBS=$ac_check_lib_save_LIBS
7873 fi
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
7875 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
7876 if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
7877   gt_cv_func_dgettext_libintl=yes
7878 fi
7879
7880 fi
7881
7882 fi
7883
7884
7885         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7886           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
7887 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
7888           { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
7889 $as_echo "" >&6; }
7890           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
7891 $as_echo_n "checking for ngettext in -lintl... " >&6; }
7892 if ${ac_cv_lib_intl_ngettext+:} false; then :
7893   $as_echo_n "(cached) " >&6
7894 else
7895   ac_check_lib_save_LIBS=$LIBS
7896 LIBS="-lintl -liconv $LIBS"
7897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7898 /* end confdefs.h.  */
7899
7900 /* Override any GCC internal prototype to avoid an error.
7901    Use char because int might match the return type of a GCC
7902    builtin and then its argument prototype would still apply.  */
7903 #ifdef __cplusplus
7904 extern "C"
7905 #endif
7906 char ngettext ();
7907 int
7908 main ()
7909 {
7910 return ngettext ();
7911   ;
7912   return 0;
7913 }
7914 _ACEOF
7915 if ac_fn_c_try_link "$LINENO"; then :
7916   ac_cv_lib_intl_ngettext=yes
7917 else
7918   ac_cv_lib_intl_ngettext=no
7919 fi
7920 rm -f core conftest.err conftest.$ac_objext \
7921     conftest$ac_exeext conftest.$ac_ext
7922 LIBS=$ac_check_lib_save_LIBS
7923 fi
7924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
7925 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
7926 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
7927   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
7928 $as_echo_n "checking for dcgettext in -lintl... " >&6; }
7929 if ${ac_cv_lib_intl_dcgettext+:} false; then :
7930   $as_echo_n "(cached) " >&6
7931 else
7932   ac_check_lib_save_LIBS=$LIBS
7933 LIBS="-lintl -liconv $LIBS"
7934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7935 /* end confdefs.h.  */
7936
7937 /* Override any GCC internal prototype to avoid an error.
7938    Use char because int might match the return type of a GCC
7939    builtin and then its argument prototype would still apply.  */
7940 #ifdef __cplusplus
7941 extern "C"
7942 #endif
7943 char dcgettext ();
7944 int
7945 main ()
7946 {
7947 return dcgettext ();
7948   ;
7949   return 0;
7950 }
7951 _ACEOF
7952 if ac_fn_c_try_link "$LINENO"; then :
7953   ac_cv_lib_intl_dcgettext=yes
7954 else
7955   ac_cv_lib_intl_dcgettext=no
7956 fi
7957 rm -f core conftest.err conftest.$ac_objext \
7958     conftest$ac_exeext conftest.$ac_ext
7959 LIBS=$ac_check_lib_save_LIBS
7960 fi
7961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
7962 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
7963 if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
7964   gt_cv_func_dgettext_libintl=yes
7965                         libintl_extra_libs=-liconv
7966 else
7967   :
7968 fi
7969
7970 else
7971   :
7972 fi
7973
7974         fi
7975
7976         #
7977         # If we found libintl, then check in it for bind_textdomain_codeset();
7978         # we'll prefer libc if neither have bind_textdomain_codeset(),
7979         # and both have dgettext and ngettext
7980         #
7981         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7982           glib_save_LIBS="$LIBS"
7983           LIBS="$LIBS -lintl $libintl_extra_libs"
7984           unset ac_cv_func_bind_textdomain_codeset
7985           for ac_func in bind_textdomain_codeset
7986 do :
7987   ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
7988 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
7989   cat >>confdefs.h <<_ACEOF
7990 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
7991 _ACEOF
7992
7993 fi
7994 done
7995
7996           LIBS="$glib_save_LIBS"
7997
7998           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7999             gt_cv_func_dgettext_libc=no
8000           else
8001             if test "$gt_cv_func_dgettext_libc" = "yes" \
8002                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
8003               gt_cv_func_dgettext_libintl=no
8004             fi
8005           fi
8006         fi
8007       fi
8008
8009       if test "$gt_cv_func_dgettext_libc" = "yes" \
8010         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
8011         gt_cv_have_gettext=yes
8012       fi
8013
8014       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
8015         INTLLIBS="-lintl $libintl_extra_libs"
8016       fi
8017
8018       if test "$gt_cv_have_gettext" = "yes"; then
8019
8020 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
8021
8022         # Extract the first word of "msgfmt", so it can be a program name with args.
8023 set dummy msgfmt; ac_word=$2
8024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8025 $as_echo_n "checking for $ac_word... " >&6; }
8026 if ${ac_cv_path_MSGFMT+:} false; then :
8027   $as_echo_n "(cached) " >&6
8028 else
8029   case "$MSGFMT" in
8030   /*)
8031   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8032   ;;
8033   *)
8034   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8035   for ac_dir in $PATH; do
8036     test -z "$ac_dir" && ac_dir=.
8037     if test -f $ac_dir/$ac_word; then
8038       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
8039         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
8040         break
8041       fi
8042     fi
8043   done
8044   IFS="$ac_save_ifs"
8045   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
8046   ;;
8047 esac
8048 fi
8049 MSGFMT="$ac_cv_path_MSGFMT"
8050 if test "$MSGFMT" != "no"; then
8051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
8052 $as_echo "$MSGFMT" >&6; }
8053 else
8054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055 $as_echo "no" >&6; }
8056 fi
8057         if test "$MSGFMT" != "no"; then
8058           glib_save_LIBS="$LIBS"
8059           LIBS="$LIBS $INTLLIBS"
8060           for ac_func in dcgettext
8061 do :
8062   ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
8063 if test "x$ac_cv_func_dcgettext" = xyes; then :
8064   cat >>confdefs.h <<_ACEOF
8065 #define HAVE_DCGETTEXT 1
8066 _ACEOF
8067
8068 fi
8069 done
8070
8071           MSGFMT_OPTS=
8072           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
8073 $as_echo_n "checking if msgfmt accepts -c... " >&6; }
8074           cat >conftest.foo <<_ACEOF
8075
8076 msgid ""
8077 msgstr ""
8078 "Content-Type: text/plain; charset=UTF-8\n"
8079 "Project-Id-Version: test 1.0\n"
8080 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
8081 "Last-Translator: test <foo@bar.xx>\n"
8082 "Language-Team: C <LL@li.org>\n"
8083 "MIME-Version: 1.0\n"
8084 "Content-Transfer-Encoding: 8bit\n"
8085
8086 _ACEOF
8087 if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
8088   ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
8089   ac_status=$?
8090   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8091   test $ac_status = 0; }; then
8092   MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8093 $as_echo "yes" >&6; }
8094 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8095 $as_echo "no" >&6; }
8096 echo "$as_me: failed input was:" >&5
8097 sed 's/^/| /' conftest.foo >&5
8098 fi
8099
8100           # Extract the first word of "gmsgfmt", so it can be a program name with args.
8101 set dummy gmsgfmt; ac_word=$2
8102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8103 $as_echo_n "checking for $ac_word... " >&6; }
8104 if ${ac_cv_path_GMSGFMT+:} false; then :
8105   $as_echo_n "(cached) " >&6
8106 else
8107   case $GMSGFMT in
8108   [\\/]* | ?:[\\/]*)
8109   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8110   ;;
8111   *)
8112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8113 for as_dir in $PATH
8114 do
8115   IFS=$as_save_IFS
8116   test -z "$as_dir" && as_dir=.
8117     for ac_exec_ext in '' $ac_executable_extensions; do
8118   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8119     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8121     break 2
8122   fi
8123 done
8124   done
8125 IFS=$as_save_IFS
8126
8127   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8128   ;;
8129 esac
8130 fi
8131 GMSGFMT=$ac_cv_path_GMSGFMT
8132 if test -n "$GMSGFMT"; then
8133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
8134 $as_echo "$GMSGFMT" >&6; }
8135 else
8136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8137 $as_echo "no" >&6; }
8138 fi
8139
8140
8141           # Extract the first word of "xgettext", so it can be a program name with args.
8142 set dummy xgettext; ac_word=$2
8143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8144 $as_echo_n "checking for $ac_word... " >&6; }
8145 if ${ac_cv_path_XGETTEXT+:} false; then :
8146   $as_echo_n "(cached) " >&6
8147 else
8148   case "$XGETTEXT" in
8149   /*)
8150   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8151   ;;
8152   *)
8153   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8154   for ac_dir in $PATH; do
8155     test -z "$ac_dir" && ac_dir=.
8156     if test -f $ac_dir/$ac_word; then
8157       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8158         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8159         break
8160       fi
8161     fi
8162   done
8163   IFS="$ac_save_ifs"
8164   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8165   ;;
8166 esac
8167 fi
8168 XGETTEXT="$ac_cv_path_XGETTEXT"
8169 if test "$XGETTEXT" != ":"; then
8170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
8171 $as_echo "$XGETTEXT" >&6; }
8172 else
8173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8174 $as_echo "no" >&6; }
8175 fi
8176
8177           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8178 /* end confdefs.h.  */
8179
8180 int
8181 main ()
8182 {
8183 extern int _nl_msg_cat_cntr;
8184                          return _nl_msg_cat_cntr
8185   ;
8186   return 0;
8187 }
8188 _ACEOF
8189 if ac_fn_c_try_link "$LINENO"; then :
8190   CATOBJEXT=.gmo
8191              DATADIRNAME=share
8192 else
8193   case $host in
8194             *-*-solaris*)
8195                                                                 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
8196 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
8197   CATOBJEXT=.gmo
8198                DATADIRNAME=share
8199 else
8200   CATOBJEXT=.mo
8201                DATADIRNAME=lib
8202 fi
8203
8204             ;;
8205             *-*-openbsd*)
8206             CATOBJEXT=.mo
8207             DATADIRNAME=share
8208             ;;
8209             *)
8210             CATOBJEXT=.mo
8211             DATADIRNAME=lib
8212             ;;
8213             esac
8214 fi
8215 rm -f core conftest.err conftest.$ac_objext \
8216     conftest$ac_exeext conftest.$ac_ext
8217           LIBS="$glib_save_LIBS"
8218           INSTOBJEXT=.mo
8219         else
8220           gt_cv_have_gettext=no
8221         fi
8222       fi
8223
8224 fi
8225
8226
8227
8228     if test "$gt_cv_have_gettext" = "yes" ; then
8229
8230 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
8231
8232     fi
8233
8234         if test "$XGETTEXT" != ":"; then
8235                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8236         : ;
8237       else
8238         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
8239 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
8240         XGETTEXT=":"
8241       fi
8242     fi
8243
8244     # We need to process the po/ directory.
8245     POSUB=po
8246
8247     ac_config_commands="$ac_config_commands default-1"
8248
8249
8250                 for lang in $ALL_LINGUAS; do
8251       GMOFILES="$GMOFILES $lang.gmo"
8252       POFILES="$POFILES $lang.po"
8253     done
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267    if test "$gt_cv_have_gettext" = "yes"; then
8268      if test "x$ALL_LINGUAS" = "x"; then
8269        LINGUAS=
8270      else
8271        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
8272 $as_echo_n "checking for catalogs to be installed... " >&6; }
8273        NEW_LINGUAS=
8274        for presentlang in $ALL_LINGUAS; do
8275          useit=no
8276          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
8277            desiredlanguages="$LINGUAS"
8278          else
8279            desiredlanguages="$ALL_LINGUAS"
8280          fi
8281          for desiredlang in $desiredlanguages; do
8282            # Use the presentlang catalog if desiredlang is
8283            #   a. equal to presentlang, or
8284            #   b. a variant of presentlang (because in this case,
8285            #      presentlang can be used as a fallback for messages
8286            #      which are not translated in the desiredlang catalog).
8287            case "$desiredlang" in
8288              "$presentlang"*) useit=yes;;
8289            esac
8290          done
8291          if test $useit = yes; then
8292            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8293          fi
8294        done
8295        LINGUAS=$NEW_LINGUAS
8296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
8297 $as_echo "$LINGUAS" >&6; }
8298      fi
8299
8300           if test -n "$LINGUAS"; then
8301        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8302      fi
8303    fi
8304
8305             MKINSTALLDIRS=
8306    if test -n "$ac_aux_dir"; then
8307      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8308    fi
8309    if test -z "$MKINSTALLDIRS"; then
8310      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8311    fi
8312
8313
8314          test -d po || mkdir po
8315    if test "x$srcdir" != "x."; then
8316      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8317        posrcprefix="$srcdir/"
8318      else
8319        posrcprefix="../$srcdir/"
8320      fi
8321    else
8322      posrcprefix="../"
8323    fi
8324    rm -f po/POTFILES
8325    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8326         < $srcdir/po/POTFILES.in > po/POTFILES
8327
8328 MKINSTALLDIRS="$INSTALL_DIRS"
8329
8330
8331 ###############################################################################
8332 #
8333 #       Check for -lXmu (some fucked up vendors don't ship it...)
8334 #
8335 ###############################################################################
8336
8337 have_xmu=no
8338
8339   ac_save_CPPFLAGS="$CPPFLAGS"
8340   if test \! -z "$includedir" ; then
8341     CPPFLAGS="$CPPFLAGS -I$includedir"
8342   fi
8343   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8344   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8345   ac_fn_c_check_header_compile "$LINENO" "X11/Xmu/Error.h" "ac_cv_header_X11_Xmu_Error_h" "#include <stdlib.h>
8346                    #include <stdio.h>
8347                    #include <X11/Intrinsic.h>
8348 "
8349 if test "x$ac_cv_header_X11_Xmu_Error_h" = xyes; then :
8350   have_xmu=yes
8351 fi
8352
8353
8354   CPPFLAGS="$ac_save_CPPFLAGS"
8355 if test "$have_xmu" = no ; then
8356   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8357   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8358   XMU_LIBS=''
8359 else
8360   XMU_SRCS=''
8361   XMU_OBJS=''
8362   XMU_LIBS='-lXmu'
8363   $as_echo "#define HAVE_XMU 1" >>confdefs.h
8364
8365 fi
8366
8367
8368 ###############################################################################
8369 #
8370 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8371 #       See comp.windows.x FAQ question 124.  The right fix is to
8372 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8373 #
8374 ###############################################################################
8375
8376 if test "$have_xmu" = yes ; then
8377   case "$host" in
8378     *-sunos4*)
8379     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8380 $as_echo_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... " >&6; }
8381 if ${ac_cv_sunos_xmu_bug+:} false; then :
8382   $as_echo_n "(cached) " >&6
8383 else
8384   ac_save_LDFLAGS="$LDFLAGS"
8385                     if test \! -z "$x_libraries" ; then
8386                       LDFLAGS="$LDFLAGS -L$x_libraries"
8387                     fi
8388                     # Note: this trick never works!  (Generally.)
8389                     # We're only getting away with using AC_TRY_LINK
8390                     # with X libraries because we know it's SunOS.
8391                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8392                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8393 /* end confdefs.h.  */
8394
8395 int
8396 main ()
8397 {
8398
8399   ;
8400   return 0;
8401 }
8402 _ACEOF
8403 if ac_fn_c_try_link "$LINENO"; then :
8404   ac_cv_sunos_xmu_bug=no
8405 else
8406   ac_cv_sunos_xmu_bug=yes
8407 fi
8408 rm -f core conftest.err conftest.$ac_objext \
8409     conftest$ac_exeext conftest.$ac_ext
8410                     LDFLAGS="$ac_save_LDFLAGS"
8411 fi
8412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sunos_xmu_bug" >&5
8413 $as_echo "$ac_cv_sunos_xmu_bug" >&6; }
8414     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8415       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler understands -static" >&5
8416 $as_echo_n "checking whether the compiler understands -static... " >&6; }
8417 if ${ac_cv_ld_static+:} false; then :
8418   $as_echo_n "(cached) " >&6
8419 else
8420   ac_save_LDFLAGS="$LDFLAGS"
8421                       LDFLAGS="$LDFLAGS -static"
8422                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8423 /* end confdefs.h.  */
8424
8425 int
8426 main ()
8427 {
8428
8429   ;
8430   return 0;
8431 }
8432 _ACEOF
8433 if ac_fn_c_try_link "$LINENO"; then :
8434   ac_cv_ld_static=yes
8435 else
8436   ac_cv_ld_static=no
8437 fi
8438 rm -f core conftest.err conftest.$ac_objext \
8439     conftest$ac_exeext conftest.$ac_ext
8440                     LDFLAGS="$ac_save_LDFLAGS"
8441 fi
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ld_static" >&5
8443 $as_echo "$ac_cv_ld_static" >&6; }
8444       if test "$ac_cv_ld_static" = yes ; then
8445         LDFLAGS="$LDFLAGS -static"
8446       else
8447         LDFLAGS="$LDFLAGS -Bstatic"
8448       fi
8449     fi
8450     ;;
8451   esac
8452 fi
8453
8454
8455 ###############################################################################
8456 #
8457 #       Handle the --with-hackdir option
8458 #
8459 ###############################################################################
8460
8461 have_hackdir=yes
8462 with_hackdir_req=unspecified
8463
8464 # Check whether --with-hackdir was given.
8465 if test "${with_hackdir+set}" = set; then :
8466   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
8467 else
8468   with_hackdir=yes
8469 fi
8470
8471
8472 if test x"$with_hackdir" = xyes; then
8473   HACKDIR='${libexecdir}/xscreensaver'
8474 elif test x"$with_hackdir" = xno; then
8475   HACKDIR='${bindir}'
8476 else
8477   HACKDIR=$with_hackdir
8478 fi
8479
8480 # canonicalize slashes.
8481 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8482
8483 # Expand HACKDIR as HACKDIR_FULL
8484 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
8485
8486 # This option used to be called --enable-subdir; make sure that is no longer
8487 # used, since configure brain-damagedly ignores unknown --enable options.
8488
8489 obsolete_enable=
8490 # Check whether --enable-subdir was given.
8491 if test "${enable_subdir+set}" = set; then :
8492   enableval=$enable_subdir; obsolete_enable=yes
8493 fi
8494
8495 if test -n "$obsolete_enable"; then
8496   echo "error: the --enable-subdir option has been replaced with"
8497   echo "       the new --with-hackdir option; see \`configure --help'"
8498   echo "       for more information."
8499   exit 1
8500 fi
8501
8502
8503 ###############################################################################
8504 #
8505 #       Handle the --with-configdir option
8506 #       Help for --with-x-app-defaults option added.
8507 #
8508 ###############################################################################
8509
8510 have_configdir=yes
8511 with_configdir_req=unspecified
8512
8513 # Check whether --with-configdir was given.
8514 if test "${with_configdir+set}" = set; then :
8515   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
8516 else
8517   with_configdir=yes
8518 fi
8519
8520
8521 if test x"$with_configdir" = xyes; then
8522   HACK_CONF_DIR='${datadir}/xscreensaver/config'
8523 elif test x"$with_configdir" = xno; then
8524   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8525   exit 1
8526 else
8527   # there must be a better way than this...
8528   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8529     # absolute path
8530     HACK_CONF_DIR=$with_configdir
8531   else
8532     # relative path
8533     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8534   fi
8535 fi
8536
8537
8538
8539
8540 ###############################################################################
8541 #
8542 #       Check for the SGI SCREEN_SAVER server extension.
8543 #
8544 ###############################################################################
8545
8546 #have_sgi=no
8547 #with_sgi_req=unspecified
8548 #AC_ARG_WITH(sgi-ext,
8549 #[Except where noted, all of the --with options below can also take a
8550 #directory argument: for example, `--with-motif=/opt/Motif'.  That would
8551 #cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
8552 #to be added to the -L list, assuming those directories exist.
8553 #
8554 #By default, support for each of these options will be built in, if the
8555 #relevant library routines exist.  At run time, they will then be used
8556 #only if the X server being used supports them.  Each --with option has
8557 #a corresponding --without option, to override building support for them
8558 #at all.
8559 #
8560 #Screen blanking and idle-detection options:
8561 #
8562 #  --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.],
8563 #  [with_sgi="$withval"; with_sgi_req="$withval"],[with_sgi=yes])
8564 #
8565 #HANDLE_X_PATH_ARG(with_sgi, --with-sgi-ext, SGI SCREEN_SAVER)
8566 #
8567 #if test "$with_sgi" = yes; then
8568 #  AC_CHECK_X_HEADER(X11/extensions/XScreenSaver.h,
8569 #                    [have_sgi=yes
8570 #                     AC_DEFINE(HAVE_SGI_SAVER_EXTENSION)],,
8571 #                    [#include <X11/Xlib.h>])
8572 #
8573 #elif test "$with_sgi" != no; then
8574 #  echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8575 #  exit 1
8576 #fi
8577
8578
8579 ###############################################################################
8580 #
8581 #       Check for the XIDLE server extension.
8582 #
8583 ###############################################################################
8584
8585 #have_xidle=no
8586 #with_xidle_req=unspecified
8587 #AC_ARG_WITH(xidle-ext,
8588 #[  --with-xidle-ext        Include support for the XIDLE extension.],
8589 #  [with_xidle="$withval"; with_xidle_req="$withval"],[with_xidle=yes])
8590 #
8591 #HANDLE_X_PATH_ARG(with_xidle, --with-xidle-ext, XIDLE)
8592 #
8593 #if test "$with_xidle" = yes; then
8594 #  AC_CHECK_X_HEADER(X11/extensions/xidle.h,
8595 #                    [have_xidle=yes
8596 #                     AC_DEFINE(HAVE_XIDLE_EXTENSION)],,
8597 #                    [#include <X11/Xlib.h>])
8598 #elif test "$with_xidle" != no; then
8599 #  echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
8600 #  exit 1
8601 #fi
8602
8603
8604 ###############################################################################
8605 #
8606 #       Check for the SGI-VIDEO-CONTROL server extension.
8607 #
8608 ###############################################################################
8609
8610 #have_sgivc=no
8611 #with_sgivc_req=unspecified
8612 #AC_ARG_WITH(sgivc-ext,
8613 #[  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.],
8614 #  [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
8615 #
8616 #HANDLE_X_PATH_ARG(with_sgivc, --with-sgivc-ext, SGI-VIDEO-CONTROL)
8617 #
8618 #if test "$with_sgivc" = yes; then
8619 #
8620 #  # first check for XSGIvc.h
8621 #  AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes],,
8622 #                    [#include <X11/Xlib.h>])
8623 #
8624 #  # if that succeeded, then check for the -lXsgivc
8625 #  if test "$have_sgivc" = yes; then
8626 #    have_sgivc=no
8627 #    AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
8628 #                  [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [true],
8629 #                  -lXext -lX11)
8630 #  fi
8631 #
8632 #  # if that succeeded, then we've really got it.
8633 #  if test "$have_sgivc" = yes; then
8634 #    AC_DEFINE(HAVE_SGI_VC_EXTENSION)
8635 #  fi
8636 #
8637 #elif test "$with_sgivc" != no; then
8638 #  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
8639 #  exit 1
8640 #fi
8641
8642
8643 ###############################################################################
8644 #
8645 #       Check for the DPMS server extension.
8646 #
8647 ###############################################################################
8648
8649 have_dpms=no
8650 with_dpms_req=unspecified
8651
8652 # Check whether --with-dpms-ext was given.
8653 if test "${with_dpms_ext+set}" = set; then :
8654   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
8655 else
8656   with_dpms=yes
8657 fi
8658
8659
8660
8661    case "$with_dpms" in
8662     yes) ;;
8663     no)  ;;
8664
8665     /*)
8666      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS headers" >&5
8667 $as_echo_n "checking for DPMS headers... " >&6; }
8668      d=$with_dpms/include
8669      if test -d $d; then
8670        X_CFLAGS="-I$d $X_CFLAGS"
8671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8672 $as_echo "$d" >&6; }
8673      else
8674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8675 $as_echo "not found ($d: no such directory)" >&6; }
8676      fi
8677
8678      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMS libs" >&5
8679 $as_echo_n "checking for DPMS libs... " >&6; }
8680      d=$with_dpms/lib
8681      if test -d $d; then
8682        X_LIBS="-L$d $X_LIBS"
8683        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8684 $as_echo "$d" >&6; }
8685      else
8686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8687 $as_echo "not found ($d: no such directory)" >&6; }
8688      fi
8689
8690      # replace the directory string with "yes".
8691      with_dpms_req="yes"
8692      with_dpms=$with_dpms_req
8693      ;;
8694
8695     *)
8696      echo ""
8697      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
8698      echo "       If it is a directory, then \`DIR/include' will be added to"
8699      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8700      exit 1
8701      ;;
8702    esac
8703
8704
8705 if test "$with_dpms" = yes; then
8706
8707   # first check for dpms.h
8708
8709   ac_save_CPPFLAGS="$CPPFLAGS"
8710   if test \! -z "$includedir" ; then
8711     CPPFLAGS="$CPPFLAGS -I$includedir"
8712   fi
8713   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8714   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8715   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/dpms.h" "ac_cv_header_X11_extensions_dpms_h" "#include <X11/Xlib.h>
8716                      #include <X11/Xmd.h>
8717 "
8718 if test "x$ac_cv_header_X11_extensions_dpms_h" = xyes; then :
8719   have_dpms=yes
8720 fi
8721
8722
8723   CPPFLAGS="$ac_save_CPPFLAGS"
8724
8725   # if that succeeded, then check for the DPMS code in the libraries
8726   if test "$have_dpms" = yes; then
8727
8728     # first look in -lXext (this is where it is with XFree86 4.0)
8729     have_dpms=no
8730
8731   ac_save_CPPFLAGS="$CPPFLAGS"
8732   ac_save_LDFLAGS="$LDFLAGS"
8733 #  ac_save_LIBS="$LIBS"
8734
8735   if test \! -z "$includedir" ; then
8736     CPPFLAGS="$CPPFLAGS -I$includedir"
8737   fi
8738   # note: $X_CFLAGS includes $x_includes
8739   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8740
8741   if test \! -z "$libdir" ; then
8742     LDFLAGS="$LDFLAGS -L$libdir"
8743   fi
8744   # note: $X_LIBS includes $x_libraries
8745   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8746
8747   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8748   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8749   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXext" >&5
8750 $as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
8751 if ${ac_cv_lib_Xext_DPMSInfo+:} false; then :
8752   $as_echo_n "(cached) " >&6
8753 else
8754   ac_check_lib_save_LIBS=$LIBS
8755 LIBS="-lXext -lXext -lX11 $LIBS"
8756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8757 /* end confdefs.h.  */
8758
8759 /* Override any GCC internal prototype to avoid an error.
8760    Use char because int might match the return type of a GCC
8761    builtin and then its argument prototype would still apply.  */
8762 #ifdef __cplusplus
8763 extern "C"
8764 #endif
8765 char DPMSInfo ();
8766 int
8767 main ()
8768 {
8769 return DPMSInfo ();
8770   ;
8771   return 0;
8772 }
8773 _ACEOF
8774 if ac_fn_c_try_link "$LINENO"; then :
8775   ac_cv_lib_Xext_DPMSInfo=yes
8776 else
8777   ac_cv_lib_Xext_DPMSInfo=no
8778 fi
8779 rm -f core conftest.err conftest.$ac_objext \
8780     conftest$ac_exeext conftest.$ac_ext
8781 LIBS=$ac_check_lib_save_LIBS
8782 fi
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_DPMSInfo" >&5
8784 $as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
8785 if test "x$ac_cv_lib_Xext_DPMSInfo" = xyes; then :
8786   have_dpms=yes
8787 else
8788   true
8789 fi
8790
8791   CPPFLAGS="$ac_save_CPPFLAGS"
8792   LDFLAGS="$ac_save_LDFLAGS"
8793 #  LIBS="$ac_save_LIBS"
8794
8795
8796     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
8797     if test "$have_dpms" = no; then
8798
8799   ac_save_CPPFLAGS="$CPPFLAGS"
8800   ac_save_LDFLAGS="$LDFLAGS"
8801 #  ac_save_LIBS="$LIBS"
8802
8803   if test \! -z "$includedir" ; then
8804     CPPFLAGS="$CPPFLAGS -I$includedir"
8805   fi
8806   # note: $X_CFLAGS includes $x_includes
8807   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8808
8809   if test \! -z "$libdir" ; then
8810     LDFLAGS="$LDFLAGS -L$libdir"
8811   fi
8812   # note: $X_LIBS includes $x_libraries
8813   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8814
8815   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8816   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPMSInfo in -lXdpms" >&5
8818 $as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
8819 if ${ac_cv_lib_Xdpms_DPMSInfo+:} false; then :
8820   $as_echo_n "(cached) " >&6
8821 else
8822   ac_check_lib_save_LIBS=$LIBS
8823 LIBS="-lXdpms -lXext -lX11 $LIBS"
8824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8825 /* end confdefs.h.  */
8826
8827 /* Override any GCC internal prototype to avoid an error.
8828    Use char because int might match the return type of a GCC
8829    builtin and then its argument prototype would still apply.  */
8830 #ifdef __cplusplus
8831 extern "C"
8832 #endif
8833 char DPMSInfo ();
8834 int
8835 main ()
8836 {
8837 return DPMSInfo ();
8838   ;
8839   return 0;
8840 }
8841 _ACEOF
8842 if ac_fn_c_try_link "$LINENO"; then :
8843   ac_cv_lib_Xdpms_DPMSInfo=yes
8844 else
8845   ac_cv_lib_Xdpms_DPMSInfo=no
8846 fi
8847 rm -f core conftest.err conftest.$ac_objext \
8848     conftest$ac_exeext conftest.$ac_ext
8849 LIBS=$ac_check_lib_save_LIBS
8850 fi
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
8852 $as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
8853 if test "x$ac_cv_lib_Xdpms_DPMSInfo" = xyes; then :
8854   have_dpms=yes; XDPMS_LIBS="-lXdpms"
8855 else
8856   true
8857 fi
8858
8859   CPPFLAGS="$ac_save_CPPFLAGS"
8860   LDFLAGS="$ac_save_LDFLAGS"
8861 #  LIBS="$ac_save_LIBS"
8862
8863     fi
8864   fi
8865
8866
8867   # if that succeeded, then we've really got it.
8868   if test "$have_dpms" = yes; then
8869     $as_echo "#define HAVE_DPMS_EXTENSION 1" >>confdefs.h
8870
8871   fi
8872
8873 elif test "$with_dpms" != no; then
8874   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
8875   exit 1
8876 fi
8877
8878
8879 ###############################################################################
8880 #
8881 #       Check for the XINERAMA server extension.
8882 #
8883 ###############################################################################
8884
8885 have_xinerama=no
8886 with_xinerama_req=unspecified
8887
8888 # Check whether --with-xinerama-ext was given.
8889 if test "${with_xinerama_ext+set}" = set; then :
8890   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
8891 else
8892   with_xinerama=yes
8893 fi
8894
8895
8896
8897    case "$with_xinerama" in
8898     yes) ;;
8899     no)  ;;
8900
8901     /*)
8902      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA headers" >&5
8903 $as_echo_n "checking for XINERAMA headers... " >&6; }
8904      d=$with_xinerama/include
8905      if test -d $d; then
8906        X_CFLAGS="-I$d $X_CFLAGS"
8907        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8908 $as_echo "$d" >&6; }
8909      else
8910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8911 $as_echo "not found ($d: no such directory)" >&6; }
8912      fi
8913
8914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA libs" >&5
8915 $as_echo_n "checking for XINERAMA libs... " >&6; }
8916      d=$with_xinerama/lib
8917      if test -d $d; then
8918        X_LIBS="-L$d $X_LIBS"
8919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
8920 $as_echo "$d" >&6; }
8921      else
8922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
8923 $as_echo "not found ($d: no such directory)" >&6; }
8924      fi
8925
8926      # replace the directory string with "yes".
8927      with_xinerama_req="yes"
8928      with_xinerama=$with_xinerama_req
8929      ;;
8930
8931     *)
8932      echo ""
8933      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
8934      echo "       If it is a directory, then \`DIR/include' will be added to"
8935      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8936      exit 1
8937      ;;
8938    esac
8939
8940
8941 if test "$with_xinerama" = yes; then
8942
8943   # first check for Xinerama.h
8944
8945   ac_save_CPPFLAGS="$CPPFLAGS"
8946   if test \! -z "$includedir" ; then
8947     CPPFLAGS="$CPPFLAGS -I$includedir"
8948   fi
8949   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8950   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8951   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "#include <X11/Xlib.h>
8952 "
8953 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = xyes; then :
8954   have_xinerama=yes
8955 fi
8956
8957
8958   CPPFLAGS="$ac_save_CPPFLAGS"
8959
8960   # if that succeeded, then check for the XINERAMA code in the libraries
8961   if test "$have_xinerama" = yes; then
8962
8963     # first look in -lXext
8964     have_xinerama=no
8965
8966   ac_save_CPPFLAGS="$CPPFLAGS"
8967   ac_save_LDFLAGS="$LDFLAGS"
8968 #  ac_save_LIBS="$LIBS"
8969
8970   if test \! -z "$includedir" ; then
8971     CPPFLAGS="$CPPFLAGS -I$includedir"
8972   fi
8973   # note: $X_CFLAGS includes $x_includes
8974   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8975
8976   if test \! -z "$libdir" ; then
8977     LDFLAGS="$LDFLAGS -L$libdir"
8978   fi
8979   # note: $X_LIBS includes $x_libraries
8980   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8981
8982   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8983   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
8984   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXext" >&5
8985 $as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
8986 if ${ac_cv_lib_Xext_XineramaQueryScreens+:} false; then :
8987   $as_echo_n "(cached) " >&6
8988 else
8989   ac_check_lib_save_LIBS=$LIBS
8990 LIBS="-lXext -lXext -lX11 $LIBS"
8991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8992 /* end confdefs.h.  */
8993
8994 /* Override any GCC internal prototype to avoid an error.
8995    Use char because int might match the return type of a GCC
8996    builtin and then its argument prototype would still apply.  */
8997 #ifdef __cplusplus
8998 extern "C"
8999 #endif
9000 char XineramaQueryScreens ();
9001 int
9002 main ()
9003 {
9004 return XineramaQueryScreens ();
9005   ;
9006   return 0;
9007 }
9008 _ACEOF
9009 if ac_fn_c_try_link "$LINENO"; then :
9010   ac_cv_lib_Xext_XineramaQueryScreens=yes
9011 else
9012   ac_cv_lib_Xext_XineramaQueryScreens=no
9013 fi
9014 rm -f core conftest.err conftest.$ac_objext \
9015     conftest$ac_exeext conftest.$ac_ext
9016 LIBS=$ac_check_lib_save_LIBS
9017 fi
9018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
9019 $as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
9020 if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = xyes; then :
9021   have_xinerama=yes
9022 else
9023   true
9024 fi
9025
9026   CPPFLAGS="$ac_save_CPPFLAGS"
9027   LDFLAGS="$ac_save_LDFLAGS"
9028 #  LIBS="$ac_save_LIBS"
9029
9030
9031     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
9032     if test "$have_xinerama" = no; then
9033
9034   ac_save_CPPFLAGS="$CPPFLAGS"
9035   ac_save_LDFLAGS="$LDFLAGS"
9036 #  ac_save_LIBS="$LIBS"
9037
9038   if test \! -z "$includedir" ; then
9039     CPPFLAGS="$CPPFLAGS -I$includedir"
9040   fi
9041   # note: $X_CFLAGS includes $x_includes
9042   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9043
9044   if test \! -z "$libdir" ; then
9045     LDFLAGS="$LDFLAGS -L$libdir"
9046   fi
9047   # note: $X_LIBS includes $x_libraries
9048   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9049
9050   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9051   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9052   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryScreens in -lXinerama" >&5
9053 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
9054 if ${ac_cv_lib_Xinerama_XineramaQueryScreens+:} false; then :
9055   $as_echo_n "(cached) " >&6
9056 else
9057   ac_check_lib_save_LIBS=$LIBS
9058 LIBS="-lXinerama -lXext -lX11 $LIBS"
9059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9060 /* end confdefs.h.  */
9061
9062 /* Override any GCC internal prototype to avoid an error.
9063    Use char because int might match the return type of a GCC
9064    builtin and then its argument prototype would still apply.  */
9065 #ifdef __cplusplus
9066 extern "C"
9067 #endif
9068 char XineramaQueryScreens ();
9069 int
9070 main ()
9071 {
9072 return XineramaQueryScreens ();
9073   ;
9074   return 0;
9075 }
9076 _ACEOF
9077 if ac_fn_c_try_link "$LINENO"; then :
9078   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
9079 else
9080   ac_cv_lib_Xinerama_XineramaQueryScreens=no
9081 fi
9082 rm -f core conftest.err conftest.$ac_objext \
9083     conftest$ac_exeext conftest.$ac_ext
9084 LIBS=$ac_check_lib_save_LIBS
9085 fi
9086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
9087 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
9088 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = xyes; then :
9089   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
9090 else
9091   true
9092 fi
9093
9094   CPPFLAGS="$ac_save_CPPFLAGS"
9095   LDFLAGS="$ac_save_LDFLAGS"
9096 #  LIBS="$ac_save_LIBS"
9097
9098     fi
9099   fi
9100
9101   # if that succeeded, then we've really got it.
9102   if test "$have_xinerama" = yes; then
9103     $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
9104
9105   fi
9106
9107 elif test "$with_xinerama" != no; then
9108   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
9109   exit 1
9110 fi
9111
9112
9113 ###############################################################################
9114 #
9115 #       Check for the XINPUT server extension.
9116 #
9117 ###############################################################################
9118
9119 have_xinput=no
9120 with_xinput_req=unspecified
9121
9122 # Check whether --with-xinput-ext was given.
9123 if test "${with_xinput_ext+set}" = set; then :
9124   withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
9125 else
9126   with_xinput=yes
9127 fi
9128
9129
9130
9131    case "$with_xinput" in
9132     yes) ;;
9133     no)  ;;
9134
9135     /*)
9136      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT headers" >&5
9137 $as_echo_n "checking for XINPUT headers... " >&6; }
9138      d=$with_xinput/include
9139      if test -d $d; then
9140        X_CFLAGS="-I$d $X_CFLAGS"
9141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9142 $as_echo "$d" >&6; }
9143      else
9144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9145 $as_echo "not found ($d: no such directory)" >&6; }
9146      fi
9147
9148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT libs" >&5
9149 $as_echo_n "checking for XINPUT libs... " >&6; }
9150      d=$with_xinput/lib
9151      if test -d $d; then
9152        X_LIBS="-L$d $X_LIBS"
9153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9154 $as_echo "$d" >&6; }
9155      else
9156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9157 $as_echo "not found ($d: no such directory)" >&6; }
9158      fi
9159
9160      # replace the directory string with "yes".
9161      with_xinput_req="yes"
9162      with_xinput=$with_xinput_req
9163      ;;
9164
9165     *)
9166      echo ""
9167      echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
9168      echo "       If it is a directory, then \`DIR/include' will be added to"
9169      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9170      exit 1
9171      ;;
9172    esac
9173
9174
9175 if test "$with_xinput" = yes; then
9176
9177   # first check for Xinput.h
9178
9179   ac_save_CPPFLAGS="$CPPFLAGS"
9180   if test \! -z "$includedir" ; then
9181     CPPFLAGS="$CPPFLAGS -I$includedir"
9182   fi
9183   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9184   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9185   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XInput.h" "ac_cv_header_X11_extensions_XInput_h" "#include <X11/Xlib.h>
9186 "
9187 if test "x$ac_cv_header_X11_extensions_XInput_h" = xyes; then :
9188   have_xinput=yes
9189 fi
9190
9191
9192   CPPFLAGS="$ac_save_CPPFLAGS"
9193
9194   # if that succeeded, then check for libXi
9195   if test "$have_xinput" = yes; then
9196     have_xinput=no
9197
9198   ac_save_CPPFLAGS="$CPPFLAGS"
9199   ac_save_LDFLAGS="$LDFLAGS"
9200 #  ac_save_LIBS="$LIBS"
9201
9202   if test \! -z "$includedir" ; then
9203     CPPFLAGS="$CPPFLAGS -I$includedir"
9204   fi
9205   # note: $X_CFLAGS includes $x_includes
9206   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9207
9208   if test \! -z "$libdir" ; then
9209     LDFLAGS="$LDFLAGS -L$libdir"
9210   fi
9211   # note: $X_LIBS includes $x_libraries
9212   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9213
9214   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9215   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9216   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XListInputDevices in -lXi" >&5
9217 $as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
9218 if ${ac_cv_lib_Xi_XListInputDevices+:} false; then :
9219   $as_echo_n "(cached) " >&6
9220 else
9221   ac_check_lib_save_LIBS=$LIBS
9222 LIBS="-lXi -lXext -lX11 $LIBS"
9223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9224 /* end confdefs.h.  */
9225
9226 /* Override any GCC internal prototype to avoid an error.
9227    Use char because int might match the return type of a GCC
9228    builtin and then its argument prototype would still apply.  */
9229 #ifdef __cplusplus
9230 extern "C"
9231 #endif
9232 char XListInputDevices ();
9233 int
9234 main ()
9235 {
9236 return XListInputDevices ();
9237   ;
9238   return 0;
9239 }
9240 _ACEOF
9241 if ac_fn_c_try_link "$LINENO"; then :
9242   ac_cv_lib_Xi_XListInputDevices=yes
9243 else
9244   ac_cv_lib_Xi_XListInputDevices=no
9245 fi
9246 rm -f core conftest.err conftest.$ac_objext \
9247     conftest$ac_exeext conftest.$ac_ext
9248 LIBS=$ac_check_lib_save_LIBS
9249 fi
9250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xi_XListInputDevices" >&5
9251 $as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
9252 if test "x$ac_cv_lib_Xi_XListInputDevices" = xyes; then :
9253   have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
9254 else
9255   true
9256 fi
9257
9258   CPPFLAGS="$ac_save_CPPFLAGS"
9259   LDFLAGS="$ac_save_LDFLAGS"
9260 #  LIBS="$ac_save_LIBS"
9261
9262   fi
9263
9264   # if that succeeded, then we've really got it.
9265   if test "$have_xinput" = yes; then
9266     $as_echo "#define HAVE_XINPUT 1" >>confdefs.h
9267
9268   fi
9269
9270 elif test "$with_xinput" != no; then
9271   echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
9272   exit 1
9273 fi
9274
9275
9276 ###############################################################################
9277 #
9278 #       Check for the XF86VMODE server extension (for virtual screens.)
9279 #
9280 ###############################################################################
9281
9282 have_xf86vmode=no
9283 with_xf86vmode_req=unspecified
9284
9285 # Check whether --with-xf86vmode-ext was given.
9286 if test "${with_xf86vmode_ext+set}" = set; then :
9287   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
9288 else
9289   with_xf86vmode=yes
9290 fi
9291
9292
9293
9294    case "$with_xf86vmode" in
9295     yes) ;;
9296     no)  ;;
9297
9298     /*)
9299      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode headers" >&5
9300 $as_echo_n "checking for xf86vmode headers... " >&6; }
9301      d=$with_xf86vmode/include
9302      if test -d $d; then
9303        X_CFLAGS="-I$d $X_CFLAGS"
9304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9305 $as_echo "$d" >&6; }
9306      else
9307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9308 $as_echo "not found ($d: no such directory)" >&6; }
9309      fi
9310
9311      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode libs" >&5
9312 $as_echo_n "checking for xf86vmode libs... " >&6; }
9313      d=$with_xf86vmode/lib
9314      if test -d $d; then
9315        X_LIBS="-L$d $X_LIBS"
9316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9317 $as_echo "$d" >&6; }
9318      else
9319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9320 $as_echo "not found ($d: no such directory)" >&6; }
9321      fi
9322
9323      # replace the directory string with "yes".
9324      with_xf86vmode_req="yes"
9325      with_xf86vmode=$with_xf86vmode_req
9326      ;;
9327
9328     *)
9329      echo ""
9330      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
9331      echo "       If it is a directory, then \`DIR/include' will be added to"
9332      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9333      exit 1
9334      ;;
9335    esac
9336
9337
9338 VIDMODE_LIBS=""
9339
9340 if test "$with_xf86vmode" = yes; then
9341
9342   # first check for xf86vmode.h
9343
9344   ac_save_CPPFLAGS="$CPPFLAGS"
9345   if test \! -z "$includedir" ; then
9346     CPPFLAGS="$CPPFLAGS -I$includedir"
9347   fi
9348   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9349   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9350   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9351 "
9352 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9353   have_xf86vmode=yes
9354 fi
9355
9356
9357   CPPFLAGS="$ac_save_CPPFLAGS"
9358
9359   # if that succeeded, then check for the -lXxf86vm
9360   if test "$have_xf86vmode" = yes; then
9361     have_xf86vmode=no
9362
9363   ac_save_CPPFLAGS="$CPPFLAGS"
9364   ac_save_LDFLAGS="$LDFLAGS"
9365 #  ac_save_LIBS="$LIBS"
9366
9367   if test \! -z "$includedir" ; then
9368     CPPFLAGS="$CPPFLAGS -I$includedir"
9369   fi
9370   # note: $X_CFLAGS includes $x_includes
9371   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9372
9373   if test \! -z "$libdir" ; then
9374     LDFLAGS="$LDFLAGS -L$libdir"
9375   fi
9376   # note: $X_LIBS includes $x_libraries
9377   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9378
9379   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9380   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9381   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
9382 $as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
9383 if ${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+:} false; then :
9384   $as_echo_n "(cached) " >&6
9385 else
9386   ac_check_lib_save_LIBS=$LIBS
9387 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9389 /* end confdefs.h.  */
9390
9391 /* Override any GCC internal prototype to avoid an error.
9392    Use char because int might match the return type of a GCC
9393    builtin and then its argument prototype would still apply.  */
9394 #ifdef __cplusplus
9395 extern "C"
9396 #endif
9397 char XF86VidModeGetViewPort ();
9398 int
9399 main ()
9400 {
9401 return XF86VidModeGetViewPort ();
9402   ;
9403   return 0;
9404 }
9405 _ACEOF
9406 if ac_fn_c_try_link "$LINENO"; then :
9407   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
9408 else
9409   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
9410 fi
9411 rm -f core conftest.err conftest.$ac_objext \
9412     conftest$ac_exeext conftest.$ac_ext
9413 LIBS=$ac_check_lib_save_LIBS
9414 fi
9415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
9416 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
9417 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = xyes; then :
9418   have_xf86vmode=yes;
9419                    VIDMODE_LIBS="-lXxf86vm";
9420                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
9421 else
9422   true
9423 fi
9424
9425   CPPFLAGS="$ac_save_CPPFLAGS"
9426   LDFLAGS="$ac_save_LDFLAGS"
9427 #  LIBS="$ac_save_LIBS"
9428
9429   fi
9430
9431   # if that succeeded, then we've really got it.
9432   if test "$have_xf86vmode" = yes; then
9433     $as_echo "#define HAVE_XF86VMODE 1" >>confdefs.h
9434
9435   fi
9436
9437 elif test "$with_xf86vmode" != no; then
9438   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
9439   exit 1
9440 fi
9441
9442
9443 ###############################################################################
9444 #
9445 #       Check for the XF86VMODE server extension (for gamma fading.)
9446 #
9447 ###############################################################################
9448
9449 have_xf86gamma=no
9450 have_xf86gamma_ramp=no
9451 with_xf86gamma_req=unspecified
9452
9453 # Check whether --with-xf86gamma-ext was given.
9454 if test "${with_xf86gamma_ext+set}" = set; then :
9455   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
9456 else
9457   with_xf86gamma=yes
9458 fi
9459
9460
9461
9462    case "$with_xf86gamma" in
9463     yes) ;;
9464     no)  ;;
9465
9466     /*)
9467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma headers" >&5
9468 $as_echo_n "checking for xf86gamma headers... " >&6; }
9469      d=$with_xf86gamma/include
9470      if test -d $d; then
9471        X_CFLAGS="-I$d $X_CFLAGS"
9472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9473 $as_echo "$d" >&6; }
9474      else
9475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9476 $as_echo "not found ($d: no such directory)" >&6; }
9477      fi
9478
9479      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86gamma libs" >&5
9480 $as_echo_n "checking for xf86gamma libs... " >&6; }
9481      d=$with_xf86gamma/lib
9482      if test -d $d; then
9483        X_LIBS="-L$d $X_LIBS"
9484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9485 $as_echo "$d" >&6; }
9486      else
9487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9488 $as_echo "not found ($d: no such directory)" >&6; }
9489      fi
9490
9491      # replace the directory string with "yes".
9492      with_xf86gamma_req="yes"
9493      with_xf86gamma=$with_xf86gamma_req
9494      ;;
9495
9496     *)
9497      echo ""
9498      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
9499      echo "       If it is a directory, then \`DIR/include' will be added to"
9500      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9501      exit 1
9502      ;;
9503    esac
9504
9505
9506 if test "$with_xf86gamma" = yes; then
9507
9508   # first check for xf86vmode.h, if we haven't already
9509   if test "$have_xf86vmode" = yes; then
9510     have_xf86gamma=yes
9511   else
9512
9513   ac_save_CPPFLAGS="$CPPFLAGS"
9514   if test \! -z "$includedir" ; then
9515     CPPFLAGS="$CPPFLAGS -I$includedir"
9516   fi
9517   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9518   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9519   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
9520 "
9521 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
9522   have_xf86gamma=yes
9523 fi
9524
9525
9526   CPPFLAGS="$ac_save_CPPFLAGS"
9527   fi
9528
9529   # if that succeeded, then check for the -lXxf86vm
9530   if test "$have_xf86gamma" = yes; then
9531     have_xf86gamma=no
9532
9533   ac_save_CPPFLAGS="$CPPFLAGS"
9534   ac_save_LDFLAGS="$LDFLAGS"
9535 #  ac_save_LIBS="$LIBS"
9536
9537   if test \! -z "$includedir" ; then
9538     CPPFLAGS="$CPPFLAGS -I$includedir"
9539   fi
9540   # note: $X_CFLAGS includes $x_includes
9541   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9542
9543   if test \! -z "$libdir" ; then
9544     LDFLAGS="$LDFLAGS -L$libdir"
9545   fi
9546   # note: $X_LIBS includes $x_libraries
9547   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9548
9549   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9550   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9551   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
9552 $as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
9553 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+:} false; then :
9554   $as_echo_n "(cached) " >&6
9555 else
9556   ac_check_lib_save_LIBS=$LIBS
9557 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9559 /* end confdefs.h.  */
9560
9561 /* Override any GCC internal prototype to avoid an error.
9562    Use char because int might match the return type of a GCC
9563    builtin and then its argument prototype would still apply.  */
9564 #ifdef __cplusplus
9565 extern "C"
9566 #endif
9567 char XF86VidModeSetGamma ();
9568 int
9569 main ()
9570 {
9571 return XF86VidModeSetGamma ();
9572   ;
9573   return 0;
9574 }
9575 _ACEOF
9576 if ac_fn_c_try_link "$LINENO"; then :
9577   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
9578 else
9579   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
9580 fi
9581 rm -f core conftest.err conftest.$ac_objext \
9582     conftest$ac_exeext conftest.$ac_ext
9583 LIBS=$ac_check_lib_save_LIBS
9584 fi
9585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
9586 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
9587 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = xyes; then :
9588   have_xf86gamma=yes
9589 else
9590   true
9591 fi
9592
9593   CPPFLAGS="$ac_save_CPPFLAGS"
9594   LDFLAGS="$ac_save_LDFLAGS"
9595 #  LIBS="$ac_save_LIBS"
9596
9597   fi
9598
9599   # check for the Ramp versions of the functions too.
9600   if test "$have_xf86gamma" = yes; then
9601     have_xf86gamma_ramp=no
9602
9603   ac_save_CPPFLAGS="$CPPFLAGS"
9604   ac_save_LDFLAGS="$LDFLAGS"
9605 #  ac_save_LIBS="$LIBS"
9606
9607   if test \! -z "$includedir" ; then
9608     CPPFLAGS="$CPPFLAGS -I$includedir"
9609   fi
9610   # note: $X_CFLAGS includes $x_includes
9611   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9612
9613   if test \! -z "$libdir" ; then
9614     LDFLAGS="$LDFLAGS -L$libdir"
9615   fi
9616   # note: $X_LIBS includes $x_libraries
9617   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9618
9619   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9620   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
9622 $as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
9623 if ${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+:} false; then :
9624   $as_echo_n "(cached) " >&6
9625 else
9626   ac_check_lib_save_LIBS=$LIBS
9627 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9629 /* end confdefs.h.  */
9630
9631 /* Override any GCC internal prototype to avoid an error.
9632    Use char because int might match the return type of a GCC
9633    builtin and then its argument prototype would still apply.  */
9634 #ifdef __cplusplus
9635 extern "C"
9636 #endif
9637 char XF86VidModeSetGammaRamp ();
9638 int
9639 main ()
9640 {
9641 return XF86VidModeSetGammaRamp ();
9642   ;
9643   return 0;
9644 }
9645 _ACEOF
9646 if ac_fn_c_try_link "$LINENO"; then :
9647   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
9648 else
9649   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
9650 fi
9651 rm -f core conftest.err conftest.$ac_objext \
9652     conftest$ac_exeext conftest.$ac_ext
9653 LIBS=$ac_check_lib_save_LIBS
9654 fi
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
9656 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
9657 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = xyes; then :
9658   have_xf86gamma_ramp=yes
9659 else
9660   true
9661 fi
9662
9663   CPPFLAGS="$ac_save_CPPFLAGS"
9664   LDFLAGS="$ac_save_LDFLAGS"
9665 #  LIBS="$ac_save_LIBS"
9666
9667   fi
9668
9669   # if those tests succeeded, then we've really got the functions.
9670   if test "$have_xf86gamma" = yes; then
9671     $as_echo "#define HAVE_XF86VMODE_GAMMA 1" >>confdefs.h
9672
9673   fi
9674
9675   if test "$have_xf86gamma_ramp" = yes; then
9676     $as_echo "#define HAVE_XF86VMODE_GAMMA_RAMP 1" >>confdefs.h
9677
9678   fi
9679
9680   # pull in the lib, if we haven't already
9681   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
9682     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
9683   fi
9684
9685 elif test "$with_xf86gamma" != no; then
9686   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
9687   exit 1
9688 fi
9689
9690
9691 ###############################################################################
9692 #
9693 #       Check for the RANDR (Resize and Rotate) server extension.
9694 #
9695 #       We need this to detect when the resolution of the desktop
9696 #       has changed out from under us (this is a newer, different
9697 #       mechanism than the XF86VMODE virtual viewports.)
9698 #
9699 ###############################################################################
9700
9701 have_randr=no
9702 with_randr_req=unspecified
9703
9704 # Check whether --with-randr-ext was given.
9705 if test "${with_randr_ext+set}" = set; then :
9706   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
9707 else
9708   with_randr=yes
9709 fi
9710
9711
9712
9713    case "$with_randr" in
9714     yes) ;;
9715     no)  ;;
9716
9717     /*)
9718      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR headers" >&5
9719 $as_echo_n "checking for RANDR headers... " >&6; }
9720      d=$with_randr/include
9721      if test -d $d; then
9722        X_CFLAGS="-I$d $X_CFLAGS"
9723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9724 $as_echo "$d" >&6; }
9725      else
9726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9727 $as_echo "not found ($d: no such directory)" >&6; }
9728      fi
9729
9730      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR libs" >&5
9731 $as_echo_n "checking for RANDR libs... " >&6; }
9732      d=$with_randr/lib
9733      if test -d $d; then
9734        X_LIBS="-L$d $X_LIBS"
9735        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
9736 $as_echo "$d" >&6; }
9737      else
9738        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
9739 $as_echo "not found ($d: no such directory)" >&6; }
9740      fi
9741
9742      # replace the directory string with "yes".
9743      with_randr_req="yes"
9744      with_randr=$with_randr_req
9745      ;;
9746
9747     *)
9748      echo ""
9749      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
9750      echo "       If it is a directory, then \`DIR/include' will be added to"
9751      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9752      exit 1
9753      ;;
9754    esac
9755
9756
9757 if test "$with_randr" = yes; then
9758
9759   # first check for Xrandr.h
9760
9761   ac_save_CPPFLAGS="$CPPFLAGS"
9762   if test \! -z "$includedir" ; then
9763     CPPFLAGS="$CPPFLAGS -I$includedir"
9764   fi
9765   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9766   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9767   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "#include <X11/Xlib.h>
9768 "
9769 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = xyes; then :
9770   have_randr=yes
9771 fi
9772
9773
9774   CPPFLAGS="$ac_save_CPPFLAGS"
9775
9776   # if that succeeded, then check for the XRR code in the libraries
9777   if test "$have_randr" = yes; then
9778
9779     # RANDR probably needs -lXrender
9780     xrender_libs=
9781
9782   ac_save_CPPFLAGS="$CPPFLAGS"
9783   ac_save_LDFLAGS="$LDFLAGS"
9784 #  ac_save_LIBS="$LIBS"
9785
9786   if test \! -z "$includedir" ; then
9787     CPPFLAGS="$CPPFLAGS -I$includedir"
9788   fi
9789   # note: $X_CFLAGS includes $x_includes
9790   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9791
9792   if test \! -z "$libdir" ; then
9793     LDFLAGS="$LDFLAGS -L$libdir"
9794   fi
9795   # note: $X_LIBS includes $x_libraries
9796   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9797
9798   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9799   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9800   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderSetSubpixelOrder in -lXrender" >&5
9801 $as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
9802 if ${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+:} false; then :
9803   $as_echo_n "(cached) " >&6
9804 else
9805   ac_check_lib_save_LIBS=$LIBS
9806 LIBS="-lXrender -lXext -lX11 $LIBS"
9807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9808 /* end confdefs.h.  */
9809
9810 /* Override any GCC internal prototype to avoid an error.
9811    Use char because int might match the return type of a GCC
9812    builtin and then its argument prototype would still apply.  */
9813 #ifdef __cplusplus
9814 extern "C"
9815 #endif
9816 char XRenderSetSubpixelOrder ();
9817 int
9818 main ()
9819 {
9820 return XRenderSetSubpixelOrder ();
9821   ;
9822   return 0;
9823 }
9824 _ACEOF
9825 if ac_fn_c_try_link "$LINENO"; then :
9826   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
9827 else
9828   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
9829 fi
9830 rm -f core conftest.err conftest.$ac_objext \
9831     conftest$ac_exeext conftest.$ac_ext
9832 LIBS=$ac_check_lib_save_LIBS
9833 fi
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
9835 $as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
9836 if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = xyes; then :
9837   xrender_libs="-lXrender"
9838 else
9839   true
9840 fi
9841
9842   CPPFLAGS="$ac_save_CPPFLAGS"
9843   LDFLAGS="$ac_save_LDFLAGS"
9844 #  LIBS="$ac_save_LIBS"
9845
9846
9847     # first look for RANDR in -lXext
9848     have_randr=no
9849
9850   ac_save_CPPFLAGS="$CPPFLAGS"
9851   ac_save_LDFLAGS="$LDFLAGS"
9852 #  ac_save_LIBS="$LIBS"
9853
9854   if test \! -z "$includedir" ; then
9855     CPPFLAGS="$CPPFLAGS -I$includedir"
9856   fi
9857   # note: $X_CFLAGS includes $x_includes
9858   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9859
9860   if test \! -z "$libdir" ; then
9861     LDFLAGS="$LDFLAGS -L$libdir"
9862   fi
9863   # note: $X_LIBS includes $x_libraries
9864   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9865
9866   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9867   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9868   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXext" >&5
9869 $as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
9870 if ${ac_cv_lib_Xext_XRRGetScreenInfo+:} false; then :
9871   $as_echo_n "(cached) " >&6
9872 else
9873   ac_check_lib_save_LIBS=$LIBS
9874 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
9875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9876 /* end confdefs.h.  */
9877
9878 /* Override any GCC internal prototype to avoid an error.
9879    Use char because int might match the return type of a GCC
9880    builtin and then its argument prototype would still apply.  */
9881 #ifdef __cplusplus
9882 extern "C"
9883 #endif
9884 char XRRGetScreenInfo ();
9885 int
9886 main ()
9887 {
9888 return XRRGetScreenInfo ();
9889   ;
9890   return 0;
9891 }
9892 _ACEOF
9893 if ac_fn_c_try_link "$LINENO"; then :
9894   ac_cv_lib_Xext_XRRGetScreenInfo=yes
9895 else
9896   ac_cv_lib_Xext_XRRGetScreenInfo=no
9897 fi
9898 rm -f core conftest.err conftest.$ac_objext \
9899     conftest$ac_exeext conftest.$ac_ext
9900 LIBS=$ac_check_lib_save_LIBS
9901 fi
9902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
9903 $as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
9904 if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = xyes; then :
9905   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
9906 else
9907   true
9908 fi
9909
9910   CPPFLAGS="$ac_save_CPPFLAGS"
9911   LDFLAGS="$ac_save_LDFLAGS"
9912 #  LIBS="$ac_save_LIBS"
9913
9914
9915     # if that failed, look in -lXrandr
9916     if test "$have_randr" = no; then
9917
9918   ac_save_CPPFLAGS="$CPPFLAGS"
9919   ac_save_LDFLAGS="$LDFLAGS"
9920 #  ac_save_LIBS="$LIBS"
9921
9922   if test \! -z "$includedir" ; then
9923     CPPFLAGS="$CPPFLAGS -I$includedir"
9924   fi
9925   # note: $X_CFLAGS includes $x_includes
9926   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9927
9928   if test \! -z "$libdir" ; then
9929     LDFLAGS="$LDFLAGS -L$libdir"
9930   fi
9931   # note: $X_LIBS includes $x_libraries
9932   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9933
9934   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9935   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
9936   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
9937 $as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
9938 if ${ac_cv_lib_Xrandr_XRRGetScreenInfo+:} false; then :
9939   $as_echo_n "(cached) " >&6
9940 else
9941   ac_check_lib_save_LIBS=$LIBS
9942 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
9943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9944 /* end confdefs.h.  */
9945
9946 /* Override any GCC internal prototype to avoid an error.
9947    Use char because int might match the return type of a GCC
9948    builtin and then its argument prototype would still apply.  */
9949 #ifdef __cplusplus
9950 extern "C"
9951 #endif
9952 char XRRGetScreenInfo ();
9953 int
9954 main ()
9955 {
9956 return XRRGetScreenInfo ();
9957   ;
9958   return 0;
9959 }
9960 _ACEOF
9961 if ac_fn_c_try_link "$LINENO"; then :
9962   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
9963 else
9964   ac_cv_lib_Xrandr_XRRGetScreenInfo=no
9965 fi
9966 rm -f core conftest.err conftest.$ac_objext \
9967     conftest$ac_exeext conftest.$ac_ext
9968 LIBS=$ac_check_lib_save_LIBS
9969 fi
9970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
9971 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
9972 if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = xyes; then :
9973   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
9974 else
9975   true
9976 fi
9977
9978   CPPFLAGS="$ac_save_CPPFLAGS"
9979   LDFLAGS="$ac_save_LDFLAGS"
9980 #  LIBS="$ac_save_LIBS"
9981
9982     fi
9983   fi
9984
9985   # if that succeeded, then we've really got it.
9986   if test "$have_randr" = yes; then
9987     $as_echo "#define HAVE_RANDR 1" >>confdefs.h
9988
9989
9990     # Now check for version 1.2 in the same libs.
9991     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
9992     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources" >&5
9993 $as_echo_n "checking for XRRGetScreenResources... " >&6; }
9994 if ${ac_cv_randr_12+:} false; then :
9995   $as_echo_n "(cached) " >&6
9996 else
9997   ac_cv_randr_12=no
9998
9999   ac_save_CPPFLAGS="$CPPFLAGS"
10000   if test \! -z "$includedir" ; then
10001     CPPFLAGS="$CPPFLAGS -I$includedir"
10002   fi
10003   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10004   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10006 /* end confdefs.h.  */
10007 #include <stdlib.h>
10008                          #include <X11/Xlib.h>
10009                          #include <X11/extensions/Xrandr.h>
10010 int
10011 main ()
10012 {
10013 XRRScreenResources *res =
10014                            XRRGetScreenResources (0, 0);
10015   ;
10016   return 0;
10017 }
10018 _ACEOF
10019 if ac_fn_c_try_compile "$LINENO"; then :
10020   ac_cv_randr_12=yes
10021 else
10022   ac_cv_randr_12=no
10023 fi
10024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10025   CPPFLAGS="$ac_save_CPPFLAGS"
10026 fi
10027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_randr_12" >&5
10028 $as_echo "$ac_cv_randr_12" >&6; }
10029     if test "$ac_cv_randr_12" = yes ; then
10030       $as_echo "#define HAVE_RANDR_12 1" >>confdefs.h
10031
10032     fi
10033 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
10034 #                  [true], $SAVER_LIBS)
10035   fi
10036
10037
10038 elif test "$with_randr" != no; then
10039   echo "error: must be yes or no: --with-randr-ext=$with_randr"
10040   exit 1
10041 fi
10042
10043
10044 ###############################################################################
10045 #
10046 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
10047 #       using other XF86 stuff.)
10048 #
10049 ###############################################################################
10050
10051 have_xf86miscsetgrabkeysstate=no
10052 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
10053
10054   ac_save_CPPFLAGS="$CPPFLAGS"
10055   ac_save_LDFLAGS="$LDFLAGS"
10056 #  ac_save_LIBS="$LIBS"
10057
10058   if test \! -z "$includedir" ; then
10059     CPPFLAGS="$CPPFLAGS -I$includedir"
10060   fi
10061   # note: $X_CFLAGS includes $x_includes
10062   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10063
10064   if test \! -z "$libdir" ; then
10065     LDFLAGS="$LDFLAGS -L$libdir"
10066   fi
10067   # note: $X_LIBS includes $x_libraries
10068   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10069
10070   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10071   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
10073 $as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
10074 if ${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+:} false; then :
10075   $as_echo_n "(cached) " >&6
10076 else
10077   ac_check_lib_save_LIBS=$LIBS
10078 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
10079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10080 /* end confdefs.h.  */
10081
10082 /* Override any GCC internal prototype to avoid an error.
10083    Use char because int might match the return type of a GCC
10084    builtin and then its argument prototype would still apply.  */
10085 #ifdef __cplusplus
10086 extern "C"
10087 #endif
10088 char XF86MiscSetGrabKeysState ();
10089 int
10090 main ()
10091 {
10092 return XF86MiscSetGrabKeysState ();
10093   ;
10094   return 0;
10095 }
10096 _ACEOF
10097 if ac_fn_c_try_link "$LINENO"; then :
10098   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
10099 else
10100   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
10101 fi
10102 rm -f core conftest.err conftest.$ac_objext \
10103     conftest$ac_exeext conftest.$ac_ext
10104 LIBS=$ac_check_lib_save_LIBS
10105 fi
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
10107 $as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
10108 if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = xyes; then :
10109   have_xf86miscsetgrabkeysstate=yes
10110 else
10111   true
10112 fi
10113
10114   CPPFLAGS="$ac_save_CPPFLAGS"
10115   LDFLAGS="$ac_save_LDFLAGS"
10116 #  LIBS="$ac_save_LIBS"
10117
10118   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
10119     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
10120     $as_echo "#define HAVE_XF86MISCSETGRABKEYSSTATE 1" >>confdefs.h
10121
10122   fi
10123 fi
10124
10125
10126 ###############################################################################
10127 #
10128 #       Check for HP XHPDisableReset and XHPEnableReset.
10129 #
10130 ###############################################################################
10131
10132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XHPDisableReset in X11/XHPlib.h" >&5
10133 $as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
10134
10135   ac_save_CPPFLAGS="$CPPFLAGS"
10136   if test \! -z "$includedir" ; then
10137     CPPFLAGS="$CPPFLAGS -I$includedir"
10138   fi
10139   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10140   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10141   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10142 /* end confdefs.h.  */
10143 #include <X11/XHPlib.h>
10144
10145 _ACEOF
10146 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10147   $EGREP "XHPDisableReset" >/dev/null 2>&1; then :
10148   $as_echo "#define HAVE_XHPDISABLERESET 1" >>confdefs.h
10149
10150                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10151                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10152 $as_echo "yes" >&6; }
10153 else
10154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10155 $as_echo "no" >&6; }
10156 fi
10157 rm -rf conftest*
10158
10159   CPPFLAGS="$ac_save_CPPFLAGS"
10160
10161
10162 ###############################################################################
10163 #
10164 #       Check for /proc/interrupts.
10165 #
10166 ###############################################################################
10167
10168 have_proc_interrupts=no
10169 with_proc_interrupts_req=unspecified
10170
10171 # Check whether --with-proc-interrupts was given.
10172 if test "${with_proc_interrupts+set}" = set; then :
10173   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
10174 else
10175   with_proc_interrupts=yes
10176 fi
10177
10178
10179 if test "$with_proc_interrupts" = yes; then
10180
10181   # Note that we may be building in an environment (e.g. Debian buildd chroot)
10182   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
10183   # check that it has the bits we need, but otherwise we'll just go on faith.
10184   #
10185   have_proc_interrupts=yes
10186
10187   if test -f /proc/interrupts; then
10188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /proc/interrupts contains keyboard data" >&5
10189 $as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
10190 if ${ac_cv_have_proc_interrupts+:} false; then :
10191   $as_echo_n "(cached) " >&6
10192 else
10193   ac_cv_have_proc_interrupts=no
10194      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
10195        ac_cv_have_proc_interrupts=yes
10196      fi
10197
10198 fi
10199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_proc_interrupts" >&5
10200 $as_echo "$ac_cv_have_proc_interrupts" >&6; }
10201    have_proc_interrupts=$ac_cv_have_proc_interrupts
10202   fi
10203
10204   if test "$have_proc_interrupts" = yes; then
10205     $as_echo "#define HAVE_PROC_INTERRUPTS 1" >>confdefs.h
10206
10207   fi
10208
10209 elif test "$with_proc_interrupts" != no; then
10210   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
10211   exit 1
10212 fi
10213
10214
10215 ###############################################################################
10216 #
10217 #       The --enable-locking option
10218 #
10219 ###############################################################################
10220
10221 # Check whether --enable-locking was given.
10222 if test "${enable_locking+set}" = set; then :
10223   enableval=$enable_locking; enable_locking="$enableval"
10224 else
10225   if test "$ac_macosx" = yes; then
10226     # We can't lock on MacOS X, so default to not compiling in support for it.
10227     # But allow --enable-locking to override that, so I can debug Linux locking
10228     # under MacOS X11.
10229     enable_locking=no
10230    else
10231     enable_locking=yes
10232    fi
10233 fi
10234
10235 if test "$enable_locking" = yes; then
10236   true
10237 elif test "$enable_locking" = no; then
10238   $as_echo "#define NO_LOCKING 1" >>confdefs.h
10239
10240 else
10241   echo "error: must be yes or no: --enable-locking=$enable_locking"
10242   exit 1
10243 fi
10244
10245
10246 ###############################################################################
10247 #
10248 #       Whether to allow root password to unblank.
10249 #
10250 ###############################################################################
10251 # Check whether --enable-root-passwd was given.
10252 if test "${enable_root_passwd+set}" = set; then :
10253   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
10254 else
10255   enable_root_passwd=yes
10256 fi
10257
10258 if test "$enable_root_passwd" = yes; then
10259   $as_echo "#define ALLOW_ROOT_PASSWD 1" >>confdefs.h
10260
10261   true
10262 elif test "$enable_root_passwd" != no; then
10263   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
10264   exit 1
10265 fi
10266
10267 ###############################################################################
10268 #
10269 #       Check for PAM.
10270 #
10271 ###############################################################################
10272
10273 case "$host" in
10274   *-solaris*)
10275    # Solaris systems tend to come with PAM misconfigured.
10276    #  Don't build it by default, even if the headers exist.
10277    with_pam_default=no
10278    ;;
10279   *)
10280    # Default to building PAM support on all other systems, if it exists.
10281    with_pam_default=yes
10282   ;;
10283 esac
10284
10285 have_pam=no
10286 with_pam_req=unspecified
10287
10288
10289 # Check whether --with-pam was given.
10290 if test "${with_pam+set}" = set; then :
10291   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
10292 else
10293   with_pam=$with_pam_default
10294 fi
10295
10296
10297
10298 # Check whether --with-pam_service_name was given.
10299 if test "${with_pam_service_name+set}" = set; then :
10300   withval=$with_pam_service_name; pam_service_name="$withval"
10301 else
10302   pam_service_name="xscreensaver"
10303 fi
10304
10305
10306 # Check whether --enable-pam-check-account-type was given.
10307 if test "${enable_pam_check_account_type+set}" = set; then :
10308   enableval=$enable_pam_check_account_type; enable_pam_check_account_type="$enableval"
10309 else
10310   enable_pam_check_account_type=no
10311 fi
10312
10313 if test "$enable_pam_check_account_type" = yes ; then
10314   $as_echo "#define PAM_CHECK_ACCOUNT_TYPE 1" >>confdefs.h
10315
10316   true
10317 elif test "$enable_pam_check_account_type" != no ; then
10318   echo "error: must be yes or no: --enable-pam-check-account-type=$enable_pam_check_account_type"
10319   exit 1
10320 fi
10321
10322
10323    case "$with_pam" in
10324     yes) ;;
10325     no)  ;;
10326
10327     /*)
10328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM headers" >&5
10329 $as_echo_n "checking for PAM headers... " >&6; }
10330      d=$with_pam/include
10331      if test -d $d; then
10332        X_CFLAGS="-I$d $X_CFLAGS"
10333        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10334 $as_echo "$d" >&6; }
10335      else
10336        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10337 $as_echo "not found ($d: no such directory)" >&6; }
10338      fi
10339
10340      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM libs" >&5
10341 $as_echo_n "checking for PAM libs... " >&6; }
10342      d=$with_pam/lib
10343      if test -d $d; then
10344        X_LIBS="-L$d $X_LIBS"
10345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10346 $as_echo "$d" >&6; }
10347      else
10348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10349 $as_echo "not found ($d: no such directory)" >&6; }
10350      fi
10351
10352      # replace the directory string with "yes".
10353      with_pam_req="yes"
10354      with_pam=$with_pam_req
10355      ;;
10356
10357     *)
10358      echo ""
10359      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
10360      echo "       If it is a directory, then \`DIR/include' will be added to"
10361      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10362      exit 1
10363      ;;
10364    esac
10365
10366
10367 if test "$enable_locking" = yes -a "$with_pam" = yes; then
10368   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PAM" >&5
10369 $as_echo_n "checking for PAM... " >&6; }
10370 if ${ac_cv_pam+:} false; then :
10371   $as_echo_n "(cached) " >&6
10372 else
10373
10374   ac_save_CPPFLAGS="$CPPFLAGS"
10375   if test \! -z "$includedir" ; then
10376     CPPFLAGS="$CPPFLAGS -I$includedir"
10377   fi
10378   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10379   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10381 /* end confdefs.h.  */
10382 #include <security/pam_appl.h>
10383 int
10384 main ()
10385 {
10386
10387   ;
10388   return 0;
10389 }
10390 _ACEOF
10391 if ac_fn_c_try_compile "$LINENO"; then :
10392   ac_cv_pam=yes
10393 else
10394   ac_cv_pam=no
10395 fi
10396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10397   CPPFLAGS="$ac_save_CPPFLAGS"
10398 fi
10399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pam" >&5
10400 $as_echo "$ac_cv_pam" >&6; }
10401   if test "$ac_cv_pam" = yes ; then
10402     have_pam=yes
10403     $as_echo "#define HAVE_PAM 1" >>confdefs.h
10404
10405     cat >>confdefs.h <<_ACEOF
10406 #define PAM_SERVICE_NAME "$pam_service_name"
10407 _ACEOF
10408
10409
10410     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
10411
10412     # libpam typically requires dlopen and dlsym.  On FreeBSD,
10413     # those are in libc.  On Linux and Solaris, they're in libdl.
10414     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10415 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10416 if ${ac_cv_lib_dl_dlopen+:} false; then :
10417   $as_echo_n "(cached) " >&6
10418 else
10419   ac_check_lib_save_LIBS=$LIBS
10420 LIBS="-ldl  $LIBS"
10421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10422 /* end confdefs.h.  */
10423
10424 /* Override any GCC internal prototype to avoid an error.
10425    Use char because int might match the return type of a GCC
10426    builtin and then its argument prototype would still apply.  */
10427 #ifdef __cplusplus
10428 extern "C"
10429 #endif
10430 char dlopen ();
10431 int
10432 main ()
10433 {
10434 return dlopen ();
10435   ;
10436   return 0;
10437 }
10438 _ACEOF
10439 if ac_fn_c_try_link "$LINENO"; then :
10440   ac_cv_lib_dl_dlopen=yes
10441 else
10442   ac_cv_lib_dl_dlopen=no
10443 fi
10444 rm -f core conftest.err conftest.$ac_objext \
10445     conftest$ac_exeext conftest.$ac_ext
10446 LIBS=$ac_check_lib_save_LIBS
10447 fi
10448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10449 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10450 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10451   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
10452 fi
10453
10454
10455     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
10456     have_timedwait=no
10457     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lc" >&5
10458 $as_echo_n "checking for sigtimedwait in -lc... " >&6; }
10459 if ${ac_cv_lib_c_sigtimedwait+:} false; then :
10460   $as_echo_n "(cached) " >&6
10461 else
10462   ac_check_lib_save_LIBS=$LIBS
10463 LIBS="-lc  $LIBS"
10464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10465 /* end confdefs.h.  */
10466
10467 /* Override any GCC internal prototype to avoid an error.
10468    Use char because int might match the return type of a GCC
10469    builtin and then its argument prototype would still apply.  */
10470 #ifdef __cplusplus
10471 extern "C"
10472 #endif
10473 char sigtimedwait ();
10474 int
10475 main ()
10476 {
10477 return sigtimedwait ();
10478   ;
10479   return 0;
10480 }
10481 _ACEOF
10482 if ac_fn_c_try_link "$LINENO"; then :
10483   ac_cv_lib_c_sigtimedwait=yes
10484 else
10485   ac_cv_lib_c_sigtimedwait=no
10486 fi
10487 rm -f core conftest.err conftest.$ac_objext \
10488     conftest$ac_exeext conftest.$ac_ext
10489 LIBS=$ac_check_lib_save_LIBS
10490 fi
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigtimedwait" >&5
10492 $as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
10493 if test "x$ac_cv_lib_c_sigtimedwait" = xyes; then :
10494   have_timedwait=yes
10495                   $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
10496
10497 fi
10498
10499     if test "$have_timedwait" = no ; then
10500       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigtimedwait in -lrt" >&5
10501 $as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
10502 if ${ac_cv_lib_rt_sigtimedwait+:} false; then :
10503   $as_echo_n "(cached) " >&6
10504 else
10505   ac_check_lib_save_LIBS=$LIBS
10506 LIBS="-lrt  $LIBS"
10507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10508 /* end confdefs.h.  */
10509
10510 /* Override any GCC internal prototype to avoid an error.
10511    Use char because int might match the return type of a GCC
10512    builtin and then its argument prototype would still apply.  */
10513 #ifdef __cplusplus
10514 extern "C"
10515 #endif
10516 char sigtimedwait ();
10517 int
10518 main ()
10519 {
10520 return sigtimedwait ();
10521   ;
10522   return 0;
10523 }
10524 _ACEOF
10525 if ac_fn_c_try_link "$LINENO"; then :
10526   ac_cv_lib_rt_sigtimedwait=yes
10527 else
10528   ac_cv_lib_rt_sigtimedwait=no
10529 fi
10530 rm -f core conftest.err conftest.$ac_objext \
10531     conftest$ac_exeext conftest.$ac_ext
10532 LIBS=$ac_check_lib_save_LIBS
10533 fi
10534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sigtimedwait" >&5
10535 $as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
10536 if test "x$ac_cv_lib_rt_sigtimedwait" = xyes; then :
10537   have_timedwait=yes
10538                                       $as_echo "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
10539
10540                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
10541 fi
10542
10543     fi
10544
10545     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call pam_strerror" >&5
10546 $as_echo_n "checking how to call pam_strerror... " >&6; }
10547     if ${ac_cv_pam_strerror_args+:} false; then :
10548   $as_echo_n "(cached) " >&6
10549 else
10550
10551   ac_save_CPPFLAGS="$CPPFLAGS"
10552   if test \! -z "$includedir" ; then
10553     CPPFLAGS="$CPPFLAGS -I$includedir"
10554   fi
10555   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10556   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10558 /* end confdefs.h.  */
10559 #include <stdio.h>
10560                         #include <stdlib.h>
10561                         #include <security/pam_appl.h>
10562 int
10563 main ()
10564 {
10565 pam_handle_t *pamh = 0;
10566                         char *s = pam_strerror(pamh, PAM_SUCCESS);
10567   ;
10568   return 0;
10569 }
10570 _ACEOF
10571 if ac_fn_c_try_compile "$LINENO"; then :
10572   ac_pam_strerror_args=2
10573 else
10574
10575   ac_save_CPPFLAGS="$CPPFLAGS"
10576   if test \! -z "$includedir" ; then
10577     CPPFLAGS="$CPPFLAGS -I$includedir"
10578   fi
10579   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10580   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582 /* end confdefs.h.  */
10583 #include <stdio.h>
10584                                           #include <stdlib.h>
10585                                           #include <security/pam_appl.h>
10586 int
10587 main ()
10588 {
10589 char *s =
10590                                            pam_strerror(PAM_SUCCESS);
10591   ;
10592   return 0;
10593 }
10594 _ACEOF
10595 if ac_fn_c_try_compile "$LINENO"; then :
10596   ac_pam_strerror_args=1
10597 else
10598   ac_pam_strerror_args=0
10599 fi
10600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10601   CPPFLAGS="$ac_save_CPPFLAGS"
10602 fi
10603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10604   CPPFLAGS="$ac_save_CPPFLAGS"
10605       ac_cv_pam_strerror_args=$ac_pam_strerror_args
10606 fi
10607
10608     ac_pam_strerror_args=$ac_cv_pam_strerror_args
10609     if test "$ac_pam_strerror_args" = 1 ; then
10610       { $as_echo "$as_me:${as_lineno-$LINENO}: result: one argument" >&5
10611 $as_echo "one argument" >&6; }
10612     elif test "$ac_pam_strerror_args" = 2 ; then
10613       $as_echo "#define PAM_STRERROR_TWO_ARGS 1" >>confdefs.h
10614
10615       { $as_echo "$as_me:${as_lineno-$LINENO}: result: two arguments" >&5
10616 $as_echo "two arguments" >&6; }
10617     else
10618       { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
10619 $as_echo "unknown" >&6; }
10620     fi
10621
10622 # Check pam_fail_delay
10623     { $as_echo "$as_me:${as_lineno-$LINENO}: checking pam_fail_delay in -lpam" >&5
10624 $as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
10625     if ${ac_cv_pam_fail_delay+:} false; then :
10626   $as_echo_n "(cached) " >&6
10627 else
10628   ac_save_LDFLAGS="$LDFLAGS"
10629       LDFLAGS="-lpam"
10630       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10631 /* end confdefs.h.  */
10632 #include <security/pam_appl.h>
10633 int
10634 main ()
10635 {
10636 pam_handle_t *pamh = 0;
10637                    unsigned int usec = 1;
10638                    int status = pam_fail_delay (pamh, usec);
10639   ;
10640   return 0;
10641 }
10642 _ACEOF
10643 if ac_fn_c_try_link "$LINENO"; then :
10644   ac_pam_fail_delay=yes
10645 else
10646   ac_pam_fail_delay=no
10647 fi
10648 rm -f core conftest.err conftest.$ac_objext \
10649     conftest$ac_exeext conftest.$ac_ext
10650       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
10651       LDFLAGS=$ac_save_LDFLAGS
10652 fi
10653
10654
10655       if test "$ac_pam_fail_delay" = yes ; then
10656         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10657 $as_echo "yes" >&6; }
10658         $as_echo "#define HAVE_PAM_FAIL_DELAY 1" >>confdefs.h
10659
10660       else
10661         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10662 $as_echo "no" >&6; }
10663       fi
10664
10665   fi
10666 fi
10667
10668
10669 ###############################################################################
10670 #
10671 #       Check for Kerberos.
10672 #
10673 ###############################################################################
10674
10675 have_kerberos=no
10676 have_kerberos5=no
10677 with_kerberos_req=unspecified
10678
10679
10680 # Check whether --with-kerberos was given.
10681 if test "${with_kerberos+set}" = set; then :
10682   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
10683 else
10684   with_kerberos=yes
10685 fi
10686
10687
10688
10689    case "$with_kerberos" in
10690     yes) ;;
10691     no)  ;;
10692
10693     /*)
10694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos headers" >&5
10695 $as_echo_n "checking for Kerberos headers... " >&6; }
10696      d=$with_kerberos/include
10697      if test -d $d; then
10698        X_CFLAGS="-I$d $X_CFLAGS"
10699        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10700 $as_echo "$d" >&6; }
10701      else
10702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10703 $as_echo "not found ($d: no such directory)" >&6; }
10704      fi
10705
10706      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos libs" >&5
10707 $as_echo_n "checking for Kerberos libs... " >&6; }
10708      d=$with_kerberos/lib
10709      if test -d $d; then
10710        X_LIBS="-L$d $X_LIBS"
10711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
10712 $as_echo "$d" >&6; }
10713      else
10714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
10715 $as_echo "not found ($d: no such directory)" >&6; }
10716      fi
10717
10718      # replace the directory string with "yes".
10719      with_kerberos_req="yes"
10720      with_kerberos=$with_kerberos_req
10721      ;;
10722
10723     *)
10724      echo ""
10725      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
10726      echo "       If it is a directory, then \`DIR/include' will be added to"
10727      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10728      exit 1
10729      ;;
10730    esac
10731
10732
10733 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
10734   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 4" >&5
10735 $as_echo_n "checking for Kerberos 4... " >&6; }
10736 if ${ac_cv_kerberos+:} false; then :
10737   $as_echo_n "(cached) " >&6
10738 else
10739
10740   ac_save_CPPFLAGS="$CPPFLAGS"
10741   if test \! -z "$includedir" ; then
10742     CPPFLAGS="$CPPFLAGS -I$includedir"
10743   fi
10744   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10745   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10747 /* end confdefs.h.  */
10748 #include <krb.h>
10749 int
10750 main ()
10751 {
10752
10753   ;
10754   return 0;
10755 }
10756 _ACEOF
10757 if ac_fn_c_try_compile "$LINENO"; then :
10758   ac_cv_kerberos=yes
10759 else
10760   ac_cv_kerberos=no
10761 fi
10762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10763   CPPFLAGS="$ac_save_CPPFLAGS"
10764 fi
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos" >&5
10766 $as_echo "$ac_cv_kerberos" >&6; }
10767   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos 5" >&5
10768 $as_echo_n "checking for Kerberos 5... " >&6; }
10769 if ${ac_cv_kerberos5+:} false; then :
10770   $as_echo_n "(cached) " >&6
10771 else
10772
10773   ac_save_CPPFLAGS="$CPPFLAGS"
10774   if test \! -z "$includedir" ; then
10775     CPPFLAGS="$CPPFLAGS -I$includedir"
10776   fi
10777   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10778   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10780 /* end confdefs.h.  */
10781 #include <kerberosIV/krb.h>
10782 int
10783 main ()
10784 {
10785
10786   ;
10787   return 0;
10788 }
10789 _ACEOF
10790 if ac_fn_c_try_compile "$LINENO"; then :
10791   ac_cv_kerberos5=yes
10792 else
10793   ac_cv_kerberos5=no
10794 fi
10795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10796   CPPFLAGS="$ac_save_CPPFLAGS"
10797 fi
10798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kerberos5" >&5
10799 $as_echo "$ac_cv_kerberos5" >&6; }
10800
10801   if test "$ac_cv_kerberos" = yes ; then
10802     have_kerberos=yes
10803     $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10804
10805   fi
10806
10807   if test "$ac_cv_kerberos5" = yes ; then
10808
10809     # Andrew Snare <ajs@pigpond.com> wrote:
10810     #
10811     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
10812     # (krb4) was also available.  This turns out not to be the case with
10813     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
10814     # is optional.
10815     #
10816     # So, disable kerberosV support if libkrb4 can't be found.
10817     # This is not the best solution, but it makes the compile not fail.
10818     #
10819
10820   ac_save_CPPFLAGS="$CPPFLAGS"
10821   ac_save_LDFLAGS="$LDFLAGS"
10822 #  ac_save_LIBS="$LIBS"
10823
10824   if test \! -z "$includedir" ; then
10825     CPPFLAGS="$CPPFLAGS -I$includedir"
10826   fi
10827   # note: $X_CFLAGS includes $x_includes
10828   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10829
10830   if test \! -z "$libdir" ; then
10831     LDFLAGS="$LDFLAGS -L$libdir"
10832   fi
10833   # note: $X_LIBS includes $x_libraries
10834   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10835
10836   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10837   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10838   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_tf_realm in -lkrb4" >&5
10839 $as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
10840 if ${ac_cv_lib_krb4_krb_get_tf_realm+:} false; then :
10841   $as_echo_n "(cached) " >&6
10842 else
10843   ac_check_lib_save_LIBS=$LIBS
10844 LIBS="-lkrb4  $LIBS"
10845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10846 /* end confdefs.h.  */
10847
10848 /* Override any GCC internal prototype to avoid an error.
10849    Use char because int might match the return type of a GCC
10850    builtin and then its argument prototype would still apply.  */
10851 #ifdef __cplusplus
10852 extern "C"
10853 #endif
10854 char krb_get_tf_realm ();
10855 int
10856 main ()
10857 {
10858 return krb_get_tf_realm ();
10859   ;
10860   return 0;
10861 }
10862 _ACEOF
10863 if ac_fn_c_try_link "$LINENO"; then :
10864   ac_cv_lib_krb4_krb_get_tf_realm=yes
10865 else
10866   ac_cv_lib_krb4_krb_get_tf_realm=no
10867 fi
10868 rm -f core conftest.err conftest.$ac_objext \
10869     conftest$ac_exeext conftest.$ac_ext
10870 LIBS=$ac_check_lib_save_LIBS
10871 fi
10872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
10873 $as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
10874 if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = xyes; then :
10875   have_kerberos=yes
10876 else
10877   have_kerberos=no
10878 fi
10879
10880   CPPFLAGS="$ac_save_CPPFLAGS"
10881   LDFLAGS="$ac_save_LDFLAGS"
10882 #  LIBS="$ac_save_LIBS"
10883
10884     if test "$have_kerberos" = yes ; then
10885       have_kerberos5=yes
10886       $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
10887
10888       $as_echo "#define HAVE_KERBEROS5 1" >>confdefs.h
10889
10890     else
10891       have_kerberos5=no
10892       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
10893 $as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
10894     fi
10895
10896   fi
10897
10898   if test "$have_kerberos5" = yes ; then
10899     # from Matt Knopp <mhat@infocalypse.netlag.com>
10900     # (who got it from amu@mit.edu)
10901
10902     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
10903
10904     # jwz: MacOS X uses -lkrb5, but not -lcrypt
10905
10906   ac_save_CPPFLAGS="$CPPFLAGS"
10907   ac_save_LDFLAGS="$LDFLAGS"
10908 #  ac_save_LIBS="$LIBS"
10909
10910   if test \! -z "$includedir" ; then
10911     CPPFLAGS="$CPPFLAGS -I$includedir"
10912   fi
10913   # note: $X_CFLAGS includes $x_includes
10914   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10915
10916   if test \! -z "$libdir" ; then
10917     LDFLAGS="$LDFLAGS -L$libdir"
10918   fi
10919   # note: $X_LIBS includes $x_libraries
10920   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10921
10922   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10923   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
10925 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
10926 if ${ac_cv_lib_crypt_crypt+:} false; then :
10927   $as_echo_n "(cached) " >&6
10928 else
10929   ac_check_lib_save_LIBS=$LIBS
10930 LIBS="-lcrypt  $LIBS"
10931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10932 /* end confdefs.h.  */
10933
10934 /* Override any GCC internal prototype to avoid an error.
10935    Use char because int might match the return type of a GCC
10936    builtin and then its argument prototype would still apply.  */
10937 #ifdef __cplusplus
10938 extern "C"
10939 #endif
10940 char crypt ();
10941 int
10942 main ()
10943 {
10944 return crypt ();
10945   ;
10946   return 0;
10947 }
10948 _ACEOF
10949 if ac_fn_c_try_link "$LINENO"; then :
10950   ac_cv_lib_crypt_crypt=yes
10951 else
10952   ac_cv_lib_crypt_crypt=no
10953 fi
10954 rm -f core conftest.err conftest.$ac_objext \
10955     conftest$ac_exeext conftest.$ac_ext
10956 LIBS=$ac_check_lib_save_LIBS
10957 fi
10958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
10959 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
10960 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
10961   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
10962 fi
10963
10964   CPPFLAGS="$ac_save_CPPFLAGS"
10965   LDFLAGS="$ac_save_LDFLAGS"
10966 #  LIBS="$ac_save_LIBS"
10967
10968
10969   elif test "$have_kerberos" = yes ; then
10970     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
10971     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
10972   fi
10973
10974   if test "$have_kerberos" = yes ; then
10975     ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
10976 if test "x$ac_cv_func_res_search" = xyes; then :
10977
10978 else
10979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
10980 $as_echo_n "checking for res_search in -lresolv... " >&6; }
10981 if ${ac_cv_lib_resolv_res_search+:} false; then :
10982   $as_echo_n "(cached) " >&6
10983 else
10984   ac_check_lib_save_LIBS=$LIBS
10985 LIBS="-lresolv  $LIBS"
10986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10987 /* end confdefs.h.  */
10988
10989 /* Override any GCC internal prototype to avoid an error.
10990    Use char because int might match the return type of a GCC
10991    builtin and then its argument prototype would still apply.  */
10992 #ifdef __cplusplus
10993 extern "C"
10994 #endif
10995 char res_search ();
10996 int
10997 main ()
10998 {
10999 return res_search ();
11000   ;
11001   return 0;
11002 }
11003 _ACEOF
11004 if ac_fn_c_try_link "$LINENO"; then :
11005   ac_cv_lib_resolv_res_search=yes
11006 else
11007   ac_cv_lib_resolv_res_search=no
11008 fi
11009 rm -f core conftest.err conftest.$ac_objext \
11010     conftest$ac_exeext conftest.$ac_ext
11011 LIBS=$ac_check_lib_save_LIBS
11012 fi
11013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
11014 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
11015 if test "x$ac_cv_lib_resolv_res_search" = xyes; then :
11016   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
11017 else
11018   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
11019 $as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
11020
11021 fi
11022
11023 fi
11024
11025   fi
11026 fi
11027
11028
11029 ###############################################################################
11030 #
11031 #       Check for the nine billion variants of shadow passwords...
11032 #
11033 ###############################################################################
11034
11035 need_setuid=no
11036
11037 have_shadow=no
11038 with_shadow_req=unspecified
11039
11040
11041 # Check whether --with-shadow was given.
11042 if test "${with_shadow+set}" = set; then :
11043   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
11044 else
11045   with_shadow=yes
11046 fi
11047
11048
11049
11050    case "$with_shadow" in
11051     yes) ;;
11052     no)  ;;
11053
11054     /*)
11055      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password headers" >&5
11056 $as_echo_n "checking for shadow password headers... " >&6; }
11057      d=$with_shadow/include
11058      if test -d $d; then
11059        X_CFLAGS="-I$d $X_CFLAGS"
11060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11061 $as_echo "$d" >&6; }
11062      else
11063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11064 $as_echo "not found ($d: no such directory)" >&6; }
11065      fi
11066
11067      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shadow password libs" >&5
11068 $as_echo_n "checking for shadow password libs... " >&6; }
11069      d=$with_shadow/lib
11070      if test -d $d; then
11071        X_LIBS="-L$d $X_LIBS"
11072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
11073 $as_echo "$d" >&6; }
11074      else
11075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
11076 $as_echo "not found ($d: no such directory)" >&6; }
11077      fi
11078
11079      # replace the directory string with "yes".
11080      with_shadow_req="yes"
11081      with_shadow=$with_shadow_req
11082      ;;
11083
11084     *)
11085      echo ""
11086      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
11087      echo "       If it is a directory, then \`DIR/include' will be added to"
11088      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11089      exit 1
11090      ;;
11091    esac
11092
11093
11094 if test "$enable_locking" = no ; then
11095   with_shadow_req=no
11096   with_shadow=no
11097 fi
11098
11099
11100 ###############################################################################
11101 #
11102 #       Check for Sun "adjunct" passwords.
11103 #
11104 ###############################################################################
11105
11106 if test "$with_shadow" = yes ; then
11107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sun-style shadow passwords" >&5
11108 $as_echo_n "checking for Sun-style shadow passwords... " >&6; }
11109 if ${ac_cv_sun_adjunct+:} false; then :
11110   $as_echo_n "(cached) " >&6
11111 else
11112
11113   ac_save_CPPFLAGS="$CPPFLAGS"
11114   if test \! -z "$includedir" ; then
11115     CPPFLAGS="$CPPFLAGS -I$includedir"
11116   fi
11117   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11118   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11120 /* end confdefs.h.  */
11121 #include <stdlib.h>
11122                                     #include <unistd.h>
11123                                     #include <sys/types.h>
11124                                     #include <sys/label.h>
11125                                     #include <sys/audit.h>
11126                                     #include <pwdadj.h>
11127 int
11128 main ()
11129 {
11130 struct passwd_adjunct *p = getpwanam("nobody");
11131                        const char *pw = p->pwa_passwd;
11132   ;
11133   return 0;
11134 }
11135 _ACEOF
11136 if ac_fn_c_try_compile "$LINENO"; then :
11137   ac_cv_sun_adjunct=yes
11138 else
11139   ac_cv_sun_adjunct=no
11140 fi
11141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11142   CPPFLAGS="$ac_save_CPPFLAGS"
11143 fi
11144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sun_adjunct" >&5
11145 $as_echo "$ac_cv_sun_adjunct" >&6; }
11146   if test "$ac_cv_sun_adjunct" = yes; then
11147     have_shadow_adjunct=yes
11148     have_shadow=yes
11149     need_setuid=yes
11150   fi
11151 fi
11152
11153
11154 ###############################################################################
11155 #
11156 #       Check for DEC and SCO so-called "enhanced" security.
11157 #
11158 ###############################################################################
11159
11160 if test "$with_shadow" = yes ; then
11161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DEC-style shadow passwords" >&5
11162 $as_echo_n "checking for DEC-style shadow passwords... " >&6; }
11163 if ${ac_cv_enhanced_passwd+:} false; then :
11164   $as_echo_n "(cached) " >&6
11165 else
11166
11167   ac_save_CPPFLAGS="$CPPFLAGS"
11168   if test \! -z "$includedir" ; then
11169     CPPFLAGS="$CPPFLAGS -I$includedir"
11170   fi
11171   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11172   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11174 /* end confdefs.h.  */
11175 #include <stdlib.h>
11176                                     #include <unistd.h>
11177                                     #include <sys/types.h>
11178                                     #include <pwd.h>
11179                                     #include <sys/security.h>
11180                                     #include <prot.h>
11181 int
11182 main ()
11183 {
11184 struct pr_passwd *p;
11185                        const char *pw;
11186                        set_auth_parameters(0, 0);
11187                        check_auth_parameters();
11188                        p = getprpwnam("nobody");
11189                        pw = p->ufld.fd_encrypt;
11190   ;
11191   return 0;
11192 }
11193 _ACEOF
11194 if ac_fn_c_try_compile "$LINENO"; then :
11195   ac_cv_enhanced_passwd=yes
11196 else
11197   ac_cv_enhanced_passwd=no
11198 fi
11199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11200   CPPFLAGS="$ac_save_CPPFLAGS"
11201 fi
11202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enhanced_passwd" >&5
11203 $as_echo "$ac_cv_enhanced_passwd" >&6; }
11204   if test $ac_cv_enhanced_passwd = yes; then
11205     have_shadow_enhanced=yes
11206     have_shadow=yes
11207     need_setuid=yes
11208
11209     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
11210     # (I'm told it needs -lcurses too, but I don't understand why.)
11211     # But on DEC, it's in -lsecurity.
11212     #
11213     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lprot" >&5
11214 $as_echo_n "checking for getprpwnam in -lprot... " >&6; }
11215 if ${ac_cv_lib_prot_getprpwnam+:} false; then :
11216   $as_echo_n "(cached) " >&6
11217 else
11218   ac_check_lib_save_LIBS=$LIBS
11219 LIBS="-lprot -lx $LIBS"
11220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11221 /* end confdefs.h.  */
11222
11223 /* Override any GCC internal prototype to avoid an error.
11224    Use char because int might match the return type of a GCC
11225    builtin and then its argument prototype would still apply.  */
11226 #ifdef __cplusplus
11227 extern "C"
11228 #endif
11229 char getprpwnam ();
11230 int
11231 main ()
11232 {
11233 return getprpwnam ();
11234   ;
11235   return 0;
11236 }
11237 _ACEOF
11238 if ac_fn_c_try_link "$LINENO"; then :
11239   ac_cv_lib_prot_getprpwnam=yes
11240 else
11241   ac_cv_lib_prot_getprpwnam=no
11242 fi
11243 rm -f core conftest.err conftest.$ac_objext \
11244     conftest$ac_exeext conftest.$ac_ext
11245 LIBS=$ac_check_lib_save_LIBS
11246 fi
11247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getprpwnam" >&5
11248 $as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
11249 if test "x$ac_cv_lib_prot_getprpwnam" = xyes; then :
11250   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
11251 else
11252   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprpwnam in -lsecurity" >&5
11253 $as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
11254 if ${ac_cv_lib_security_getprpwnam+:} false; then :
11255   $as_echo_n "(cached) " >&6
11256 else
11257   ac_check_lib_save_LIBS=$LIBS
11258 LIBS="-lsecurity  $LIBS"
11259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11260 /* end confdefs.h.  */
11261
11262 /* Override any GCC internal prototype to avoid an error.
11263    Use char because int might match the return type of a GCC
11264    builtin and then its argument prototype would still apply.  */
11265 #ifdef __cplusplus
11266 extern "C"
11267 #endif
11268 char getprpwnam ();
11269 int
11270 main ()
11271 {
11272 return getprpwnam ();
11273   ;
11274   return 0;
11275 }
11276 _ACEOF
11277 if ac_fn_c_try_link "$LINENO"; then :
11278   ac_cv_lib_security_getprpwnam=yes
11279 else
11280   ac_cv_lib_security_getprpwnam=no
11281 fi
11282 rm -f core conftest.err conftest.$ac_objext \
11283     conftest$ac_exeext conftest.$ac_ext
11284 LIBS=$ac_check_lib_save_LIBS
11285 fi
11286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_getprpwnam" >&5
11287 $as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
11288 if test "x$ac_cv_lib_security_getprpwnam" = xyes; then :
11289   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
11290 fi
11291
11292 fi
11293
11294   fi
11295 fi
11296
11297 ###############################################################################
11298 #
11299 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
11300 #
11301 ###############################################################################
11302
11303 if test "$with_shadow" = yes ; then
11304   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HP-style shadow passwords" >&5
11305 $as_echo_n "checking for HP-style shadow passwords... " >&6; }
11306 if ${ac_cv_hpux_passwd+:} false; then :
11307   $as_echo_n "(cached) " >&6
11308 else
11309
11310   ac_save_CPPFLAGS="$CPPFLAGS"
11311   if test \! -z "$includedir" ; then
11312     CPPFLAGS="$CPPFLAGS -I$includedir"
11313   fi
11314   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11315   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11317 /* end confdefs.h.  */
11318 #include <stdlib.h>
11319                                     #include <unistd.h>
11320                                     #include <sys/types.h>
11321                                     #include <pwd.h>
11322                                     #include <hpsecurity.h>
11323                                     #include <prot.h>
11324 int
11325 main ()
11326 {
11327 struct s_passwd *p = getspwnam("nobody");
11328                        const char *pw = p->pw_passwd;
11329   ;
11330   return 0;
11331 }
11332 _ACEOF
11333 if ac_fn_c_try_compile "$LINENO"; then :
11334   ac_cv_hpux_passwd=yes
11335 else
11336   ac_cv_hpux_passwd=no
11337 fi
11338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11339   CPPFLAGS="$ac_save_CPPFLAGS"
11340 fi
11341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_hpux_passwd" >&5
11342 $as_echo "$ac_cv_hpux_passwd" >&6; }
11343   if test "$ac_cv_hpux_passwd" = yes; then
11344     have_shadow_hpux=yes
11345     have_shadow=yes
11346     need_setuid=yes
11347
11348     # on HPUX, bigcrypt is in -lsec
11349     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsec" >&5
11350 $as_echo_n "checking for bigcrypt in -lsec... " >&6; }
11351 if ${ac_cv_lib_sec_bigcrypt+:} false; then :
11352   $as_echo_n "(cached) " >&6
11353 else
11354   ac_check_lib_save_LIBS=$LIBS
11355 LIBS="-lsec  $LIBS"
11356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11357 /* end confdefs.h.  */
11358
11359 /* Override any GCC internal prototype to avoid an error.
11360    Use char because int might match the return type of a GCC
11361    builtin and then its argument prototype would still apply.  */
11362 #ifdef __cplusplus
11363 extern "C"
11364 #endif
11365 char bigcrypt ();
11366 int
11367 main ()
11368 {
11369 return bigcrypt ();
11370   ;
11371   return 0;
11372 }
11373 _ACEOF
11374 if ac_fn_c_try_link "$LINENO"; then :
11375   ac_cv_lib_sec_bigcrypt=yes
11376 else
11377   ac_cv_lib_sec_bigcrypt=no
11378 fi
11379 rm -f core conftest.err conftest.$ac_objext \
11380     conftest$ac_exeext conftest.$ac_ext
11381 LIBS=$ac_check_lib_save_LIBS
11382 fi
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_bigcrypt" >&5
11384 $as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
11385 if test "x$ac_cv_lib_sec_bigcrypt" = xyes; then :
11386   PASSWD_LIBS="$PASSWD_LIBS -lsec"
11387 fi
11388
11389   fi
11390 fi
11391
11392
11393 ###############################################################################
11394 #
11395 #       Check for FreeBSD-style shadow passwords.
11396 #
11397 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
11398 #       password systems -- except you only get stuff in the pw_passwd field
11399 #       if the running program is setuid.  So, guess that we've got this
11400 #       lossage to contend with if /etc/master.passwd exists, and default to
11401 #       a setuid installation.
11402 #
11403 ###############################################################################
11404
11405 if test "$with_shadow" = yes ; then
11406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeBSD-style shadow passwords" >&5
11407 $as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
11408 if ${ac_cv_master_passwd+:} false; then :
11409   $as_echo_n "(cached) " >&6
11410 else
11411   if test -f /etc/master.passwd ; then
11412                     ac_cv_master_passwd=yes
11413                   else
11414                     ac_cv_master_passwd=no
11415                   fi
11416 fi
11417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_master_passwd" >&5
11418 $as_echo "$ac_cv_master_passwd" >&6; }
11419   if test "$ac_cv_master_passwd" = yes; then
11420     need_setuid=yes
11421   fi
11422 fi
11423
11424
11425 ###############################################################################
11426 #
11427 #       Check for traditional (ha!) shadow passwords.
11428 #
11429 ###############################################################################
11430
11431 if test "$with_shadow" = yes ; then
11432   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic shadow passwords" >&5
11433 $as_echo_n "checking for generic shadow passwords... " >&6; }
11434 if ${ac_cv_shadow+:} false; then :
11435   $as_echo_n "(cached) " >&6
11436 else
11437
11438   ac_save_CPPFLAGS="$CPPFLAGS"
11439   if test \! -z "$includedir" ; then
11440     CPPFLAGS="$CPPFLAGS -I$includedir"
11441   fi
11442   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11443   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11444   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11445 /* end confdefs.h.  */
11446 #include <stdlib.h>
11447                                     #include <unistd.h>
11448                                     #include <sys/types.h>
11449                                     #include <pwd.h>
11450                                     #include <shadow.h>
11451 int
11452 main ()
11453 {
11454 struct spwd *p = getspnam("nobody");
11455                        const char *pw = p->sp_pwdp;
11456   ;
11457   return 0;
11458 }
11459 _ACEOF
11460 if ac_fn_c_try_compile "$LINENO"; then :
11461   ac_cv_shadow=yes
11462 else
11463   ac_cv_shadow=no
11464 fi
11465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11466   CPPFLAGS="$ac_save_CPPFLAGS"
11467 fi
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_shadow" >&5
11469 $as_echo "$ac_cv_shadow" >&6; }
11470   if test "$ac_cv_shadow" = yes; then
11471     have_shadow=yes
11472     need_setuid=yes
11473
11474     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
11475     have_getspnam=no
11476     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lc" >&5
11477 $as_echo_n "checking for getspnam in -lc... " >&6; }
11478 if ${ac_cv_lib_c_getspnam+:} false; then :
11479   $as_echo_n "(cached) " >&6
11480 else
11481   ac_check_lib_save_LIBS=$LIBS
11482 LIBS="-lc  $LIBS"
11483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11484 /* end confdefs.h.  */
11485
11486 /* Override any GCC internal prototype to avoid an error.
11487    Use char because int might match the return type of a GCC
11488    builtin and then its argument prototype would still apply.  */
11489 #ifdef __cplusplus
11490 extern "C"
11491 #endif
11492 char getspnam ();
11493 int
11494 main ()
11495 {
11496 return getspnam ();
11497   ;
11498   return 0;
11499 }
11500 _ACEOF
11501 if ac_fn_c_try_link "$LINENO"; then :
11502   ac_cv_lib_c_getspnam=yes
11503 else
11504   ac_cv_lib_c_getspnam=no
11505 fi
11506 rm -f core conftest.err conftest.$ac_objext \
11507     conftest$ac_exeext conftest.$ac_ext
11508 LIBS=$ac_check_lib_save_LIBS
11509 fi
11510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_getspnam" >&5
11511 $as_echo "$ac_cv_lib_c_getspnam" >&6; }
11512 if test "x$ac_cv_lib_c_getspnam" = xyes; then :
11513   have_getspnam=yes
11514 fi
11515
11516     if test "$have_getspnam" = no ; then
11517       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
11518 $as_echo_n "checking for getspnam in -lgen... " >&6; }
11519 if ${ac_cv_lib_gen_getspnam+:} false; then :
11520   $as_echo_n "(cached) " >&6
11521 else
11522   ac_check_lib_save_LIBS=$LIBS
11523 LIBS="-lgen  $LIBS"
11524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11525 /* end confdefs.h.  */
11526
11527 /* Override any GCC internal prototype to avoid an error.
11528    Use char because int might match the return type of a GCC
11529    builtin and then its argument prototype would still apply.  */
11530 #ifdef __cplusplus
11531 extern "C"
11532 #endif
11533 char getspnam ();
11534 int
11535 main ()
11536 {
11537 return getspnam ();
11538   ;
11539   return 0;
11540 }
11541 _ACEOF
11542 if ac_fn_c_try_link "$LINENO"; then :
11543   ac_cv_lib_gen_getspnam=yes
11544 else
11545   ac_cv_lib_gen_getspnam=no
11546 fi
11547 rm -f core conftest.err conftest.$ac_objext \
11548     conftest$ac_exeext conftest.$ac_ext
11549 LIBS=$ac_check_lib_save_LIBS
11550 fi
11551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
11552 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
11553 if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
11554   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
11555 fi
11556
11557     fi
11558   fi
11559 fi
11560
11561
11562 ###############################################################################
11563 #
11564 #       Check for other libraries needed for non-shadow passwords.
11565 #
11566 ###############################################################################
11567
11568 if test "$enable_locking" = yes ; then
11569
11570   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
11571   have_crypt=no
11572   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lc" >&5
11573 $as_echo_n "checking for crypt in -lc... " >&6; }
11574 if ${ac_cv_lib_c_crypt+:} false; then :
11575   $as_echo_n "(cached) " >&6
11576 else
11577   ac_check_lib_save_LIBS=$LIBS
11578 LIBS="-lc  $LIBS"
11579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11580 /* end confdefs.h.  */
11581
11582 /* Override any GCC internal prototype to avoid an error.
11583    Use char because int might match the return type of a GCC
11584    builtin and then its argument prototype would still apply.  */
11585 #ifdef __cplusplus
11586 extern "C"
11587 #endif
11588 char crypt ();
11589 int
11590 main ()
11591 {
11592 return crypt ();
11593   ;
11594   return 0;
11595 }
11596 _ACEOF
11597 if ac_fn_c_try_link "$LINENO"; then :
11598   ac_cv_lib_c_crypt=yes
11599 else
11600   ac_cv_lib_c_crypt=no
11601 fi
11602 rm -f core conftest.err conftest.$ac_objext \
11603     conftest$ac_exeext conftest.$ac_ext
11604 LIBS=$ac_check_lib_save_LIBS
11605 fi
11606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_crypt" >&5
11607 $as_echo "$ac_cv_lib_c_crypt" >&6; }
11608 if test "x$ac_cv_lib_c_crypt" = xyes; then :
11609   have_crypt=yes
11610 fi
11611
11612   if test "$have_crypt" = no ; then
11613     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11614 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
11615 if ${ac_cv_lib_crypt_crypt+:} false; then :
11616   $as_echo_n "(cached) " >&6
11617 else
11618   ac_check_lib_save_LIBS=$LIBS
11619 LIBS="-lcrypt  $LIBS"
11620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11621 /* end confdefs.h.  */
11622
11623 /* Override any GCC internal prototype to avoid an error.
11624    Use char because int might match the return type of a GCC
11625    builtin and then its argument prototype would still apply.  */
11626 #ifdef __cplusplus
11627 extern "C"
11628 #endif
11629 char crypt ();
11630 int
11631 main ()
11632 {
11633 return crypt ();
11634   ;
11635   return 0;
11636 }
11637 _ACEOF
11638 if ac_fn_c_try_link "$LINENO"; then :
11639   ac_cv_lib_crypt_crypt=yes
11640 else
11641   ac_cv_lib_crypt_crypt=no
11642 fi
11643 rm -f core conftest.err conftest.$ac_objext \
11644     conftest$ac_exeext conftest.$ac_ext
11645 LIBS=$ac_check_lib_save_LIBS
11646 fi
11647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
11648 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11649 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
11650   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11651 fi
11652
11653   fi
11654 fi
11655
11656
11657 # Most of the above shadow mechanisms will have set need_setuid to yes,
11658 # if they were found.  But, on some systems, we need setuid even when
11659 # using plain old vanilla passwords.
11660 #
11661 if test "$enable_locking" = yes ; then
11662   case "$host" in
11663     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
11664       need_setuid=yes
11665     ;;
11666   esac
11667 fi
11668
11669
11670 if test "$have_shadow_adjunct" = yes ; then
11671   $as_echo "#define HAVE_ADJUNCT_PASSWD 1" >>confdefs.h
11672
11673 elif test "$have_shadow_enhanced" = yes ; then
11674   $as_echo "#define HAVE_ENHANCED_PASSWD 1" >>confdefs.h
11675
11676 elif test "$have_shadow_hpux" = yes ; then
11677   $as_echo "#define HAVE_HPUX_PASSWD 1" >>confdefs.h
11678
11679 elif test "$have_shadow" = yes ; then
11680   $as_echo "#define HAVE_SHADOW_PASSWD 1" >>confdefs.h
11681
11682 fi
11683
11684
11685 ###############################################################################
11686 #
11687 #       Check for external password helper
11688 #       On SuSE, instead of having xscreensaver be a setuid program, they
11689 #       fork an external program that takes the password on stdin, and
11690 #       returns true if that password is a valid one.  Then only that
11691 #       smaller program needs to be setuid.
11692 #
11693 #       (Note that this external program is not a GUI: the GUI is still
11694 #       all in xscreensaver itself; the external program just does auth.)
11695 #
11696 ###############################################################################
11697
11698 have_passwd_helper=no
11699 with_passwd_helper_req=unspecified
11700
11701
11702 # Check whether --with-passwd-helper was given.
11703 if test "${with_passwd_helper+set}" = set; then :
11704   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
11705 else
11706   with_passwd_helper=no
11707 fi
11708
11709 # no HANDLE_X_PATH_ARG for this one
11710
11711 if test "$enable_locking" = no ; then
11712   with_passwd_helper_req=no
11713   with_passwd_helper=no
11714 fi
11715
11716 case "$with_passwd_helper" in
11717   ""|no) : ;;
11718   /*)
11719     cat >>confdefs.h <<_ACEOF
11720 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
11721 _ACEOF
11722
11723     have_passwd_helper=yes;;
11724   *)
11725     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
11726     exit 1
11727 esac
11728
11729
11730 ###############################################################################
11731 #
11732 #       Check for a login manager for a "New Login" button on the lock dialog.
11733 #       Usually this will be "/usr/bin/gdmflexiserver".
11734 #
11735 ###############################################################################
11736
11737 with_login_manager_req=unspecified
11738 default_login_manager_1='gdmflexiserver -ls'
11739 default_login_manager_2='kdmctl reserve'
11740 default_login_manager_3='lxdm -c USER_SWITCH'
11741 default_login_manager_4='dm-tool switch-to-greeter'
11742
11743
11744 # Check whether --with-login-manager was given.
11745 if test "${with_login_manager+set}" = set; then :
11746   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
11747 else
11748   with_login_manager=yes
11749 fi
11750
11751 # no HANDLE_X_PATH_ARG for this one
11752
11753 if test "$enable_locking" = no ; then
11754   with_login_manager_req=no
11755   with_login_manager=no
11756 fi
11757
11758 case "$with_login_manager_req" in
11759   no)
11760     with_login_manager=""
11761   ;;
11762
11763   yes|unspecified)
11764     # Try various defaults, use the first one that exists.
11765
11766     with_login_manager=""
11767
11768     if test -z "$with_login_manager" ; then
11769       set dummy $default_login_manager_1 ; login_manager_tmp=$2
11770       unset ac_cv_path_login_manager_tmp  # don't cache
11771       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11772 set dummy $login_manager_tmp; ac_word=$2
11773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11774 $as_echo_n "checking for $ac_word... " >&6; }
11775 if ${ac_cv_path_login_manager_tmp+:} false; then :
11776   $as_echo_n "(cached) " >&6
11777 else
11778   case $login_manager_tmp in
11779   [\\/]* | ?:[\\/]*)
11780   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11781   ;;
11782   *)
11783   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11784 for as_dir in $PATH
11785 do
11786   IFS=$as_save_IFS
11787   test -z "$as_dir" && as_dir=.
11788     for ac_exec_ext in '' $ac_executable_extensions; do
11789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11790     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11792     break 2
11793   fi
11794 done
11795   done
11796 IFS=$as_save_IFS
11797
11798   ;;
11799 esac
11800 fi
11801 login_manager_tmp=$ac_cv_path_login_manager_tmp
11802 if test -n "$login_manager_tmp"; then
11803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11804 $as_echo "$login_manager_tmp" >&6; }
11805 else
11806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11807 $as_echo "no" >&6; }
11808 fi
11809
11810
11811       if test ! -z "$login_manager_tmp" ; then
11812         with_login_manager="$default_login_manager_1"
11813       fi
11814     fi
11815
11816     if test -z "$with_login_manager" ; then
11817       set dummy $default_login_manager_2 ; login_manager_tmp=$2
11818       unset ac_cv_path_login_manager_tmp  # don't cache
11819       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11820 set dummy $login_manager_tmp; ac_word=$2
11821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11822 $as_echo_n "checking for $ac_word... " >&6; }
11823 if ${ac_cv_path_login_manager_tmp+:} false; then :
11824   $as_echo_n "(cached) " >&6
11825 else
11826   case $login_manager_tmp in
11827   [\\/]* | ?:[\\/]*)
11828   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11829   ;;
11830   *)
11831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11832 for as_dir in $PATH
11833 do
11834   IFS=$as_save_IFS
11835   test -z "$as_dir" && as_dir=.
11836     for ac_exec_ext in '' $ac_executable_extensions; do
11837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11838     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11840     break 2
11841   fi
11842 done
11843   done
11844 IFS=$as_save_IFS
11845
11846   ;;
11847 esac
11848 fi
11849 login_manager_tmp=$ac_cv_path_login_manager_tmp
11850 if test -n "$login_manager_tmp"; then
11851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11852 $as_echo "$login_manager_tmp" >&6; }
11853 else
11854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11855 $as_echo "no" >&6; }
11856 fi
11857
11858
11859       if test ! -z "$login_manager_tmp" ; then
11860         with_login_manager="$default_login_manager_2"
11861       fi
11862     fi
11863
11864     if test -z "$with_login_manager" ; then
11865       set dummy $default_login_manager_3 ; login_manager_tmp=$2
11866       unset ac_cv_path_login_manager_tmp  # don't cache
11867       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11868 set dummy $login_manager_tmp; ac_word=$2
11869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11870 $as_echo_n "checking for $ac_word... " >&6; }
11871 if ${ac_cv_path_login_manager_tmp+:} false; then :
11872   $as_echo_n "(cached) " >&6
11873 else
11874   case $login_manager_tmp in
11875   [\\/]* | ?:[\\/]*)
11876   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11877   ;;
11878   *)
11879   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11880 for as_dir in $PATH
11881 do
11882   IFS=$as_save_IFS
11883   test -z "$as_dir" && as_dir=.
11884     for ac_exec_ext in '' $ac_executable_extensions; do
11885   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11886     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11888     break 2
11889   fi
11890 done
11891   done
11892 IFS=$as_save_IFS
11893
11894   ;;
11895 esac
11896 fi
11897 login_manager_tmp=$ac_cv_path_login_manager_tmp
11898 if test -n "$login_manager_tmp"; then
11899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11900 $as_echo "$login_manager_tmp" >&6; }
11901 else
11902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11903 $as_echo "no" >&6; }
11904 fi
11905
11906
11907       if test ! -z "$login_manager_tmp" ; then
11908         with_login_manager="$default_login_manager_3"
11909       fi
11910     fi
11911
11912     if test -z "$with_login_manager" ; then
11913       set dummy $default_login_manager_4 ; login_manager_tmp=$2
11914       unset ac_cv_path_login_manager_tmp  # don't cache
11915       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11916 set dummy $login_manager_tmp; ac_word=$2
11917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11918 $as_echo_n "checking for $ac_word... " >&6; }
11919 if ${ac_cv_path_login_manager_tmp+:} false; then :
11920   $as_echo_n "(cached) " >&6
11921 else
11922   case $login_manager_tmp in
11923   [\\/]* | ?:[\\/]*)
11924   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11925   ;;
11926   *)
11927   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11928 for as_dir in $PATH
11929 do
11930   IFS=$as_save_IFS
11931   test -z "$as_dir" && as_dir=.
11932     for ac_exec_ext in '' $ac_executable_extensions; do
11933   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11934     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
11935     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11936     break 2
11937   fi
11938 done
11939   done
11940 IFS=$as_save_IFS
11941
11942   ;;
11943 esac
11944 fi
11945 login_manager_tmp=$ac_cv_path_login_manager_tmp
11946 if test -n "$login_manager_tmp"; then
11947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
11948 $as_echo "$login_manager_tmp" >&6; }
11949 else
11950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11951 $as_echo "no" >&6; }
11952 fi
11953
11954
11955       if test ! -z "$login_manager_tmp" ; then
11956         with_login_manager="$default_login_manager_4"
11957       fi
11958     fi
11959
11960   ;;
11961
11962   /*)
11963     # absolute path specified on cmd line
11964     set dummy $with_login_manager_req ; login_manager_tmp=$2
11965     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $login_manager_tmp" >&5
11966 $as_echo_n "checking for $login_manager_tmp... " >&6; }
11967     if test -x "$login_manager_tmp" ; then
11968       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11969 $as_echo "yes" >&6; }
11970     else
11971       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11972 $as_echo "no" >&6; }
11973       with_login_manager=""
11974     fi
11975   ;;
11976
11977   *)
11978     # relative path specified on cmd line
11979     set dummy $with_login_manager_req ; login_manager_tmp=$2
11980     unset ac_cv_path_login_manager_tmp    # don't cache
11981     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
11982 set dummy $login_manager_tmp; ac_word=$2
11983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11984 $as_echo_n "checking for $ac_word... " >&6; }
11985 if ${ac_cv_path_login_manager_tmp+:} false; then :
11986   $as_echo_n "(cached) " >&6
11987 else
11988   case $login_manager_tmp in
11989   [\\/]* | ?:[\\/]*)
11990   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
11991   ;;
11992   *)
11993   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11994 for as_dir in $PATH
11995 do
11996   IFS=$as_save_IFS
11997   test -z "$as_dir" && as_dir=.
11998     for ac_exec_ext in '' $ac_executable_extensions; do
11999   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12000     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
12001     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12002     break 2
12003   fi
12004 done
12005   done
12006 IFS=$as_save_IFS
12007
12008   ;;
12009 esac
12010 fi
12011 login_manager_tmp=$ac_cv_path_login_manager_tmp
12012 if test -n "$login_manager_tmp"; then
12013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
12014 $as_echo "$login_manager_tmp" >&6; }
12015 else
12016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12017 $as_echo "no" >&6; }
12018 fi
12019
12020
12021     if test -z "$login_manager_tmp" ; then
12022       with_login_manager=""
12023     else
12024       with_login_manager="$login_manager_tmp"
12025     fi
12026   ;;
12027 esac
12028 ac_cv_login_manager_program="$with_login_manager"
12029
12030 NEW_LOGIN_COMMAND_P=''
12031 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
12032
12033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for login manager" >&5
12034 $as_echo_n "checking for login manager... " >&6; }
12035 if test -z "$NEW_LOGIN_COMMAND" ; then
12036   NEW_LOGIN_COMMAND="$default_login_manager_1"
12037   NEW_LOGIN_COMMAND_P='! '
12038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND (disabled)" >&5
12039 $as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
12040 else
12041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND" >&5
12042 $as_echo "$NEW_LOGIN_COMMAND" >&6; }
12043 fi
12044
12045
12046 ###############################################################################
12047 #
12048 #       Check for -lgtk (and Gnome stuff)
12049 #
12050 ###############################################################################
12051
12052 have_gtk=no
12053 with_gtk_req=unspecified
12054
12055 # Check whether --with-gtk was given.
12056 if test "${with_gtk+set}" = set; then :
12057   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
12058 else
12059   with_gtk=yes
12060 fi
12061
12062
12063 # if --with-gtk=/directory/ was specified, remember that directory so that
12064 # we can also look for the `gtk-config' program in that directory.
12065 case "$with_gtk" in
12066   /*)
12067     gtk_dir="$with_gtk"
12068     ;;
12069   *)
12070     gtk_dir=""
12071     ;;
12072 esac
12073
12074
12075    case "$with_gtk" in
12076     yes) ;;
12077     no)  ;;
12078
12079     /*)
12080      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk headers" >&5
12081 $as_echo_n "checking for Gtk headers... " >&6; }
12082      d=$with_gtk/include
12083      if test -d $d; then
12084        X_CFLAGS="-I$d $X_CFLAGS"
12085        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12086 $as_echo "$d" >&6; }
12087      else
12088        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12089 $as_echo "not found ($d: no such directory)" >&6; }
12090      fi
12091
12092      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
12093 $as_echo_n "checking for Gtk libs... " >&6; }
12094      d=$with_gtk/lib
12095      if test -d $d; then
12096        X_LIBS="-L$d $X_LIBS"
12097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12098 $as_echo "$d" >&6; }
12099      else
12100        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12101 $as_echo "not found ($d: no such directory)" >&6; }
12102      fi
12103
12104      # replace the directory string with "yes".
12105      with_gtk_req="yes"
12106      with_gtk=$with_gtk_req
12107      ;;
12108
12109     *)
12110      echo ""
12111      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
12112      echo "       If it is a directory, then \`DIR/include' will be added to"
12113      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12114      exit 1
12115      ;;
12116    esac
12117
12118
12119 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
12120   echo "error: must be yes or no: --with-gtk=$with_gtk"
12121   exit 1
12122 fi
12123
12124
12125 parse_gtk_version_string() {
12126   # M4 sucks!!
12127
12128   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
12129   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
12130
12131   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
12132   if test -z "$ac_gtk_version"; then
12133     ac_gtk_version=unknown
12134     ac_gtk_version_string=unknown
12135   fi
12136 }
12137
12138 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
12139 # if the user specified --with-gtk=/foo/ then look there.
12140 #
12141 gtk_path="$PATH"
12142 if test ! -z "$gtk_dir"; then
12143   # canonicalize slashes.
12144   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
12145   gtk_path="$foo:$gtk_path"
12146 fi
12147
12148 for ac_prog in pkg-config
12149 do
12150   # Extract the first word of "$ac_prog", so it can be a program name with args.
12151 set dummy $ac_prog; ac_word=$2
12152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12153 $as_echo_n "checking for $ac_word... " >&6; }
12154 if ${ac_cv_path_pkg_config+:} false; then :
12155   $as_echo_n "(cached) " >&6
12156 else
12157   case $pkg_config in
12158   [\\/]* | ?:[\\/]*)
12159   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
12160   ;;
12161   *)
12162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12163 for as_dir in $gtk_path
12164 do
12165   IFS=$as_save_IFS
12166   test -z "$as_dir" && as_dir=.
12167     for ac_exec_ext in '' $ac_executable_extensions; do
12168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12169     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
12170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12171     break 2
12172   fi
12173 done
12174   done
12175 IFS=$as_save_IFS
12176
12177   ;;
12178 esac
12179 fi
12180 pkg_config=$ac_cv_path_pkg_config
12181 if test -n "$pkg_config"; then
12182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config" >&5
12183 $as_echo "$pkg_config" >&6; }
12184 else
12185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12186 $as_echo "no" >&6; }
12187 fi
12188
12189
12190   test -n "$pkg_config" && break
12191 done
12192
12193
12194 if test -z "$pkg_config" ; then
12195   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found!" >&5
12196 $as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
12197   pkg_config="false"
12198 fi
12199
12200
12201 # Utility function for running pkg-config-based tests...
12202 #
12203 pkgs=''
12204 pkg_check_version() {
12205   if test "$ok" = yes ; then
12206     req="$1"
12207     min="$2"
12208     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $req" >&5
12209 $as_echo_n "checking for $req... " >&6; }
12210     if $pkg_config --exists "$req" ; then
12211       vers=`$pkg_config --modversion "$req"`
12212       if $pkg_config --exists "$req >= $min" ; then
12213         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers" >&5
12214 $as_echo "$vers" >&6; }
12215         pkgs="$pkgs $req"
12216         return 1
12217       else
12218         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers (wanted >= $min)" >&5
12219 $as_echo "$vers (wanted >= $min)" >&6; }
12220         ok=no
12221         return 0
12222       fi
12223     else
12224       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12225 $as_echo "no" >&6; }
12226       ok=no
12227       return 0
12228     fi
12229   fi
12230 }
12231
12232
12233 jurassic_gtk=no
12234 gtk_halfassed=no
12235 have_gtk_2_22_or_higher=no
12236 COMMENT_DEMO_GLADE2_GTK_2_22_HEAD=""
12237 COMMENT_DEMO_GLADE2_GTK_2_22_TAIL=""
12238
12239 if test "$with_gtk" = yes; then
12240   have_gtk=no
12241
12242   ok="yes"
12243   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
12244   pkg_check_version         gmodule-2.0  2.0.0
12245   pkg_check_version          libxml-2.0  2.4.6
12246   pkg_check_version        libglade-2.0  1.99.0
12247   pkg_check_version      gdk-pixbuf-2.0  2.0.0
12248   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
12249   have_gtk="$ok"
12250
12251   if test "$have_gtk" = no; then
12252     if test -n "$ac_gtk_version_string" ; then
12253       gtk_halfassed="$ac_gtk_version_string"
12254       gtk_halfassed_lib="$req"
12255     fi
12256   fi
12257
12258   if test "$have_gtk" = yes; then
12259     parse_gtk_version_string
12260     jurassic_gtk=no
12261   fi
12262
12263   if test "$have_gtk" = yes; then
12264     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk includes" >&5
12265 $as_echo_n "checking for Gtk includes... " >&6; }
12266 if ${ac_cv_gtk_config_cflags+:} false; then :
12267   $as_echo_n "(cached) " >&6
12268 else
12269   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
12270 fi
12271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_cflags" >&5
12272 $as_echo "$ac_cv_gtk_config_cflags" >&6; }
12273     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gtk libs" >&5
12274 $as_echo_n "checking for Gtk libs... " >&6; }
12275 if ${ac_cv_gtk_config_libs+:} false; then :
12276   $as_echo_n "(cached) " >&6
12277 else
12278   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
12279 fi
12280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gtk_config_libs" >&5
12281 $as_echo "$ac_cv_gtk_config_libs" >&6; }
12282   fi
12283
12284   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12285   ac_gtk_config_libs=$ac_cv_gtk_config_libs
12286
12287   GTK_EXTRA_OBJS=""
12288   GTK_DATADIR=""
12289   if test "$have_gtk" = yes; then
12290     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
12291     GTK_DATADIR="$GTK_DATADIR/share"
12292   fi
12293
12294   if test "$have_gtk" = yes; then
12295     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
12296     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
12297     $as_echo "#define HAVE_GTK 1" >>confdefs.h
12298
12299     $as_echo "#define HAVE_GTK2 1" >>confdefs.h
12300
12301     $as_echo "#define HAVE_XML 1" >>confdefs.h
12302
12303   fi
12304
12305   if test "$have_gtk" = yes; then
12306     ok="yes"
12307     pkg_check_version gtk+-2.0 2.22
12308     have_gtk_2_22_or_higher="$ok"
12309     if test "$have_gtk_2_22_or_higher" = yes; then
12310       COMMENT_DEMO_GLADE2_GTK_2_22_HEAD="<!-- comment>"
12311       COMMENT_DEMO_GLADE2_GTK_2_22_TAIL="</comment -->"
12312     fi
12313   fi
12314 fi
12315
12316
12317 # Check for the various Gnome help and URL loading programs.
12318 #
12319 WITH_BROWSER=gnome-open
12320 if test "$have_gtk" = yes; then
12321   for ac_prog in gnome-open
12322 do
12323   # Extract the first word of "$ac_prog", so it can be a program name with args.
12324 set dummy $ac_prog; ac_word=$2
12325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12326 $as_echo_n "checking for $ac_word... " >&6; }
12327 if ${ac_cv_prog_gnome_open_program+:} false; then :
12328   $as_echo_n "(cached) " >&6
12329 else
12330   if test -n "$gnome_open_program"; then
12331   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
12332 else
12333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12334 for as_dir in $PATH
12335 do
12336   IFS=$as_save_IFS
12337   test -z "$as_dir" && as_dir=.
12338     for ac_exec_ext in '' $ac_executable_extensions; do
12339   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12340     ac_cv_prog_gnome_open_program="$ac_prog"
12341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12342     break 2
12343   fi
12344 done
12345   done
12346 IFS=$as_save_IFS
12347
12348 fi
12349 fi
12350 gnome_open_program=$ac_cv_prog_gnome_open_program
12351 if test -n "$gnome_open_program"; then
12352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_open_program" >&5
12353 $as_echo "$gnome_open_program" >&6; }
12354 else
12355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12356 $as_echo "no" >&6; }
12357 fi
12358
12359
12360   test -n "$gnome_open_program" && break
12361 done
12362
12363   for ac_prog in gnome-url-show
12364 do
12365   # Extract the first word of "$ac_prog", so it can be a program name with args.
12366 set dummy $ac_prog; ac_word=$2
12367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12368 $as_echo_n "checking for $ac_word... " >&6; }
12369 if ${ac_cv_prog_gnome_url_show_program+:} false; then :
12370   $as_echo_n "(cached) " >&6
12371 else
12372   if test -n "$gnome_url_show_program"; then
12373   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
12374 else
12375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12376 for as_dir in $PATH
12377 do
12378   IFS=$as_save_IFS
12379   test -z "$as_dir" && as_dir=.
12380     for ac_exec_ext in '' $ac_executable_extensions; do
12381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12382     ac_cv_prog_gnome_url_show_program="$ac_prog"
12383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12384     break 2
12385   fi
12386 done
12387   done
12388 IFS=$as_save_IFS
12389
12390 fi
12391 fi
12392 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
12393 if test -n "$gnome_url_show_program"; then
12394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnome_url_show_program" >&5
12395 $as_echo "$gnome_url_show_program" >&6; }
12396 else
12397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12398 $as_echo "no" >&6; }
12399 fi
12400
12401
12402   test -n "$gnome_url_show_program" && break
12403 done
12404
12405 fi
12406
12407
12408 ###############################################################################
12409 #
12410 #       Check for -lXm.
12411 #
12412 ###############################################################################
12413
12414 have_motif=no
12415 with_motif_req=unspecified
12416
12417 # Check whether --with-motif was given.
12418 if test "${with_motif+set}" = set; then :
12419   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
12420 else
12421   with_motif=no
12422 fi
12423
12424
12425
12426    case "$with_motif" in
12427     yes) ;;
12428     no)  ;;
12429
12430     /*)
12431      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif headers" >&5
12432 $as_echo_n "checking for Motif headers... " >&6; }
12433      d=$with_motif/include
12434      if test -d $d; then
12435        X_CFLAGS="-I$d $X_CFLAGS"
12436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12437 $as_echo "$d" >&6; }
12438      else
12439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12440 $as_echo "not found ($d: no such directory)" >&6; }
12441      fi
12442
12443      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif libs" >&5
12444 $as_echo_n "checking for Motif libs... " >&6; }
12445      d=$with_motif/lib
12446      if test -d $d; then
12447        X_LIBS="-L$d $X_LIBS"
12448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12449 $as_echo "$d" >&6; }
12450      else
12451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12452 $as_echo "not found ($d: no such directory)" >&6; }
12453      fi
12454
12455      # replace the directory string with "yes".
12456      with_motif_req="yes"
12457      with_motif=$with_motif_req
12458      ;;
12459
12460     *)
12461      echo ""
12462      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12463      echo "       If it is a directory, then \`DIR/include' will be added to"
12464      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12465      exit 1
12466      ;;
12467    esac
12468
12469
12470 if test "$with_motif" != yes -a "$with_motif" != no ; then
12471   echo "error: must be yes or no: --with-motif=$with_motif"
12472   exit 1
12473 fi
12474
12475 if test "$with_motif" = yes; then
12476   have_motif=no
12477
12478   ac_save_CPPFLAGS="$CPPFLAGS"
12479   if test \! -z "$includedir" ; then
12480     CPPFLAGS="$CPPFLAGS -I$includedir"
12481   fi
12482   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12483   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12484   ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "#include <stdlib.h>
12485                      #include <stdio.h>
12486                      #include <X11/Intrinsic.h>
12487 "
12488 if test "x$ac_cv_header_Xm_Xm_h" = xyes; then :
12489   have_motif=yes
12490                      $as_echo "#define HAVE_MOTIF 1" >>confdefs.h
12491
12492                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12493 fi
12494
12495
12496   CPPFLAGS="$ac_save_CPPFLAGS"
12497 fi
12498
12499
12500 if test "$have_motif" = yes; then
12501
12502   ac_save_CPPFLAGS="$CPPFLAGS"
12503   if test \! -z "$includedir" ; then
12504     CPPFLAGS="$CPPFLAGS -I$includedir"
12505   fi
12506   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12507   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12508   ac_fn_c_check_header_compile "$LINENO" "Xm/ComboBox.h" "ac_cv_header_Xm_ComboBox_h" "#include <stdlib.h>
12509                      #include <stdio.h>
12510                      #include <X11/Intrinsic.h>
12511 "
12512 if test "x$ac_cv_header_Xm_ComboBox_h" = xyes; then :
12513   $as_echo "#define HAVE_XMCOMBOBOX 1" >>confdefs.h
12514
12515 fi
12516
12517
12518   CPPFLAGS="$ac_save_CPPFLAGS"
12519 fi
12520
12521
12522 ###############################################################################
12523 #
12524 #       Checking whether Motif is really Lesstif.
12525 #
12526 ###############################################################################
12527
12528 have_lesstif=no
12529 if test "$have_motif" = yes ; then
12530   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif is really LessTif" >&5
12531 $as_echo_n "checking whether Motif is really LessTif... " >&6; }
12532 if ${ac_cv_have_lesstif+:} false; then :
12533   $as_echo_n "(cached) " >&6
12534 else
12535
12536   ac_save_CPPFLAGS="$CPPFLAGS"
12537   if test \! -z "$includedir" ; then
12538     CPPFLAGS="$CPPFLAGS -I$includedir"
12539   fi
12540   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12541   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12542   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12543 /* end confdefs.h.  */
12544 #include <Xm/Xm.h>
12545 int
12546 main ()
12547 {
12548 long vers = LesstifVersion;
12549   ;
12550   return 0;
12551 }
12552 _ACEOF
12553 if ac_fn_c_try_compile "$LINENO"; then :
12554   ac_cv_have_lesstif=yes
12555 else
12556   ac_cv_have_lesstif=no
12557 fi
12558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12559   CPPFLAGS="$ac_save_CPPFLAGS"
12560 fi
12561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lesstif" >&5
12562 $as_echo "$ac_cv_have_lesstif" >&6; }
12563   have_lesstif=$ac_cv_have_lesstif
12564 fi
12565
12566
12567 lesstif_version=unknown
12568 lesstif_version_string=unknown
12569
12570 if test "$have_lesstif" = yes ; then
12571   ltv=unknown
12572   echo unknown > conftest-lt
12573   { $as_echo "$as_me:${as_lineno-$LINENO}: checking LessTif version number" >&5
12574 $as_echo_n "checking LessTif version number... " >&6; }
12575 if ${ac_cv_lesstif_version_string+:} false; then :
12576   $as_echo_n "(cached) " >&6
12577 else
12578
12579   ac_save_CPPFLAGS="$CPPFLAGS"
12580   if test \! -z "$includedir" ; then
12581     CPPFLAGS="$CPPFLAGS -I$includedir"
12582   fi
12583   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12584   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12585   if test "$cross_compiling" = yes; then :
12586   ac_cv_lesstif_version=unknown
12587                      ac_cv_lesstif_version_string=unknown
12588 else
12589   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12590 /* end confdefs.h.  */
12591 #include <stdio.h>
12592                      #include <Xm/Xm.h>
12593                      int main() {
12594                        FILE *f = fopen("conftest-lt", "w");
12595                        if (!f) exit(1);
12596                        fprintf(f, "%d %d.%d\n", LesstifVersion,
12597                           LESSTIF_VERSION, LESSTIF_REVISION);
12598                        fclose(f);
12599                        exit(0);
12600                      }
12601 _ACEOF
12602 if ac_fn_c_try_run "$LINENO"; then :
12603   ltv=`cat conftest-lt`
12604                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
12605                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
12606 else
12607   ac_cv_lesstif_version=unknown
12608                      ac_cv_lesstif_version_string=unknown
12609 fi
12610 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12611   conftest.$ac_objext conftest.beam conftest.$ac_ext
12612 fi
12613
12614   CPPFLAGS="$ac_save_CPPFLAGS"
12615 fi
12616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lesstif_version_string" >&5
12617 $as_echo "$ac_cv_lesstif_version_string" >&6; }
12618   rm -rf conftest-lt
12619   lesstif_version=$ac_cv_lesstif_version
12620   lesstif_version_string=$ac_cv_lesstif_version_string
12621
12622 fi
12623
12624
12625 if test "$have_motif" = yes ; then
12626   mtv=unknown
12627   echo unknown > conftest-mt
12628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking Motif version number" >&5
12629 $as_echo_n "checking Motif version number... " >&6; }
12630 if ${ac_cv_motif_version_string+:} false; then :
12631   $as_echo_n "(cached) " >&6
12632 else
12633
12634   ac_save_CPPFLAGS="$CPPFLAGS"
12635   if test \! -z "$includedir" ; then
12636     CPPFLAGS="$CPPFLAGS -I$includedir"
12637   fi
12638   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12639   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12640   if test "$cross_compiling" = yes; then :
12641   ac_cv_motif_version=unknown
12642                      ac_cv_motif_version_string=unknown
12643 else
12644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12645 /* end confdefs.h.  */
12646 #include <stdio.h>
12647                      #include <Xm/Xm.h>
12648                      int main() {
12649                        FILE *f = fopen("conftest-mt", "w");
12650                        if (!f) exit(1);
12651                        fprintf(f, "%d %d.%d\n", XmVersion,
12652                           XmVERSION, XmREVISION);
12653                        fclose(f);
12654                        exit(0);
12655                      }
12656 _ACEOF
12657 if ac_fn_c_try_run "$LINENO"; then :
12658   mtv=`cat conftest-mt`
12659                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
12660                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
12661 else
12662   ac_cv_motif_version=unknown
12663                      ac_cv_motif_version_string=unknown
12664 fi
12665 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12666   conftest.$ac_objext conftest.beam conftest.$ac_ext
12667 fi
12668
12669   CPPFLAGS="$ac_save_CPPFLAGS"
12670 fi
12671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_motif_version_string" >&5
12672 $as_echo "$ac_cv_motif_version_string" >&6; }
12673   rm -rf conftest-mt
12674   motif_version=$ac_cv_motif_version
12675   motif_version_string=$ac_cv_motif_version_string
12676
12677 fi
12678
12679
12680 ###############################################################################
12681 #
12682 #       Checking whether Motif requires -lXpm.
12683 #
12684 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
12685 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
12686 #       of the library whether to build the XPM code into libXm, or whether
12687 #       to rely on an external libXm.  So the only way to tell whether XPM is
12688 #       a link-time requirement is to examine libXm.a, which is very
12689 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
12690 #       always link against XPM if the XPM lib exists (and this will be a
12691 #       no-op if libXm happens to already have the XPM code in it.)
12692 #
12693 ###############################################################################
12694
12695 motif_requires_xpm=no
12696 if test "$have_motif" = yes ; then
12697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Motif requires XPM" >&5
12698 $as_echo_n "checking whether Motif requires XPM... " >&6; }
12699    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
12700    then
12701      motif_requires_xpm=yes
12702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
12703 $as_echo "maybe" >&6; }
12704    else
12705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12706 $as_echo "no" >&6; }
12707    fi
12708 fi
12709
12710
12711 ###############################################################################
12712 #
12713 #       Checking whether Motif requires -lXp.
12714 #
12715 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
12716 #       Extension".   Why this extension isn't in -lXext with all the others,
12717 #       I have no idea.
12718 #
12719 ###############################################################################
12720
12721 have_xp_ext=no
12722 if test "$have_motif" = yes ; then
12723    have_xp_ext=no
12724
12725   ac_save_CPPFLAGS="$CPPFLAGS"
12726   ac_save_LDFLAGS="$LDFLAGS"
12727 #  ac_save_LIBS="$LIBS"
12728
12729   if test \! -z "$includedir" ; then
12730     CPPFLAGS="$CPPFLAGS -I$includedir"
12731   fi
12732   # note: $X_CFLAGS includes $x_includes
12733   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12734
12735   if test \! -z "$libdir" ; then
12736     LDFLAGS="$LDFLAGS -L$libdir"
12737   fi
12738   # note: $X_LIBS includes $x_libraries
12739   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12740
12741   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12742   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12743   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpQueryExtension in -lXp" >&5
12744 $as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
12745 if ${ac_cv_lib_Xp_XpQueryExtension+:} false; then :
12746   $as_echo_n "(cached) " >&6
12747 else
12748   ac_check_lib_save_LIBS=$LIBS
12749 LIBS="-lXp -lX11 -lXext -lm $LIBS"
12750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12751 /* end confdefs.h.  */
12752
12753 /* Override any GCC internal prototype to avoid an error.
12754    Use char because int might match the return type of a GCC
12755    builtin and then its argument prototype would still apply.  */
12756 #ifdef __cplusplus
12757 extern "C"
12758 #endif
12759 char XpQueryExtension ();
12760 int
12761 main ()
12762 {
12763 return XpQueryExtension ();
12764   ;
12765   return 0;
12766 }
12767 _ACEOF
12768 if ac_fn_c_try_link "$LINENO"; then :
12769   ac_cv_lib_Xp_XpQueryExtension=yes
12770 else
12771   ac_cv_lib_Xp_XpQueryExtension=no
12772 fi
12773 rm -f core conftest.err conftest.$ac_objext \
12774     conftest$ac_exeext conftest.$ac_ext
12775 LIBS=$ac_check_lib_save_LIBS
12776 fi
12777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
12778 $as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
12779 if test "x$ac_cv_lib_Xp_XpQueryExtension" = xyes; then :
12780   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
12781 else
12782   true
12783 fi
12784
12785   CPPFLAGS="$ac_save_CPPFLAGS"
12786   LDFLAGS="$ac_save_LDFLAGS"
12787 #  LIBS="$ac_save_LIBS"
12788
12789 fi
12790
12791
12792 ###############################################################################
12793 #
12794 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
12795 #
12796 ###############################################################################
12797
12798 have_xintl=no
12799 if test "$have_motif" = yes ; then
12800
12801   ac_save_CPPFLAGS="$CPPFLAGS"
12802   ac_save_LDFLAGS="$LDFLAGS"
12803 #  ac_save_LIBS="$LIBS"
12804
12805   if test \! -z "$includedir" ; then
12806     CPPFLAGS="$CPPFLAGS -I$includedir"
12807   fi
12808   # note: $X_CFLAGS includes $x_includes
12809   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12810
12811   if test \! -z "$libdir" ; then
12812     LDFLAGS="$LDFLAGS -L$libdir"
12813   fi
12814   # note: $X_LIBS includes $x_libraries
12815   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12816
12817   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12818   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Xsetlocale in -lXintl" >&5
12820 $as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
12821 if ${ac_cv_lib_Xintl__Xsetlocale+:} false; then :
12822   $as_echo_n "(cached) " >&6
12823 else
12824   ac_check_lib_save_LIBS=$LIBS
12825 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
12826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12827 /* end confdefs.h.  */
12828
12829 /* Override any GCC internal prototype to avoid an error.
12830    Use char because int might match the return type of a GCC
12831    builtin and then its argument prototype would still apply.  */
12832 #ifdef __cplusplus
12833 extern "C"
12834 #endif
12835 char _Xsetlocale ();
12836 int
12837 main ()
12838 {
12839 return _Xsetlocale ();
12840   ;
12841   return 0;
12842 }
12843 _ACEOF
12844 if ac_fn_c_try_link "$LINENO"; then :
12845   ac_cv_lib_Xintl__Xsetlocale=yes
12846 else
12847   ac_cv_lib_Xintl__Xsetlocale=no
12848 fi
12849 rm -f core conftest.err conftest.$ac_objext \
12850     conftest$ac_exeext conftest.$ac_ext
12851 LIBS=$ac_check_lib_save_LIBS
12852 fi
12853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
12854 $as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
12855 if test "x$ac_cv_lib_Xintl__Xsetlocale" = xyes; then :
12856   have_xintl=yes
12857 else
12858   have_xintl=no
12859 fi
12860
12861   CPPFLAGS="$ac_save_CPPFLAGS"
12862   LDFLAGS="$ac_save_LDFLAGS"
12863 #  LIBS="$ac_save_LIBS"
12864
12865   if test "$have_xintl" = yes; then
12866     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
12867   fi
12868 fi
12869
12870
12871 ###############################################################################
12872 #
12873 #       Check for -lGL or -lMesaGL.
12874 #
12875 ###############################################################################
12876
12877 have_gl=no
12878 ac_have_mesa_gl=no
12879 with_gl_req=unspecified
12880 gl_halfassed=no
12881
12882 # Check whether --with-gl was given.
12883 if test "${with_gl+set}" = set; then :
12884   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
12885 else
12886   with_gl=yes
12887 fi
12888
12889
12890
12891    case "$with_gl" in
12892     yes) ;;
12893     no)  ;;
12894
12895     /*)
12896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL headers" >&5
12897 $as_echo_n "checking for GL headers... " >&6; }
12898      d=$with_gl/include
12899      if test -d $d; then
12900        X_CFLAGS="-I$d $X_CFLAGS"
12901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12902 $as_echo "$d" >&6; }
12903      else
12904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12905 $as_echo "not found ($d: no such directory)" >&6; }
12906      fi
12907
12908      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL libs" >&5
12909 $as_echo_n "checking for GL libs... " >&6; }
12910      d=$with_gl/lib
12911      if test -d $d; then
12912        X_LIBS="-L$d $X_LIBS"
12913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
12914 $as_echo "$d" >&6; }
12915      else
12916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
12917 $as_echo "not found ($d: no such directory)" >&6; }
12918      fi
12919
12920      # replace the directory string with "yes".
12921      with_gl_req="yes"
12922      with_gl=$with_gl_req
12923      ;;
12924
12925     *)
12926      echo ""
12927      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
12928      echo "       If it is a directory, then \`DIR/include' will be added to"
12929      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12930      exit 1
12931      ;;
12932    esac
12933
12934
12935 ac_mesagl_version=unknown
12936 ac_mesagl_version_string=unknown
12937
12938 if test "$with_gl" = yes; then
12939
12940   ac_save_CPPFLAGS="$CPPFLAGS"
12941   if test \! -z "$includedir" ; then
12942     CPPFLAGS="$CPPFLAGS -I$includedir"
12943   fi
12944   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12945   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12946   ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
12947 if test "x$ac_cv_header_GL_gl_h" = xyes; then :
12948   have_gl=yes
12949 else
12950   have_gl=no
12951 fi
12952
12953
12954   CPPFLAGS="$ac_save_CPPFLAGS"
12955   if test "$have_gl" = yes ; then
12956
12957   ac_save_CPPFLAGS="$CPPFLAGS"
12958   if test \! -z "$includedir" ; then
12959     CPPFLAGS="$CPPFLAGS -I$includedir"
12960   fi
12961   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12962   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12963   ac_fn_c_check_header_compile "$LINENO" "GL/glx.h" "ac_cv_header_GL_glx_h" "#include <GL/gl.h>
12964 "
12965 if test "x$ac_cv_header_GL_glx_h" = xyes; then :
12966   have_gl=yes
12967 else
12968   have_gl=no
12969 fi
12970
12971
12972   CPPFLAGS="$ac_save_CPPFLAGS"
12973   fi
12974
12975   # If we have the headers, try and figure out which vendor it's from.
12976   #
12977   if test "$have_gl" = yes ; then
12978
12979     # We need to know whether it's MesaGL so that we know which libraries
12980     # to link against.
12981     #
12982     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GL is really MesaGL" >&5
12983 $as_echo_n "checking whether GL is really MesaGL... " >&6; }
12984 if ${ac_cv_have_mesa_gl+:} false; then :
12985   $as_echo_n "(cached) " >&6
12986 else
12987   ac_cv_have_mesa_gl=no
12988        if test "$ac_macosx" = no; then
12989          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
12990          # It's not really Mesa, is it?
12991
12992   ac_save_CPPFLAGS="$CPPFLAGS"
12993   if test \! -z "$includedir" ; then
12994     CPPFLAGS="$CPPFLAGS -I$includedir"
12995   fi
12996   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12997   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12998   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12999 /* end confdefs.h.  */
13000 #include <GL/glx.h>
13001
13002 _ACEOF
13003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13004   $EGREP "Mesa|MESA" >/dev/null 2>&1; then :
13005   ac_cv_have_mesa_gl=yes
13006 fi
13007 rm -rf conftest*
13008
13009   CPPFLAGS="$ac_save_CPPFLAGS"
13010        fi
13011 fi
13012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mesa_gl" >&5
13013 $as_echo "$ac_cv_have_mesa_gl" >&6; }
13014     ac_have_mesa_gl=$ac_cv_have_mesa_gl
13015
13016     gl_lib_1=""
13017     GL_LIBS=""
13018
13019     if test "$ac_macosx" = yes; then
13020
13021       # Without these, every link against libGL gets a bunch of useless
13022       # warnings.
13023       #
13024       osx_crud="-bind_at_load -multiply_defined suppress"
13025       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
13026 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
13027       GL_LIBS="$GL_LIBS $osx_crud"
13028       unset osx_crud
13029
13030       # New lossage in 10.5.0: without this, we get:
13031       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
13032       #
13033       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
13034       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
13035
13036       { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding \"$osx_crud\" to GL_LIBS" >&5
13037 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
13038       GL_LIBS="$GL_LIBS $osx_crud"
13039       unset osx_crud
13040
13041       # New lossage in 10.6.8: we can't allow -L/opt/local/lib to be in the
13042       # link line, or at runtime XQueryExtension gets a segv due to some kind
13043       # of library version skew.  Libs must come from /usr/X11/lib even if
13044       # $prefix and/or $exec_prefix are set to /opt/local/.
13045       #
13046       { $as_echo "$as_me:${as_lineno-$LINENO}: result: omitting \"$libdir\" from LDFLAGS" >&5
13047 $as_echo "omitting \"$libdir\" from LDFLAGS" >&6; }
13048       libdir=''
13049
13050     fi
13051
13052
13053     # Some versions of MesaGL are compiled to require -lpthread.
13054     # So if the Mesa headers exist, and -lpthread exists, then always
13055     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
13056     #
13057     # Oftentimes, AX_PTHREAD will bring in -lpthread as well; but that ends
13058     # up before -l(Mesa)GL, instead of after where it would belong.
13059     #
13060     if test "$ac_have_mesa_gl" = yes; then
13061       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
13062 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
13063 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
13064   $as_echo_n "(cached) " >&6
13065 else
13066   ac_check_lib_save_LIBS=$LIBS
13067 LIBS="-lpthread  $LIBS"
13068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13069 /* end confdefs.h.  */
13070
13071 /* Override any GCC internal prototype to avoid an error.
13072    Use char because int might match the return type of a GCC
13073    builtin and then its argument prototype would still apply.  */
13074 #ifdef __cplusplus
13075 extern "C"
13076 #endif
13077 char pthread_create ();
13078 int
13079 main ()
13080 {
13081 return pthread_create ();
13082   ;
13083   return 0;
13084 }
13085 _ACEOF
13086 if ac_fn_c_try_link "$LINENO"; then :
13087   ac_cv_lib_pthread_pthread_create=yes
13088 else
13089   ac_cv_lib_pthread_pthread_create=no
13090 fi
13091 rm -f core conftest.err conftest.$ac_objext \
13092     conftest$ac_exeext conftest.$ac_ext
13093 LIBS=$ac_check_lib_save_LIBS
13094 fi
13095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
13096 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
13097 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
13098   GL_LIBS="-lpthread"
13099 fi
13100
13101     fi
13102
13103
13104     # If we have Mesa headers, check to see if we can link against -lMesaGL.
13105     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
13106     # Else, warn that GL is busted.  (We have the headers, but no libs.)
13107     #
13108
13109     if test "$ac_have_mesa_gl" = yes ; then
13110
13111   ac_save_CPPFLAGS="$CPPFLAGS"
13112   ac_save_LDFLAGS="$LDFLAGS"
13113 #  ac_save_LIBS="$LIBS"
13114
13115   if test \! -z "$includedir" ; then
13116     CPPFLAGS="$CPPFLAGS -I$includedir"
13117   fi
13118   # note: $X_CFLAGS includes $x_includes
13119   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13120
13121   if test \! -z "$libdir" ; then
13122     LDFLAGS="$LDFLAGS -L$libdir"
13123   fi
13124   # note: $X_LIBS includes $x_libraries
13125   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13126
13127   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13128   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13129   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lMesaGL" >&5
13130 $as_echo_n "checking for glXCreateContext in -lMesaGL... " >&6; }
13131 if ${ac_cv_lib_MesaGL_glXCreateContext+:} false; then :
13132   $as_echo_n "(cached) " >&6
13133 else
13134   ac_check_lib_save_LIBS=$LIBS
13135 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
13136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13137 /* end confdefs.h.  */
13138
13139 /* Override any GCC internal prototype to avoid an error.
13140    Use char because int might match the return type of a GCC
13141    builtin and then its argument prototype would still apply.  */
13142 #ifdef __cplusplus
13143 extern "C"
13144 #endif
13145 char glXCreateContext ();
13146 int
13147 main ()
13148 {
13149 return glXCreateContext ();
13150   ;
13151   return 0;
13152 }
13153 _ACEOF
13154 if ac_fn_c_try_link "$LINENO"; then :
13155   ac_cv_lib_MesaGL_glXCreateContext=yes
13156 else
13157   ac_cv_lib_MesaGL_glXCreateContext=no
13158 fi
13159 rm -f core conftest.err conftest.$ac_objext \
13160     conftest$ac_exeext conftest.$ac_ext
13161 LIBS=$ac_check_lib_save_LIBS
13162 fi
13163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
13164 $as_echo "$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
13165 if test "x$ac_cv_lib_MesaGL_glXCreateContext" = xyes; then :
13166   gl_lib_1="MesaGL"
13167                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
13168 fi
13169
13170   CPPFLAGS="$ac_save_CPPFLAGS"
13171   LDFLAGS="$ac_save_LDFLAGS"
13172 #  LIBS="$ac_save_LIBS"
13173
13174     fi
13175
13176     if test "$gl_lib_1" = "" ; then
13177
13178   ac_save_CPPFLAGS="$CPPFLAGS"
13179   ac_save_LDFLAGS="$LDFLAGS"
13180 #  ac_save_LIBS="$LIBS"
13181
13182   if test \! -z "$includedir" ; then
13183     CPPFLAGS="$CPPFLAGS -I$includedir"
13184   fi
13185   # note: $X_CFLAGS includes $x_includes
13186   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13187
13188   if test \! -z "$libdir" ; then
13189     LDFLAGS="$LDFLAGS -L$libdir"
13190   fi
13191   # note: $X_LIBS includes $x_libraries
13192   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13193
13194   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13195   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13196   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lGL" >&5
13197 $as_echo_n "checking for glXCreateContext in -lGL... " >&6; }
13198 if ${ac_cv_lib_GL_glXCreateContext+:} false; then :
13199   $as_echo_n "(cached) " >&6
13200 else
13201   ac_check_lib_save_LIBS=$LIBS
13202 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
13203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13204 /* end confdefs.h.  */
13205
13206 /* Override any GCC internal prototype to avoid an error.
13207    Use char because int might match the return type of a GCC
13208    builtin and then its argument prototype would still apply.  */
13209 #ifdef __cplusplus
13210 extern "C"
13211 #endif
13212 char glXCreateContext ();
13213 int
13214 main ()
13215 {
13216 return glXCreateContext ();
13217   ;
13218   return 0;
13219 }
13220 _ACEOF
13221 if ac_fn_c_try_link "$LINENO"; then :
13222   ac_cv_lib_GL_glXCreateContext=yes
13223 else
13224   ac_cv_lib_GL_glXCreateContext=no
13225 fi
13226 rm -f core conftest.err conftest.$ac_objext \
13227     conftest$ac_exeext conftest.$ac_ext
13228 LIBS=$ac_check_lib_save_LIBS
13229 fi
13230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_glXCreateContext" >&5
13231 $as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; }
13232 if test "x$ac_cv_lib_GL_glXCreateContext" = xyes; then :
13233   gl_lib_1="GL"
13234                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
13235 fi
13236
13237   CPPFLAGS="$ac_save_CPPFLAGS"
13238   LDFLAGS="$ac_save_LDFLAGS"
13239 #  LIBS="$ac_save_LIBS"
13240
13241     fi
13242
13243     if test "$gl_lib_1" = "" ; then
13244       # we have headers, but no libs -- bail.
13245       have_gl=no
13246       ac_have_mesa_gl=no
13247       gl_halfassed=yes
13248     else
13249       # linking works -- we can build the GL hacks.
13250       $as_echo "#define HAVE_GL 1" >>confdefs.h
13251
13252       if test "$ac_have_mesa_gl" = yes ; then
13253         $as_echo "#define HAVE_MESA_GL 1" >>confdefs.h
13254
13255       fi
13256     fi
13257   fi
13258
13259
13260   # Now that we know we have GL headers and libs, do some more GL testing.
13261   #
13262
13263   if test "$have_gl" = yes ; then
13264     # If it's MesaGL, we'd like to issue a warning if the version number
13265     # is less than or equal to 2.6, because that version had a security bug.
13266     #
13267     if test "$ac_have_mesa_gl" = yes; then
13268
13269       { $as_echo "$as_me:${as_lineno-$LINENO}: checking MesaGL version number" >&5
13270 $as_echo_n "checking MesaGL version number... " >&6; }
13271 if ${ac_cv_mesagl_version_string+:} false; then :
13272   $as_echo_n "(cached) " >&6
13273 else
13274   cat > conftest.$ac_ext <<EOF
13275 #line 13279 "configure"
13276 #include "confdefs.h"
13277 #include <GL/gl.h>
13278 #ifndef MESA_MAJOR_VERSION
13279 # include <GL/xmesa.h>
13280 # ifdef XMESA_MAJOR_VERSION
13281    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
13282       we have to check the XMesa version number (the number of the X protocol
13283       support, which seems to be the same as the Mesa version number.)
13284     */
13285 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
13286 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
13287 # else
13288    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
13289       so we have no way of telling what version of Mesa this is at all.
13290       So, we'll guess that the osmesa version (the "offscreen protocol")
13291       is less than or equal to the real mesa version number.  Except that
13292       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
13293       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
13294     */
13295 # include <GL/osmesa.h>
13296 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
13297 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
13298 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
13299 #   undef MESA_MINOR_VERSION
13300 #   define MESA_MINOR_VERSION 4 or newer, probably?
13301 #  endif
13302 # endif
13303 #endif
13304 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
13305 EOF
13306
13307          ac_save_CPPFLAGS="$CPPFLAGS"
13308          if test \! -z "$includedir" ; then
13309            CPPFLAGS="$CPPFLAGS -I$includedir"
13310          fi
13311          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13312
13313          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
13314
13315          # M4 sucks!!
13316
13317           mglv=`echo "$mglv" | sed -n \
13318              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
13319
13320
13321          rm -rf conftest.$ac_ext
13322
13323          CPPFLAGS="$ac_save_CPPFLAGS"
13324
13325          if test "$mglv" = ""; then
13326            ac_mesagl_version=unknown
13327            ac_mesagl_version_string=unknown
13328          else
13329            ac_mesagl_version_string="$mglv"
13330            # M4 sucks!!
13331
13332            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
13333            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
13334
13335            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
13336            if test -z "$ac_mesagl_version"; then
13337              ac_mesagl_version=unknown
13338              ac_mesagl_version_string=unknown
13339            fi
13340          fi
13341          ac_cv_mesagl_version=$ac_mesagl_version
13342          ac_cv_mesagl_version_string=$ac_mesagl_version_string
13343
13344 fi
13345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mesagl_version_string" >&5
13346 $as_echo "$ac_cv_mesagl_version_string" >&6; }
13347       ac_mesagl_version=$ac_cv_mesagl_version
13348       ac_mesagl_version_string=$ac_cv_mesagl_version_string
13349     fi
13350
13351
13352     # Check for OpenGL 1.1 features.
13353     #
13354
13355   ac_save_CPPFLAGS="$CPPFLAGS"
13356   ac_save_LDFLAGS="$LDFLAGS"
13357 #  ac_save_LIBS="$LIBS"
13358
13359   if test \! -z "$includedir" ; then
13360     CPPFLAGS="$CPPFLAGS -I$includedir"
13361   fi
13362   # note: $X_CFLAGS includes $x_includes
13363   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13364
13365   if test \! -z "$libdir" ; then
13366     LDFLAGS="$LDFLAGS -L$libdir"
13367   fi
13368   # note: $X_LIBS includes $x_libraries
13369   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13370
13371   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13372   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13373   as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBindTexture in -l$gl_lib_1" >&5
13375 $as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
13376 if eval \${$as_ac_Lib+:} false; then :
13377   $as_echo_n "(cached) " >&6
13378 else
13379   ac_check_lib_save_LIBS=$LIBS
13380 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
13381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13382 /* end confdefs.h.  */
13383
13384 /* Override any GCC internal prototype to avoid an error.
13385    Use char because int might match the return type of a GCC
13386    builtin and then its argument prototype would still apply.  */
13387 #ifdef __cplusplus
13388 extern "C"
13389 #endif
13390 char glBindTexture ();
13391 int
13392 main ()
13393 {
13394 return glBindTexture ();
13395   ;
13396   return 0;
13397 }
13398 _ACEOF
13399 if ac_fn_c_try_link "$LINENO"; then :
13400   eval "$as_ac_Lib=yes"
13401 else
13402   eval "$as_ac_Lib=no"
13403 fi
13404 rm -f core conftest.err conftest.$ac_objext \
13405     conftest$ac_exeext conftest.$ac_ext
13406 LIBS=$ac_check_lib_save_LIBS
13407 fi
13408 eval ac_res=\$$as_ac_Lib
13409                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13410 $as_echo "$ac_res" >&6; }
13411 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13412   $as_echo "#define HAVE_GLBINDTEXTURE 1" >>confdefs.h
13413
13414 else
13415   true
13416 fi
13417
13418   CPPFLAGS="$ac_save_CPPFLAGS"
13419   LDFLAGS="$ac_save_LDFLAGS"
13420 #  LIBS="$ac_save_LIBS"
13421
13422   fi
13423
13424 elif test "$with_gl" != no; then
13425   echo "error: must be yes or no: --with-gl=$with_gl"
13426   exit 1
13427 fi
13428
13429
13430 ###############################################################################
13431 #
13432 #       Check for -lgle.
13433 #
13434 ###############################################################################
13435
13436 have_gle=no
13437 with_gle_req=unspecified
13438 gle_halfassed=no
13439
13440 # Check whether --with-gle was given.
13441 if test "${with_gle+set}" = set; then :
13442   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
13443 else
13444   with_gle=yes
13445 fi
13446
13447
13448
13449    case "$with_gle" in
13450     yes) ;;
13451     no)  ;;
13452
13453     /*)
13454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE headers" >&5
13455 $as_echo_n "checking for GLE headers... " >&6; }
13456      d=$with_gle/include
13457      if test -d $d; then
13458        X_CFLAGS="-I$d $X_CFLAGS"
13459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13460 $as_echo "$d" >&6; }
13461      else
13462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13463 $as_echo "not found ($d: no such directory)" >&6; }
13464      fi
13465
13466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLE libs" >&5
13467 $as_echo_n "checking for GLE libs... " >&6; }
13468      d=$with_gle/lib
13469      if test -d $d; then
13470        X_LIBS="-L$d $X_LIBS"
13471        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13472 $as_echo "$d" >&6; }
13473      else
13474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13475 $as_echo "not found ($d: no such directory)" >&6; }
13476      fi
13477
13478      # replace the directory string with "yes".
13479      with_gle_req="yes"
13480      with_gle=$with_gle_req
13481      ;;
13482
13483     *)
13484      echo ""
13485      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
13486      echo "       If it is a directory, then \`DIR/include' will be added to"
13487      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13488      exit 1
13489      ;;
13490    esac
13491
13492
13493 GLE_LIBS=""
13494
13495 if test "$have_gl" = no ; then
13496  true
13497 elif test "$with_gle" = yes; then
13498
13499
13500   ac_save_CPPFLAGS="$CPPFLAGS"
13501   if test \! -z "$includedir" ; then
13502     CPPFLAGS="$CPPFLAGS -I$includedir"
13503   fi
13504   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13505   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13506   ac_fn_c_check_header_compile "$LINENO" "GL/gle.h" "ac_cv_header_GL_gle_h" "#include <GL/gl.h>
13507 "
13508 if test "x$ac_cv_header_GL_gle_h" = xyes; then :
13509   have_gle3=yes
13510 else
13511   have_gle3=no
13512 fi
13513
13514
13515   CPPFLAGS="$ac_save_CPPFLAGS"
13516   if test "$have_gle3" = yes ; then
13517     have_gle=yes;
13518   else
13519
13520   ac_save_CPPFLAGS="$CPPFLAGS"
13521   if test \! -z "$includedir" ; then
13522     CPPFLAGS="$CPPFLAGS -I$includedir"
13523   fi
13524   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13525   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13526   ac_fn_c_check_header_compile "$LINENO" "GL/gutil.h" "ac_cv_header_GL_gutil_h" "#include <GL/gl.h>
13527 "
13528 if test "x$ac_cv_header_GL_gutil_h" = xyes; then :
13529   have_gle=yes
13530 else
13531   have_gle=no
13532 fi
13533
13534
13535   CPPFLAGS="$ac_save_CPPFLAGS"
13536     if test "$have_gle" = yes ; then
13537
13538   ac_save_CPPFLAGS="$CPPFLAGS"
13539   if test \! -z "$includedir" ; then
13540     CPPFLAGS="$CPPFLAGS -I$includedir"
13541   fi
13542   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13543   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13544   ac_fn_c_check_header_compile "$LINENO" "GL/tube.h" "ac_cv_header_GL_tube_h" "#include <GL/gl.h>
13545 "
13546 if test "x$ac_cv_header_GL_tube_h" = xyes; then :
13547   have_gle=yes
13548 else
13549   have_gle=no
13550 fi
13551
13552
13553   CPPFLAGS="$ac_save_CPPFLAGS"
13554     fi
13555   fi
13556
13557   if test "$have_gle" = yes ; then
13558     have_gle=no
13559     gle_halfassed=yes
13560
13561   ac_save_CPPFLAGS="$CPPFLAGS"
13562   ac_save_LDFLAGS="$LDFLAGS"
13563 #  ac_save_LIBS="$LIBS"
13564
13565   if test \! -z "$includedir" ; then
13566     CPPFLAGS="$CPPFLAGS -I$includedir"
13567   fi
13568   # note: $X_CFLAGS includes $x_includes
13569   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13570
13571   if test \! -z "$libdir" ; then
13572     LDFLAGS="$LDFLAGS -L$libdir"
13573   fi
13574   # note: $X_LIBS includes $x_libraries
13575   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13576
13577   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13578   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13579   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gleCreateGC in -lgle" >&5
13580 $as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
13581 if ${ac_cv_lib_gle_gleCreateGC+:} false; then :
13582   $as_echo_n "(cached) " >&6
13583 else
13584   ac_check_lib_save_LIBS=$LIBS
13585 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
13586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13587 /* end confdefs.h.  */
13588
13589 /* Override any GCC internal prototype to avoid an error.
13590    Use char because int might match the return type of a GCC
13591    builtin and then its argument prototype would still apply.  */
13592 #ifdef __cplusplus
13593 extern "C"
13594 #endif
13595 char gleCreateGC ();
13596 int
13597 main ()
13598 {
13599 return gleCreateGC ();
13600   ;
13601   return 0;
13602 }
13603 _ACEOF
13604 if ac_fn_c_try_link "$LINENO"; then :
13605   ac_cv_lib_gle_gleCreateGC=yes
13606 else
13607   ac_cv_lib_gle_gleCreateGC=no
13608 fi
13609 rm -f core conftest.err conftest.$ac_objext \
13610     conftest$ac_exeext conftest.$ac_ext
13611 LIBS=$ac_check_lib_save_LIBS
13612 fi
13613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_gleCreateGC" >&5
13614 $as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
13615 if test "x$ac_cv_lib_gle_gleCreateGC" = xyes; then :
13616   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
13617 fi
13618
13619   CPPFLAGS="$ac_save_CPPFLAGS"
13620   LDFLAGS="$ac_save_LDFLAGS"
13621 #  LIBS="$ac_save_LIBS"
13622
13623   fi
13624   if test "$have_gle" = yes ; then
13625     have_gle=no
13626     gle_halfassed=yes
13627
13628     # sometimes the libmatrix stuff is included in libgle.  look there first.
13629 #
13630 # I don't get it.  For some reason, this test passes on SGI, as if
13631 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
13632 # Yet the link is succeeding.  Why???
13633 #
13634 #    AC_CHECK_X_LIB(gle, uview_direction_d,
13635 #                   [have_gle=yes; gle_halfassed=no],
13636 #                   [], $GL_LIBS -lX11 -lXext -lm)
13637
13638     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
13639     # *sigh*
13640     if test "$have_gle3" = yes ; then
13641
13642   ac_save_CPPFLAGS="$CPPFLAGS"
13643   ac_save_LDFLAGS="$LDFLAGS"
13644 #  ac_save_LIBS="$LIBS"
13645
13646   if test \! -z "$includedir" ; then
13647     CPPFLAGS="$CPPFLAGS -I$includedir"
13648   fi
13649   # note: $X_CFLAGS includes $x_includes
13650   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13651
13652   if test \! -z "$libdir" ; then
13653     LDFLAGS="$LDFLAGS -L$libdir"
13654   fi
13655   # note: $X_LIBS includes $x_libraries
13656   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13657
13658   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13659   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13660   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction in -lgle" >&5
13661 $as_echo_n "checking for uview_direction in -lgle... " >&6; }
13662 if ${ac_cv_lib_gle_uview_direction+:} false; then :
13663   $as_echo_n "(cached) " >&6
13664 else
13665   ac_check_lib_save_LIBS=$LIBS
13666 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
13667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13668 /* end confdefs.h.  */
13669
13670 /* Override any GCC internal prototype to avoid an error.
13671    Use char because int might match the return type of a GCC
13672    builtin and then its argument prototype would still apply.  */
13673 #ifdef __cplusplus
13674 extern "C"
13675 #endif
13676 char uview_direction ();
13677 int
13678 main ()
13679 {
13680 return uview_direction ();
13681   ;
13682   return 0;
13683 }
13684 _ACEOF
13685 if ac_fn_c_try_link "$LINENO"; then :
13686   ac_cv_lib_gle_uview_direction=yes
13687 else
13688   ac_cv_lib_gle_uview_direction=no
13689 fi
13690 rm -f core conftest.err conftest.$ac_objext \
13691     conftest$ac_exeext conftest.$ac_ext
13692 LIBS=$ac_check_lib_save_LIBS
13693 fi
13694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gle_uview_direction" >&5
13695 $as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
13696 if test "x$ac_cv_lib_gle_uview_direction" = xyes; then :
13697   have_gle=yes; gle_halfassed=no
13698 fi
13699
13700   CPPFLAGS="$ac_save_CPPFLAGS"
13701   LDFLAGS="$ac_save_LDFLAGS"
13702 #  LIBS="$ac_save_LIBS"
13703
13704     fi
13705     # if it wasn't in libgle, then look in libmatrix.
13706     if test "$have_gle" = no ; then
13707
13708   ac_save_CPPFLAGS="$CPPFLAGS"
13709   ac_save_LDFLAGS="$LDFLAGS"
13710 #  ac_save_LIBS="$LIBS"
13711
13712   if test \! -z "$includedir" ; then
13713     CPPFLAGS="$CPPFLAGS -I$includedir"
13714   fi
13715   # note: $X_CFLAGS includes $x_includes
13716   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13717
13718   if test \! -z "$libdir" ; then
13719     LDFLAGS="$LDFLAGS -L$libdir"
13720   fi
13721   # note: $X_LIBS includes $x_libraries
13722   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13723
13724   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13725   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13726   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uview_direction_d in -lmatrix" >&5
13727 $as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
13728 if ${ac_cv_lib_matrix_uview_direction_d+:} false; then :
13729   $as_echo_n "(cached) " >&6
13730 else
13731   ac_check_lib_save_LIBS=$LIBS
13732 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
13733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13734 /* end confdefs.h.  */
13735
13736 /* Override any GCC internal prototype to avoid an error.
13737    Use char because int might match the return type of a GCC
13738    builtin and then its argument prototype would still apply.  */
13739 #ifdef __cplusplus
13740 extern "C"
13741 #endif
13742 char uview_direction_d ();
13743 int
13744 main ()
13745 {
13746 return uview_direction_d ();
13747   ;
13748   return 0;
13749 }
13750 _ACEOF
13751 if ac_fn_c_try_link "$LINENO"; then :
13752   ac_cv_lib_matrix_uview_direction_d=yes
13753 else
13754   ac_cv_lib_matrix_uview_direction_d=no
13755 fi
13756 rm -f core conftest.err conftest.$ac_objext \
13757     conftest$ac_exeext conftest.$ac_ext
13758 LIBS=$ac_check_lib_save_LIBS
13759 fi
13760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_matrix_uview_direction_d" >&5
13761 $as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
13762 if test "x$ac_cv_lib_matrix_uview_direction_d" = xyes; then :
13763   have_gle=yes; gle_halfassed=no;
13764                       GLE_LIBS="$GLE_LIBS -lmatrix"
13765 fi
13766
13767   CPPFLAGS="$ac_save_CPPFLAGS"
13768   LDFLAGS="$ac_save_LDFLAGS"
13769 #  LIBS="$ac_save_LIBS"
13770
13771     fi
13772   fi
13773
13774   if test "$have_gle" = yes ; then
13775     $as_echo "#define HAVE_GLE 1" >>confdefs.h
13776
13777     if test "$have_gle3" = yes ; then
13778       $as_echo "#define HAVE_GLE3 1" >>confdefs.h
13779
13780     fi
13781   fi
13782
13783 elif test "$with_gle" != no; then
13784   echo "error: must be yes or no: --with-gle=$with_gle"
13785   exit 1
13786
13787 fi
13788
13789
13790 ###############################################################################
13791 #
13792 #       Handle --with-gles
13793 #
13794 ###############################################################################
13795
13796 with_gles_req=unspecified
13797
13798 # Check whether --with-gles was given.
13799 if test "${with_gles+set}" = set; then :
13800   withval=$with_gles; with_gles="$withval"; with_gles_req="$withval"
13801 else
13802   with_gles=no
13803 fi
13804
13805
13806
13807    case "$with_gles" in
13808     yes) ;;
13809     no)  ;;
13810
13811     /*)
13812      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES headers" >&5
13813 $as_echo_n "checking for JWZGLES headers... " >&6; }
13814      d=$with_gles/include
13815      if test -d $d; then
13816        X_CFLAGS="-I$d $X_CFLAGS"
13817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13818 $as_echo "$d" >&6; }
13819      else
13820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13821 $as_echo "not found ($d: no such directory)" >&6; }
13822      fi
13823
13824      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JWZGLES libs" >&5
13825 $as_echo_n "checking for JWZGLES libs... " >&6; }
13826      d=$with_gles/lib
13827      if test -d $d; then
13828        X_LIBS="-L$d $X_LIBS"
13829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13830 $as_echo "$d" >&6; }
13831      else
13832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13833 $as_echo "not found ($d: no such directory)" >&6; }
13834      fi
13835
13836      # replace the directory string with "yes".
13837      with_gles_req="yes"
13838      with_gles=$with_gles_req
13839      ;;
13840
13841     *)
13842      echo ""
13843      echo "error: argument to --with-gles must be \"yes\", \"no\", or a directory."
13844      echo "       If it is a directory, then \`DIR/include' will be added to"
13845      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13846      exit 1
13847      ;;
13848    esac
13849
13850
13851 if test "$with_gles" = yes; then
13852   have_gles=yes
13853   $as_echo "#define HAVE_JWZGLES 1" >>confdefs.h
13854
13855   JWZGLES_OBJS='$(JWXYZ_BIN)/jwzgles.o'
13856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OpenGL ES compatiblity shim" >&5
13857 $as_echo "using OpenGL ES compatiblity shim" >&6; }
13858 elif test "$with_gles" != no; then
13859   echo "error: must be yes or no: --with-gles=$with_xpm"
13860   exit 1
13861 fi
13862
13863 ###############################################################################
13864 #
13865 #       Check for -lgdk_pixbuf.
13866 #       These tests are for gdk_pixbuf usage of the hacks,
13867 #       not xscreensaver-demo (thus we have to test again to get
13868 #       the libraries right: don't want to pull in all of GTK
13869 #       for the hacks.)
13870 #
13871 ###############################################################################
13872
13873 have_gdk_pixbuf=no
13874 with_gdk_pixbuf_req=unspecified
13875
13876 # Check whether --with-pixbuf was given.
13877 if test "${with_pixbuf+set}" = set; then :
13878   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
13879 else
13880   with_gdk_pixbuf=yes
13881 fi
13882
13883
13884 # if --with-pixbuf=/directory/ was specified, remember that directory so that
13885 # we can also look for the `gdk-pixbuf-config' program in that directory.
13886 case "$with_gdk_pixbuf" in
13887   /*)
13888     gdk_pixbuf_dir="$with_gdk_pixbuf"
13889     ;;
13890   *)
13891     gdk_pixbuf_dir=""
13892     ;;
13893 esac
13894
13895
13896    case "$with_gdk_pixbuf" in
13897     yes) ;;
13898     no)  ;;
13899
13900     /*)
13901      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF headers" >&5
13902 $as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
13903      d=$with_gdk_pixbuf/include
13904      if test -d $d; then
13905        X_CFLAGS="-I$d $X_CFLAGS"
13906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13907 $as_echo "$d" >&6; }
13908      else
13909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13910 $as_echo "not found ($d: no such directory)" >&6; }
13911      fi
13912
13913      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF libs" >&5
13914 $as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
13915      d=$with_gdk_pixbuf/lib
13916      if test -d $d; then
13917        X_LIBS="-L$d $X_LIBS"
13918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
13919 $as_echo "$d" >&6; }
13920      else
13921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
13922 $as_echo "not found ($d: no such directory)" >&6; }
13923      fi
13924
13925      # replace the directory string with "yes".
13926      with_gdk_pixbuf_req="yes"
13927      with_gdk_pixbuf=$with_gdk_pixbuf_req
13928      ;;
13929
13930     *)
13931      echo ""
13932      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
13933      echo "       If it is a directory, then \`DIR/include' will be added to"
13934      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13935      exit 1
13936      ;;
13937    esac
13938
13939
13940 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
13941   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
13942   exit 1
13943 fi
13944
13945 if test "$with_gdk_pixbuf" = yes; then
13946   have_gdk_pixbuf=no
13947
13948   pkgs=''
13949   ok="yes"
13950
13951   pkg_check_version gdk-pixbuf-2.0      2.0.0
13952   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
13953   have_gdk_pixbuf="$ok"
13954
13955   if test "$have_gdk_pixbuf" = yes; then
13956     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf includes" >&5
13957 $as_echo_n "checking for gdk-pixbuf includes... " >&6; }
13958 if ${ac_cv_gdk_pixbuf_config_cflags+:} false; then :
13959   $as_echo_n "(cached) " >&6
13960 else
13961   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
13962 fi
13963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
13964 $as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
13965     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk-pixbuf libs" >&5
13966 $as_echo_n "checking for gdk-pixbuf libs... " >&6; }
13967 if ${ac_cv_gdk_pixbuf_config_libs+:} false; then :
13968   $as_echo_n "(cached) " >&6
13969 else
13970   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
13971 fi
13972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdk_pixbuf_config_libs" >&5
13973 $as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
13974   fi
13975
13976   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
13977   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
13978
13979
13980   if test "$have_gdk_pixbuf" = yes; then
13981     #
13982     # we appear to have pixbuf; check for headers/libs to be sure.
13983     #
13984     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
13985     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
13986
13987     have_gdk_pixbuf=no
13988
13989     # check for header A...
13990
13991   ac_save_CPPFLAGS="$CPPFLAGS"
13992   if test \! -z "$includedir" ; then
13993     CPPFLAGS="$CPPFLAGS -I$includedir"
13994   fi
13995   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13996   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13997   ac_fn_c_check_header_mongrel "$LINENO" "gdk-pixbuf/gdk-pixbuf.h" "ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" "$ac_includes_default"
13998 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = xyes; then :
13999   have_gdk_pixbuf=yes
14000 fi
14001
14002
14003   CPPFLAGS="$ac_save_CPPFLAGS"
14004
14005     # if that worked, check for header B...
14006     if test "$have_gdk_pixbuf" = yes; then
14007       have_gdk_pixbuf=no
14008       gdk_pixbuf_halfassed=yes
14009
14010   ac_save_CPPFLAGS="$CPPFLAGS"
14011   if test \! -z "$includedir" ; then
14012     CPPFLAGS="$CPPFLAGS -I$includedir"
14013   fi
14014   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14015   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14016   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"
14017 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = xyes; then :
14018   have_gdk_pixbuf=yes
14019                          gdk_pixbuf_halfassed=no
14020 fi
14021
14022
14023   CPPFLAGS="$ac_save_CPPFLAGS"
14024
14025       # yay, it has a new name in Gtk 2.x...
14026       if test "$have_gdk_pixbuf" = no; then
14027         have_gdk_pixbuf=no
14028         gdk_pixbuf_halfassed=yes
14029
14030   ac_save_CPPFLAGS="$CPPFLAGS"
14031   if test \! -z "$includedir" ; then
14032     CPPFLAGS="$CPPFLAGS -I$includedir"
14033   fi
14034   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14035   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14036   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"
14037 if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = xyes; then :
14038   have_gdk_pixbuf=yes
14039                            gdk_pixbuf_halfassed=no
14040 fi
14041
14042
14043   CPPFLAGS="$ac_save_CPPFLAGS"
14044       fi
14045     fi
14046     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
14047   fi
14048
14049   if test "$have_gdk_pixbuf" = yes; then
14050     # we have the headers, now check for the libraries
14051     have_gdk_pixbuf=no
14052     gdk_pixbuf_halfassed=yes
14053
14054     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability..." >&5
14055 $as_echo "checking for gdk_pixbuf usability..." >&6; }
14056
14057     # library A...
14058
14059   ac_save_CPPFLAGS="$CPPFLAGS"
14060   ac_save_LDFLAGS="$LDFLAGS"
14061 #  ac_save_LIBS="$LIBS"
14062
14063   if test \! -z "$includedir" ; then
14064     CPPFLAGS="$CPPFLAGS -I$includedir"
14065   fi
14066   # note: $X_CFLAGS includes $x_includes
14067   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14068
14069   if test \! -z "$libdir" ; then
14070     LDFLAGS="$LDFLAGS -L$libdir"
14071   fi
14072   # note: $X_LIBS includes $x_libraries
14073   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14074
14075   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14076   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14077   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_new_from_file in -lc" >&5
14078 $as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
14079 if ${ac_cv_lib_c_gdk_pixbuf_new_from_file+:} false; then :
14080   $as_echo_n "(cached) " >&6
14081 else
14082   ac_check_lib_save_LIBS=$LIBS
14083 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
14084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14085 /* end confdefs.h.  */
14086
14087 /* Override any GCC internal prototype to avoid an error.
14088    Use char because int might match the return type of a GCC
14089    builtin and then its argument prototype would still apply.  */
14090 #ifdef __cplusplus
14091 extern "C"
14092 #endif
14093 char gdk_pixbuf_new_from_file ();
14094 int
14095 main ()
14096 {
14097 return gdk_pixbuf_new_from_file ();
14098   ;
14099   return 0;
14100 }
14101 _ACEOF
14102 if ac_fn_c_try_link "$LINENO"; then :
14103   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
14104 else
14105   ac_cv_lib_c_gdk_pixbuf_new_from_file=no
14106 fi
14107 rm -f core conftest.err conftest.$ac_objext \
14108     conftest$ac_exeext conftest.$ac_ext
14109 LIBS=$ac_check_lib_save_LIBS
14110 fi
14111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
14112 $as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
14113 if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = xyes; then :
14114   have_gdk_pixbuf=yes
14115 fi
14116
14117   CPPFLAGS="$ac_save_CPPFLAGS"
14118   LDFLAGS="$ac_save_LDFLAGS"
14119 #  LIBS="$ac_save_LIBS"
14120
14121     # library B...
14122     if test "$have_gdk_pixbuf" = yes; then
14123       have_gdk_pixbuf=no
14124
14125   ac_save_CPPFLAGS="$CPPFLAGS"
14126   ac_save_LDFLAGS="$LDFLAGS"
14127 #  ac_save_LIBS="$LIBS"
14128
14129   if test \! -z "$includedir" ; then
14130     CPPFLAGS="$CPPFLAGS -I$includedir"
14131   fi
14132   # note: $X_CFLAGS includes $x_includes
14133   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14134
14135   if test \! -z "$libdir" ; then
14136     LDFLAGS="$LDFLAGS -L$libdir"
14137   fi
14138   # note: $X_LIBS includes $x_libraries
14139   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14140
14141   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14142   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14143   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_xlib_init in -lc" >&5
14144 $as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
14145 if ${ac_cv_lib_c_gdk_pixbuf_xlib_init+:} false; then :
14146   $as_echo_n "(cached) " >&6
14147 else
14148   ac_check_lib_save_LIBS=$LIBS
14149 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
14150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14151 /* end confdefs.h.  */
14152
14153 /* Override any GCC internal prototype to avoid an error.
14154    Use char because int might match the return type of a GCC
14155    builtin and then its argument prototype would still apply.  */
14156 #ifdef __cplusplus
14157 extern "C"
14158 #endif
14159 char gdk_pixbuf_xlib_init ();
14160 int
14161 main ()
14162 {
14163 return gdk_pixbuf_xlib_init ();
14164   ;
14165   return 0;
14166 }
14167 _ACEOF
14168 if ac_fn_c_try_link "$LINENO"; then :
14169   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
14170 else
14171   ac_cv_lib_c_gdk_pixbuf_xlib_init=no
14172 fi
14173 rm -f core conftest.err conftest.$ac_objext \
14174     conftest$ac_exeext conftest.$ac_ext
14175 LIBS=$ac_check_lib_save_LIBS
14176 fi
14177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
14178 $as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
14179 if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = xyes; then :
14180   have_gdk_pixbuf=yes
14181                       gdk_pixbuf_halfassed=no
14182 fi
14183
14184   CPPFLAGS="$ac_save_CPPFLAGS"
14185   LDFLAGS="$ac_save_LDFLAGS"
14186 #  LIBS="$ac_save_LIBS"
14187
14188     fi
14189   fi
14190
14191   if test "$have_gdk_pixbuf" = yes; then
14192     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
14193     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
14194     $as_echo "#define HAVE_GDK_PIXBUF 1" >>confdefs.h
14195
14196   else
14197     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for gdk_pixbuf usability... no" >&5
14198 $as_echo "checking for gdk_pixbuf usability... no" >&6; }
14199   fi
14200
14201   if test "$have_gdk_pixbuf" = yes; then
14202
14203   ac_save_CPPFLAGS="$CPPFLAGS"
14204   ac_save_LDFLAGS="$LDFLAGS"
14205 #  ac_save_LIBS="$LIBS"
14206
14207   if test \! -z "$includedir" ; then
14208     CPPFLAGS="$CPPFLAGS -I$includedir"
14209   fi
14210   # note: $X_CFLAGS includes $x_includes
14211   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14212
14213   if test \! -z "$libdir" ; then
14214     LDFLAGS="$LDFLAGS -L$libdir"
14215   fi
14216   # note: $X_LIBS includes $x_libraries
14217   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14218
14219   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14220   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14221   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
14222 $as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
14223 if ${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+:} false; then :
14224   $as_echo_n "(cached) " >&6
14225 else
14226   ac_check_lib_save_LIBS=$LIBS
14227 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
14228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14229 /* end confdefs.h.  */
14230
14231 /* Override any GCC internal prototype to avoid an error.
14232    Use char because int might match the return type of a GCC
14233    builtin and then its argument prototype would still apply.  */
14234 #ifdef __cplusplus
14235 extern "C"
14236 #endif
14237 char gdk_pixbuf_apply_embedded_orientation ();
14238 int
14239 main ()
14240 {
14241 return gdk_pixbuf_apply_embedded_orientation ();
14242   ;
14243   return 0;
14244 }
14245 _ACEOF
14246 if ac_fn_c_try_link "$LINENO"; then :
14247   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
14248 else
14249   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
14250 fi
14251 rm -f core conftest.err conftest.$ac_objext \
14252     conftest$ac_exeext conftest.$ac_ext
14253 LIBS=$ac_check_lib_save_LIBS
14254 fi
14255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
14256 $as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
14257 if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = xyes; then :
14258   $as_echo "#define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1" >>confdefs.h
14259
14260 fi
14261
14262   CPPFLAGS="$ac_save_CPPFLAGS"
14263   LDFLAGS="$ac_save_LDFLAGS"
14264 #  LIBS="$ac_save_LIBS"
14265
14266   fi
14267 fi
14268
14269
14270 ###############################################################################
14271 #
14272 #       Check for -lXpm.
14273 #
14274 ###############################################################################
14275
14276 have_xpm=no
14277 with_xpm_req=unspecified
14278
14279 # Check whether --with-xpm was given.
14280 if test "${with_xpm+set}" = set; then :
14281   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
14282 else
14283   with_xpm=yes
14284 fi
14285
14286
14287
14288    case "$with_xpm" in
14289     yes) ;;
14290     no)  ;;
14291
14292     /*)
14293      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM headers" >&5
14294 $as_echo_n "checking for XPM headers... " >&6; }
14295      d=$with_xpm/include
14296      if test -d $d; then
14297        X_CFLAGS="-I$d $X_CFLAGS"
14298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14299 $as_echo "$d" >&6; }
14300      else
14301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14302 $as_echo "not found ($d: no such directory)" >&6; }
14303      fi
14304
14305      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPM libs" >&5
14306 $as_echo_n "checking for XPM libs... " >&6; }
14307      d=$with_xpm/lib
14308      if test -d $d; then
14309        X_LIBS="-L$d $X_LIBS"
14310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14311 $as_echo "$d" >&6; }
14312      else
14313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14314 $as_echo "not found ($d: no such directory)" >&6; }
14315      fi
14316
14317      # replace the directory string with "yes".
14318      with_xpm_req="yes"
14319      with_xpm=$with_xpm_req
14320      ;;
14321
14322     *)
14323      echo ""
14324      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
14325      echo "       If it is a directory, then \`DIR/include' will be added to"
14326      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14327      exit 1
14328      ;;
14329    esac
14330
14331
14332 if test "$with_xpm" = yes; then
14333
14334   ac_save_CPPFLAGS="$CPPFLAGS"
14335   if test \! -z "$includedir" ; then
14336     CPPFLAGS="$CPPFLAGS -I$includedir"
14337   fi
14338   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14339   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14340   ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "#include <X11/Xlib.h>
14341 "
14342 if test "x$ac_cv_header_X11_xpm_h" = xyes; then :
14343   have_xpm=yes
14344                     $as_echo "#define HAVE_XPM 1" >>confdefs.h
14345
14346                     XPM_LIBS="-lXpm $XPM_LIBS"
14347 fi
14348
14349
14350   CPPFLAGS="$ac_save_CPPFLAGS"
14351 elif test "$with_xpm" != no; then
14352   echo "error: must be yes or no: --with-xpm=$with_xpm"
14353   exit 1
14354 fi
14355
14356 # See comment near $motif_requires_xpm, above.
14357 # Need to do this here, after both Motif and XPM have been checked for.
14358 #
14359 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
14360   if test "$motif_requires_xpm" = yes ; then
14361     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
14362   fi
14363 fi
14364
14365 if test "$XPM_LIBS" = "" ; then
14366   XPM_LIBS=$(MINIXPM)
14367 fi
14368
14369
14370 ###############################################################################
14371 #
14372 #       Check for -ljpeg
14373 #
14374 ###############################################################################
14375
14376 have_jpeg=no
14377 with_jpeg_req=unspecified
14378 jpeg_halfassed=no
14379
14380 # Check whether --with-jpeg was given.
14381 if test "${with_jpeg+set}" = set; then :
14382   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
14383 else
14384   with_jpeg=yes
14385 fi
14386
14387
14388
14389    case "$with_jpeg" in
14390     yes) ;;
14391     no)  ;;
14392
14393     /*)
14394      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG headers" >&5
14395 $as_echo_n "checking for JPEG headers... " >&6; }
14396      d=$with_jpeg/include
14397      if test -d $d; then
14398        X_CFLAGS="-I$d $X_CFLAGS"
14399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14400 $as_echo "$d" >&6; }
14401      else
14402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14403 $as_echo "not found ($d: no such directory)" >&6; }
14404      fi
14405
14406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG libs" >&5
14407 $as_echo_n "checking for JPEG libs... " >&6; }
14408      d=$with_jpeg/lib
14409      if test -d $d; then
14410        X_LIBS="-L$d $X_LIBS"
14411        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14412 $as_echo "$d" >&6; }
14413      else
14414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14415 $as_echo "not found ($d: no such directory)" >&6; }
14416      fi
14417
14418      # replace the directory string with "yes".
14419      with_jpeg_req="yes"
14420      with_jpeg=$with_jpeg_req
14421      ;;
14422
14423     *)
14424      echo ""
14425      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
14426      echo "       If it is a directory, then \`DIR/include' will be added to"
14427      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14428      exit 1
14429      ;;
14430    esac
14431
14432
14433 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
14434   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
14435   exit 1
14436 fi
14437
14438 if test "$with_jpeg" = yes; then
14439
14440   have_jpeg=no
14441
14442   ac_save_CPPFLAGS="$CPPFLAGS"
14443   if test \! -z "$includedir" ; then
14444     CPPFLAGS="$CPPFLAGS -I$includedir"
14445   fi
14446   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14447   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14448   ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
14449 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
14450   have_jpeg=yes
14451 fi
14452
14453
14454   CPPFLAGS="$ac_save_CPPFLAGS"
14455
14456   if test "$have_jpeg" = yes; then
14457     # we have the header, now check for the library
14458     have_jpeg=no
14459     jpeg_halfassed=yes
14460
14461   ac_save_CPPFLAGS="$CPPFLAGS"
14462   ac_save_LDFLAGS="$LDFLAGS"
14463 #  ac_save_LIBS="$LIBS"
14464
14465   if test \! -z "$includedir" ; then
14466     CPPFLAGS="$CPPFLAGS -I$includedir"
14467   fi
14468   # note: $X_CFLAGS includes $x_includes
14469   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14470
14471   if test \! -z "$libdir" ; then
14472     LDFLAGS="$LDFLAGS -L$libdir"
14473   fi
14474   # note: $X_LIBS includes $x_libraries
14475   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14476
14477   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14478   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14479   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_start_compress in -ljpeg" >&5
14480 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
14481 if ${ac_cv_lib_jpeg_jpeg_start_compress+:} false; then :
14482   $as_echo_n "(cached) " >&6
14483 else
14484   ac_check_lib_save_LIBS=$LIBS
14485 LIBS="-ljpeg  $LIBS"
14486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14487 /* end confdefs.h.  */
14488
14489 /* Override any GCC internal prototype to avoid an error.
14490    Use char because int might match the return type of a GCC
14491    builtin and then its argument prototype would still apply.  */
14492 #ifdef __cplusplus
14493 extern "C"
14494 #endif
14495 char jpeg_start_compress ();
14496 int
14497 main ()
14498 {
14499 return jpeg_start_compress ();
14500   ;
14501   return 0;
14502 }
14503 _ACEOF
14504 if ac_fn_c_try_link "$LINENO"; then :
14505   ac_cv_lib_jpeg_jpeg_start_compress=yes
14506 else
14507   ac_cv_lib_jpeg_jpeg_start_compress=no
14508 fi
14509 rm -f core conftest.err conftest.$ac_objext \
14510     conftest$ac_exeext conftest.$ac_ext
14511 LIBS=$ac_check_lib_save_LIBS
14512 fi
14513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
14514 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
14515 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = xyes; then :
14516   have_jpeg=yes
14517                     jpeg_halfassed=no
14518                     JPEG_LIBS="-ljpeg"
14519                     $as_echo "#define HAVE_JPEGLIB 1" >>confdefs.h
14520
14521 fi
14522
14523   CPPFLAGS="$ac_save_CPPFLAGS"
14524   LDFLAGS="$ac_save_LDFLAGS"
14525 #  LIBS="$ac_save_LIBS"
14526
14527   fi
14528 fi
14529
14530
14531 ###############################################################################
14532 #
14533 #       Check for -lXft
14534 #
14535 ###############################################################################
14536
14537 have_xutf8drawstring=no
14538
14539   ac_save_CPPFLAGS="$CPPFLAGS"
14540   ac_save_LDFLAGS="$LDFLAGS"
14541 #  ac_save_LIBS="$LIBS"
14542
14543   if test \! -z "$includedir" ; then
14544     CPPFLAGS="$CPPFLAGS -I$includedir"
14545   fi
14546   # note: $X_CFLAGS includes $x_includes
14547   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14548
14549   if test \! -z "$libdir" ; then
14550     LDFLAGS="$LDFLAGS -L$libdir"
14551   fi
14552   # note: $X_LIBS includes $x_libraries
14553   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14554
14555   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14556   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14557   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xutf8DrawString in -lX11" >&5
14558 $as_echo_n "checking for Xutf8DrawString in -lX11... " >&6; }
14559 if ${ac_cv_lib_X11_Xutf8DrawString+:} false; then :
14560   $as_echo_n "(cached) " >&6
14561 else
14562   ac_check_lib_save_LIBS=$LIBS
14563 LIBS="-lX11 -lX11 -lXext -lm $LIBS"
14564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14565 /* end confdefs.h.  */
14566
14567 /* Override any GCC internal prototype to avoid an error.
14568    Use char because int might match the return type of a GCC
14569    builtin and then its argument prototype would still apply.  */
14570 #ifdef __cplusplus
14571 extern "C"
14572 #endif
14573 char Xutf8DrawString ();
14574 int
14575 main ()
14576 {
14577 return Xutf8DrawString ();
14578   ;
14579   return 0;
14580 }
14581 _ACEOF
14582 if ac_fn_c_try_link "$LINENO"; then :
14583   ac_cv_lib_X11_Xutf8DrawString=yes
14584 else
14585   ac_cv_lib_X11_Xutf8DrawString=no
14586 fi
14587 rm -f core conftest.err conftest.$ac_objext \
14588     conftest$ac_exeext conftest.$ac_ext
14589 LIBS=$ac_check_lib_save_LIBS
14590 fi
14591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_Xutf8DrawString" >&5
14592 $as_echo "$ac_cv_lib_X11_Xutf8DrawString" >&6; }
14593 if test "x$ac_cv_lib_X11_Xutf8DrawString" = xyes; then :
14594   have_xutf8drawstring=yes
14595 else
14596   true
14597 fi
14598
14599   CPPFLAGS="$ac_save_CPPFLAGS"
14600   LDFLAGS="$ac_save_LDFLAGS"
14601 #  LIBS="$ac_save_LIBS"
14602
14603 if test "$have_xutf8drawstring" = yes ; then
14604   $as_echo "#define HAVE_XUTF8DRAWSTRING 1" >>confdefs.h
14605
14606 fi
14607
14608
14609 have_xft=no
14610 with_xft_req=unspecified
14611 xft_halfassed=no
14612
14613 # Check whether --with-xft was given.
14614 if test "${with_xft+set}" = set; then :
14615   withval=$with_xft; with_xft="$withval"; with_xft_req="$withval"
14616 else
14617   with_xft=yes
14618 fi
14619
14620
14621
14622    case "$with_xft" in
14623     yes) ;;
14624     no)  ;;
14625
14626     /*)
14627      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft headers" >&5
14628 $as_echo_n "checking for Xft headers... " >&6; }
14629      d=$with_xft/include
14630      if test -d $d; then
14631        X_CFLAGS="-I$d $X_CFLAGS"
14632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14633 $as_echo "$d" >&6; }
14634      else
14635        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14636 $as_echo "not found ($d: no such directory)" >&6; }
14637      fi
14638
14639      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft libs" >&5
14640 $as_echo_n "checking for Xft libs... " >&6; }
14641      d=$with_xft/lib
14642      if test -d $d; then
14643        X_LIBS="-L$d $X_LIBS"
14644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
14645 $as_echo "$d" >&6; }
14646      else
14647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
14648 $as_echo "not found ($d: no such directory)" >&6; }
14649      fi
14650
14651      # replace the directory string with "yes".
14652      with_xft_req="yes"
14653      with_xft=$with_xft_req
14654      ;;
14655
14656     *)
14657      echo ""
14658      echo "error: argument to --with-xft must be \"yes\", \"no\", or a directory."
14659      echo "       If it is a directory, then \`DIR/include' will be added to"
14660      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14661      exit 1
14662      ;;
14663    esac
14664
14665
14666 if test "$with_xft" != yes -a "$with_xft" != no ; then
14667   echo "error: must be yes or no: --with-xft=$with_xft"
14668   exit 1
14669 fi
14670
14671 if test "$with_xft" = yes; then
14672
14673   pkgs=''
14674   ok="yes"
14675   pkg_check_version xft 2.1.0
14676   have_xft="$ok"
14677
14678   if test "$have_xft" = yes; then
14679     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft includes" >&5
14680 $as_echo_n "checking for Xft includes... " >&6; }
14681 if ${ac_cv_xft_config_cflags+:} false; then :
14682   $as_echo_n "(cached) " >&6
14683 else
14684   ac_cv_xft_config_cflags=`$pkg_config --cflags $pkgs`
14685 fi
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xft_config_cflags" >&5
14687 $as_echo "$ac_cv_xft_config_cflags" >&6; }
14688     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xft libs" >&5
14689 $as_echo_n "checking for Xft libs... " >&6; }
14690 if ${ac_cv_xft_config_libs+:} false; then :
14691   $as_echo_n "(cached) " >&6
14692 else
14693   ac_cv_xft_config_libs=`$pkg_config --libs $pkgs`
14694 fi
14695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xft_config_libs" >&5
14696 $as_echo "$ac_cv_xft_config_libs" >&6; }
14697   fi
14698
14699   ac_xft_config_cflags=$ac_cv_xft_config_cflags
14700   ac_xft_config_libs=$ac_cv_xft_config_libs
14701
14702   if test "$have_xft" = yes; then
14703     #
14704     # we appear to have Xft; check for headers/libs to be sure.
14705     #
14706     ac_save_xft_CPPFLAGS="$CPPFLAGS"
14707     CPPFLAGS="$CPPFLAGS $ac_xft_config_cflags"
14708
14709     have_xft=no
14710
14711   ac_save_CPPFLAGS="$CPPFLAGS"
14712   if test \! -z "$includedir" ; then
14713     CPPFLAGS="$CPPFLAGS -I$includedir"
14714   fi
14715   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14716   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14717   ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
14718 if test "x$ac_cv_header_X11_Xft_Xft_h" = xyes; then :
14719   have_xft=yes
14720 fi
14721
14722
14723   CPPFLAGS="$ac_save_CPPFLAGS"
14724
14725     CPPFLAGS="$ac_save_xft_CPPFLAGS"
14726   fi
14727
14728   if test "$have_xft" = yes; then
14729     # we have the headers, now check for the libraries
14730     have_xft=no
14731     xft_halfassed=yes
14732
14733     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for Xft usability..." >&5
14734 $as_echo "checking for Xft usability..." >&6; }
14735
14736   ac_save_CPPFLAGS="$CPPFLAGS"
14737   ac_save_LDFLAGS="$LDFLAGS"
14738 #  ac_save_LIBS="$LIBS"
14739
14740   if test \! -z "$includedir" ; then
14741     CPPFLAGS="$CPPFLAGS -I$includedir"
14742   fi
14743   # note: $X_CFLAGS includes $x_includes
14744   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14745
14746   if test \! -z "$libdir" ; then
14747     LDFLAGS="$LDFLAGS -L$libdir"
14748   fi
14749   # note: $X_LIBS includes $x_libraries
14750   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14751
14752   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14753   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14754   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftDrawStringUtf8 in -lc" >&5
14755 $as_echo_n "checking for XftDrawStringUtf8 in -lc... " >&6; }
14756 if ${ac_cv_lib_c_XftDrawStringUtf8+:} false; then :
14757   $as_echo_n "(cached) " >&6
14758 else
14759   ac_check_lib_save_LIBS=$LIBS
14760 LIBS="-lc $ac_xft_config_libs -lX11 -lXext -lm $LIBS"
14761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14762 /* end confdefs.h.  */
14763
14764 /* Override any GCC internal prototype to avoid an error.
14765    Use char because int might match the return type of a GCC
14766    builtin and then its argument prototype would still apply.  */
14767 #ifdef __cplusplus
14768 extern "C"
14769 #endif
14770 char XftDrawStringUtf8 ();
14771 int
14772 main ()
14773 {
14774 return XftDrawStringUtf8 ();
14775   ;
14776   return 0;
14777 }
14778 _ACEOF
14779 if ac_fn_c_try_link "$LINENO"; then :
14780   ac_cv_lib_c_XftDrawStringUtf8=yes
14781 else
14782   ac_cv_lib_c_XftDrawStringUtf8=no
14783 fi
14784 rm -f core conftest.err conftest.$ac_objext \
14785     conftest$ac_exeext conftest.$ac_ext
14786 LIBS=$ac_check_lib_save_LIBS
14787 fi
14788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_XftDrawStringUtf8" >&5
14789 $as_echo "$ac_cv_lib_c_XftDrawStringUtf8" >&6; }
14790 if test "x$ac_cv_lib_c_XftDrawStringUtf8" = xyes; then :
14791   have_xft=yes
14792 fi
14793
14794   CPPFLAGS="$ac_save_CPPFLAGS"
14795   LDFLAGS="$ac_save_LDFLAGS"
14796 #  LIBS="$ac_save_LIBS"
14797
14798   fi
14799
14800   if test "$have_xft" = no; then
14801     { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for Xft usability... no" >&5
14802 $as_echo "checking for Xft usability... no" >&6; }
14803   fi
14804 fi
14805
14806 if test "$have_xft" = yes; then
14807   INCLUDES="$INCLUDES $ac_xft_config_cflags"
14808   XFT_LIBS="$ac_xft_config_libs"
14809   XFT_SRCS=''
14810   XFT_OBJS=''
14811   $as_echo "#define HAVE_XFT 1" >>confdefs.h
14812
14813 else
14814   XFT_LIBS=''
14815   XFT_SRCS='$(UTILS_SRC)/xft.c'
14816   XFT_OBJS='$(UTILS_BIN)/xft.o'
14817 fi
14818
14819
14820 ###############################################################################
14821 #
14822 #       Check for pty support: this allows 'phosphor' and 'apple2'
14823 #       to run curses-based programs, or be used as terminal windows.
14824 #
14825 ###############################################################################
14826
14827 PTY_LIBS=
14828 for ac_header in pty.h util.h sys/termios.h
14829 do :
14830   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14831 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14832 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14833   cat >>confdefs.h <<_ACEOF
14834 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14835 _ACEOF
14836
14837 fi
14838
14839 done
14840
14841
14842   ac_save_CPPFLAGS="$CPPFLAGS"
14843   ac_save_LDFLAGS="$LDFLAGS"
14844 #  ac_save_LIBS="$LIBS"
14845
14846   if test \! -z "$includedir" ; then
14847     CPPFLAGS="$CPPFLAGS -I$includedir"
14848   fi
14849   # note: $X_CFLAGS includes $x_includes
14850   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14851
14852   if test \! -z "$libdir" ; then
14853     LDFLAGS="$LDFLAGS -L$libdir"
14854   fi
14855   # note: $X_LIBS includes $x_libraries
14856   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14857
14858   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14859   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
14861 $as_echo_n "checking for forkpty in -lutil... " >&6; }
14862 if ${ac_cv_lib_util_forkpty+:} false; then :
14863   $as_echo_n "(cached) " >&6
14864 else
14865   ac_check_lib_save_LIBS=$LIBS
14866 LIBS="-lutil  $LIBS"
14867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14868 /* end confdefs.h.  */
14869
14870 /* Override any GCC internal prototype to avoid an error.
14871    Use char because int might match the return type of a GCC
14872    builtin and then its argument prototype would still apply.  */
14873 #ifdef __cplusplus
14874 extern "C"
14875 #endif
14876 char forkpty ();
14877 int
14878 main ()
14879 {
14880 return forkpty ();
14881   ;
14882   return 0;
14883 }
14884 _ACEOF
14885 if ac_fn_c_try_link "$LINENO"; then :
14886   ac_cv_lib_util_forkpty=yes
14887 else
14888   ac_cv_lib_util_forkpty=no
14889 fi
14890 rm -f core conftest.err conftest.$ac_objext \
14891     conftest$ac_exeext conftest.$ac_ext
14892 LIBS=$ac_check_lib_save_LIBS
14893 fi
14894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
14895 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
14896 if test "x$ac_cv_lib_util_forkpty" = xyes; then :
14897   PTY_LIBS="-lutil"
14898                 ac_have_forkpty=yes
14899                 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
14900
14901 fi
14902
14903   CPPFLAGS="$ac_save_CPPFLAGS"
14904   LDFLAGS="$ac_save_LDFLAGS"
14905 #  LIBS="$ac_save_LIBS"
14906
14907
14908 if test "$ac_have_forkpty" != yes ; then
14909   # we don't need (or have) -lutil on MacOS 10.4.2...
14910
14911   ac_save_CPPFLAGS="$CPPFLAGS"
14912   ac_save_LDFLAGS="$LDFLAGS"
14913 #  ac_save_LIBS="$LIBS"
14914
14915   if test \! -z "$includedir" ; then
14916     CPPFLAGS="$CPPFLAGS -I$includedir"
14917   fi
14918   # note: $X_CFLAGS includes $x_includes
14919   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14920
14921   if test \! -z "$libdir" ; then
14922     LDFLAGS="$LDFLAGS -L$libdir"
14923   fi
14924   # note: $X_LIBS includes $x_libraries
14925   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14926
14927   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14928   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14929   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lc" >&5
14930 $as_echo_n "checking for forkpty in -lc... " >&6; }
14931 if ${ac_cv_lib_c_forkpty+:} false; then :
14932   $as_echo_n "(cached) " >&6
14933 else
14934   ac_check_lib_save_LIBS=$LIBS
14935 LIBS="-lc  $LIBS"
14936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14937 /* end confdefs.h.  */
14938
14939 /* Override any GCC internal prototype to avoid an error.
14940    Use char because int might match the return type of a GCC
14941    builtin and then its argument prototype would still apply.  */
14942 #ifdef __cplusplus
14943 extern "C"
14944 #endif
14945 char forkpty ();
14946 int
14947 main ()
14948 {
14949 return forkpty ();
14950   ;
14951   return 0;
14952 }
14953 _ACEOF
14954 if ac_fn_c_try_link "$LINENO"; then :
14955   ac_cv_lib_c_forkpty=yes
14956 else
14957   ac_cv_lib_c_forkpty=no
14958 fi
14959 rm -f core conftest.err conftest.$ac_objext \
14960     conftest$ac_exeext conftest.$ac_ext
14961 LIBS=$ac_check_lib_save_LIBS
14962 fi
14963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_forkpty" >&5
14964 $as_echo "$ac_cv_lib_c_forkpty" >&6; }
14965 if test "x$ac_cv_lib_c_forkpty" = xyes; then :
14966   PTY_LIBS=""
14967                   $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
14968
14969 fi
14970
14971   CPPFLAGS="$ac_save_CPPFLAGS"
14972   LDFLAGS="$ac_save_LDFLAGS"
14973 #  LIBS="$ac_save_LIBS"
14974
14975 fi
14976
14977 ###############################################################################
14978 #
14979 #       Check for the XSHM server extension.
14980 #
14981 ###############################################################################
14982
14983 have_xshm=no
14984 with_xshm_req=unspecified
14985
14986 # Check whether --with-xshm-ext was given.
14987 if test "${with_xshm_ext+set}" = set; then :
14988   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
14989 else
14990   with_xshm=yes
14991 fi
14992
14993
14994
14995    case "$with_xshm" in
14996     yes) ;;
14997     no)  ;;
14998
14999     /*)
15000      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM headers" >&5
15001 $as_echo_n "checking for XSHM headers... " >&6; }
15002      d=$with_xshm/include
15003      if test -d $d; then
15004        X_CFLAGS="-I$d $X_CFLAGS"
15005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15006 $as_echo "$d" >&6; }
15007      else
15008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15009 $as_echo "not found ($d: no such directory)" >&6; }
15010      fi
15011
15012      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM libs" >&5
15013 $as_echo_n "checking for XSHM libs... " >&6; }
15014      d=$with_xshm/lib
15015      if test -d $d; then
15016        X_LIBS="-L$d $X_LIBS"
15017        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15018 $as_echo "$d" >&6; }
15019      else
15020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15021 $as_echo "not found ($d: no such directory)" >&6; }
15022      fi
15023
15024      # replace the directory string with "yes".
15025      with_xshm_req="yes"
15026      with_xshm=$with_xshm_req
15027      ;;
15028
15029     *)
15030      echo ""
15031      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
15032      echo "       If it is a directory, then \`DIR/include' will be added to"
15033      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15034      exit 1
15035      ;;
15036    esac
15037
15038
15039 if test "$with_xshm" = yes; then
15040
15041   # first check for Xshm.h.
15042
15043   ac_save_CPPFLAGS="$CPPFLAGS"
15044   if test \! -z "$includedir" ; then
15045     CPPFLAGS="$CPPFLAGS -I$includedir"
15046   fi
15047   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15048   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15049   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XShm.h" "ac_cv_header_X11_extensions_XShm_h" "#include <X11/Xlib.h>
15050 "
15051 if test "x$ac_cv_header_X11_extensions_XShm_h" = xyes; then :
15052   have_xshm=yes
15053 fi
15054
15055
15056   CPPFLAGS="$ac_save_CPPFLAGS"
15057
15058   # if that succeeded, then check for sys/ipc.h.
15059   if test "$have_xshm" = yes; then
15060     have_xshm=no
15061
15062   ac_save_CPPFLAGS="$CPPFLAGS"
15063   if test \! -z "$includedir" ; then
15064     CPPFLAGS="$CPPFLAGS -I$includedir"
15065   fi
15066   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15067   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15068   ac_fn_c_check_header_mongrel "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
15069 if test "x$ac_cv_header_sys_ipc_h" = xyes; then :
15070   have_xshm=yes
15071 fi
15072
15073
15074   CPPFLAGS="$ac_save_CPPFLAGS"
15075   fi
15076
15077   # if that succeeded, then check for sys/shm.h.
15078   if test "$have_xshm" = yes; then
15079     have_xshm=no
15080
15081   ac_save_CPPFLAGS="$CPPFLAGS"
15082   if test \! -z "$includedir" ; then
15083     CPPFLAGS="$CPPFLAGS -I$includedir"
15084   fi
15085   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15086   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15087   ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
15088 if test "x$ac_cv_header_sys_shm_h" = xyes; then :
15089   have_xshm=yes
15090 fi
15091
15092
15093   CPPFLAGS="$ac_save_CPPFLAGS"
15094   fi
15095
15096   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
15097   # to exist, but the library code to not exist.  And even better, the library
15098   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
15099   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
15100   # that's not quite right, but close enough.)
15101   #
15102   case "$host" in
15103     *-aix*)
15104       if  `uname -v` -eq 3 ; then
15105         have_xshm=no
15106
15107   ac_save_CPPFLAGS="$CPPFLAGS"
15108   ac_save_LDFLAGS="$LDFLAGS"
15109 #  ac_save_LIBS="$LIBS"
15110
15111   if test \! -z "$includedir" ; then
15112     CPPFLAGS="$CPPFLAGS -I$includedir"
15113   fi
15114   # note: $X_CFLAGS includes $x_includes
15115   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15116
15117   if test \! -z "$libdir" ; then
15118     LDFLAGS="$LDFLAGS -L$libdir"
15119   fi
15120   # note: $X_LIBS includes $x_libraries
15121   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15122
15123   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15124   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15125   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryExtension in -lXextSam" >&5
15126 $as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
15127 if ${ac_cv_lib_XextSam_XShmQueryExtension+:} false; then :
15128   $as_echo_n "(cached) " >&6
15129 else
15130   ac_check_lib_save_LIBS=$LIBS
15131 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
15132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15133 /* end confdefs.h.  */
15134
15135 /* Override any GCC internal prototype to avoid an error.
15136    Use char because int might match the return type of a GCC
15137    builtin and then its argument prototype would still apply.  */
15138 #ifdef __cplusplus
15139 extern "C"
15140 #endif
15141 char XShmQueryExtension ();
15142 int
15143 main ()
15144 {
15145 return XShmQueryExtension ();
15146   ;
15147   return 0;
15148 }
15149 _ACEOF
15150 if ac_fn_c_try_link "$LINENO"; then :
15151   ac_cv_lib_XextSam_XShmQueryExtension=yes
15152 else
15153   ac_cv_lib_XextSam_XShmQueryExtension=no
15154 fi
15155 rm -f core conftest.err conftest.$ac_objext \
15156     conftest$ac_exeext conftest.$ac_ext
15157 LIBS=$ac_check_lib_save_LIBS
15158 fi
15159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
15160 $as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
15161 if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = xyes; then :
15162   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
15163 else
15164   true
15165 fi
15166
15167   CPPFLAGS="$ac_save_CPPFLAGS"
15168   LDFLAGS="$ac_save_LDFLAGS"
15169 #  LIBS="$ac_save_LIBS"
15170
15171       fi
15172     ;;
15173   esac
15174
15175   # if that succeeded, then we've really got it.
15176   if test "$have_xshm" = yes; then
15177     $as_echo "#define HAVE_XSHM_EXTENSION 1" >>confdefs.h
15178
15179   fi
15180
15181 elif test "$with_xshm" != no; then
15182   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
15183   exit 1
15184 fi
15185
15186
15187 ###############################################################################
15188 #
15189 #       Check for the DOUBLE-BUFFER server extension.
15190 #
15191 ###############################################################################
15192
15193 have_xdbe=no
15194 with_xdbe_req=unspecified
15195
15196 # Check whether --with-xdbe-ext was given.
15197 if test "${with_xdbe_ext+set}" = set; then :
15198   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
15199 else
15200   with_xdbe=yes
15201 fi
15202
15203
15204
15205    case "$with_xdbe" in
15206     yes) ;;
15207     no)  ;;
15208
15209     /*)
15210      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER headers" >&5
15211 $as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
15212      d=$with_xdbe/include
15213      if test -d $d; then
15214        X_CFLAGS="-I$d $X_CFLAGS"
15215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15216 $as_echo "$d" >&6; }
15217      else
15218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15219 $as_echo "not found ($d: no such directory)" >&6; }
15220      fi
15221
15222      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER libs" >&5
15223 $as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
15224      d=$with_xdbe/lib
15225      if test -d $d; then
15226        X_LIBS="-L$d $X_LIBS"
15227        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15228 $as_echo "$d" >&6; }
15229      else
15230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15231 $as_echo "not found ($d: no such directory)" >&6; }
15232      fi
15233
15234      # replace the directory string with "yes".
15235      with_xdbe_req="yes"
15236      with_xdbe=$with_xdbe_req
15237      ;;
15238
15239     *)
15240      echo ""
15241      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
15242      echo "       If it is a directory, then \`DIR/include' will be added to"
15243      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15244      exit 1
15245      ;;
15246    esac
15247
15248
15249 if test "$with_xdbe" = yes; then
15250
15251
15252   ac_save_CPPFLAGS="$CPPFLAGS"
15253   if test \! -z "$includedir" ; then
15254     CPPFLAGS="$CPPFLAGS -I$includedir"
15255   fi
15256   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15257   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15258   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xdbe.h" "ac_cv_header_X11_extensions_Xdbe_h" "#include <X11/Xlib.h>
15259 "
15260 if test "x$ac_cv_header_X11_extensions_Xdbe_h" = xyes; then :
15261   have_xdbe=yes
15262 fi
15263
15264
15265   CPPFLAGS="$ac_save_CPPFLAGS"
15266   if test "$have_xdbe" = yes; then
15267     $as_echo "#define HAVE_DOUBLE_BUFFER_EXTENSION 1" >>confdefs.h
15268
15269   fi
15270
15271 elif test "$with_xdbe" != no; then
15272   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
15273   exit 1
15274 fi
15275
15276
15277 ###############################################################################
15278 #
15279 #       Check for the SGI XReadDisplay server extension.
15280 #
15281 #       Note: this has to be down here, rather than up with the other server
15282 #       extension tests, so that the output of `configure --help' is in the
15283 #       right order.  Arrgh!
15284 #
15285 ###############################################################################
15286
15287 have_readdisplay=no
15288 with_readdisplay_req=unspecified
15289
15290 # Check whether --with-readdisplay was given.
15291 if test "${with_readdisplay+set}" = set; then :
15292   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
15293 else
15294   with_readdisplay=yes
15295 fi
15296
15297
15298
15299    case "$with_readdisplay" in
15300     yes) ;;
15301     no)  ;;
15302
15303     /*)
15304      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay headers" >&5
15305 $as_echo_n "checking for XReadDisplay headers... " >&6; }
15306      d=$with_readdisplay/include
15307      if test -d $d; then
15308        X_CFLAGS="-I$d $X_CFLAGS"
15309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15310 $as_echo "$d" >&6; }
15311      else
15312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15313 $as_echo "not found ($d: no such directory)" >&6; }
15314      fi
15315
15316      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay libs" >&5
15317 $as_echo_n "checking for XReadDisplay libs... " >&6; }
15318      d=$with_readdisplay/lib
15319      if test -d $d; then
15320        X_LIBS="-L$d $X_LIBS"
15321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15322 $as_echo "$d" >&6; }
15323      else
15324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15325 $as_echo "not found ($d: no such directory)" >&6; }
15326      fi
15327
15328      # replace the directory string with "yes".
15329      with_readdisplay_req="yes"
15330      with_readdisplay=$with_readdisplay_req
15331      ;;
15332
15333     *)
15334      echo ""
15335      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
15336      echo "       If it is a directory, then \`DIR/include' will be added to"
15337      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15338      exit 1
15339      ;;
15340    esac
15341
15342
15343 if test "$with_readdisplay" = yes; then
15344
15345   ac_save_CPPFLAGS="$CPPFLAGS"
15346   if test \! -z "$includedir" ; then
15347     CPPFLAGS="$CPPFLAGS -I$includedir"
15348   fi
15349   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15350   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15351   ac_fn_c_check_header_compile "$LINENO" "X11/extensions/readdisplay.h" "ac_cv_header_X11_extensions_readdisplay_h" "#include <X11/Xlib.h>
15352 "
15353 if test "x$ac_cv_header_X11_extensions_readdisplay_h" = xyes; then :
15354   $as_echo "#define HAVE_READ_DISPLAY_EXTENSION 1" >>confdefs.h
15355
15356 fi
15357
15358
15359   CPPFLAGS="$ac_save_CPPFLAGS"
15360 elif test "$with_readdisplay" != no; then
15361   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
15362   exit 1
15363 fi
15364
15365
15366 ###############################################################################
15367 #
15368 #       Check for a directory full of images to use as the default value
15369 #       of the "imageDirectory" preference.
15370 #
15371 ###############################################################################
15372
15373 have_imagedir=no
15374 with_imagedir_req=unspecified
15375
15376
15377 # Check whether --with-image-directory was given.
15378 if test "${with_image_directory+set}" = set; then :
15379   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
15380 else
15381   with_imagedir=yes
15382 fi
15383
15384 # no HANDLE_X_PATH_ARG for this one
15385
15386 case "$with_imagedir" in
15387   /*)
15388     # absolute path
15389     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $with_imagedir" >&5
15390 $as_echo_n "checking for image directory $with_imagedir... " >&6; }
15391     if test -d "$with_imagedir" ; then
15392       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15393 $as_echo "yes" >&6; }
15394     else
15395       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15396 $as_echo "no" >&6; }
15397       with_imagedir=""
15398     fi
15399   ;;
15400   yes)
15401     with_imagedir=""
15402
15403     #### Could use some more defaults here...
15404     for dd in \
15405       "/usr/share/backgrounds/images/"          \
15406       "/usr/share/wallpapers/"                  \
15407       "/Library/Desktop Pictures/"              \
15408     ; do
15409       if test -z "$with_imagedir"; then
15410         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $dd" >&5
15411 $as_echo_n "checking for image directory $dd... " >&6; }
15412         if test -d "$dd" ; then
15413           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15414 $as_echo "yes" >&6; }
15415           with_imagedir="$dd"
15416         else
15417           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15418 $as_echo "no" >&6; }
15419         fi
15420       fi
15421     done
15422
15423   ;;
15424   no)
15425     with_imagedir=""
15426   ;;
15427
15428   *)
15429     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
15430     exit 1
15431   ;;
15432 esac
15433 ac_cv_imagedir="$with_imagedir"
15434
15435 DEFAULT_IMAGES_P='True'
15436 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
15437
15438 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
15439   DEFAULT_IMAGES_P='False'
15440 fi
15441
15442
15443 ###############################################################################
15444 #
15445 #       Pick a text file to use as the default of the "textFile" preference.
15446 #       Any old file will do, but preferably one that will make interesting
15447 #       shapes when displayed by "starwars" and "fontglide".
15448 #
15449 ###############################################################################
15450
15451 have_textfile=no
15452 with_textfile_req=unspecified
15453
15454
15455 # Check whether --with-text-file was given.
15456 if test "${with_text_file+set}" = set; then :
15457   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
15458 else
15459   with_textfile=yes
15460 fi
15461
15462 # no HANDLE_X_PATH_ARG for this one
15463
15464 case "$with_textfile" in
15465   /*)
15466     # absolute path
15467     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $with_textfile" >&5
15468 $as_echo_n "checking for text file $with_textfile... " >&6; }
15469     if test -f "$with_textfile" ; then
15470       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15471 $as_echo "yes" >&6; }
15472     else
15473       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15474 $as_echo "no" >&6; }
15475       with_textfile=""
15476     fi
15477   ;;
15478   yes)
15479     with_textfile=""
15480
15481     #### Could use some more defaults here...
15482     for f in \
15483       "/usr/X11R6/lib/X11/doc/README"              \
15484       "/usr/share/doc/xserver-common/copyright"    \
15485       "/usr/share/doc/xserver-xorg-core/copyright" \
15486       "/usr/X11R6/README"                          \
15487       "/usr/share/doc/libX11*/COPYING"             \
15488       "/usr/X11/share/X11/doc/README*"             \
15489       "/usr/share/doc/debian/debian-manifesto"     \
15490     ; do
15491       if test -z "$with_textfile"; then
15492         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $f" >&5
15493 $as_echo_n "checking for text file $f... " >&6; }
15494         f=`/bin/ls $f 2>&- | head -1`
15495         if test -f "$f" ; then
15496           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15497 $as_echo "yes" >&6; }
15498           with_textfile="$f"
15499         else
15500           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15501 $as_echo "no" >&6; }
15502         fi
15503       fi
15504     done
15505
15506   ;;
15507   no)
15508     with_textfile=""
15509   ;;
15510
15511   *)
15512     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
15513     exit 1
15514   ;;
15515 esac
15516 ac_cv_textfile="$with_textfile"
15517
15518 DEFAULT_TEXT_FILE="$ac_cv_textfile"
15519
15520
15521 ###############################################################################
15522 #
15523 #       Check the browser to see help URL
15524 #
15525 ###############################################################################
15526
15527 have_browser=no
15528 with_browser_req=unspecified
15529
15530
15531 # Check whether --with-browser was given.
15532 if test "${with_browser+set}" = set; then :
15533   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
15534 else
15535   with_browser=no
15536 fi
15537
15538 # no HANDLE_X_PATH_ARG for this one
15539
15540 case "$with_browser" in
15541   no )
15542   ;;
15543   * )
15544     WITH_BROWSER=$with_browser
15545     gnome_open_program=$with_browser
15546     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for browser $with_browser" >&5
15547 $as_echo_n "checking for browser $with_browser... " >&6; }
15548     with_browser_fullpath=`which $with_browser 2>/dev/null`
15549     case $with_browser_fullpath in
15550          /* )
15551                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15552 $as_echo "yes" >&6; }
15553                  have_browser=yes
15554                  ;;
15555         * )
15556                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15557 $as_echo "no" >&6; }
15558 # Only warning: we don't want to install all packages for the
15559 # dependency of the browser in building stage...
15560                echo "WARNING: browser not found: --with-browser=$with_browser"
15561                ;;
15562     esac
15563   ;;
15564 esac
15565 ac_cv_browser="$with_browser"
15566
15567 ###############################################################################
15568 #
15569 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
15570 #       This should be safe, but let's give people the option.
15571 #
15572 ###############################################################################
15573
15574 setuid_hacks_default=no
15575 setuid_hacks="$setuid_hacks_default"
15576
15577 # Check whether --with-setuid-hacks was given.
15578 if test "${with_setuid_hacks+set}" = set; then :
15579   withval=$with_setuid_hacks; setuid_hacks="$withval"
15580 else
15581   setuid_hacks="$setuid_hacks_default"
15582 fi
15583
15584
15585
15586    case "$setuid_hacks" in
15587     yes) ;;
15588     no)  ;;
15589
15590     /*)
15591      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks headers" >&5
15592 $as_echo_n "checking for setuid hacks headers... " >&6; }
15593      d=$setuid_hacks/include
15594      if test -d $d; then
15595        X_CFLAGS="-I$d $X_CFLAGS"
15596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15597 $as_echo "$d" >&6; }
15598      else
15599        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15600 $as_echo "not found ($d: no such directory)" >&6; }
15601      fi
15602
15603      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks libs" >&5
15604 $as_echo_n "checking for setuid hacks libs... " >&6; }
15605      d=$setuid_hacks/lib
15606      if test -d $d; then
15607        X_LIBS="-L$d $X_LIBS"
15608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15609 $as_echo "$d" >&6; }
15610      else
15611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15612 $as_echo "not found ($d: no such directory)" >&6; }
15613      fi
15614
15615      # replace the directory string with "yes".
15616      setuid_hacks_req="yes"
15617      setuid_hacks=$setuid_hacks_req
15618      ;;
15619
15620     *)
15621      echo ""
15622      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
15623      echo "       If it is a directory, then \`DIR/include' will be added to"
15624      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15625      exit 1
15626      ;;
15627    esac
15628
15629
15630 if test "$setuid_hacks" = yes; then
15631   true
15632 elif test "$setuid_hacks" != no; then
15633   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
15634   exit 1
15635 fi
15636
15637
15638 ###############################################################################
15639 #
15640 #       Check for --with-record-animation
15641 #
15642 ###############################################################################
15643
15644 record_anim_default=no
15645 record_anim="$record_anim_default"
15646
15647 # Check whether --with-record-animation was given.
15648 if test "${with_record_animation+set}" = set; then :
15649   withval=$with_record_animation; record_anim="$withval"
15650 else
15651   record_anim="$record_anim_default"
15652 fi
15653
15654
15655
15656    case "$record_anim" in
15657     yes) ;;
15658     no)  ;;
15659
15660     /*)
15661      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for record animation headers" >&5
15662 $as_echo_n "checking for record animation headers... " >&6; }
15663      d=$record_anim/include
15664      if test -d $d; then
15665        X_CFLAGS="-I$d $X_CFLAGS"
15666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15667 $as_echo "$d" >&6; }
15668      else
15669        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15670 $as_echo "not found ($d: no such directory)" >&6; }
15671      fi
15672
15673      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for record animation libs" >&5
15674 $as_echo_n "checking for record animation libs... " >&6; }
15675      d=$record_anim/lib
15676      if test -d $d; then
15677        X_LIBS="-L$d $X_LIBS"
15678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
15679 $as_echo "$d" >&6; }
15680      else
15681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
15682 $as_echo "not found ($d: no such directory)" >&6; }
15683      fi
15684
15685      # replace the directory string with "yes".
15686      record_anim_req="yes"
15687      record_anim=$record_anim_req
15688      ;;
15689
15690     *)
15691      echo ""
15692      echo "error: argument to --with-record-animation must be \"yes\", \"no\", or a directory."
15693      echo "       If it is a directory, then \`DIR/include' will be added to"
15694      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15695      exit 1
15696      ;;
15697    esac
15698
15699
15700 if test "$record_anim" = yes; then
15701   true
15702 elif test "$record_anim" != no; then
15703   echo "error: must be yes or no: --with-record-animation=$record_anim"
15704   exit 1
15705 fi
15706
15707 if test "$record_anim" = yes; then
15708   if test "$have_gdk_pixbuf" != yes; then
15709     as_fn_error $? "--with-record-animation requires GDK-Pixbuf" "$LINENO" 5
15710   else
15711     { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling --with-record-animation" >&5
15712 $as_echo "enabling --with-record-animation" >&6; }
15713     $as_echo "#define HAVE_RECORD_ANIM 1" >>confdefs.h
15714
15715     ANIM_OBJS='$(ANIM_OBJS)'
15716     ANIM_LIBS='$(ANIM_LIBS)'
15717   fi
15718 fi
15719
15720 ###############################################################################
15721 #
15722 #       Done testing.  Now, set up the various -I and -L variables,
15723 #       and decide which GUI program to build by default.
15724 #
15725 ###############################################################################
15726
15727 DEPEND=makedepend
15728 DEPEND_FLAGS=
15729 DEPEND_DEFINES=
15730
15731
15732 if test \! -z "$includedir" ; then
15733   INCLUDES="$INCLUDES -I$includedir"
15734 fi
15735
15736 if test \! -z "$libdir" ; then
15737   LDFLAGS="$LDFLAGS -L$libdir"
15738 fi
15739
15740
15741 PREFERRED_DEMO_PROGRAM=''
15742 ALL_DEMO_PROGRAMS=
15743 if test "$have_motif" = yes; then
15744   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
15745   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
15746 fi
15747 if test "$have_gtk" = yes; then
15748   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
15749   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
15750 fi
15751
15752
15753 if test "$have_kerberos" = yes; then
15754   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
15755   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
15756 fi
15757 if test "$have_pam" = yes; then
15758   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
15759   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
15760   INSTALL_PAM="install-pam"
15761 fi
15762 if test "$enable_pam_check_account_type" = yes; then
15763   COMMENT_PAM_CHECK_ACCOUNT=""
15764 else
15765   COMMENT_PAM_CHECK_ACCOUNT="#"
15766 fi
15767 if test "$have_passwd_helper" = yes; then
15768   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
15769   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
15770 fi
15771   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
15772   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
15773
15774
15775 if test "$enable_locking" = yes; then
15776   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
15777   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
15778 else
15779   LOCK_SRCS='$(NOLOCK_SRCS_1)'
15780   LOCK_OBJS='$(NOLOCK_OBJS_1)'
15781 fi
15782
15783 if test "$ac_macosx" = yes; then
15784   EXES_OSX='$(EXES_OSX)'
15785   SCRIPTS_OSX='$(SCRIPTS_OSX)'
15786   MEN_OSX='$(MEN_OSX)'
15787 else
15788   EXES_OSX=
15789   SCRIPTS_OSX=
15790   MEN_OSX=
15791 fi
15792
15793
15794 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
15795
15796 if test "$need_setuid" = yes; then
15797   NEED_SETUID=yes
15798 else
15799   NEED_SETUID=no
15800 fi
15801
15802 if test "$setuid_hacks" = yes; then
15803   SETUID_HACKS=yes
15804 else
15805   SETUID_HACKS=no
15806 fi
15807
15808 tab='   '
15809 if test "$have_gl" = yes; then
15810   GL_EXES='$(GL_EXES)'
15811   SUID_EXES='$(SUID_EXES)'
15812   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
15813   GL_UTIL_EXES='$(GL_UTIL_EXES)'
15814   GL_MEN='$(GL_MEN)'
15815   GL_KLUDGE=" "
15816 else
15817   GL_KLUDGE="-"
15818 fi
15819
15820 if test "$have_gle" = yes; then
15821   GLE_EXES='$(GLE_EXES)'
15822   GLE_KLUDGE=" "
15823 else
15824   GLE_KLUDGE="-"
15825 fi
15826
15827 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
15828  JPEG_EXES='$(JPEG_EXES)'
15829 fi
15830
15831
15832 # Another substitution in the XScreenSaver.ad.in file:
15833 #
15834 if test "$gnome_open_program" != ''; then
15835   GNOME24=''
15836   GNOME22='!    '
15837   NOGNOME='!    '
15838 elif test "$gnome_url_show_program" != ''; then
15839   GNOME24='!    '
15840   GNOME22=''
15841   NOGNOME='!    '
15842 else
15843   GNOME24='!    '
15844   GNOME22='!    '
15845   NOGNOME=''
15846 fi
15847
15848
15849 # Set PO_DATADIR to something sensible.
15850 #
15851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale directory" >&5
15852 $as_echo_n "checking for locale directory... " >&6; }
15853 if test -n "$GTK_DATADIR" ; then
15854   PO_DATADIR="$GTK_DATADIR"
15855 elif test "$have_gtk" = yes; then
15856   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15857   PO_DATADIR="$PO_DATADIR/share"
15858 fi
15859
15860 if test -z "$PO_DATADIR" ; then
15861   #
15862   # #### Total fucking kludge --
15863   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
15864   # but of course we need to expand all the nested variables to do that...
15865   #
15866   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
15867   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
15868 fi
15869
15870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PO_DATADIR/locale" >&5
15871 $as_echo "$PO_DATADIR/locale" >&6; }
15872
15873
15874 # canonicalize slashes.
15875 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
15876
15877 # gcc 3.0 likes to issue this warning for every file:
15878 #
15879 # cc1: warning: changing search order for system directory "/usr/local/include"
15880 # cc1: warning:   as it has already been specified as a non-system directory
15881 #
15882 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
15883 # Which *should* be totally redundant, and thus an ok thing to delete?
15884 #
15885 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
15886
15887
15888 ###############################################################################
15889 #
15890 #       Perform substitutions and write Makefiles.
15891 #
15892 ###############################################################################
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968 APPDEFAULTS=$ac_x_app_defaults
15969
15970
15971
15972
15973
15974
15975
15976 ac_config_files="$ac_config_files Makefile utils/Makefile jwxyz/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/Makefile driver/xscreensaver.pam driver/xscreensaver-demo.glade2 driver/XScreenSaver.ad"
15977
15978 cat >confcache <<\_ACEOF
15979 # This file is a shell script that caches the results of configure
15980 # tests run on this system so they can be shared between configure
15981 # scripts and configure runs, see configure's option --config-cache.
15982 # It is not useful on other systems.  If it contains results you don't
15983 # want to keep, you may remove or edit it.
15984 #
15985 # config.status only pays attention to the cache file if you give it
15986 # the --recheck option to rerun configure.
15987 #
15988 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15989 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15990 # following values.
15991
15992 _ACEOF
15993
15994 # The following way of writing the cache mishandles newlines in values,
15995 # but we know of no workaround that is simple, portable, and efficient.
15996 # So, we kill variables containing newlines.
15997 # Ultrix sh set writes to stderr and can't be redirected directly,
15998 # and sets the high bit in the cache file unless we assign to the vars.
15999 (
16000   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16001     eval ac_val=\$$ac_var
16002     case $ac_val in #(
16003     *${as_nl}*)
16004       case $ac_var in #(
16005       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16006 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16007       esac
16008       case $ac_var in #(
16009       _ | IFS | as_nl) ;; #(
16010       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16011       *) { eval $ac_var=; unset $ac_var;} ;;
16012       esac ;;
16013     esac
16014   done
16015
16016   (set) 2>&1 |
16017     case $as_nl`(ac_space=' '; set) 2>&1` in #(
16018     *${as_nl}ac_space=\ *)
16019       # `set' does not quote correctly, so add quotes: double-quote
16020       # substitution turns \\\\ into \\, and sed turns \\ into \.
16021       sed -n \
16022         "s/'/'\\\\''/g;
16023           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16024       ;; #(
16025     *)
16026       # `set' quotes correctly as required by POSIX, so do not add quotes.
16027       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16028       ;;
16029     esac |
16030     sort
16031 ) |
16032   sed '
16033      /^ac_cv_env_/b end
16034      t clear
16035      :clear
16036      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16037      t end
16038      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16039      :end' >>confcache
16040 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16041   if test -w "$cache_file"; then
16042     if test "x$cache_file" != "x/dev/null"; then
16043       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16044 $as_echo "$as_me: updating cache $cache_file" >&6;}
16045       if test ! -f "$cache_file" || test -h "$cache_file"; then
16046         cat confcache >"$cache_file"
16047       else
16048         case $cache_file in #(
16049         */* | ?:*)
16050           mv -f confcache "$cache_file"$$ &&
16051           mv -f "$cache_file"$$ "$cache_file" ;; #(
16052         *)
16053           mv -f confcache "$cache_file" ;;
16054         esac
16055       fi
16056     fi
16057   else
16058     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16059 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16060   fi
16061 fi
16062 rm -f confcache
16063
16064 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16065 # Let make expand exec_prefix.
16066 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16067
16068 DEFS=-DHAVE_CONFIG_H
16069
16070 ac_libobjs=
16071 ac_ltlibobjs=
16072 U=
16073 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16074   # 1. Remove the extension, and $U if already installed.
16075   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16076   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16077   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
16078   #    will be set to the directory where LIBOBJS objects are built.
16079   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16080   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16081 done
16082 LIBOBJS=$ac_libobjs
16083
16084 LTLIBOBJS=$ac_ltlibobjs
16085
16086
16087
16088   ac_config_commands="$ac_config_commands po/stamp-it"
16089
16090
16091
16092 : "${CONFIG_STATUS=./config.status}"
16093 ac_write_fail=0
16094 ac_clean_files_save=$ac_clean_files
16095 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16096 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16097 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16098 as_write_fail=0
16099 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16100 #! $SHELL
16101 # Generated by $as_me.
16102 # Run this file to recreate the current configuration.
16103 # Compiler output produced by configure, useful for debugging
16104 # configure, is in config.log if it exists.
16105
16106 debug=false
16107 ac_cs_recheck=false
16108 ac_cs_silent=false
16109
16110 SHELL=\${CONFIG_SHELL-$SHELL}
16111 export SHELL
16112 _ASEOF
16113 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16114 ## -------------------- ##
16115 ## M4sh Initialization. ##
16116 ## -------------------- ##
16117
16118 # Be more Bourne compatible
16119 DUALCASE=1; export DUALCASE # for MKS sh
16120 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16121   emulate sh
16122   NULLCMD=:
16123   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16124   # is contrary to our usage.  Disable this feature.
16125   alias -g '${1+"$@"}'='"$@"'
16126   setopt NO_GLOB_SUBST
16127 else
16128   case `(set -o) 2>/dev/null` in #(
16129   *posix*) :
16130     set -o posix ;; #(
16131   *) :
16132      ;;
16133 esac
16134 fi
16135
16136
16137 as_nl='
16138 '
16139 export as_nl
16140 # Printing a long string crashes Solaris 7 /usr/bin/printf.
16141 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16142 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16143 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16144 # Prefer a ksh shell builtin over an external printf program on Solaris,
16145 # but without wasting forks for bash or zsh.
16146 if test -z "$BASH_VERSION$ZSH_VERSION" \
16147     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16148   as_echo='print -r --'
16149   as_echo_n='print -rn --'
16150 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16151   as_echo='printf %s\n'
16152   as_echo_n='printf %s'
16153 else
16154   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16155     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16156     as_echo_n='/usr/ucb/echo -n'
16157   else
16158     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16159     as_echo_n_body='eval
16160       arg=$1;
16161       case $arg in #(
16162       *"$as_nl"*)
16163         expr "X$arg" : "X\\(.*\\)$as_nl";
16164         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16165       esac;
16166       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16167     '
16168     export as_echo_n_body
16169     as_echo_n='sh -c $as_echo_n_body as_echo'
16170   fi
16171   export as_echo_body
16172   as_echo='sh -c $as_echo_body as_echo'
16173 fi
16174
16175 # The user is always right.
16176 if test "${PATH_SEPARATOR+set}" != set; then
16177   PATH_SEPARATOR=:
16178   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16179     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16180       PATH_SEPARATOR=';'
16181   }
16182 fi
16183
16184
16185 # IFS
16186 # We need space, tab and new line, in precisely that order.  Quoting is
16187 # there to prevent editors from complaining about space-tab.
16188 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
16189 # splitting by setting IFS to empty value.)
16190 IFS=" ""        $as_nl"
16191
16192 # Find who we are.  Look in the path if we contain no directory separator.
16193 as_myself=
16194 case $0 in #((
16195   *[\\/]* ) as_myself=$0 ;;
16196   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16197 for as_dir in $PATH
16198 do
16199   IFS=$as_save_IFS
16200   test -z "$as_dir" && as_dir=.
16201     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16202   done
16203 IFS=$as_save_IFS
16204
16205      ;;
16206 esac
16207 # We did not find ourselves, most probably we were run as `sh COMMAND'
16208 # in which case we are not to be found in the path.
16209 if test "x$as_myself" = x; then
16210   as_myself=$0
16211 fi
16212 if test ! -f "$as_myself"; then
16213   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16214   exit 1
16215 fi
16216
16217 # Unset variables that we do not need and which cause bugs (e.g. in
16218 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
16219 # suppresses any "Segmentation fault" message there.  '((' could
16220 # trigger a bug in pdksh 5.2.14.
16221 for as_var in BASH_ENV ENV MAIL MAILPATH
16222 do eval test x\${$as_var+set} = xset \
16223   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16224 done
16225 PS1='$ '
16226 PS2='> '
16227 PS4='+ '
16228
16229 # NLS nuisances.
16230 LC_ALL=C
16231 export LC_ALL
16232 LANGUAGE=C
16233 export LANGUAGE
16234
16235 # CDPATH.
16236 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16237
16238
16239 # as_fn_error STATUS ERROR [LINENO LOG_FD]
16240 # ----------------------------------------
16241 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16242 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16243 # script with STATUS, using 1 if that was 0.
16244 as_fn_error ()
16245 {
16246   as_status=$1; test $as_status -eq 0 && as_status=1
16247   if test "$4"; then
16248     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16249     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16250   fi
16251   $as_echo "$as_me: error: $2" >&2
16252   as_fn_exit $as_status
16253 } # as_fn_error
16254
16255
16256 # as_fn_set_status STATUS
16257 # -----------------------
16258 # Set $? to STATUS, without forking.
16259 as_fn_set_status ()
16260 {
16261   return $1
16262 } # as_fn_set_status
16263
16264 # as_fn_exit STATUS
16265 # -----------------
16266 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16267 as_fn_exit ()
16268 {
16269   set +e
16270   as_fn_set_status $1
16271   exit $1
16272 } # as_fn_exit
16273
16274 # as_fn_unset VAR
16275 # ---------------
16276 # Portably unset VAR.
16277 as_fn_unset ()
16278 {
16279   { eval $1=; unset $1;}
16280 }
16281 as_unset=as_fn_unset
16282 # as_fn_append VAR VALUE
16283 # ----------------------
16284 # Append the text in VALUE to the end of the definition contained in VAR. Take
16285 # advantage of any shell optimizations that allow amortized linear growth over
16286 # repeated appends, instead of the typical quadratic growth present in naive
16287 # implementations.
16288 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16289   eval 'as_fn_append ()
16290   {
16291     eval $1+=\$2
16292   }'
16293 else
16294   as_fn_append ()
16295   {
16296     eval $1=\$$1\$2
16297   }
16298 fi # as_fn_append
16299
16300 # as_fn_arith ARG...
16301 # ------------------
16302 # Perform arithmetic evaluation on the ARGs, and store the result in the
16303 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16304 # must be portable across $(()) and expr.
16305 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16306   eval 'as_fn_arith ()
16307   {
16308     as_val=$(( $* ))
16309   }'
16310 else
16311   as_fn_arith ()
16312   {
16313     as_val=`expr "$@" || test $? -eq 1`
16314   }
16315 fi # as_fn_arith
16316
16317
16318 if expr a : '\(a\)' >/dev/null 2>&1 &&
16319    test "X`expr 00001 : '.*\(...\)'`" = X001; then
16320   as_expr=expr
16321 else
16322   as_expr=false
16323 fi
16324
16325 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16326   as_basename=basename
16327 else
16328   as_basename=false
16329 fi
16330
16331 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16332   as_dirname=dirname
16333 else
16334   as_dirname=false
16335 fi
16336
16337 as_me=`$as_basename -- "$0" ||
16338 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16339          X"$0" : 'X\(//\)$' \| \
16340          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16341 $as_echo X/"$0" |
16342     sed '/^.*\/\([^/][^/]*\)\/*$/{
16343             s//\1/
16344             q
16345           }
16346           /^X\/\(\/\/\)$/{
16347             s//\1/
16348             q
16349           }
16350           /^X\/\(\/\).*/{
16351             s//\1/
16352             q
16353           }
16354           s/.*/./; q'`
16355
16356 # Avoid depending upon Character Ranges.
16357 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16358 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16359 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16360 as_cr_digits='0123456789'
16361 as_cr_alnum=$as_cr_Letters$as_cr_digits
16362
16363 ECHO_C= ECHO_N= ECHO_T=
16364 case `echo -n x` in #(((((
16365 -n*)
16366   case `echo 'xy\c'` in
16367   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
16368   xy)  ECHO_C='\c';;
16369   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
16370        ECHO_T=' ';;
16371   esac;;
16372 *)
16373   ECHO_N='-n';;
16374 esac
16375
16376 rm -f conf$$ conf$$.exe conf$$.file
16377 if test -d conf$$.dir; then
16378   rm -f conf$$.dir/conf$$.file
16379 else
16380   rm -f conf$$.dir
16381   mkdir conf$$.dir 2>/dev/null
16382 fi
16383 if (echo >conf$$.file) 2>/dev/null; then
16384   if ln -s conf$$.file conf$$ 2>/dev/null; then
16385     as_ln_s='ln -s'
16386     # ... but there are two gotchas:
16387     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16388     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16389     # In both cases, we have to default to `cp -pR'.
16390     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16391       as_ln_s='cp -pR'
16392   elif ln conf$$.file conf$$ 2>/dev/null; then
16393     as_ln_s=ln
16394   else
16395     as_ln_s='cp -pR'
16396   fi
16397 else
16398   as_ln_s='cp -pR'
16399 fi
16400 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16401 rmdir conf$$.dir 2>/dev/null
16402
16403
16404 # as_fn_mkdir_p
16405 # -------------
16406 # Create "$as_dir" as a directory, including parents if necessary.
16407 as_fn_mkdir_p ()
16408 {
16409
16410   case $as_dir in #(
16411   -*) as_dir=./$as_dir;;
16412   esac
16413   test -d "$as_dir" || eval $as_mkdir_p || {
16414     as_dirs=
16415     while :; do
16416       case $as_dir in #(
16417       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16418       *) as_qdir=$as_dir;;
16419       esac
16420       as_dirs="'$as_qdir' $as_dirs"
16421       as_dir=`$as_dirname -- "$as_dir" ||
16422 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16423          X"$as_dir" : 'X\(//\)[^/]' \| \
16424          X"$as_dir" : 'X\(//\)$' \| \
16425          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16426 $as_echo X"$as_dir" |
16427     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16428             s//\1/
16429             q
16430           }
16431           /^X\(\/\/\)[^/].*/{
16432             s//\1/
16433             q
16434           }
16435           /^X\(\/\/\)$/{
16436             s//\1/
16437             q
16438           }
16439           /^X\(\/\).*/{
16440             s//\1/
16441             q
16442           }
16443           s/.*/./; q'`
16444       test -d "$as_dir" && break
16445     done
16446     test -z "$as_dirs" || eval "mkdir $as_dirs"
16447   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16448
16449
16450 } # as_fn_mkdir_p
16451 if mkdir -p . 2>/dev/null; then
16452   as_mkdir_p='mkdir -p "$as_dir"'
16453 else
16454   test -d ./-p && rmdir ./-p
16455   as_mkdir_p=false
16456 fi
16457
16458
16459 # as_fn_executable_p FILE
16460 # -----------------------
16461 # Test if FILE is an executable regular file.
16462 as_fn_executable_p ()
16463 {
16464   test -f "$1" && test -x "$1"
16465 } # as_fn_executable_p
16466 as_test_x='test -x'
16467 as_executable_p=as_fn_executable_p
16468
16469 # Sed expression to map a string onto a valid CPP name.
16470 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16471
16472 # Sed expression to map a string onto a valid variable name.
16473 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16474
16475
16476 exec 6>&1
16477 ## ----------------------------------- ##
16478 ## Main body of $CONFIG_STATUS script. ##
16479 ## ----------------------------------- ##
16480 _ASEOF
16481 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16482
16483 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16484 # Save the log message, to keep $0 and so on meaningful, and to
16485 # report actual input values of CONFIG_FILES etc. instead of their
16486 # values after options handling.
16487 ac_log="
16488 This file was extended by $as_me, which was
16489 generated by GNU Autoconf 2.69.  Invocation command line was
16490
16491   CONFIG_FILES    = $CONFIG_FILES
16492   CONFIG_HEADERS  = $CONFIG_HEADERS
16493   CONFIG_LINKS    = $CONFIG_LINKS
16494   CONFIG_COMMANDS = $CONFIG_COMMANDS
16495   $ $0 $@
16496
16497 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16498 "
16499
16500 _ACEOF
16501
16502 case $ac_config_files in *"
16503 "*) set x $ac_config_files; shift; ac_config_files=$*;;
16504 esac
16505
16506 case $ac_config_headers in *"
16507 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16508 esac
16509
16510
16511 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16512 # Files that config.status was made for.
16513 config_files="$ac_config_files"
16514 config_headers="$ac_config_headers"
16515 config_commands="$ac_config_commands"
16516
16517 _ACEOF
16518
16519 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16520 ac_cs_usage="\
16521 \`$as_me' instantiates files and other configuration actions
16522 from templates according to the current configuration.  Unless the files
16523 and actions are specified as TAGs, all are instantiated by default.
16524
16525 Usage: $0 [OPTION]... [TAG]...
16526
16527   -h, --help       print this help, then exit
16528   -V, --version    print version number and configuration settings, then exit
16529       --config     print configuration, then exit
16530   -q, --quiet, --silent
16531                    do not print progress messages
16532   -d, --debug      don't remove temporary files
16533       --recheck    update $as_me by reconfiguring in the same conditions
16534       --file=FILE[:TEMPLATE]
16535                    instantiate the configuration file FILE
16536       --header=FILE[:TEMPLATE]
16537                    instantiate the configuration header FILE
16538
16539 Configuration files:
16540 $config_files
16541
16542 Configuration headers:
16543 $config_headers
16544
16545 Configuration commands:
16546 $config_commands
16547
16548 Report bugs to the package provider."
16549
16550 _ACEOF
16551 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16552 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16553 ac_cs_version="\\
16554 config.status
16555 configured by $0, generated by GNU Autoconf 2.69,
16556   with options \\"\$ac_cs_config\\"
16557
16558 Copyright (C) 2012 Free Software Foundation, Inc.
16559 This config.status script is free software; the Free Software Foundation
16560 gives unlimited permission to copy, distribute and modify it."
16561
16562 ac_pwd='$ac_pwd'
16563 srcdir='$srcdir'
16564 INSTALL='$INSTALL'
16565 test -n "\$AWK" || AWK=awk
16566 _ACEOF
16567
16568 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16569 # The default lists apply if the user does not specify any file.
16570 ac_need_defaults=:
16571 while test $# != 0
16572 do
16573   case $1 in
16574   --*=?*)
16575     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16576     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16577     ac_shift=:
16578     ;;
16579   --*=)
16580     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16581     ac_optarg=
16582     ac_shift=:
16583     ;;
16584   *)
16585     ac_option=$1
16586     ac_optarg=$2
16587     ac_shift=shift
16588     ;;
16589   esac
16590
16591   case $ac_option in
16592   # Handling of the options.
16593   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16594     ac_cs_recheck=: ;;
16595   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16596     $as_echo "$ac_cs_version"; exit ;;
16597   --config | --confi | --conf | --con | --co | --c )
16598     $as_echo "$ac_cs_config"; exit ;;
16599   --debug | --debu | --deb | --de | --d | -d )
16600     debug=: ;;
16601   --file | --fil | --fi | --f )
16602     $ac_shift
16603     case $ac_optarg in
16604     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16605     '') as_fn_error $? "missing file argument" ;;
16606     esac
16607     as_fn_append CONFIG_FILES " '$ac_optarg'"
16608     ac_need_defaults=false;;
16609   --header | --heade | --head | --hea )
16610     $ac_shift
16611     case $ac_optarg in
16612     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16613     esac
16614     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16615     ac_need_defaults=false;;
16616   --he | --h)
16617     # Conflict between --help and --header
16618     as_fn_error $? "ambiguous option: \`$1'
16619 Try \`$0 --help' for more information.";;
16620   --help | --hel | -h )
16621     $as_echo "$ac_cs_usage"; exit ;;
16622   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16623   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16624     ac_cs_silent=: ;;
16625
16626   # This is an error.
16627   -*) as_fn_error $? "unrecognized option: \`$1'
16628 Try \`$0 --help' for more information." ;;
16629
16630   *) as_fn_append ac_config_targets " $1"
16631      ac_need_defaults=false ;;
16632
16633   esac
16634   shift
16635 done
16636
16637 ac_configure_extra_args=
16638
16639 if $ac_cs_silent; then
16640   exec 6>/dev/null
16641   ac_configure_extra_args="$ac_configure_extra_args --silent"
16642 fi
16643
16644 _ACEOF
16645 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16646 if \$ac_cs_recheck; then
16647   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16648   shift
16649   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16650   CONFIG_SHELL='$SHELL'
16651   export CONFIG_SHELL
16652   exec "\$@"
16653 fi
16654
16655 _ACEOF
16656 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16657 exec 5>>config.log
16658 {
16659   echo
16660   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16661 ## Running $as_me. ##
16662 _ASBOX
16663   $as_echo "$ac_log"
16664 } >&5
16665
16666 _ACEOF
16667 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16668 #
16669 # INIT-COMMANDS
16670 #
16671
16672
16673 _ACEOF
16674
16675 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16676
16677 # Handling of arguments.
16678 for ac_config_target in $ac_config_targets
16679 do
16680   case $ac_config_target in
16681     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
16682     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
16683     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16684     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
16685     "jwxyz/Makefile") CONFIG_FILES="$CONFIG_FILES jwxyz/Makefile" ;;
16686     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
16687     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
16688     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
16689     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
16690     "driver/xscreensaver.pam") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.pam" ;;
16691     "driver/xscreensaver-demo.glade2") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver-demo.glade2" ;;
16692     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
16693     "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
16694
16695   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16696   esac
16697 done
16698
16699
16700 # If the user did not use the arguments to specify the items to instantiate,
16701 # then the envvar interface is used.  Set only those that are not.
16702 # We use the long form for the default assignment because of an extremely
16703 # bizarre bug on SunOS 4.1.3.
16704 if $ac_need_defaults; then
16705   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16706   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16707   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16708 fi
16709
16710 # Have a temporary directory for convenience.  Make it in the build tree
16711 # simply because there is no reason against having it here, and in addition,
16712 # creating and moving files from /tmp can sometimes cause problems.
16713 # Hook for its removal unless debugging.
16714 # Note that there is a small window in which the directory will not be cleaned:
16715 # after its creation but before its name has been assigned to `$tmp'.
16716 $debug ||
16717 {
16718   tmp= ac_tmp=
16719   trap 'exit_status=$?
16720   : "${ac_tmp:=$tmp}"
16721   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16722 ' 0
16723   trap 'as_fn_exit 1' 1 2 13 15
16724 }
16725 # Create a (secure) tmp directory for tmp files.
16726
16727 {
16728   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16729   test -d "$tmp"
16730 }  ||
16731 {
16732   tmp=./conf$$-$RANDOM
16733   (umask 077 && mkdir "$tmp")
16734 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16735 ac_tmp=$tmp
16736
16737 # Set up the scripts for CONFIG_FILES section.
16738 # No need to generate them if there are no CONFIG_FILES.
16739 # This happens for instance with `./config.status config.h'.
16740 if test -n "$CONFIG_FILES"; then
16741
16742
16743 ac_cr=`echo X | tr X '\015'`
16744 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16745 # But we know of no other shell where ac_cr would be empty at this
16746 # point, so we can use a bashism as a fallback.
16747 if test "x$ac_cr" = x; then
16748   eval ac_cr=\$\'\\r\'
16749 fi
16750 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16751 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16752   ac_cs_awk_cr='\\r'
16753 else
16754   ac_cs_awk_cr=$ac_cr
16755 fi
16756
16757 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16758 _ACEOF
16759
16760
16761 {
16762   echo "cat >conf$$subs.awk <<_ACEOF" &&
16763   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16764   echo "_ACEOF"
16765 } >conf$$subs.sh ||
16766   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16767 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16768 ac_delim='%!_!# '
16769 for ac_last_try in false false false false false :; do
16770   . ./conf$$subs.sh ||
16771     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16772
16773   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16774   if test $ac_delim_n = $ac_delim_num; then
16775     break
16776   elif $ac_last_try; then
16777     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16778   else
16779     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16780   fi
16781 done
16782 rm -f conf$$subs.sh
16783
16784 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16785 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16786 _ACEOF
16787 sed -n '
16788 h
16789 s/^/S["/; s/!.*/"]=/
16790 p
16791 g
16792 s/^[^!]*!//
16793 :repl
16794 t repl
16795 s/'"$ac_delim"'$//
16796 t delim
16797 :nl
16798 h
16799 s/\(.\{148\}\)..*/\1/
16800 t more1
16801 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16802 p
16803 n
16804 b repl
16805 :more1
16806 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16807 p
16808 g
16809 s/.\{148\}//
16810 t nl
16811 :delim
16812 h
16813 s/\(.\{148\}\)..*/\1/
16814 t more2
16815 s/["\\]/\\&/g; s/^/"/; s/$/"/
16816 p
16817 b
16818 :more2
16819 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16820 p
16821 g
16822 s/.\{148\}//
16823 t delim
16824 ' <conf$$subs.awk | sed '
16825 /^[^""]/{
16826   N
16827   s/\n//
16828 }
16829 ' >>$CONFIG_STATUS || ac_write_fail=1
16830 rm -f conf$$subs.awk
16831 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16832 _ACAWK
16833 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16834   for (key in S) S_is_set[key] = 1
16835   FS = "\a"
16836
16837 }
16838 {
16839   line = $ 0
16840   nfields = split(line, field, "@")
16841   substed = 0
16842   len = length(field[1])
16843   for (i = 2; i < nfields; i++) {
16844     key = field[i]
16845     keylen = length(key)
16846     if (S_is_set[key]) {
16847       value = S[key]
16848       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16849       len += length(value) + length(field[++i])
16850       substed = 1
16851     } else
16852       len += 1 + keylen
16853   }
16854
16855   print line
16856 }
16857
16858 _ACAWK
16859 _ACEOF
16860 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16861 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16862   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16863 else
16864   cat
16865 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16866   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16867 _ACEOF
16868
16869 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16870 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16871 # trailing colons and then remove the whole line if VPATH becomes empty
16872 # (actually we leave an empty line to preserve line numbers).
16873 if test "x$srcdir" = x.; then
16874   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16875 h
16876 s///
16877 s/^/:/
16878 s/[      ]*$/:/
16879 s/:\$(srcdir):/:/g
16880 s/:\${srcdir}:/:/g
16881 s/:@srcdir@:/:/g
16882 s/^:*//
16883 s/:*$//
16884 x
16885 s/\(=[   ]*\).*/\1/
16886 G
16887 s/\n//
16888 s/^[^=]*=[       ]*$//
16889 }'
16890 fi
16891
16892 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16893 fi # test -n "$CONFIG_FILES"
16894
16895 # Set up the scripts for CONFIG_HEADERS section.
16896 # No need to generate them if there are no CONFIG_HEADERS.
16897 # This happens for instance with `./config.status Makefile'.
16898 if test -n "$CONFIG_HEADERS"; then
16899 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16900 BEGIN {
16901 _ACEOF
16902
16903 # Transform confdefs.h into an awk script `defines.awk', embedded as
16904 # here-document in config.status, that substitutes the proper values into
16905 # config.h.in to produce config.h.
16906
16907 # Create a delimiter string that does not exist in confdefs.h, to ease
16908 # handling of long lines.
16909 ac_delim='%!_!# '
16910 for ac_last_try in false false :; do
16911   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16912   if test -z "$ac_tt"; then
16913     break
16914   elif $ac_last_try; then
16915     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16916   else
16917     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16918   fi
16919 done
16920
16921 # For the awk script, D is an array of macro values keyed by name,
16922 # likewise P contains macro parameters if any.  Preserve backslash
16923 # newline sequences.
16924
16925 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16926 sed -n '
16927 s/.\{148\}/&'"$ac_delim"'/g
16928 t rset
16929 :rset
16930 s/^[     ]*#[    ]*define[       ][      ]*/ /
16931 t def
16932 d
16933 :def
16934 s/\\$//
16935 t bsnl
16936 s/["\\]/\\&/g
16937 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16938 D["\1"]=" \3"/p
16939 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16940 d
16941 :bsnl
16942 s/["\\]/\\&/g
16943 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16944 D["\1"]=" \3\\\\\\n"\\/p
16945 t cont
16946 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16947 t cont
16948 d
16949 :cont
16950 n
16951 s/.\{148\}/&'"$ac_delim"'/g
16952 t clear
16953 :clear
16954 s/\\$//
16955 t bsnlc
16956 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16957 d
16958 :bsnlc
16959 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16960 b cont
16961 ' <confdefs.h | sed '
16962 s/'"$ac_delim"'/"\\\
16963 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16964
16965 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16966   for (key in D) D_is_set[key] = 1
16967   FS = "\a"
16968 }
16969 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16970   line = \$ 0
16971   split(line, arg, " ")
16972   if (arg[1] == "#") {
16973     defundef = arg[2]
16974     mac1 = arg[3]
16975   } else {
16976     defundef = substr(arg[1], 2)
16977     mac1 = arg[2]
16978   }
16979   split(mac1, mac2, "(") #)
16980   macro = mac2[1]
16981   prefix = substr(line, 1, index(line, defundef) - 1)
16982   if (D_is_set[macro]) {
16983     # Preserve the white space surrounding the "#".
16984     print prefix "define", macro P[macro] D[macro]
16985     next
16986   } else {
16987     # Replace #undef with comments.  This is necessary, for example,
16988     # in the case of _POSIX_SOURCE, which is predefined and required
16989     # on some systems where configure will not decide to define it.
16990     if (defundef == "undef") {
16991       print "/*", prefix defundef, macro, "*/"
16992       next
16993     }
16994   }
16995 }
16996 { print }
16997 _ACAWK
16998 _ACEOF
16999 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17000   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17001 fi # test -n "$CONFIG_HEADERS"
17002
17003
17004 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
17005 shift
17006 for ac_tag
17007 do
17008   case $ac_tag in
17009   :[FHLC]) ac_mode=$ac_tag; continue;;
17010   esac
17011   case $ac_mode$ac_tag in
17012   :[FHL]*:*);;
17013   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17014   :[FH]-) ac_tag=-:-;;
17015   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17016   esac
17017   ac_save_IFS=$IFS
17018   IFS=:
17019   set x $ac_tag
17020   IFS=$ac_save_IFS
17021   shift
17022   ac_file=$1
17023   shift
17024
17025   case $ac_mode in
17026   :L) ac_source=$1;;
17027   :[FH])
17028     ac_file_inputs=
17029     for ac_f
17030     do
17031       case $ac_f in
17032       -) ac_f="$ac_tmp/stdin";;
17033       *) # Look for the file first in the build tree, then in the source tree
17034          # (if the path is not absolute).  The absolute path cannot be DOS-style,
17035          # because $ac_f cannot contain `:'.
17036          test -f "$ac_f" ||
17037            case $ac_f in
17038            [\\/$]*) false;;
17039            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17040            esac ||
17041            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17042       esac
17043       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17044       as_fn_append ac_file_inputs " '$ac_f'"
17045     done
17046
17047     # Let's still pretend it is `configure' which instantiates (i.e., don't
17048     # use $as_me), people would be surprised to read:
17049     #    /* config.h.  Generated by config.status.  */
17050     configure_input='Generated from '`
17051           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17052         `' by configure.'
17053     if test x"$ac_file" != x-; then
17054       configure_input="$ac_file.  $configure_input"
17055       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17056 $as_echo "$as_me: creating $ac_file" >&6;}
17057     fi
17058     # Neutralize special characters interpreted by sed in replacement strings.
17059     case $configure_input in #(
17060     *\&* | *\|* | *\\* )
17061        ac_sed_conf_input=`$as_echo "$configure_input" |
17062        sed 's/[\\\\&|]/\\\\&/g'`;; #(
17063     *) ac_sed_conf_input=$configure_input;;
17064     esac
17065
17066     case $ac_tag in
17067     *:-:* | *:-) cat >"$ac_tmp/stdin" \
17068       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17069     esac
17070     ;;
17071   esac
17072
17073   ac_dir=`$as_dirname -- "$ac_file" ||
17074 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17075          X"$ac_file" : 'X\(//\)[^/]' \| \
17076          X"$ac_file" : 'X\(//\)$' \| \
17077          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17078 $as_echo X"$ac_file" |
17079     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17080             s//\1/
17081             q
17082           }
17083           /^X\(\/\/\)[^/].*/{
17084             s//\1/
17085             q
17086           }
17087           /^X\(\/\/\)$/{
17088             s//\1/
17089             q
17090           }
17091           /^X\(\/\).*/{
17092             s//\1/
17093             q
17094           }
17095           s/.*/./; q'`
17096   as_dir="$ac_dir"; as_fn_mkdir_p
17097   ac_builddir=.
17098
17099 case "$ac_dir" in
17100 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17101 *)
17102   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17103   # A ".." for each directory in $ac_dir_suffix.
17104   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17105   case $ac_top_builddir_sub in
17106   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17107   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17108   esac ;;
17109 esac
17110 ac_abs_top_builddir=$ac_pwd
17111 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17112 # for backward compatibility:
17113 ac_top_builddir=$ac_top_build_prefix
17114
17115 case $srcdir in
17116   .)  # We are building in place.
17117     ac_srcdir=.
17118     ac_top_srcdir=$ac_top_builddir_sub
17119     ac_abs_top_srcdir=$ac_pwd ;;
17120   [\\/]* | ?:[\\/]* )  # Absolute name.
17121     ac_srcdir=$srcdir$ac_dir_suffix;
17122     ac_top_srcdir=$srcdir
17123     ac_abs_top_srcdir=$srcdir ;;
17124   *) # Relative name.
17125     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17126     ac_top_srcdir=$ac_top_build_prefix$srcdir
17127     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17128 esac
17129 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17130
17131
17132   case $ac_mode in
17133   :F)
17134   #
17135   # CONFIG_FILE
17136   #
17137
17138   case $INSTALL in
17139   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17140   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17141   esac
17142 _ACEOF
17143
17144 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17145 # If the template does not know about datarootdir, expand it.
17146 # FIXME: This hack should be removed a few years after 2.60.
17147 ac_datarootdir_hack=; ac_datarootdir_seen=
17148 ac_sed_dataroot='
17149 /datarootdir/ {
17150   p
17151   q
17152 }
17153 /@datadir@/p
17154 /@docdir@/p
17155 /@infodir@/p
17156 /@localedir@/p
17157 /@mandir@/p'
17158 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17159 *datarootdir*) ac_datarootdir_seen=yes;;
17160 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17161   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17162 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17163 _ACEOF
17164 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17165   ac_datarootdir_hack='
17166   s&@datadir@&$datadir&g
17167   s&@docdir@&$docdir&g
17168   s&@infodir@&$infodir&g
17169   s&@localedir@&$localedir&g
17170   s&@mandir@&$mandir&g
17171   s&\\\${datarootdir}&$datarootdir&g' ;;
17172 esac
17173 _ACEOF
17174
17175 # Neutralize VPATH when `$srcdir' = `.'.
17176 # Shell code in configure.ac might set extrasub.
17177 # FIXME: do we really want to maintain this feature?
17178 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17179 ac_sed_extra="$ac_vpsub
17180 $extrasub
17181 _ACEOF
17182 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17183 :t
17184 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17185 s|@configure_input@|$ac_sed_conf_input|;t t
17186 s&@top_builddir@&$ac_top_builddir_sub&;t t
17187 s&@top_build_prefix@&$ac_top_build_prefix&;t t
17188 s&@srcdir@&$ac_srcdir&;t t
17189 s&@abs_srcdir@&$ac_abs_srcdir&;t t
17190 s&@top_srcdir@&$ac_top_srcdir&;t t
17191 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17192 s&@builddir@&$ac_builddir&;t t
17193 s&@abs_builddir@&$ac_abs_builddir&;t t
17194 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17195 s&@INSTALL@&$ac_INSTALL&;t t
17196 $ac_datarootdir_hack
17197 "
17198 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17199   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17200
17201 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17202   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17203   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
17204       "$ac_tmp/out"`; test -z "$ac_out"; } &&
17205   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17206 which seems to be undefined.  Please make sure it is defined" >&5
17207 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17208 which seems to be undefined.  Please make sure it is defined" >&2;}
17209
17210   rm -f "$ac_tmp/stdin"
17211   case $ac_file in
17212   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17213   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
17214   esac \
17215   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17216  ;;
17217   :H)
17218   #
17219   # CONFIG_HEADER
17220   #
17221   if test x"$ac_file" != x-; then
17222     {
17223       $as_echo "/* $configure_input  */" \
17224       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17225     } >"$ac_tmp/config.h" \
17226       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17227     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17228       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17229 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17230     else
17231       rm -f "$ac_file"
17232       mv "$ac_tmp/config.h" "$ac_file" \
17233         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17234     fi
17235   else
17236     $as_echo "/* $configure_input  */" \
17237       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17238       || as_fn_error $? "could not create -" "$LINENO" 5
17239   fi
17240  ;;
17241
17242   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17243 $as_echo "$as_me: executing $ac_file commands" >&6;}
17244  ;;
17245   esac
17246
17247
17248   case $ac_file$ac_mode in
17249     "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
17250         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
17251       esac ;;
17252     "po/stamp-it":C)
17253     if  ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
17254        as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5
17255     fi
17256     rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
17257     >"po/stamp-it.tmp"
17258     sed '/^#/d
17259          s/^[[].*] *//
17260          /^[    ]*$/d
17261         '"s|^|  $ac_top_srcdir/|" \
17262       "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
17263
17264     sed '/^POTFILES =/,/[^\\]$/ {
17265                 /^POTFILES =/!d
17266                 r po/POTFILES
17267           }
17268          ' "po/Makefile.in" >"po/Makefile"
17269     rm -f "po/Makefile.tmp"
17270     mv "po/stamp-it.tmp" "po/stamp-it"
17271    ;;
17272
17273   esac
17274 done # for ac_tag
17275
17276
17277 as_fn_exit 0
17278 _ACEOF
17279 ac_clean_files=$ac_clean_files_save
17280
17281 test $ac_write_fail = 0 ||
17282   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17283
17284
17285 # configure is writing to config.log, and then calls config.status.
17286 # config.status does its own redirection, appending to config.log.
17287 # Unfortunately, on DOS this fails, as config.log is still kept open
17288 # by configure, so config.status won't be able to write to it; its
17289 # output is simply discarded.  So we exec the FD to /dev/null,
17290 # effectively closing config.log, so it can be properly (re)opened and
17291 # appended to by config.status.  When coming back to configure, we
17292 # need to make the FD available again.
17293 if test "$no_create" != yes; then
17294   ac_cs_success=:
17295   ac_config_status_args=
17296   test "$silent" = yes &&
17297     ac_config_status_args="$ac_config_status_args --quiet"
17298   exec 5>/dev/null
17299   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17300   exec 5>>config.log
17301   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17302   # would make configure fail if this is the last instruction.
17303   $ac_cs_success || as_fn_exit 1
17304 fi
17305 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17306   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17307 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17308 fi
17309
17310
17311 ###############################################################################
17312 #
17313 #       Print some warnings at the end.
17314 #
17315 ###############################################################################
17316
17317 warn_prefix_1="    Warning:"
17318 warn_prefix_2="       Note:"
17319 warn_prefix="$warn_prefix_1"
17320
17321 warning=no
17322 warnsep='    #################################################################'
17323
17324 warnpre() {
17325   if test "$warning" = no ; then
17326     echo '' ; echo "$warnsep" ; echo ''
17327     warning=yes
17328   fi
17329 }
17330
17331 warn() {
17332   warnpre
17333   if test "$warning" = long ; then echo '' ; fi
17334   warning=yes
17335   rest="$@"
17336   echo "$warn_prefix $rest"
17337 }
17338
17339 warnL() {
17340   was=$warning
17341   warnpre
17342   warning=yes
17343   if test "$was" != no ; then echo '' ; fi
17344   rest="$@"
17345   echo "$warn_prefix $rest"
17346 }
17347
17348 warn2() {
17349   rest="$@"
17350   echo "             $rest"
17351   warning=long
17352 }
17353
17354 note() {
17355   warn_prefix="$warn_prefix_2"
17356   warn $@
17357   warn_prefix="$warn_prefix_1"
17358 }
17359
17360 noteL() {
17361   warn_prefix="$warn_prefix_2"
17362   warnL $@
17363   warn_prefix="$warn_prefix_1"
17364 }
17365
17366
17367 # ac_prog_cc_no_pthread normally only happens on AIX, because according
17368 # to AX_PTHREAD, AIX needs CC=xlc_r or CC=cc_r to do threads.
17369 # If CC is specified, it takes precedence over --with-pthread.
17370 if test "$ac_prog_cc_no_pthread" ; then
17371   warnL "You requested $ac_original_cc for the C compiler, but it doesn't"
17372   warn2 "support POSIX threads."
17373   echo ""
17374   warn2 "If you have multiple CPU cores, try CC=$PTHREAD_CC."
17375 elif test "$with_pthread_req" = yes -a "$have_pthread" = no ; then
17376   warn 'POSIX threads were requested, but were not found.'
17377 fi
17378
17379 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
17380   warn 'The SGI saver extension was requested, but was not found.'
17381 fi
17382
17383 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
17384   warn 'The XIdle extension was requested, but was not found.'
17385 fi
17386
17387 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
17388   warn 'The XSHM extension was requested, but was not found.'
17389 fi
17390
17391 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
17392   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
17393 fi
17394
17395 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
17396   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
17397 fi
17398
17399 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
17400   warn 'The DPMS extension was requested, but was not found.'
17401 fi
17402
17403 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
17404   warn 'The Xinerama extension was requested, but was not found.'
17405 fi
17406
17407 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
17408   warn 'The XF86VMODE extension was requested, but was not found.'
17409 fi
17410
17411 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
17412   warn 'The RANDR extension was requested, but was not found.'
17413 fi
17414
17415 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
17416   warn "Checking of /proc/interrupts was requested, but it's bogus."
17417 fi
17418
17419 if test "$pkg_config" = false ; then
17420   warnL 'The "pkg-config" program was not found.  Without that,'
17421   warn2 "detection of the various GTK libraries won't work."
17422 else
17423   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
17424   if test "x$pkgerr" != "x" ; then
17425     warnL 'The "pkg-config" program produces errors.  This often causes'
17426     warn2 "detection of the various GTK libraries to malfunction."
17427     warn2 "The errors are:"
17428     echo ''
17429     echo "$pkgerr" | sed 's/^/             > /g'
17430   fi
17431 fi
17432
17433 if test "$gtk_halfassed" != no ; then
17434   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
17435   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
17436   warn2 "Perhaps some of the development packages are not installed?"
17437   if test "$have_gtk" = yes ; then
17438     v="$ac_gtk_version_string"
17439     warn2 "GTK $v is also installed, so it will be used instead."
17440     warn2 "Please read the above output and the \`config.log' file"
17441     warn2 "for more details."
17442   fi
17443 fi
17444
17445 motif_warn2() {
17446   warn2 'Though the Motif front-end to xscreensaver is still'
17447   warn2 'maintained, it is no longer being updated with new'
17448   warn2 'features: all new development on the xscreensaver-demo'
17449   warn2 'program is happening in the GTK version, and not in the'
17450   warn2 'Motif version.  It is recommended that you build against'
17451   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
17452 }
17453
17454 if test "$have_motif" = no -a "$have_gtk" = no; then
17455
17456   if test "$with_motif" = yes; then
17457     warnL "Neither the GTK nor Motif libraries were found; the"
17458     warn2 "\`xscreensaver-demo' program requires one of these."
17459     echo ''
17460     motif_warn2
17461   else
17462     warnL "The GTK libraries do not seem to be available; the"
17463     warn2 "\`xscreensaver-demo' program requires them."
17464 #   echo ''
17465 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
17466 #   warn2 "\`--with-motif' option) but that is NOT recommended."
17467 #   motif_warn2
17468   fi
17469
17470 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
17471   warnL "Use of Motif was requested, but it wasn't found;"
17472   warn2 "Gtk will be used instead."
17473
17474 elif test "$jurassic_gtk" = yes ; then
17475
17476   pref_gtk=2.0
17477
17478   v="$ac_gtk_version_string"
17479   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
17480     warnL "Use of Gtk was requested, but its version number is unknown;"
17481   elif test "$with_gtk_req" = yes ; then
17482     warnL "Use of Gtk was requested, but it is version $v;"
17483   else
17484     warnL "Gtk was found on this system, but it is version $v;"
17485   fi
17486
17487   warn2 "Gtk $pref_gtk or newer is required."
17488
17489 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
17490   warnL "Use of Gtk was requested, but it wasn't found."
17491 fi
17492
17493
17494 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
17495   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
17496   warn2 "headers were not found.  That can't be good.  Please"
17497   warn2 "install the GDK-Pixbuf development kit and re-configure."
17498 fi
17499
17500 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
17501
17502   preferred_lesstif=0.92
17503
17504   if test "$lesstif_version" = unknown; then
17505     warnL "Unable to determine the LessTif version number!"
17506     warn2 "Make sure you are using version $preferred_lesstif or newer."
17507     warn2 "See <http://www.lesstif.org/>."
17508
17509   elif test \! $lesstif_version -gt 82; then
17510     warnL "LessTif version $lesstif_version_string is being used."
17511     warn2 "LessTif versions 0.82 and earlier are too buggy to"
17512     warn2 "use with XScreenSaver; it is strongly recommended"
17513     warn2 "that you upgrade to at least version $preferred_lesstif!"
17514     warn2 "See <http://www.lesstif.org/>."
17515   fi
17516 fi
17517
17518
17519 if test "$have_motif" = yes -a "$have_gtk" = no ; then
17520   warn  'Motif is being used, and GTK is not.'
17521   echo  ''
17522   motif_warn2
17523 fi
17524
17525
17526 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
17527   warnL 'Use of XPM was requested, but it was not found.'
17528 fi
17529
17530 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
17531   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
17532 fi
17533
17534 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
17535    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
17536
17537   if test "$with_gdk_pixbuf_req" = yes ; then
17538     true
17539   elif test "$with_gdk_pixbuf_req" = no ; then
17540     warnL 'The GDK-Pixbuf library is not being used.'
17541   else
17542     warnL 'The GDK-Pixbuf library was not found.'
17543   fi
17544
17545   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
17546     true
17547   elif test "$with_xpm_req" = no ; then
17548     warnL 'The XPM library is not being used.'
17549   else
17550     warnL 'The XPM library was not found.'
17551   fi
17552
17553   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
17554     warn2 'The XPM library is being used instead.'
17555   fi
17556
17557   if test "$gdk_pixbuf_halfassed" = yes ; then
17558     echo ''
17559     warn2 'More specifically, we found the headers, but not the'
17560     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
17561     warn2 "system, or something else went wrong.  The \`config.log'"
17562     warn2 'file might contain some clues.'
17563   fi
17564
17565   echo ''
17566   warn2 'Some of the demos will not use images as much as they could.'
17567   warn2 'You should consider installing GDK-Pixbuf and re-running'
17568   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
17569   warn2 'provides support for more image formats.)'
17570 fi
17571
17572
17573 if test "$have_jpeg" = no ; then
17574   if test "$with_jpeg_req" = yes ; then
17575     warnL 'Use of libjpeg was requested, but it was not found.'
17576   elif test "$with_jpeg_req" = no ; then
17577     noteL 'The JPEG library is not being used.'
17578   else
17579     noteL 'The JPEG library was not found.'
17580   fi
17581
17582   if test "$jpeg_halfassed" = yes ; then
17583     echo ''
17584     warn2 'More specifically, we found the headers, but not the'
17585     warn2 'library; so either JPEG is half-installed on this'
17586     warn2 "system, or something else went wrong.  The \`config.log'"
17587     warn2 'file might contain some clues.'
17588     echo ''
17589   fi
17590
17591   if test "$have_gdk_pixbuf" = no ; then
17592     warn2 "This means that it won't be possible for the image-manipulating"
17593     warn2 "display modes to load files from disk; and it also means that"
17594     warn2 "the \`webcollage' program will be much slower."
17595   else
17596     warn2 "This means the \`webcollage' program will be much slower."
17597   fi
17598 fi
17599
17600
17601 if test "$have_xft" = no ; then
17602   if test "$with_xft_req" = yes ; then
17603     warnL "Use of libXft was requested, but it was not found."
17604   elif test "$with_xft_req" = no ; then
17605     noteL 'The Xft library is not being used.'
17606   else
17607     noteL "The Xft library was not found."
17608   fi
17609
17610   if test "$xft_halfassed" = yes ; then
17611     echo ''
17612     warn2 'More specifically, we found the headers, but not the'
17613     warn2 'libraries; so either Xft is half-installed on this'
17614     warn2 "system, or something else went wrong.  The \`config.log'"
17615     warn2 'file might contain some clues.'
17616     echo ''
17617   fi
17618
17619   warn2 "This means that fonts won't be anti-aliased."
17620 fi
17621
17622
17623 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
17624   preferred_mesagl=3.4
17625   mgv="$ac_mesagl_version_string"
17626   pgl="$preferred_mesagl"
17627
17628   if test "$ac_mesagl_version" = unknown; then
17629     true
17630     # warnL "Unable to determine the MesaGL version number!"
17631     # warn2 "Make sure you are using version $preferred_mesagl or newer."
17632
17633   elif test \! "$ac_mesagl_version" -gt 2006; then
17634     warnL "MesaGL version number is $mgv --"
17635     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
17636     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
17637
17638   elif test \! "$ac_mesagl_version" -gt 3003; then
17639     warnL "MesaGL version number is $mgv --"
17640     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
17641     warn2 "that you upgrade to $pgl or newer."
17642   fi
17643 fi
17644
17645 if test "$have_gl" = no ; then
17646   if test "$with_gl_req" = yes ; then
17647     warnL 'Use of GL was requested, but it was not found.'
17648   elif test "$with_gl_req" = no ; then
17649     noteL 'The OpenGL 3D library is not being used.'
17650   else
17651     noteL 'The OpenGL 3D library was not found.'
17652   fi
17653
17654   if test "$gl_halfassed" = yes ; then
17655     echo ''
17656     warn2 'More specifically, we found the headers, but not the'
17657     warn2 'libraries; so either GL is half-installed on this'
17658     warn2 "system, or something else went wrong.  The \`config.log'"
17659     warn2 'file might contain some clues.'
17660   fi
17661
17662   echo ''
17663   warn2 'Those demos which use 3D will not be built or installed.'
17664   warn2 'You might want to consider installing OpenGL and'
17665   warn2 're-running configure.'
17666
17667 fi
17668
17669
17670 if test "$have_gl" = yes -a "$have_gle" = no ; then
17671
17672  # nobody cares about this; don't print the warning unless it was
17673  # requested and not found, or halfway-found.
17674  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
17675
17676   if test "$with_gle_req" = yes ; then
17677     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
17678     warn2 'it was not found (though the OpenGL library was found, and'
17679     warn2 'is being used.)'
17680   elif test "$with_gle_req" = no ; then
17681     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
17682     warn2 'library is not.'
17683   else
17684     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
17685     warn2 'library was not.'
17686   fi
17687
17688   if test "$gle_halfassed" = yes ; then
17689     echo ''
17690     warn2 'More specifically, we found the headers, but not the'
17691     warn2 'libraries; so either GLE is half-installed on this'
17692     warn2 "system, or something else went wrong.  The \`config.log'"
17693     warn2 'file might contain some clues.'
17694   fi
17695
17696   echo ''
17697   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
17698   warn2 'will not be built or installed.  You might want to consider'
17699   warn2 'installing GLE and re-running configure.  You can find the'
17700   warn2 'GLE library at <http://www.linas.org/gle/>'
17701
17702  fi
17703 fi
17704
17705
17706 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
17707   warn 'Use of XReadDisplay was requested, but it was not found.'
17708 fi
17709
17710 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
17711   warn 'Use of Kerberos was requested, but it was not found.'
17712 fi
17713
17714 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
17715   warn 'Use of PAM was requested, but it was not found.'
17716 fi
17717
17718 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
17719   warn 'Use of shadow passwords was requested, but they were not found.'
17720 fi
17721
17722 if test "$ac_macosx" = yes ; then
17723   if test "$enable_locking" = yes ; then
17724     warn  "You have specified --enable-locking on MacOS X."
17725     warn2 "THIS DOES NOT WORK!  Don't do this!"
17726   fi
17727 fi
17728
17729
17730 # You are in a twisty maze of namespaces and syntaxes, all alike.
17731 # Fuck the skull of Unix.
17732 #
17733 bindir=`eval eval eval eval eval eval eval echo $bindir`
17734 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
17735 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
17736
17737 # canonicalize slashes.
17738 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
17739 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
17740 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
17741
17742
17743 # Sanity check the hackdir
17744 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
17745   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
17746     echo ""
17747     as_fn_error $? "\"--with-hackdir=${bindir}/${bad_choice}\" won't work.
17748                    There will be an executable installed with that name, so
17749                    that can't be the name of a directory as well.  Please
17750                    re-configure with a different directory name." "$LINENO" 5
17751   fi
17752 done
17753
17754
17755 do_dir_warning=no
17756
17757 # Now let's warn if there's a previous RPM version already installed.
17758 # But don't bother with this test if we are currently *building* an RPM.
17759
17760 if test -z "$RPM_PACKAGE_VERSION" ; then
17761
17762   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
17763
17764   # M4 sucks!!
17765
17766   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
17767         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
17768         head -1`
17769
17770
17771   if test \! -z "$rpmv" ; then
17772     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
17773     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
17774
17775     warning=no
17776     warnL "There is already an installed RPM of xscreensaver $rpmv"
17777     warn2 'on this system.  You might want to remove it ("rpm -ve")'
17778     warn2 'before running "make install" in this directory.'
17779     echo ""
17780     warn2 "Alternately, you could build this version of xscreensaver"
17781     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
17782     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
17783     warn2 "See the RPM documentation for more info."
17784     echo ""
17785
17786     if test "$rpmbdir" = "$rpmhdir" ; then
17787       warn2 "The RPM version was installed in $rpmbdir/."
17788       do_dir_warning=yes
17789     else
17790       warn2 "The RPM version was installed in $rpmbdir/,"
17791       warn2 "with demos in $rpmhdir/."
17792     fi
17793   fi
17794 fi
17795
17796 # Also warn if there's a Debian package installed.
17797 #
17798 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
17799 debv=''
17800 for dpkg in $debnames ; do
17801   if test -z "$debv"; then
17802     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
17803   fi
17804 done
17805
17806 if test \! -z "$debv" ; then
17807   debbdir=`dpkg -L $debnames 2>/dev/null | \
17808             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
17809   debhdir=`dpkg -L $debnames 2>/dev/null | \
17810             sed -n 's@^\(.*/\)popsquares$@\1@p'`
17811   if test -z "$debbdir" ; then debbdir='???'; fi
17812   if test -z "$debhdir" ; then debhdir='???'; fi
17813
17814   warning=no
17815   warnL "There is already an installed dpkg of xscreensaver"
17816   warn2 "version \"$debv\" on this system."
17817   echo ""
17818   warn2 "The dpkg was installed in $debbdir,"
17819   warn2 "with demos in $debhdir."
17820 fi
17821
17822
17823 if test "${bindir}" = "${HACKDIR}" ; then
17824   do_dir_warning=yes
17825 fi
17826
17827 if test "$do_dir_warning" = yes; then
17828   echo ""
17829   echo "$warnsep"
17830   echo ""
17831   echo '      When you run "make install", the "xscreensaver",'
17832   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
17833   echo "      will be installed in ${bindir}/."
17834   echo ""
17835   echo "      The various graphics demos (200+ different executables) will"
17836   echo "      be installed in ${HACKDIR}/."
17837   echo ""
17838   echo "      If you would prefer the demos to be installed elsewhere,"
17839   echo "      you should re-run configure with the --with-hackdir=DIR"
17840   echo "      option.  For more information, run \`./configure --help'."
17841   warning=yes
17842 fi
17843
17844 if test "$warning" != no; then
17845   echo '' ; echo "$warnsep" ; echo ''
17846 fi
17847
17848 if test "$do_dir_warning" = no; then
17849   if test "$warning" = no; then
17850     echo ''
17851   fi
17852   echo "User programs will be installed in ${bindir}/"
17853   echo "Screen savers will be installed in ${HACKDIR}/"
17854   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
17855   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
17856   echo ''
17857 fi