25217853ff98e00a9ead64110219e6ccc4b5f00d
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.63.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9 ## --------------------- ##
10 ## M4sh Initialization.  ##
11 ## --------------------- ##
12
13 # Be more Bourne compatible
14 DUALCASE=1; export DUALCASE # for MKS sh
15 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16   emulate sh
17   NULLCMD=:
18   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19   # is contrary to our usage.  Disable this feature.
20   alias -g '${1+"$@"}'='"$@"'
21   setopt NO_GLOB_SUBST
22 else
23   case `(set -o) 2>/dev/null` in
24   *posix*) set -o posix ;;
25 esac
26
27 fi
28
29
30
31
32 # PATH needs CR
33 # Avoid depending upon Character Ranges.
34 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37 as_cr_digits='0123456789'
38 as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40 as_nl='
41 '
42 export as_nl
43 # Printing a long string crashes Solaris 7 /usr/bin/printf.
44 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
45 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
46 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
47 if (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 # Support unset when possible.
82 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
83   as_unset=unset
84 else
85   as_unset=false
86 fi
87
88
89 # IFS
90 # We need space, tab and new line, in precisely that order.  Quoting is
91 # there to prevent editors from complaining about space-tab.
92 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
93 # splitting by setting IFS to empty value.)
94 IFS=" ""        $as_nl"
95
96 # Find who we are.  Look in the path if we contain no directory separator.
97 case $0 in
98   *[\\/]* ) as_myself=$0 ;;
99   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
100 for as_dir in $PATH
101 do
102   IFS=$as_save_IFS
103   test -z "$as_dir" && as_dir=.
104   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
105 done
106 IFS=$as_save_IFS
107
108      ;;
109 esac
110 # We did not find ourselves, most probably we were run as `sh COMMAND'
111 # in which case we are not to be found in the path.
112 if test "x$as_myself" = x; then
113   as_myself=$0
114 fi
115 if test ! -f "$as_myself"; then
116   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
117   { (exit 1); exit 1; }
118 fi
119
120 # Work around bugs in pre-3.0 UWIN ksh.
121 for as_var in ENV MAIL MAILPATH
122 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # Required to use basename.
135 if expr a : '\(a\)' >/dev/null 2>&1 &&
136    test "X`expr 00001 : '.*\(...\)'`" = X001; then
137   as_expr=expr
138 else
139   as_expr=false
140 fi
141
142 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
143   as_basename=basename
144 else
145   as_basename=false
146 fi
147
148
149 # Name of the executable.
150 as_me=`$as_basename -- "$0" ||
151 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
152          X"$0" : 'X\(//\)$' \| \
153          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
154 $as_echo X/"$0" |
155     sed '/^.*\/\([^/][^/]*\)\/*$/{
156             s//\1/
157             q
158           }
159           /^X\/\(\/\/\)$/{
160             s//\1/
161             q
162           }
163           /^X\/\(\/\).*/{
164             s//\1/
165             q
166           }
167           s/.*/./; q'`
168
169 # CDPATH.
170 $as_unset CDPATH
171
172
173 if test "x$CONFIG_SHELL" = x; then
174   if (eval ":") 2>/dev/null; then
175   as_have_required=yes
176 else
177   as_have_required=no
178 fi
179
180   if test $as_have_required = yes &&     (eval ":
181 (as_func_return () {
182   (exit \$1)
183 }
184 as_func_success () {
185   as_func_return 0
186 }
187 as_func_failure () {
188   as_func_return 1
189 }
190 as_func_ret_success () {
191   return 0
192 }
193 as_func_ret_failure () {
194   return 1
195 }
196
197 exitcode=0
198 if as_func_success; then
199   :
200 else
201   exitcode=1
202   echo as_func_success failed.
203 fi
204
205 if as_func_failure; then
206   exitcode=1
207   echo as_func_failure succeeded.
208 fi
209
210 if as_func_ret_success; then
211   :
212 else
213   exitcode=1
214   echo as_func_ret_success failed.
215 fi
216
217 if as_func_ret_failure; then
218   exitcode=1
219   echo as_func_ret_failure succeeded.
220 fi
221
222 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
223   :
224 else
225   exitcode=1
226   echo positional parameters were not saved.
227 fi
228
229 test \$exitcode = 0) || { (exit 1); exit 1; }
230
231 (
232   as_lineno_1=\$LINENO
233   as_lineno_2=\$LINENO
234   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
235   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
236 ") 2> /dev/null; then
237   :
238 else
239   as_candidate_shells=
240     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
241 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
242 do
243   IFS=$as_save_IFS
244   test -z "$as_dir" && as_dir=.
245   case $as_dir in
246          /*)
247            for as_base in sh bash ksh sh5; do
248              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
249            done;;
250        esac
251 done
252 IFS=$as_save_IFS
253
254
255       for as_shell in $as_candidate_shells $SHELL; do
256          # Try only shells that exist, to save several forks.
257          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
258                 { ("$as_shell") 2> /dev/null <<\_ASEOF
259 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
260   emulate sh
261   NULLCMD=:
262   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
263   # is contrary to our usage.  Disable this feature.
264   alias -g '${1+"$@"}'='"$@"'
265   setopt NO_GLOB_SUBST
266 else
267   case `(set -o) 2>/dev/null` in
268   *posix*) set -o posix ;;
269 esac
270
271 fi
272
273
274 :
275 _ASEOF
276 }; then
277   CONFIG_SHELL=$as_shell
278                as_have_required=yes
279                if { "$as_shell" 2> /dev/null <<\_ASEOF
280 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
281   emulate sh
282   NULLCMD=:
283   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
284   # is contrary to our usage.  Disable this feature.
285   alias -g '${1+"$@"}'='"$@"'
286   setopt NO_GLOB_SUBST
287 else
288   case `(set -o) 2>/dev/null` in
289   *posix*) set -o posix ;;
290 esac
291
292 fi
293
294
295 :
296 (as_func_return () {
297   (exit $1)
298 }
299 as_func_success () {
300   as_func_return 0
301 }
302 as_func_failure () {
303   as_func_return 1
304 }
305 as_func_ret_success () {
306   return 0
307 }
308 as_func_ret_failure () {
309   return 1
310 }
311
312 exitcode=0
313 if as_func_success; then
314   :
315 else
316   exitcode=1
317   echo as_func_success failed.
318 fi
319
320 if as_func_failure; then
321   exitcode=1
322   echo as_func_failure succeeded.
323 fi
324
325 if as_func_ret_success; then
326   :
327 else
328   exitcode=1
329   echo as_func_ret_success failed.
330 fi
331
332 if as_func_ret_failure; then
333   exitcode=1
334   echo as_func_ret_failure succeeded.
335 fi
336
337 if ( set x; as_func_ret_success y && test x = "$1" ); then
338   :
339 else
340   exitcode=1
341   echo positional parameters were not saved.
342 fi
343
344 test $exitcode = 0) || { (exit 1); exit 1; }
345
346 (
347   as_lineno_1=$LINENO
348   as_lineno_2=$LINENO
349   test "x$as_lineno_1" != "x$as_lineno_2" &&
350   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
351
352 _ASEOF
353 }; then
354   break
355 fi
356
357 fi
358
359       done
360
361       if test "x$CONFIG_SHELL" != x; then
362   for as_var in BASH_ENV ENV
363         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
364         done
365         export CONFIG_SHELL
366         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
367 fi
368
369
370     if test $as_have_required = no; then
371   echo This script requires a shell more modern than all the
372       echo shells that I found on your system.  Please install a
373       echo modern shell, or manually run the script under such a
374       echo shell if you do have one.
375       { (exit 1); exit 1; }
376 fi
377
378
379 fi
380
381 fi
382
383
384
385 (eval "as_func_return () {
386   (exit \$1)
387 }
388 as_func_success () {
389   as_func_return 0
390 }
391 as_func_failure () {
392   as_func_return 1
393 }
394 as_func_ret_success () {
395   return 0
396 }
397 as_func_ret_failure () {
398   return 1
399 }
400
401 exitcode=0
402 if as_func_success; then
403   :
404 else
405   exitcode=1
406   echo as_func_success failed.
407 fi
408
409 if as_func_failure; then
410   exitcode=1
411   echo as_func_failure succeeded.
412 fi
413
414 if as_func_ret_success; then
415   :
416 else
417   exitcode=1
418   echo as_func_ret_success failed.
419 fi
420
421 if as_func_ret_failure; then
422   exitcode=1
423   echo as_func_ret_failure succeeded.
424 fi
425
426 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
427   :
428 else
429   exitcode=1
430   echo positional parameters were not saved.
431 fi
432
433 test \$exitcode = 0") || {
434   echo No shell found that supports shell functions.
435   echo Please tell bug-autoconf@gnu.org about your system,
436   echo including any error possibly output before this message.
437   echo This can help us improve future autoconf versions.
438   echo Configuration will now proceed without shell functions.
439 }
440
441
442
443   as_lineno_1=$LINENO
444   as_lineno_2=$LINENO
445   test "x$as_lineno_1" != "x$as_lineno_2" &&
446   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
447
448   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
449   # uniformly replaced by the line number.  The first 'sed' inserts a
450   # line-number line after each line using $LINENO; the second 'sed'
451   # does the real work.  The second script uses 'N' to pair each
452   # line-number line with the line containing $LINENO, and appends
453   # trailing '-' during substitution so that $LINENO is not a special
454   # case at line end.
455   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
456   # scripts with optimization help from Paolo Bonzini.  Blame Lee
457   # E. McMahon (1931-1989) for sed's syntax.  :-)
458   sed -n '
459     p
460     /[$]LINENO/=
461   ' <$as_myself |
462     sed '
463       s/[$]LINENO.*/&-/
464       t lineno
465       b
466       :lineno
467       N
468       :loop
469       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
470       t loop
471       s/-\n.*//
472     ' >$as_me.lineno &&
473   chmod +x "$as_me.lineno" ||
474     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
475    { (exit 1); exit 1; }; }
476
477   # Don't try to exec as it changes $[0], causing all sort of problems
478   # (the dirname of $[0] is not the place where we might find the
479   # original and so on.  Autoconf is especially sensitive to this).
480   . "./$as_me.lineno"
481   # Exit status is that of the last command.
482   exit
483 }
484
485
486 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
487   as_dirname=dirname
488 else
489   as_dirname=false
490 fi
491
492 ECHO_C= ECHO_N= ECHO_T=
493 case `echo -n x` in
494 -n*)
495   case `echo 'x\c'` in
496   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
497   *)   ECHO_C='\c';;
498   esac;;
499 *)
500   ECHO_N='-n';;
501 esac
502 if expr a : '\(a\)' >/dev/null 2>&1 &&
503    test "X`expr 00001 : '.*\(...\)'`" = X001; then
504   as_expr=expr
505 else
506   as_expr=false
507 fi
508
509 rm -f conf$$ conf$$.exe conf$$.file
510 if test -d conf$$.dir; then
511   rm -f conf$$.dir/conf$$.file
512 else
513   rm -f conf$$.dir
514   mkdir conf$$.dir 2>/dev/null
515 fi
516 if (echo >conf$$.file) 2>/dev/null; then
517   if ln -s conf$$.file conf$$ 2>/dev/null; then
518     as_ln_s='ln -s'
519     # ... but there are two gotchas:
520     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
521     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
522     # In both cases, we have to default to `cp -p'.
523     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
524       as_ln_s='cp -p'
525   elif ln conf$$.file conf$$ 2>/dev/null; then
526     as_ln_s=ln
527   else
528     as_ln_s='cp -p'
529   fi
530 else
531   as_ln_s='cp -p'
532 fi
533 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
534 rmdir conf$$.dir 2>/dev/null
535
536 if mkdir -p . 2>/dev/null; then
537   as_mkdir_p=:
538 else
539   test -d ./-p && rmdir ./-p
540   as_mkdir_p=false
541 fi
542
543 if test -x / >/dev/null 2>&1; then
544   as_test_x='test -x'
545 else
546   if ls -dL / >/dev/null 2>&1; then
547     as_ls_L_option=L
548   else
549     as_ls_L_option=
550   fi
551   as_test_x='
552     eval sh -c '\''
553       if test -d "$1"; then
554         test -d "$1/.";
555       else
556         case $1 in
557         -*)set "./$1";;
558         esac;
559         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
560         ???[sx]*):;;*)false;;esac;fi
561     '\'' sh
562   '
563 fi
564 as_executable_p=$as_test_x
565
566 # Sed expression to map a string onto a valid CPP name.
567 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
568
569 # Sed expression to map a string onto a valid variable name.
570 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
571
572
573
574 exec 7<&0 </dev/null 6>&1
575
576 # Name of the host.
577 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
578 # so uname gets run too.
579 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
580
581 #
582 # Initializations.
583 #
584 ac_default_prefix=/usr/local
585 ac_clean_files=
586 ac_config_libobj_dir=.
587 LIBOBJS=
588 cross_compiling=no
589 subdirs=
590 MFLAGS=
591 MAKEFLAGS=
592 SHELL=${CONFIG_SHELL-/bin/sh}
593
594 # Identity of this package.
595 PACKAGE_NAME=
596 PACKAGE_TARNAME=
597 PACKAGE_VERSION=
598 PACKAGE_STRING=
599 PACKAGE_BUGREPORT=
600
601 ac_unique_file="driver/subprocs.c"
602 # Factoring default headers for most tests.
603 ac_includes_default="\
604 #include <stdio.h>
605 #ifdef HAVE_SYS_TYPES_H
606 # include <sys/types.h>
607 #endif
608 #ifdef HAVE_SYS_STAT_H
609 # include <sys/stat.h>
610 #endif
611 #ifdef STDC_HEADERS
612 # include <stdlib.h>
613 # include <stddef.h>
614 #else
615 # ifdef HAVE_STDLIB_H
616 #  include <stdlib.h>
617 # endif
618 #endif
619 #ifdef HAVE_STRING_H
620 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
621 #  include <memory.h>
622 # endif
623 # include <string.h>
624 #endif
625 #ifdef HAVE_STRINGS_H
626 # include <strings.h>
627 #endif
628 #ifdef HAVE_INTTYPES_H
629 # include <inttypes.h>
630 #endif
631 #ifdef HAVE_STDINT_H
632 # include <stdint.h>
633 #endif
634 #ifdef HAVE_UNISTD_H
635 # include <unistd.h>
636 #endif"
637
638 ac_subst_vars='LTLIBOBJS
639 LIBOBJS
640 DEPEND_DEFINES
641 DEPEND_FLAGS
642 DEPEND
643 APPDEFAULTS
644 GTK_EXTRA_OBJS
645 HACK_CONF_DIR
646 PO_DATADIR
647 GTK_DATADIR
648 HACKDIR_FULL
649 HACKDIR
650 NOGNOME
651 GNOME22
652 GNOME24
653 GLFONT_OBJS
654 GLFPS_OBJS
655 JWZGLES_OBJS
656 GLE_KLUDGE
657 GLE_EXES
658 GL_KLUDGE
659 GL_MEN
660 GL_UTIL_EXES
661 SUID_EXES
662 RETIRED_GL_EXES
663 GL_EXES
664 JPEG_EXES
665 LOCK_OBJS
666 LOCK_SRCS
667 SAVER_GL_LIBS
668 SAVER_GL_OBJS
669 SAVER_GL_SRCS
670 XMU_LIBS
671 XMU_OBJS
672 XMU_SRCS
673 PASSWD_OBJS
674 PASSWD_SRCS
675 MEN_OSX
676 SCRIPTS_OSX
677 EXES_OSX
678 OBJCC
679 WITH_BROWSER
680 DEFAULT_TEXT_FILE
681 DEFAULT_IMAGE_DIRECTORY
682 DEFAULT_IMAGES_P
683 NEW_LOGIN_COMMAND_P
684 NEW_LOGIN_COMMAND
685 COMMENT_PAM_CHECK_ACCOUNT
686 HAVE_PAM_FAIL_DELAY
687 INSTALL_PAM
688 NEED_SETUID
689 INSTALL_DIRS
690 SETUID_HACKS
691 INSTALL_SETUID
692 PASSWD_LIBS
693 XINERAMA_LIBS
694 XDPMS_LIBS
695 GLE_LIBS
696 GL_LIBS
697 PTY_LIBS
698 XPM_LIBS
699 HACK_LIBS
700 JPEG_LIBS
701 XML_LIBS
702 GTK_LIBS
703 MOTIF_LIBS
704 SAVER_LIBS
705 ALL_DEMO_PROGRAMS
706 PREFERRED_DEMO_PROGRAM
707 INCLUDES
708 gnome_url_show_program
709 gnome_open_program
710 pkg_config
711 login_manager_tmp
712 MKINSTALLDIRS
713 POSUB
714 POFILES
715 INTLOBJS
716 INTLLIBS
717 INTLDEPS
718 INSTOBJEXT
719 GMOFILES
720 DATADIRNAME
721 CATOBJEXT
722 CATALOGS
723 XGETTEXT
724 GMSGFMT
725 MSGFMT
726 USE_NLS
727 ALLOCA
728 RANLIB
729 GETTEXT_PACKAGE
730 INTLTOOL_PERL
731 INTLTOOL_UPDATE
732 INTLTOOL_MERGE
733 INTLTOOL_EXTRACT
734 INTLTOOL_CAVES_RULE
735 INTLTOOL_XML_RULE
736 INTLTOOL_UI_RULE
737 INTLTOOL_SOUNDLIST_RULE
738 INTLTOOL_SHEET_RULE
739 INTLTOOL_SERVER_RULE
740 INTLTOOL_PONG_RULE
741 INTLTOOL_OAF_RULE
742 INTLTOOL_KEYS_RULE
743 INTLTOOL_DIRECTORY_RULE
744 INTLTOOL_DESKTOP_RULE
745 X_EXTRA_LIBS
746 X_LIBS
747 X_PRE_LIBS
748 X_CFLAGS
749 XMKMF
750 PERL
751 EGREP
752 GREP
753 SET_MAKE
754 INSTALL_DATA
755 INSTALL_SCRIPT
756 INSTALL_PROGRAM
757 CPP
758 OBJEXT
759 EXEEXT
760 ac_ct_CC
761 CPPFLAGS
762 LDFLAGS
763 CFLAGS
764 CC
765 host_os
766 host_vendor
767 host_cpu
768 host
769 build_os
770 build_vendor
771 build_cpu
772 build
773 target_alias
774 host_alias
775 build_alias
776 LIBS
777 ECHO_T
778 ECHO_N
779 ECHO_C
780 DEFS
781 mandir
782 localedir
783 libdir
784 psdir
785 pdfdir
786 dvidir
787 htmldir
788 infodir
789 docdir
790 oldincludedir
791 includedir
792 localstatedir
793 sharedstatedir
794 sysconfdir
795 datadir
796 datarootdir
797 libexecdir
798 sbindir
799 bindir
800 program_transform_name
801 prefix
802 exec_prefix
803 PACKAGE_BUGREPORT
804 PACKAGE_STRING
805 PACKAGE_VERSION
806 PACKAGE_TARNAME
807 PACKAGE_NAME
808 PATH_SEPARATOR
809 SHELL'
810 ac_subst_files=''
811 ac_user_opts='
812 enable_option_checking
813 with_x_app_defaults
814 enable_largefile
815 with_x
816 with_hackdir
817 enable_subdir
818 with_configdir
819 with_dpms_ext
820 with_xinerama_ext
821 with_xinput_ext
822 with_xf86vmode_ext
823 with_xf86gamma_ext
824 with_randr_ext
825 with_proc_interrupts
826 enable_locking
827 enable_root_passwd
828 with_pam
829 with_pam_service_name
830 enable_pam_check_account_type
831 with_kerberos
832 with_shadow
833 with_passwd_helper
834 with_login_manager
835 with_gtk
836 with_motif
837 with_gl
838 with_gle
839 with_gles
840 with_pixbuf
841 with_xpm
842 with_jpeg
843 with_xshm_ext
844 with_xdbe_ext
845 with_readdisplay
846 with_image_directory
847 with_text_file
848 with_browser
849 with_setuid_hacks
850 '
851       ac_precious_vars='build_alias
852 host_alias
853 target_alias
854 CC
855 CFLAGS
856 LDFLAGS
857 LIBS
858 CPPFLAGS
859 CPP
860 XMKMF'
861
862
863 # Initialize some variables set by options.
864 ac_init_help=
865 ac_init_version=false
866 ac_unrecognized_opts=
867 ac_unrecognized_sep=
868 # The variables have the same names as the options, with
869 # dashes changed to underlines.
870 cache_file=/dev/null
871 exec_prefix=NONE
872 no_create=
873 no_recursion=
874 prefix=NONE
875 program_prefix=NONE
876 program_suffix=NONE
877 program_transform_name=s,x,x,
878 silent=
879 site=
880 srcdir=
881 verbose=
882 x_includes=NONE
883 x_libraries=NONE
884
885 # Installation directory options.
886 # These are left unexpanded so users can "make install exec_prefix=/foo"
887 # and all the variables that are supposed to be based on exec_prefix
888 # by default will actually change.
889 # Use braces instead of parens because sh, perl, etc. also accept them.
890 # (The list follows the same order as the GNU Coding Standards.)
891 bindir='${exec_prefix}/bin'
892 sbindir='${exec_prefix}/sbin'
893 libexecdir='${exec_prefix}/libexec'
894 datarootdir='${prefix}/share'
895 datadir='${datarootdir}'
896 sysconfdir='${prefix}/etc'
897 sharedstatedir='${prefix}/com'
898 localstatedir='${prefix}/var'
899 includedir='${prefix}/include'
900 oldincludedir='/usr/include'
901 docdir='${datarootdir}/doc/${PACKAGE}'
902 infodir='${datarootdir}/info'
903 htmldir='${docdir}'
904 dvidir='${docdir}'
905 pdfdir='${docdir}'
906 psdir='${docdir}'
907 libdir='${exec_prefix}/lib'
908 localedir='${datarootdir}/locale'
909 mandir='${datarootdir}/man'
910
911 ac_prev=
912 ac_dashdash=
913 for ac_option
914 do
915   # If the previous option needs an argument, assign it.
916   if test -n "$ac_prev"; then
917     eval $ac_prev=\$ac_option
918     ac_prev=
919     continue
920   fi
921
922   case $ac_option in
923   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924   *)    ac_optarg=yes ;;
925   esac
926
927   # Accept the important Cygnus configure options, so we can diagnose typos.
928
929   case $ac_dashdash$ac_option in
930   --)
931     ac_dashdash=yes ;;
932
933   -bindir | --bindir | --bindi | --bind | --bin | --bi)
934     ac_prev=bindir ;;
935   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
936     bindir=$ac_optarg ;;
937
938   -build | --build | --buil | --bui | --bu)
939     ac_prev=build_alias ;;
940   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
941     build_alias=$ac_optarg ;;
942
943   -cache-file | --cache-file | --cache-fil | --cache-fi \
944   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945     ac_prev=cache_file ;;
946   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
948     cache_file=$ac_optarg ;;
949
950   --config-cache | -C)
951     cache_file=config.cache ;;
952
953   -datadir | --datadir | --datadi | --datad)
954     ac_prev=datadir ;;
955   -datadir=* | --datadir=* | --datadi=* | --datad=*)
956     datadir=$ac_optarg ;;
957
958   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959   | --dataroo | --dataro | --datar)
960     ac_prev=datarootdir ;;
961   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963     datarootdir=$ac_optarg ;;
964
965   -disable-* | --disable-*)
966     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
967     # Reject names that are not valid shell variable names.
968     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
969       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
970    { (exit 1); exit 1; }; }
971     ac_useropt_orig=$ac_useropt
972     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
973     case $ac_user_opts in
974       *"
975 "enable_$ac_useropt"
976 "*) ;;
977       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
978          ac_unrecognized_sep=', ';;
979     esac
980     eval enable_$ac_useropt=no ;;
981
982   -docdir | --docdir | --docdi | --doc | --do)
983     ac_prev=docdir ;;
984   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
985     docdir=$ac_optarg ;;
986
987   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
988     ac_prev=dvidir ;;
989   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
990     dvidir=$ac_optarg ;;
991
992   -enable-* | --enable-*)
993     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
994     # Reject names that are not valid shell variable names.
995     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
996       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
997    { (exit 1); exit 1; }; }
998     ac_useropt_orig=$ac_useropt
999     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1000     case $ac_user_opts in
1001       *"
1002 "enable_$ac_useropt"
1003 "*) ;;
1004       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1005          ac_unrecognized_sep=', ';;
1006     esac
1007     eval enable_$ac_useropt=\$ac_optarg ;;
1008
1009   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1010   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1011   | --exec | --exe | --ex)
1012     ac_prev=exec_prefix ;;
1013   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1014   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1015   | --exec=* | --exe=* | --ex=*)
1016     exec_prefix=$ac_optarg ;;
1017
1018   -gas | --gas | --ga | --g)
1019     # Obsolete; use --with-gas.
1020     with_gas=yes ;;
1021
1022   -help | --help | --hel | --he | -h)
1023     ac_init_help=long ;;
1024   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1025     ac_init_help=recursive ;;
1026   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1027     ac_init_help=short ;;
1028
1029   -host | --host | --hos | --ho)
1030     ac_prev=host_alias ;;
1031   -host=* | --host=* | --hos=* | --ho=*)
1032     host_alias=$ac_optarg ;;
1033
1034   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1035     ac_prev=htmldir ;;
1036   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1037   | --ht=*)
1038     htmldir=$ac_optarg ;;
1039
1040   -includedir | --includedir | --includedi | --included | --include \
1041   | --includ | --inclu | --incl | --inc)
1042     ac_prev=includedir ;;
1043   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1044   | --includ=* | --inclu=* | --incl=* | --inc=*)
1045     includedir=$ac_optarg ;;
1046
1047   -infodir | --infodir | --infodi | --infod | --info | --inf)
1048     ac_prev=infodir ;;
1049   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1050     infodir=$ac_optarg ;;
1051
1052   -libdir | --libdir | --libdi | --libd)
1053     ac_prev=libdir ;;
1054   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1055     libdir=$ac_optarg ;;
1056
1057   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1058   | --libexe | --libex | --libe)
1059     ac_prev=libexecdir ;;
1060   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1061   | --libexe=* | --libex=* | --libe=*)
1062     libexecdir=$ac_optarg ;;
1063
1064   -localedir | --localedir | --localedi | --localed | --locale)
1065     ac_prev=localedir ;;
1066   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1067     localedir=$ac_optarg ;;
1068
1069   -localstatedir | --localstatedir | --localstatedi | --localstated \
1070   | --localstate | --localstat | --localsta | --localst | --locals)
1071     ac_prev=localstatedir ;;
1072   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1073   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1074     localstatedir=$ac_optarg ;;
1075
1076   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1077     ac_prev=mandir ;;
1078   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1079     mandir=$ac_optarg ;;
1080
1081   -nfp | --nfp | --nf)
1082     # Obsolete; use --without-fp.
1083     with_fp=no ;;
1084
1085   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1086   | --no-cr | --no-c | -n)
1087     no_create=yes ;;
1088
1089   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1090   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1091     no_recursion=yes ;;
1092
1093   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1094   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1095   | --oldin | --oldi | --old | --ol | --o)
1096     ac_prev=oldincludedir ;;
1097   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1098   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1099   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1100     oldincludedir=$ac_optarg ;;
1101
1102   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1103     ac_prev=prefix ;;
1104   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1105     prefix=$ac_optarg ;;
1106
1107   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1108   | --program-pre | --program-pr | --program-p)
1109     ac_prev=program_prefix ;;
1110   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1111   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1112     program_prefix=$ac_optarg ;;
1113
1114   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1115   | --program-suf | --program-su | --program-s)
1116     ac_prev=program_suffix ;;
1117   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1118   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1119     program_suffix=$ac_optarg ;;
1120
1121   -program-transform-name | --program-transform-name \
1122   | --program-transform-nam | --program-transform-na \
1123   | --program-transform-n | --program-transform- \
1124   | --program-transform | --program-transfor \
1125   | --program-transfo | --program-transf \
1126   | --program-trans | --program-tran \
1127   | --progr-tra | --program-tr | --program-t)
1128     ac_prev=program_transform_name ;;
1129   -program-transform-name=* | --program-transform-name=* \
1130   | --program-transform-nam=* | --program-transform-na=* \
1131   | --program-transform-n=* | --program-transform-=* \
1132   | --program-transform=* | --program-transfor=* \
1133   | --program-transfo=* | --program-transf=* \
1134   | --program-trans=* | --program-tran=* \
1135   | --progr-tra=* | --program-tr=* | --program-t=*)
1136     program_transform_name=$ac_optarg ;;
1137
1138   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1139     ac_prev=pdfdir ;;
1140   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1141     pdfdir=$ac_optarg ;;
1142
1143   -psdir | --psdir | --psdi | --psd | --ps)
1144     ac_prev=psdir ;;
1145   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1146     psdir=$ac_optarg ;;
1147
1148   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1149   | -silent | --silent | --silen | --sile | --sil)
1150     silent=yes ;;
1151
1152   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1153     ac_prev=sbindir ;;
1154   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1155   | --sbi=* | --sb=*)
1156     sbindir=$ac_optarg ;;
1157
1158   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1159   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1160   | --sharedst | --shareds | --shared | --share | --shar \
1161   | --sha | --sh)
1162     ac_prev=sharedstatedir ;;
1163   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1164   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1165   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1166   | --sha=* | --sh=*)
1167     sharedstatedir=$ac_optarg ;;
1168
1169   -site | --site | --sit)
1170     ac_prev=site ;;
1171   -site=* | --site=* | --sit=*)
1172     site=$ac_optarg ;;
1173
1174   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1175     ac_prev=srcdir ;;
1176   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1177     srcdir=$ac_optarg ;;
1178
1179   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1180   | --syscon | --sysco | --sysc | --sys | --sy)
1181     ac_prev=sysconfdir ;;
1182   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1183   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1184     sysconfdir=$ac_optarg ;;
1185
1186   -target | --target | --targe | --targ | --tar | --ta | --t)
1187     ac_prev=target_alias ;;
1188   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1189     target_alias=$ac_optarg ;;
1190
1191   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1192     verbose=yes ;;
1193
1194   -version | --version | --versio | --versi | --vers | -V)
1195     ac_init_version=: ;;
1196
1197   -with-* | --with-*)
1198     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1199     # Reject names that are not valid shell variable names.
1200     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1201       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1202    { (exit 1); exit 1; }; }
1203     ac_useropt_orig=$ac_useropt
1204     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205     case $ac_user_opts in
1206       *"
1207 "with_$ac_useropt"
1208 "*) ;;
1209       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1210          ac_unrecognized_sep=', ';;
1211     esac
1212     eval with_$ac_useropt=\$ac_optarg ;;
1213
1214   -without-* | --without-*)
1215     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1216     # Reject names that are not valid shell variable names.
1217     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1218       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1219    { (exit 1); exit 1; }; }
1220     ac_useropt_orig=$ac_useropt
1221     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1222     case $ac_user_opts in
1223       *"
1224 "with_$ac_useropt"
1225 "*) ;;
1226       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1227          ac_unrecognized_sep=', ';;
1228     esac
1229     eval with_$ac_useropt=no ;;
1230
1231   --x)
1232     # Obsolete; use --with-x.
1233     with_x=yes ;;
1234
1235   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1236   | --x-incl | --x-inc | --x-in | --x-i)
1237     ac_prev=x_includes ;;
1238   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1239   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1240     x_includes=$ac_optarg ;;
1241
1242   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1243   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1244     ac_prev=x_libraries ;;
1245   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1246   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1247     x_libraries=$ac_optarg ;;
1248
1249   -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1250 Try \`$0 --help' for more information." >&2
1251    { (exit 1); exit 1; }; }
1252     ;;
1253
1254   *=*)
1255     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1256     # Reject names that are not valid shell variable names.
1257     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1258       { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1259    { (exit 1); exit 1; }; }
1260     eval $ac_envvar=\$ac_optarg
1261     export $ac_envvar ;;
1262
1263   *)
1264     # FIXME: should be removed in autoconf 3.0.
1265     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1266     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1267       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1268     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1269     ;;
1270
1271   esac
1272 done
1273
1274 if test -n "$ac_prev"; then
1275   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1276   { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1277    { (exit 1); exit 1; }; }
1278 fi
1279
1280 if test -n "$ac_unrecognized_opts"; then
1281   case $enable_option_checking in
1282     no) ;;
1283     fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1284    { (exit 1); exit 1; }; } ;;
1285     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1286   esac
1287 fi
1288
1289 # Check all directory arguments for consistency.
1290 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1291                 datadir sysconfdir sharedstatedir localstatedir includedir \
1292                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1293                 libdir localedir mandir
1294 do
1295   eval ac_val=\$$ac_var
1296   # Remove trailing slashes.
1297   case $ac_val in
1298     */ )
1299       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1300       eval $ac_var=\$ac_val;;
1301   esac
1302   # Be sure to have absolute directory names.
1303   case $ac_val in
1304     [\\/$]* | ?:[\\/]* )  continue;;
1305     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1306   esac
1307   { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1308    { (exit 1); exit 1; }; }
1309 done
1310
1311 # There might be people who depend on the old broken behavior: `$host'
1312 # used to hold the argument of --host etc.
1313 # FIXME: To remove some day.
1314 build=$build_alias
1315 host=$host_alias
1316 target=$target_alias
1317
1318 # FIXME: To remove some day.
1319 if test "x$host_alias" != x; then
1320   if test "x$build_alias" = x; then
1321     cross_compiling=maybe
1322     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1323     If a cross compiler is detected then cross compile mode will be used." >&2
1324   elif test "x$build_alias" != "x$host_alias"; then
1325     cross_compiling=yes
1326   fi
1327 fi
1328
1329 ac_tool_prefix=
1330 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1331
1332 test "$silent" = yes && exec 6>/dev/null
1333
1334
1335 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1336 ac_ls_di=`ls -di .` &&
1337 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1338   { $as_echo "$as_me: error: working directory cannot be determined" >&2
1339    { (exit 1); exit 1; }; }
1340 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1341   { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1342    { (exit 1); exit 1; }; }
1343
1344
1345 # Find the source files, if location was not specified.
1346 if test -z "$srcdir"; then
1347   ac_srcdir_defaulted=yes
1348   # Try the directory containing this script, then the parent directory.
1349   ac_confdir=`$as_dirname -- "$as_myself" ||
1350 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1351          X"$as_myself" : 'X\(//\)[^/]' \| \
1352          X"$as_myself" : 'X\(//\)$' \| \
1353          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1354 $as_echo X"$as_myself" |
1355     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1356             s//\1/
1357             q
1358           }
1359           /^X\(\/\/\)[^/].*/{
1360             s//\1/
1361             q
1362           }
1363           /^X\(\/\/\)$/{
1364             s//\1/
1365             q
1366           }
1367           /^X\(\/\).*/{
1368             s//\1/
1369             q
1370           }
1371           s/.*/./; q'`
1372   srcdir=$ac_confdir
1373   if test ! -r "$srcdir/$ac_unique_file"; then
1374     srcdir=..
1375   fi
1376 else
1377   ac_srcdir_defaulted=no
1378 fi
1379 if test ! -r "$srcdir/$ac_unique_file"; then
1380   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1381   { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1382    { (exit 1); exit 1; }; }
1383 fi
1384 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1385 ac_abs_confdir=`(
1386         cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1387    { (exit 1); exit 1; }; }
1388         pwd)`
1389 # When building in place, set srcdir=.
1390 if test "$ac_abs_confdir" = "$ac_pwd"; then
1391   srcdir=.
1392 fi
1393 # Remove unnecessary trailing slashes from srcdir.
1394 # Double slashes in file names in object file debugging info
1395 # mess up M-x gdb in Emacs.
1396 case $srcdir in
1397 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1398 esac
1399 for ac_var in $ac_precious_vars; do
1400   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1401   eval ac_env_${ac_var}_value=\$${ac_var}
1402   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1403   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1404 done
1405
1406 #
1407 # Report the --help message.
1408 #
1409 if test "$ac_init_help" = "long"; then
1410   # Omit some internal or obsolete options to make the list less imposing.
1411   # This message is too long to be a string in the A/UX 3.1 sh.
1412   cat <<_ACEOF
1413 \`configure' configures this package to adapt to many kinds of systems.
1414
1415 Usage: $0 [OPTION]... [VAR=VALUE]...
1416
1417 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1418 VAR=VALUE.  See below for descriptions of some of the useful variables.
1419
1420 Defaults for the options are specified in brackets.
1421
1422
1423 Configuration:
1424
1425   -h, --help              display this help and exit
1426       --help=short        display options specific to this package
1427       --help=recursive    display the short help of all the included packages
1428   -V, --version           display version information and exit
1429   -q, --quiet, --silent   do not print \`checking...' messages
1430       --cache-file=FILE   cache test results in FILE [disabled]
1431   -C, --config-cache      alias for \`--cache-file=config.cache'
1432   -n, --no-create         do not create output files
1433       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1434
1435 Installation directories:
1436   --prefix=PREFIX         install architecture-independent files in PREFIX
1437                           [$ac_default_prefix]
1438   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1439                           [PREFIX]
1440
1441 By default, \`make install' will install all the files in
1442 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1443 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1444 for instance \`--prefix=\$HOME'.
1445
1446 For better control, use the options below.
1447
1448 Fine tuning of the installation directories:
1449   --bindir=DIR            user executables [EPREFIX/bin]
1450   --libexecdir=DIR        program executables [EPREFIX/libexec]
1451   --libdir=DIR            object code libraries [EPREFIX/lib]
1452   --includedir=DIR        C header files [PREFIX/include]
1453   --x-includes=DIR        X include files are in DIR
1454   --x-libraries=DIR       X library files are in DIR
1455   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1456   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1457   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1458   --mandir=DIR            man documentation [DATAROOTDIR/man]
1459   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1460   --htmldir=DIR           html documentation [DOCDIR]
1461   --dvidir=DIR            dvi documentation [DOCDIR]
1462   --pdfdir=DIR            pdf documentation [DOCDIR]
1463   --psdir=DIR             ps documentation [DOCDIR]
1464 _ACEOF
1465
1466   cat <<\_ACEOF
1467
1468 X features:
1469   --x-includes=DIR    X include files are in DIR
1470   --x-libraries=DIR   X library files are in DIR
1471
1472 System types:
1473   --build=BUILD     configure for building on BUILD [guessed]
1474   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1475 _ACEOF
1476 fi
1477
1478 if test -n "$ac_init_help"; then
1479
1480   cat <<\_ACEOF
1481
1482 Optional Features:
1483   --disable-option-checking  ignore unrecognized --enable/--with options
1484   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1485   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1486   --disable-largefile     omit support for large files
1487
1488 Screen locking options:
1489   --enable-locking        Compile in support for locking the display.
1490   --disable-locking       Do not allow locking at all.
1491
1492   --enable-root-passwd        Allow root passwd to unlock screen.
1493   --disable-root-passwd       Do not allow that.
1494   --enable-pam-check-account-type
1495                           Whether PAM should check the result of account
1496                           modules when authenticating. Only do this if you
1497                           have account configured properly on your system.
1498
1499 Optional Packages:
1500   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1501   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1502
1503
1504 Installation options:
1505   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1506                           Default: `PREFIX/libexec/xscreensaver/'
1507   --with-configdir=DIR    Where to install the data files that describe each
1508                           of the display modes to the GUI.
1509                           Default: `PREFIX/share/xscreensaver/config/'
1510   --with-x-app-defaults=DIR
1511                            Where to install xscreensaver configuration file.
1512
1513   --with-dpms-ext         Include support for the DPMS extension.
1514   --with-xinerama-ext     Include support for the XINERAMA extension.
1515   --with-xinput-ext       Include support for the XInput extension.
1516   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1517   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1518   --with-randr-ext        Include support for the X Resize+Rotate extension.
1519   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1520                           file to notice keyboard activity.
1521   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1522   --with-pam-service-name NAME arg is the name of the PAM service that
1523                           xscreensaver will authenticate as.
1524   --with-kerberos         Include support for Kerberos authentication.
1525   --with-shadow           Include support for shadow password authentication.
1526   --with-passwd-helper    Include support for an external password
1527                           verification helper program.
1528   --with-login-manager    Put a "New Login" button on the unlock dialog that
1529                           runs a login manager like gdmflexiserver or kdmctl.
1530
1531 User interface options:
1532
1533   --with-gtk              Use the Gtk toolkit for the user interface.
1534   --with-motif            Use the Motif toolkit for the user interface
1535                           (no longer supported.)
1536
1537 Graphics options:
1538
1539   --with-gl               Build those demos which depend on OpenGL.
1540   --with-gle              Build those demos which depend on GLE
1541                           (the OpenGL "extrusion" library.)
1542   --with-gles             Target OpenGL ES 1.x API instead of OpenGL 1.3.
1543   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1544                           demos, which will make it possible for them to read
1545                           GIF, JPEG, and PNG files as well.
1546   --with-xpm              Include support for XPM files in some demos.
1547                           (Not needed if Pixbuf is used.)
1548   --with-jpeg             Include support for the JPEG library.
1549   --with-xshm-ext         Include support for the Shared Memory extension.
1550   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1551   --with-readdisplay      Include support for the XReadDisplay extension.
1552   --with-image-directory  Arg is the default directory from which some demos
1553                           will choose random images to display.
1554   --with-text-file=FILE   By default, some demos may display this file.
1555   --with-browser=BROWSER  Specify the web browser used to show the help URL.
1556   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1557                           (which is needed in order to ping other hosts.)
1558
1559
1560 Some influential environment variables:
1561   CC          C compiler command
1562   CFLAGS      C compiler flags
1563   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1564               nonstandard directory <lib dir>
1565   LIBS        libraries to pass to the linker, e.g. -l<library>
1566   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1567               you have headers in a nonstandard directory <include dir>
1568   CPP         C preprocessor
1569   XMKMF       Path to xmkmf, Makefile generator for X Window System
1570
1571 Use these variables to override the choices made by `configure' or to help
1572 it to find libraries and programs with nonstandard names/locations.
1573
1574 _ACEOF
1575 ac_status=$?
1576 fi
1577
1578 if test "$ac_init_help" = "recursive"; then
1579   # If there are subdirs, report their specific --help.
1580   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1581     test -d "$ac_dir" ||
1582       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1583       continue
1584     ac_builddir=.
1585
1586 case "$ac_dir" in
1587 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1588 *)
1589   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1590   # A ".." for each directory in $ac_dir_suffix.
1591   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1592   case $ac_top_builddir_sub in
1593   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1594   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1595   esac ;;
1596 esac
1597 ac_abs_top_builddir=$ac_pwd
1598 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1599 # for backward compatibility:
1600 ac_top_builddir=$ac_top_build_prefix
1601
1602 case $srcdir in
1603   .)  # We are building in place.
1604     ac_srcdir=.
1605     ac_top_srcdir=$ac_top_builddir_sub
1606     ac_abs_top_srcdir=$ac_pwd ;;
1607   [\\/]* | ?:[\\/]* )  # Absolute name.
1608     ac_srcdir=$srcdir$ac_dir_suffix;
1609     ac_top_srcdir=$srcdir
1610     ac_abs_top_srcdir=$srcdir ;;
1611   *) # Relative name.
1612     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1613     ac_top_srcdir=$ac_top_build_prefix$srcdir
1614     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1615 esac
1616 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1617
1618     cd "$ac_dir" || { ac_status=$?; continue; }
1619     # Check for guested configure.
1620     if test -f "$ac_srcdir/configure.gnu"; then
1621       echo &&
1622       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1623     elif test -f "$ac_srcdir/configure"; then
1624       echo &&
1625       $SHELL "$ac_srcdir/configure" --help=recursive
1626     else
1627       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1628     fi || ac_status=$?
1629     cd "$ac_pwd" || { ac_status=$?; break; }
1630   done
1631 fi
1632
1633 test -n "$ac_init_help" && exit $ac_status
1634 if $ac_init_version; then
1635   cat <<\_ACEOF
1636 configure
1637 generated by GNU Autoconf 2.63
1638
1639 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1640 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1641 This configure script is free software; the Free Software Foundation
1642 gives unlimited permission to copy, distribute and modify it.
1643 _ACEOF
1644   exit
1645 fi
1646 cat >config.log <<_ACEOF
1647 This file contains any messages produced by compilers while
1648 running configure, to aid debugging if configure makes a mistake.
1649
1650 It was created by $as_me, which was
1651 generated by GNU Autoconf 2.63.  Invocation command line was
1652
1653   $ $0 $@
1654
1655 _ACEOF
1656 exec 5>>config.log
1657 {
1658 cat <<_ASUNAME
1659 ## --------- ##
1660 ## Platform. ##
1661 ## --------- ##
1662
1663 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1664 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1665 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1666 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1667 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1668
1669 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1670 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1671
1672 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1673 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1674 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1675 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1676 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1677 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1678 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1679
1680 _ASUNAME
1681
1682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1683 for as_dir in $PATH
1684 do
1685   IFS=$as_save_IFS
1686   test -z "$as_dir" && as_dir=.
1687   $as_echo "PATH: $as_dir"
1688 done
1689 IFS=$as_save_IFS
1690
1691 } >&5
1692
1693 cat >&5 <<_ACEOF
1694
1695
1696 ## ----------- ##
1697 ## Core tests. ##
1698 ## ----------- ##
1699
1700 _ACEOF
1701
1702
1703 # Keep a trace of the command line.
1704 # Strip out --no-create and --no-recursion so they do not pile up.
1705 # Strip out --silent because we don't want to record it for future runs.
1706 # Also quote any args containing shell meta-characters.
1707 # Make two passes to allow for proper duplicate-argument suppression.
1708 ac_configure_args=
1709 ac_configure_args0=
1710 ac_configure_args1=
1711 ac_must_keep_next=false
1712 for ac_pass in 1 2
1713 do
1714   for ac_arg
1715   do
1716     case $ac_arg in
1717     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1718     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1719     | -silent | --silent | --silen | --sile | --sil)
1720       continue ;;
1721     *\'*)
1722       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1723     esac
1724     case $ac_pass in
1725     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1726     2)
1727       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1728       if test $ac_must_keep_next = true; then
1729         ac_must_keep_next=false # Got value, back to normal.
1730       else
1731         case $ac_arg in
1732           *=* | --config-cache | -C | -disable-* | --disable-* \
1733           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1734           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1735           | -with-* | --with-* | -without-* | --without-* | --x)
1736             case "$ac_configure_args0 " in
1737               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1738             esac
1739             ;;
1740           -* ) ac_must_keep_next=true ;;
1741         esac
1742       fi
1743       ac_configure_args="$ac_configure_args '$ac_arg'"
1744       ;;
1745     esac
1746   done
1747 done
1748 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1749 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1750
1751 # When interrupted or exit'd, cleanup temporary files, and complete
1752 # config.log.  We remove comments because anyway the quotes in there
1753 # would cause problems or look ugly.
1754 # WARNING: Use '\'' to represent an apostrophe within the trap.
1755 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1756 trap 'exit_status=$?
1757   # Save into config.log some information that might help in debugging.
1758   {
1759     echo
1760
1761     cat <<\_ASBOX
1762 ## ---------------- ##
1763 ## Cache variables. ##
1764 ## ---------------- ##
1765 _ASBOX
1766     echo
1767     # The following way of writing the cache mishandles newlines in values,
1768 (
1769   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1770     eval ac_val=\$$ac_var
1771     case $ac_val in #(
1772     *${as_nl}*)
1773       case $ac_var in #(
1774       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1775 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1776       esac
1777       case $ac_var in #(
1778       _ | IFS | as_nl) ;; #(
1779       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1780       *) $as_unset $ac_var ;;
1781       esac ;;
1782     esac
1783   done
1784   (set) 2>&1 |
1785     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1786     *${as_nl}ac_space=\ *)
1787       sed -n \
1788         "s/'\''/'\''\\\\'\'''\''/g;
1789           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1790       ;; #(
1791     *)
1792       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1793       ;;
1794     esac |
1795     sort
1796 )
1797     echo
1798
1799     cat <<\_ASBOX
1800 ## ----------------- ##
1801 ## Output variables. ##
1802 ## ----------------- ##
1803 _ASBOX
1804     echo
1805     for ac_var in $ac_subst_vars
1806     do
1807       eval ac_val=\$$ac_var
1808       case $ac_val in
1809       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1810       esac
1811       $as_echo "$ac_var='\''$ac_val'\''"
1812     done | sort
1813     echo
1814
1815     if test -n "$ac_subst_files"; then
1816       cat <<\_ASBOX
1817 ## ------------------- ##
1818 ## File substitutions. ##
1819 ## ------------------- ##
1820 _ASBOX
1821       echo
1822       for ac_var in $ac_subst_files
1823       do
1824         eval ac_val=\$$ac_var
1825         case $ac_val in
1826         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1827         esac
1828         $as_echo "$ac_var='\''$ac_val'\''"
1829       done | sort
1830       echo
1831     fi
1832
1833     if test -s confdefs.h; then
1834       cat <<\_ASBOX
1835 ## ----------- ##
1836 ## confdefs.h. ##
1837 ## ----------- ##
1838 _ASBOX
1839       echo
1840       cat confdefs.h
1841       echo
1842     fi
1843     test "$ac_signal" != 0 &&
1844       $as_echo "$as_me: caught signal $ac_signal"
1845     $as_echo "$as_me: exit $exit_status"
1846   } >&5
1847   rm -f core *.core core.conftest.* &&
1848     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1849     exit $exit_status
1850 ' 0
1851 for ac_signal in 1 2 13 15; do
1852   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1853 done
1854 ac_signal=0
1855
1856 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1857 rm -f -r conftest* confdefs.h
1858
1859 # Predefined preprocessor variables.
1860
1861 cat >>confdefs.h <<_ACEOF
1862 #define PACKAGE_NAME "$PACKAGE_NAME"
1863 _ACEOF
1864
1865
1866 cat >>confdefs.h <<_ACEOF
1867 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1868 _ACEOF
1869
1870
1871 cat >>confdefs.h <<_ACEOF
1872 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1873 _ACEOF
1874
1875
1876 cat >>confdefs.h <<_ACEOF
1877 #define PACKAGE_STRING "$PACKAGE_STRING"
1878 _ACEOF
1879
1880
1881 cat >>confdefs.h <<_ACEOF
1882 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1883 _ACEOF
1884
1885
1886 # Let the site file select an alternate cache file if it wants to.
1887 # Prefer an explicitly selected file to automatically selected ones.
1888 ac_site_file1=NONE
1889 ac_site_file2=NONE
1890 if test -n "$CONFIG_SITE"; then
1891   ac_site_file1=$CONFIG_SITE
1892 elif test "x$prefix" != xNONE; then
1893   ac_site_file1=$prefix/share/config.site
1894   ac_site_file2=$prefix/etc/config.site
1895 else
1896   ac_site_file1=$ac_default_prefix/share/config.site
1897   ac_site_file2=$ac_default_prefix/etc/config.site
1898 fi
1899 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1900 do
1901   test "x$ac_site_file" = xNONE && continue
1902   if test -r "$ac_site_file"; then
1903     { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1904 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1905     sed 's/^/| /' "$ac_site_file" >&5
1906     . "$ac_site_file"
1907   fi
1908 done
1909
1910 if test -r "$cache_file"; then
1911   # Some versions of bash will fail to source /dev/null (special
1912   # files actually), so we avoid doing that.
1913   if test -f "$cache_file"; then
1914     { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1915 $as_echo "$as_me: loading cache $cache_file" >&6;}
1916     case $cache_file in
1917       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1918       *)                      . "./$cache_file";;
1919     esac
1920   fi
1921 else
1922   { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1923 $as_echo "$as_me: creating cache $cache_file" >&6;}
1924   >$cache_file
1925 fi
1926
1927 # Check that the precious variables saved in the cache have kept the same
1928 # value.
1929 ac_cache_corrupted=false
1930 for ac_var in $ac_precious_vars; do
1931   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1932   eval ac_new_set=\$ac_env_${ac_var}_set
1933   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1934   eval ac_new_val=\$ac_env_${ac_var}_value
1935   case $ac_old_set,$ac_new_set in
1936     set,)
1937       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1938 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1939       ac_cache_corrupted=: ;;
1940     ,set)
1941       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1942 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1943       ac_cache_corrupted=: ;;
1944     ,);;
1945     *)
1946       if test "x$ac_old_val" != "x$ac_new_val"; then
1947         # differences in whitespace do not lead to failure.
1948         ac_old_val_w=`echo x $ac_old_val`
1949         ac_new_val_w=`echo x $ac_new_val`
1950         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1951           { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1952 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1953           ac_cache_corrupted=:
1954         else
1955           { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1956 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1957           eval $ac_var=\$ac_old_val
1958         fi
1959         { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1960 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1961         { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1962 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1963       fi;;
1964   esac
1965   # Pass precious variables to config.status.
1966   if test "$ac_new_set" = set; then
1967     case $ac_new_val in
1968     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1969     *) ac_arg=$ac_var=$ac_new_val ;;
1970     esac
1971     case " $ac_configure_args " in
1972       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1973       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1974     esac
1975   fi
1976 done
1977 if $ac_cache_corrupted; then
1978   { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1979 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1980   { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1981 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1982   { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1983 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1984    { (exit 1); exit 1; }; }
1985 fi
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003 ac_ext=c
2004 ac_cpp='$CPP $CPPFLAGS'
2005 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2006 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2007 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2008
2009
2010 ac_config_headers="$ac_config_headers config.h"
2011
2012
2013 echo "current directory: `pwd`"
2014 echo "command line was: $0 $@"
2015
2016 ###############################################################################
2017 #
2018 #       Autoheader stuff
2019 #
2020 ###############################################################################
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031 # This only ever existed in X11R4 and X11R5.
2032 #AH_TEMPLATE([HAVE_XIDLE_EXTENSION],
2033 #           [Define this if you have the XIDLE extension installed. If you
2034 #           have the XIDLE extension, this is recommended.  (You have this
2035 #           extension if the file /usr/include/X11/extensions/xidle.h
2036 #           exists.) Turning on this flag lets XScreenSaver work better with
2037 #           servers which support this extension; but it will still work
2038 #           with servers which do not suport it, so it's a good idea to
2039 #           compile in support for it if you can.])
2040
2041 # Using this extension will crash your X server and make fading not work.
2042 #AH_TEMPLATE([HAVE_MIT_SAVER_EXTENSION],
2043 #           [Define this if you have the MIT-SCREEN-SAVER extension
2044 #            installed.  See the caveats about this extension, above.
2045 #            (It's available if /usr/include/X11/extensions/scrnsaver.h
2046 #            exists.)])
2047
2048 # This only ever existed on SGI hardware.
2049 #AH_TEMPLATE([HAVE_SGI_SAVER_EXTENSION],
2050 #           [Define this if you have the SGI SCREEN_SAVER extension.  This is
2051 #           standard on Irix systems, and not available elsewhere.])
2052
2053 # This only ever existed on SGI hardware.
2054 #AH_TEMPLATE([HAVE_SGI_VC_EXTENSION],
2055 #           [Define this if you have the SGI-VIDEO-CONTROL extension.  This
2056 #           is standard on Irix systems, and not available elsewhere.])
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225 # After checking to see that --srcdir is correct (which AC_INIT does)
2226 # check for some random other files that come later in the tar file,
2227 # to make sure everything is here.
2228 #
2229 for d in driver utils hacks hacks/glx ; do
2230   f=$srcdir/$d/Makefile.in
2231   if test \! -r $f ; then
2232     echo ""
2233     echo "ERROR: The package is incomplete: $f does not exist."
2234     echo "       This probably means that your download was truncated."
2235     echo ""
2236     exit 1
2237   fi
2238 done
2239
2240 ###############################################################################
2241 #
2242 #       Function to figure out how to run the compiler.
2243 #
2244 ###############################################################################
2245
2246
2247
2248
2249 ###############################################################################
2250 #
2251 #       Check for availability of various gcc command-line options.
2252 #
2253 ###############################################################################
2254
2255
2256
2257
2258
2259
2260
2261 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2262 # around an Apple-specific gcc bug.
2263 #
2264
2265
2266 ###############################################################################
2267 #
2268 #       Function to figure out how to disable // comments in ANSI C code.
2269 #
2270 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2271 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2272 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2273 #       so much for compatibility!)
2274 #
2275 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2276 #       declarations preceed statements, without resorting to "-pedantic".
2277 #       This means that there is no way to get gcc3 to issue warnings that
2278 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2279 #       also drowning in totally useless warnings.  Thank you master may I
2280 #       have another.
2281 #
2282 #       So, I give up, let's just use -pedantic.
2283 #
2284 ###############################################################################
2285
2286
2287
2288
2289
2290
2291 ###############################################################################
2292 #
2293 #       Function to figure out how to create directory trees.
2294 #
2295 ###############################################################################
2296
2297
2298
2299
2300 ###############################################################################
2301 #
2302 #       Function to check whether gettimeofday() exists, and how to call it.
2303 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2304 #
2305 ###############################################################################
2306
2307
2308
2309
2310 ###############################################################################
2311 #
2312 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2313 #
2314 ###############################################################################
2315
2316 # M4 sucks!!  perl sucks too!!
2317
2318 perl_version_cmd='print $]'
2319
2320
2321
2322
2323
2324 ###############################################################################
2325 #
2326 #       Function to demand "bc".  Losers.
2327 #
2328 ###############################################################################
2329
2330
2331
2332 ###############################################################################
2333 #
2334 #       Functions to check how to do ICMP PING requests.
2335 #
2336 ###############################################################################
2337
2338
2339
2340
2341
2342
2343 ###############################################################################
2344 #
2345 #       Functions to check for various X11 crap.
2346 #
2347 ###############################################################################
2348
2349 # Try and find the app-defaults directory.
2350 # It sucks that autoconf doesn't do this already...
2351 #
2352
2353
2354 ###############################################################################
2355 #
2356 #       Handle the --with-x-app-defaults option HERE
2357 #
2358 ###############################################################################
2359
2360
2361 # Check whether --with-x-app-defaults was given.
2362 if test "${with_x_app_defaults+set}" = set; then
2363   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2364 else
2365   eval ac_x_app_defaults="$withval"
2366 fi
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378 # Random special-cases for X on certain pathological OSes.
2379 # You know who you are.
2380 #
2381
2382
2383
2384
2385
2386 ###############################################################################
2387 #
2388 #       Some utility functions to make checking for X things easier.
2389 #
2390 ###############################################################################
2391
2392 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2393 #
2394
2395
2396 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2397 #
2398
2399
2400 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2401 #
2402
2403
2404
2405 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2406 # Use this sparingly; it probably doesn't work very well on X programs.
2407 #
2408
2409
2410 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2411 # (But not the -L directories!)
2412 #
2413
2414
2415
2416
2417 # Usage: HANDLE_X_PATH_ARG([variable_name],
2418 #                          [--command-line-option],
2419 #                          [descriptive string])
2420 #
2421 # All of the --with options take three forms:
2422 #
2423 #   --with-foo (or --with-foo=yes)
2424 #   --without-foo (or --with-foo=no)
2425 #   --with-foo=/DIR
2426 #
2427 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2428 # a directory (string beginning with a slash) it checks to see whether
2429 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2430 # as appropriate.
2431 #
2432
2433
2434
2435
2436 ###############################################################################
2437 ###############################################################################
2438 #
2439 #       End of function definitions.  Now start actually executing stuff.
2440 #
2441 ###############################################################################
2442 ###############################################################################
2443
2444 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2445 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2446 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2447
2448
2449 # random compiler setup
2450 ac_aux_dir=
2451 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2452   if test -f "$ac_dir/install-sh"; then
2453     ac_aux_dir=$ac_dir
2454     ac_install_sh="$ac_aux_dir/install-sh -c"
2455     break
2456   elif test -f "$ac_dir/install.sh"; then
2457     ac_aux_dir=$ac_dir
2458     ac_install_sh="$ac_aux_dir/install.sh -c"
2459     break
2460   elif test -f "$ac_dir/shtool"; then
2461     ac_aux_dir=$ac_dir
2462     ac_install_sh="$ac_aux_dir/shtool install -c"
2463     break
2464   fi
2465 done
2466 if test -z "$ac_aux_dir"; then
2467   { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2468 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2469    { (exit 1); exit 1; }; }
2470 fi
2471
2472 # These three variables are undocumented and unsupported,
2473 # and are intended to be withdrawn in a future Autoconf release.
2474 # They can cause serious problems if a builder's source tree is in a directory
2475 # whose full name contains unusual characters.
2476 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2477 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2478 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2479
2480
2481 # Make sure we can run config.sub.
2482 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2483   { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2484 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2485    { (exit 1); exit 1; }; }
2486
2487 { $as_echo "$as_me:$LINENO: checking build system type" >&5
2488 $as_echo_n "checking build system type... " >&6; }
2489 if test "${ac_cv_build+set}" = set; then
2490   $as_echo_n "(cached) " >&6
2491 else
2492   ac_build_alias=$build_alias
2493 test "x$ac_build_alias" = x &&
2494   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2495 test "x$ac_build_alias" = x &&
2496   { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2497 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2498    { (exit 1); exit 1; }; }
2499 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2500   { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2501 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2502    { (exit 1); exit 1; }; }
2503
2504 fi
2505 { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2506 $as_echo "$ac_cv_build" >&6; }
2507 case $ac_cv_build in
2508 *-*-*) ;;
2509 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2510 $as_echo "$as_me: error: invalid value of canonical build" >&2;}
2511    { (exit 1); exit 1; }; };;
2512 esac
2513 build=$ac_cv_build
2514 ac_save_IFS=$IFS; IFS='-'
2515 set x $ac_cv_build
2516 shift
2517 build_cpu=$1
2518 build_vendor=$2
2519 shift; shift
2520 # Remember, the first character of IFS is used to create $*,
2521 # except with old shells:
2522 build_os=$*
2523 IFS=$ac_save_IFS
2524 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2525
2526
2527 { $as_echo "$as_me:$LINENO: checking host system type" >&5
2528 $as_echo_n "checking host system type... " >&6; }
2529 if test "${ac_cv_host+set}" = set; then
2530   $as_echo_n "(cached) " >&6
2531 else
2532   if test "x$host_alias" = x; then
2533   ac_cv_host=$ac_cv_build
2534 else
2535   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2536     { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2537 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2538    { (exit 1); exit 1; }; }
2539 fi
2540
2541 fi
2542 { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2543 $as_echo "$ac_cv_host" >&6; }
2544 case $ac_cv_host in
2545 *-*-*) ;;
2546 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2547 $as_echo "$as_me: error: invalid value of canonical host" >&2;}
2548    { (exit 1); exit 1; }; };;
2549 esac
2550 host=$ac_cv_host
2551 ac_save_IFS=$IFS; IFS='-'
2552 set x $ac_cv_host
2553 shift
2554 host_cpu=$1
2555 host_vendor=$2
2556 shift; shift
2557 # Remember, the first character of IFS is used to create $*,
2558 # except with old shells:
2559 host_os=$*
2560 IFS=$ac_save_IFS
2561 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2562
2563
2564
2565 ac_ext=c
2566 ac_cpp='$CPP $CPPFLAGS'
2567 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2568 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2569 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2570 if test -n "$ac_tool_prefix"; then
2571   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2572 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2573 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2574 $as_echo_n "checking for $ac_word... " >&6; }
2575 if test "${ac_cv_prog_CC+set}" = set; then
2576   $as_echo_n "(cached) " >&6
2577 else
2578   if test -n "$CC"; then
2579   ac_cv_prog_CC="$CC" # Let the user override the test.
2580 else
2581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2582 for as_dir in $PATH
2583 do
2584   IFS=$as_save_IFS
2585   test -z "$as_dir" && as_dir=.
2586   for ac_exec_ext in '' $ac_executable_extensions; do
2587   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2588     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2589     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2590     break 2
2591   fi
2592 done
2593 done
2594 IFS=$as_save_IFS
2595
2596 fi
2597 fi
2598 CC=$ac_cv_prog_CC
2599 if test -n "$CC"; then
2600   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2601 $as_echo "$CC" >&6; }
2602 else
2603   { $as_echo "$as_me:$LINENO: result: no" >&5
2604 $as_echo "no" >&6; }
2605 fi
2606
2607
2608 fi
2609 if test -z "$ac_cv_prog_CC"; then
2610   ac_ct_CC=$CC
2611   # Extract the first word of "gcc", so it can be a program name with args.
2612 set dummy gcc; ac_word=$2
2613 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2614 $as_echo_n "checking for $ac_word... " >&6; }
2615 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2616   $as_echo_n "(cached) " >&6
2617 else
2618   if test -n "$ac_ct_CC"; then
2619   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2620 else
2621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2622 for as_dir in $PATH
2623 do
2624   IFS=$as_save_IFS
2625   test -z "$as_dir" && as_dir=.
2626   for ac_exec_ext in '' $ac_executable_extensions; do
2627   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2628     ac_cv_prog_ac_ct_CC="gcc"
2629     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2630     break 2
2631   fi
2632 done
2633 done
2634 IFS=$as_save_IFS
2635
2636 fi
2637 fi
2638 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2639 if test -n "$ac_ct_CC"; then
2640   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2641 $as_echo "$ac_ct_CC" >&6; }
2642 else
2643   { $as_echo "$as_me:$LINENO: result: no" >&5
2644 $as_echo "no" >&6; }
2645 fi
2646
2647   if test "x$ac_ct_CC" = x; then
2648     CC=""
2649   else
2650     case $cross_compiling:$ac_tool_warned in
2651 yes:)
2652 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2653 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2654 ac_tool_warned=yes ;;
2655 esac
2656     CC=$ac_ct_CC
2657   fi
2658 else
2659   CC="$ac_cv_prog_CC"
2660 fi
2661
2662 if test -z "$CC"; then
2663           if test -n "$ac_tool_prefix"; then
2664     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2665 set dummy ${ac_tool_prefix}cc; ac_word=$2
2666 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2667 $as_echo_n "checking for $ac_word... " >&6; }
2668 if test "${ac_cv_prog_CC+set}" = set; then
2669   $as_echo_n "(cached) " >&6
2670 else
2671   if test -n "$CC"; then
2672   ac_cv_prog_CC="$CC" # Let the user override the test.
2673 else
2674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2675 for as_dir in $PATH
2676 do
2677   IFS=$as_save_IFS
2678   test -z "$as_dir" && as_dir=.
2679   for ac_exec_ext in '' $ac_executable_extensions; do
2680   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2681     ac_cv_prog_CC="${ac_tool_prefix}cc"
2682     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2683     break 2
2684   fi
2685 done
2686 done
2687 IFS=$as_save_IFS
2688
2689 fi
2690 fi
2691 CC=$ac_cv_prog_CC
2692 if test -n "$CC"; then
2693   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2694 $as_echo "$CC" >&6; }
2695 else
2696   { $as_echo "$as_me:$LINENO: result: no" >&5
2697 $as_echo "no" >&6; }
2698 fi
2699
2700
2701   fi
2702 fi
2703 if test -z "$CC"; then
2704   # Extract the first word of "cc", so it can be a program name with args.
2705 set dummy cc; ac_word=$2
2706 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2707 $as_echo_n "checking for $ac_word... " >&6; }
2708 if test "${ac_cv_prog_CC+set}" = set; then
2709   $as_echo_n "(cached) " >&6
2710 else
2711   if test -n "$CC"; then
2712   ac_cv_prog_CC="$CC" # Let the user override the test.
2713 else
2714   ac_prog_rejected=no
2715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2716 for as_dir in $PATH
2717 do
2718   IFS=$as_save_IFS
2719   test -z "$as_dir" && as_dir=.
2720   for ac_exec_ext in '' $ac_executable_extensions; do
2721   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2722     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2723        ac_prog_rejected=yes
2724        continue
2725      fi
2726     ac_cv_prog_CC="cc"
2727     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2728     break 2
2729   fi
2730 done
2731 done
2732 IFS=$as_save_IFS
2733
2734 if test $ac_prog_rejected = yes; then
2735   # We found a bogon in the path, so make sure we never use it.
2736   set dummy $ac_cv_prog_CC
2737   shift
2738   if test $# != 0; then
2739     # We chose a different compiler from the bogus one.
2740     # However, it has the same basename, so the bogon will be chosen
2741     # first if we set CC to just the basename; use the full file name.
2742     shift
2743     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2744   fi
2745 fi
2746 fi
2747 fi
2748 CC=$ac_cv_prog_CC
2749 if test -n "$CC"; then
2750   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2751 $as_echo "$CC" >&6; }
2752 else
2753   { $as_echo "$as_me:$LINENO: result: no" >&5
2754 $as_echo "no" >&6; }
2755 fi
2756
2757
2758 fi
2759 if test -z "$CC"; then
2760   if test -n "$ac_tool_prefix"; then
2761   for ac_prog in cl.exe
2762   do
2763     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2764 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2765 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2766 $as_echo_n "checking for $ac_word... " >&6; }
2767 if test "${ac_cv_prog_CC+set}" = set; then
2768   $as_echo_n "(cached) " >&6
2769 else
2770   if test -n "$CC"; then
2771   ac_cv_prog_CC="$CC" # Let the user override the test.
2772 else
2773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2774 for as_dir in $PATH
2775 do
2776   IFS=$as_save_IFS
2777   test -z "$as_dir" && as_dir=.
2778   for ac_exec_ext in '' $ac_executable_extensions; do
2779   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2780     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2781     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2782     break 2
2783   fi
2784 done
2785 done
2786 IFS=$as_save_IFS
2787
2788 fi
2789 fi
2790 CC=$ac_cv_prog_CC
2791 if test -n "$CC"; then
2792   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2793 $as_echo "$CC" >&6; }
2794 else
2795   { $as_echo "$as_me:$LINENO: result: no" >&5
2796 $as_echo "no" >&6; }
2797 fi
2798
2799
2800     test -n "$CC" && break
2801   done
2802 fi
2803 if test -z "$CC"; then
2804   ac_ct_CC=$CC
2805   for ac_prog in cl.exe
2806 do
2807   # Extract the first word of "$ac_prog", so it can be a program name with args.
2808 set dummy $ac_prog; ac_word=$2
2809 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2810 $as_echo_n "checking for $ac_word... " >&6; }
2811 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2812   $as_echo_n "(cached) " >&6
2813 else
2814   if test -n "$ac_ct_CC"; then
2815   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2816 else
2817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2818 for as_dir in $PATH
2819 do
2820   IFS=$as_save_IFS
2821   test -z "$as_dir" && as_dir=.
2822   for ac_exec_ext in '' $ac_executable_extensions; do
2823   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2824     ac_cv_prog_ac_ct_CC="$ac_prog"
2825     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2826     break 2
2827   fi
2828 done
2829 done
2830 IFS=$as_save_IFS
2831
2832 fi
2833 fi
2834 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2835 if test -n "$ac_ct_CC"; then
2836   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2837 $as_echo "$ac_ct_CC" >&6; }
2838 else
2839   { $as_echo "$as_me:$LINENO: result: no" >&5
2840 $as_echo "no" >&6; }
2841 fi
2842
2843
2844   test -n "$ac_ct_CC" && break
2845 done
2846
2847   if test "x$ac_ct_CC" = x; then
2848     CC=""
2849   else
2850     case $cross_compiling:$ac_tool_warned in
2851 yes:)
2852 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2853 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2854 ac_tool_warned=yes ;;
2855 esac
2856     CC=$ac_ct_CC
2857   fi
2858 fi
2859
2860 fi
2861
2862
2863 test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2864 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2865 { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2866 See \`config.log' for more details." >&5
2867 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
2868 See \`config.log' for more details." >&2;}
2869    { (exit 1); exit 1; }; }; }
2870
2871 # Provide some information about the compiler.
2872 $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2873 set X $ac_compile
2874 ac_compiler=$2
2875 { (ac_try="$ac_compiler --version >&5"
2876 case "(($ac_try" in
2877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2878   *) ac_try_echo=$ac_try;;
2879 esac
2880 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2881 $as_echo "$ac_try_echo") >&5
2882   (eval "$ac_compiler --version >&5") 2>&5
2883   ac_status=$?
2884   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2885   (exit $ac_status); }
2886 { (ac_try="$ac_compiler -v >&5"
2887 case "(($ac_try" in
2888   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2889   *) ac_try_echo=$ac_try;;
2890 esac
2891 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2892 $as_echo "$ac_try_echo") >&5
2893   (eval "$ac_compiler -v >&5") 2>&5
2894   ac_status=$?
2895   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2896   (exit $ac_status); }
2897 { (ac_try="$ac_compiler -V >&5"
2898 case "(($ac_try" in
2899   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2900   *) ac_try_echo=$ac_try;;
2901 esac
2902 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2903 $as_echo "$ac_try_echo") >&5
2904   (eval "$ac_compiler -V >&5") 2>&5
2905   ac_status=$?
2906   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2907   (exit $ac_status); }
2908
2909 cat >conftest.$ac_ext <<_ACEOF
2910 /* confdefs.h.  */
2911 _ACEOF
2912 cat confdefs.h >>conftest.$ac_ext
2913 cat >>conftest.$ac_ext <<_ACEOF
2914 /* end confdefs.h.  */
2915
2916 int
2917 main ()
2918 {
2919
2920   ;
2921   return 0;
2922 }
2923 _ACEOF
2924 ac_clean_files_save=$ac_clean_files
2925 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2926 # Try to create an executable without -o first, disregard a.out.
2927 # It will help us diagnose broken compilers, and finding out an intuition
2928 # of exeext.
2929 { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2930 $as_echo_n "checking for C compiler default output file name... " >&6; }
2931 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2932
2933 # The possible output files:
2934 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2935
2936 ac_rmfiles=
2937 for ac_file in $ac_files
2938 do
2939   case $ac_file in
2940     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2941     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2942   esac
2943 done
2944 rm -f $ac_rmfiles
2945
2946 if { (ac_try="$ac_link_default"
2947 case "(($ac_try" in
2948   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2949   *) ac_try_echo=$ac_try;;
2950 esac
2951 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2952 $as_echo "$ac_try_echo") >&5
2953   (eval "$ac_link_default") 2>&5
2954   ac_status=$?
2955   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2956   (exit $ac_status); }; then
2957   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2958 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2959 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2960 # so that the user can short-circuit this test for compilers unknown to
2961 # Autoconf.
2962 for ac_file in $ac_files ''
2963 do
2964   test -f "$ac_file" || continue
2965   case $ac_file in
2966     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2967         ;;
2968     [ab].out )
2969         # We found the default executable, but exeext='' is most
2970         # certainly right.
2971         break;;
2972     *.* )
2973         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2974         then :; else
2975            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2976         fi
2977         # We set ac_cv_exeext here because the later test for it is not
2978         # safe: cross compilers may not add the suffix if given an `-o'
2979         # argument, so we may need to know it at that point already.
2980         # Even if this section looks crufty: it has the advantage of
2981         # actually working.
2982         break;;
2983     * )
2984         break;;
2985   esac
2986 done
2987 test "$ac_cv_exeext" = no && ac_cv_exeext=
2988
2989 else
2990   ac_file=''
2991 fi
2992
2993 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2994 $as_echo "$ac_file" >&6; }
2995 if test -z "$ac_file"; then
2996   $as_echo "$as_me: failed program was:" >&5
2997 sed 's/^/| /' conftest.$ac_ext >&5
2998
2999 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3000 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3001 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
3002 See \`config.log' for more details." >&5
3003 $as_echo "$as_me: error: C compiler cannot create executables
3004 See \`config.log' for more details." >&2;}
3005    { (exit 77); exit 77; }; }; }
3006 fi
3007
3008 ac_exeext=$ac_cv_exeext
3009
3010 # Check that the compiler produces executables we can run.  If not, either
3011 # the compiler is broken, or we cross compile.
3012 { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3013 $as_echo_n "checking whether the C compiler works... " >&6; }
3014 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3015 # If not cross compiling, check that we can run a simple program.
3016 if test "$cross_compiling" != yes; then
3017   if { ac_try='./$ac_file'
3018   { (case "(($ac_try" in
3019   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3020   *) ac_try_echo=$ac_try;;
3021 esac
3022 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3023 $as_echo "$ac_try_echo") >&5
3024   (eval "$ac_try") 2>&5
3025   ac_status=$?
3026   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3027   (exit $ac_status); }; }; then
3028     cross_compiling=no
3029   else
3030     if test "$cross_compiling" = maybe; then
3031         cross_compiling=yes
3032     else
3033         { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3034 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3035 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
3036 If you meant to cross compile, use \`--host'.
3037 See \`config.log' for more details." >&5
3038 $as_echo "$as_me: error: cannot run C compiled programs.
3039 If you meant to cross compile, use \`--host'.
3040 See \`config.log' for more details." >&2;}
3041    { (exit 1); exit 1; }; }; }
3042     fi
3043   fi
3044 fi
3045 { $as_echo "$as_me:$LINENO: result: yes" >&5
3046 $as_echo "yes" >&6; }
3047
3048 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3049 ac_clean_files=$ac_clean_files_save
3050 # Check that the compiler produces executables we can run.  If not, either
3051 # the compiler is broken, or we cross compile.
3052 { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3053 $as_echo_n "checking whether we are cross compiling... " >&6; }
3054 { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
3055 $as_echo "$cross_compiling" >&6; }
3056
3057 { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
3058 $as_echo_n "checking for suffix of executables... " >&6; }
3059 if { (ac_try="$ac_link"
3060 case "(($ac_try" in
3061   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3062   *) ac_try_echo=$ac_try;;
3063 esac
3064 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3065 $as_echo "$ac_try_echo") >&5
3066   (eval "$ac_link") 2>&5
3067   ac_status=$?
3068   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3069   (exit $ac_status); }; then
3070   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3071 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3072 # work properly (i.e., refer to `conftest.exe'), while it won't with
3073 # `rm'.
3074 for ac_file in conftest.exe conftest conftest.*; do
3075   test -f "$ac_file" || continue
3076   case $ac_file in
3077     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3078     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3079           break;;
3080     * ) break;;
3081   esac
3082 done
3083 else
3084   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3085 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3086 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3087 See \`config.log' for more details." >&5
3088 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3089 See \`config.log' for more details." >&2;}
3090    { (exit 1); exit 1; }; }; }
3091 fi
3092
3093 rm -rf conftest$ac_cv_exeext
3094 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3095 $as_echo "$ac_cv_exeext" >&6; }
3096
3097 rm -rf conftest.$ac_ext
3098 EXEEXT=$ac_cv_exeext
3099 ac_exeext=$EXEEXT
3100 { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
3101 $as_echo_n "checking for suffix of object files... " >&6; }
3102 if test "${ac_cv_objext+set}" = set; then
3103   $as_echo_n "(cached) " >&6
3104 else
3105   cat >conftest.$ac_ext <<_ACEOF
3106 /* confdefs.h.  */
3107 _ACEOF
3108 cat confdefs.h >>conftest.$ac_ext
3109 cat >>conftest.$ac_ext <<_ACEOF
3110 /* end confdefs.h.  */
3111
3112 int
3113 main ()
3114 {
3115
3116   ;
3117   return 0;
3118 }
3119 _ACEOF
3120 rm -rf conftest.o conftest.obj
3121 if { (ac_try="$ac_compile"
3122 case "(($ac_try" in
3123   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3124   *) ac_try_echo=$ac_try;;
3125 esac
3126 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3127 $as_echo "$ac_try_echo") >&5
3128   (eval "$ac_compile") 2>&5
3129   ac_status=$?
3130   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3131   (exit $ac_status); }; then
3132   for ac_file in conftest.o conftest.obj conftest.*; do
3133   test -f "$ac_file" || continue;
3134   case $ac_file in
3135     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3136     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3137        break;;
3138   esac
3139 done
3140 else
3141   $as_echo "$as_me: failed program was:" >&5
3142 sed 's/^/| /' conftest.$ac_ext >&5
3143
3144 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3145 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3146 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3147 See \`config.log' for more details." >&5
3148 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3149 See \`config.log' for more details." >&2;}
3150    { (exit 1); exit 1; }; }; }
3151 fi
3152
3153 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
3154 fi
3155 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3156 $as_echo "$ac_cv_objext" >&6; }
3157 OBJEXT=$ac_cv_objext
3158 ac_objext=$OBJEXT
3159 { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3160 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3161 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3162   $as_echo_n "(cached) " >&6
3163 else
3164   cat >conftest.$ac_ext <<_ACEOF
3165 /* confdefs.h.  */
3166 _ACEOF
3167 cat confdefs.h >>conftest.$ac_ext
3168 cat >>conftest.$ac_ext <<_ACEOF
3169 /* end confdefs.h.  */
3170
3171 int
3172 main ()
3173 {
3174 #ifndef __GNUC__
3175        choke me
3176 #endif
3177
3178   ;
3179   return 0;
3180 }
3181 _ACEOF
3182 rm -rf conftest.$ac_objext
3183 if { (ac_try="$ac_compile"
3184 case "(($ac_try" in
3185   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3186   *) ac_try_echo=$ac_try;;
3187 esac
3188 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3189 $as_echo "$ac_try_echo") >&5
3190   (eval "$ac_compile") 2>conftest.er1
3191   ac_status=$?
3192   grep -v '^ *+' conftest.er1 >conftest.err
3193   rm -rf conftest.er1
3194   cat conftest.err >&5
3195   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3196   (exit $ac_status); } && {
3197          test -z "$ac_c_werror_flag" ||
3198          test ! -s conftest.err
3199        } && test -s conftest.$ac_objext; then
3200   ac_compiler_gnu=yes
3201 else
3202   $as_echo "$as_me: failed program was:" >&5
3203 sed 's/^/| /' conftest.$ac_ext >&5
3204
3205         ac_compiler_gnu=no
3206 fi
3207
3208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3209 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3210
3211 fi
3212 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3213 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3214 if test $ac_compiler_gnu = yes; then
3215   GCC=yes
3216 else
3217   GCC=
3218 fi
3219 ac_test_CFLAGS=${CFLAGS+set}
3220 ac_save_CFLAGS=$CFLAGS
3221 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3222 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3223 if test "${ac_cv_prog_cc_g+set}" = set; then
3224   $as_echo_n "(cached) " >&6
3225 else
3226   ac_save_c_werror_flag=$ac_c_werror_flag
3227    ac_c_werror_flag=yes
3228    ac_cv_prog_cc_g=no
3229    CFLAGS="-g"
3230    cat >conftest.$ac_ext <<_ACEOF
3231 /* confdefs.h.  */
3232 _ACEOF
3233 cat confdefs.h >>conftest.$ac_ext
3234 cat >>conftest.$ac_ext <<_ACEOF
3235 /* end confdefs.h.  */
3236
3237 int
3238 main ()
3239 {
3240
3241   ;
3242   return 0;
3243 }
3244 _ACEOF
3245 rm -rf conftest.$ac_objext
3246 if { (ac_try="$ac_compile"
3247 case "(($ac_try" in
3248   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3249   *) ac_try_echo=$ac_try;;
3250 esac
3251 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3252 $as_echo "$ac_try_echo") >&5
3253   (eval "$ac_compile") 2>conftest.er1
3254   ac_status=$?
3255   grep -v '^ *+' conftest.er1 >conftest.err
3256   rm -rf conftest.er1
3257   cat conftest.err >&5
3258   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3259   (exit $ac_status); } && {
3260          test -z "$ac_c_werror_flag" ||
3261          test ! -s conftest.err
3262        } && test -s conftest.$ac_objext; then
3263   ac_cv_prog_cc_g=yes
3264 else
3265   $as_echo "$as_me: failed program was:" >&5
3266 sed 's/^/| /' conftest.$ac_ext >&5
3267
3268         CFLAGS=""
3269       cat >conftest.$ac_ext <<_ACEOF
3270 /* confdefs.h.  */
3271 _ACEOF
3272 cat confdefs.h >>conftest.$ac_ext
3273 cat >>conftest.$ac_ext <<_ACEOF
3274 /* end confdefs.h.  */
3275
3276 int
3277 main ()
3278 {
3279
3280   ;
3281   return 0;
3282 }
3283 _ACEOF
3284 rm -rf conftest.$ac_objext
3285 if { (ac_try="$ac_compile"
3286 case "(($ac_try" in
3287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3288   *) ac_try_echo=$ac_try;;
3289 esac
3290 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3291 $as_echo "$ac_try_echo") >&5
3292   (eval "$ac_compile") 2>conftest.er1
3293   ac_status=$?
3294   grep -v '^ *+' conftest.er1 >conftest.err
3295   rm -rf conftest.er1
3296   cat conftest.err >&5
3297   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3298   (exit $ac_status); } && {
3299          test -z "$ac_c_werror_flag" ||
3300          test ! -s conftest.err
3301        } && test -s conftest.$ac_objext; then
3302   :
3303 else
3304   $as_echo "$as_me: failed program was:" >&5
3305 sed 's/^/| /' conftest.$ac_ext >&5
3306
3307         ac_c_werror_flag=$ac_save_c_werror_flag
3308          CFLAGS="-g"
3309          cat >conftest.$ac_ext <<_ACEOF
3310 /* confdefs.h.  */
3311 _ACEOF
3312 cat confdefs.h >>conftest.$ac_ext
3313 cat >>conftest.$ac_ext <<_ACEOF
3314 /* end confdefs.h.  */
3315
3316 int
3317 main ()
3318 {
3319
3320   ;
3321   return 0;
3322 }
3323 _ACEOF
3324 rm -rf conftest.$ac_objext
3325 if { (ac_try="$ac_compile"
3326 case "(($ac_try" in
3327   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3328   *) ac_try_echo=$ac_try;;
3329 esac
3330 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3331 $as_echo "$ac_try_echo") >&5
3332   (eval "$ac_compile") 2>conftest.er1
3333   ac_status=$?
3334   grep -v '^ *+' conftest.er1 >conftest.err
3335   rm -rf conftest.er1
3336   cat conftest.err >&5
3337   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3338   (exit $ac_status); } && {
3339          test -z "$ac_c_werror_flag" ||
3340          test ! -s conftest.err
3341        } && test -s conftest.$ac_objext; then
3342   ac_cv_prog_cc_g=yes
3343 else
3344   $as_echo "$as_me: failed program was:" >&5
3345 sed 's/^/| /' conftest.$ac_ext >&5
3346
3347
3348 fi
3349
3350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3351 fi
3352
3353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3354 fi
3355
3356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3357    ac_c_werror_flag=$ac_save_c_werror_flag
3358 fi
3359 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3360 $as_echo "$ac_cv_prog_cc_g" >&6; }
3361 if test "$ac_test_CFLAGS" = set; then
3362   CFLAGS=$ac_save_CFLAGS
3363 elif test $ac_cv_prog_cc_g = yes; then
3364   if test "$GCC" = yes; then
3365     CFLAGS="-g -O2"
3366   else
3367     CFLAGS="-g"
3368   fi
3369 else
3370   if test "$GCC" = yes; then
3371     CFLAGS="-O2"
3372   else
3373     CFLAGS=
3374   fi
3375 fi
3376 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3377 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3378 if test "${ac_cv_prog_cc_c89+set}" = set; then
3379   $as_echo_n "(cached) " >&6
3380 else
3381   ac_cv_prog_cc_c89=no
3382 ac_save_CC=$CC
3383 cat >conftest.$ac_ext <<_ACEOF
3384 /* confdefs.h.  */
3385 _ACEOF
3386 cat confdefs.h >>conftest.$ac_ext
3387 cat >>conftest.$ac_ext <<_ACEOF
3388 /* end confdefs.h.  */
3389 #include <stdarg.h>
3390 #include <stdio.h>
3391 #include <sys/types.h>
3392 #include <sys/stat.h>
3393 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3394 struct buf { int x; };
3395 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3396 static char *e (p, i)
3397      char **p;
3398      int i;
3399 {
3400   return p[i];
3401 }
3402 static char *f (char * (*g) (char **, int), char **p, ...)
3403 {
3404   char *s;
3405   va_list v;
3406   va_start (v,p);
3407   s = g (p, va_arg (v,int));
3408   va_end (v);
3409   return s;
3410 }
3411
3412 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3413    function prototypes and stuff, but not '\xHH' hex character constants.
3414    These don't provoke an error unfortunately, instead are silently treated
3415    as 'x'.  The following induces an error, until -std is added to get
3416    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3417    array size at least.  It's necessary to write '\x00'==0 to get something
3418    that's true only with -std.  */
3419 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3420
3421 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3422    inside strings and character constants.  */
3423 #define FOO(x) 'x'
3424 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3425
3426 int test (int i, double x);
3427 struct s1 {int (*f) (int a);};
3428 struct s2 {int (*f) (double a);};
3429 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3430 int argc;
3431 char **argv;
3432 int
3433 main ()
3434 {
3435 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3436   ;
3437   return 0;
3438 }
3439 _ACEOF
3440 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3441         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3442 do
3443   CC="$ac_save_CC $ac_arg"
3444   rm -rf conftest.$ac_objext
3445 if { (ac_try="$ac_compile"
3446 case "(($ac_try" in
3447   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3448   *) ac_try_echo=$ac_try;;
3449 esac
3450 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3451 $as_echo "$ac_try_echo") >&5
3452   (eval "$ac_compile") 2>conftest.er1
3453   ac_status=$?
3454   grep -v '^ *+' conftest.er1 >conftest.err
3455   rm -rf conftest.er1
3456   cat conftest.err >&5
3457   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3458   (exit $ac_status); } && {
3459          test -z "$ac_c_werror_flag" ||
3460          test ! -s conftest.err
3461        } && test -s conftest.$ac_objext; then
3462   ac_cv_prog_cc_c89=$ac_arg
3463 else
3464   $as_echo "$as_me: failed program was:" >&5
3465 sed 's/^/| /' conftest.$ac_ext >&5
3466
3467
3468 fi
3469
3470 rm -f core conftest.err conftest.$ac_objext
3471   test "x$ac_cv_prog_cc_c89" != "xno" && break
3472 done
3473 rm -rf conftest.$ac_ext
3474 CC=$ac_save_CC
3475
3476 fi
3477 # AC_CACHE_VAL
3478 case "x$ac_cv_prog_cc_c89" in
3479   x)
3480     { $as_echo "$as_me:$LINENO: result: none needed" >&5
3481 $as_echo "none needed" >&6; } ;;
3482   xno)
3483     { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3484 $as_echo "unsupported" >&6; } ;;
3485   *)
3486     CC="$CC $ac_cv_prog_cc_c89"
3487     { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3488 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3489 esac
3490
3491
3492 ac_ext=c
3493 ac_cpp='$CPP $CPPFLAGS'
3494 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3495 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3496 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3497
3498
3499   if test -z "$GCC"; then
3500     # not using GCC
3501     { $as_echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3502 $as_echo_n "checking how to request ANSI compilation... " >&6; }
3503     case "$host" in
3504       *-hpux* )
3505         { $as_echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3506 $as_echo "HPUX: adding -Ae" >&6; }
3507         CC="$CC -Ae"
3508       ;;
3509       *-aix* )
3510         { $as_echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3511 $as_echo "AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3512         CC="$CC -qlanglvl=ansi -qhalt=e"
3513       ;;
3514       *-dec-* )
3515         { $as_echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3516 $as_echo "DEC: adding -std1 -ieee" >&6; }
3517         CC="$CC -std1"
3518       ;;
3519       *)
3520         { $as_echo "$as_me:$LINENO: result: no idea" >&5
3521 $as_echo "no idea" >&6; }
3522       ;;
3523     esac
3524   else
3525     # using GCC
3526     case "$host" in
3527       *-solaris*)
3528         { $as_echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3529 $as_echo "Solaris: adding -D__EXTENSIONS__" >&6; }
3530         CC="$CC -D__EXTENSIONS__"
3531       ;;
3532     esac
3533   fi
3534
3535   OBJCC="$CC"
3536
3537   { $as_echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3538 $as_echo_n "checking whether the compiler works on ANSI C... " >&6; }
3539   if test "$cross_compiling" = yes; then
3540   { { $as_echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3541 $as_echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3542    { (exit 1); exit 1; }; }
3543 else
3544   cat >conftest.$ac_ext <<_ACEOF
3545 /* confdefs.h.  */
3546 _ACEOF
3547 cat confdefs.h >>conftest.$ac_ext
3548 cat >>conftest.$ac_ext <<_ACEOF
3549 /* end confdefs.h.  */
3550  main(int ac, char **av) { return 0; }
3551 _ACEOF
3552 rm -rf conftest$ac_exeext
3553 if { (ac_try="$ac_link"
3554 case "(($ac_try" in
3555   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3556   *) ac_try_echo=$ac_try;;
3557 esac
3558 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3559 $as_echo "$ac_try_echo") >&5
3560   (eval "$ac_link") 2>&5
3561   ac_status=$?
3562   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3563   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3564   { (case "(($ac_try" in
3565   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3566   *) ac_try_echo=$ac_try;;
3567 esac
3568 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3569 $as_echo "$ac_try_echo") >&5
3570   (eval "$ac_try") 2>&5
3571   ac_status=$?
3572   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3573   (exit $ac_status); }; }; then
3574   { $as_echo "$as_me:$LINENO: result: yes" >&5
3575 $as_echo "yes" >&6; }
3576 else
3577   $as_echo "$as_me: program exited with status $ac_status" >&5
3578 $as_echo "$as_me: failed program was:" >&5
3579 sed 's/^/| /' conftest.$ac_ext >&5
3580
3581 ( exit $ac_status )
3582 { $as_echo "$as_me:$LINENO: result: no" >&5
3583 $as_echo "no" >&6; }
3584      { { $as_echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3585 $as_echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3586    { (exit 1); exit 1; }; }
3587 fi
3588 rm -rf conftest.dSYM
3589 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3590 fi
3591
3592
3593
3594   if test -n "$GCC"; then
3595     { $as_echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3596 $as_echo "Turning on gcc compiler warnings." >&6; }
3597     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3598     OBJCC="$OBJCC -Wall"
3599     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
3600     # and so perhaps now we can do without -pedantic?
3601   else
3602     case "$host" in
3603       *-irix5* |*-irix6.0-3* )
3604         { $as_echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3605 $as_echo "Turning on SGI compiler warnings." >&6; }
3606         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3607       ;;
3608 #     *-dec-osf* )
3609 #       if test -z "$GCC"; then
3610 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3611 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3612 #       fi
3613 #     ;;
3614     esac
3615   fi
3616
3617 if test -n "$GCC"; then
3618    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -Wno-overlength-strings" >&5
3619 $as_echo_n "checking whether gcc accepts -Wno-overlength-strings... " >&6; }
3620 if test "${ac_cv_gcc_accepts_no_overlength+set}" = set; then
3621   $as_echo_n "(cached) " >&6
3622 else
3623   rm -rf conftest.$ac_ext
3624      touch conftest.$ac_ext
3625      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3626           grep unrecognized >/dev/null ); then
3627        ac_cv_gcc_accepts_no_overlength=no
3628      else
3629        ac_cv_gcc_accepts_no_overlength=yes
3630        CC="$CC -Wno-overlength-strings"
3631      fi
3632 fi
3633 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
3634 $as_echo "$ac_cv_gcc_accepts_no_overlength" >&6; }
3635    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
3636   fi
3637
3638 if test -n "$GCC"; then
3639    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3640 $as_echo_n "checking whether gcc accepts -Wdeclaration-after-statement... " >&6; }
3641 if test "${ac_cv_gcc_accepts_no_decl_after+set}" = set; then
3642   $as_echo_n "(cached) " >&6
3643 else
3644   rm -rf conftest.$ac_ext
3645      touch conftest.$ac_ext
3646      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3647           grep unrecognized >/dev/null ); then
3648        ac_cv_gcc_accepts_no_decl_after=no
3649      else
3650        ac_cv_gcc_accepts_no_decl_after=yes
3651        CC="$CC -Wdeclaration-after-statement"
3652      fi
3653 fi
3654 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
3655 $as_echo "$ac_cv_gcc_accepts_no_decl_after" >&6; }
3656    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
3657   fi
3658
3659 if test -n "$GCC"; then
3660    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3661 $as_echo_n "checking whether gcc accepts -no-cpp-precomp... " >&6; }
3662 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3663   $as_echo_n "(cached) " >&6
3664 else
3665   rm -rf conftest.$ac_ext
3666      touch conftest.$ac_ext
3667      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3668           grep unrecognized >/dev/null ); then
3669        ac_cv_gcc_accepts_no_cpp_precomp=no
3670      else
3671        ac_cv_gcc_accepts_no_cpp_precomp=yes
3672        CC="$CC -no-cpp-precomp"
3673      fi
3674 fi
3675 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3676 $as_echo "$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3677    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3678   fi
3679
3680 if test -n "$GCC"; then
3681
3682   case "$host" in
3683     *-darwin* )
3684       # Fucking Apple let // comments sneak into OpenGL headers, so
3685       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
3686     ;;
3687    *)
3688      if test -n "$GCC"; then
3689    { $as_echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
3690 $as_echo_n "checking whether gcc accepts -std=c89... " >&6; }
3691 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3692   $as_echo_n "(cached) " >&6
3693 else
3694   rm -rf conftest.$ac_ext
3695      touch conftest.$ac_ext
3696      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3697           grep unrecognized >/dev/null ); then
3698        ac_cv_gcc_accepts_std=no
3699      else
3700        ac_cv_gcc_accepts_std=yes
3701        CC="$CC -std=c89"
3702      fi
3703 fi
3704 { $as_echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3705 $as_echo "$ac_cv_gcc_accepts_std" >&6; }
3706    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3707   fi
3708
3709    ;;
3710   esac
3711
3712    { $as_echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3713 $as_echo "Disabling C++ comments in ANSI C code." >&6; }
3714    #
3715    # The reason that // comments are banned from xscreensaver is that gcc is
3716    # basically the only compiler in the world that supports them in C code.
3717    # All other vendors support them only in their C++ compilers, not in their
3718    # ANSI C compilers.  This means that it's a portability problem: every time
3719    # these comments have snuck into the xscreensaver source code, I've gotten
3720    # complaints about it the next day.  So we turn off support for them in gcc
3721    # as well to prevent them from accidentially slipping in.
3722    #
3723    if test "$ac_gcc_accepts_std" = yes ; then
3724      #
3725      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3726      # (That appears to be the only additional preprocessor symbol
3727      # it defines, in addition to the syntax changes it makes.)
3728      #
3729      # -std=gnu89 is no good, because // comments were a GNU extension
3730      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3731      # with -std=gnu89 but not with -std=c89.)
3732      #
3733      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
3734      CC="$CC -U__STRICT_ANSI__"
3735 #   else
3736 #     # The old way:
3737 #     CC="$CC -Wp,-lang-c89"
3738    fi
3739   fi
3740
3741 ac_ext=c
3742 ac_cpp='$CPP $CPPFLAGS'
3743 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3744 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3745 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3746 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3747 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3748 # On Suns, sometimes $CPP names a directory.
3749 if test -n "$CPP" && test -d "$CPP"; then
3750   CPP=
3751 fi
3752 if test -z "$CPP"; then
3753   if test "${ac_cv_prog_CPP+set}" = set; then
3754   $as_echo_n "(cached) " >&6
3755 else
3756       # Double quotes because CPP needs to be expanded
3757     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3758     do
3759       ac_preproc_ok=false
3760 for ac_c_preproc_warn_flag in '' yes
3761 do
3762   # Use a header file that comes with gcc, so configuring glibc
3763   # with a fresh cross-compiler works.
3764   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3765   # <limits.h> exists even on freestanding compilers.
3766   # On the NeXT, cc -E runs the code through the compiler's parser,
3767   # not just through cpp. "Syntax error" is here to catch this case.
3768   cat >conftest.$ac_ext <<_ACEOF
3769 /* confdefs.h.  */
3770 _ACEOF
3771 cat confdefs.h >>conftest.$ac_ext
3772 cat >>conftest.$ac_ext <<_ACEOF
3773 /* end confdefs.h.  */
3774 #ifdef __STDC__
3775 # include <limits.h>
3776 #else
3777 # include <assert.h>
3778 #endif
3779                      Syntax error
3780 _ACEOF
3781 if { (ac_try="$ac_cpp conftest.$ac_ext"
3782 case "(($ac_try" in
3783   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3784   *) ac_try_echo=$ac_try;;
3785 esac
3786 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3787 $as_echo "$ac_try_echo") >&5
3788   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3789   ac_status=$?
3790   grep -v '^ *+' conftest.er1 >conftest.err
3791   rm -rf conftest.er1
3792   cat conftest.err >&5
3793   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3794   (exit $ac_status); } >/dev/null && {
3795          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3796          test ! -s conftest.err
3797        }; then
3798   :
3799 else
3800   $as_echo "$as_me: failed program was:" >&5
3801 sed 's/^/| /' conftest.$ac_ext >&5
3802
3803   # Broken: fails on valid input.
3804 continue
3805 fi
3806
3807 rm -rf conftest.err conftest.$ac_ext
3808
3809   # OK, works on sane cases.  Now check whether nonexistent headers
3810   # can be detected and how.
3811   cat >conftest.$ac_ext <<_ACEOF
3812 /* confdefs.h.  */
3813 _ACEOF
3814 cat confdefs.h >>conftest.$ac_ext
3815 cat >>conftest.$ac_ext <<_ACEOF
3816 /* end confdefs.h.  */
3817 #include <ac_nonexistent.h>
3818 _ACEOF
3819 if { (ac_try="$ac_cpp conftest.$ac_ext"
3820 case "(($ac_try" in
3821   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3822   *) ac_try_echo=$ac_try;;
3823 esac
3824 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3825 $as_echo "$ac_try_echo") >&5
3826   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3827   ac_status=$?
3828   grep -v '^ *+' conftest.er1 >conftest.err
3829   rm -rf conftest.er1
3830   cat conftest.err >&5
3831   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3832   (exit $ac_status); } >/dev/null && {
3833          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3834          test ! -s conftest.err
3835        }; then
3836   # Broken: success on invalid input.
3837 continue
3838 else
3839   $as_echo "$as_me: failed program was:" >&5
3840 sed 's/^/| /' conftest.$ac_ext >&5
3841
3842   # Passes both tests.
3843 ac_preproc_ok=:
3844 break
3845 fi
3846
3847 rm -rf conftest.err conftest.$ac_ext
3848
3849 done
3850 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3851 rm -rf conftest.err conftest.$ac_ext
3852 if $ac_preproc_ok; then
3853   break
3854 fi
3855
3856     done
3857     ac_cv_prog_CPP=$CPP
3858
3859 fi
3860   CPP=$ac_cv_prog_CPP
3861 else
3862   ac_cv_prog_CPP=$CPP
3863 fi
3864 { $as_echo "$as_me:$LINENO: result: $CPP" >&5
3865 $as_echo "$CPP" >&6; }
3866 ac_preproc_ok=false
3867 for ac_c_preproc_warn_flag in '' yes
3868 do
3869   # Use a header file that comes with gcc, so configuring glibc
3870   # with a fresh cross-compiler works.
3871   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3872   # <limits.h> exists even on freestanding compilers.
3873   # On the NeXT, cc -E runs the code through the compiler's parser,
3874   # not just through cpp. "Syntax error" is here to catch this case.
3875   cat >conftest.$ac_ext <<_ACEOF
3876 /* confdefs.h.  */
3877 _ACEOF
3878 cat confdefs.h >>conftest.$ac_ext
3879 cat >>conftest.$ac_ext <<_ACEOF
3880 /* end confdefs.h.  */
3881 #ifdef __STDC__
3882 # include <limits.h>
3883 #else
3884 # include <assert.h>
3885 #endif
3886                      Syntax error
3887 _ACEOF
3888 if { (ac_try="$ac_cpp conftest.$ac_ext"
3889 case "(($ac_try" in
3890   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3891   *) ac_try_echo=$ac_try;;
3892 esac
3893 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3894 $as_echo "$ac_try_echo") >&5
3895   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3896   ac_status=$?
3897   grep -v '^ *+' conftest.er1 >conftest.err
3898   rm -rf conftest.er1
3899   cat conftest.err >&5
3900   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3901   (exit $ac_status); } >/dev/null && {
3902          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3903          test ! -s conftest.err
3904        }; then
3905   :
3906 else
3907   $as_echo "$as_me: failed program was:" >&5
3908 sed 's/^/| /' conftest.$ac_ext >&5
3909
3910   # Broken: fails on valid input.
3911 continue
3912 fi
3913
3914 rm -rf conftest.err conftest.$ac_ext
3915
3916   # OK, works on sane cases.  Now check whether nonexistent headers
3917   # can be detected and how.
3918   cat >conftest.$ac_ext <<_ACEOF
3919 /* confdefs.h.  */
3920 _ACEOF
3921 cat confdefs.h >>conftest.$ac_ext
3922 cat >>conftest.$ac_ext <<_ACEOF
3923 /* end confdefs.h.  */
3924 #include <ac_nonexistent.h>
3925 _ACEOF
3926 if { (ac_try="$ac_cpp conftest.$ac_ext"
3927 case "(($ac_try" in
3928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3929   *) ac_try_echo=$ac_try;;
3930 esac
3931 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3932 $as_echo "$ac_try_echo") >&5
3933   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3934   ac_status=$?
3935   grep -v '^ *+' conftest.er1 >conftest.err
3936   rm -rf conftest.er1
3937   cat conftest.err >&5
3938   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3939   (exit $ac_status); } >/dev/null && {
3940          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3941          test ! -s conftest.err
3942        }; then
3943   # Broken: success on invalid input.
3944 continue
3945 else
3946   $as_echo "$as_me: failed program was:" >&5
3947 sed 's/^/| /' conftest.$ac_ext >&5
3948
3949   # Passes both tests.
3950 ac_preproc_ok=:
3951 break
3952 fi
3953
3954 rm -rf conftest.err conftest.$ac_ext
3955
3956 done
3957 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3958 rm -rf conftest.err conftest.$ac_ext
3959 if $ac_preproc_ok; then
3960   :
3961 else
3962   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3963 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3964 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3965 See \`config.log' for more details." >&5
3966 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3967 See \`config.log' for more details." >&2;}
3968    { (exit 1); exit 1; }; }; }
3969 fi
3970
3971 ac_ext=c
3972 ac_cpp='$CPP $CPPFLAGS'
3973 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3974 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3975 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3976
3977 { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3978 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
3979 if test "${ac_cv_c_const+set}" = set; then
3980   $as_echo_n "(cached) " >&6
3981 else
3982   cat >conftest.$ac_ext <<_ACEOF
3983 /* confdefs.h.  */
3984 _ACEOF
3985 cat confdefs.h >>conftest.$ac_ext
3986 cat >>conftest.$ac_ext <<_ACEOF
3987 /* end confdefs.h.  */
3988
3989 int
3990 main ()
3991 {
3992 /* FIXME: Include the comments suggested by Paul. */
3993 #ifndef __cplusplus
3994   /* Ultrix mips cc rejects this.  */
3995   typedef int charset[2];
3996   const charset cs;
3997   /* SunOS 4.1.1 cc rejects this.  */
3998   char const *const *pcpcc;
3999   char **ppc;
4000   /* NEC SVR4.0.2 mips cc rejects this.  */
4001   struct point {int x, y;};
4002   static struct point const zero = {0,0};
4003   /* AIX XL C 1.02.0.0 rejects this.
4004      It does not let you subtract one const X* pointer from another in
4005      an arm of an if-expression whose if-part is not a constant
4006      expression */
4007   const char *g = "string";
4008   pcpcc = &g + (g ? g-g : 0);
4009   /* HPUX 7.0 cc rejects these. */
4010   ++pcpcc;
4011   ppc = (char**) pcpcc;
4012   pcpcc = (char const *const *) ppc;
4013   { /* SCO 3.2v4 cc rejects this.  */
4014     char *t;
4015     char const *s = 0 ? (char *) 0 : (char const *) 0;
4016
4017     *t++ = 0;
4018     if (s) return 0;
4019   }
4020   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4021     int x[] = {25, 17};
4022     const int *foo = &x[0];
4023     ++foo;
4024   }
4025   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4026     typedef const int *iptr;
4027     iptr p = 0;
4028     ++p;
4029   }
4030   { /* AIX XL C 1.02.0.0 rejects this saying
4031        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4032     struct s { int j; const int *ap[3]; };
4033     struct s *b; b->j = 5;
4034   }
4035   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4036     const int foo = 10;
4037     if (!foo) return 0;
4038   }
4039   return !cs[0] && !zero.x;
4040 #endif
4041
4042   ;
4043   return 0;
4044 }
4045 _ACEOF
4046 rm -rf conftest.$ac_objext
4047 if { (ac_try="$ac_compile"
4048 case "(($ac_try" in
4049   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4050   *) ac_try_echo=$ac_try;;
4051 esac
4052 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4053 $as_echo "$ac_try_echo") >&5
4054   (eval "$ac_compile") 2>conftest.er1
4055   ac_status=$?
4056   grep -v '^ *+' conftest.er1 >conftest.err
4057   rm -rf conftest.er1
4058   cat conftest.err >&5
4059   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4060   (exit $ac_status); } && {
4061          test -z "$ac_c_werror_flag" ||
4062          test ! -s conftest.err
4063        } && test -s conftest.$ac_objext; then
4064   ac_cv_c_const=yes
4065 else
4066   $as_echo "$as_me: failed program was:" >&5
4067 sed 's/^/| /' conftest.$ac_ext >&5
4068
4069         ac_cv_c_const=no
4070 fi
4071
4072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4073 fi
4074 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
4075 $as_echo "$ac_cv_c_const" >&6; }
4076 if test $ac_cv_c_const = no; then
4077
4078 cat >>confdefs.h <<\_ACEOF
4079 #define const /**/
4080 _ACEOF
4081
4082 fi
4083
4084 { $as_echo "$as_me:$LINENO: checking for inline" >&5
4085 $as_echo_n "checking for inline... " >&6; }
4086 if test "${ac_cv_c_inline+set}" = set; then
4087   $as_echo_n "(cached) " >&6
4088 else
4089   ac_cv_c_inline=no
4090 for ac_kw in inline __inline__ __inline; do
4091   cat >conftest.$ac_ext <<_ACEOF
4092 /* confdefs.h.  */
4093 _ACEOF
4094 cat confdefs.h >>conftest.$ac_ext
4095 cat >>conftest.$ac_ext <<_ACEOF
4096 /* end confdefs.h.  */
4097 #ifndef __cplusplus
4098 typedef int foo_t;
4099 static $ac_kw foo_t static_foo () {return 0; }
4100 $ac_kw foo_t foo () {return 0; }
4101 #endif
4102
4103 _ACEOF
4104 rm -rf conftest.$ac_objext
4105 if { (ac_try="$ac_compile"
4106 case "(($ac_try" in
4107   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4108   *) ac_try_echo=$ac_try;;
4109 esac
4110 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4111 $as_echo "$ac_try_echo") >&5
4112   (eval "$ac_compile") 2>conftest.er1
4113   ac_status=$?
4114   grep -v '^ *+' conftest.er1 >conftest.err
4115   rm -rf conftest.er1
4116   cat conftest.err >&5
4117   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4118   (exit $ac_status); } && {
4119          test -z "$ac_c_werror_flag" ||
4120          test ! -s conftest.err
4121        } && test -s conftest.$ac_objext; then
4122   ac_cv_c_inline=$ac_kw
4123 else
4124   $as_echo "$as_me: failed program was:" >&5
4125 sed 's/^/| /' conftest.$ac_ext >&5
4126
4127
4128 fi
4129
4130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4131   test "$ac_cv_c_inline" != no && break
4132 done
4133
4134 fi
4135 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
4136 $as_echo "$ac_cv_c_inline" >&6; }
4137
4138
4139 case $ac_cv_c_inline in
4140   inline | yes) ;;
4141   *)
4142     case $ac_cv_c_inline in
4143       no) ac_val=;;
4144       *) ac_val=$ac_cv_c_inline;;
4145     esac
4146     cat >>confdefs.h <<_ACEOF
4147 #ifndef __cplusplus
4148 #define inline $ac_val
4149 #endif
4150 _ACEOF
4151     ;;
4152 esac
4153
4154
4155 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4156   { $as_echo "$as_me:$LINENO: checking for bc" >&5
4157 $as_echo_n "checking for bc... " >&6; }
4158   if test "$ac_bc_result" = "15" ; then
4159     { $as_echo "$as_me:$LINENO: result: yes" >&5
4160 $as_echo "yes" >&6; }
4161   else
4162     { $as_echo "$as_me:$LINENO: result: no" >&5
4163 $as_echo "no" >&6; }
4164     echo ''
4165     { { $as_echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
4166                   part of Unix since the 1970s.  Come back when your vendor
4167                   has grown a clue." >&5
4168 $as_echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
4169                   part of Unix since the 1970s.  Come back when your vendor
4170                   has grown a clue." >&2;}
4171    { (exit 1); exit 1; }; }
4172   fi
4173
4174
4175 # stuff for Makefiles
4176 # Find a good install program.  We prefer a C program (faster),
4177 # so one script is as good as another.  But avoid the broken or
4178 # incompatible versions:
4179 # SysV /etc/install, /usr/sbin/install
4180 # SunOS /usr/etc/install
4181 # IRIX /sbin/install
4182 # AIX /bin/install
4183 # AmigaOS /C/install, which installs bootblocks on floppy discs
4184 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4185 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4186 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4187 # OS/2's system install, which has a completely different semantic
4188 # ./install, which can be erroneously created by make from ./install.sh.
4189 # Reject install programs that cannot install multiple files.
4190 { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4191 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4192 if test -z "$INSTALL"; then
4193 if test "${ac_cv_path_install+set}" = set; then
4194   $as_echo_n "(cached) " >&6
4195 else
4196   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4197 for as_dir in $PATH
4198 do
4199   IFS=$as_save_IFS
4200   test -z "$as_dir" && as_dir=.
4201   # Account for people who put trailing slashes in PATH elements.
4202 case $as_dir/ in
4203   ./ | .// | /cC/* | \
4204   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4205   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4206   /usr/ucb/* ) ;;
4207   *)
4208     # OSF1 and SCO ODT 3.0 have their own names for install.
4209     # Don't use installbsd from OSF since it installs stuff as root
4210     # by default.
4211     for ac_prog in ginstall scoinst install; do
4212       for ac_exec_ext in '' $ac_executable_extensions; do
4213         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4214           if test $ac_prog = install &&
4215             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4216             # AIX install.  It has an incompatible calling convention.
4217             :
4218           elif test $ac_prog = install &&
4219             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4220             # program-specific install script used by HP pwplus--don't use.
4221             :
4222           else
4223             rm -rf conftest.one conftest.two conftest.dir
4224             echo one > conftest.one
4225             echo two > conftest.two
4226             mkdir conftest.dir
4227             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4228               test -s conftest.one && test -s conftest.two &&
4229               test -s conftest.dir/conftest.one &&
4230               test -s conftest.dir/conftest.two
4231             then
4232               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4233               break 3
4234             fi
4235           fi
4236         fi
4237       done
4238     done
4239     ;;
4240 esac
4241
4242 done
4243 IFS=$as_save_IFS
4244
4245 rm -rf conftest.one conftest.two conftest.dir
4246
4247 fi
4248   if test "${ac_cv_path_install+set}" = set; then
4249     INSTALL=$ac_cv_path_install
4250   else
4251     # As a last resort, use the slow shell script.  Don't cache a
4252     # value for INSTALL within a source directory, because that will
4253     # break other packages using the cache if that directory is
4254     # removed, or if the value is a relative name.
4255     INSTALL=$ac_install_sh
4256   fi
4257 fi
4258 { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
4259 $as_echo "$INSTALL" >&6; }
4260
4261 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4262 # It thinks the first close brace ends the variable substitution.
4263 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4264
4265 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4266
4267 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4268
4269 { $as_echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4270 $as_echo_n "checking whether \"\${INSTALL} -d\" creates intermediate directories... " >&6; }
4271 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4272   $as_echo_n "(cached) " >&6
4273 else
4274   ac_cv_install_d_creates_dirs=no
4275      rm -rf conftestdir
4276      if mkdir conftestdir; then
4277        cd conftestdir 2>/dev/null
4278        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4279        if test -d dir1/dir2/. ; then
4280          ac_cv_install_d_creates_dirs=yes
4281        fi
4282        cd .. 2>/dev/null
4283        rm -rf conftestdir
4284      fi
4285
4286 fi
4287 { $as_echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4288 $as_echo "$ac_cv_install_d_creates_dirs" >&6; }
4289
4290   if test "$ac_cv_install_d_creates_dirs" = no ; then
4291     { $as_echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4292 $as_echo_n "checking whether \"mkdir -p\" creates intermediate directories... " >&6; }
4293 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4294   $as_echo_n "(cached) " >&6
4295 else
4296   ac_cv_mkdir_p_creates_dirs=no
4297        rm -rf conftestdir
4298        if mkdir conftestdir; then
4299          cd conftestdir 2>/dev/null
4300          mkdir -p dir1/dir2 >/dev/null 2>&1
4301          if test -d dir1/dir2/. ; then
4302            ac_cv_mkdir_p_creates_dirs=yes
4303          fi
4304          cd .. 2>/dev/null
4305          rm -rf conftestdir
4306        fi
4307
4308 fi
4309 { $as_echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4310 $as_echo "$ac_cv_mkdir_p_creates_dirs" >&6; }
4311   fi
4312
4313   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4314     INSTALL_DIRS='${INSTALL} -d'
4315   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4316     INSTALL_DIRS='mkdir -p'
4317   else
4318     # any other ideas?
4319     INSTALL_DIRS='${INSTALL} -d'
4320   fi
4321
4322 { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4323 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4324 set x ${MAKE-make}
4325 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4326 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4327   $as_echo_n "(cached) " >&6
4328 else
4329   cat >conftest.make <<\_ACEOF
4330 SHELL = /bin/sh
4331 all:
4332         @echo '@@@%%%=$(MAKE)=@@@%%%'
4333 _ACEOF
4334 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4335 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4336   *@@@%%%=?*=@@@%%%*)
4337     eval ac_cv_prog_make_${ac_make}_set=yes;;
4338   *)
4339     eval ac_cv_prog_make_${ac_make}_set=no;;
4340 esac
4341 rm -rf conftest.make
4342 fi
4343 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4344   { $as_echo "$as_me:$LINENO: result: yes" >&5
4345 $as_echo "yes" >&6; }
4346   SET_MAKE=
4347 else
4348   { $as_echo "$as_me:$LINENO: result: no" >&5
4349 $as_echo "no" >&6; }
4350   SET_MAKE="MAKE=${MAKE-make}"
4351 fi
4352
4353
4354 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4355 # That's wrong: it should be set to '${INSTALL}', so that one can
4356 # implement the "install-strip" target properly (strip executables,
4357 # but do not try to strip scripts.)
4358 #
4359 INSTALL_SCRIPT='${INSTALL}'
4360
4361 # random libc stuff
4362
4363 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4364 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4365 if test "${ac_cv_path_GREP+set}" = set; then
4366   $as_echo_n "(cached) " >&6
4367 else
4368   if test -z "$GREP"; then
4369   ac_path_GREP_found=false
4370   # Loop through the user's path and test for each of PROGNAME-LIST
4371   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4372 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4373 do
4374   IFS=$as_save_IFS
4375   test -z "$as_dir" && as_dir=.
4376   for ac_prog in grep ggrep; do
4377     for ac_exec_ext in '' $ac_executable_extensions; do
4378       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4379       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4380 # Check for GNU ac_path_GREP and select it if it is found.
4381   # Check for GNU $ac_path_GREP
4382 case `"$ac_path_GREP" --version 2>&1` in
4383 *GNU*)
4384   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4385 *)
4386   ac_count=0
4387   $as_echo_n 0123456789 >"conftest.in"
4388   while :
4389   do
4390     cat "conftest.in" "conftest.in" >"conftest.tmp"
4391     mv "conftest.tmp" "conftest.in"
4392     cp "conftest.in" "conftest.nl"
4393     $as_echo 'GREP' >> "conftest.nl"
4394     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4395     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4396     ac_count=`expr $ac_count + 1`
4397     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4398       # Best one so far, save it but keep looking for a better one
4399       ac_cv_path_GREP="$ac_path_GREP"
4400       ac_path_GREP_max=$ac_count
4401     fi
4402     # 10*(2^10) chars as input seems more than enough
4403     test $ac_count -gt 10 && break
4404   done
4405   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4406 esac
4407
4408       $ac_path_GREP_found && break 3
4409     done
4410   done
4411 done
4412 IFS=$as_save_IFS
4413   if test -z "$ac_cv_path_GREP"; then
4414     { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4415 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4416    { (exit 1); exit 1; }; }
4417   fi
4418 else
4419   ac_cv_path_GREP=$GREP
4420 fi
4421
4422 fi
4423 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4424 $as_echo "$ac_cv_path_GREP" >&6; }
4425  GREP="$ac_cv_path_GREP"
4426
4427
4428 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
4429 $as_echo_n "checking for egrep... " >&6; }
4430 if test "${ac_cv_path_EGREP+set}" = set; then
4431   $as_echo_n "(cached) " >&6
4432 else
4433   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4434    then ac_cv_path_EGREP="$GREP -E"
4435    else
4436      if test -z "$EGREP"; then
4437   ac_path_EGREP_found=false
4438   # Loop through the user's path and test for each of PROGNAME-LIST
4439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4440 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4441 do
4442   IFS=$as_save_IFS
4443   test -z "$as_dir" && as_dir=.
4444   for ac_prog in egrep; do
4445     for ac_exec_ext in '' $ac_executable_extensions; do
4446       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4447       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4448 # Check for GNU ac_path_EGREP and select it if it is found.
4449   # Check for GNU $ac_path_EGREP
4450 case `"$ac_path_EGREP" --version 2>&1` in
4451 *GNU*)
4452   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4453 *)
4454   ac_count=0
4455   $as_echo_n 0123456789 >"conftest.in"
4456   while :
4457   do
4458     cat "conftest.in" "conftest.in" >"conftest.tmp"
4459     mv "conftest.tmp" "conftest.in"
4460     cp "conftest.in" "conftest.nl"
4461     $as_echo 'EGREP' >> "conftest.nl"
4462     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4463     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4464     ac_count=`expr $ac_count + 1`
4465     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4466       # Best one so far, save it but keep looking for a better one
4467       ac_cv_path_EGREP="$ac_path_EGREP"
4468       ac_path_EGREP_max=$ac_count
4469     fi
4470     # 10*(2^10) chars as input seems more than enough
4471     test $ac_count -gt 10 && break
4472   done
4473   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4474 esac
4475
4476       $ac_path_EGREP_found && break 3
4477     done
4478   done
4479 done
4480 IFS=$as_save_IFS
4481   if test -z "$ac_cv_path_EGREP"; then
4482     { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4483 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4484    { (exit 1); exit 1; }; }
4485   fi
4486 else
4487   ac_cv_path_EGREP=$EGREP
4488 fi
4489
4490    fi
4491 fi
4492 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4493 $as_echo "$ac_cv_path_EGREP" >&6; }
4494  EGREP="$ac_cv_path_EGREP"
4495
4496
4497 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4498 $as_echo_n "checking for ANSI C header files... " >&6; }
4499 if test "${ac_cv_header_stdc+set}" = set; then
4500   $as_echo_n "(cached) " >&6
4501 else
4502   cat >conftest.$ac_ext <<_ACEOF
4503 /* confdefs.h.  */
4504 _ACEOF
4505 cat confdefs.h >>conftest.$ac_ext
4506 cat >>conftest.$ac_ext <<_ACEOF
4507 /* end confdefs.h.  */
4508 #include <stdlib.h>
4509 #include <stdarg.h>
4510 #include <string.h>
4511 #include <float.h>
4512
4513 int
4514 main ()
4515 {
4516
4517   ;
4518   return 0;
4519 }
4520 _ACEOF
4521 rm -rf conftest.$ac_objext
4522 if { (ac_try="$ac_compile"
4523 case "(($ac_try" in
4524   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4525   *) ac_try_echo=$ac_try;;
4526 esac
4527 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4528 $as_echo "$ac_try_echo") >&5
4529   (eval "$ac_compile") 2>conftest.er1
4530   ac_status=$?
4531   grep -v '^ *+' conftest.er1 >conftest.err
4532   rm -rf conftest.er1
4533   cat conftest.err >&5
4534   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535   (exit $ac_status); } && {
4536          test -z "$ac_c_werror_flag" ||
4537          test ! -s conftest.err
4538        } && test -s conftest.$ac_objext; then
4539   ac_cv_header_stdc=yes
4540 else
4541   $as_echo "$as_me: failed program was:" >&5
4542 sed 's/^/| /' conftest.$ac_ext >&5
4543
4544         ac_cv_header_stdc=no
4545 fi
4546
4547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4548
4549 if test $ac_cv_header_stdc = yes; then
4550   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4551   cat >conftest.$ac_ext <<_ACEOF
4552 /* confdefs.h.  */
4553 _ACEOF
4554 cat confdefs.h >>conftest.$ac_ext
4555 cat >>conftest.$ac_ext <<_ACEOF
4556 /* end confdefs.h.  */
4557 #include <string.h>
4558
4559 _ACEOF
4560 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4561   $EGREP "memchr" >/dev/null 2>&1; then
4562   :
4563 else
4564   ac_cv_header_stdc=no
4565 fi
4566 rm -rf conftest*
4567
4568 fi
4569
4570 if test $ac_cv_header_stdc = yes; then
4571   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4572   cat >conftest.$ac_ext <<_ACEOF
4573 /* confdefs.h.  */
4574 _ACEOF
4575 cat confdefs.h >>conftest.$ac_ext
4576 cat >>conftest.$ac_ext <<_ACEOF
4577 /* end confdefs.h.  */
4578 #include <stdlib.h>
4579
4580 _ACEOF
4581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4582   $EGREP "free" >/dev/null 2>&1; then
4583   :
4584 else
4585   ac_cv_header_stdc=no
4586 fi
4587 rm -rf conftest*
4588
4589 fi
4590
4591 if test $ac_cv_header_stdc = yes; then
4592   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4593   if test "$cross_compiling" = yes; then
4594   :
4595 else
4596   cat >conftest.$ac_ext <<_ACEOF
4597 /* confdefs.h.  */
4598 _ACEOF
4599 cat confdefs.h >>conftest.$ac_ext
4600 cat >>conftest.$ac_ext <<_ACEOF
4601 /* end confdefs.h.  */
4602 #include <ctype.h>
4603 #include <stdlib.h>
4604 #if ((' ' & 0x0FF) == 0x020)
4605 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4606 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4607 #else
4608 # define ISLOWER(c) \
4609                    (('a' <= (c) && (c) <= 'i') \
4610                      || ('j' <= (c) && (c) <= 'r') \
4611                      || ('s' <= (c) && (c) <= 'z'))
4612 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4613 #endif
4614
4615 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4616 int
4617 main ()
4618 {
4619   int i;
4620   for (i = 0; i < 256; i++)
4621     if (XOR (islower (i), ISLOWER (i))
4622         || toupper (i) != TOUPPER (i))
4623       return 2;
4624   return 0;
4625 }
4626 _ACEOF
4627 rm -rf conftest$ac_exeext
4628 if { (ac_try="$ac_link"
4629 case "(($ac_try" in
4630   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4631   *) ac_try_echo=$ac_try;;
4632 esac
4633 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4634 $as_echo "$ac_try_echo") >&5
4635   (eval "$ac_link") 2>&5
4636   ac_status=$?
4637   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4638   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4639   { (case "(($ac_try" in
4640   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4641   *) ac_try_echo=$ac_try;;
4642 esac
4643 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4644 $as_echo "$ac_try_echo") >&5
4645   (eval "$ac_try") 2>&5
4646   ac_status=$?
4647   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4648   (exit $ac_status); }; }; then
4649   :
4650 else
4651   $as_echo "$as_me: program exited with status $ac_status" >&5
4652 $as_echo "$as_me: failed program was:" >&5
4653 sed 's/^/| /' conftest.$ac_ext >&5
4654
4655 ( exit $ac_status )
4656 ac_cv_header_stdc=no
4657 fi
4658 rm -rf conftest.dSYM
4659 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4660 fi
4661
4662
4663 fi
4664 fi
4665 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4666 $as_echo "$ac_cv_header_stdc" >&6; }
4667 if test $ac_cv_header_stdc = yes; then
4668
4669 cat >>confdefs.h <<\_ACEOF
4670 #define STDC_HEADERS 1
4671 _ACEOF
4672
4673 fi
4674
4675 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4686                   inttypes.h stdint.h unistd.h
4687 do
4688 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4689 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4690 $as_echo_n "checking for $ac_header... " >&6; }
4691 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4692   $as_echo_n "(cached) " >&6
4693 else
4694   cat >conftest.$ac_ext <<_ACEOF
4695 /* confdefs.h.  */
4696 _ACEOF
4697 cat confdefs.h >>conftest.$ac_ext
4698 cat >>conftest.$ac_ext <<_ACEOF
4699 /* end confdefs.h.  */
4700 $ac_includes_default
4701
4702 #include <$ac_header>
4703 _ACEOF
4704 rm -rf conftest.$ac_objext
4705 if { (ac_try="$ac_compile"
4706 case "(($ac_try" in
4707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4708   *) ac_try_echo=$ac_try;;
4709 esac
4710 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4711 $as_echo "$ac_try_echo") >&5
4712   (eval "$ac_compile") 2>conftest.er1
4713   ac_status=$?
4714   grep -v '^ *+' conftest.er1 >conftest.err
4715   rm -rf conftest.er1
4716   cat conftest.err >&5
4717   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4718   (exit $ac_status); } && {
4719          test -z "$ac_c_werror_flag" ||
4720          test ! -s conftest.err
4721        } && test -s conftest.$ac_objext; then
4722   eval "$as_ac_Header=yes"
4723 else
4724   $as_echo "$as_me: failed program was:" >&5
4725 sed 's/^/| /' conftest.$ac_ext >&5
4726
4727         eval "$as_ac_Header=no"
4728 fi
4729
4730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4731 fi
4732 ac_res=`eval 'as_val=${'$as_ac_Header'}
4733                  $as_echo "$as_val"'`
4734                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4735 $as_echo "$ac_res" >&6; }
4736 as_val=`eval 'as_val=${'$as_ac_Header'}
4737                  $as_echo "$as_val"'`
4738    if test "x$as_val" = x""yes; then
4739   cat >>confdefs.h <<_ACEOF
4740 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4741 _ACEOF
4742
4743 fi
4744
4745 done
4746
4747
4748
4749 for ac_header in unistd.h
4750 do
4751 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4752 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4753   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4754 $as_echo_n "checking for $ac_header... " >&6; }
4755 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4756   $as_echo_n "(cached) " >&6
4757 fi
4758 ac_res=`eval 'as_val=${'$as_ac_Header'}
4759                  $as_echo "$as_val"'`
4760                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4761 $as_echo "$ac_res" >&6; }
4762 else
4763   # Is the header compilable?
4764 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
4765 $as_echo_n "checking $ac_header usability... " >&6; }
4766 cat >conftest.$ac_ext <<_ACEOF
4767 /* confdefs.h.  */
4768 _ACEOF
4769 cat confdefs.h >>conftest.$ac_ext
4770 cat >>conftest.$ac_ext <<_ACEOF
4771 /* end confdefs.h.  */
4772 $ac_includes_default
4773 #include <$ac_header>
4774 _ACEOF
4775 rm -rf conftest.$ac_objext
4776 if { (ac_try="$ac_compile"
4777 case "(($ac_try" in
4778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4779   *) ac_try_echo=$ac_try;;
4780 esac
4781 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4782 $as_echo "$ac_try_echo") >&5
4783   (eval "$ac_compile") 2>conftest.er1
4784   ac_status=$?
4785   grep -v '^ *+' conftest.er1 >conftest.err
4786   rm -rf conftest.er1
4787   cat conftest.err >&5
4788   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4789   (exit $ac_status); } && {
4790          test -z "$ac_c_werror_flag" ||
4791          test ! -s conftest.err
4792        } && test -s conftest.$ac_objext; then
4793   ac_header_compiler=yes
4794 else
4795   $as_echo "$as_me: failed program was:" >&5
4796 sed 's/^/| /' conftest.$ac_ext >&5
4797
4798         ac_header_compiler=no
4799 fi
4800
4801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4802 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4803 $as_echo "$ac_header_compiler" >&6; }
4804
4805 # Is the header present?
4806 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
4807 $as_echo_n "checking $ac_header presence... " >&6; }
4808 cat >conftest.$ac_ext <<_ACEOF
4809 /* confdefs.h.  */
4810 _ACEOF
4811 cat confdefs.h >>conftest.$ac_ext
4812 cat >>conftest.$ac_ext <<_ACEOF
4813 /* end confdefs.h.  */
4814 #include <$ac_header>
4815 _ACEOF
4816 if { (ac_try="$ac_cpp conftest.$ac_ext"
4817 case "(($ac_try" in
4818   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4819   *) ac_try_echo=$ac_try;;
4820 esac
4821 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4822 $as_echo "$ac_try_echo") >&5
4823   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4824   ac_status=$?
4825   grep -v '^ *+' conftest.er1 >conftest.err
4826   rm -rf conftest.er1
4827   cat conftest.err >&5
4828   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4829   (exit $ac_status); } >/dev/null && {
4830          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4831          test ! -s conftest.err
4832        }; then
4833   ac_header_preproc=yes
4834 else
4835   $as_echo "$as_me: failed program was:" >&5
4836 sed 's/^/| /' conftest.$ac_ext >&5
4837
4838   ac_header_preproc=no
4839 fi
4840
4841 rm -rf conftest.err conftest.$ac_ext
4842 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4843 $as_echo "$ac_header_preproc" >&6; }
4844
4845 # So?  What about this header?
4846 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4847   yes:no: )
4848     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4849 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4850     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4851 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4852     ac_header_preproc=yes
4853     ;;
4854   no:yes:* )
4855     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4856 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4857     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4858 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4859     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4860 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4861     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4862 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4863     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4864 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4865     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4866 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4867
4868     ;;
4869 esac
4870 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4871 $as_echo_n "checking for $ac_header... " >&6; }
4872 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4873   $as_echo_n "(cached) " >&6
4874 else
4875   eval "$as_ac_Header=\$ac_header_preproc"
4876 fi
4877 ac_res=`eval 'as_val=${'$as_ac_Header'}
4878                  $as_echo "$as_val"'`
4879                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4880 $as_echo "$ac_res" >&6; }
4881
4882 fi
4883 as_val=`eval 'as_val=${'$as_ac_Header'}
4884                  $as_echo "$as_val"'`
4885    if test "x$as_val" = x""yes; then
4886   cat >>confdefs.h <<_ACEOF
4887 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4888 _ACEOF
4889
4890 fi
4891
4892 done
4893
4894 { $as_echo "$as_me:$LINENO: checking for mode_t" >&5
4895 $as_echo_n "checking for mode_t... " >&6; }
4896 if test "${ac_cv_type_mode_t+set}" = set; then
4897   $as_echo_n "(cached) " >&6
4898 else
4899   ac_cv_type_mode_t=no
4900 cat >conftest.$ac_ext <<_ACEOF
4901 /* confdefs.h.  */
4902 _ACEOF
4903 cat confdefs.h >>conftest.$ac_ext
4904 cat >>conftest.$ac_ext <<_ACEOF
4905 /* end confdefs.h.  */
4906 $ac_includes_default
4907 int
4908 main ()
4909 {
4910 if (sizeof (mode_t))
4911        return 0;
4912   ;
4913   return 0;
4914 }
4915 _ACEOF
4916 rm -rf conftest.$ac_objext
4917 if { (ac_try="$ac_compile"
4918 case "(($ac_try" in
4919   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4920   *) ac_try_echo=$ac_try;;
4921 esac
4922 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4923 $as_echo "$ac_try_echo") >&5
4924   (eval "$ac_compile") 2>conftest.er1
4925   ac_status=$?
4926   grep -v '^ *+' conftest.er1 >conftest.err
4927   rm -rf conftest.er1
4928   cat conftest.err >&5
4929   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4930   (exit $ac_status); } && {
4931          test -z "$ac_c_werror_flag" ||
4932          test ! -s conftest.err
4933        } && test -s conftest.$ac_objext; then
4934   cat >conftest.$ac_ext <<_ACEOF
4935 /* confdefs.h.  */
4936 _ACEOF
4937 cat confdefs.h >>conftest.$ac_ext
4938 cat >>conftest.$ac_ext <<_ACEOF
4939 /* end confdefs.h.  */
4940 $ac_includes_default
4941 int
4942 main ()
4943 {
4944 if (sizeof ((mode_t)))
4945           return 0;
4946   ;
4947   return 0;
4948 }
4949 _ACEOF
4950 rm -rf conftest.$ac_objext
4951 if { (ac_try="$ac_compile"
4952 case "(($ac_try" in
4953   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4954   *) ac_try_echo=$ac_try;;
4955 esac
4956 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4957 $as_echo "$ac_try_echo") >&5
4958   (eval "$ac_compile") 2>conftest.er1
4959   ac_status=$?
4960   grep -v '^ *+' conftest.er1 >conftest.err
4961   rm -rf conftest.er1
4962   cat conftest.err >&5
4963   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4964   (exit $ac_status); } && {
4965          test -z "$ac_c_werror_flag" ||
4966          test ! -s conftest.err
4967        } && test -s conftest.$ac_objext; then
4968   :
4969 else
4970   $as_echo "$as_me: failed program was:" >&5
4971 sed 's/^/| /' conftest.$ac_ext >&5
4972
4973         ac_cv_type_mode_t=yes
4974 fi
4975
4976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4977 else
4978   $as_echo "$as_me: failed program was:" >&5
4979 sed 's/^/| /' conftest.$ac_ext >&5
4980
4981
4982 fi
4983
4984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4985 fi
4986 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4987 $as_echo "$ac_cv_type_mode_t" >&6; }
4988 if test "x$ac_cv_type_mode_t" = x""yes; then
4989   :
4990 else
4991
4992 cat >>confdefs.h <<_ACEOF
4993 #define mode_t int
4994 _ACEOF
4995
4996 fi
4997
4998 { $as_echo "$as_me:$LINENO: checking for pid_t" >&5
4999 $as_echo_n "checking for pid_t... " >&6; }
5000 if test "${ac_cv_type_pid_t+set}" = set; then
5001   $as_echo_n "(cached) " >&6
5002 else
5003   ac_cv_type_pid_t=no
5004 cat >conftest.$ac_ext <<_ACEOF
5005 /* confdefs.h.  */
5006 _ACEOF
5007 cat confdefs.h >>conftest.$ac_ext
5008 cat >>conftest.$ac_ext <<_ACEOF
5009 /* end confdefs.h.  */
5010 $ac_includes_default
5011 int
5012 main ()
5013 {
5014 if (sizeof (pid_t))
5015        return 0;
5016   ;
5017   return 0;
5018 }
5019 _ACEOF
5020 rm -rf conftest.$ac_objext
5021 if { (ac_try="$ac_compile"
5022 case "(($ac_try" in
5023   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5024   *) ac_try_echo=$ac_try;;
5025 esac
5026 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5027 $as_echo "$ac_try_echo") >&5
5028   (eval "$ac_compile") 2>conftest.er1
5029   ac_status=$?
5030   grep -v '^ *+' conftest.er1 >conftest.err
5031   rm -rf conftest.er1
5032   cat conftest.err >&5
5033   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5034   (exit $ac_status); } && {
5035          test -z "$ac_c_werror_flag" ||
5036          test ! -s conftest.err
5037        } && test -s conftest.$ac_objext; then
5038   cat >conftest.$ac_ext <<_ACEOF
5039 /* confdefs.h.  */
5040 _ACEOF
5041 cat confdefs.h >>conftest.$ac_ext
5042 cat >>conftest.$ac_ext <<_ACEOF
5043 /* end confdefs.h.  */
5044 $ac_includes_default
5045 int
5046 main ()
5047 {
5048 if (sizeof ((pid_t)))
5049           return 0;
5050   ;
5051   return 0;
5052 }
5053 _ACEOF
5054 rm -rf conftest.$ac_objext
5055 if { (ac_try="$ac_compile"
5056 case "(($ac_try" in
5057   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5058   *) ac_try_echo=$ac_try;;
5059 esac
5060 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5061 $as_echo "$ac_try_echo") >&5
5062   (eval "$ac_compile") 2>conftest.er1
5063   ac_status=$?
5064   grep -v '^ *+' conftest.er1 >conftest.err
5065   rm -rf conftest.er1
5066   cat conftest.err >&5
5067   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068   (exit $ac_status); } && {
5069          test -z "$ac_c_werror_flag" ||
5070          test ! -s conftest.err
5071        } && test -s conftest.$ac_objext; then
5072   :
5073 else
5074   $as_echo "$as_me: failed program was:" >&5
5075 sed 's/^/| /' conftest.$ac_ext >&5
5076
5077         ac_cv_type_pid_t=yes
5078 fi
5079
5080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5081 else
5082   $as_echo "$as_me: failed program was:" >&5
5083 sed 's/^/| /' conftest.$ac_ext >&5
5084
5085
5086 fi
5087
5088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5089 fi
5090 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5091 $as_echo "$ac_cv_type_pid_t" >&6; }
5092 if test "x$ac_cv_type_pid_t" = x""yes; then
5093   :
5094 else
5095
5096 cat >>confdefs.h <<_ACEOF
5097 #define pid_t int
5098 _ACEOF
5099
5100 fi
5101
5102 { $as_echo "$as_me:$LINENO: checking for size_t" >&5
5103 $as_echo_n "checking for size_t... " >&6; }
5104 if test "${ac_cv_type_size_t+set}" = set; then
5105   $as_echo_n "(cached) " >&6
5106 else
5107   ac_cv_type_size_t=no
5108 cat >conftest.$ac_ext <<_ACEOF
5109 /* confdefs.h.  */
5110 _ACEOF
5111 cat confdefs.h >>conftest.$ac_ext
5112 cat >>conftest.$ac_ext <<_ACEOF
5113 /* end confdefs.h.  */
5114 $ac_includes_default
5115 int
5116 main ()
5117 {
5118 if (sizeof (size_t))
5119        return 0;
5120   ;
5121   return 0;
5122 }
5123 _ACEOF
5124 rm -rf conftest.$ac_objext
5125 if { (ac_try="$ac_compile"
5126 case "(($ac_try" in
5127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5128   *) ac_try_echo=$ac_try;;
5129 esac
5130 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5131 $as_echo "$ac_try_echo") >&5
5132   (eval "$ac_compile") 2>conftest.er1
5133   ac_status=$?
5134   grep -v '^ *+' conftest.er1 >conftest.err
5135   rm -rf conftest.er1
5136   cat conftest.err >&5
5137   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138   (exit $ac_status); } && {
5139          test -z "$ac_c_werror_flag" ||
5140          test ! -s conftest.err
5141        } && test -s conftest.$ac_objext; then
5142   cat >conftest.$ac_ext <<_ACEOF
5143 /* confdefs.h.  */
5144 _ACEOF
5145 cat confdefs.h >>conftest.$ac_ext
5146 cat >>conftest.$ac_ext <<_ACEOF
5147 /* end confdefs.h.  */
5148 $ac_includes_default
5149 int
5150 main ()
5151 {
5152 if (sizeof ((size_t)))
5153           return 0;
5154   ;
5155   return 0;
5156 }
5157 _ACEOF
5158 rm -rf conftest.$ac_objext
5159 if { (ac_try="$ac_compile"
5160 case "(($ac_try" in
5161   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5162   *) ac_try_echo=$ac_try;;
5163 esac
5164 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5165 $as_echo "$ac_try_echo") >&5
5166   (eval "$ac_compile") 2>conftest.er1
5167   ac_status=$?
5168   grep -v '^ *+' conftest.er1 >conftest.err
5169   rm -rf conftest.er1
5170   cat conftest.err >&5
5171   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5172   (exit $ac_status); } && {
5173          test -z "$ac_c_werror_flag" ||
5174          test ! -s conftest.err
5175        } && test -s conftest.$ac_objext; then
5176   :
5177 else
5178   $as_echo "$as_me: failed program was:" >&5
5179 sed 's/^/| /' conftest.$ac_ext >&5
5180
5181         ac_cv_type_size_t=yes
5182 fi
5183
5184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5185 else
5186   $as_echo "$as_me: failed program was:" >&5
5187 sed 's/^/| /' conftest.$ac_ext >&5
5188
5189
5190 fi
5191
5192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5193 fi
5194 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5195 $as_echo "$ac_cv_type_size_t" >&6; }
5196 if test "x$ac_cv_type_size_t" = x""yes; then
5197   :
5198 else
5199
5200 cat >>confdefs.h <<_ACEOF
5201 #define size_t unsigned int
5202 _ACEOF
5203
5204 fi
5205
5206 { $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5207 $as_echo_n "checking return type of signal handlers... " >&6; }
5208 if test "${ac_cv_type_signal+set}" = set; then
5209   $as_echo_n "(cached) " >&6
5210 else
5211   cat >conftest.$ac_ext <<_ACEOF
5212 /* confdefs.h.  */
5213 _ACEOF
5214 cat confdefs.h >>conftest.$ac_ext
5215 cat >>conftest.$ac_ext <<_ACEOF
5216 /* end confdefs.h.  */
5217 #include <sys/types.h>
5218 #include <signal.h>
5219
5220 int
5221 main ()
5222 {
5223 return *(signal (0, 0)) (0) == 1;
5224   ;
5225   return 0;
5226 }
5227 _ACEOF
5228 rm -rf conftest.$ac_objext
5229 if { (ac_try="$ac_compile"
5230 case "(($ac_try" in
5231   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5232   *) ac_try_echo=$ac_try;;
5233 esac
5234 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5235 $as_echo "$ac_try_echo") >&5
5236   (eval "$ac_compile") 2>conftest.er1
5237   ac_status=$?
5238   grep -v '^ *+' conftest.er1 >conftest.err
5239   rm -rf conftest.er1
5240   cat conftest.err >&5
5241   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5242   (exit $ac_status); } && {
5243          test -z "$ac_c_werror_flag" ||
5244          test ! -s conftest.err
5245        } && test -s conftest.$ac_objext; then
5246   ac_cv_type_signal=int
5247 else
5248   $as_echo "$as_me: failed program was:" >&5
5249 sed 's/^/| /' conftest.$ac_ext >&5
5250
5251         ac_cv_type_signal=void
5252 fi
5253
5254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5255 fi
5256 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5257 $as_echo "$ac_cv_type_signal" >&6; }
5258
5259 cat >>confdefs.h <<_ACEOF
5260 #define RETSIGTYPE $ac_cv_type_signal
5261 _ACEOF
5262
5263
5264 { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
5265 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5266 if test "${ac_cv_header_time+set}" = set; then
5267   $as_echo_n "(cached) " >&6
5268 else
5269   cat >conftest.$ac_ext <<_ACEOF
5270 /* confdefs.h.  */
5271 _ACEOF
5272 cat confdefs.h >>conftest.$ac_ext
5273 cat >>conftest.$ac_ext <<_ACEOF
5274 /* end confdefs.h.  */
5275 #include <sys/types.h>
5276 #include <sys/time.h>
5277 #include <time.h>
5278
5279 int
5280 main ()
5281 {
5282 if ((struct tm *) 0)
5283 return 0;
5284   ;
5285   return 0;
5286 }
5287 _ACEOF
5288 rm -rf conftest.$ac_objext
5289 if { (ac_try="$ac_compile"
5290 case "(($ac_try" in
5291   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5292   *) ac_try_echo=$ac_try;;
5293 esac
5294 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5295 $as_echo "$ac_try_echo") >&5
5296   (eval "$ac_compile") 2>conftest.er1
5297   ac_status=$?
5298   grep -v '^ *+' conftest.er1 >conftest.err
5299   rm -rf conftest.er1
5300   cat conftest.err >&5
5301   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5302   (exit $ac_status); } && {
5303          test -z "$ac_c_werror_flag" ||
5304          test ! -s conftest.err
5305        } && test -s conftest.$ac_objext; then
5306   ac_cv_header_time=yes
5307 else
5308   $as_echo "$as_me: failed program was:" >&5
5309 sed 's/^/| /' conftest.$ac_ext >&5
5310
5311         ac_cv_header_time=no
5312 fi
5313
5314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5315 fi
5316 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5317 $as_echo "$ac_cv_header_time" >&6; }
5318 if test $ac_cv_header_time = yes; then
5319
5320 cat >>confdefs.h <<\_ACEOF
5321 #define TIME_WITH_SYS_TIME 1
5322 _ACEOF
5323
5324 fi
5325
5326 { $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5327 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5328 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5329   $as_echo_n "(cached) " >&6
5330 else
5331   cat >conftest.$ac_ext <<_ACEOF
5332 /* confdefs.h.  */
5333 _ACEOF
5334 cat confdefs.h >>conftest.$ac_ext
5335 cat >>conftest.$ac_ext <<_ACEOF
5336 /* end confdefs.h.  */
5337 #include <sys/types.h>
5338 #include <sys/wait.h>
5339 #ifndef WEXITSTATUS
5340 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5341 #endif
5342 #ifndef WIFEXITED
5343 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5344 #endif
5345
5346 int
5347 main ()
5348 {
5349   int s;
5350   wait (&s);
5351   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5352   ;
5353   return 0;
5354 }
5355 _ACEOF
5356 rm -rf conftest.$ac_objext
5357 if { (ac_try="$ac_compile"
5358 case "(($ac_try" in
5359   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5360   *) ac_try_echo=$ac_try;;
5361 esac
5362 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5363 $as_echo "$ac_try_echo") >&5
5364   (eval "$ac_compile") 2>conftest.er1
5365   ac_status=$?
5366   grep -v '^ *+' conftest.er1 >conftest.err
5367   rm -rf conftest.er1
5368   cat conftest.err >&5
5369   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5370   (exit $ac_status); } && {
5371          test -z "$ac_c_werror_flag" ||
5372          test ! -s conftest.err
5373        } && test -s conftest.$ac_objext; then
5374   ac_cv_header_sys_wait_h=yes
5375 else
5376   $as_echo "$as_me: failed program was:" >&5
5377 sed 's/^/| /' conftest.$ac_ext >&5
5378
5379         ac_cv_header_sys_wait_h=no
5380 fi
5381
5382 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5383 fi
5384 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5385 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
5386 if test $ac_cv_header_sys_wait_h = yes; then
5387
5388 cat >>confdefs.h <<\_ACEOF
5389 #define HAVE_SYS_WAIT_H 1
5390 _ACEOF
5391
5392 fi
5393
5394
5395
5396
5397
5398
5399 ac_header_dirent=no
5400 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5401   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5402 { $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5403 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5404 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5405   $as_echo_n "(cached) " >&6
5406 else
5407   cat >conftest.$ac_ext <<_ACEOF
5408 /* confdefs.h.  */
5409 _ACEOF
5410 cat confdefs.h >>conftest.$ac_ext
5411 cat >>conftest.$ac_ext <<_ACEOF
5412 /* end confdefs.h.  */
5413 #include <sys/types.h>
5414 #include <$ac_hdr>
5415
5416 int
5417 main ()
5418 {
5419 if ((DIR *) 0)
5420 return 0;
5421   ;
5422   return 0;
5423 }
5424 _ACEOF
5425 rm -rf conftest.$ac_objext
5426 if { (ac_try="$ac_compile"
5427 case "(($ac_try" in
5428   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5429   *) ac_try_echo=$ac_try;;
5430 esac
5431 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5432 $as_echo "$ac_try_echo") >&5
5433   (eval "$ac_compile") 2>conftest.er1
5434   ac_status=$?
5435   grep -v '^ *+' conftest.er1 >conftest.err
5436   rm -rf conftest.er1
5437   cat conftest.err >&5
5438   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5439   (exit $ac_status); } && {
5440          test -z "$ac_c_werror_flag" ||
5441          test ! -s conftest.err
5442        } && test -s conftest.$ac_objext; then
5443   eval "$as_ac_Header=yes"
5444 else
5445   $as_echo "$as_me: failed program was:" >&5
5446 sed 's/^/| /' conftest.$ac_ext >&5
5447
5448         eval "$as_ac_Header=no"
5449 fi
5450
5451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5452 fi
5453 ac_res=`eval 'as_val=${'$as_ac_Header'}
5454                  $as_echo "$as_val"'`
5455                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5456 $as_echo "$ac_res" >&6; }
5457 as_val=`eval 'as_val=${'$as_ac_Header'}
5458                  $as_echo "$as_val"'`
5459    if test "x$as_val" = x""yes; then
5460   cat >>confdefs.h <<_ACEOF
5461 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5462 _ACEOF
5463
5464 ac_header_dirent=$ac_hdr; break
5465 fi
5466
5467 done
5468 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5469 if test $ac_header_dirent = dirent.h; then
5470   { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
5471 $as_echo_n "checking for library containing opendir... " >&6; }
5472 if test "${ac_cv_search_opendir+set}" = set; then
5473   $as_echo_n "(cached) " >&6
5474 else
5475   ac_func_search_save_LIBS=$LIBS
5476 cat >conftest.$ac_ext <<_ACEOF
5477 /* confdefs.h.  */
5478 _ACEOF
5479 cat confdefs.h >>conftest.$ac_ext
5480 cat >>conftest.$ac_ext <<_ACEOF
5481 /* end confdefs.h.  */
5482
5483 /* Override any GCC internal prototype to avoid an error.
5484    Use char because int might match the return type of a GCC
5485    builtin and then its argument prototype would still apply.  */
5486 #ifdef __cplusplus
5487 extern "C"
5488 #endif
5489 char opendir ();
5490 int
5491 main ()
5492 {
5493 return opendir ();
5494   ;
5495   return 0;
5496 }
5497 _ACEOF
5498 for ac_lib in '' dir; do
5499   if test -z "$ac_lib"; then
5500     ac_res="none required"
5501   else
5502     ac_res=-l$ac_lib
5503     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5504   fi
5505   rm -rf conftest.$ac_objext conftest$ac_exeext
5506 if { (ac_try="$ac_link"
5507 case "(($ac_try" in
5508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5509   *) ac_try_echo=$ac_try;;
5510 esac
5511 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5512 $as_echo "$ac_try_echo") >&5
5513   (eval "$ac_link") 2>conftest.er1
5514   ac_status=$?
5515   grep -v '^ *+' conftest.er1 >conftest.err
5516   rm -rf conftest.er1
5517   cat conftest.err >&5
5518   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5519   (exit $ac_status); } && {
5520          test -z "$ac_c_werror_flag" ||
5521          test ! -s conftest.err
5522        } && test -s conftest$ac_exeext && {
5523          test "$cross_compiling" = yes ||
5524          $as_test_x conftest$ac_exeext
5525        }; then
5526   ac_cv_search_opendir=$ac_res
5527 else
5528   $as_echo "$as_me: failed program was:" >&5
5529 sed 's/^/| /' conftest.$ac_ext >&5
5530
5531
5532 fi
5533
5534 rm -rf conftest.dSYM
5535 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5536       conftest$ac_exeext
5537   if test "${ac_cv_search_opendir+set}" = set; then
5538   break
5539 fi
5540 done
5541 if test "${ac_cv_search_opendir+set}" = set; then
5542   :
5543 else
5544   ac_cv_search_opendir=no
5545 fi
5546 rm conftest.$ac_ext
5547 LIBS=$ac_func_search_save_LIBS
5548 fi
5549 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5550 $as_echo "$ac_cv_search_opendir" >&6; }
5551 ac_res=$ac_cv_search_opendir
5552 if test "$ac_res" != no; then
5553   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5554
5555 fi
5556
5557 else
5558   { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
5559 $as_echo_n "checking for library containing opendir... " >&6; }
5560 if test "${ac_cv_search_opendir+set}" = set; then
5561   $as_echo_n "(cached) " >&6
5562 else
5563   ac_func_search_save_LIBS=$LIBS
5564 cat >conftest.$ac_ext <<_ACEOF
5565 /* confdefs.h.  */
5566 _ACEOF
5567 cat confdefs.h >>conftest.$ac_ext
5568 cat >>conftest.$ac_ext <<_ACEOF
5569 /* end confdefs.h.  */
5570
5571 /* Override any GCC internal prototype to avoid an error.
5572    Use char because int might match the return type of a GCC
5573    builtin and then its argument prototype would still apply.  */
5574 #ifdef __cplusplus
5575 extern "C"
5576 #endif
5577 char opendir ();
5578 int
5579 main ()
5580 {
5581 return opendir ();
5582   ;
5583   return 0;
5584 }
5585 _ACEOF
5586 for ac_lib in '' x; do
5587   if test -z "$ac_lib"; then
5588     ac_res="none required"
5589   else
5590     ac_res=-l$ac_lib
5591     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5592   fi
5593   rm -rf conftest.$ac_objext conftest$ac_exeext
5594 if { (ac_try="$ac_link"
5595 case "(($ac_try" in
5596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5597   *) ac_try_echo=$ac_try;;
5598 esac
5599 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5600 $as_echo "$ac_try_echo") >&5
5601   (eval "$ac_link") 2>conftest.er1
5602   ac_status=$?
5603   grep -v '^ *+' conftest.er1 >conftest.err
5604   rm -rf conftest.er1
5605   cat conftest.err >&5
5606   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5607   (exit $ac_status); } && {
5608          test -z "$ac_c_werror_flag" ||
5609          test ! -s conftest.err
5610        } && test -s conftest$ac_exeext && {
5611          test "$cross_compiling" = yes ||
5612          $as_test_x conftest$ac_exeext
5613        }; then
5614   ac_cv_search_opendir=$ac_res
5615 else
5616   $as_echo "$as_me: failed program was:" >&5
5617 sed 's/^/| /' conftest.$ac_ext >&5
5618
5619
5620 fi
5621
5622 rm -rf conftest.dSYM
5623 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5624       conftest$ac_exeext
5625   if test "${ac_cv_search_opendir+set}" = set; then
5626   break
5627 fi
5628 done
5629 if test "${ac_cv_search_opendir+set}" = set; then
5630   :
5631 else
5632   ac_cv_search_opendir=no
5633 fi
5634 rm conftest.$ac_ext
5635 LIBS=$ac_func_search_save_LIBS
5636 fi
5637 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5638 $as_echo "$ac_cv_search_opendir" >&6; }
5639 ac_res=$ac_cv_search_opendir
5640 if test "$ac_res" != no; then
5641   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5642
5643 fi
5644
5645 fi
5646
5647 { $as_echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5648 $as_echo_n "checking how to call gettimeofday... " >&6; }
5649   if test "${ac_cv_gettimeofday_args+set}" = set; then
5650   $as_echo_n "(cached) " >&6
5651 else
5652   cat >conftest.$ac_ext <<_ACEOF
5653 /* confdefs.h.  */
5654 _ACEOF
5655 cat confdefs.h >>conftest.$ac_ext
5656 cat >>conftest.$ac_ext <<_ACEOF
5657 /* end confdefs.h.  */
5658 #include <stdlib.h>
5659                     #include <sys/time.h>
5660 int
5661 main ()
5662 {
5663 struct timeval tv; struct timezone tzp;
5664                     gettimeofday(&tv, &tzp);
5665   ;
5666   return 0;
5667 }
5668 _ACEOF
5669 rm -rf conftest.$ac_objext
5670 if { (ac_try="$ac_compile"
5671 case "(($ac_try" in
5672   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5673   *) ac_try_echo=$ac_try;;
5674 esac
5675 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5676 $as_echo "$ac_try_echo") >&5
5677   (eval "$ac_compile") 2>conftest.er1
5678   ac_status=$?
5679   grep -v '^ *+' conftest.er1 >conftest.err
5680   rm -rf conftest.er1
5681   cat conftest.err >&5
5682   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5683   (exit $ac_status); } && {
5684          test -z "$ac_c_werror_flag" ||
5685          test ! -s conftest.err
5686        } && test -s conftest.$ac_objext; then
5687   ac_gettimeofday_args=2
5688 else
5689   $as_echo "$as_me: failed program was:" >&5
5690 sed 's/^/| /' conftest.$ac_ext >&5
5691
5692         cat >conftest.$ac_ext <<_ACEOF
5693 /* confdefs.h.  */
5694 _ACEOF
5695 cat confdefs.h >>conftest.$ac_ext
5696 cat >>conftest.$ac_ext <<_ACEOF
5697 /* end confdefs.h.  */
5698 #include <stdlib.h>
5699                                     #include <sys/time.h>
5700 int
5701 main ()
5702 {
5703 struct timeval tv; gettimeofday(&tv);
5704   ;
5705   return 0;
5706 }
5707 _ACEOF
5708 rm -rf conftest.$ac_objext
5709 if { (ac_try="$ac_compile"
5710 case "(($ac_try" in
5711   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5712   *) ac_try_echo=$ac_try;;
5713 esac
5714 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5715 $as_echo "$ac_try_echo") >&5
5716   (eval "$ac_compile") 2>conftest.er1
5717   ac_status=$?
5718   grep -v '^ *+' conftest.er1 >conftest.err
5719   rm -rf conftest.er1
5720   cat conftest.err >&5
5721   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5722   (exit $ac_status); } && {
5723          test -z "$ac_c_werror_flag" ||
5724          test ! -s conftest.err
5725        } && test -s conftest.$ac_objext; then
5726   ac_gettimeofday_args=1
5727 else
5728   $as_echo "$as_me: failed program was:" >&5
5729 sed 's/^/| /' conftest.$ac_ext >&5
5730
5731         ac_gettimeofday_args=0
5732 fi
5733
5734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5735 fi
5736
5737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5738     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5739 fi
5740
5741   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5742   if test "$ac_gettimeofday_args" = 1 ; then
5743     cat >>confdefs.h <<\_ACEOF
5744 #define HAVE_GETTIMEOFDAY 1
5745 _ACEOF
5746
5747     { $as_echo "$as_me:$LINENO: result: one argument" >&5
5748 $as_echo "one argument" >&6; }
5749   elif test "$ac_gettimeofday_args" = 2 ; then
5750     cat >>confdefs.h <<\_ACEOF
5751 #define HAVE_GETTIMEOFDAY 1
5752 _ACEOF
5753
5754     cat >>confdefs.h <<\_ACEOF
5755 #define GETTIMEOFDAY_TWO_ARGS 1
5756 _ACEOF
5757
5758     { $as_echo "$as_me:$LINENO: result: two arguments" >&5
5759 $as_echo "two arguments" >&6; }
5760   else
5761     { $as_echo "$as_me:$LINENO: result: unknown" >&5
5762 $as_echo "unknown" >&6; }
5763   fi
5764
5765 # Check whether --enable-largefile was given.
5766 if test "${enable_largefile+set}" = set; then
5767   enableval=$enable_largefile;
5768 fi
5769
5770 if test "$enable_largefile" != no; then
5771
5772   { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5773 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5774 if test "${ac_cv_sys_largefile_CC+set}" = set; then
5775   $as_echo_n "(cached) " >&6
5776 else
5777   ac_cv_sys_largefile_CC=no
5778      if test "$GCC" != yes; then
5779        ac_save_CC=$CC
5780        while :; do
5781          # IRIX 6.2 and later do not support large files by default,
5782          # so use the C compiler's -n32 option if that helps.
5783          cat >conftest.$ac_ext <<_ACEOF
5784 /* confdefs.h.  */
5785 _ACEOF
5786 cat confdefs.h >>conftest.$ac_ext
5787 cat >>conftest.$ac_ext <<_ACEOF
5788 /* end confdefs.h.  */
5789 #include <sys/types.h>
5790  /* Check that off_t can represent 2**63 - 1 correctly.
5791     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5792     since some C++ compilers masquerading as C compilers
5793     incorrectly reject 9223372036854775807.  */
5794 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5795   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5796                        && LARGE_OFF_T % 2147483647 == 1)
5797                       ? 1 : -1];
5798 int
5799 main ()
5800 {
5801
5802   ;
5803   return 0;
5804 }
5805 _ACEOF
5806          rm -rf conftest.$ac_objext
5807 if { (ac_try="$ac_compile"
5808 case "(($ac_try" in
5809   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5810   *) ac_try_echo=$ac_try;;
5811 esac
5812 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5813 $as_echo "$ac_try_echo") >&5
5814   (eval "$ac_compile") 2>conftest.er1
5815   ac_status=$?
5816   grep -v '^ *+' conftest.er1 >conftest.err
5817   rm -rf conftest.er1
5818   cat conftest.err >&5
5819   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820   (exit $ac_status); } && {
5821          test -z "$ac_c_werror_flag" ||
5822          test ! -s conftest.err
5823        } && test -s conftest.$ac_objext; then
5824   break
5825 else
5826   $as_echo "$as_me: failed program was:" >&5
5827 sed 's/^/| /' conftest.$ac_ext >&5
5828
5829
5830 fi
5831
5832 rm -f core conftest.err conftest.$ac_objext
5833          CC="$CC -n32"
5834          rm -rf conftest.$ac_objext
5835 if { (ac_try="$ac_compile"
5836 case "(($ac_try" in
5837   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5838   *) ac_try_echo=$ac_try;;
5839 esac
5840 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5841 $as_echo "$ac_try_echo") >&5
5842   (eval "$ac_compile") 2>conftest.er1
5843   ac_status=$?
5844   grep -v '^ *+' conftest.er1 >conftest.err
5845   rm -rf conftest.er1
5846   cat conftest.err >&5
5847   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5848   (exit $ac_status); } && {
5849          test -z "$ac_c_werror_flag" ||
5850          test ! -s conftest.err
5851        } && test -s conftest.$ac_objext; then
5852   ac_cv_sys_largefile_CC=' -n32'; break
5853 else
5854   $as_echo "$as_me: failed program was:" >&5
5855 sed 's/^/| /' conftest.$ac_ext >&5
5856
5857
5858 fi
5859
5860 rm -f core conftest.err conftest.$ac_objext
5861          break
5862        done
5863        CC=$ac_save_CC
5864        rm -rf conftest.$ac_ext
5865     fi
5866 fi
5867 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5868 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5869   if test "$ac_cv_sys_largefile_CC" != no; then
5870     CC=$CC$ac_cv_sys_largefile_CC
5871   fi
5872
5873   { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5874 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5875 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5876   $as_echo_n "(cached) " >&6
5877 else
5878   while :; do
5879   cat >conftest.$ac_ext <<_ACEOF
5880 /* confdefs.h.  */
5881 _ACEOF
5882 cat confdefs.h >>conftest.$ac_ext
5883 cat >>conftest.$ac_ext <<_ACEOF
5884 /* end confdefs.h.  */
5885 #include <sys/types.h>
5886  /* Check that off_t can represent 2**63 - 1 correctly.
5887     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5888     since some C++ compilers masquerading as C compilers
5889     incorrectly reject 9223372036854775807.  */
5890 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5891   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5892                        && LARGE_OFF_T % 2147483647 == 1)
5893                       ? 1 : -1];
5894 int
5895 main ()
5896 {
5897
5898   ;
5899   return 0;
5900 }
5901 _ACEOF
5902 rm -rf conftest.$ac_objext
5903 if { (ac_try="$ac_compile"
5904 case "(($ac_try" in
5905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5906   *) ac_try_echo=$ac_try;;
5907 esac
5908 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5909 $as_echo "$ac_try_echo") >&5
5910   (eval "$ac_compile") 2>conftest.er1
5911   ac_status=$?
5912   grep -v '^ *+' conftest.er1 >conftest.err
5913   rm -rf conftest.er1
5914   cat conftest.err >&5
5915   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5916   (exit $ac_status); } && {
5917          test -z "$ac_c_werror_flag" ||
5918          test ! -s conftest.err
5919        } && test -s conftest.$ac_objext; then
5920   ac_cv_sys_file_offset_bits=no; break
5921 else
5922   $as_echo "$as_me: failed program was:" >&5
5923 sed 's/^/| /' conftest.$ac_ext >&5
5924
5925
5926 fi
5927
5928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929   cat >conftest.$ac_ext <<_ACEOF
5930 /* confdefs.h.  */
5931 _ACEOF
5932 cat confdefs.h >>conftest.$ac_ext
5933 cat >>conftest.$ac_ext <<_ACEOF
5934 /* end confdefs.h.  */
5935 #define _FILE_OFFSET_BITS 64
5936 #include <sys/types.h>
5937  /* Check that off_t can represent 2**63 - 1 correctly.
5938     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5939     since some C++ compilers masquerading as C compilers
5940     incorrectly reject 9223372036854775807.  */
5941 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5942   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5943                        && LARGE_OFF_T % 2147483647 == 1)
5944                       ? 1 : -1];
5945 int
5946 main ()
5947 {
5948
5949   ;
5950   return 0;
5951 }
5952 _ACEOF
5953 rm -rf conftest.$ac_objext
5954 if { (ac_try="$ac_compile"
5955 case "(($ac_try" in
5956   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5957   *) ac_try_echo=$ac_try;;
5958 esac
5959 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5960 $as_echo "$ac_try_echo") >&5
5961   (eval "$ac_compile") 2>conftest.er1
5962   ac_status=$?
5963   grep -v '^ *+' conftest.er1 >conftest.err
5964   rm -rf conftest.er1
5965   cat conftest.err >&5
5966   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5967   (exit $ac_status); } && {
5968          test -z "$ac_c_werror_flag" ||
5969          test ! -s conftest.err
5970        } && test -s conftest.$ac_objext; then
5971   ac_cv_sys_file_offset_bits=64; break
5972 else
5973   $as_echo "$as_me: failed program was:" >&5
5974 sed 's/^/| /' conftest.$ac_ext >&5
5975
5976
5977 fi
5978
5979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5980   ac_cv_sys_file_offset_bits=unknown
5981   break
5982 done
5983 fi
5984 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5985 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5986 case $ac_cv_sys_file_offset_bits in #(
5987   no | unknown) ;;
5988   *)
5989 cat >>confdefs.h <<_ACEOF
5990 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5991 _ACEOF
5992 ;;
5993 esac
5994 rm -rf conftest*
5995   if test $ac_cv_sys_file_offset_bits = unknown; then
5996     { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
5997 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5998 if test "${ac_cv_sys_large_files+set}" = set; then
5999   $as_echo_n "(cached) " >&6
6000 else
6001   while :; do
6002   cat >conftest.$ac_ext <<_ACEOF
6003 /* confdefs.h.  */
6004 _ACEOF
6005 cat confdefs.h >>conftest.$ac_ext
6006 cat >>conftest.$ac_ext <<_ACEOF
6007 /* end confdefs.h.  */
6008 #include <sys/types.h>
6009  /* Check that off_t can represent 2**63 - 1 correctly.
6010     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6011     since some C++ compilers masquerading as C compilers
6012     incorrectly reject 9223372036854775807.  */
6013 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6014   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6015                        && LARGE_OFF_T % 2147483647 == 1)
6016                       ? 1 : -1];
6017 int
6018 main ()
6019 {
6020
6021   ;
6022   return 0;
6023 }
6024 _ACEOF
6025 rm -rf conftest.$ac_objext
6026 if { (ac_try="$ac_compile"
6027 case "(($ac_try" in
6028   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6029   *) ac_try_echo=$ac_try;;
6030 esac
6031 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6032 $as_echo "$ac_try_echo") >&5
6033   (eval "$ac_compile") 2>conftest.er1
6034   ac_status=$?
6035   grep -v '^ *+' conftest.er1 >conftest.err
6036   rm -rf conftest.er1
6037   cat conftest.err >&5
6038   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6039   (exit $ac_status); } && {
6040          test -z "$ac_c_werror_flag" ||
6041          test ! -s conftest.err
6042        } && test -s conftest.$ac_objext; then
6043   ac_cv_sys_large_files=no; break
6044 else
6045   $as_echo "$as_me: failed program was:" >&5
6046 sed 's/^/| /' conftest.$ac_ext >&5
6047
6048
6049 fi
6050
6051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6052   cat >conftest.$ac_ext <<_ACEOF
6053 /* confdefs.h.  */
6054 _ACEOF
6055 cat confdefs.h >>conftest.$ac_ext
6056 cat >>conftest.$ac_ext <<_ACEOF
6057 /* end confdefs.h.  */
6058 #define _LARGE_FILES 1
6059 #include <sys/types.h>
6060  /* Check that off_t can represent 2**63 - 1 correctly.
6061     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6062     since some C++ compilers masquerading as C compilers
6063     incorrectly reject 9223372036854775807.  */
6064 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6065   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6066                        && LARGE_OFF_T % 2147483647 == 1)
6067                       ? 1 : -1];
6068 int
6069 main ()
6070 {
6071
6072   ;
6073   return 0;
6074 }
6075 _ACEOF
6076 rm -rf conftest.$ac_objext
6077 if { (ac_try="$ac_compile"
6078 case "(($ac_try" in
6079   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6080   *) ac_try_echo=$ac_try;;
6081 esac
6082 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6083 $as_echo "$ac_try_echo") >&5
6084   (eval "$ac_compile") 2>conftest.er1
6085   ac_status=$?
6086   grep -v '^ *+' conftest.er1 >conftest.err
6087   rm -rf conftest.er1
6088   cat conftest.err >&5
6089   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6090   (exit $ac_status); } && {
6091          test -z "$ac_c_werror_flag" ||
6092          test ! -s conftest.err
6093        } && test -s conftest.$ac_objext; then
6094   ac_cv_sys_large_files=1; break
6095 else
6096   $as_echo "$as_me: failed program was:" >&5
6097 sed 's/^/| /' conftest.$ac_ext >&5
6098
6099
6100 fi
6101
6102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6103   ac_cv_sys_large_files=unknown
6104   break
6105 done
6106 fi
6107 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
6108 $as_echo "$ac_cv_sys_large_files" >&6; }
6109 case $ac_cv_sys_large_files in #(
6110   no | unknown) ;;
6111   *)
6112 cat >>confdefs.h <<_ACEOF
6113 #define _LARGE_FILES $ac_cv_sys_large_files
6114 _ACEOF
6115 ;;
6116 esac
6117 rm -rf conftest*
6118   fi
6119 fi
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
6131 do
6132 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6133 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
6134 $as_echo_n "checking for $ac_func... " >&6; }
6135 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
6136   $as_echo_n "(cached) " >&6
6137 else
6138   cat >conftest.$ac_ext <<_ACEOF
6139 /* confdefs.h.  */
6140 _ACEOF
6141 cat confdefs.h >>conftest.$ac_ext
6142 cat >>conftest.$ac_ext <<_ACEOF
6143 /* end confdefs.h.  */
6144 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6145    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6146 #define $ac_func innocuous_$ac_func
6147
6148 /* System header to define __stub macros and hopefully few prototypes,
6149     which can conflict with char $ac_func (); below.
6150     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6151     <limits.h> exists even on freestanding compilers.  */
6152
6153 #ifdef __STDC__
6154 # include <limits.h>
6155 #else
6156 # include <assert.h>
6157 #endif
6158
6159 #undef $ac_func
6160
6161 /* Override any GCC internal prototype to avoid an error.
6162    Use char because int might match the return type of a GCC
6163    builtin and then its argument prototype would still apply.  */
6164 #ifdef __cplusplus
6165 extern "C"
6166 #endif
6167 char $ac_func ();
6168 /* The GNU C library defines this for functions which it implements
6169     to always fail with ENOSYS.  Some functions are actually named
6170     something starting with __ and the normal name is an alias.  */
6171 #if defined __stub_$ac_func || defined __stub___$ac_func
6172 choke me
6173 #endif
6174
6175 int
6176 main ()
6177 {
6178 return $ac_func ();
6179   ;
6180   return 0;
6181 }
6182 _ACEOF
6183 rm -rf conftest.$ac_objext conftest$ac_exeext
6184 if { (ac_try="$ac_link"
6185 case "(($ac_try" in
6186   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6187   *) ac_try_echo=$ac_try;;
6188 esac
6189 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6190 $as_echo "$ac_try_echo") >&5
6191   (eval "$ac_link") 2>conftest.er1
6192   ac_status=$?
6193   grep -v '^ *+' conftest.er1 >conftest.err
6194   rm -rf conftest.er1
6195   cat conftest.err >&5
6196   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6197   (exit $ac_status); } && {
6198          test -z "$ac_c_werror_flag" ||
6199          test ! -s conftest.err
6200        } && test -s conftest$ac_exeext && {
6201          test "$cross_compiling" = yes ||
6202          $as_test_x conftest$ac_exeext
6203        }; then
6204   eval "$as_ac_var=yes"
6205 else
6206   $as_echo "$as_me: failed program was:" >&5
6207 sed 's/^/| /' conftest.$ac_ext >&5
6208
6209         eval "$as_ac_var=no"
6210 fi
6211
6212 rm -rf conftest.dSYM
6213 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6214       conftest$ac_exeext conftest.$ac_ext
6215 fi
6216 ac_res=`eval 'as_val=${'$as_ac_var'}
6217                  $as_echo "$as_val"'`
6218                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6219 $as_echo "$ac_res" >&6; }
6220 as_val=`eval 'as_val=${'$as_ac_var'}
6221                  $as_echo "$as_val"'`
6222    if test "x$as_val" = x""yes; then
6223   cat >>confdefs.h <<_ACEOF
6224 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6225 _ACEOF
6226
6227 fi
6228 done
6229
6230
6231
6232
6233
6234 for ac_func in sigaction syslog realpath setrlimit
6235 do
6236 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6237 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
6238 $as_echo_n "checking for $ac_func... " >&6; }
6239 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
6240   $as_echo_n "(cached) " >&6
6241 else
6242   cat >conftest.$ac_ext <<_ACEOF
6243 /* confdefs.h.  */
6244 _ACEOF
6245 cat confdefs.h >>conftest.$ac_ext
6246 cat >>conftest.$ac_ext <<_ACEOF
6247 /* end confdefs.h.  */
6248 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6249    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6250 #define $ac_func innocuous_$ac_func
6251
6252 /* System header to define __stub macros and hopefully few prototypes,
6253     which can conflict with char $ac_func (); below.
6254     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6255     <limits.h> exists even on freestanding compilers.  */
6256
6257 #ifdef __STDC__
6258 # include <limits.h>
6259 #else
6260 # include <assert.h>
6261 #endif
6262
6263 #undef $ac_func
6264
6265 /* Override any GCC internal prototype to avoid an error.
6266    Use char because int might match the return type of a GCC
6267    builtin and then its argument prototype would still apply.  */
6268 #ifdef __cplusplus
6269 extern "C"
6270 #endif
6271 char $ac_func ();
6272 /* The GNU C library defines this for functions which it implements
6273     to always fail with ENOSYS.  Some functions are actually named
6274     something starting with __ and the normal name is an alias.  */
6275 #if defined __stub_$ac_func || defined __stub___$ac_func
6276 choke me
6277 #endif
6278
6279 int
6280 main ()
6281 {
6282 return $ac_func ();
6283   ;
6284   return 0;
6285 }
6286 _ACEOF
6287 rm -rf conftest.$ac_objext conftest$ac_exeext
6288 if { (ac_try="$ac_link"
6289 case "(($ac_try" in
6290   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6291   *) ac_try_echo=$ac_try;;
6292 esac
6293 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6294 $as_echo "$ac_try_echo") >&5
6295   (eval "$ac_link") 2>conftest.er1
6296   ac_status=$?
6297   grep -v '^ *+' conftest.er1 >conftest.err
6298   rm -rf conftest.er1
6299   cat conftest.err >&5
6300   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6301   (exit $ac_status); } && {
6302          test -z "$ac_c_werror_flag" ||
6303          test ! -s conftest.err
6304        } && test -s conftest$ac_exeext && {
6305          test "$cross_compiling" = yes ||
6306          $as_test_x conftest$ac_exeext
6307        }; then
6308   eval "$as_ac_var=yes"
6309 else
6310   $as_echo "$as_me: failed program was:" >&5
6311 sed 's/^/| /' conftest.$ac_ext >&5
6312
6313         eval "$as_ac_var=no"
6314 fi
6315
6316 rm -rf conftest.dSYM
6317 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6318       conftest$ac_exeext conftest.$ac_ext
6319 fi
6320 ac_res=`eval 'as_val=${'$as_ac_var'}
6321                  $as_echo "$as_val"'`
6322                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6323 $as_echo "$ac_res" >&6; }
6324 as_val=`eval 'as_val=${'$as_ac_var'}
6325                  $as_echo "$as_val"'`
6326    if test "x$as_val" = x""yes; then
6327   cat >>confdefs.h <<_ACEOF
6328 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6329 _ACEOF
6330
6331 fi
6332 done
6333
6334
6335 for ac_func in setlocale
6336 do
6337 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6338 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
6339 $as_echo_n "checking for $ac_func... " >&6; }
6340 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
6341   $as_echo_n "(cached) " >&6
6342 else
6343   cat >conftest.$ac_ext <<_ACEOF
6344 /* confdefs.h.  */
6345 _ACEOF
6346 cat confdefs.h >>conftest.$ac_ext
6347 cat >>conftest.$ac_ext <<_ACEOF
6348 /* end confdefs.h.  */
6349 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6350    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6351 #define $ac_func innocuous_$ac_func
6352
6353 /* System header to define __stub macros and hopefully few prototypes,
6354     which can conflict with char $ac_func (); below.
6355     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6356     <limits.h> exists even on freestanding compilers.  */
6357
6358 #ifdef __STDC__
6359 # include <limits.h>
6360 #else
6361 # include <assert.h>
6362 #endif
6363
6364 #undef $ac_func
6365
6366 /* Override any GCC internal prototype to avoid an error.
6367    Use char because int might match the return type of a GCC
6368    builtin and then its argument prototype would still apply.  */
6369 #ifdef __cplusplus
6370 extern "C"
6371 #endif
6372 char $ac_func ();
6373 /* The GNU C library defines this for functions which it implements
6374     to always fail with ENOSYS.  Some functions are actually named
6375     something starting with __ and the normal name is an alias.  */
6376 #if defined __stub_$ac_func || defined __stub___$ac_func
6377 choke me
6378 #endif
6379
6380 int
6381 main ()
6382 {
6383 return $ac_func ();
6384   ;
6385   return 0;
6386 }
6387 _ACEOF
6388 rm -rf conftest.$ac_objext conftest$ac_exeext
6389 if { (ac_try="$ac_link"
6390 case "(($ac_try" in
6391   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6392   *) ac_try_echo=$ac_try;;
6393 esac
6394 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6395 $as_echo "$ac_try_echo") >&5
6396   (eval "$ac_link") 2>conftest.er1
6397   ac_status=$?
6398   grep -v '^ *+' conftest.er1 >conftest.err
6399   rm -rf conftest.er1
6400   cat conftest.err >&5
6401   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6402   (exit $ac_status); } && {
6403          test -z "$ac_c_werror_flag" ||
6404          test ! -s conftest.err
6405        } && test -s conftest$ac_exeext && {
6406          test "$cross_compiling" = yes ||
6407          $as_test_x conftest$ac_exeext
6408        }; then
6409   eval "$as_ac_var=yes"
6410 else
6411   $as_echo "$as_me: failed program was:" >&5
6412 sed 's/^/| /' conftest.$ac_ext >&5
6413
6414         eval "$as_ac_var=no"
6415 fi
6416
6417 rm -rf conftest.dSYM
6418 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6419       conftest$ac_exeext conftest.$ac_ext
6420 fi
6421 ac_res=`eval 'as_val=${'$as_ac_var'}
6422                  $as_echo "$as_val"'`
6423                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6424 $as_echo "$ac_res" >&6; }
6425 as_val=`eval 'as_val=${'$as_ac_var'}
6426                  $as_echo "$as_val"'`
6427    if test "x$as_val" = x""yes; then
6428   cat >>confdefs.h <<_ACEOF
6429 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6430 _ACEOF
6431
6432 fi
6433 done
6434
6435 { $as_echo "$as_me:$LINENO: checking for struct icmp" >&5
6436 $as_echo_n "checking for struct icmp... " >&6; }
6437 if test "${ac_cv_have_icmp+set}" = set; then
6438   $as_echo_n "(cached) " >&6
6439 else
6440   cat >conftest.$ac_ext <<_ACEOF
6441 /* confdefs.h.  */
6442 _ACEOF
6443 cat confdefs.h >>conftest.$ac_ext
6444 cat >>conftest.$ac_ext <<_ACEOF
6445 /* end confdefs.h.  */
6446 #include <stdlib.h>
6447                    #include <stdio.h>
6448                    #include <math.h>
6449                    #include <unistd.h>
6450                    #include <limits.h>
6451                    #include <signal.h>
6452                    #include <fcntl.h>
6453                    #include <sys/types.h>
6454                    #include <sys/time.h>
6455                    #include <sys/ipc.h>
6456                    #include <sys/shm.h>
6457                    #include <sys/socket.h>
6458                    #include <netinet/in_systm.h>
6459                    #include <netinet/in.h>
6460                    #include <netinet/ip.h>
6461                    #include <netinet/ip_icmp.h>
6462                    #include <netinet/udp.h>
6463                    #include <arpa/inet.h>
6464                    #include <netdb.h>
6465 int
6466 main ()
6467 {
6468 struct icmp i;
6469                    struct sockaddr s;
6470                    struct sockaddr_in si;
6471                    struct ip ip;
6472                    i.icmp_type = ICMP_ECHO;
6473                    i.icmp_code = 0;
6474                    i.icmp_cksum = 0;
6475                    i.icmp_id = 0;
6476                    i.icmp_seq = 0;
6477                    si.sin_family = AF_INET;
6478                    #if defined(__DECC) || defined(_IP_VHL)
6479                    ip.ip_vhl = 0;
6480                    #else
6481                    ip.ip_hl = 0;
6482                    #endif
6483
6484   ;
6485   return 0;
6486 }
6487 _ACEOF
6488 rm -rf conftest.$ac_objext
6489 if { (ac_try="$ac_compile"
6490 case "(($ac_try" in
6491   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6492   *) ac_try_echo=$ac_try;;
6493 esac
6494 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6495 $as_echo "$ac_try_echo") >&5
6496   (eval "$ac_compile") 2>conftest.er1
6497   ac_status=$?
6498   grep -v '^ *+' conftest.er1 >conftest.err
6499   rm -rf conftest.er1
6500   cat conftest.err >&5
6501   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6502   (exit $ac_status); } && {
6503          test -z "$ac_c_werror_flag" ||
6504          test ! -s conftest.err
6505        } && test -s conftest.$ac_objext; then
6506   ac_cv_have_icmp=yes
6507 else
6508   $as_echo "$as_me: failed program was:" >&5
6509 sed 's/^/| /' conftest.$ac_ext >&5
6510
6511         ac_cv_have_icmp=no
6512 fi
6513
6514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6515 fi
6516 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
6517 $as_echo "$ac_cv_have_icmp" >&6; }
6518  if test "$ac_cv_have_icmp" = yes ; then
6519    cat >>confdefs.h <<\_ACEOF
6520 #define HAVE_ICMP 1
6521 _ACEOF
6522
6523  fi
6524 { $as_echo "$as_me:$LINENO: checking for struct icmphdr" >&5
6525 $as_echo_n "checking for struct icmphdr... " >&6; }
6526 if test "${ac_cv_have_icmphdr+set}" = set; then
6527   $as_echo_n "(cached) " >&6
6528 else
6529   cat >conftest.$ac_ext <<_ACEOF
6530 /* confdefs.h.  */
6531 _ACEOF
6532 cat confdefs.h >>conftest.$ac_ext
6533 cat >>conftest.$ac_ext <<_ACEOF
6534 /* end confdefs.h.  */
6535 #include <stdlib.h>
6536                    #include <stdio.h>
6537                    #include <math.h>
6538                    #include <unistd.h>
6539                    #include <limits.h>
6540                    #include <signal.h>
6541                    #include <fcntl.h>
6542                    #include <sys/types.h>
6543                    #include <sys/time.h>
6544                    #include <sys/ipc.h>
6545                    #include <sys/shm.h>
6546                    #include <sys/socket.h>
6547                    #include <netinet/in_systm.h>
6548                    #include <netinet/in.h>
6549                    #include <netinet/ip.h>
6550                    #include <netinet/ip_icmp.h>
6551                    #include <netinet/udp.h>
6552                    #include <arpa/inet.h>
6553                    #include <netdb.h>
6554 int
6555 main ()
6556 {
6557 struct icmphdr i;
6558                    struct sockaddr s;
6559                    struct sockaddr_in si;
6560                    struct ip ip;
6561                    i.type = ICMP_ECHO;
6562                    i.code = 0;
6563                    i.checksum = 0;
6564                    i.un.echo.id = 0;
6565                    i.un.echo.sequence = 0;
6566                    si.sin_family = AF_INET;
6567                    ip.ip_hl = 0;
6568   ;
6569   return 0;
6570 }
6571 _ACEOF
6572 rm -rf conftest.$ac_objext
6573 if { (ac_try="$ac_compile"
6574 case "(($ac_try" in
6575   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6576   *) ac_try_echo=$ac_try;;
6577 esac
6578 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6579 $as_echo "$ac_try_echo") >&5
6580   (eval "$ac_compile") 2>conftest.er1
6581   ac_status=$?
6582   grep -v '^ *+' conftest.er1 >conftest.err
6583   rm -rf conftest.er1
6584   cat conftest.err >&5
6585   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6586   (exit $ac_status); } && {
6587          test -z "$ac_c_werror_flag" ||
6588          test ! -s conftest.err
6589        } && test -s conftest.$ac_objext; then
6590   ac_cv_have_icmphdr=yes
6591 else
6592   $as_echo "$as_me: failed program was:" >&5
6593 sed 's/^/| /' conftest.$ac_ext >&5
6594
6595         ac_cv_have_icmphdr=no
6596 fi
6597
6598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6599 fi
6600 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
6601 $as_echo "$ac_cv_have_icmphdr" >&6; }
6602  if test "$ac_cv_have_icmphdr" = yes ; then
6603    cat >>confdefs.h <<\_ACEOF
6604 #define HAVE_ICMPHDR 1
6605 _ACEOF
6606
6607  fi
6608 { $as_echo "$as_me:$LINENO: checking for getifaddrs" >&5
6609 $as_echo_n "checking for getifaddrs... " >&6; }
6610 if test "${ac_cv_have_getifaddrs+set}" = set; then
6611   $as_echo_n "(cached) " >&6
6612 else
6613   cat >conftest.$ac_ext <<_ACEOF
6614 /* confdefs.h.  */
6615 _ACEOF
6616 cat confdefs.h >>conftest.$ac_ext
6617 cat >>conftest.$ac_ext <<_ACEOF
6618 /* end confdefs.h.  */
6619 #include <stdlib.h>
6620                    #include <unistd.h>
6621                    #include <arpa/inet.h>
6622                    #include <ifaddrs.h>
6623 int
6624 main ()
6625 {
6626 struct ifaddrs *ifa;
6627                    getifaddrs (&ifa);
6628                    ifa->ifa_next = 0;
6629                    ifa->ifa_addr->sa_family = 0;
6630   ;
6631   return 0;
6632 }
6633 _ACEOF
6634 rm -rf conftest.$ac_objext
6635 if { (ac_try="$ac_compile"
6636 case "(($ac_try" in
6637   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6638   *) ac_try_echo=$ac_try;;
6639 esac
6640 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6641 $as_echo "$ac_try_echo") >&5
6642   (eval "$ac_compile") 2>conftest.er1
6643   ac_status=$?
6644   grep -v '^ *+' conftest.er1 >conftest.err
6645   rm -rf conftest.er1
6646   cat conftest.err >&5
6647   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6648   (exit $ac_status); } && {
6649          test -z "$ac_c_werror_flag" ||
6650          test ! -s conftest.err
6651        } && test -s conftest.$ac_objext; then
6652   ac_cv_have_getifaddrs=yes
6653 else
6654   $as_echo "$as_me: failed program was:" >&5
6655 sed 's/^/| /' conftest.$ac_ext >&5
6656
6657         ac_cv_have_getifaddrs=no
6658 fi
6659
6660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6661 fi
6662 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_getifaddrs" >&5
6663 $as_echo "$ac_cv_have_getifaddrs" >&6; }
6664  if test "$ac_cv_have_getifaddrs" = yes ; then
6665    cat >>confdefs.h <<\_ACEOF
6666 #define HAVE_GETIFADDRS 1
6667 _ACEOF
6668
6669  fi
6670
6671
6672 for ac_header in crypt.h sys/select.h
6673 do
6674 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6675 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6676   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6677 $as_echo_n "checking for $ac_header... " >&6; }
6678 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6679   $as_echo_n "(cached) " >&6
6680 fi
6681 ac_res=`eval 'as_val=${'$as_ac_Header'}
6682                  $as_echo "$as_val"'`
6683                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6684 $as_echo "$ac_res" >&6; }
6685 else
6686   # Is the header compilable?
6687 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6688 $as_echo_n "checking $ac_header usability... " >&6; }
6689 cat >conftest.$ac_ext <<_ACEOF
6690 /* confdefs.h.  */
6691 _ACEOF
6692 cat confdefs.h >>conftest.$ac_ext
6693 cat >>conftest.$ac_ext <<_ACEOF
6694 /* end confdefs.h.  */
6695 $ac_includes_default
6696 #include <$ac_header>
6697 _ACEOF
6698 rm -rf conftest.$ac_objext
6699 if { (ac_try="$ac_compile"
6700 case "(($ac_try" in
6701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6702   *) ac_try_echo=$ac_try;;
6703 esac
6704 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6705 $as_echo "$ac_try_echo") >&5
6706   (eval "$ac_compile") 2>conftest.er1
6707   ac_status=$?
6708   grep -v '^ *+' conftest.er1 >conftest.err
6709   rm -rf conftest.er1
6710   cat conftest.err >&5
6711   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6712   (exit $ac_status); } && {
6713          test -z "$ac_c_werror_flag" ||
6714          test ! -s conftest.err
6715        } && test -s conftest.$ac_objext; then
6716   ac_header_compiler=yes
6717 else
6718   $as_echo "$as_me: failed program was:" >&5
6719 sed 's/^/| /' conftest.$ac_ext >&5
6720
6721         ac_header_compiler=no
6722 fi
6723
6724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6725 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6726 $as_echo "$ac_header_compiler" >&6; }
6727
6728 # Is the header present?
6729 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6730 $as_echo_n "checking $ac_header presence... " >&6; }
6731 cat >conftest.$ac_ext <<_ACEOF
6732 /* confdefs.h.  */
6733 _ACEOF
6734 cat confdefs.h >>conftest.$ac_ext
6735 cat >>conftest.$ac_ext <<_ACEOF
6736 /* end confdefs.h.  */
6737 #include <$ac_header>
6738 _ACEOF
6739 if { (ac_try="$ac_cpp conftest.$ac_ext"
6740 case "(($ac_try" in
6741   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6742   *) ac_try_echo=$ac_try;;
6743 esac
6744 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6745 $as_echo "$ac_try_echo") >&5
6746   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6747   ac_status=$?
6748   grep -v '^ *+' conftest.er1 >conftest.err
6749   rm -rf conftest.er1
6750   cat conftest.err >&5
6751   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6752   (exit $ac_status); } >/dev/null && {
6753          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6754          test ! -s conftest.err
6755        }; then
6756   ac_header_preproc=yes
6757 else
6758   $as_echo "$as_me: failed program was:" >&5
6759 sed 's/^/| /' conftest.$ac_ext >&5
6760
6761   ac_header_preproc=no
6762 fi
6763
6764 rm -rf conftest.err conftest.$ac_ext
6765 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6766 $as_echo "$ac_header_preproc" >&6; }
6767
6768 # So?  What about this header?
6769 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6770   yes:no: )
6771     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6772 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6773     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6774 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6775     ac_header_preproc=yes
6776     ;;
6777   no:yes:* )
6778     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6779 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6780     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6781 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6782     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6783 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6784     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6785 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6786     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6787 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6788     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6789 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6790
6791     ;;
6792 esac
6793 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6794 $as_echo_n "checking for $ac_header... " >&6; }
6795 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6796   $as_echo_n "(cached) " >&6
6797 else
6798   eval "$as_ac_Header=\$ac_header_preproc"
6799 fi
6800 ac_res=`eval 'as_val=${'$as_ac_Header'}
6801                  $as_echo "$as_val"'`
6802                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6803 $as_echo "$ac_res" >&6; }
6804
6805 fi
6806 as_val=`eval 'as_val=${'$as_ac_Header'}
6807                  $as_echo "$as_val"'`
6808    if test "x$as_val" = x""yes; then
6809   cat >>confdefs.h <<_ACEOF
6810 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6811 _ACEOF
6812
6813 fi
6814
6815 done
6816
6817 for ac_prog in perl5 perl
6818 do
6819   # Extract the first word of "$ac_prog", so it can be a program name with args.
6820 set dummy $ac_prog; ac_word=$2
6821 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6822 $as_echo_n "checking for $ac_word... " >&6; }
6823 if test "${ac_cv_path_PERL+set}" = set; then
6824   $as_echo_n "(cached) " >&6
6825 else
6826   case $PERL in
6827   [\\/]* | ?:[\\/]*)
6828   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6829   ;;
6830   *)
6831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6832 for as_dir in $PATH
6833 do
6834   IFS=$as_save_IFS
6835   test -z "$as_dir" && as_dir=.
6836   for ac_exec_ext in '' $ac_executable_extensions; do
6837   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6838     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6839     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6840     break 2
6841   fi
6842 done
6843 done
6844 IFS=$as_save_IFS
6845
6846   ;;
6847 esac
6848 fi
6849 PERL=$ac_cv_path_PERL
6850 if test -n "$PERL"; then
6851   { $as_echo "$as_me:$LINENO: result: $PERL" >&5
6852 $as_echo "$PERL" >&6; }
6853 else
6854   { $as_echo "$as_me:$LINENO: result: no" >&5
6855 $as_echo "no" >&6; }
6856 fi
6857
6858
6859   test -n "$PERL" && break
6860 done
6861
6862   if test -z "$PERL" ; then
6863     PERL_VERSION=0
6864   else
6865     { $as_echo "$as_me:$LINENO: checking perl version" >&5
6866 $as_echo_n "checking perl version... " >&6; }
6867 if test "${ac_cv_perl_version+set}" = set; then
6868   $as_echo_n "(cached) " >&6
6869 else
6870   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6871 fi
6872 { $as_echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6873 $as_echo "$ac_cv_perl_version" >&6; }
6874     PERL_VERSION=$ac_cv_perl_version
6875   fi
6876
6877
6878 if test -z "$PERL" ; then
6879   # don't let it be blank...
6880   PERL=/usr/bin/perl
6881 fi
6882
6883 { $as_echo "$as_me:$LINENO: checking for X" >&5
6884 $as_echo_n "checking for X... " >&6; }
6885
6886
6887 # Check whether --with-x was given.
6888 if test "${with_x+set}" = set; then
6889   withval=$with_x;
6890 fi
6891
6892 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6893 if test "x$with_x" = xno; then
6894   # The user explicitly disabled X.
6895   have_x=disabled
6896 else
6897   case $x_includes,$x_libraries in #(
6898     *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
6899 $as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
6900    { (exit 1); exit 1; }; };; #(
6901     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6902   $as_echo_n "(cached) " >&6
6903 else
6904   # One or both of the vars are not set, and there is no cached value.
6905 ac_x_includes=no ac_x_libraries=no
6906 rm -f -r conftest.dir
6907 if mkdir conftest.dir; then
6908   cd conftest.dir
6909   cat >Imakefile <<'_ACEOF'
6910 incroot:
6911         @echo incroot='${INCROOT}'
6912 usrlibdir:
6913         @echo usrlibdir='${USRLIBDIR}'
6914 libdir:
6915         @echo libdir='${LIBDIR}'
6916 _ACEOF
6917   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6918     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6919     for ac_var in incroot usrlibdir libdir; do
6920       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6921     done
6922     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6923     for ac_extension in a so sl dylib la dll; do
6924       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6925          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6926         ac_im_usrlibdir=$ac_im_libdir; break
6927       fi
6928     done
6929     # Screen out bogus values from the imake configuration.  They are
6930     # bogus both because they are the default anyway, and because
6931     # using them would break gcc on systems where it needs fixed includes.
6932     case $ac_im_incroot in
6933         /usr/include) ac_x_includes= ;;
6934         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6935     esac
6936     case $ac_im_usrlibdir in
6937         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6938         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6939     esac
6940   fi
6941   cd ..
6942   rm -f -r conftest.dir
6943 fi
6944
6945 # Standard set of common directories for X headers.
6946 # Check X11 before X11Rn because it is often a symlink to the current release.
6947 ac_x_header_dirs='
6948 /usr/X11/include
6949 /usr/X11R6/include
6950 /usr/X11R5/include
6951 /usr/X11R4/include
6952
6953 /usr/include/X11
6954 /usr/include/X11R6
6955 /usr/include/X11R5
6956 /usr/include/X11R4
6957
6958 /usr/local/X11/include
6959 /usr/local/X11R6/include
6960 /usr/local/X11R5/include
6961 /usr/local/X11R4/include
6962
6963 /usr/local/include/X11
6964 /usr/local/include/X11R6
6965 /usr/local/include/X11R5
6966 /usr/local/include/X11R4
6967
6968 /usr/X386/include
6969 /usr/x386/include
6970 /usr/XFree86/include/X11
6971
6972 /usr/include
6973 /usr/local/include
6974 /usr/unsupported/include
6975 /usr/athena/include
6976 /usr/local/x11r5/include
6977 /usr/lpp/Xamples/include
6978
6979 /usr/openwin/include
6980 /usr/openwin/share/include'
6981
6982 if test "$ac_x_includes" = no; then
6983   # Guess where to find include files, by looking for Xlib.h.
6984   # First, try using that file with no special directory specified.
6985   cat >conftest.$ac_ext <<_ACEOF
6986 /* confdefs.h.  */
6987 _ACEOF
6988 cat confdefs.h >>conftest.$ac_ext
6989 cat >>conftest.$ac_ext <<_ACEOF
6990 /* end confdefs.h.  */
6991 #include <X11/Xlib.h>
6992 _ACEOF
6993 if { (ac_try="$ac_cpp conftest.$ac_ext"
6994 case "(($ac_try" in
6995   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6996   *) ac_try_echo=$ac_try;;
6997 esac
6998 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6999 $as_echo "$ac_try_echo") >&5
7000   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7001   ac_status=$?
7002   grep -v '^ *+' conftest.er1 >conftest.err
7003   rm -rf conftest.er1
7004   cat conftest.err >&5
7005   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7006   (exit $ac_status); } >/dev/null && {
7007          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7008          test ! -s conftest.err
7009        }; then
7010   # We can compile using X headers with no special include directory.
7011 ac_x_includes=
7012 else
7013   $as_echo "$as_me: failed program was:" >&5
7014 sed 's/^/| /' conftest.$ac_ext >&5
7015
7016   for ac_dir in $ac_x_header_dirs; do
7017   if test -r "$ac_dir/X11/Xlib.h"; then
7018     ac_x_includes=$ac_dir
7019     break
7020   fi
7021 done
7022 fi
7023
7024 rm -rf conftest.err conftest.$ac_ext
7025 fi # $ac_x_includes = no
7026
7027 if test "$ac_x_libraries" = no; then
7028   # Check for the libraries.
7029   # See if we find them without any special options.
7030   # Don't add to $LIBS permanently.
7031   ac_save_LIBS=$LIBS
7032   LIBS="-lX11 $LIBS"
7033   cat >conftest.$ac_ext <<_ACEOF
7034 /* confdefs.h.  */
7035 _ACEOF
7036 cat confdefs.h >>conftest.$ac_ext
7037 cat >>conftest.$ac_ext <<_ACEOF
7038 /* end confdefs.h.  */
7039 #include <X11/Xlib.h>
7040 int
7041 main ()
7042 {
7043 XrmInitialize ()
7044   ;
7045   return 0;
7046 }
7047 _ACEOF
7048 rm -rf conftest.$ac_objext conftest$ac_exeext
7049 if { (ac_try="$ac_link"
7050 case "(($ac_try" in
7051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7052   *) ac_try_echo=$ac_try;;
7053 esac
7054 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7055 $as_echo "$ac_try_echo") >&5
7056   (eval "$ac_link") 2>conftest.er1
7057   ac_status=$?
7058   grep -v '^ *+' conftest.er1 >conftest.err
7059   rm -rf conftest.er1
7060   cat conftest.err >&5
7061   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7062   (exit $ac_status); } && {
7063          test -z "$ac_c_werror_flag" ||
7064          test ! -s conftest.err
7065        } && test -s conftest$ac_exeext && {
7066          test "$cross_compiling" = yes ||
7067          $as_test_x conftest$ac_exeext
7068        }; then
7069   LIBS=$ac_save_LIBS
7070 # We can link X programs with no special library path.
7071 ac_x_libraries=
7072 else
7073   $as_echo "$as_me: failed program was:" >&5
7074 sed 's/^/| /' conftest.$ac_ext >&5
7075
7076         LIBS=$ac_save_LIBS
7077 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7078 do
7079   # Don't even attempt the hair of trying to link an X program!
7080   for ac_extension in a so sl dylib la dll; do
7081     if test -r "$ac_dir/libX11.$ac_extension"; then
7082       ac_x_libraries=$ac_dir
7083       break 2
7084     fi
7085   done
7086 done
7087 fi
7088
7089 rm -rf conftest.dSYM
7090 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7091       conftest$ac_exeext conftest.$ac_ext
7092 fi # $ac_x_libraries = no
7093
7094 case $ac_x_includes,$ac_x_libraries in #(
7095   no,* | *,no | *\'*)
7096     # Didn't find X, or a directory has "'" in its name.
7097     ac_cv_have_x="have_x=no";; #(
7098   *)
7099     # Record where we found X for the cache.
7100     ac_cv_have_x="have_x=yes\
7101         ac_x_includes='$ac_x_includes'\
7102         ac_x_libraries='$ac_x_libraries'"
7103 esac
7104 fi
7105 ;; #(
7106     *) have_x=yes;;
7107   esac
7108   eval "$ac_cv_have_x"
7109 fi # $with_x != no
7110
7111 if test "$have_x" != yes; then
7112   { $as_echo "$as_me:$LINENO: result: $have_x" >&5
7113 $as_echo "$have_x" >&6; }
7114   no_x=yes
7115 else
7116   # If each of the values was on the command line, it overrides each guess.
7117   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7118   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7119   # Update the cache value to reflect the command line values.
7120   ac_cv_have_x="have_x=yes\
7121         ac_x_includes='$x_includes'\
7122         ac_x_libraries='$x_libraries'"
7123   { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
7124 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
7125 fi
7126
7127 if test "$no_x" = yes; then
7128   # Not all programs may use this symbol, but it does not hurt to define it.
7129
7130 cat >>confdefs.h <<\_ACEOF
7131 #define X_DISPLAY_MISSING 1
7132 _ACEOF
7133
7134   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
7135 else
7136   if test -n "$x_includes"; then
7137     X_CFLAGS="$X_CFLAGS -I$x_includes"
7138   fi
7139
7140   # It would also be nice to do this for all -L options, not just this one.
7141   if test -n "$x_libraries"; then
7142     X_LIBS="$X_LIBS -L$x_libraries"
7143     # For Solaris; some versions of Sun CC require a space after -R and
7144     # others require no space.  Words are not sufficient . . . .
7145     { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
7146 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
7147     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
7148     ac_xsave_c_werror_flag=$ac_c_werror_flag
7149     ac_c_werror_flag=yes
7150     cat >conftest.$ac_ext <<_ACEOF
7151 /* confdefs.h.  */
7152 _ACEOF
7153 cat confdefs.h >>conftest.$ac_ext
7154 cat >>conftest.$ac_ext <<_ACEOF
7155 /* end confdefs.h.  */
7156
7157 int
7158 main ()
7159 {
7160
7161   ;
7162   return 0;
7163 }
7164 _ACEOF
7165 rm -rf conftest.$ac_objext conftest$ac_exeext
7166 if { (ac_try="$ac_link"
7167 case "(($ac_try" in
7168   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7169   *) ac_try_echo=$ac_try;;
7170 esac
7171 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7172 $as_echo "$ac_try_echo") >&5
7173   (eval "$ac_link") 2>conftest.er1
7174   ac_status=$?
7175   grep -v '^ *+' conftest.er1 >conftest.err
7176   rm -rf conftest.er1
7177   cat conftest.err >&5
7178   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7179   (exit $ac_status); } && {
7180          test -z "$ac_c_werror_flag" ||
7181          test ! -s conftest.err
7182        } && test -s conftest$ac_exeext && {
7183          test "$cross_compiling" = yes ||
7184          $as_test_x conftest$ac_exeext
7185        }; then
7186   { $as_echo "$as_me:$LINENO: result: no" >&5
7187 $as_echo "no" >&6; }
7188        X_LIBS="$X_LIBS -R$x_libraries"
7189 else
7190   $as_echo "$as_me: failed program was:" >&5
7191 sed 's/^/| /' conftest.$ac_ext >&5
7192
7193         LIBS="$ac_xsave_LIBS -R $x_libraries"
7194        cat >conftest.$ac_ext <<_ACEOF
7195 /* confdefs.h.  */
7196 _ACEOF
7197 cat confdefs.h >>conftest.$ac_ext
7198 cat >>conftest.$ac_ext <<_ACEOF
7199 /* end confdefs.h.  */
7200
7201 int
7202 main ()
7203 {
7204
7205   ;
7206   return 0;
7207 }
7208 _ACEOF
7209 rm -rf conftest.$ac_objext conftest$ac_exeext
7210 if { (ac_try="$ac_link"
7211 case "(($ac_try" in
7212   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7213   *) ac_try_echo=$ac_try;;
7214 esac
7215 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7216 $as_echo "$ac_try_echo") >&5
7217   (eval "$ac_link") 2>conftest.er1
7218   ac_status=$?
7219   grep -v '^ *+' conftest.er1 >conftest.err
7220   rm -rf conftest.er1
7221   cat conftest.err >&5
7222   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7223   (exit $ac_status); } && {
7224          test -z "$ac_c_werror_flag" ||
7225          test ! -s conftest.err
7226        } && test -s conftest$ac_exeext && {
7227          test "$cross_compiling" = yes ||
7228          $as_test_x conftest$ac_exeext
7229        }; then
7230   { $as_echo "$as_me:$LINENO: result: yes" >&5
7231 $as_echo "yes" >&6; }
7232           X_LIBS="$X_LIBS -R $x_libraries"
7233 else
7234   $as_echo "$as_me: failed program was:" >&5
7235 sed 's/^/| /' conftest.$ac_ext >&5
7236
7237         { $as_echo "$as_me:$LINENO: result: neither works" >&5
7238 $as_echo "neither works" >&6; }
7239 fi
7240
7241 rm -rf conftest.dSYM
7242 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7243       conftest$ac_exeext conftest.$ac_ext
7244 fi
7245
7246 rm -rf conftest.dSYM
7247 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7248       conftest$ac_exeext conftest.$ac_ext
7249     ac_c_werror_flag=$ac_xsave_c_werror_flag
7250     LIBS=$ac_xsave_LIBS
7251   fi
7252
7253   # Check for system-dependent libraries X programs must link with.
7254   # Do this before checking for the system-independent R6 libraries
7255   # (-lICE), since we may need -lsocket or whatever for X linking.
7256
7257   if test "$ISC" = yes; then
7258     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
7259   else
7260     # Martyn Johnson says this is needed for Ultrix, if the X
7261     # libraries were built with DECnet support.  And Karl Berry says
7262     # the Alpha needs dnet_stub (dnet does not exist).
7263     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
7264     cat >conftest.$ac_ext <<_ACEOF
7265 /* confdefs.h.  */
7266 _ACEOF
7267 cat confdefs.h >>conftest.$ac_ext
7268 cat >>conftest.$ac_ext <<_ACEOF
7269 /* end confdefs.h.  */
7270
7271 /* Override any GCC internal prototype to avoid an error.
7272    Use char because int might match the return type of a GCC
7273    builtin and then its argument prototype would still apply.  */
7274 #ifdef __cplusplus
7275 extern "C"
7276 #endif
7277 char XOpenDisplay ();
7278 int
7279 main ()
7280 {
7281 return XOpenDisplay ();
7282   ;
7283   return 0;
7284 }
7285 _ACEOF
7286 rm -rf conftest.$ac_objext conftest$ac_exeext
7287 if { (ac_try="$ac_link"
7288 case "(($ac_try" in
7289   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7290   *) ac_try_echo=$ac_try;;
7291 esac
7292 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7293 $as_echo "$ac_try_echo") >&5
7294   (eval "$ac_link") 2>conftest.er1
7295   ac_status=$?
7296   grep -v '^ *+' conftest.er1 >conftest.err
7297   rm -rf conftest.er1
7298   cat conftest.err >&5
7299   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7300   (exit $ac_status); } && {
7301          test -z "$ac_c_werror_flag" ||
7302          test ! -s conftest.err
7303        } && test -s conftest$ac_exeext && {
7304          test "$cross_compiling" = yes ||
7305          $as_test_x conftest$ac_exeext
7306        }; then
7307   :
7308 else
7309   $as_echo "$as_me: failed program was:" >&5
7310 sed 's/^/| /' conftest.$ac_ext >&5
7311
7312         { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
7313 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
7314 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
7315   $as_echo_n "(cached) " >&6
7316 else
7317   ac_check_lib_save_LIBS=$LIBS
7318 LIBS="-ldnet  $LIBS"
7319 cat >conftest.$ac_ext <<_ACEOF
7320 /* confdefs.h.  */
7321 _ACEOF
7322 cat confdefs.h >>conftest.$ac_ext
7323 cat >>conftest.$ac_ext <<_ACEOF
7324 /* end confdefs.h.  */
7325
7326 /* Override any GCC internal prototype to avoid an error.
7327    Use char because int might match the return type of a GCC
7328    builtin and then its argument prototype would still apply.  */
7329 #ifdef __cplusplus
7330 extern "C"
7331 #endif
7332 char dnet_ntoa ();
7333 int
7334 main ()
7335 {
7336 return dnet_ntoa ();
7337   ;
7338   return 0;
7339 }
7340 _ACEOF
7341 rm -rf conftest.$ac_objext conftest$ac_exeext
7342 if { (ac_try="$ac_link"
7343 case "(($ac_try" in
7344   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7345   *) ac_try_echo=$ac_try;;
7346 esac
7347 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7348 $as_echo "$ac_try_echo") >&5
7349   (eval "$ac_link") 2>conftest.er1
7350   ac_status=$?
7351   grep -v '^ *+' conftest.er1 >conftest.err
7352   rm -rf conftest.er1
7353   cat conftest.err >&5
7354   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7355   (exit $ac_status); } && {
7356          test -z "$ac_c_werror_flag" ||
7357          test ! -s conftest.err
7358        } && test -s conftest$ac_exeext && {
7359          test "$cross_compiling" = yes ||
7360          $as_test_x conftest$ac_exeext
7361        }; then
7362   ac_cv_lib_dnet_dnet_ntoa=yes
7363 else
7364   $as_echo "$as_me: failed program was:" >&5
7365 sed 's/^/| /' conftest.$ac_ext >&5
7366
7367         ac_cv_lib_dnet_dnet_ntoa=no
7368 fi
7369
7370 rm -rf conftest.dSYM
7371 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7372       conftest$ac_exeext conftest.$ac_ext
7373 LIBS=$ac_check_lib_save_LIBS
7374 fi
7375 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7376 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
7377 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
7378   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
7379 fi
7380
7381     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
7382       { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
7383 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
7384 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
7385   $as_echo_n "(cached) " >&6
7386 else
7387   ac_check_lib_save_LIBS=$LIBS
7388 LIBS="-ldnet_stub  $LIBS"
7389 cat >conftest.$ac_ext <<_ACEOF
7390 /* confdefs.h.  */
7391 _ACEOF
7392 cat confdefs.h >>conftest.$ac_ext
7393 cat >>conftest.$ac_ext <<_ACEOF
7394 /* end confdefs.h.  */
7395
7396 /* Override any GCC internal prototype to avoid an error.
7397    Use char because int might match the return type of a GCC
7398    builtin and then its argument prototype would still apply.  */
7399 #ifdef __cplusplus
7400 extern "C"
7401 #endif
7402 char dnet_ntoa ();
7403 int
7404 main ()
7405 {
7406 return dnet_ntoa ();
7407   ;
7408   return 0;
7409 }
7410 _ACEOF
7411 rm -rf conftest.$ac_objext conftest$ac_exeext
7412 if { (ac_try="$ac_link"
7413 case "(($ac_try" in
7414   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7415   *) ac_try_echo=$ac_try;;
7416 esac
7417 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7418 $as_echo "$ac_try_echo") >&5
7419   (eval "$ac_link") 2>conftest.er1
7420   ac_status=$?
7421   grep -v '^ *+' conftest.er1 >conftest.err
7422   rm -rf conftest.er1
7423   cat conftest.err >&5
7424   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7425   (exit $ac_status); } && {
7426          test -z "$ac_c_werror_flag" ||
7427          test ! -s conftest.err
7428        } && test -s conftest$ac_exeext && {
7429          test "$cross_compiling" = yes ||
7430          $as_test_x conftest$ac_exeext
7431        }; then
7432   ac_cv_lib_dnet_stub_dnet_ntoa=yes
7433 else
7434   $as_echo "$as_me: failed program was:" >&5
7435 sed 's/^/| /' conftest.$ac_ext >&5
7436
7437         ac_cv_lib_dnet_stub_dnet_ntoa=no
7438 fi
7439
7440 rm -rf conftest.dSYM
7441 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7442       conftest$ac_exeext conftest.$ac_ext
7443 LIBS=$ac_check_lib_save_LIBS
7444 fi
7445 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
7446 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
7447 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
7448   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7449 fi
7450
7451     fi
7452 fi
7453
7454 rm -rf conftest.dSYM
7455 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7456       conftest$ac_exeext conftest.$ac_ext
7457     LIBS="$ac_xsave_LIBS"
7458
7459     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
7460     # to get the SysV transport functions.
7461     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
7462     # needs -lnsl.
7463     # The nsl library prevents programs from opening the X display
7464     # on Irix 5.2, according to T.E. Dickey.
7465     # The functions gethostbyname, getservbyname, and inet_addr are
7466     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
7467     { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
7468 $as_echo_n "checking for gethostbyname... " >&6; }
7469 if test "${ac_cv_func_gethostbyname+set}" = set; then
7470   $as_echo_n "(cached) " >&6
7471 else
7472   cat >conftest.$ac_ext <<_ACEOF
7473 /* confdefs.h.  */
7474 _ACEOF
7475 cat confdefs.h >>conftest.$ac_ext
7476 cat >>conftest.$ac_ext <<_ACEOF
7477 /* end confdefs.h.  */
7478 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
7479    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7480 #define gethostbyname innocuous_gethostbyname
7481
7482 /* System header to define __stub macros and hopefully few prototypes,
7483     which can conflict with char gethostbyname (); below.
7484     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7485     <limits.h> exists even on freestanding compilers.  */
7486
7487 #ifdef __STDC__
7488 # include <limits.h>
7489 #else
7490 # include <assert.h>
7491 #endif
7492
7493 #undef gethostbyname
7494
7495 /* Override any GCC internal prototype to avoid an error.
7496    Use char because int might match the return type of a GCC
7497    builtin and then its argument prototype would still apply.  */
7498 #ifdef __cplusplus
7499 extern "C"
7500 #endif
7501 char gethostbyname ();
7502 /* The GNU C library defines this for functions which it implements
7503     to always fail with ENOSYS.  Some functions are actually named
7504     something starting with __ and the normal name is an alias.  */
7505 #if defined __stub_gethostbyname || defined __stub___gethostbyname
7506 choke me
7507 #endif
7508
7509 int
7510 main ()
7511 {
7512 return gethostbyname ();
7513   ;
7514   return 0;
7515 }
7516 _ACEOF
7517 rm -rf conftest.$ac_objext conftest$ac_exeext
7518 if { (ac_try="$ac_link"
7519 case "(($ac_try" in
7520   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7521   *) ac_try_echo=$ac_try;;
7522 esac
7523 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7524 $as_echo "$ac_try_echo") >&5
7525   (eval "$ac_link") 2>conftest.er1
7526   ac_status=$?
7527   grep -v '^ *+' conftest.er1 >conftest.err
7528   rm -rf conftest.er1
7529   cat conftest.err >&5
7530   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7531   (exit $ac_status); } && {
7532          test -z "$ac_c_werror_flag" ||
7533          test ! -s conftest.err
7534        } && test -s conftest$ac_exeext && {
7535          test "$cross_compiling" = yes ||
7536          $as_test_x conftest$ac_exeext
7537        }; then
7538   ac_cv_func_gethostbyname=yes
7539 else
7540   $as_echo "$as_me: failed program was:" >&5
7541 sed 's/^/| /' conftest.$ac_ext >&5
7542
7543         ac_cv_func_gethostbyname=no
7544 fi
7545
7546 rm -rf conftest.dSYM
7547 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7548       conftest$ac_exeext conftest.$ac_ext
7549 fi
7550 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
7551 $as_echo "$ac_cv_func_gethostbyname" >&6; }
7552
7553     if test $ac_cv_func_gethostbyname = no; then
7554       { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
7555 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
7556 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
7557   $as_echo_n "(cached) " >&6
7558 else
7559   ac_check_lib_save_LIBS=$LIBS
7560 LIBS="-lnsl  $LIBS"
7561 cat >conftest.$ac_ext <<_ACEOF
7562 /* confdefs.h.  */
7563 _ACEOF
7564 cat confdefs.h >>conftest.$ac_ext
7565 cat >>conftest.$ac_ext <<_ACEOF
7566 /* end confdefs.h.  */
7567
7568 /* Override any GCC internal prototype to avoid an error.
7569    Use char because int might match the return type of a GCC
7570    builtin and then its argument prototype would still apply.  */
7571 #ifdef __cplusplus
7572 extern "C"
7573 #endif
7574 char gethostbyname ();
7575 int
7576 main ()
7577 {
7578 return gethostbyname ();
7579   ;
7580   return 0;
7581 }
7582 _ACEOF
7583 rm -rf conftest.$ac_objext conftest$ac_exeext
7584 if { (ac_try="$ac_link"
7585 case "(($ac_try" in
7586   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7587   *) ac_try_echo=$ac_try;;
7588 esac
7589 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7590 $as_echo "$ac_try_echo") >&5
7591   (eval "$ac_link") 2>conftest.er1
7592   ac_status=$?
7593   grep -v '^ *+' conftest.er1 >conftest.err
7594   rm -rf conftest.er1
7595   cat conftest.err >&5
7596   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7597   (exit $ac_status); } && {
7598          test -z "$ac_c_werror_flag" ||
7599          test ! -s conftest.err
7600        } && test -s conftest$ac_exeext && {
7601          test "$cross_compiling" = yes ||
7602          $as_test_x conftest$ac_exeext
7603        }; then
7604   ac_cv_lib_nsl_gethostbyname=yes
7605 else
7606   $as_echo "$as_me: failed program was:" >&5
7607 sed 's/^/| /' conftest.$ac_ext >&5
7608
7609         ac_cv_lib_nsl_gethostbyname=no
7610 fi
7611
7612 rm -rf conftest.dSYM
7613 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7614       conftest$ac_exeext conftest.$ac_ext
7615 LIBS=$ac_check_lib_save_LIBS
7616 fi
7617 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
7618 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
7619 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
7620   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7621 fi
7622
7623       if test $ac_cv_lib_nsl_gethostbyname = no; then
7624         { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
7625 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
7626 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
7627   $as_echo_n "(cached) " >&6
7628 else
7629   ac_check_lib_save_LIBS=$LIBS
7630 LIBS="-lbsd  $LIBS"
7631 cat >conftest.$ac_ext <<_ACEOF
7632 /* confdefs.h.  */
7633 _ACEOF
7634 cat confdefs.h >>conftest.$ac_ext
7635 cat >>conftest.$ac_ext <<_ACEOF
7636 /* end confdefs.h.  */
7637
7638 /* Override any GCC internal prototype to avoid an error.
7639    Use char because int might match the return type of a GCC
7640    builtin and then its argument prototype would still apply.  */
7641 #ifdef __cplusplus
7642 extern "C"
7643 #endif
7644 char gethostbyname ();
7645 int
7646 main ()
7647 {
7648 return gethostbyname ();
7649   ;
7650   return 0;
7651 }
7652 _ACEOF
7653 rm -rf conftest.$ac_objext conftest$ac_exeext
7654 if { (ac_try="$ac_link"
7655 case "(($ac_try" in
7656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7657   *) ac_try_echo=$ac_try;;
7658 esac
7659 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7660 $as_echo "$ac_try_echo") >&5
7661   (eval "$ac_link") 2>conftest.er1
7662   ac_status=$?
7663   grep -v '^ *+' conftest.er1 >conftest.err
7664   rm -rf conftest.er1
7665   cat conftest.err >&5
7666   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7667   (exit $ac_status); } && {
7668          test -z "$ac_c_werror_flag" ||
7669          test ! -s conftest.err
7670        } && test -s conftest$ac_exeext && {
7671          test "$cross_compiling" = yes ||
7672          $as_test_x conftest$ac_exeext
7673        }; then
7674   ac_cv_lib_bsd_gethostbyname=yes
7675 else
7676   $as_echo "$as_me: failed program was:" >&5
7677 sed 's/^/| /' conftest.$ac_ext >&5
7678
7679         ac_cv_lib_bsd_gethostbyname=no
7680 fi
7681
7682 rm -rf conftest.dSYM
7683 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7684       conftest$ac_exeext conftest.$ac_ext
7685 LIBS=$ac_check_lib_save_LIBS
7686 fi
7687 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
7688 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
7689 if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
7690   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
7691 fi
7692
7693       fi
7694     fi
7695
7696     # lieder@skyler.mavd.honeywell.com says without -lsocket,
7697     # socket/setsockopt and other routines are undefined under SCO ODT
7698     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
7699     # on later versions), says Simon Leinen: it contains gethostby*
7700     # variants that don't use the name server (or something).  -lsocket
7701     # must be given before -lnsl if both are needed.  We assume that
7702     # if connect needs -lnsl, so does gethostbyname.
7703     { $as_echo "$as_me:$LINENO: checking for connect" >&5
7704 $as_echo_n "checking for connect... " >&6; }
7705 if test "${ac_cv_func_connect+set}" = set; then
7706   $as_echo_n "(cached) " >&6
7707 else
7708   cat >conftest.$ac_ext <<_ACEOF
7709 /* confdefs.h.  */
7710 _ACEOF
7711 cat confdefs.h >>conftest.$ac_ext
7712 cat >>conftest.$ac_ext <<_ACEOF
7713 /* end confdefs.h.  */
7714 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
7715    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7716 #define connect innocuous_connect
7717
7718 /* System header to define __stub macros and hopefully few prototypes,
7719     which can conflict with char connect (); below.
7720     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7721     <limits.h> exists even on freestanding compilers.  */
7722
7723 #ifdef __STDC__
7724 # include <limits.h>
7725 #else
7726 # include <assert.h>
7727 #endif
7728
7729 #undef connect
7730
7731 /* Override any GCC internal prototype to avoid an error.
7732    Use char because int might match the return type of a GCC
7733    builtin and then its argument prototype would still apply.  */
7734 #ifdef __cplusplus
7735 extern "C"
7736 #endif
7737 char connect ();
7738 /* The GNU C library defines this for functions which it implements
7739     to always fail with ENOSYS.  Some functions are actually named
7740     something starting with __ and the normal name is an alias.  */
7741 #if defined __stub_connect || defined __stub___connect
7742 choke me
7743 #endif
7744
7745 int
7746 main ()
7747 {
7748 return connect ();
7749   ;
7750   return 0;
7751 }
7752 _ACEOF
7753 rm -rf conftest.$ac_objext conftest$ac_exeext
7754 if { (ac_try="$ac_link"
7755 case "(($ac_try" in
7756   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7757   *) ac_try_echo=$ac_try;;
7758 esac
7759 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7760 $as_echo "$ac_try_echo") >&5
7761   (eval "$ac_link") 2>conftest.er1
7762   ac_status=$?
7763   grep -v '^ *+' conftest.er1 >conftest.err
7764   rm -rf conftest.er1
7765   cat conftest.err >&5
7766   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7767   (exit $ac_status); } && {
7768          test -z "$ac_c_werror_flag" ||
7769          test ! -s conftest.err
7770        } && test -s conftest$ac_exeext && {
7771          test "$cross_compiling" = yes ||
7772          $as_test_x conftest$ac_exeext
7773        }; then
7774   ac_cv_func_connect=yes
7775 else
7776   $as_echo "$as_me: failed program was:" >&5
7777 sed 's/^/| /' conftest.$ac_ext >&5
7778
7779         ac_cv_func_connect=no
7780 fi
7781
7782 rm -rf conftest.dSYM
7783 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7784       conftest$ac_exeext conftest.$ac_ext
7785 fi
7786 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
7787 $as_echo "$ac_cv_func_connect" >&6; }
7788
7789     if test $ac_cv_func_connect = no; then
7790       { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
7791 $as_echo_n "checking for connect in -lsocket... " >&6; }
7792 if test "${ac_cv_lib_socket_connect+set}" = set; then
7793   $as_echo_n "(cached) " >&6
7794 else
7795   ac_check_lib_save_LIBS=$LIBS
7796 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7797 cat >conftest.$ac_ext <<_ACEOF
7798 /* confdefs.h.  */
7799 _ACEOF
7800 cat confdefs.h >>conftest.$ac_ext
7801 cat >>conftest.$ac_ext <<_ACEOF
7802 /* end confdefs.h.  */
7803
7804 /* Override any GCC internal prototype to avoid an error.
7805    Use char because int might match the return type of a GCC
7806    builtin and then its argument prototype would still apply.  */
7807 #ifdef __cplusplus
7808 extern "C"
7809 #endif
7810 char connect ();
7811 int
7812 main ()
7813 {
7814 return connect ();
7815   ;
7816   return 0;
7817 }
7818 _ACEOF
7819 rm -rf conftest.$ac_objext conftest$ac_exeext
7820 if { (ac_try="$ac_link"
7821 case "(($ac_try" in
7822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7823   *) ac_try_echo=$ac_try;;
7824 esac
7825 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7826 $as_echo "$ac_try_echo") >&5
7827   (eval "$ac_link") 2>conftest.er1
7828   ac_status=$?
7829   grep -v '^ *+' conftest.er1 >conftest.err
7830   rm -rf conftest.er1
7831   cat conftest.err >&5
7832   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7833   (exit $ac_status); } && {
7834          test -z "$ac_c_werror_flag" ||
7835          test ! -s conftest.err
7836        } && test -s conftest$ac_exeext && {
7837          test "$cross_compiling" = yes ||
7838          $as_test_x conftest$ac_exeext
7839        }; then
7840   ac_cv_lib_socket_connect=yes
7841 else
7842   $as_echo "$as_me: failed program was:" >&5
7843 sed 's/^/| /' conftest.$ac_ext >&5
7844
7845         ac_cv_lib_socket_connect=no
7846 fi
7847
7848 rm -rf conftest.dSYM
7849 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7850       conftest$ac_exeext conftest.$ac_ext
7851 LIBS=$ac_check_lib_save_LIBS
7852 fi
7853 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7854 $as_echo "$ac_cv_lib_socket_connect" >&6; }
7855 if test "x$ac_cv_lib_socket_connect" = x""yes; then
7856   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7857 fi
7858
7859     fi
7860
7861     # Guillermo Gomez says -lposix is necessary on A/UX.
7862     { $as_echo "$as_me:$LINENO: checking for remove" >&5
7863 $as_echo_n "checking for remove... " >&6; }
7864 if test "${ac_cv_func_remove+set}" = set; then
7865   $as_echo_n "(cached) " >&6
7866 else
7867   cat >conftest.$ac_ext <<_ACEOF
7868 /* confdefs.h.  */
7869 _ACEOF
7870 cat confdefs.h >>conftest.$ac_ext
7871 cat >>conftest.$ac_ext <<_ACEOF
7872 /* end confdefs.h.  */
7873 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7874    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7875 #define remove innocuous_remove
7876
7877 /* System header to define __stub macros and hopefully few prototypes,
7878     which can conflict with char remove (); below.
7879     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7880     <limits.h> exists even on freestanding compilers.  */
7881
7882 #ifdef __STDC__
7883 # include <limits.h>
7884 #else
7885 # include <assert.h>
7886 #endif
7887
7888 #undef remove
7889
7890 /* Override any GCC internal prototype to avoid an error.
7891    Use char because int might match the return type of a GCC
7892    builtin and then its argument prototype would still apply.  */
7893 #ifdef __cplusplus
7894 extern "C"
7895 #endif
7896 char remove ();
7897 /* The GNU C library defines this for functions which it implements
7898     to always fail with ENOSYS.  Some functions are actually named
7899     something starting with __ and the normal name is an alias.  */
7900 #if defined __stub_remove || defined __stub___remove
7901 choke me
7902 #endif
7903
7904 int
7905 main ()
7906 {
7907 return remove ();
7908   ;
7909   return 0;
7910 }
7911 _ACEOF
7912 rm -rf conftest.$ac_objext conftest$ac_exeext
7913 if { (ac_try="$ac_link"
7914 case "(($ac_try" in
7915   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7916   *) ac_try_echo=$ac_try;;
7917 esac
7918 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7919 $as_echo "$ac_try_echo") >&5
7920   (eval "$ac_link") 2>conftest.er1
7921   ac_status=$?
7922   grep -v '^ *+' conftest.er1 >conftest.err
7923   rm -rf conftest.er1
7924   cat conftest.err >&5
7925   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7926   (exit $ac_status); } && {
7927          test -z "$ac_c_werror_flag" ||
7928          test ! -s conftest.err
7929        } && test -s conftest$ac_exeext && {
7930          test "$cross_compiling" = yes ||
7931          $as_test_x conftest$ac_exeext
7932        }; then
7933   ac_cv_func_remove=yes
7934 else
7935   $as_echo "$as_me: failed program was:" >&5
7936 sed 's/^/| /' conftest.$ac_ext >&5
7937
7938         ac_cv_func_remove=no
7939 fi
7940
7941 rm -rf conftest.dSYM
7942 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7943       conftest$ac_exeext conftest.$ac_ext
7944 fi
7945 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7946 $as_echo "$ac_cv_func_remove" >&6; }
7947
7948     if test $ac_cv_func_remove = no; then
7949       { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7950 $as_echo_n "checking for remove in -lposix... " >&6; }
7951 if test "${ac_cv_lib_posix_remove+set}" = set; then
7952   $as_echo_n "(cached) " >&6
7953 else
7954   ac_check_lib_save_LIBS=$LIBS
7955 LIBS="-lposix  $LIBS"
7956 cat >conftest.$ac_ext <<_ACEOF
7957 /* confdefs.h.  */
7958 _ACEOF
7959 cat confdefs.h >>conftest.$ac_ext
7960 cat >>conftest.$ac_ext <<_ACEOF
7961 /* end confdefs.h.  */
7962
7963 /* Override any GCC internal prototype to avoid an error.
7964    Use char because int might match the return type of a GCC
7965    builtin and then its argument prototype would still apply.  */
7966 #ifdef __cplusplus
7967 extern "C"
7968 #endif
7969 char remove ();
7970 int
7971 main ()
7972 {
7973 return remove ();
7974   ;
7975   return 0;
7976 }
7977 _ACEOF
7978 rm -rf conftest.$ac_objext conftest$ac_exeext
7979 if { (ac_try="$ac_link"
7980 case "(($ac_try" in
7981   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7982   *) ac_try_echo=$ac_try;;
7983 esac
7984 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7985 $as_echo "$ac_try_echo") >&5
7986   (eval "$ac_link") 2>conftest.er1
7987   ac_status=$?
7988   grep -v '^ *+' conftest.er1 >conftest.err
7989   rm -rf conftest.er1
7990   cat conftest.err >&5
7991   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7992   (exit $ac_status); } && {
7993          test -z "$ac_c_werror_flag" ||
7994          test ! -s conftest.err
7995        } && test -s conftest$ac_exeext && {
7996          test "$cross_compiling" = yes ||
7997          $as_test_x conftest$ac_exeext
7998        }; then
7999   ac_cv_lib_posix_remove=yes
8000 else
8001   $as_echo "$as_me: failed program was:" >&5
8002 sed 's/^/| /' conftest.$ac_ext >&5
8003
8004         ac_cv_lib_posix_remove=no
8005 fi
8006
8007 rm -rf conftest.dSYM
8008 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8009       conftest$ac_exeext conftest.$ac_ext
8010 LIBS=$ac_check_lib_save_LIBS
8011 fi
8012 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
8013 $as_echo "$ac_cv_lib_posix_remove" >&6; }
8014 if test "x$ac_cv_lib_posix_remove" = x""yes; then
8015   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
8016 fi
8017
8018     fi
8019
8020     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
8021     { $as_echo "$as_me:$LINENO: checking for shmat" >&5
8022 $as_echo_n "checking for shmat... " >&6; }
8023 if test "${ac_cv_func_shmat+set}" = set; then
8024   $as_echo_n "(cached) " >&6
8025 else
8026   cat >conftest.$ac_ext <<_ACEOF
8027 /* confdefs.h.  */
8028 _ACEOF
8029 cat confdefs.h >>conftest.$ac_ext
8030 cat >>conftest.$ac_ext <<_ACEOF
8031 /* end confdefs.h.  */
8032 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
8033    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8034 #define shmat innocuous_shmat
8035
8036 /* System header to define __stub macros and hopefully few prototypes,
8037     which can conflict with char shmat (); below.
8038     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8039     <limits.h> exists even on freestanding compilers.  */
8040
8041 #ifdef __STDC__
8042 # include <limits.h>
8043 #else
8044 # include <assert.h>
8045 #endif
8046
8047 #undef shmat
8048
8049 /* Override any GCC internal prototype to avoid an error.
8050    Use char because int might match the return type of a GCC
8051    builtin and then its argument prototype would still apply.  */
8052 #ifdef __cplusplus
8053 extern "C"
8054 #endif
8055 char shmat ();
8056 /* The GNU C library defines this for functions which it implements
8057     to always fail with ENOSYS.  Some functions are actually named
8058     something starting with __ and the normal name is an alias.  */
8059 #if defined __stub_shmat || defined __stub___shmat
8060 choke me
8061 #endif
8062
8063 int
8064 main ()
8065 {
8066 return shmat ();
8067   ;
8068   return 0;
8069 }
8070 _ACEOF
8071 rm -rf conftest.$ac_objext conftest$ac_exeext
8072 if { (ac_try="$ac_link"
8073 case "(($ac_try" in
8074   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8075   *) ac_try_echo=$ac_try;;
8076 esac
8077 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8078 $as_echo "$ac_try_echo") >&5
8079   (eval "$ac_link") 2>conftest.er1
8080   ac_status=$?
8081   grep -v '^ *+' conftest.er1 >conftest.err
8082   rm -rf conftest.er1
8083   cat conftest.err >&5
8084   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8085   (exit $ac_status); } && {
8086          test -z "$ac_c_werror_flag" ||
8087          test ! -s conftest.err
8088        } && test -s conftest$ac_exeext && {
8089          test "$cross_compiling" = yes ||
8090          $as_test_x conftest$ac_exeext
8091        }; then
8092   ac_cv_func_shmat=yes
8093 else
8094   $as_echo "$as_me: failed program was:" >&5
8095 sed 's/^/| /' conftest.$ac_ext >&5
8096
8097         ac_cv_func_shmat=no
8098 fi
8099
8100 rm -rf conftest.dSYM
8101 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8102       conftest$ac_exeext conftest.$ac_ext
8103 fi
8104 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
8105 $as_echo "$ac_cv_func_shmat" >&6; }
8106
8107     if test $ac_cv_func_shmat = no; then
8108       { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
8109 $as_echo_n "checking for shmat in -lipc... " >&6; }
8110 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
8111   $as_echo_n "(cached) " >&6
8112 else
8113   ac_check_lib_save_LIBS=$LIBS
8114 LIBS="-lipc  $LIBS"
8115 cat >conftest.$ac_ext <<_ACEOF
8116 /* confdefs.h.  */
8117 _ACEOF
8118 cat confdefs.h >>conftest.$ac_ext
8119 cat >>conftest.$ac_ext <<_ACEOF
8120 /* end confdefs.h.  */
8121
8122 /* Override any GCC internal prototype to avoid an error.
8123    Use char because int might match the return type of a GCC
8124    builtin and then its argument prototype would still apply.  */
8125 #ifdef __cplusplus
8126 extern "C"
8127 #endif
8128 char shmat ();
8129 int
8130 main ()
8131 {
8132 return shmat ();
8133   ;
8134   return 0;
8135 }
8136 _ACEOF
8137 rm -rf conftest.$ac_objext conftest$ac_exeext
8138 if { (ac_try="$ac_link"
8139 case "(($ac_try" in
8140   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8141   *) ac_try_echo=$ac_try;;
8142 esac
8143 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8144 $as_echo "$ac_try_echo") >&5
8145   (eval "$ac_link") 2>conftest.er1
8146   ac_status=$?
8147   grep -v '^ *+' conftest.er1 >conftest.err
8148   rm -rf conftest.er1
8149   cat conftest.err >&5
8150   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8151   (exit $ac_status); } && {
8152          test -z "$ac_c_werror_flag" ||
8153          test ! -s conftest.err
8154        } && test -s conftest$ac_exeext && {
8155          test "$cross_compiling" = yes ||
8156          $as_test_x conftest$ac_exeext
8157        }; then
8158   ac_cv_lib_ipc_shmat=yes
8159 else
8160   $as_echo "$as_me: failed program was:" >&5
8161 sed 's/^/| /' conftest.$ac_ext >&5
8162
8163         ac_cv_lib_ipc_shmat=no
8164 fi
8165
8166 rm -rf conftest.dSYM
8167 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8168       conftest$ac_exeext conftest.$ac_ext
8169 LIBS=$ac_check_lib_save_LIBS
8170 fi
8171 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
8172 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
8173 if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
8174   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
8175 fi
8176
8177     fi
8178   fi
8179
8180   # Check for libraries that X11R6 Xt/Xaw programs need.
8181   ac_save_LDFLAGS=$LDFLAGS
8182   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
8183   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
8184   # check for ICE first), but we must link in the order -lSM -lICE or
8185   # we get undefined symbols.  So assume we have SM if we have ICE.
8186   # These have to be linked with before -lX11, unlike the other
8187   # libraries we check for below, so use a different variable.
8188   # John Interrante, Karl Berry
8189   { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
8190 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
8191 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
8192   $as_echo_n "(cached) " >&6
8193 else
8194   ac_check_lib_save_LIBS=$LIBS
8195 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8196 cat >conftest.$ac_ext <<_ACEOF
8197 /* confdefs.h.  */
8198 _ACEOF
8199 cat confdefs.h >>conftest.$ac_ext
8200 cat >>conftest.$ac_ext <<_ACEOF
8201 /* end confdefs.h.  */
8202
8203 /* Override any GCC internal prototype to avoid an error.
8204    Use char because int might match the return type of a GCC
8205    builtin and then its argument prototype would still apply.  */
8206 #ifdef __cplusplus
8207 extern "C"
8208 #endif
8209 char IceConnectionNumber ();
8210 int
8211 main ()
8212 {
8213 return IceConnectionNumber ();
8214   ;
8215   return 0;
8216 }
8217 _ACEOF
8218 rm -rf conftest.$ac_objext conftest$ac_exeext
8219 if { (ac_try="$ac_link"
8220 case "(($ac_try" in
8221   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8222   *) ac_try_echo=$ac_try;;
8223 esac
8224 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8225 $as_echo "$ac_try_echo") >&5
8226   (eval "$ac_link") 2>conftest.er1
8227   ac_status=$?
8228   grep -v '^ *+' conftest.er1 >conftest.err
8229   rm -rf conftest.er1
8230   cat conftest.err >&5
8231   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8232   (exit $ac_status); } && {
8233          test -z "$ac_c_werror_flag" ||
8234          test ! -s conftest.err
8235        } && test -s conftest$ac_exeext && {
8236          test "$cross_compiling" = yes ||
8237          $as_test_x conftest$ac_exeext
8238        }; then
8239   ac_cv_lib_ICE_IceConnectionNumber=yes
8240 else
8241   $as_echo "$as_me: failed program was:" >&5
8242 sed 's/^/| /' conftest.$ac_ext >&5
8243
8244         ac_cv_lib_ICE_IceConnectionNumber=no
8245 fi
8246
8247 rm -rf conftest.dSYM
8248 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8249       conftest$ac_exeext conftest.$ac_ext
8250 LIBS=$ac_check_lib_save_LIBS
8251 fi
8252 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
8253 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
8254 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
8255   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
8256 fi
8257
8258   LDFLAGS=$ac_save_LDFLAGS
8259
8260 fi
8261
8262
8263 if test "$have_x" != yes; then
8264   { { $as_echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
8265 $as_echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
8266    { (exit 1); exit 1; }; }
8267 fi
8268
8269
8270     { $as_echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
8271 $as_echo_n "checking for X app-defaults directory... " >&6; }
8272 if test "${ac_cv_x_app_defaults+set}" = set; then
8273   $as_echo_n "(cached) " >&6
8274 else
8275
8276   rm -fr conftestdir
8277   if mkdir conftestdir; then
8278     cd conftestdir 2>/dev/null
8279     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8280     cat > Imakefile <<'EOF'
8281 acfindx:
8282         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
8283 EOF
8284     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
8285       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
8286       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8287     fi
8288     cd .. 2>/dev/null
8289     rm -fr conftestdir
8290   fi
8291       if test x"$ac_x_app_defaults" = x; then
8292
8293   # Look for the directory under a standard set of common directories.
8294   # Check X11 before X11Rn because it's often a symlink to the current release.
8295   for ac_dir in                                 \
8296     /usr/X11/lib/app-defaults                   \
8297     /usr/X11R6/lib/app-defaults                 \
8298     /usr/X11R6/lib/X11/app-defaults             \
8299     /usr/X11R5/lib/app-defaults                 \
8300     /usr/X11R5/lib/X11/app-defaults             \
8301     /usr/X11R4/lib/app-defaults                 \
8302     /usr/X11R4/lib/X11/app-defaults             \
8303                                                 \
8304     /usr/lib/X11/app-defaults                   \
8305     /usr/lib/X11R6/app-defaults                 \
8306     /usr/lib/X11R5/app-defaults                 \
8307     /usr/lib/X11R4/app-defaults                 \
8308                                                 \
8309     /usr/local/X11/lib/app-defaults             \
8310     /usr/local/X11R6/lib/app-defaults           \
8311     /usr/local/X11R5/lib/app-defaults           \
8312     /usr/local/X11R4/lib/app-defaults           \
8313                                                 \
8314     /usr/local/lib/X11/app-defaults             \
8315     /usr/local/lib/X11R6/app-defaults           \
8316     /usr/local/lib/X11R6/X11/app-defaults       \
8317     /usr/local/lib/X11R5/app-defaults           \
8318     /usr/local/lib/X11R5/X11/app-defaults       \
8319     /usr/local/lib/X11R4/app-defaults           \
8320     /usr/local/lib/X11R4/X11/app-defaults       \
8321                                                 \
8322     /usr/X386/lib/X11/app-defaults              \
8323     /usr/x386/lib/X11/app-defaults              \
8324     /usr/XFree86/lib/X11/app-defaults           \
8325                                                 \
8326     /usr/lib/X11/app-defaults                   \
8327     /usr/local/lib/X11/app-defaults             \
8328     /usr/unsupported/lib/X11/app-defaults       \
8329     /usr/athena/lib/X11/app-defaults            \
8330     /usr/local/x11r5/lib/X11/app-defaults       \
8331     /usr/lpp/Xamples/lib/X11/app-defaults       \
8332     /lib/usr/lib/X11/app-defaults               \
8333                                                 \
8334     /usr/openwin/lib/app-defaults               \
8335     /usr/openwin/lib/X11/app-defaults           \
8336     /usr/openwin/share/lib/app-defaults         \
8337     /usr/openwin/share/lib/X11/app-defaults     \
8338                                                 \
8339     /X11R6/lib/app-defaults                     \
8340     /X11R5/lib/app-defaults                     \
8341     /X11R4/lib/app-defaults                     \
8342     ; \
8343   do
8344     if test -d "$ac_dir"; then
8345       ac_x_app_defaults=$ac_dir
8346       break
8347     fi
8348   done
8349
8350       fi
8351       if test x"$ac_x_app_defaults" = x; then
8352         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
8353       else
8354         # Record where we found app-defaults for the cache.
8355         ac_cv_x_app_defaults="$ac_x_app_defaults"
8356       fi
8357 fi
8358 { $as_echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
8359 $as_echo "$ac_cv_x_app_defaults" >&6; }
8360     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
8361 case "$host" in
8362     *-hpux*)
8363
8364       # The following arcana was gleaned from conversations with
8365       # Eric Schwartz <erics@col.hp.com>:
8366       #
8367       # On HPUX 10.x, the parts of X that HP considers "standard" live in
8368       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
8369       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
8370       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
8371       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
8372       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
8373       # you don't need any -I or -L arguments.
8374       #
8375       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
8376       # are the same division as 10.x.  However, there are no symlinks to
8377       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
8378       # arguments are always necessary.
8379       #
8380       # However, X11R6 was available on HPUX 9.x as a patch: if that
8381       # patch was installed, then all of X11R6 went in to
8382       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
8383       #
8384       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
8385       # whether R5 was available as a patch; R6 undoubtedly was not.)
8386       #
8387       # So.  We try and use the highest numbered pair of
8388       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
8389       # that are available.  We do not mix and match different versions
8390       # of X.
8391       #
8392       # Question I still don't know the answer to: (do you?)
8393       #
8394       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
8395       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
8396       #     that contrib directory?  Did it contain so-called "standard"
8397       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
8398       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
8399       #     be a situation where one had to reach into the R5 headers and
8400       #     libs to find Xmu?  That is, must both R6 and R5 directories
8401       #     be on the -I and -L lists in that case?
8402       #
8403       for version in X11R6 X11R5 X11R4 ; do
8404         # if either pair of directories exists...
8405         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
8406         then
8407            # if contrib exists, use it...
8408            if test -d /usr/contrib/$version/include ; then
8409              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
8410              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
8411            fi
8412            # if the "standard" one exists, use it.
8413            if test -d /usr/include/$version ; then
8414              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
8415              X_LIBS="$X_LIBS -L/usr/lib/$version"
8416            fi
8417            # since at least one of the pair exists, go no farther.
8418            break
8419         fi
8420       done
8421
8422       # Now find Motif.  Thanks for not making xmkmf find this by
8423       # default, you losers.
8424       #
8425       if test -d /usr/include/Motif2.1 ; then
8426         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
8427         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
8428       elif test -d /usr/include/Motif1.2 ; then
8429         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
8430         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
8431       elif test -d /usr/include/Motif1.1 ; then
8432         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
8433         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
8434       fi
8435
8436       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
8437       #
8438       if test -d /opt/graphics/OpenGL/include ; then
8439         # HP-UX 10.20 puts it here
8440         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
8441         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
8442       elif test -d /opt/Mesa/lib ; then
8443         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
8444         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
8445       fi
8446
8447
8448       if test -d /opt/xpm/lib/X11 ; then
8449         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
8450         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
8451       fi
8452
8453       # On HPUX, default to installing in /opt/xscreensaver/ instead of
8454       # in /usr/local/, unless there is already an xscreensaver in
8455       # /usr/local/bin/.  This can be overridden with the --prefix arg
8456       # to configure.  I'm not sure this is the right thing to do, but
8457       # Richard Lloyd says so...
8458       #
8459       if test \! -x /usr/local/bin/xscreensaver ; then
8460         ac_default_prefix=/opt/xscreensaver
8461       fi
8462
8463     ;;
8464     *-solaris*)
8465
8466       # Thanks for not making xmkmf find this by default, pinheads.
8467       # And thanks for moving things around again, too.  Is this
8468       # really the standard location now?  What happened to the
8469       # joke that this kind of thing went in /opt?
8470       # cthomp says "answer: CDE (Common Disorganized Environment)"
8471       #
8472       if test -f /usr/dt/include/Xm/Xm.h ; then
8473         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
8474         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
8475
8476         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
8477         { $as_echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
8478 $as_echo_n "checking for regcmp in -lgen... " >&6; }
8479 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
8480   $as_echo_n "(cached) " >&6
8481 else
8482   ac_check_lib_save_LIBS=$LIBS
8483 LIBS="-lgen  $LIBS"
8484 cat >conftest.$ac_ext <<_ACEOF
8485 /* confdefs.h.  */
8486 _ACEOF
8487 cat confdefs.h >>conftest.$ac_ext
8488 cat >>conftest.$ac_ext <<_ACEOF
8489 /* end confdefs.h.  */
8490
8491 /* Override any GCC internal prototype to avoid an error.
8492    Use char because int might match the return type of a GCC
8493    builtin and then its argument prototype would still apply.  */
8494 #ifdef __cplusplus
8495 extern "C"
8496 #endif
8497 char regcmp ();
8498 int
8499 main ()
8500 {
8501 return regcmp ();
8502   ;
8503   return 0;
8504 }
8505 _ACEOF
8506 rm -rf conftest.$ac_objext conftest$ac_exeext
8507 if { (ac_try="$ac_link"
8508 case "(($ac_try" in
8509   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8510   *) ac_try_echo=$ac_try;;
8511 esac
8512 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8513 $as_echo "$ac_try_echo") >&5
8514   (eval "$ac_link") 2>conftest.er1
8515   ac_status=$?
8516   grep -v '^ *+' conftest.er1 >conftest.err
8517   rm -rf conftest.er1
8518   cat conftest.err >&5
8519   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8520   (exit $ac_status); } && {
8521          test -z "$ac_c_werror_flag" ||
8522          test ! -s conftest.err
8523        } && test -s conftest$ac_exeext && {
8524          test "$cross_compiling" = yes ||
8525          $as_test_x conftest$ac_exeext
8526        }; then
8527   ac_cv_lib_gen_regcmp=yes
8528 else
8529   $as_echo "$as_me: failed program was:" >&5
8530 sed 's/^/| /' conftest.$ac_ext >&5
8531
8532         ac_cv_lib_gen_regcmp=no
8533 fi
8534
8535 rm -rf conftest.dSYM
8536 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8537       conftest$ac_exeext conftest.$ac_ext
8538 LIBS=$ac_check_lib_save_LIBS
8539 fi
8540 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
8541 $as_echo "$ac_cv_lib_gen_regcmp" >&6; }
8542 if test "x$ac_cv_lib_gen_regcmp" = x""yes; then
8543   MOTIF_LIBS="$MOTIF_LIBS -lgen"
8544 fi
8545
8546       fi
8547
8548     ;;
8549     *-darwin*)
8550
8551       # On MacOS X (10.x with "fink"), many things are under /sw/.
8552       #
8553       if test -d /sw/include ; then
8554         X_CFLAGS="-I/sw/include $X_CFLAGS"
8555         X_LIBS="-L/sw/lib $X_LIBS"
8556       fi
8557     ;;
8558   esac
8559 { $as_echo "$as_me:$LINENO: checking for XPointer" >&5
8560 $as_echo_n "checking for XPointer... " >&6; }
8561 if test "${ac_cv_xpointer+set}" = set; then
8562   $as_echo_n "(cached) " >&6
8563 else
8564
8565   ac_save_CPPFLAGS="$CPPFLAGS"
8566   if test \! -z "$includedir" ; then
8567     CPPFLAGS="$CPPFLAGS -I$includedir"
8568   fi
8569   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8570   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
8571   cat >conftest.$ac_ext <<_ACEOF
8572 /* confdefs.h.  */
8573 _ACEOF
8574 cat confdefs.h >>conftest.$ac_ext
8575 cat >>conftest.$ac_ext <<_ACEOF
8576 /* end confdefs.h.  */
8577 #include <X11/Xlib.h>
8578 int
8579 main ()
8580 {
8581 XPointer foo = (XPointer) 0;
8582   ;
8583   return 0;
8584 }
8585 _ACEOF
8586 rm -rf conftest.$ac_objext
8587 if { (ac_try="$ac_compile"
8588 case "(($ac_try" in
8589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8590   *) ac_try_echo=$ac_try;;
8591 esac
8592 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8593 $as_echo "$ac_try_echo") >&5
8594   (eval "$ac_compile") 2>conftest.er1
8595   ac_status=$?
8596   grep -v '^ *+' conftest.er1 >conftest.err
8597   rm -rf conftest.er1
8598   cat conftest.err >&5
8599   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8600   (exit $ac_status); } && {
8601          test -z "$ac_c_werror_flag" ||
8602          test ! -s conftest.err
8603        } && test -s conftest.$ac_objext; then
8604   ac_cv_xpointer=yes
8605 else
8606   $as_echo "$as_me: failed program was:" >&5
8607 sed 's/^/| /' conftest.$ac_ext >&5
8608
8609         ac_cv_xpointer=no
8610 fi
8611
8612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8613   CPPFLAGS="$ac_save_CPPFLAGS"
8614 fi
8615 { $as_echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
8616 $as_echo "$ac_cv_xpointer" >&6; }
8617   if test "$ac_cv_xpointer" != yes; then
8618    cat >>confdefs.h <<\_ACEOF
8619 #define XPointer char*
8620 _ACEOF
8621
8622   fi
8623
8624 { $as_echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
8625 $as_echo_n "checking whether this is MacOS X... " >&6; }
8626   ac_macosx=no
8627   case "$host" in
8628     *-apple-darwin* )
8629       ac_macosx=yes
8630     ;;
8631   esac
8632 { $as_echo "$as_me:$LINENO: result: $ac_macosx" >&5
8633 $as_echo "$ac_macosx" >&6; }
8634
8635
8636 ###############################################################################
8637 #
8638 #       Gettext support
8639 #
8640 ###############################################################################
8641
8642
8643
8644 if test -n ""; then
8645     { $as_echo "$as_me:$LINENO: checking for intltool >= " >&5
8646 $as_echo_n "checking for intltool >= ... " >&6; }
8647
8648     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
8649     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
8650
8651     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
8652
8653
8654     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
8655         { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
8656 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
8657     else
8658         { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
8659 $as_echo "$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
8660         exit 1
8661     fi
8662 fi
8663
8664   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
8665 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
8666      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -k -u -c $(top_builddir)/po/.intltool-merge-cache'
8667       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
8668      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
8669    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -u -c $(top_builddir)/po/.intltool-merge-cache'
8670     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
8671 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
8672        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
8673       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
8674     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688 # Use the tools built into the package, not the ones that are installed.
8689
8690 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
8691 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
8692 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
8693
8694
8695
8696
8697
8698 # Extract the first word of "perl", so it can be a program name with args.
8699 set dummy perl; ac_word=$2
8700 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8701 $as_echo_n "checking for $ac_word... " >&6; }
8702 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
8703   $as_echo_n "(cached) " >&6
8704 else
8705   case $INTLTOOL_PERL in
8706   [\\/]* | ?:[\\/]*)
8707   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
8708   ;;
8709   *)
8710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8711 for as_dir in $PATH
8712 do
8713   IFS=$as_save_IFS
8714   test -z "$as_dir" && as_dir=.
8715   for ac_exec_ext in '' $ac_executable_extensions; do
8716   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8717     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
8718     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8719     break 2
8720   fi
8721 done
8722 done
8723 IFS=$as_save_IFS
8724
8725   ;;
8726 esac
8727 fi
8728 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
8729 if test -n "$INTLTOOL_PERL"; then
8730   { $as_echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
8731 $as_echo "$INTLTOOL_PERL" >&6; }
8732 else
8733   { $as_echo "$as_me:$LINENO: result: no" >&5
8734 $as_echo "no" >&6; }
8735 fi
8736
8737
8738 if test -z "$INTLTOOL_PERL"; then
8739    { { $as_echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
8740 $as_echo "$as_me: error: perl not found; required for intltool" >&2;}
8741    { (exit 1); exit 1; }; }
8742 fi
8743 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
8744    { { $as_echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
8745 $as_echo "$as_me: error: perl 5.x required for intltool" >&2;}
8746    { (exit 1); exit 1; }; }
8747 fi
8748
8749 # Remove file type tags (using []) from po/POTFILES.
8750
8751
8752
8753
8754
8755
8756
8757 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
8758
8759 ac_config_commands="$ac_config_commands default-1"
8760
8761
8762
8763 GETTEXT_PACKAGE=xscreensaver
8764
8765 cat >>confdefs.h <<_ACEOF
8766 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
8767 _ACEOF
8768
8769
8770 cat >>confdefs.h <<_ACEOF
8771 #define PACKAGE "$GETTEXT_PACKAGE"
8772 _ACEOF
8773
8774
8775
8776 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"
8777 if test -n "$ac_tool_prefix"; then
8778   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8779 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8780 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8781 $as_echo_n "checking for $ac_word... " >&6; }
8782 if test "${ac_cv_prog_RANLIB+set}" = set; then
8783   $as_echo_n "(cached) " >&6
8784 else
8785   if test -n "$RANLIB"; then
8786   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8787 else
8788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8789 for as_dir in $PATH
8790 do
8791   IFS=$as_save_IFS
8792   test -z "$as_dir" && as_dir=.
8793   for ac_exec_ext in '' $ac_executable_extensions; do
8794   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8795     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8796     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8797     break 2
8798   fi
8799 done
8800 done
8801 IFS=$as_save_IFS
8802
8803 fi
8804 fi
8805 RANLIB=$ac_cv_prog_RANLIB
8806 if test -n "$RANLIB"; then
8807   { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
8808 $as_echo "$RANLIB" >&6; }
8809 else
8810   { $as_echo "$as_me:$LINENO: result: no" >&5
8811 $as_echo "no" >&6; }
8812 fi
8813
8814
8815 fi
8816 if test -z "$ac_cv_prog_RANLIB"; then
8817   ac_ct_RANLIB=$RANLIB
8818   # Extract the first word of "ranlib", so it can be a program name with args.
8819 set dummy ranlib; ac_word=$2
8820 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8821 $as_echo_n "checking for $ac_word... " >&6; }
8822 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8823   $as_echo_n "(cached) " >&6
8824 else
8825   if test -n "$ac_ct_RANLIB"; then
8826   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8827 else
8828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8829 for as_dir in $PATH
8830 do
8831   IFS=$as_save_IFS
8832   test -z "$as_dir" && as_dir=.
8833   for ac_exec_ext in '' $ac_executable_extensions; do
8834   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8835     ac_cv_prog_ac_ct_RANLIB="ranlib"
8836     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8837     break 2
8838   fi
8839 done
8840 done
8841 IFS=$as_save_IFS
8842
8843 fi
8844 fi
8845 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8846 if test -n "$ac_ct_RANLIB"; then
8847   { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8848 $as_echo "$ac_ct_RANLIB" >&6; }
8849 else
8850   { $as_echo "$as_me:$LINENO: result: no" >&5
8851 $as_echo "no" >&6; }
8852 fi
8853
8854   if test "x$ac_ct_RANLIB" = x; then
8855     RANLIB=":"
8856   else
8857     case $cross_compiling:$ac_tool_warned in
8858 yes:)
8859 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
8860 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8861 ac_tool_warned=yes ;;
8862 esac
8863     RANLIB=$ac_ct_RANLIB
8864   fi
8865 else
8866   RANLIB="$ac_cv_prog_RANLIB"
8867 fi
8868
8869 { $as_echo "$as_me:$LINENO: checking for off_t" >&5
8870 $as_echo_n "checking for off_t... " >&6; }
8871 if test "${ac_cv_type_off_t+set}" = set; then
8872   $as_echo_n "(cached) " >&6
8873 else
8874   ac_cv_type_off_t=no
8875 cat >conftest.$ac_ext <<_ACEOF
8876 /* confdefs.h.  */
8877 _ACEOF
8878 cat confdefs.h >>conftest.$ac_ext
8879 cat >>conftest.$ac_ext <<_ACEOF
8880 /* end confdefs.h.  */
8881 $ac_includes_default
8882 int
8883 main ()
8884 {
8885 if (sizeof (off_t))
8886        return 0;
8887   ;
8888   return 0;
8889 }
8890 _ACEOF
8891 rm -rf conftest.$ac_objext
8892 if { (ac_try="$ac_compile"
8893 case "(($ac_try" in
8894   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8895   *) ac_try_echo=$ac_try;;
8896 esac
8897 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8898 $as_echo "$ac_try_echo") >&5
8899   (eval "$ac_compile") 2>conftest.er1
8900   ac_status=$?
8901   grep -v '^ *+' conftest.er1 >conftest.err
8902   rm -rf conftest.er1
8903   cat conftest.err >&5
8904   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8905   (exit $ac_status); } && {
8906          test -z "$ac_c_werror_flag" ||
8907          test ! -s conftest.err
8908        } && test -s conftest.$ac_objext; then
8909   cat >conftest.$ac_ext <<_ACEOF
8910 /* confdefs.h.  */
8911 _ACEOF
8912 cat confdefs.h >>conftest.$ac_ext
8913 cat >>conftest.$ac_ext <<_ACEOF
8914 /* end confdefs.h.  */
8915 $ac_includes_default
8916 int
8917 main ()
8918 {
8919 if (sizeof ((off_t)))
8920           return 0;
8921   ;
8922   return 0;
8923 }
8924 _ACEOF
8925 rm -rf conftest.$ac_objext
8926 if { (ac_try="$ac_compile"
8927 case "(($ac_try" in
8928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8929   *) ac_try_echo=$ac_try;;
8930 esac
8931 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8932 $as_echo "$ac_try_echo") >&5
8933   (eval "$ac_compile") 2>conftest.er1
8934   ac_status=$?
8935   grep -v '^ *+' conftest.er1 >conftest.err
8936   rm -rf conftest.er1
8937   cat conftest.err >&5
8938   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8939   (exit $ac_status); } && {
8940          test -z "$ac_c_werror_flag" ||
8941          test ! -s conftest.err
8942        } && test -s conftest.$ac_objext; then
8943   :
8944 else
8945   $as_echo "$as_me: failed program was:" >&5
8946 sed 's/^/| /' conftest.$ac_ext >&5
8947
8948         ac_cv_type_off_t=yes
8949 fi
8950
8951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8952 else
8953   $as_echo "$as_me: failed program was:" >&5
8954 sed 's/^/| /' conftest.$ac_ext >&5
8955
8956
8957 fi
8958
8959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8960 fi
8961 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8962 $as_echo "$ac_cv_type_off_t" >&6; }
8963 if test "x$ac_cv_type_off_t" = x""yes; then
8964   :
8965 else
8966
8967 cat >>confdefs.h <<_ACEOF
8968 #define off_t long int
8969 _ACEOF
8970
8971 fi
8972
8973 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8974 # for constant arguments.  Useless!
8975 { $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5
8976 $as_echo_n "checking for working alloca.h... " >&6; }
8977 if test "${ac_cv_working_alloca_h+set}" = set; then
8978   $as_echo_n "(cached) " >&6
8979 else
8980   cat >conftest.$ac_ext <<_ACEOF
8981 /* confdefs.h.  */
8982 _ACEOF
8983 cat confdefs.h >>conftest.$ac_ext
8984 cat >>conftest.$ac_ext <<_ACEOF
8985 /* end confdefs.h.  */
8986 #include <alloca.h>
8987 int
8988 main ()
8989 {
8990 char *p = (char *) alloca (2 * sizeof (int));
8991                           if (p) return 0;
8992   ;
8993   return 0;
8994 }
8995 _ACEOF
8996 rm -rf conftest.$ac_objext conftest$ac_exeext
8997 if { (ac_try="$ac_link"
8998 case "(($ac_try" in
8999   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9000   *) ac_try_echo=$ac_try;;
9001 esac
9002 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9003 $as_echo "$ac_try_echo") >&5
9004   (eval "$ac_link") 2>conftest.er1
9005   ac_status=$?
9006   grep -v '^ *+' conftest.er1 >conftest.err
9007   rm -rf conftest.er1
9008   cat conftest.err >&5
9009   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9010   (exit $ac_status); } && {
9011          test -z "$ac_c_werror_flag" ||
9012          test ! -s conftest.err
9013        } && test -s conftest$ac_exeext && {
9014          test "$cross_compiling" = yes ||
9015          $as_test_x conftest$ac_exeext
9016        }; then
9017   ac_cv_working_alloca_h=yes
9018 else
9019   $as_echo "$as_me: failed program was:" >&5
9020 sed 's/^/| /' conftest.$ac_ext >&5
9021
9022         ac_cv_working_alloca_h=no
9023 fi
9024
9025 rm -rf conftest.dSYM
9026 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9027       conftest$ac_exeext conftest.$ac_ext
9028 fi
9029 { $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
9030 $as_echo "$ac_cv_working_alloca_h" >&6; }
9031 if test $ac_cv_working_alloca_h = yes; then
9032
9033 cat >>confdefs.h <<\_ACEOF
9034 #define HAVE_ALLOCA_H 1
9035 _ACEOF
9036
9037 fi
9038
9039 { $as_echo "$as_me:$LINENO: checking for alloca" >&5
9040 $as_echo_n "checking for alloca... " >&6; }
9041 if test "${ac_cv_func_alloca_works+set}" = set; then
9042   $as_echo_n "(cached) " >&6
9043 else
9044   cat >conftest.$ac_ext <<_ACEOF
9045 /* confdefs.h.  */
9046 _ACEOF
9047 cat confdefs.h >>conftest.$ac_ext
9048 cat >>conftest.$ac_ext <<_ACEOF
9049 /* end confdefs.h.  */
9050 #ifdef __GNUC__
9051 # define alloca __builtin_alloca
9052 #else
9053 # ifdef _MSC_VER
9054 #  include <malloc.h>
9055 #  define alloca _alloca
9056 # else
9057 #  ifdef HAVE_ALLOCA_H
9058 #   include <alloca.h>
9059 #  else
9060 #   ifdef _AIX
9061  #pragma alloca
9062 #   else
9063 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9064 char *alloca ();
9065 #    endif
9066 #   endif
9067 #  endif
9068 # endif
9069 #endif
9070
9071 int
9072 main ()
9073 {
9074 char *p = (char *) alloca (1);
9075                                     if (p) return 0;
9076   ;
9077   return 0;
9078 }
9079 _ACEOF
9080 rm -rf conftest.$ac_objext conftest$ac_exeext
9081 if { (ac_try="$ac_link"
9082 case "(($ac_try" in
9083   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9084   *) ac_try_echo=$ac_try;;
9085 esac
9086 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9087 $as_echo "$ac_try_echo") >&5
9088   (eval "$ac_link") 2>conftest.er1
9089   ac_status=$?
9090   grep -v '^ *+' conftest.er1 >conftest.err
9091   rm -rf conftest.er1
9092   cat conftest.err >&5
9093   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9094   (exit $ac_status); } && {
9095          test -z "$ac_c_werror_flag" ||
9096          test ! -s conftest.err
9097        } && test -s conftest$ac_exeext && {
9098          test "$cross_compiling" = yes ||
9099          $as_test_x conftest$ac_exeext
9100        }; then
9101   ac_cv_func_alloca_works=yes
9102 else
9103   $as_echo "$as_me: failed program was:" >&5
9104 sed 's/^/| /' conftest.$ac_ext >&5
9105
9106         ac_cv_func_alloca_works=no
9107 fi
9108
9109 rm -rf conftest.dSYM
9110 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9111       conftest$ac_exeext conftest.$ac_ext
9112 fi
9113 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
9114 $as_echo "$ac_cv_func_alloca_works" >&6; }
9115
9116 if test $ac_cv_func_alloca_works = yes; then
9117
9118 cat >>confdefs.h <<\_ACEOF
9119 #define HAVE_ALLOCA 1
9120 _ACEOF
9121
9122 else
9123   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9124 # that cause trouble.  Some versions do not even contain alloca or
9125 # contain a buggy version.  If you still want to use their alloca,
9126 # use ar to extract alloca.o from them instead of compiling alloca.c.
9127
9128 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
9129
9130 cat >>confdefs.h <<\_ACEOF
9131 #define C_ALLOCA 1
9132 _ACEOF
9133
9134
9135 { $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
9136 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9137 if test "${ac_cv_os_cray+set}" = set; then
9138   $as_echo_n "(cached) " >&6
9139 else
9140   cat >conftest.$ac_ext <<_ACEOF
9141 /* confdefs.h.  */
9142 _ACEOF
9143 cat confdefs.h >>conftest.$ac_ext
9144 cat >>conftest.$ac_ext <<_ACEOF
9145 /* end confdefs.h.  */
9146 #if defined CRAY && ! defined CRAY2
9147 webecray
9148 #else
9149 wenotbecray
9150 #endif
9151
9152 _ACEOF
9153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9154   $EGREP "webecray" >/dev/null 2>&1; then
9155   ac_cv_os_cray=yes
9156 else
9157   ac_cv_os_cray=no
9158 fi
9159 rm -rf conftest*
9160
9161 fi
9162 { $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
9163 $as_echo "$ac_cv_os_cray" >&6; }
9164 if test $ac_cv_os_cray = yes; then
9165   for ac_func in _getb67 GETB67 getb67; do
9166     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9167 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9168 $as_echo_n "checking for $ac_func... " >&6; }
9169 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9170   $as_echo_n "(cached) " >&6
9171 else
9172   cat >conftest.$ac_ext <<_ACEOF
9173 /* confdefs.h.  */
9174 _ACEOF
9175 cat confdefs.h >>conftest.$ac_ext
9176 cat >>conftest.$ac_ext <<_ACEOF
9177 /* end confdefs.h.  */
9178 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9179    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9180 #define $ac_func innocuous_$ac_func
9181
9182 /* System header to define __stub macros and hopefully few prototypes,
9183     which can conflict with char $ac_func (); below.
9184     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9185     <limits.h> exists even on freestanding compilers.  */
9186
9187 #ifdef __STDC__
9188 # include <limits.h>
9189 #else
9190 # include <assert.h>
9191 #endif
9192
9193 #undef $ac_func
9194
9195 /* Override any GCC internal prototype to avoid an error.
9196    Use char because int might match the return type of a GCC
9197    builtin and then its argument prototype would still apply.  */
9198 #ifdef __cplusplus
9199 extern "C"
9200 #endif
9201 char $ac_func ();
9202 /* The GNU C library defines this for functions which it implements
9203     to always fail with ENOSYS.  Some functions are actually named
9204     something starting with __ and the normal name is an alias.  */
9205 #if defined __stub_$ac_func || defined __stub___$ac_func
9206 choke me
9207 #endif
9208
9209 int
9210 main ()
9211 {
9212 return $ac_func ();
9213   ;
9214   return 0;
9215 }
9216 _ACEOF
9217 rm -rf conftest.$ac_objext conftest$ac_exeext
9218 if { (ac_try="$ac_link"
9219 case "(($ac_try" in
9220   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9221   *) ac_try_echo=$ac_try;;
9222 esac
9223 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9224 $as_echo "$ac_try_echo") >&5
9225   (eval "$ac_link") 2>conftest.er1
9226   ac_status=$?
9227   grep -v '^ *+' conftest.er1 >conftest.err
9228   rm -rf conftest.er1
9229   cat conftest.err >&5
9230   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9231   (exit $ac_status); } && {
9232          test -z "$ac_c_werror_flag" ||
9233          test ! -s conftest.err
9234        } && test -s conftest$ac_exeext && {
9235          test "$cross_compiling" = yes ||
9236          $as_test_x conftest$ac_exeext
9237        }; then
9238   eval "$as_ac_var=yes"
9239 else
9240   $as_echo "$as_me: failed program was:" >&5
9241 sed 's/^/| /' conftest.$ac_ext >&5
9242
9243         eval "$as_ac_var=no"
9244 fi
9245
9246 rm -rf conftest.dSYM
9247 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9248       conftest$ac_exeext conftest.$ac_ext
9249 fi
9250 ac_res=`eval 'as_val=${'$as_ac_var'}
9251                  $as_echo "$as_val"'`
9252                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9253 $as_echo "$ac_res" >&6; }
9254 as_val=`eval 'as_val=${'$as_ac_var'}
9255                  $as_echo "$as_val"'`
9256    if test "x$as_val" = x""yes; then
9257
9258 cat >>confdefs.h <<_ACEOF
9259 #define CRAY_STACKSEG_END $ac_func
9260 _ACEOF
9261
9262     break
9263 fi
9264
9265   done
9266 fi
9267
9268 { $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
9269 $as_echo_n "checking stack direction for C alloca... " >&6; }
9270 if test "${ac_cv_c_stack_direction+set}" = set; then
9271   $as_echo_n "(cached) " >&6
9272 else
9273   if test "$cross_compiling" = yes; then
9274   ac_cv_c_stack_direction=0
9275 else
9276   cat >conftest.$ac_ext <<_ACEOF
9277 /* confdefs.h.  */
9278 _ACEOF
9279 cat confdefs.h >>conftest.$ac_ext
9280 cat >>conftest.$ac_ext <<_ACEOF
9281 /* end confdefs.h.  */
9282 $ac_includes_default
9283 int
9284 find_stack_direction ()
9285 {
9286   static char *addr = 0;
9287   auto char dummy;
9288   if (addr == 0)
9289     {
9290       addr = &dummy;
9291       return find_stack_direction ();
9292     }
9293   else
9294     return (&dummy > addr) ? 1 : -1;
9295 }
9296
9297 int
9298 main ()
9299 {
9300   return find_stack_direction () < 0;
9301 }
9302 _ACEOF
9303 rm -rf conftest$ac_exeext
9304 if { (ac_try="$ac_link"
9305 case "(($ac_try" in
9306   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9307   *) ac_try_echo=$ac_try;;
9308 esac
9309 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9310 $as_echo "$ac_try_echo") >&5
9311   (eval "$ac_link") 2>&5
9312   ac_status=$?
9313   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9314   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9315   { (case "(($ac_try" in
9316   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9317   *) ac_try_echo=$ac_try;;
9318 esac
9319 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9320 $as_echo "$ac_try_echo") >&5
9321   (eval "$ac_try") 2>&5
9322   ac_status=$?
9323   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9324   (exit $ac_status); }; }; then
9325   ac_cv_c_stack_direction=1
9326 else
9327   $as_echo "$as_me: program exited with status $ac_status" >&5
9328 $as_echo "$as_me: failed program was:" >&5
9329 sed 's/^/| /' conftest.$ac_ext >&5
9330
9331 ( exit $ac_status )
9332 ac_cv_c_stack_direction=-1
9333 fi
9334 rm -rf conftest.dSYM
9335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9336 fi
9337
9338
9339 fi
9340 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
9341 $as_echo "$ac_cv_c_stack_direction" >&6; }
9342
9343 cat >>confdefs.h <<_ACEOF
9344 #define STACK_DIRECTION $ac_cv_c_stack_direction
9345 _ACEOF
9346
9347
9348 fi
9349
9350
9351
9352 for ac_header in stdlib.h unistd.h
9353 do
9354 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9355 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9356   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9357 $as_echo_n "checking for $ac_header... " >&6; }
9358 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9359   $as_echo_n "(cached) " >&6
9360 fi
9361 ac_res=`eval 'as_val=${'$as_ac_Header'}
9362                  $as_echo "$as_val"'`
9363                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9364 $as_echo "$ac_res" >&6; }
9365 else
9366   # Is the header compilable?
9367 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
9368 $as_echo_n "checking $ac_header usability... " >&6; }
9369 cat >conftest.$ac_ext <<_ACEOF
9370 /* confdefs.h.  */
9371 _ACEOF
9372 cat confdefs.h >>conftest.$ac_ext
9373 cat >>conftest.$ac_ext <<_ACEOF
9374 /* end confdefs.h.  */
9375 $ac_includes_default
9376 #include <$ac_header>
9377 _ACEOF
9378 rm -rf conftest.$ac_objext
9379 if { (ac_try="$ac_compile"
9380 case "(($ac_try" in
9381   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9382   *) ac_try_echo=$ac_try;;
9383 esac
9384 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9385 $as_echo "$ac_try_echo") >&5
9386   (eval "$ac_compile") 2>conftest.er1
9387   ac_status=$?
9388   grep -v '^ *+' conftest.er1 >conftest.err
9389   rm -rf conftest.er1
9390   cat conftest.err >&5
9391   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9392   (exit $ac_status); } && {
9393          test -z "$ac_c_werror_flag" ||
9394          test ! -s conftest.err
9395        } && test -s conftest.$ac_objext; then
9396   ac_header_compiler=yes
9397 else
9398   $as_echo "$as_me: failed program was:" >&5
9399 sed 's/^/| /' conftest.$ac_ext >&5
9400
9401         ac_header_compiler=no
9402 fi
9403
9404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9405 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9406 $as_echo "$ac_header_compiler" >&6; }
9407
9408 # Is the header present?
9409 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
9410 $as_echo_n "checking $ac_header presence... " >&6; }
9411 cat >conftest.$ac_ext <<_ACEOF
9412 /* confdefs.h.  */
9413 _ACEOF
9414 cat confdefs.h >>conftest.$ac_ext
9415 cat >>conftest.$ac_ext <<_ACEOF
9416 /* end confdefs.h.  */
9417 #include <$ac_header>
9418 _ACEOF
9419 if { (ac_try="$ac_cpp conftest.$ac_ext"
9420 case "(($ac_try" in
9421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9422   *) ac_try_echo=$ac_try;;
9423 esac
9424 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9425 $as_echo "$ac_try_echo") >&5
9426   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9427   ac_status=$?
9428   grep -v '^ *+' conftest.er1 >conftest.err
9429   rm -rf conftest.er1
9430   cat conftest.err >&5
9431   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9432   (exit $ac_status); } >/dev/null && {
9433          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9434          test ! -s conftest.err
9435        }; then
9436   ac_header_preproc=yes
9437 else
9438   $as_echo "$as_me: failed program was:" >&5
9439 sed 's/^/| /' conftest.$ac_ext >&5
9440
9441   ac_header_preproc=no
9442 fi
9443
9444 rm -rf conftest.err conftest.$ac_ext
9445 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9446 $as_echo "$ac_header_preproc" >&6; }
9447
9448 # So?  What about this header?
9449 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9450   yes:no: )
9451     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9452 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9453     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9454 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9455     ac_header_preproc=yes
9456     ;;
9457   no:yes:* )
9458     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9459 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9460     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9461 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9462     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9463 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9464     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9465 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9466     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9467 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9468     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9469 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9470
9471     ;;
9472 esac
9473 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9474 $as_echo_n "checking for $ac_header... " >&6; }
9475 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9476   $as_echo_n "(cached) " >&6
9477 else
9478   eval "$as_ac_Header=\$ac_header_preproc"
9479 fi
9480 ac_res=`eval 'as_val=${'$as_ac_Header'}
9481                  $as_echo "$as_val"'`
9482                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9483 $as_echo "$ac_res" >&6; }
9484
9485 fi
9486 as_val=`eval 'as_val=${'$as_ac_Header'}
9487                  $as_echo "$as_val"'`
9488    if test "x$as_val" = x""yes; then
9489   cat >>confdefs.h <<_ACEOF
9490 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9491 _ACEOF
9492
9493 fi
9494
9495 done
9496
9497
9498 for ac_func in getpagesize
9499 do
9500 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9501 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9502 $as_echo_n "checking for $ac_func... " >&6; }
9503 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9504   $as_echo_n "(cached) " >&6
9505 else
9506   cat >conftest.$ac_ext <<_ACEOF
9507 /* confdefs.h.  */
9508 _ACEOF
9509 cat confdefs.h >>conftest.$ac_ext
9510 cat >>conftest.$ac_ext <<_ACEOF
9511 /* end confdefs.h.  */
9512 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9513    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9514 #define $ac_func innocuous_$ac_func
9515
9516 /* System header to define __stub macros and hopefully few prototypes,
9517     which can conflict with char $ac_func (); below.
9518     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9519     <limits.h> exists even on freestanding compilers.  */
9520
9521 #ifdef __STDC__
9522 # include <limits.h>
9523 #else
9524 # include <assert.h>
9525 #endif
9526
9527 #undef $ac_func
9528
9529 /* Override any GCC internal prototype to avoid an error.
9530    Use char because int might match the return type of a GCC
9531    builtin and then its argument prototype would still apply.  */
9532 #ifdef __cplusplus
9533 extern "C"
9534 #endif
9535 char $ac_func ();
9536 /* The GNU C library defines this for functions which it implements
9537     to always fail with ENOSYS.  Some functions are actually named
9538     something starting with __ and the normal name is an alias.  */
9539 #if defined __stub_$ac_func || defined __stub___$ac_func
9540 choke me
9541 #endif
9542
9543 int
9544 main ()
9545 {
9546 return $ac_func ();
9547   ;
9548   return 0;
9549 }
9550 _ACEOF
9551 rm -rf conftest.$ac_objext conftest$ac_exeext
9552 if { (ac_try="$ac_link"
9553 case "(($ac_try" in
9554   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9555   *) ac_try_echo=$ac_try;;
9556 esac
9557 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9558 $as_echo "$ac_try_echo") >&5
9559   (eval "$ac_link") 2>conftest.er1
9560   ac_status=$?
9561   grep -v '^ *+' conftest.er1 >conftest.err
9562   rm -rf conftest.er1
9563   cat conftest.err >&5
9564   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9565   (exit $ac_status); } && {
9566          test -z "$ac_c_werror_flag" ||
9567          test ! -s conftest.err
9568        } && test -s conftest$ac_exeext && {
9569          test "$cross_compiling" = yes ||
9570          $as_test_x conftest$ac_exeext
9571        }; then
9572   eval "$as_ac_var=yes"
9573 else
9574   $as_echo "$as_me: failed program was:" >&5
9575 sed 's/^/| /' conftest.$ac_ext >&5
9576
9577         eval "$as_ac_var=no"
9578 fi
9579
9580 rm -rf conftest.dSYM
9581 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9582       conftest$ac_exeext conftest.$ac_ext
9583 fi
9584 ac_res=`eval 'as_val=${'$as_ac_var'}
9585                  $as_echo "$as_val"'`
9586                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9587 $as_echo "$ac_res" >&6; }
9588 as_val=`eval 'as_val=${'$as_ac_var'}
9589                  $as_echo "$as_val"'`
9590    if test "x$as_val" = x""yes; then
9591   cat >>confdefs.h <<_ACEOF
9592 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9593 _ACEOF
9594
9595 fi
9596 done
9597
9598 { $as_echo "$as_me:$LINENO: checking for working mmap" >&5
9599 $as_echo_n "checking for working mmap... " >&6; }
9600 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9601   $as_echo_n "(cached) " >&6
9602 else
9603   if test "$cross_compiling" = yes; then
9604   ac_cv_func_mmap_fixed_mapped=no
9605 else
9606   cat >conftest.$ac_ext <<_ACEOF
9607 /* confdefs.h.  */
9608 _ACEOF
9609 cat confdefs.h >>conftest.$ac_ext
9610 cat >>conftest.$ac_ext <<_ACEOF
9611 /* end confdefs.h.  */
9612 $ac_includes_default
9613 /* malloc might have been renamed as rpl_malloc. */
9614 #undef malloc
9615
9616 /* Thanks to Mike Haertel and Jim Avera for this test.
9617    Here is a matrix of mmap possibilities:
9618         mmap private not fixed
9619         mmap private fixed at somewhere currently unmapped
9620         mmap private fixed at somewhere already mapped
9621         mmap shared not fixed
9622         mmap shared fixed at somewhere currently unmapped
9623         mmap shared fixed at somewhere already mapped
9624    For private mappings, we should verify that changes cannot be read()
9625    back from the file, nor mmap's back from the file at a different
9626    address.  (There have been systems where private was not correctly
9627    implemented like the infamous i386 svr4.0, and systems where the
9628    VM page cache was not coherent with the file system buffer cache
9629    like early versions of FreeBSD and possibly contemporary NetBSD.)
9630    For shared mappings, we should conversely verify that changes get
9631    propagated back to all the places they're supposed to be.
9632
9633    Grep wants private fixed already mapped.
9634    The main things grep needs to know about mmap are:
9635    * does it exist and is it safe to write into the mmap'd area
9636    * how to use it (BSD variants)  */
9637
9638 #include <fcntl.h>
9639 #include <sys/mman.h>
9640
9641 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
9642 char *malloc ();
9643 #endif
9644
9645 /* This mess was copied from the GNU getpagesize.h.  */
9646 #ifndef HAVE_GETPAGESIZE
9647 /* Assume that all systems that can run configure have sys/param.h.  */
9648 # ifndef HAVE_SYS_PARAM_H
9649 #  define HAVE_SYS_PARAM_H 1
9650 # endif
9651
9652 # ifdef _SC_PAGESIZE
9653 #  define getpagesize() sysconf(_SC_PAGESIZE)
9654 # else /* no _SC_PAGESIZE */
9655 #  ifdef HAVE_SYS_PARAM_H
9656 #   include <sys/param.h>
9657 #   ifdef EXEC_PAGESIZE
9658 #    define getpagesize() EXEC_PAGESIZE
9659 #   else /* no EXEC_PAGESIZE */
9660 #    ifdef NBPG
9661 #     define getpagesize() NBPG * CLSIZE
9662 #     ifndef CLSIZE
9663 #      define CLSIZE 1
9664 #     endif /* no CLSIZE */
9665 #    else /* no NBPG */
9666 #     ifdef NBPC
9667 #      define getpagesize() NBPC
9668 #     else /* no NBPC */
9669 #      ifdef PAGESIZE
9670 #       define getpagesize() PAGESIZE
9671 #      endif /* PAGESIZE */
9672 #     endif /* no NBPC */
9673 #    endif /* no NBPG */
9674 #   endif /* no EXEC_PAGESIZE */
9675 #  else /* no HAVE_SYS_PARAM_H */
9676 #   define getpagesize() 8192   /* punt totally */
9677 #  endif /* no HAVE_SYS_PARAM_H */
9678 # endif /* no _SC_PAGESIZE */
9679
9680 #endif /* no HAVE_GETPAGESIZE */
9681
9682 int
9683 main ()
9684 {
9685   char *data, *data2, *data3;
9686   int i, pagesize;
9687   int fd;
9688
9689   pagesize = getpagesize ();
9690
9691   /* First, make a file with some known garbage in it. */
9692   data = (char *) malloc (pagesize);
9693   if (!data)
9694     return 1;
9695   for (i = 0; i < pagesize; ++i)
9696     *(data + i) = rand ();
9697   umask (0);
9698   fd = creat ("conftest.mmap", 0600);
9699   if (fd < 0)
9700     return 1;
9701   if (write (fd, data, pagesize) != pagesize)
9702     return 1;
9703   close (fd);
9704
9705   /* Next, try to mmap the file at a fixed address which already has
9706      something else allocated at it.  If we can, also make sure that
9707      we see the same garbage.  */
9708   fd = open ("conftest.mmap", O_RDWR);
9709   if (fd < 0)
9710     return 1;
9711   data2 = (char *) malloc (2 * pagesize);
9712   if (!data2)
9713     return 1;
9714   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
9715   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9716                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
9717     return 1;
9718   for (i = 0; i < pagesize; ++i)
9719     if (*(data + i) != *(data2 + i))
9720       return 1;
9721
9722   /* Finally, make sure that changes to the mapped area do not
9723      percolate back to the file as seen by read().  (This is a bug on
9724      some variants of i386 svr4.0.)  */
9725   for (i = 0; i < pagesize; ++i)
9726     *(data2 + i) = *(data2 + i) + 1;
9727   data3 = (char *) malloc (pagesize);
9728   if (!data3)
9729     return 1;
9730   if (read (fd, data3, pagesize) != pagesize)
9731     return 1;
9732   for (i = 0; i < pagesize; ++i)
9733     if (*(data + i) != *(data3 + i))
9734       return 1;
9735   close (fd);
9736   return 0;
9737 }
9738 _ACEOF
9739 rm -rf conftest$ac_exeext
9740 if { (ac_try="$ac_link"
9741 case "(($ac_try" in
9742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9743   *) ac_try_echo=$ac_try;;
9744 esac
9745 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9746 $as_echo "$ac_try_echo") >&5
9747   (eval "$ac_link") 2>&5
9748   ac_status=$?
9749   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9750   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9751   { (case "(($ac_try" in
9752   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9753   *) ac_try_echo=$ac_try;;
9754 esac
9755 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9756 $as_echo "$ac_try_echo") >&5
9757   (eval "$ac_try") 2>&5
9758   ac_status=$?
9759   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9760   (exit $ac_status); }; }; then
9761   ac_cv_func_mmap_fixed_mapped=yes
9762 else
9763   $as_echo "$as_me: program exited with status $ac_status" >&5
9764 $as_echo "$as_me: failed program was:" >&5
9765 sed 's/^/| /' conftest.$ac_ext >&5
9766
9767 ( exit $ac_status )
9768 ac_cv_func_mmap_fixed_mapped=no
9769 fi
9770 rm -rf conftest.dSYM
9771 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9772 fi
9773
9774
9775 fi
9776 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
9777 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
9778 if test $ac_cv_func_mmap_fixed_mapped = yes; then
9779
9780 cat >>confdefs.h <<\_ACEOF
9781 #define HAVE_MMAP 1
9782 _ACEOF
9783
9784 fi
9785 rm -rf conftest.mmap
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
9797 unistd.h sys/param.h
9798 do
9799 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9800 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9801   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9802 $as_echo_n "checking for $ac_header... " >&6; }
9803 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9804   $as_echo_n "(cached) " >&6
9805 fi
9806 ac_res=`eval 'as_val=${'$as_ac_Header'}
9807                  $as_echo "$as_val"'`
9808                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9809 $as_echo "$ac_res" >&6; }
9810 else
9811   # Is the header compilable?
9812 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
9813 $as_echo_n "checking $ac_header usability... " >&6; }
9814 cat >conftest.$ac_ext <<_ACEOF
9815 /* confdefs.h.  */
9816 _ACEOF
9817 cat confdefs.h >>conftest.$ac_ext
9818 cat >>conftest.$ac_ext <<_ACEOF
9819 /* end confdefs.h.  */
9820 $ac_includes_default
9821 #include <$ac_header>
9822 _ACEOF
9823 rm -rf conftest.$ac_objext
9824 if { (ac_try="$ac_compile"
9825 case "(($ac_try" in
9826   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9827   *) ac_try_echo=$ac_try;;
9828 esac
9829 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9830 $as_echo "$ac_try_echo") >&5
9831   (eval "$ac_compile") 2>conftest.er1
9832   ac_status=$?
9833   grep -v '^ *+' conftest.er1 >conftest.err
9834   rm -rf conftest.er1
9835   cat conftest.err >&5
9836   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9837   (exit $ac_status); } && {
9838          test -z "$ac_c_werror_flag" ||
9839          test ! -s conftest.err
9840        } && test -s conftest.$ac_objext; then
9841   ac_header_compiler=yes
9842 else
9843   $as_echo "$as_me: failed program was:" >&5
9844 sed 's/^/| /' conftest.$ac_ext >&5
9845
9846         ac_header_compiler=no
9847 fi
9848
9849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9850 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9851 $as_echo "$ac_header_compiler" >&6; }
9852
9853 # Is the header present?
9854 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
9855 $as_echo_n "checking $ac_header presence... " >&6; }
9856 cat >conftest.$ac_ext <<_ACEOF
9857 /* confdefs.h.  */
9858 _ACEOF
9859 cat confdefs.h >>conftest.$ac_ext
9860 cat >>conftest.$ac_ext <<_ACEOF
9861 /* end confdefs.h.  */
9862 #include <$ac_header>
9863 _ACEOF
9864 if { (ac_try="$ac_cpp conftest.$ac_ext"
9865 case "(($ac_try" in
9866   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9867   *) ac_try_echo=$ac_try;;
9868 esac
9869 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9870 $as_echo "$ac_try_echo") >&5
9871   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9872   ac_status=$?
9873   grep -v '^ *+' conftest.er1 >conftest.err
9874   rm -rf conftest.er1
9875   cat conftest.err >&5
9876   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9877   (exit $ac_status); } >/dev/null && {
9878          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9879          test ! -s conftest.err
9880        }; then
9881   ac_header_preproc=yes
9882 else
9883   $as_echo "$as_me: failed program was:" >&5
9884 sed 's/^/| /' conftest.$ac_ext >&5
9885
9886   ac_header_preproc=no
9887 fi
9888
9889 rm -rf conftest.err conftest.$ac_ext
9890 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9891 $as_echo "$ac_header_preproc" >&6; }
9892
9893 # So?  What about this header?
9894 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9895   yes:no: )
9896     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9897 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9898     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9899 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9900     ac_header_preproc=yes
9901     ;;
9902   no:yes:* )
9903     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9904 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9905     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9906 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9907     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9908 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9909     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9910 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9911     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9912 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9913     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9914 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9915
9916     ;;
9917 esac
9918 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9919 $as_echo_n "checking for $ac_header... " >&6; }
9920 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9921   $as_echo_n "(cached) " >&6
9922 else
9923   eval "$as_ac_Header=\$ac_header_preproc"
9924 fi
9925 ac_res=`eval 'as_val=${'$as_ac_Header'}
9926                  $as_echo "$as_val"'`
9927                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9928 $as_echo "$ac_res" >&6; }
9929
9930 fi
9931 as_val=`eval 'as_val=${'$as_ac_Header'}
9932                  $as_echo "$as_val"'`
9933    if test "x$as_val" = x""yes; then
9934   cat >>confdefs.h <<_ACEOF
9935 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9936 _ACEOF
9937
9938 fi
9939
9940 done
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9954 strdup __argz_count __argz_stringify __argz_next
9955 do
9956 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9957 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9958 $as_echo_n "checking for $ac_func... " >&6; }
9959 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9960   $as_echo_n "(cached) " >&6
9961 else
9962   cat >conftest.$ac_ext <<_ACEOF
9963 /* confdefs.h.  */
9964 _ACEOF
9965 cat confdefs.h >>conftest.$ac_ext
9966 cat >>conftest.$ac_ext <<_ACEOF
9967 /* end confdefs.h.  */
9968 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9969    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9970 #define $ac_func innocuous_$ac_func
9971
9972 /* System header to define __stub macros and hopefully few prototypes,
9973     which can conflict with char $ac_func (); below.
9974     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9975     <limits.h> exists even on freestanding compilers.  */
9976
9977 #ifdef __STDC__
9978 # include <limits.h>
9979 #else
9980 # include <assert.h>
9981 #endif
9982
9983 #undef $ac_func
9984
9985 /* Override any GCC internal prototype to avoid an error.
9986    Use char because int might match the return type of a GCC
9987    builtin and then its argument prototype would still apply.  */
9988 #ifdef __cplusplus
9989 extern "C"
9990 #endif
9991 char $ac_func ();
9992 /* The GNU C library defines this for functions which it implements
9993     to always fail with ENOSYS.  Some functions are actually named
9994     something starting with __ and the normal name is an alias.  */
9995 #if defined __stub_$ac_func || defined __stub___$ac_func
9996 choke me
9997 #endif
9998
9999 int
10000 main ()
10001 {
10002 return $ac_func ();
10003   ;
10004   return 0;
10005 }
10006 _ACEOF
10007 rm -rf conftest.$ac_objext conftest$ac_exeext
10008 if { (ac_try="$ac_link"
10009 case "(($ac_try" in
10010   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10011   *) ac_try_echo=$ac_try;;
10012 esac
10013 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10014 $as_echo "$ac_try_echo") >&5
10015   (eval "$ac_link") 2>conftest.er1
10016   ac_status=$?
10017   grep -v '^ *+' conftest.er1 >conftest.err
10018   rm -rf conftest.er1
10019   cat conftest.err >&5
10020   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10021   (exit $ac_status); } && {
10022          test -z "$ac_c_werror_flag" ||
10023          test ! -s conftest.err
10024        } && test -s conftest$ac_exeext && {
10025          test "$cross_compiling" = yes ||
10026          $as_test_x conftest$ac_exeext
10027        }; then
10028   eval "$as_ac_var=yes"
10029 else
10030   $as_echo "$as_me: failed program was:" >&5
10031 sed 's/^/| /' conftest.$ac_ext >&5
10032
10033         eval "$as_ac_var=no"
10034 fi
10035
10036 rm -rf conftest.dSYM
10037 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10038       conftest$ac_exeext conftest.$ac_ext
10039 fi
10040 ac_res=`eval 'as_val=${'$as_ac_var'}
10041                  $as_echo "$as_val"'`
10042                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10043 $as_echo "$ac_res" >&6; }
10044 as_val=`eval 'as_val=${'$as_ac_var'}
10045                  $as_echo "$as_val"'`
10046    if test "x$as_val" = x""yes; then
10047   cat >>confdefs.h <<_ACEOF
10048 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10049 _ACEOF
10050
10051 fi
10052 done
10053
10054
10055    if test $ac_cv_header_locale_h = yes; then
10056     { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
10057 $as_echo_n "checking for LC_MESSAGES... " >&6; }
10058 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
10059   $as_echo_n "(cached) " >&6
10060 else
10061   cat >conftest.$ac_ext <<_ACEOF
10062 /* confdefs.h.  */
10063 _ACEOF
10064 cat confdefs.h >>conftest.$ac_ext
10065 cat >>conftest.$ac_ext <<_ACEOF
10066 /* end confdefs.h.  */
10067 #include <locale.h>
10068 int
10069 main ()
10070 {
10071 return LC_MESSAGES
10072   ;
10073   return 0;
10074 }
10075 _ACEOF
10076 rm -rf conftest.$ac_objext conftest$ac_exeext
10077 if { (ac_try="$ac_link"
10078 case "(($ac_try" in
10079   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10080   *) ac_try_echo=$ac_try;;
10081 esac
10082 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10083 $as_echo "$ac_try_echo") >&5
10084   (eval "$ac_link") 2>conftest.er1
10085   ac_status=$?
10086   grep -v '^ *+' conftest.er1 >conftest.err
10087   rm -rf conftest.er1
10088   cat conftest.err >&5
10089   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10090   (exit $ac_status); } && {
10091          test -z "$ac_c_werror_flag" ||
10092          test ! -s conftest.err
10093        } && test -s conftest$ac_exeext && {
10094          test "$cross_compiling" = yes ||
10095          $as_test_x conftest$ac_exeext
10096        }; then
10097   am_cv_val_LC_MESSAGES=yes
10098 else
10099   $as_echo "$as_me: failed program was:" >&5
10100 sed 's/^/| /' conftest.$ac_ext >&5
10101
10102         am_cv_val_LC_MESSAGES=no
10103 fi
10104
10105 rm -rf conftest.dSYM
10106 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10107       conftest$ac_exeext conftest.$ac_ext
10108 fi
10109 { $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
10110 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
10111     if test $am_cv_val_LC_MESSAGES = yes; then
10112
10113 cat >>confdefs.h <<\_ACEOF
10114 #define HAVE_LC_MESSAGES 1
10115 _ACEOF
10116
10117     fi
10118   fi
10119      USE_NLS=yes
10120
10121
10122         nls_cv_force_use_gnu_gettext="no"
10123
10124     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
10125     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
10126                               nls_cv_header_intl=
10127       nls_cv_header_libgt=
10128       CATOBJEXT=NONE
10129
10130       if test "${ac_cv_header_libintl_h+set}" = set; then
10131   { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
10132 $as_echo_n "checking for libintl.h... " >&6; }
10133 if test "${ac_cv_header_libintl_h+set}" = set; then
10134   $as_echo_n "(cached) " >&6
10135 fi
10136 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
10137 $as_echo "$ac_cv_header_libintl_h" >&6; }
10138 else
10139   # Is the header compilable?
10140 { $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
10141 $as_echo_n "checking libintl.h usability... " >&6; }
10142 cat >conftest.$ac_ext <<_ACEOF
10143 /* confdefs.h.  */
10144 _ACEOF
10145 cat confdefs.h >>conftest.$ac_ext
10146 cat >>conftest.$ac_ext <<_ACEOF
10147 /* end confdefs.h.  */
10148 $ac_includes_default
10149 #include <libintl.h>
10150 _ACEOF
10151 rm -rf conftest.$ac_objext
10152 if { (ac_try="$ac_compile"
10153 case "(($ac_try" in
10154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10155   *) ac_try_echo=$ac_try;;
10156 esac
10157 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10158 $as_echo "$ac_try_echo") >&5
10159   (eval "$ac_compile") 2>conftest.er1
10160   ac_status=$?
10161   grep -v '^ *+' conftest.er1 >conftest.err
10162   rm -rf conftest.er1
10163   cat conftest.err >&5
10164   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10165   (exit $ac_status); } && {
10166          test -z "$ac_c_werror_flag" ||
10167          test ! -s conftest.err
10168        } && test -s conftest.$ac_objext; then
10169   ac_header_compiler=yes
10170 else
10171   $as_echo "$as_me: failed program was:" >&5
10172 sed 's/^/| /' conftest.$ac_ext >&5
10173
10174         ac_header_compiler=no
10175 fi
10176
10177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10178 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10179 $as_echo "$ac_header_compiler" >&6; }
10180
10181 # Is the header present?
10182 { $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
10183 $as_echo_n "checking libintl.h presence... " >&6; }
10184 cat >conftest.$ac_ext <<_ACEOF
10185 /* confdefs.h.  */
10186 _ACEOF
10187 cat confdefs.h >>conftest.$ac_ext
10188 cat >>conftest.$ac_ext <<_ACEOF
10189 /* end confdefs.h.  */
10190 #include <libintl.h>
10191 _ACEOF
10192 if { (ac_try="$ac_cpp conftest.$ac_ext"
10193 case "(($ac_try" in
10194   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10195   *) ac_try_echo=$ac_try;;
10196 esac
10197 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10198 $as_echo "$ac_try_echo") >&5
10199   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10200   ac_status=$?
10201   grep -v '^ *+' conftest.er1 >conftest.err
10202   rm -rf conftest.er1
10203   cat conftest.err >&5
10204   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10205   (exit $ac_status); } >/dev/null && {
10206          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10207          test ! -s conftest.err
10208        }; then
10209   ac_header_preproc=yes
10210 else
10211   $as_echo "$as_me: failed program was:" >&5
10212 sed 's/^/| /' conftest.$ac_ext >&5
10213
10214   ac_header_preproc=no
10215 fi
10216
10217 rm -rf conftest.err conftest.$ac_ext
10218 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10219 $as_echo "$ac_header_preproc" >&6; }
10220
10221 # So?  What about this header?
10222 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10223   yes:no: )
10224     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10225 $as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10226     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
10227 $as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
10228     ac_header_preproc=yes
10229     ;;
10230   no:yes:* )
10231     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
10232 $as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
10233     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
10234 $as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
10235     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
10236 $as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
10237     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
10238 $as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10239     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
10240 $as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
10241     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
10242 $as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
10243
10244     ;;
10245 esac
10246 { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
10247 $as_echo_n "checking for libintl.h... " >&6; }
10248 if test "${ac_cv_header_libintl_h+set}" = set; then
10249   $as_echo_n "(cached) " >&6
10250 else
10251   ac_cv_header_libintl_h=$ac_header_preproc
10252 fi
10253 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
10254 $as_echo "$ac_cv_header_libintl_h" >&6; }
10255
10256 fi
10257 if test "x$ac_cv_header_libintl_h" = x""yes; then
10258   { $as_echo "$as_me:$LINENO: checking for dgettext in libc" >&5
10259 $as_echo_n "checking for dgettext in libc... " >&6; }
10260 if test "${gt_cv_func_dgettext_libc+set}" = set; then
10261   $as_echo_n "(cached) " >&6
10262 else
10263   cat >conftest.$ac_ext <<_ACEOF
10264 /* confdefs.h.  */
10265 _ACEOF
10266 cat confdefs.h >>conftest.$ac_ext
10267 cat >>conftest.$ac_ext <<_ACEOF
10268 /* end confdefs.h.  */
10269 #include <libintl.h>
10270 int
10271 main ()
10272 {
10273 return (int) dgettext ("","")
10274   ;
10275   return 0;
10276 }
10277 _ACEOF
10278 rm -rf conftest.$ac_objext conftest$ac_exeext
10279 if { (ac_try="$ac_link"
10280 case "(($ac_try" in
10281   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10282   *) ac_try_echo=$ac_try;;
10283 esac
10284 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10285 $as_echo "$ac_try_echo") >&5
10286   (eval "$ac_link") 2>conftest.er1
10287   ac_status=$?
10288   grep -v '^ *+' conftest.er1 >conftest.err
10289   rm -rf conftest.er1
10290   cat conftest.err >&5
10291   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10292   (exit $ac_status); } && {
10293          test -z "$ac_c_werror_flag" ||
10294          test ! -s conftest.err
10295        } && test -s conftest$ac_exeext && {
10296          test "$cross_compiling" = yes ||
10297          $as_test_x conftest$ac_exeext
10298        }; then
10299   gt_cv_func_dgettext_libc=yes
10300 else
10301   $as_echo "$as_me: failed program was:" >&5
10302 sed 's/^/| /' conftest.$ac_ext >&5
10303
10304         gt_cv_func_dgettext_libc=no
10305 fi
10306
10307 rm -rf conftest.dSYM
10308 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10309       conftest$ac_exeext conftest.$ac_ext
10310 fi
10311 { $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
10312 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
10313
10314           if test "$gt_cv_func_dgettext_libc" != "yes"; then
10315             { $as_echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
10316 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
10317 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
10318   $as_echo_n "(cached) " >&6
10319 else
10320   ac_check_lib_save_LIBS=$LIBS
10321 LIBS="-lintl  $LIBS"
10322 cat >conftest.$ac_ext <<_ACEOF
10323 /* confdefs.h.  */
10324 _ACEOF
10325 cat confdefs.h >>conftest.$ac_ext
10326 cat >>conftest.$ac_ext <<_ACEOF
10327 /* end confdefs.h.  */
10328
10329 /* Override any GCC internal prototype to avoid an error.
10330    Use char because int might match the return type of a GCC
10331    builtin and then its argument prototype would still apply.  */
10332 #ifdef __cplusplus
10333 extern "C"
10334 #endif
10335 char bindtextdomain ();
10336 int
10337 main ()
10338 {
10339 return bindtextdomain ();
10340   ;
10341   return 0;
10342 }
10343 _ACEOF
10344 rm -rf conftest.$ac_objext conftest$ac_exeext
10345 if { (ac_try="$ac_link"
10346 case "(($ac_try" in
10347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10348   *) ac_try_echo=$ac_try;;
10349 esac
10350 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10351 $as_echo "$ac_try_echo") >&5
10352   (eval "$ac_link") 2>conftest.er1
10353   ac_status=$?
10354   grep -v '^ *+' conftest.er1 >conftest.err
10355   rm -rf conftest.er1
10356   cat conftest.err >&5
10357   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10358   (exit $ac_status); } && {
10359          test -z "$ac_c_werror_flag" ||
10360          test ! -s conftest.err
10361        } && test -s conftest$ac_exeext && {
10362          test "$cross_compiling" = yes ||
10363          $as_test_x conftest$ac_exeext
10364        }; then
10365   ac_cv_lib_intl_bindtextdomain=yes
10366 else
10367   $as_echo "$as_me: failed program was:" >&5
10368 sed 's/^/| /' conftest.$ac_ext >&5
10369
10370         ac_cv_lib_intl_bindtextdomain=no
10371 fi
10372
10373 rm -rf conftest.dSYM
10374 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10375       conftest$ac_exeext conftest.$ac_ext
10376 LIBS=$ac_check_lib_save_LIBS
10377 fi
10378 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
10379 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
10380 if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then
10381   { $as_echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
10382 $as_echo_n "checking for dgettext in libintl... " >&6; }
10383 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
10384   $as_echo_n "(cached) " >&6
10385 else
10386   { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
10387 $as_echo_n "checking for dgettext in -lintl... " >&6; }
10388 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
10389   $as_echo_n "(cached) " >&6
10390 else
10391   ac_check_lib_save_LIBS=$LIBS
10392 LIBS="-lintl  $LIBS"
10393 cat >conftest.$ac_ext <<_ACEOF
10394 /* confdefs.h.  */
10395 _ACEOF
10396 cat confdefs.h >>conftest.$ac_ext
10397 cat >>conftest.$ac_ext <<_ACEOF
10398 /* end confdefs.h.  */
10399
10400 /* Override any GCC internal prototype to avoid an error.
10401    Use char because int might match the return type of a GCC
10402    builtin and then its argument prototype would still apply.  */
10403 #ifdef __cplusplus
10404 extern "C"
10405 #endif
10406 char dgettext ();
10407 int
10408 main ()
10409 {
10410 return dgettext ();
10411   ;
10412   return 0;
10413 }
10414 _ACEOF
10415 rm -rf conftest.$ac_objext conftest$ac_exeext
10416 if { (ac_try="$ac_link"
10417 case "(($ac_try" in
10418   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10419   *) ac_try_echo=$ac_try;;
10420 esac
10421 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10422 $as_echo "$ac_try_echo") >&5
10423   (eval "$ac_link") 2>conftest.er1
10424   ac_status=$?
10425   grep -v '^ *+' conftest.er1 >conftest.err
10426   rm -rf conftest.er1
10427   cat conftest.err >&5
10428   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10429   (exit $ac_status); } && {
10430          test -z "$ac_c_werror_flag" ||
10431          test ! -s conftest.err
10432        } && test -s conftest$ac_exeext && {
10433          test "$cross_compiling" = yes ||
10434          $as_test_x conftest$ac_exeext
10435        }; then
10436   ac_cv_lib_intl_dgettext=yes
10437 else
10438   $as_echo "$as_me: failed program was:" >&5
10439 sed 's/^/| /' conftest.$ac_ext >&5
10440
10441         ac_cv_lib_intl_dgettext=no
10442 fi
10443
10444 rm -rf conftest.dSYM
10445 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10446       conftest$ac_exeext conftest.$ac_ext
10447 LIBS=$ac_check_lib_save_LIBS
10448 fi
10449 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
10450 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
10451 if test "x$ac_cv_lib_intl_dgettext" = x""yes; then
10452   gt_cv_func_dgettext_libintl=yes
10453 else
10454   gt_cv_func_dgettext_libintl=no
10455 fi
10456
10457 fi
10458 { $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
10459 $as_echo "$gt_cv_func_dgettext_libintl" >&6; }
10460 fi
10461
10462           fi
10463
10464           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
10465             LIBS="$LIBS -lintl";
10466           fi
10467
10468           if test "$gt_cv_func_dgettext_libc" = "yes" \
10469             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
10470
10471 cat >>confdefs.h <<\_ACEOF
10472 #define HAVE_GETTEXT 1
10473 _ACEOF
10474
10475             # Extract the first word of "msgfmt", so it can be a program name with args.
10476 set dummy msgfmt; ac_word=$2
10477 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10478 $as_echo_n "checking for $ac_word... " >&6; }
10479 if test "${ac_cv_path_MSGFMT+set}" = set; then
10480   $as_echo_n "(cached) " >&6
10481 else
10482   case "$MSGFMT" in
10483   /*)
10484   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
10485   ;;
10486   *)
10487   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10488   for ac_dir in $PATH; do
10489     test -z "$ac_dir" && ac_dir=.
10490     if test -f $ac_dir/$ac_word; then
10491       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
10492         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
10493         break
10494       fi
10495     fi
10496   done
10497   IFS="$ac_save_ifs"
10498   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
10499   ;;
10500 esac
10501 fi
10502 MSGFMT="$ac_cv_path_MSGFMT"
10503 if test -n "$MSGFMT"; then
10504   { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
10505 $as_echo "$MSGFMT" >&6; }
10506 else
10507   { $as_echo "$as_me:$LINENO: result: no" >&5
10508 $as_echo "no" >&6; }
10509 fi
10510             if test "$MSGFMT" != "no"; then
10511
10512 for ac_func in dcgettext
10513 do
10514 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10515 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
10516 $as_echo_n "checking for $ac_func... " >&6; }
10517 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10518   $as_echo_n "(cached) " >&6
10519 else
10520   cat >conftest.$ac_ext <<_ACEOF
10521 /* confdefs.h.  */
10522 _ACEOF
10523 cat confdefs.h >>conftest.$ac_ext
10524 cat >>conftest.$ac_ext <<_ACEOF
10525 /* end confdefs.h.  */
10526 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10527    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10528 #define $ac_func innocuous_$ac_func
10529
10530 /* System header to define __stub macros and hopefully few prototypes,
10531     which can conflict with char $ac_func (); below.
10532     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10533     <limits.h> exists even on freestanding compilers.  */
10534
10535 #ifdef __STDC__
10536 # include <limits.h>
10537 #else
10538 # include <assert.h>
10539 #endif
10540
10541 #undef $ac_func
10542
10543 /* Override any GCC internal prototype to avoid an error.
10544    Use char because int might match the return type of a GCC
10545    builtin and then its argument prototype would still apply.  */
10546 #ifdef __cplusplus
10547 extern "C"
10548 #endif
10549 char $ac_func ();
10550 /* The GNU C library defines this for functions which it implements
10551     to always fail with ENOSYS.  Some functions are actually named
10552     something starting with __ and the normal name is an alias.  */
10553 #if defined __stub_$ac_func || defined __stub___$ac_func
10554 choke me
10555 #endif
10556
10557 int
10558 main ()
10559 {
10560 return $ac_func ();
10561   ;
10562   return 0;
10563 }
10564 _ACEOF
10565 rm -rf conftest.$ac_objext conftest$ac_exeext
10566 if { (ac_try="$ac_link"
10567 case "(($ac_try" in
10568   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10569   *) ac_try_echo=$ac_try;;
10570 esac
10571 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10572 $as_echo "$ac_try_echo") >&5
10573   (eval "$ac_link") 2>conftest.er1
10574   ac_status=$?
10575   grep -v '^ *+' conftest.er1 >conftest.err
10576   rm -rf conftest.er1
10577   cat conftest.err >&5
10578   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10579   (exit $ac_status); } && {
10580          test -z "$ac_c_werror_flag" ||
10581          test ! -s conftest.err
10582        } && test -s conftest$ac_exeext && {
10583          test "$cross_compiling" = yes ||
10584          $as_test_x conftest$ac_exeext
10585        }; then
10586   eval "$as_ac_var=yes"
10587 else
10588   $as_echo "$as_me: failed program was:" >&5
10589 sed 's/^/| /' conftest.$ac_ext >&5
10590
10591         eval "$as_ac_var=no"
10592 fi
10593
10594 rm -rf conftest.dSYM
10595 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10596       conftest$ac_exeext conftest.$ac_ext
10597 fi
10598 ac_res=`eval 'as_val=${'$as_ac_var'}
10599                  $as_echo "$as_val"'`
10600                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10601 $as_echo "$ac_res" >&6; }
10602 as_val=`eval 'as_val=${'$as_ac_var'}
10603                  $as_echo "$as_val"'`
10604    if test "x$as_val" = x""yes; then
10605   cat >>confdefs.h <<_ACEOF
10606 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10607 _ACEOF
10608
10609 fi
10610 done
10611
10612               # Extract the first word of "gmsgfmt", so it can be a program name with args.
10613 set dummy gmsgfmt; ac_word=$2
10614 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10615 $as_echo_n "checking for $ac_word... " >&6; }
10616 if test "${ac_cv_path_GMSGFMT+set}" = set; then
10617   $as_echo_n "(cached) " >&6
10618 else
10619   case $GMSGFMT in
10620   [\\/]* | ?:[\\/]*)
10621   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
10622   ;;
10623   *)
10624   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10625 for as_dir in $PATH
10626 do
10627   IFS=$as_save_IFS
10628   test -z "$as_dir" && as_dir=.
10629   for ac_exec_ext in '' $ac_executable_extensions; do
10630   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10631     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
10632     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10633     break 2
10634   fi
10635 done
10636 done
10637 IFS=$as_save_IFS
10638
10639   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
10640   ;;
10641 esac
10642 fi
10643 GMSGFMT=$ac_cv_path_GMSGFMT
10644 if test -n "$GMSGFMT"; then
10645   { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
10646 $as_echo "$GMSGFMT" >&6; }
10647 else
10648   { $as_echo "$as_me:$LINENO: result: no" >&5
10649 $as_echo "no" >&6; }
10650 fi
10651
10652
10653               # Extract the first word of "xgettext", so it can be a program name with args.
10654 set dummy xgettext; ac_word=$2
10655 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
10656 $as_echo_n "checking for $ac_word... " >&6; }
10657 if test "${ac_cv_path_XGETTEXT+set}" = set; then
10658   $as_echo_n "(cached) " >&6
10659 else
10660   case "$XGETTEXT" in
10661   /*)
10662   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
10663   ;;
10664   *)
10665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10666   for ac_dir in $PATH; do
10667     test -z "$ac_dir" && ac_dir=.
10668     if test -f $ac_dir/$ac_word; then
10669       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
10670         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
10671         break
10672       fi
10673     fi
10674   done
10675   IFS="$ac_save_ifs"
10676   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
10677   ;;
10678 esac
10679 fi
10680 XGETTEXT="$ac_cv_path_XGETTEXT"
10681 if test -n "$XGETTEXT"; then
10682   { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
10683 $as_echo "$XGETTEXT" >&6; }
10684 else
10685   { $as_echo "$as_me:$LINENO: result: no" >&5
10686 $as_echo "no" >&6; }
10687 fi
10688
10689               cat >conftest.$ac_ext <<_ACEOF
10690 /* confdefs.h.  */
10691 _ACEOF
10692 cat confdefs.h >>conftest.$ac_ext
10693 cat >>conftest.$ac_ext <<_ACEOF
10694 /* end confdefs.h.  */
10695
10696 int
10697 main ()
10698 {
10699 extern int _nl_msg_cat_cntr;
10700                              return _nl_msg_cat_cntr
10701   ;
10702   return 0;
10703 }
10704 _ACEOF
10705 rm -rf conftest.$ac_objext conftest$ac_exeext
10706 if { (ac_try="$ac_link"
10707 case "(($ac_try" in
10708   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10709   *) ac_try_echo=$ac_try;;
10710 esac
10711 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10712 $as_echo "$ac_try_echo") >&5
10713   (eval "$ac_link") 2>conftest.er1
10714   ac_status=$?
10715   grep -v '^ *+' conftest.er1 >conftest.err
10716   rm -rf conftest.er1
10717   cat conftest.err >&5
10718   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10719   (exit $ac_status); } && {
10720          test -z "$ac_c_werror_flag" ||
10721          test ! -s conftest.err
10722        } && test -s conftest$ac_exeext && {
10723          test "$cross_compiling" = yes ||
10724          $as_test_x conftest$ac_exeext
10725        }; then
10726   CATOBJEXT=.gmo
10727                  DATADIRNAME=share
10728 else
10729   $as_echo "$as_me: failed program was:" >&5
10730 sed 's/^/| /' conftest.$ac_ext >&5
10731
10732         CATOBJEXT=.mo
10733                  DATADIRNAME=lib
10734 fi
10735
10736 rm -rf conftest.dSYM
10737 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10738       conftest$ac_exeext conftest.$ac_ext
10739               INSTOBJEXT=.mo
10740             fi
10741           fi
10742
10743           # Added by Martin Baulig 12/15/98 for libc5 systems
10744           if test "$gt_cv_func_dgettext_libc" != "yes" \
10745             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
10746             INTLLIBS=-lintl
10747             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
10748           fi
10749
10750 fi
10751
10752
10753
10754       if test "$CATOBJEXT" = "NONE"; then
10755                         nls_cv_use_gnu_gettext=yes
10756       fi
10757     fi
10758
10759     if test "$nls_cv_use_gnu_gettext" != "yes"; then
10760
10761 cat >>confdefs.h <<\_ACEOF
10762 #define ENABLE_NLS 1
10763 _ACEOF
10764
10765     else
10766             CATOBJEXT=
10767     fi
10768
10769         if test "$XGETTEXT" != ":"; then
10770                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
10771         : ;
10772       else
10773         { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
10774 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
10775         XGETTEXT=":"
10776       fi
10777     fi
10778
10779     # We need to process the po/ directory.
10780     POSUB=po
10781
10782     ac_config_commands="$ac_config_commands default-2"
10783
10784
10785                 for lang in $ALL_LINGUAS; do
10786       GMOFILES="$GMOFILES $lang.gmo"
10787       POFILES="$POFILES $lang.po"
10788     done
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802    if test "x$CATOBJEXT" != "x"; then
10803      if test "x$ALL_LINGUAS" = "x"; then
10804        LINGUAS=
10805      else
10806        { $as_echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
10807 $as_echo_n "checking for catalogs to be installed... " >&6; }
10808        NEW_LINGUAS=
10809        for lang in ${LINGUAS=$ALL_LINGUAS}; do
10810          case "$ALL_LINGUAS" in
10811           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
10812          esac
10813        done
10814        LINGUAS=$NEW_LINGUAS
10815        { $as_echo "$as_me:$LINENO: result: $LINGUAS" >&5
10816 $as_echo "$LINGUAS" >&6; }
10817      fi
10818
10819           if test -n "$LINGUAS"; then
10820        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
10821      fi
10822    fi
10823
10824             test -d po || mkdir po
10825    if test "$CATOBJEXT" = ".cat"; then
10826      if test "${ac_cv_header_linux_version_h+set}" = set; then
10827   { $as_echo "$as_me:$LINENO: checking for linux/version.h" >&5
10828 $as_echo_n "checking for linux/version.h... " >&6; }
10829 if test "${ac_cv_header_linux_version_h+set}" = set; then
10830   $as_echo_n "(cached) " >&6
10831 fi
10832 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10833 $as_echo "$ac_cv_header_linux_version_h" >&6; }
10834 else
10835   # Is the header compilable?
10836 { $as_echo "$as_me:$LINENO: checking linux/version.h usability" >&5
10837 $as_echo_n "checking linux/version.h usability... " >&6; }
10838 cat >conftest.$ac_ext <<_ACEOF
10839 /* confdefs.h.  */
10840 _ACEOF
10841 cat confdefs.h >>conftest.$ac_ext
10842 cat >>conftest.$ac_ext <<_ACEOF
10843 /* end confdefs.h.  */
10844 $ac_includes_default
10845 #include <linux/version.h>
10846 _ACEOF
10847 rm -rf conftest.$ac_objext
10848 if { (ac_try="$ac_compile"
10849 case "(($ac_try" in
10850   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10851   *) ac_try_echo=$ac_try;;
10852 esac
10853 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10854 $as_echo "$ac_try_echo") >&5
10855   (eval "$ac_compile") 2>conftest.er1
10856   ac_status=$?
10857   grep -v '^ *+' conftest.er1 >conftest.err
10858   rm -rf conftest.er1
10859   cat conftest.err >&5
10860   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10861   (exit $ac_status); } && {
10862          test -z "$ac_c_werror_flag" ||
10863          test ! -s conftest.err
10864        } && test -s conftest.$ac_objext; then
10865   ac_header_compiler=yes
10866 else
10867   $as_echo "$as_me: failed program was:" >&5
10868 sed 's/^/| /' conftest.$ac_ext >&5
10869
10870         ac_header_compiler=no
10871 fi
10872
10873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10874 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10875 $as_echo "$ac_header_compiler" >&6; }
10876
10877 # Is the header present?
10878 { $as_echo "$as_me:$LINENO: checking linux/version.h presence" >&5
10879 $as_echo_n "checking linux/version.h presence... " >&6; }
10880 cat >conftest.$ac_ext <<_ACEOF
10881 /* confdefs.h.  */
10882 _ACEOF
10883 cat confdefs.h >>conftest.$ac_ext
10884 cat >>conftest.$ac_ext <<_ACEOF
10885 /* end confdefs.h.  */
10886 #include <linux/version.h>
10887 _ACEOF
10888 if { (ac_try="$ac_cpp conftest.$ac_ext"
10889 case "(($ac_try" in
10890   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10891   *) ac_try_echo=$ac_try;;
10892 esac
10893 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10894 $as_echo "$ac_try_echo") >&5
10895   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10896   ac_status=$?
10897   grep -v '^ *+' conftest.er1 >conftest.err
10898   rm -rf conftest.er1
10899   cat conftest.err >&5
10900   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10901   (exit $ac_status); } >/dev/null && {
10902          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10903          test ! -s conftest.err
10904        }; then
10905   ac_header_preproc=yes
10906 else
10907   $as_echo "$as_me: failed program was:" >&5
10908 sed 's/^/| /' conftest.$ac_ext >&5
10909
10910   ac_header_preproc=no
10911 fi
10912
10913 rm -rf conftest.err conftest.$ac_ext
10914 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10915 $as_echo "$ac_header_preproc" >&6; }
10916
10917 # So?  What about this header?
10918 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10919   yes:no: )
10920     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
10921 $as_echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10922     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
10923 $as_echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
10924     ac_header_preproc=yes
10925     ;;
10926   no:yes:* )
10927     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
10928 $as_echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
10929     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
10930 $as_echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
10931     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
10932 $as_echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
10933     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
10934 $as_echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10935     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
10936 $as_echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
10937     { $as_echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
10938 $as_echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
10939
10940     ;;
10941 esac
10942 { $as_echo "$as_me:$LINENO: checking for linux/version.h" >&5
10943 $as_echo_n "checking for linux/version.h... " >&6; }
10944 if test "${ac_cv_header_linux_version_h+set}" = set; then
10945   $as_echo_n "(cached) " >&6
10946 else
10947   ac_cv_header_linux_version_h=$ac_header_preproc
10948 fi
10949 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10950 $as_echo "$ac_cv_header_linux_version_h" >&6; }
10951
10952 fi
10953 if test "x$ac_cv_header_linux_version_h" = x""yes; then
10954   msgformat=linux
10955 else
10956   msgformat=xopen
10957 fi
10958
10959
10960
10961                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
10962    fi
10963
10964             MKINSTALLDIRS=
10965 #
10966 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
10967 #
10968 #   if test -n "$ac_aux_dir"; then
10969 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10970 #   fi
10971    if test -z "$MKINSTALLDIRS"; then
10972      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10973    fi
10974
10975    # jwz: you know what, screw it.  Let's just use the version that I
10976    # already computed in configure.in, instead of this version that came
10977    # with the i18n crud, ok?
10978    MKINSTALLDIRS="$INSTALL_DIRS"
10979
10980
10981
10982
10983          test -d po || mkdir po
10984    if test "x$srcdir" != "x."; then
10985      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10986        posrcprefix="$srcdir/"
10987      else
10988        posrcprefix="../$srcdir/"
10989      fi
10990    else
10991      posrcprefix="../"
10992    fi
10993    rm -f po/POTFILES
10994    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10995         < $srcdir/po/POTFILES.in > po/POTFILES
10996
10997 MKINSTALLDIRS="$INSTALL_DIRS"
10998
10999
11000 ###############################################################################
11001 #
11002 #       Check for -lXmu (some fucked up vendors don't ship it...)
11003 #
11004 ###############################################################################
11005
11006 have_xmu=no
11007
11008   ac_save_CPPFLAGS="$CPPFLAGS"
11009   if test \! -z "$includedir" ; then
11010     CPPFLAGS="$CPPFLAGS -I$includedir"
11011   fi
11012   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11013   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11014   { $as_echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
11015 $as_echo_n "checking for X11/Xmu/Error.h... " >&6; }
11016 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
11017   $as_echo_n "(cached) " >&6
11018 else
11019   cat >conftest.$ac_ext <<_ACEOF
11020 /* confdefs.h.  */
11021 _ACEOF
11022 cat confdefs.h >>conftest.$ac_ext
11023 cat >>conftest.$ac_ext <<_ACEOF
11024 /* end confdefs.h.  */
11025 #include <stdlib.h>
11026                    #include <stdio.h>
11027                    #include <X11/Intrinsic.h>
11028
11029 #include <X11/Xmu/Error.h>
11030 _ACEOF
11031 rm -rf conftest.$ac_objext
11032 if { (ac_try="$ac_compile"
11033 case "(($ac_try" in
11034   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11035   *) ac_try_echo=$ac_try;;
11036 esac
11037 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11038 $as_echo "$ac_try_echo") >&5
11039   (eval "$ac_compile") 2>conftest.er1
11040   ac_status=$?
11041   grep -v '^ *+' conftest.er1 >conftest.err
11042   rm -rf conftest.er1
11043   cat conftest.err >&5
11044   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11045   (exit $ac_status); } && {
11046          test -z "$ac_c_werror_flag" ||
11047          test ! -s conftest.err
11048        } && test -s conftest.$ac_objext; then
11049   ac_cv_header_X11_Xmu_Error_h=yes
11050 else
11051   $as_echo "$as_me: failed program was:" >&5
11052 sed 's/^/| /' conftest.$ac_ext >&5
11053
11054         ac_cv_header_X11_Xmu_Error_h=no
11055 fi
11056
11057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11058 fi
11059 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
11060 $as_echo "$ac_cv_header_X11_Xmu_Error_h" >&6; }
11061 if test "x$ac_cv_header_X11_Xmu_Error_h" = x""yes; then
11062   have_xmu=yes
11063 fi
11064
11065
11066   CPPFLAGS="$ac_save_CPPFLAGS"
11067 if test "$have_xmu" = no ; then
11068   XMU_SRCS='$(UTILS_SRC)/xmu.c'
11069   XMU_OBJS='$(UTILS_BIN)/xmu.o'
11070   XMU_LIBS=''
11071 else
11072   XMU_SRCS=''
11073   XMU_OBJS=''
11074   XMU_LIBS='-lXmu'
11075   cat >>confdefs.h <<\_ACEOF
11076 #define HAVE_XMU 1
11077 _ACEOF
11078
11079 fi
11080
11081
11082 ###############################################################################
11083 #
11084 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
11085 #       See comp.windows.x FAQ question 124.  The right fix is to
11086 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
11087 #
11088 ###############################################################################
11089
11090 if test "$have_xmu" = yes ; then
11091   case "$host" in
11092     *-sunos4*)
11093     { $as_echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
11094 $as_echo_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... " >&6; }
11095 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
11096   $as_echo_n "(cached) " >&6
11097 else
11098   ac_save_LDFLAGS="$LDFLAGS"
11099                     if test \! -z "$x_libraries" ; then
11100                       LDFLAGS="$LDFLAGS -L$x_libraries"
11101                     fi
11102                     # Note: this trick never works!  (Generally.)
11103                     # We're only getting away with using AC_TRY_LINK
11104                     # with X libraries because we know it's SunOS.
11105                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
11106                     cat >conftest.$ac_ext <<_ACEOF
11107 /* confdefs.h.  */
11108 _ACEOF
11109 cat confdefs.h >>conftest.$ac_ext
11110 cat >>conftest.$ac_ext <<_ACEOF
11111 /* end confdefs.h.  */
11112
11113 int
11114 main ()
11115 {
11116
11117   ;
11118   return 0;
11119 }
11120 _ACEOF
11121 rm -rf conftest.$ac_objext conftest$ac_exeext
11122 if { (ac_try="$ac_link"
11123 case "(($ac_try" in
11124   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11125   *) ac_try_echo=$ac_try;;
11126 esac
11127 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11128 $as_echo "$ac_try_echo") >&5
11129   (eval "$ac_link") 2>conftest.er1
11130   ac_status=$?
11131   grep -v '^ *+' conftest.er1 >conftest.err
11132   rm -rf conftest.er1
11133   cat conftest.err >&5
11134   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11135   (exit $ac_status); } && {
11136          test -z "$ac_c_werror_flag" ||
11137          test ! -s conftest.err
11138        } && test -s conftest$ac_exeext && {
11139          test "$cross_compiling" = yes ||
11140          $as_test_x conftest$ac_exeext
11141        }; then
11142   ac_cv_sunos_xmu_bug=no
11143 else
11144   $as_echo "$as_me: failed program was:" >&5
11145 sed 's/^/| /' conftest.$ac_ext >&5
11146
11147         ac_cv_sunos_xmu_bug=yes
11148 fi
11149
11150 rm -rf conftest.dSYM
11151 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11152       conftest$ac_exeext conftest.$ac_ext
11153                     LDFLAGS="$ac_save_LDFLAGS"
11154 fi
11155 { $as_echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
11156 $as_echo "$ac_cv_sunos_xmu_bug" >&6; }
11157     if test "$ac_cv_sunos_xmu_bug" = yes ; then
11158       { $as_echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
11159 $as_echo_n "checking whether the compiler understands -static... " >&6; }
11160 if test "${ac_cv_ld_static+set}" = set; then
11161   $as_echo_n "(cached) " >&6
11162 else
11163   ac_save_LDFLAGS="$LDFLAGS"
11164                       LDFLAGS="$LDFLAGS -static"
11165                       cat >conftest.$ac_ext <<_ACEOF
11166 /* confdefs.h.  */
11167 _ACEOF
11168 cat confdefs.h >>conftest.$ac_ext
11169 cat >>conftest.$ac_ext <<_ACEOF
11170 /* end confdefs.h.  */
11171
11172 int
11173 main ()
11174 {
11175
11176   ;
11177   return 0;
11178 }
11179 _ACEOF
11180 rm -rf conftest.$ac_objext conftest$ac_exeext
11181 if { (ac_try="$ac_link"
11182 case "(($ac_try" in
11183   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11184   *) ac_try_echo=$ac_try;;
11185 esac
11186 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11187 $as_echo "$ac_try_echo") >&5
11188   (eval "$ac_link") 2>conftest.er1
11189   ac_status=$?
11190   grep -v '^ *+' conftest.er1 >conftest.err
11191   rm -rf conftest.er1
11192   cat conftest.err >&5
11193   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194   (exit $ac_status); } && {
11195          test -z "$ac_c_werror_flag" ||
11196          test ! -s conftest.err
11197        } && test -s conftest$ac_exeext && {
11198          test "$cross_compiling" = yes ||
11199          $as_test_x conftest$ac_exeext
11200        }; then
11201   ac_cv_ld_static=yes
11202 else
11203   $as_echo "$as_me: failed program was:" >&5
11204 sed 's/^/| /' conftest.$ac_ext >&5
11205
11206         ac_cv_ld_static=no
11207 fi
11208
11209 rm -rf conftest.dSYM
11210 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11211       conftest$ac_exeext conftest.$ac_ext
11212                     LDFLAGS="$ac_save_LDFLAGS"
11213 fi
11214 { $as_echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
11215 $as_echo "$ac_cv_ld_static" >&6; }
11216       if test "$ac_cv_ld_static" = yes ; then
11217         LDFLAGS="$LDFLAGS -static"
11218       else
11219         LDFLAGS="$LDFLAGS -Bstatic"
11220       fi
11221     fi
11222     ;;
11223   esac
11224 fi
11225
11226
11227 ###############################################################################
11228 #
11229 #       Handle the --with-hackdir option
11230 #
11231 ###############################################################################
11232
11233 have_hackdir=yes
11234 with_hackdir_req=unspecified
11235
11236 # Check whether --with-hackdir was given.
11237 if test "${with_hackdir+set}" = set; then
11238   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
11239 else
11240   with_hackdir=yes
11241 fi
11242
11243
11244 if test x"$with_hackdir" = xyes; then
11245   HACKDIR='${libexecdir}/xscreensaver'
11246 elif test x"$with_hackdir" = xno; then
11247   HACKDIR='${bindir}'
11248 else
11249   HACKDIR=$with_hackdir
11250 fi
11251
11252 # canonicalize slashes.
11253 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
11254
11255 # Expand HACKDIR as HACKDIR_FULL
11256 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
11257
11258 # This option used to be called --enable-subdir; make sure that is no longer
11259 # used, since configure brain-damagedly ignores unknown --enable options.
11260
11261 obsolete_enable=
11262 # Check whether --enable-subdir was given.
11263 if test "${enable_subdir+set}" = set; then
11264   enableval=$enable_subdir; obsolete_enable=yes
11265 fi
11266
11267 if test -n "$obsolete_enable"; then
11268   echo "error: the --enable-subdir option has been replaced with"
11269   echo "       the new --with-hackdir option; see \`configure --help'"
11270   echo "       for more information."
11271   exit 1
11272 fi
11273
11274
11275 ###############################################################################
11276 #
11277 #       Handle the --with-configdir option
11278 #       Help for --with-x-app-defaults option added.
11279 #
11280 ###############################################################################
11281
11282 have_configdir=yes
11283 with_configdir_req=unspecified
11284
11285 # Check whether --with-configdir was given.
11286 if test "${with_configdir+set}" = set; then
11287   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
11288 else
11289   with_configdir=yes
11290 fi
11291
11292
11293 if test x"$with_configdir" = xyes; then
11294   HACK_CONF_DIR='${datadir}/xscreensaver/config'
11295 elif test x"$with_configdir" = xno; then
11296   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
11297   exit 1
11298 else
11299   # there must be a better way than this...
11300   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
11301     # absolute path
11302     HACK_CONF_DIR=$with_configdir
11303   else
11304     # relative path
11305     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
11306   fi
11307 fi
11308
11309
11310
11311
11312 ###############################################################################
11313 #
11314 #       Check for the SGI SCREEN_SAVER server extension.
11315 #
11316 ###############################################################################
11317
11318 #have_sgi=no
11319 #with_sgi_req=unspecified
11320 #AC_ARG_WITH(sgi-ext,
11321 #[Except where noted, all of the --with options below can also take a
11322 #directory argument: for example, `--with-motif=/opt/Motif'.  That would
11323 #cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
11324 #to be added to the -L list, assuming those directories exist.
11325 #
11326 #By default, support for each of these options will be built in, if the
11327 #relevant library routines exist.  At run time, they will then be used
11328 #only if the X server being used supports them.  Each --with option has
11329 #a corresponding --without option, to override building support for them
11330 #at all.
11331 #
11332 #Screen blanking and idle-detection options:
11333 #
11334 #  --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.],
11335 #  [with_sgi="$withval"; with_sgi_req="$withval"],[with_sgi=yes])
11336 #
11337 #HANDLE_X_PATH_ARG(with_sgi, --with-sgi-ext, SGI SCREEN_SAVER)
11338 #
11339 #if test "$with_sgi" = yes; then
11340 #  AC_CHECK_X_HEADER(X11/extensions/XScreenSaver.h,
11341 #                    [have_sgi=yes
11342 #                     AC_DEFINE(HAVE_SGI_SAVER_EXTENSION)],,
11343 #                    [#include <X11/Xlib.h>])
11344 #
11345 #elif test "$with_sgi" != no; then
11346 #  echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
11347 #  exit 1
11348 #fi
11349
11350
11351 ###############################################################################
11352 #
11353 #       Check for the XIDLE server extension.
11354 #
11355 ###############################################################################
11356
11357 #have_xidle=no
11358 #with_xidle_req=unspecified
11359 #AC_ARG_WITH(xidle-ext,
11360 #[  --with-xidle-ext        Include support for the XIDLE extension.],
11361 #  [with_xidle="$withval"; with_xidle_req="$withval"],[with_xidle=yes])
11362 #
11363 #HANDLE_X_PATH_ARG(with_xidle, --with-xidle-ext, XIDLE)
11364 #
11365 #if test "$with_xidle" = yes; then
11366 #  AC_CHECK_X_HEADER(X11/extensions/xidle.h,
11367 #                    [have_xidle=yes
11368 #                     AC_DEFINE(HAVE_XIDLE_EXTENSION)],,
11369 #                    [#include <X11/Xlib.h>])
11370 #elif test "$with_xidle" != no; then
11371 #  echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
11372 #  exit 1
11373 #fi
11374
11375
11376 ###############################################################################
11377 #
11378 #       Check for the SGI-VIDEO-CONTROL server extension.
11379 #
11380 ###############################################################################
11381
11382 #have_sgivc=no
11383 #with_sgivc_req=unspecified
11384 #AC_ARG_WITH(sgivc-ext,
11385 #[  --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.],
11386 #  [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
11387 #
11388 #HANDLE_X_PATH_ARG(with_sgivc, --with-sgivc-ext, SGI-VIDEO-CONTROL)
11389 #
11390 #if test "$with_sgivc" = yes; then
11391 #
11392 #  # first check for XSGIvc.h
11393 #  AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes],,
11394 #                    [#include <X11/Xlib.h>])
11395 #
11396 #  # if that succeeded, then check for the -lXsgivc
11397 #  if test "$have_sgivc" = yes; then
11398 #    have_sgivc=no
11399 #    AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
11400 #                  [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [true],
11401 #                  -lXext -lX11)
11402 #  fi
11403 #
11404 #  # if that succeeded, then we've really got it.
11405 #  if test "$have_sgivc" = yes; then
11406 #    AC_DEFINE(HAVE_SGI_VC_EXTENSION)
11407 #  fi
11408 #
11409 #elif test "$with_sgivc" != no; then
11410 #  echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
11411 #  exit 1
11412 #fi
11413
11414
11415 ###############################################################################
11416 #
11417 #       Check for the DPMS server extension.
11418 #
11419 ###############################################################################
11420
11421 have_dpms=no
11422 with_dpms_req=unspecified
11423
11424 # Check whether --with-dpms-ext was given.
11425 if test "${with_dpms_ext+set}" = set; then
11426   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
11427 else
11428   with_dpms=yes
11429 fi
11430
11431
11432
11433    case "$with_dpms" in
11434     yes) ;;
11435     no)  ;;
11436
11437     /*)
11438      { $as_echo "$as_me:$LINENO: checking for DPMS headers" >&5
11439 $as_echo_n "checking for DPMS headers... " >&6; }
11440      d=$with_dpms/include
11441      if test -d $d; then
11442        X_CFLAGS="-I$d $X_CFLAGS"
11443        { $as_echo "$as_me:$LINENO: result: $d" >&5
11444 $as_echo "$d" >&6; }
11445      else
11446        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11447 $as_echo "not found ($d: no such directory)" >&6; }
11448      fi
11449
11450      { $as_echo "$as_me:$LINENO: checking for DPMS libs" >&5
11451 $as_echo_n "checking for DPMS libs... " >&6; }
11452      d=$with_dpms/lib
11453      if test -d $d; then
11454        X_LIBS="-L$d $X_LIBS"
11455        { $as_echo "$as_me:$LINENO: result: $d" >&5
11456 $as_echo "$d" >&6; }
11457      else
11458        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11459 $as_echo "not found ($d: no such directory)" >&6; }
11460      fi
11461
11462      # replace the directory string with "yes".
11463      with_dpms_req="yes"
11464      with_dpms=$with_dpms_req
11465      ;;
11466
11467     *)
11468      echo ""
11469      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
11470      echo "       If it is a directory, then \`DIR/include' will be added to"
11471      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11472      exit 1
11473      ;;
11474    esac
11475
11476
11477 if test "$with_dpms" = yes; then
11478
11479   # first check for dpms.h
11480
11481   ac_save_CPPFLAGS="$CPPFLAGS"
11482   if test \! -z "$includedir" ; then
11483     CPPFLAGS="$CPPFLAGS -I$includedir"
11484   fi
11485   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11486   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11487   { $as_echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
11488 $as_echo_n "checking for X11/extensions/dpms.h... " >&6; }
11489 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
11490   $as_echo_n "(cached) " >&6
11491 else
11492   cat >conftest.$ac_ext <<_ACEOF
11493 /* confdefs.h.  */
11494 _ACEOF
11495 cat confdefs.h >>conftest.$ac_ext
11496 cat >>conftest.$ac_ext <<_ACEOF
11497 /* end confdefs.h.  */
11498 #include <X11/Xlib.h>
11499                      #include <X11/Xmd.h>
11500
11501 #include <X11/extensions/dpms.h>
11502 _ACEOF
11503 rm -rf conftest.$ac_objext
11504 if { (ac_try="$ac_compile"
11505 case "(($ac_try" in
11506   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11507   *) ac_try_echo=$ac_try;;
11508 esac
11509 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11510 $as_echo "$ac_try_echo") >&5
11511   (eval "$ac_compile") 2>conftest.er1
11512   ac_status=$?
11513   grep -v '^ *+' conftest.er1 >conftest.err
11514   rm -rf conftest.er1
11515   cat conftest.err >&5
11516   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11517   (exit $ac_status); } && {
11518          test -z "$ac_c_werror_flag" ||
11519          test ! -s conftest.err
11520        } && test -s conftest.$ac_objext; then
11521   ac_cv_header_X11_extensions_dpms_h=yes
11522 else
11523   $as_echo "$as_me: failed program was:" >&5
11524 sed 's/^/| /' conftest.$ac_ext >&5
11525
11526         ac_cv_header_X11_extensions_dpms_h=no
11527 fi
11528
11529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11530 fi
11531 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
11532 $as_echo "$ac_cv_header_X11_extensions_dpms_h" >&6; }
11533 if test "x$ac_cv_header_X11_extensions_dpms_h" = x""yes; then
11534   have_dpms=yes
11535 fi
11536
11537
11538   CPPFLAGS="$ac_save_CPPFLAGS"
11539
11540   # if that succeeded, then check for the DPMS code in the libraries
11541   if test "$have_dpms" = yes; then
11542
11543     # first look in -lXext (this is where it is with XFree86 4.0)
11544     have_dpms=no
11545
11546   ac_save_CPPFLAGS="$CPPFLAGS"
11547   ac_save_LDFLAGS="$LDFLAGS"
11548 #  ac_save_LIBS="$LIBS"
11549
11550   if test \! -z "$includedir" ; then
11551     CPPFLAGS="$CPPFLAGS -I$includedir"
11552   fi
11553   # note: $X_CFLAGS includes $x_includes
11554   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11555
11556   if test \! -z "$libdir" ; then
11557     LDFLAGS="$LDFLAGS -L$libdir"
11558   fi
11559   # note: $X_LIBS includes $x_libraries
11560   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11561
11562   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11563   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11564   { $as_echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
11565 $as_echo_n "checking for DPMSInfo in -lXext... " >&6; }
11566 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
11567   $as_echo_n "(cached) " >&6
11568 else
11569   ac_check_lib_save_LIBS=$LIBS
11570 LIBS="-lXext -lXext -lX11 $LIBS"
11571 cat >conftest.$ac_ext <<_ACEOF
11572 /* confdefs.h.  */
11573 _ACEOF
11574 cat confdefs.h >>conftest.$ac_ext
11575 cat >>conftest.$ac_ext <<_ACEOF
11576 /* end confdefs.h.  */
11577
11578 /* Override any GCC internal prototype to avoid an error.
11579    Use char because int might match the return type of a GCC
11580    builtin and then its argument prototype would still apply.  */
11581 #ifdef __cplusplus
11582 extern "C"
11583 #endif
11584 char DPMSInfo ();
11585 int
11586 main ()
11587 {
11588 return DPMSInfo ();
11589   ;
11590   return 0;
11591 }
11592 _ACEOF
11593 rm -rf conftest.$ac_objext conftest$ac_exeext
11594 if { (ac_try="$ac_link"
11595 case "(($ac_try" in
11596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11597   *) ac_try_echo=$ac_try;;
11598 esac
11599 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11600 $as_echo "$ac_try_echo") >&5
11601   (eval "$ac_link") 2>conftest.er1
11602   ac_status=$?
11603   grep -v '^ *+' conftest.er1 >conftest.err
11604   rm -rf conftest.er1
11605   cat conftest.err >&5
11606   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11607   (exit $ac_status); } && {
11608          test -z "$ac_c_werror_flag" ||
11609          test ! -s conftest.err
11610        } && test -s conftest$ac_exeext && {
11611          test "$cross_compiling" = yes ||
11612          $as_test_x conftest$ac_exeext
11613        }; then
11614   ac_cv_lib_Xext_DPMSInfo=yes
11615 else
11616   $as_echo "$as_me: failed program was:" >&5
11617 sed 's/^/| /' conftest.$ac_ext >&5
11618
11619         ac_cv_lib_Xext_DPMSInfo=no
11620 fi
11621
11622 rm -rf conftest.dSYM
11623 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11624       conftest$ac_exeext conftest.$ac_ext
11625 LIBS=$ac_check_lib_save_LIBS
11626 fi
11627 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
11628 $as_echo "$ac_cv_lib_Xext_DPMSInfo" >&6; }
11629 if test "x$ac_cv_lib_Xext_DPMSInfo" = x""yes; then
11630   have_dpms=yes
11631 else
11632   true
11633 fi
11634
11635   CPPFLAGS="$ac_save_CPPFLAGS"
11636   LDFLAGS="$ac_save_LDFLAGS"
11637 #  LIBS="$ac_save_LIBS"
11638
11639
11640     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
11641     if test "$have_dpms" = no; then
11642
11643   ac_save_CPPFLAGS="$CPPFLAGS"
11644   ac_save_LDFLAGS="$LDFLAGS"
11645 #  ac_save_LIBS="$LIBS"
11646
11647   if test \! -z "$includedir" ; then
11648     CPPFLAGS="$CPPFLAGS -I$includedir"
11649   fi
11650   # note: $X_CFLAGS includes $x_includes
11651   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11652
11653   if test \! -z "$libdir" ; then
11654     LDFLAGS="$LDFLAGS -L$libdir"
11655   fi
11656   # note: $X_LIBS includes $x_libraries
11657   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11658
11659   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11660   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11661   { $as_echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11662 $as_echo_n "checking for DPMSInfo in -lXdpms... " >&6; }
11663 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11664   $as_echo_n "(cached) " >&6
11665 else
11666   ac_check_lib_save_LIBS=$LIBS
11667 LIBS="-lXdpms -lXext -lX11 $LIBS"
11668 cat >conftest.$ac_ext <<_ACEOF
11669 /* confdefs.h.  */
11670 _ACEOF
11671 cat confdefs.h >>conftest.$ac_ext
11672 cat >>conftest.$ac_ext <<_ACEOF
11673 /* end confdefs.h.  */
11674
11675 /* Override any GCC internal prototype to avoid an error.
11676    Use char because int might match the return type of a GCC
11677    builtin and then its argument prototype would still apply.  */
11678 #ifdef __cplusplus
11679 extern "C"
11680 #endif
11681 char DPMSInfo ();
11682 int
11683 main ()
11684 {
11685 return DPMSInfo ();
11686   ;
11687   return 0;
11688 }
11689 _ACEOF
11690 rm -rf conftest.$ac_objext conftest$ac_exeext
11691 if { (ac_try="$ac_link"
11692 case "(($ac_try" in
11693   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11694   *) ac_try_echo=$ac_try;;
11695 esac
11696 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11697 $as_echo "$ac_try_echo") >&5
11698   (eval "$ac_link") 2>conftest.er1
11699   ac_status=$?
11700   grep -v '^ *+' conftest.er1 >conftest.err
11701   rm -rf conftest.er1
11702   cat conftest.err >&5
11703   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11704   (exit $ac_status); } && {
11705          test -z "$ac_c_werror_flag" ||
11706          test ! -s conftest.err
11707        } && test -s conftest$ac_exeext && {
11708          test "$cross_compiling" = yes ||
11709          $as_test_x conftest$ac_exeext
11710        }; then
11711   ac_cv_lib_Xdpms_DPMSInfo=yes
11712 else
11713   $as_echo "$as_me: failed program was:" >&5
11714 sed 's/^/| /' conftest.$ac_ext >&5
11715
11716         ac_cv_lib_Xdpms_DPMSInfo=no
11717 fi
11718
11719 rm -rf conftest.dSYM
11720 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11721       conftest$ac_exeext conftest.$ac_ext
11722 LIBS=$ac_check_lib_save_LIBS
11723 fi
11724 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11725 $as_echo "$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11726 if test "x$ac_cv_lib_Xdpms_DPMSInfo" = x""yes; then
11727   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11728 else
11729   true
11730 fi
11731
11732   CPPFLAGS="$ac_save_CPPFLAGS"
11733   LDFLAGS="$ac_save_LDFLAGS"
11734 #  LIBS="$ac_save_LIBS"
11735
11736     fi
11737   fi
11738
11739
11740   # if that succeeded, then we've really got it.
11741   if test "$have_dpms" = yes; then
11742     cat >>confdefs.h <<\_ACEOF
11743 #define HAVE_DPMS_EXTENSION 1
11744 _ACEOF
11745
11746   fi
11747
11748 elif test "$with_dpms" != no; then
11749   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11750   exit 1
11751 fi
11752
11753
11754 ###############################################################################
11755 #
11756 #       Check for the XINERAMA server extension.
11757 #
11758 ###############################################################################
11759
11760 have_xinerama=no
11761 with_xinerama_req=unspecified
11762
11763 # Check whether --with-xinerama-ext was given.
11764 if test "${with_xinerama_ext+set}" = set; then
11765   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11766 else
11767   with_xinerama=yes
11768 fi
11769
11770
11771
11772    case "$with_xinerama" in
11773     yes) ;;
11774     no)  ;;
11775
11776     /*)
11777      { $as_echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11778 $as_echo_n "checking for XINERAMA headers... " >&6; }
11779      d=$with_xinerama/include
11780      if test -d $d; then
11781        X_CFLAGS="-I$d $X_CFLAGS"
11782        { $as_echo "$as_me:$LINENO: result: $d" >&5
11783 $as_echo "$d" >&6; }
11784      else
11785        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11786 $as_echo "not found ($d: no such directory)" >&6; }
11787      fi
11788
11789      { $as_echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11790 $as_echo_n "checking for XINERAMA libs... " >&6; }
11791      d=$with_xinerama/lib
11792      if test -d $d; then
11793        X_LIBS="-L$d $X_LIBS"
11794        { $as_echo "$as_me:$LINENO: result: $d" >&5
11795 $as_echo "$d" >&6; }
11796      else
11797        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11798 $as_echo "not found ($d: no such directory)" >&6; }
11799      fi
11800
11801      # replace the directory string with "yes".
11802      with_xinerama_req="yes"
11803      with_xinerama=$with_xinerama_req
11804      ;;
11805
11806     *)
11807      echo ""
11808      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11809      echo "       If it is a directory, then \`DIR/include' will be added to"
11810      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11811      exit 1
11812      ;;
11813    esac
11814
11815
11816 if test "$with_xinerama" = yes; then
11817
11818   # first check for Xinerama.h
11819
11820   ac_save_CPPFLAGS="$CPPFLAGS"
11821   if test \! -z "$includedir" ; then
11822     CPPFLAGS="$CPPFLAGS -I$includedir"
11823   fi
11824   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11825   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11826   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11827 $as_echo_n "checking for X11/extensions/Xinerama.h... " >&6; }
11828 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11829   $as_echo_n "(cached) " >&6
11830 else
11831   cat >conftest.$ac_ext <<_ACEOF
11832 /* confdefs.h.  */
11833 _ACEOF
11834 cat confdefs.h >>conftest.$ac_ext
11835 cat >>conftest.$ac_ext <<_ACEOF
11836 /* end confdefs.h.  */
11837 #include <X11/Xlib.h>
11838
11839 #include <X11/extensions/Xinerama.h>
11840 _ACEOF
11841 rm -rf conftest.$ac_objext
11842 if { (ac_try="$ac_compile"
11843 case "(($ac_try" in
11844   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11845   *) ac_try_echo=$ac_try;;
11846 esac
11847 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11848 $as_echo "$ac_try_echo") >&5
11849   (eval "$ac_compile") 2>conftest.er1
11850   ac_status=$?
11851   grep -v '^ *+' conftest.er1 >conftest.err
11852   rm -rf conftest.er1
11853   cat conftest.err >&5
11854   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11855   (exit $ac_status); } && {
11856          test -z "$ac_c_werror_flag" ||
11857          test ! -s conftest.err
11858        } && test -s conftest.$ac_objext; then
11859   ac_cv_header_X11_extensions_Xinerama_h=yes
11860 else
11861   $as_echo "$as_me: failed program was:" >&5
11862 sed 's/^/| /' conftest.$ac_ext >&5
11863
11864         ac_cv_header_X11_extensions_Xinerama_h=no
11865 fi
11866
11867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11868 fi
11869 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11870 $as_echo "$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11871 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then
11872   have_xinerama=yes
11873 fi
11874
11875
11876   CPPFLAGS="$ac_save_CPPFLAGS"
11877
11878   # if that succeeded, then check for the XINERAMA code in the libraries
11879   if test "$have_xinerama" = yes; then
11880
11881     # first look in -lXext
11882     have_xinerama=no
11883
11884   ac_save_CPPFLAGS="$CPPFLAGS"
11885   ac_save_LDFLAGS="$LDFLAGS"
11886 #  ac_save_LIBS="$LIBS"
11887
11888   if test \! -z "$includedir" ; then
11889     CPPFLAGS="$CPPFLAGS -I$includedir"
11890   fi
11891   # note: $X_CFLAGS includes $x_includes
11892   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11893
11894   if test \! -z "$libdir" ; then
11895     LDFLAGS="$LDFLAGS -L$libdir"
11896   fi
11897   # note: $X_LIBS includes $x_libraries
11898   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11899
11900   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11901   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11902   { $as_echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11903 $as_echo_n "checking for XineramaQueryScreens in -lXext... " >&6; }
11904 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11905   $as_echo_n "(cached) " >&6
11906 else
11907   ac_check_lib_save_LIBS=$LIBS
11908 LIBS="-lXext -lXext -lX11 $LIBS"
11909 cat >conftest.$ac_ext <<_ACEOF
11910 /* confdefs.h.  */
11911 _ACEOF
11912 cat confdefs.h >>conftest.$ac_ext
11913 cat >>conftest.$ac_ext <<_ACEOF
11914 /* end confdefs.h.  */
11915
11916 /* Override any GCC internal prototype to avoid an error.
11917    Use char because int might match the return type of a GCC
11918    builtin and then its argument prototype would still apply.  */
11919 #ifdef __cplusplus
11920 extern "C"
11921 #endif
11922 char XineramaQueryScreens ();
11923 int
11924 main ()
11925 {
11926 return XineramaQueryScreens ();
11927   ;
11928   return 0;
11929 }
11930 _ACEOF
11931 rm -rf conftest.$ac_objext conftest$ac_exeext
11932 if { (ac_try="$ac_link"
11933 case "(($ac_try" in
11934   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11935   *) ac_try_echo=$ac_try;;
11936 esac
11937 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11938 $as_echo "$ac_try_echo") >&5
11939   (eval "$ac_link") 2>conftest.er1
11940   ac_status=$?
11941   grep -v '^ *+' conftest.er1 >conftest.err
11942   rm -rf conftest.er1
11943   cat conftest.err >&5
11944   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11945   (exit $ac_status); } && {
11946          test -z "$ac_c_werror_flag" ||
11947          test ! -s conftest.err
11948        } && test -s conftest$ac_exeext && {
11949          test "$cross_compiling" = yes ||
11950          $as_test_x conftest$ac_exeext
11951        }; then
11952   ac_cv_lib_Xext_XineramaQueryScreens=yes
11953 else
11954   $as_echo "$as_me: failed program was:" >&5
11955 sed 's/^/| /' conftest.$ac_ext >&5
11956
11957         ac_cv_lib_Xext_XineramaQueryScreens=no
11958 fi
11959
11960 rm -rf conftest.dSYM
11961 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11962       conftest$ac_exeext conftest.$ac_ext
11963 LIBS=$ac_check_lib_save_LIBS
11964 fi
11965 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11966 $as_echo "$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11967 if test "x$ac_cv_lib_Xext_XineramaQueryScreens" = x""yes; then
11968   have_xinerama=yes
11969 else
11970   true
11971 fi
11972
11973   CPPFLAGS="$ac_save_CPPFLAGS"
11974   LDFLAGS="$ac_save_LDFLAGS"
11975 #  LIBS="$ac_save_LIBS"
11976
11977
11978     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11979     if test "$have_xinerama" = no; then
11980
11981   ac_save_CPPFLAGS="$CPPFLAGS"
11982   ac_save_LDFLAGS="$LDFLAGS"
11983 #  ac_save_LIBS="$LIBS"
11984
11985   if test \! -z "$includedir" ; then
11986     CPPFLAGS="$CPPFLAGS -I$includedir"
11987   fi
11988   # note: $X_CFLAGS includes $x_includes
11989   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11990
11991   if test \! -z "$libdir" ; then
11992     LDFLAGS="$LDFLAGS -L$libdir"
11993   fi
11994   # note: $X_LIBS includes $x_libraries
11995   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11996
11997   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11998   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11999   { $as_echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
12000 $as_echo_n "checking for XineramaQueryScreens in -lXinerama... " >&6; }
12001 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
12002   $as_echo_n "(cached) " >&6
12003 else
12004   ac_check_lib_save_LIBS=$LIBS
12005 LIBS="-lXinerama -lXext -lX11 $LIBS"
12006 cat >conftest.$ac_ext <<_ACEOF
12007 /* confdefs.h.  */
12008 _ACEOF
12009 cat confdefs.h >>conftest.$ac_ext
12010 cat >>conftest.$ac_ext <<_ACEOF
12011 /* end confdefs.h.  */
12012
12013 /* Override any GCC internal prototype to avoid an error.
12014    Use char because int might match the return type of a GCC
12015    builtin and then its argument prototype would still apply.  */
12016 #ifdef __cplusplus
12017 extern "C"
12018 #endif
12019 char XineramaQueryScreens ();
12020 int
12021 main ()
12022 {
12023 return XineramaQueryScreens ();
12024   ;
12025   return 0;
12026 }
12027 _ACEOF
12028 rm -rf conftest.$ac_objext conftest$ac_exeext
12029 if { (ac_try="$ac_link"
12030 case "(($ac_try" in
12031   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12032   *) ac_try_echo=$ac_try;;
12033 esac
12034 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12035 $as_echo "$ac_try_echo") >&5
12036   (eval "$ac_link") 2>conftest.er1
12037   ac_status=$?
12038   grep -v '^ *+' conftest.er1 >conftest.err
12039   rm -rf conftest.er1
12040   cat conftest.err >&5
12041   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12042   (exit $ac_status); } && {
12043          test -z "$ac_c_werror_flag" ||
12044          test ! -s conftest.err
12045        } && test -s conftest$ac_exeext && {
12046          test "$cross_compiling" = yes ||
12047          $as_test_x conftest$ac_exeext
12048        }; then
12049   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
12050 else
12051   $as_echo "$as_me: failed program was:" >&5
12052 sed 's/^/| /' conftest.$ac_ext >&5
12053
12054         ac_cv_lib_Xinerama_XineramaQueryScreens=no
12055 fi
12056
12057 rm -rf conftest.dSYM
12058 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12059       conftest$ac_exeext conftest.$ac_ext
12060 LIBS=$ac_check_lib_save_LIBS
12061 fi
12062 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
12063 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
12064 if test "x$ac_cv_lib_Xinerama_XineramaQueryScreens" = x""yes; then
12065   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
12066 else
12067   true
12068 fi
12069
12070   CPPFLAGS="$ac_save_CPPFLAGS"
12071   LDFLAGS="$ac_save_LDFLAGS"
12072 #  LIBS="$ac_save_LIBS"
12073
12074     fi
12075   fi
12076
12077   # if that succeeded, then we've really got it.
12078   if test "$have_xinerama" = yes; then
12079     cat >>confdefs.h <<\_ACEOF
12080 #define HAVE_XINERAMA 1
12081 _ACEOF
12082
12083   fi
12084
12085 elif test "$with_xinerama" != no; then
12086   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
12087   exit 1
12088 fi
12089
12090
12091 ###############################################################################
12092 #
12093 #       Check for the XINPUT server extension.
12094 #
12095 ###############################################################################
12096
12097 have_xinput=no
12098 with_xinput_req=unspecified
12099
12100 # Check whether --with-xinput-ext was given.
12101 if test "${with_xinput_ext+set}" = set; then
12102   withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
12103 else
12104   with_xinput=yes
12105 fi
12106
12107
12108
12109    case "$with_xinput" in
12110     yes) ;;
12111     no)  ;;
12112
12113     /*)
12114      { $as_echo "$as_me:$LINENO: checking for XINPUT headers" >&5
12115 $as_echo_n "checking for XINPUT headers... " >&6; }
12116      d=$with_xinput/include
12117      if test -d $d; then
12118        X_CFLAGS="-I$d $X_CFLAGS"
12119        { $as_echo "$as_me:$LINENO: result: $d" >&5
12120 $as_echo "$d" >&6; }
12121      else
12122        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12123 $as_echo "not found ($d: no such directory)" >&6; }
12124      fi
12125
12126      { $as_echo "$as_me:$LINENO: checking for XINPUT libs" >&5
12127 $as_echo_n "checking for XINPUT libs... " >&6; }
12128      d=$with_xinput/lib
12129      if test -d $d; then
12130        X_LIBS="-L$d $X_LIBS"
12131        { $as_echo "$as_me:$LINENO: result: $d" >&5
12132 $as_echo "$d" >&6; }
12133      else
12134        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12135 $as_echo "not found ($d: no such directory)" >&6; }
12136      fi
12137
12138      # replace the directory string with "yes".
12139      with_xinput_req="yes"
12140      with_xinput=$with_xinput_req
12141      ;;
12142
12143     *)
12144      echo ""
12145      echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
12146      echo "       If it is a directory, then \`DIR/include' will be added to"
12147      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12148      exit 1
12149      ;;
12150    esac
12151
12152
12153 if test "$with_xinput" = yes; then
12154
12155   # first check for Xinput.h
12156
12157   ac_save_CPPFLAGS="$CPPFLAGS"
12158   if test \! -z "$includedir" ; then
12159     CPPFLAGS="$CPPFLAGS -I$includedir"
12160   fi
12161   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12162   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12163   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XInput.h" >&5
12164 $as_echo_n "checking for X11/extensions/XInput.h... " >&6; }
12165 if test "${ac_cv_header_X11_extensions_XInput_h+set}" = set; then
12166   $as_echo_n "(cached) " >&6
12167 else
12168   cat >conftest.$ac_ext <<_ACEOF
12169 /* confdefs.h.  */
12170 _ACEOF
12171 cat confdefs.h >>conftest.$ac_ext
12172 cat >>conftest.$ac_ext <<_ACEOF
12173 /* end confdefs.h.  */
12174 #include <X11/Xlib.h>
12175
12176 #include <X11/extensions/XInput.h>
12177 _ACEOF
12178 rm -rf conftest.$ac_objext
12179 if { (ac_try="$ac_compile"
12180 case "(($ac_try" in
12181   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12182   *) ac_try_echo=$ac_try;;
12183 esac
12184 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12185 $as_echo "$ac_try_echo") >&5
12186   (eval "$ac_compile") 2>conftest.er1
12187   ac_status=$?
12188   grep -v '^ *+' conftest.er1 >conftest.err
12189   rm -rf conftest.er1
12190   cat conftest.err >&5
12191   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12192   (exit $ac_status); } && {
12193          test -z "$ac_c_werror_flag" ||
12194          test ! -s conftest.err
12195        } && test -s conftest.$ac_objext; then
12196   ac_cv_header_X11_extensions_XInput_h=yes
12197 else
12198   $as_echo "$as_me: failed program was:" >&5
12199 sed 's/^/| /' conftest.$ac_ext >&5
12200
12201         ac_cv_header_X11_extensions_XInput_h=no
12202 fi
12203
12204 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12205 fi
12206 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XInput_h" >&5
12207 $as_echo "$ac_cv_header_X11_extensions_XInput_h" >&6; }
12208 if test "x$ac_cv_header_X11_extensions_XInput_h" = x""yes; then
12209   have_xinput=yes
12210 fi
12211
12212
12213   CPPFLAGS="$ac_save_CPPFLAGS"
12214
12215   # if that succeeded, then check for libXi
12216   if test "$have_xinput" = yes; then
12217     have_xinput=no
12218
12219   ac_save_CPPFLAGS="$CPPFLAGS"
12220   ac_save_LDFLAGS="$LDFLAGS"
12221 #  ac_save_LIBS="$LIBS"
12222
12223   if test \! -z "$includedir" ; then
12224     CPPFLAGS="$CPPFLAGS -I$includedir"
12225   fi
12226   # note: $X_CFLAGS includes $x_includes
12227   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12228
12229   if test \! -z "$libdir" ; then
12230     LDFLAGS="$LDFLAGS -L$libdir"
12231   fi
12232   # note: $X_LIBS includes $x_libraries
12233   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12234
12235   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12236   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12237   { $as_echo "$as_me:$LINENO: checking for XListInputDevices in -lXi" >&5
12238 $as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
12239 if test "${ac_cv_lib_Xi_XListInputDevices+set}" = set; then
12240   $as_echo_n "(cached) " >&6
12241 else
12242   ac_check_lib_save_LIBS=$LIBS
12243 LIBS="-lXi -lXext -lX11 $LIBS"
12244 cat >conftest.$ac_ext <<_ACEOF
12245 /* confdefs.h.  */
12246 _ACEOF
12247 cat confdefs.h >>conftest.$ac_ext
12248 cat >>conftest.$ac_ext <<_ACEOF
12249 /* end confdefs.h.  */
12250
12251 /* Override any GCC internal prototype to avoid an error.
12252    Use char because int might match the return type of a GCC
12253    builtin and then its argument prototype would still apply.  */
12254 #ifdef __cplusplus
12255 extern "C"
12256 #endif
12257 char XListInputDevices ();
12258 int
12259 main ()
12260 {
12261 return XListInputDevices ();
12262   ;
12263   return 0;
12264 }
12265 _ACEOF
12266 rm -rf conftest.$ac_objext conftest$ac_exeext
12267 if { (ac_try="$ac_link"
12268 case "(($ac_try" in
12269   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12270   *) ac_try_echo=$ac_try;;
12271 esac
12272 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12273 $as_echo "$ac_try_echo") >&5
12274   (eval "$ac_link") 2>conftest.er1
12275   ac_status=$?
12276   grep -v '^ *+' conftest.er1 >conftest.err
12277   rm -rf conftest.er1
12278   cat conftest.err >&5
12279   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12280   (exit $ac_status); } && {
12281          test -z "$ac_c_werror_flag" ||
12282          test ! -s conftest.err
12283        } && test -s conftest$ac_exeext && {
12284          test "$cross_compiling" = yes ||
12285          $as_test_x conftest$ac_exeext
12286        }; then
12287   ac_cv_lib_Xi_XListInputDevices=yes
12288 else
12289   $as_echo "$as_me: failed program was:" >&5
12290 sed 's/^/| /' conftest.$ac_ext >&5
12291
12292         ac_cv_lib_Xi_XListInputDevices=no
12293 fi
12294
12295 rm -rf conftest.dSYM
12296 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12297       conftest$ac_exeext conftest.$ac_ext
12298 LIBS=$ac_check_lib_save_LIBS
12299 fi
12300 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xi_XListInputDevices" >&5
12301 $as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
12302 if test "x$ac_cv_lib_Xi_XListInputDevices" = x""yes; then
12303   have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
12304 else
12305   true
12306 fi
12307
12308   CPPFLAGS="$ac_save_CPPFLAGS"
12309   LDFLAGS="$ac_save_LDFLAGS"
12310 #  LIBS="$ac_save_LIBS"
12311
12312   fi
12313
12314   # if that succeeded, then we've really got it.
12315   if test "$have_xinput" = yes; then
12316     cat >>confdefs.h <<\_ACEOF
12317 #define HAVE_XINPUT 1
12318 _ACEOF
12319
12320   fi
12321
12322 elif test "$with_xinput" != no; then
12323   echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
12324   exit 1
12325 fi
12326
12327
12328 ###############################################################################
12329 #
12330 #       Check for the XF86VMODE server extension (for virtual screens.)
12331 #
12332 ###############################################################################
12333
12334 have_xf86vmode=no
12335 with_xf86vmode_req=unspecified
12336
12337 # Check whether --with-xf86vmode-ext was given.
12338 if test "${with_xf86vmode_ext+set}" = set; then
12339   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
12340 else
12341   with_xf86vmode=yes
12342 fi
12343
12344
12345
12346    case "$with_xf86vmode" in
12347     yes) ;;
12348     no)  ;;
12349
12350     /*)
12351      { $as_echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
12352 $as_echo_n "checking for xf86vmode headers... " >&6; }
12353      d=$with_xf86vmode/include
12354      if test -d $d; then
12355        X_CFLAGS="-I$d $X_CFLAGS"
12356        { $as_echo "$as_me:$LINENO: result: $d" >&5
12357 $as_echo "$d" >&6; }
12358      else
12359        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12360 $as_echo "not found ($d: no such directory)" >&6; }
12361      fi
12362
12363      { $as_echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
12364 $as_echo_n "checking for xf86vmode libs... " >&6; }
12365      d=$with_xf86vmode/lib
12366      if test -d $d; then
12367        X_LIBS="-L$d $X_LIBS"
12368        { $as_echo "$as_me:$LINENO: result: $d" >&5
12369 $as_echo "$d" >&6; }
12370      else
12371        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12372 $as_echo "not found ($d: no such directory)" >&6; }
12373      fi
12374
12375      # replace the directory string with "yes".
12376      with_xf86vmode_req="yes"
12377      with_xf86vmode=$with_xf86vmode_req
12378      ;;
12379
12380     *)
12381      echo ""
12382      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
12383      echo "       If it is a directory, then \`DIR/include' will be added to"
12384      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12385      exit 1
12386      ;;
12387    esac
12388
12389
12390 VIDMODE_LIBS=""
12391
12392 if test "$with_xf86vmode" = yes; then
12393
12394   # first check for xf86vmode.h
12395
12396   ac_save_CPPFLAGS="$CPPFLAGS"
12397   if test \! -z "$includedir" ; then
12398     CPPFLAGS="$CPPFLAGS -I$includedir"
12399   fi
12400   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12401   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12402   { $as_echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
12403 $as_echo_n "checking for X11/extensions/xf86vmode.h... " >&6; }
12404 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
12405   $as_echo_n "(cached) " >&6
12406 else
12407   cat >conftest.$ac_ext <<_ACEOF
12408 /* confdefs.h.  */
12409 _ACEOF
12410 cat confdefs.h >>conftest.$ac_ext
12411 cat >>conftest.$ac_ext <<_ACEOF
12412 /* end confdefs.h.  */
12413 #include <X11/Xlib.h>
12414
12415 #include <X11/extensions/xf86vmode.h>
12416 _ACEOF
12417 rm -rf conftest.$ac_objext
12418 if { (ac_try="$ac_compile"
12419 case "(($ac_try" in
12420   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12421   *) ac_try_echo=$ac_try;;
12422 esac
12423 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12424 $as_echo "$ac_try_echo") >&5
12425   (eval "$ac_compile") 2>conftest.er1
12426   ac_status=$?
12427   grep -v '^ *+' conftest.er1 >conftest.err
12428   rm -rf conftest.er1
12429   cat conftest.err >&5
12430   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12431   (exit $ac_status); } && {
12432          test -z "$ac_c_werror_flag" ||
12433          test ! -s conftest.err
12434        } && test -s conftest.$ac_objext; then
12435   ac_cv_header_X11_extensions_xf86vmode_h=yes
12436 else
12437   $as_echo "$as_me: failed program was:" >&5
12438 sed 's/^/| /' conftest.$ac_ext >&5
12439
12440         ac_cv_header_X11_extensions_xf86vmode_h=no
12441 fi
12442
12443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12444 fi
12445 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
12446 $as_echo "$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
12447 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = x""yes; then
12448   have_xf86vmode=yes
12449 fi
12450
12451
12452   CPPFLAGS="$ac_save_CPPFLAGS"
12453
12454   # if that succeeded, then check for the -lXxf86vm
12455   if test "$have_xf86vmode" = yes; then
12456     have_xf86vmode=no
12457
12458   ac_save_CPPFLAGS="$CPPFLAGS"
12459   ac_save_LDFLAGS="$LDFLAGS"
12460 #  ac_save_LIBS="$LIBS"
12461
12462   if test \! -z "$includedir" ; then
12463     CPPFLAGS="$CPPFLAGS -I$includedir"
12464   fi
12465   # note: $X_CFLAGS includes $x_includes
12466   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12467
12468   if test \! -z "$libdir" ; then
12469     LDFLAGS="$LDFLAGS -L$libdir"
12470   fi
12471   # note: $X_LIBS includes $x_libraries
12472   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12473
12474   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12475   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12476   { $as_echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
12477 $as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
12478 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
12479   $as_echo_n "(cached) " >&6
12480 else
12481   ac_check_lib_save_LIBS=$LIBS
12482 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12483 cat >conftest.$ac_ext <<_ACEOF
12484 /* confdefs.h.  */
12485 _ACEOF
12486 cat confdefs.h >>conftest.$ac_ext
12487 cat >>conftest.$ac_ext <<_ACEOF
12488 /* end confdefs.h.  */
12489
12490 /* Override any GCC internal prototype to avoid an error.
12491    Use char because int might match the return type of a GCC
12492    builtin and then its argument prototype would still apply.  */
12493 #ifdef __cplusplus
12494 extern "C"
12495 #endif
12496 char XF86VidModeGetViewPort ();
12497 int
12498 main ()
12499 {
12500 return XF86VidModeGetViewPort ();
12501   ;
12502   return 0;
12503 }
12504 _ACEOF
12505 rm -rf conftest.$ac_objext conftest$ac_exeext
12506 if { (ac_try="$ac_link"
12507 case "(($ac_try" in
12508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12509   *) ac_try_echo=$ac_try;;
12510 esac
12511 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12512 $as_echo "$ac_try_echo") >&5
12513   (eval "$ac_link") 2>conftest.er1
12514   ac_status=$?
12515   grep -v '^ *+' conftest.er1 >conftest.err
12516   rm -rf conftest.er1
12517   cat conftest.err >&5
12518   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12519   (exit $ac_status); } && {
12520          test -z "$ac_c_werror_flag" ||
12521          test ! -s conftest.err
12522        } && test -s conftest$ac_exeext && {
12523          test "$cross_compiling" = yes ||
12524          $as_test_x conftest$ac_exeext
12525        }; then
12526   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
12527 else
12528   $as_echo "$as_me: failed program was:" >&5
12529 sed 's/^/| /' conftest.$ac_ext >&5
12530
12531         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
12532 fi
12533
12534 rm -rf conftest.dSYM
12535 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12536       conftest$ac_exeext conftest.$ac_ext
12537 LIBS=$ac_check_lib_save_LIBS
12538 fi
12539 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
12540 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
12541 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = x""yes; then
12542   have_xf86vmode=yes;
12543                    VIDMODE_LIBS="-lXxf86vm";
12544                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
12545 else
12546   true
12547 fi
12548
12549   CPPFLAGS="$ac_save_CPPFLAGS"
12550   LDFLAGS="$ac_save_LDFLAGS"
12551 #  LIBS="$ac_save_LIBS"
12552
12553   fi
12554
12555   # if that succeeded, then we've really got it.
12556   if test "$have_xf86vmode" = yes; then
12557     cat >>confdefs.h <<\_ACEOF
12558 #define HAVE_XF86VMODE 1
12559 _ACEOF
12560
12561   fi
12562
12563 elif test "$with_xf86vmode" != no; then
12564   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
12565   exit 1
12566 fi
12567
12568
12569 ###############################################################################
12570 #
12571 #       Check for the XF86VMODE server extension (for gamma fading.)
12572 #
12573 ###############################################################################
12574
12575 have_xf86gamma=no
12576 have_xf86gamma_ramp=no
12577 with_xf86gamma_req=unspecified
12578
12579 # Check whether --with-xf86gamma-ext was given.
12580 if test "${with_xf86gamma_ext+set}" = set; then
12581   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
12582 else
12583   with_xf86gamma=yes
12584 fi
12585
12586
12587
12588    case "$with_xf86gamma" in
12589     yes) ;;
12590     no)  ;;
12591
12592     /*)
12593      { $as_echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
12594 $as_echo_n "checking for xf86gamma headers... " >&6; }
12595      d=$with_xf86gamma/include
12596      if test -d $d; then
12597        X_CFLAGS="-I$d $X_CFLAGS"
12598        { $as_echo "$as_me:$LINENO: result: $d" >&5
12599 $as_echo "$d" >&6; }
12600      else
12601        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12602 $as_echo "not found ($d: no such directory)" >&6; }
12603      fi
12604
12605      { $as_echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
12606 $as_echo_n "checking for xf86gamma libs... " >&6; }
12607      d=$with_xf86gamma/lib
12608      if test -d $d; then
12609        X_LIBS="-L$d $X_LIBS"
12610        { $as_echo "$as_me:$LINENO: result: $d" >&5
12611 $as_echo "$d" >&6; }
12612      else
12613        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12614 $as_echo "not found ($d: no such directory)" >&6; }
12615      fi
12616
12617      # replace the directory string with "yes".
12618      with_xf86gamma_req="yes"
12619      with_xf86gamma=$with_xf86gamma_req
12620      ;;
12621
12622     *)
12623      echo ""
12624      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
12625      echo "       If it is a directory, then \`DIR/include' will be added to"
12626      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12627      exit 1
12628      ;;
12629    esac
12630
12631
12632 if test "$with_xf86gamma" = yes; then
12633
12634   # first check for xf86vmode.h, if we haven't already
12635   if test "$have_xf86vmode" = yes; then
12636     have_xf86gamma=yes
12637   else
12638
12639   ac_save_CPPFLAGS="$CPPFLAGS"
12640   if test \! -z "$includedir" ; then
12641     CPPFLAGS="$CPPFLAGS -I$includedir"
12642   fi
12643   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12644   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12645   { $as_echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
12646 $as_echo_n "checking for X11/extensions/xf86vmode.h... " >&6; }
12647 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
12648   $as_echo_n "(cached) " >&6
12649 else
12650   cat >conftest.$ac_ext <<_ACEOF
12651 /* confdefs.h.  */
12652 _ACEOF
12653 cat confdefs.h >>conftest.$ac_ext
12654 cat >>conftest.$ac_ext <<_ACEOF
12655 /* end confdefs.h.  */
12656 #include <X11/Xlib.h>
12657
12658 #include <X11/extensions/xf86vmode.h>
12659 _ACEOF
12660 rm -rf conftest.$ac_objext
12661 if { (ac_try="$ac_compile"
12662 case "(($ac_try" in
12663   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12664   *) ac_try_echo=$ac_try;;
12665 esac
12666 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12667 $as_echo "$ac_try_echo") >&5
12668   (eval "$ac_compile") 2>conftest.er1
12669   ac_status=$?
12670   grep -v '^ *+' conftest.er1 >conftest.err
12671   rm -rf conftest.er1
12672   cat conftest.err >&5
12673   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12674   (exit $ac_status); } && {
12675          test -z "$ac_c_werror_flag" ||
12676          test ! -s conftest.err
12677        } && test -s conftest.$ac_objext; then
12678   ac_cv_header_X11_extensions_xf86vmode_h=yes
12679 else
12680   $as_echo "$as_me: failed program was:" >&5
12681 sed 's/^/| /' conftest.$ac_ext >&5
12682
12683         ac_cv_header_X11_extensions_xf86vmode_h=no
12684 fi
12685
12686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12687 fi
12688 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
12689 $as_echo "$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
12690 if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = x""yes; then
12691   have_xf86gamma=yes
12692 fi
12693
12694
12695   CPPFLAGS="$ac_save_CPPFLAGS"
12696   fi
12697
12698   # if that succeeded, then check for the -lXxf86vm
12699   if test "$have_xf86gamma" = yes; then
12700     have_xf86gamma=no
12701
12702   ac_save_CPPFLAGS="$CPPFLAGS"
12703   ac_save_LDFLAGS="$LDFLAGS"
12704 #  ac_save_LIBS="$LIBS"
12705
12706   if test \! -z "$includedir" ; then
12707     CPPFLAGS="$CPPFLAGS -I$includedir"
12708   fi
12709   # note: $X_CFLAGS includes $x_includes
12710   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12711
12712   if test \! -z "$libdir" ; then
12713     LDFLAGS="$LDFLAGS -L$libdir"
12714   fi
12715   # note: $X_LIBS includes $x_libraries
12716   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12717
12718   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12719   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12720   { $as_echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
12721 $as_echo_n "checking for XF86VidModeSetGamma in -lXxf86vm... " >&6; }
12722 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
12723   $as_echo_n "(cached) " >&6
12724 else
12725   ac_check_lib_save_LIBS=$LIBS
12726 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12727 cat >conftest.$ac_ext <<_ACEOF
12728 /* confdefs.h.  */
12729 _ACEOF
12730 cat confdefs.h >>conftest.$ac_ext
12731 cat >>conftest.$ac_ext <<_ACEOF
12732 /* end confdefs.h.  */
12733
12734 /* Override any GCC internal prototype to avoid an error.
12735    Use char because int might match the return type of a GCC
12736    builtin and then its argument prototype would still apply.  */
12737 #ifdef __cplusplus
12738 extern "C"
12739 #endif
12740 char XF86VidModeSetGamma ();
12741 int
12742 main ()
12743 {
12744 return XF86VidModeSetGamma ();
12745   ;
12746   return 0;
12747 }
12748 _ACEOF
12749 rm -rf conftest.$ac_objext conftest$ac_exeext
12750 if { (ac_try="$ac_link"
12751 case "(($ac_try" in
12752   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12753   *) ac_try_echo=$ac_try;;
12754 esac
12755 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12756 $as_echo "$ac_try_echo") >&5
12757   (eval "$ac_link") 2>conftest.er1
12758   ac_status=$?
12759   grep -v '^ *+' conftest.er1 >conftest.err
12760   rm -rf conftest.er1
12761   cat conftest.err >&5
12762   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12763   (exit $ac_status); } && {
12764          test -z "$ac_c_werror_flag" ||
12765          test ! -s conftest.err
12766        } && test -s conftest$ac_exeext && {
12767          test "$cross_compiling" = yes ||
12768          $as_test_x conftest$ac_exeext
12769        }; then
12770   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
12771 else
12772   $as_echo "$as_me: failed program was:" >&5
12773 sed 's/^/| /' conftest.$ac_ext >&5
12774
12775         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
12776 fi
12777
12778 rm -rf conftest.dSYM
12779 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12780       conftest$ac_exeext conftest.$ac_ext
12781 LIBS=$ac_check_lib_save_LIBS
12782 fi
12783 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
12784 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
12785 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" = x""yes; then
12786   have_xf86gamma=yes
12787 else
12788   true
12789 fi
12790
12791   CPPFLAGS="$ac_save_CPPFLAGS"
12792   LDFLAGS="$ac_save_LDFLAGS"
12793 #  LIBS="$ac_save_LIBS"
12794
12795   fi
12796
12797   # check for the Ramp versions of the functions too.
12798   if test "$have_xf86gamma" = yes; then
12799     have_xf86gamma_ramp=no
12800
12801   ac_save_CPPFLAGS="$CPPFLAGS"
12802   ac_save_LDFLAGS="$LDFLAGS"
12803 #  ac_save_LIBS="$LIBS"
12804
12805   if test \! -z "$includedir" ; then
12806     CPPFLAGS="$CPPFLAGS -I$includedir"
12807   fi
12808   # note: $X_CFLAGS includes $x_includes
12809   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12810
12811   if test \! -z "$libdir" ; then
12812     LDFLAGS="$LDFLAGS -L$libdir"
12813   fi
12814   # note: $X_LIBS includes $x_libraries
12815   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12816
12817   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12818   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12819   { $as_echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
12820 $as_echo_n "checking for XF86VidModeSetGammaRamp in -lXxf86vm... " >&6; }
12821 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
12822   $as_echo_n "(cached) " >&6
12823 else
12824   ac_check_lib_save_LIBS=$LIBS
12825 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12826 cat >conftest.$ac_ext <<_ACEOF
12827 /* confdefs.h.  */
12828 _ACEOF
12829 cat confdefs.h >>conftest.$ac_ext
12830 cat >>conftest.$ac_ext <<_ACEOF
12831 /* end confdefs.h.  */
12832
12833 /* Override any GCC internal prototype to avoid an error.
12834    Use char because int might match the return type of a GCC
12835    builtin and then its argument prototype would still apply.  */
12836 #ifdef __cplusplus
12837 extern "C"
12838 #endif
12839 char XF86VidModeSetGammaRamp ();
12840 int
12841 main ()
12842 {
12843 return XF86VidModeSetGammaRamp ();
12844   ;
12845   return 0;
12846 }
12847 _ACEOF
12848 rm -rf conftest.$ac_objext conftest$ac_exeext
12849 if { (ac_try="$ac_link"
12850 case "(($ac_try" in
12851   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12852   *) ac_try_echo=$ac_try;;
12853 esac
12854 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12855 $as_echo "$ac_try_echo") >&5
12856   (eval "$ac_link") 2>conftest.er1
12857   ac_status=$?
12858   grep -v '^ *+' conftest.er1 >conftest.err
12859   rm -rf conftest.er1
12860   cat conftest.err >&5
12861   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12862   (exit $ac_status); } && {
12863          test -z "$ac_c_werror_flag" ||
12864          test ! -s conftest.err
12865        } && test -s conftest$ac_exeext && {
12866          test "$cross_compiling" = yes ||
12867          $as_test_x conftest$ac_exeext
12868        }; then
12869   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
12870 else
12871   $as_echo "$as_me: failed program was:" >&5
12872 sed 's/^/| /' conftest.$ac_ext >&5
12873
12874         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
12875 fi
12876
12877 rm -rf conftest.dSYM
12878 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12879       conftest$ac_exeext conftest.$ac_ext
12880 LIBS=$ac_check_lib_save_LIBS
12881 fi
12882 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
12883 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
12884 if test "x$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" = x""yes; then
12885   have_xf86gamma_ramp=yes
12886 else
12887   true
12888 fi
12889
12890   CPPFLAGS="$ac_save_CPPFLAGS"
12891   LDFLAGS="$ac_save_LDFLAGS"
12892 #  LIBS="$ac_save_LIBS"
12893
12894   fi
12895
12896   # if those tests succeeded, then we've really got the functions.
12897   if test "$have_xf86gamma" = yes; then
12898     cat >>confdefs.h <<\_ACEOF
12899 #define HAVE_XF86VMODE_GAMMA 1
12900 _ACEOF
12901
12902   fi
12903
12904   if test "$have_xf86gamma_ramp" = yes; then
12905     cat >>confdefs.h <<\_ACEOF
12906 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12907 _ACEOF
12908
12909   fi
12910
12911   # pull in the lib, if we haven't already
12912   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12913     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12914   fi
12915
12916 elif test "$with_xf86gamma" != no; then
12917   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12918   exit 1
12919 fi
12920
12921
12922 ###############################################################################
12923 #
12924 #       Check for the RANDR (Resize and Rotate) server extension.
12925 #
12926 #       We need this to detect when the resolution of the desktop
12927 #       has changed out from under us (this is a newer, different
12928 #       mechanism than the XF86VMODE virtual viewports.)
12929 #
12930 ###############################################################################
12931
12932 have_randr=no
12933 with_randr_req=unspecified
12934
12935 # Check whether --with-randr-ext was given.
12936 if test "${with_randr_ext+set}" = set; then
12937   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12938 else
12939   with_randr=yes
12940 fi
12941
12942
12943
12944    case "$with_randr" in
12945     yes) ;;
12946     no)  ;;
12947
12948     /*)
12949      { $as_echo "$as_me:$LINENO: checking for RANDR headers" >&5
12950 $as_echo_n "checking for RANDR headers... " >&6; }
12951      d=$with_randr/include
12952      if test -d $d; then
12953        X_CFLAGS="-I$d $X_CFLAGS"
12954        { $as_echo "$as_me:$LINENO: result: $d" >&5
12955 $as_echo "$d" >&6; }
12956      else
12957        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12958 $as_echo "not found ($d: no such directory)" >&6; }
12959      fi
12960
12961      { $as_echo "$as_me:$LINENO: checking for RANDR libs" >&5
12962 $as_echo_n "checking for RANDR libs... " >&6; }
12963      d=$with_randr/lib
12964      if test -d $d; then
12965        X_LIBS="-L$d $X_LIBS"
12966        { $as_echo "$as_me:$LINENO: result: $d" >&5
12967 $as_echo "$d" >&6; }
12968      else
12969        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12970 $as_echo "not found ($d: no such directory)" >&6; }
12971      fi
12972
12973      # replace the directory string with "yes".
12974      with_randr_req="yes"
12975      with_randr=$with_randr_req
12976      ;;
12977
12978     *)
12979      echo ""
12980      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12981      echo "       If it is a directory, then \`DIR/include' will be added to"
12982      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12983      exit 1
12984      ;;
12985    esac
12986
12987
12988 if test "$with_randr" = yes; then
12989
12990   # first check for Xrandr.h
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   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12999 $as_echo_n "checking for X11/extensions/Xrandr.h... " >&6; }
13000 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
13001   $as_echo_n "(cached) " >&6
13002 else
13003   cat >conftest.$ac_ext <<_ACEOF
13004 /* confdefs.h.  */
13005 _ACEOF
13006 cat confdefs.h >>conftest.$ac_ext
13007 cat >>conftest.$ac_ext <<_ACEOF
13008 /* end confdefs.h.  */
13009 #include <X11/Xlib.h>
13010
13011 #include <X11/extensions/Xrandr.h>
13012 _ACEOF
13013 rm -rf conftest.$ac_objext
13014 if { (ac_try="$ac_compile"
13015 case "(($ac_try" in
13016   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13017   *) ac_try_echo=$ac_try;;
13018 esac
13019 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13020 $as_echo "$ac_try_echo") >&5
13021   (eval "$ac_compile") 2>conftest.er1
13022   ac_status=$?
13023   grep -v '^ *+' conftest.er1 >conftest.err
13024   rm -rf conftest.er1
13025   cat conftest.err >&5
13026   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13027   (exit $ac_status); } && {
13028          test -z "$ac_c_werror_flag" ||
13029          test ! -s conftest.err
13030        } && test -s conftest.$ac_objext; then
13031   ac_cv_header_X11_extensions_Xrandr_h=yes
13032 else
13033   $as_echo "$as_me: failed program was:" >&5
13034 sed 's/^/| /' conftest.$ac_ext >&5
13035
13036         ac_cv_header_X11_extensions_Xrandr_h=no
13037 fi
13038
13039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13040 fi
13041 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
13042 $as_echo "$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
13043 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then
13044   have_randr=yes
13045 fi
13046
13047
13048   CPPFLAGS="$ac_save_CPPFLAGS"
13049
13050   # if that succeeded, then check for the XRR code in the libraries
13051   if test "$have_randr" = yes; then
13052
13053     # RANDR probably needs -lXrender
13054     xrender_libs=
13055
13056   ac_save_CPPFLAGS="$CPPFLAGS"
13057   ac_save_LDFLAGS="$LDFLAGS"
13058 #  ac_save_LIBS="$LIBS"
13059
13060   if test \! -z "$includedir" ; then
13061     CPPFLAGS="$CPPFLAGS -I$includedir"
13062   fi
13063   # note: $X_CFLAGS includes $x_includes
13064   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13065
13066   if test \! -z "$libdir" ; then
13067     LDFLAGS="$LDFLAGS -L$libdir"
13068   fi
13069   # note: $X_LIBS includes $x_libraries
13070   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13071
13072   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13073   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13074   { $as_echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
13075 $as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
13076 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
13077   $as_echo_n "(cached) " >&6
13078 else
13079   ac_check_lib_save_LIBS=$LIBS
13080 LIBS="-lXrender -lXext -lX11 $LIBS"
13081 cat >conftest.$ac_ext <<_ACEOF
13082 /* confdefs.h.  */
13083 _ACEOF
13084 cat confdefs.h >>conftest.$ac_ext
13085 cat >>conftest.$ac_ext <<_ACEOF
13086 /* end confdefs.h.  */
13087
13088 /* Override any GCC internal prototype to avoid an error.
13089    Use char because int might match the return type of a GCC
13090    builtin and then its argument prototype would still apply.  */
13091 #ifdef __cplusplus
13092 extern "C"
13093 #endif
13094 char XRenderSetSubpixelOrder ();
13095 int
13096 main ()
13097 {
13098 return XRenderSetSubpixelOrder ();
13099   ;
13100   return 0;
13101 }
13102 _ACEOF
13103 rm -rf conftest.$ac_objext conftest$ac_exeext
13104 if { (ac_try="$ac_link"
13105 case "(($ac_try" in
13106   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13107   *) ac_try_echo=$ac_try;;
13108 esac
13109 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13110 $as_echo "$ac_try_echo") >&5
13111   (eval "$ac_link") 2>conftest.er1
13112   ac_status=$?
13113   grep -v '^ *+' conftest.er1 >conftest.err
13114   rm -rf conftest.er1
13115   cat conftest.err >&5
13116   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13117   (exit $ac_status); } && {
13118          test -z "$ac_c_werror_flag" ||
13119          test ! -s conftest.err
13120        } && test -s conftest$ac_exeext && {
13121          test "$cross_compiling" = yes ||
13122          $as_test_x conftest$ac_exeext
13123        }; then
13124   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
13125 else
13126   $as_echo "$as_me: failed program was:" >&5
13127 sed 's/^/| /' conftest.$ac_ext >&5
13128
13129         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
13130 fi
13131
13132 rm -rf conftest.dSYM
13133 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13134       conftest$ac_exeext conftest.$ac_ext
13135 LIBS=$ac_check_lib_save_LIBS
13136 fi
13137 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
13138 $as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
13139 if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = x""yes; then
13140   xrender_libs="-lXrender"
13141 else
13142   true
13143 fi
13144
13145   CPPFLAGS="$ac_save_CPPFLAGS"
13146   LDFLAGS="$ac_save_LDFLAGS"
13147 #  LIBS="$ac_save_LIBS"
13148
13149
13150     # first look for RANDR in -lXext
13151     have_randr=no
13152
13153   ac_save_CPPFLAGS="$CPPFLAGS"
13154   ac_save_LDFLAGS="$LDFLAGS"
13155 #  ac_save_LIBS="$LIBS"
13156
13157   if test \! -z "$includedir" ; then
13158     CPPFLAGS="$CPPFLAGS -I$includedir"
13159   fi
13160   # note: $X_CFLAGS includes $x_includes
13161   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13162
13163   if test \! -z "$libdir" ; then
13164     LDFLAGS="$LDFLAGS -L$libdir"
13165   fi
13166   # note: $X_LIBS includes $x_libraries
13167   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13168
13169   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13170   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13171   { $as_echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
13172 $as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
13173 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
13174   $as_echo_n "(cached) " >&6
13175 else
13176   ac_check_lib_save_LIBS=$LIBS
13177 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
13178 cat >conftest.$ac_ext <<_ACEOF
13179 /* confdefs.h.  */
13180 _ACEOF
13181 cat confdefs.h >>conftest.$ac_ext
13182 cat >>conftest.$ac_ext <<_ACEOF
13183 /* end confdefs.h.  */
13184
13185 /* Override any GCC internal prototype to avoid an error.
13186    Use char because int might match the return type of a GCC
13187    builtin and then its argument prototype would still apply.  */
13188 #ifdef __cplusplus
13189 extern "C"
13190 #endif
13191 char XRRGetScreenInfo ();
13192 int
13193 main ()
13194 {
13195 return XRRGetScreenInfo ();
13196   ;
13197   return 0;
13198 }
13199 _ACEOF
13200 rm -rf conftest.$ac_objext conftest$ac_exeext
13201 if { (ac_try="$ac_link"
13202 case "(($ac_try" in
13203   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13204   *) ac_try_echo=$ac_try;;
13205 esac
13206 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13207 $as_echo "$ac_try_echo") >&5
13208   (eval "$ac_link") 2>conftest.er1
13209   ac_status=$?
13210   grep -v '^ *+' conftest.er1 >conftest.err
13211   rm -rf conftest.er1
13212   cat conftest.err >&5
13213   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13214   (exit $ac_status); } && {
13215          test -z "$ac_c_werror_flag" ||
13216          test ! -s conftest.err
13217        } && test -s conftest$ac_exeext && {
13218          test "$cross_compiling" = yes ||
13219          $as_test_x conftest$ac_exeext
13220        }; then
13221   ac_cv_lib_Xext_XRRGetScreenInfo=yes
13222 else
13223   $as_echo "$as_me: failed program was:" >&5
13224 sed 's/^/| /' conftest.$ac_ext >&5
13225
13226         ac_cv_lib_Xext_XRRGetScreenInfo=no
13227 fi
13228
13229 rm -rf conftest.dSYM
13230 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13231       conftest$ac_exeext conftest.$ac_ext
13232 LIBS=$ac_check_lib_save_LIBS
13233 fi
13234 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
13235 $as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
13236 if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = x""yes; then
13237   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
13238 else
13239   true
13240 fi
13241
13242   CPPFLAGS="$ac_save_CPPFLAGS"
13243   LDFLAGS="$ac_save_LDFLAGS"
13244 #  LIBS="$ac_save_LIBS"
13245
13246
13247     # if that failed, look in -lXrandr
13248     if test "$have_randr" = no; then
13249
13250   ac_save_CPPFLAGS="$CPPFLAGS"
13251   ac_save_LDFLAGS="$LDFLAGS"
13252 #  ac_save_LIBS="$LIBS"
13253
13254   if test \! -z "$includedir" ; then
13255     CPPFLAGS="$CPPFLAGS -I$includedir"
13256   fi
13257   # note: $X_CFLAGS includes $x_includes
13258   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13259
13260   if test \! -z "$libdir" ; then
13261     LDFLAGS="$LDFLAGS -L$libdir"
13262   fi
13263   # note: $X_LIBS includes $x_libraries
13264   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13265
13266   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13267   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13268   { $as_echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
13269 $as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
13270 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
13271   $as_echo_n "(cached) " >&6
13272 else
13273   ac_check_lib_save_LIBS=$LIBS
13274 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
13275 cat >conftest.$ac_ext <<_ACEOF
13276 /* confdefs.h.  */
13277 _ACEOF
13278 cat confdefs.h >>conftest.$ac_ext
13279 cat >>conftest.$ac_ext <<_ACEOF
13280 /* end confdefs.h.  */
13281
13282 /* Override any GCC internal prototype to avoid an error.
13283    Use char because int might match the return type of a GCC
13284    builtin and then its argument prototype would still apply.  */
13285 #ifdef __cplusplus
13286 extern "C"
13287 #endif
13288 char XRRGetScreenInfo ();
13289 int
13290 main ()
13291 {
13292 return XRRGetScreenInfo ();
13293   ;
13294   return 0;
13295 }
13296 _ACEOF
13297 rm -rf conftest.$ac_objext conftest$ac_exeext
13298 if { (ac_try="$ac_link"
13299 case "(($ac_try" in
13300   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13301   *) ac_try_echo=$ac_try;;
13302 esac
13303 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13304 $as_echo "$ac_try_echo") >&5
13305   (eval "$ac_link") 2>conftest.er1
13306   ac_status=$?
13307   grep -v '^ *+' conftest.er1 >conftest.err
13308   rm -rf conftest.er1
13309   cat conftest.err >&5
13310   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13311   (exit $ac_status); } && {
13312          test -z "$ac_c_werror_flag" ||
13313          test ! -s conftest.err
13314        } && test -s conftest$ac_exeext && {
13315          test "$cross_compiling" = yes ||
13316          $as_test_x conftest$ac_exeext
13317        }; then
13318   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
13319 else
13320   $as_echo "$as_me: failed program was:" >&5
13321 sed 's/^/| /' conftest.$ac_ext >&5
13322
13323         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
13324 fi
13325
13326 rm -rf conftest.dSYM
13327 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13328       conftest$ac_exeext conftest.$ac_ext
13329 LIBS=$ac_check_lib_save_LIBS
13330 fi
13331 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
13332 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
13333 if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = x""yes; then
13334   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
13335 else
13336   true
13337 fi
13338
13339   CPPFLAGS="$ac_save_CPPFLAGS"
13340   LDFLAGS="$ac_save_LDFLAGS"
13341 #  LIBS="$ac_save_LIBS"
13342
13343     fi
13344   fi
13345
13346   # if that succeeded, then we've really got it.
13347   if test "$have_randr" = yes; then
13348     cat >>confdefs.h <<\_ACEOF
13349 #define HAVE_RANDR 1
13350 _ACEOF
13351
13352
13353     # Now check for version 1.2 in the same libs.
13354     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
13355     { $as_echo "$as_me:$LINENO: checking for XRRGetScreenResources" >&5
13356 $as_echo_n "checking for XRRGetScreenResources... " >&6; }
13357 if test "${ac_cv_randr_12+set}" = set; then
13358   $as_echo_n "(cached) " >&6
13359 else
13360   ac_cv_randr_12=no
13361
13362   ac_save_CPPFLAGS="$CPPFLAGS"
13363   if test \! -z "$includedir" ; then
13364     CPPFLAGS="$CPPFLAGS -I$includedir"
13365   fi
13366   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13367   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13368   cat >conftest.$ac_ext <<_ACEOF
13369 /* confdefs.h.  */
13370 _ACEOF
13371 cat confdefs.h >>conftest.$ac_ext
13372 cat >>conftest.$ac_ext <<_ACEOF
13373 /* end confdefs.h.  */
13374 #include <stdlib.h>
13375                          #include <X11/Xlib.h>
13376                          #include <X11/extensions/Xrandr.h>
13377 int
13378 main ()
13379 {
13380 XRRScreenResources *res =
13381                            XRRGetScreenResources (0, 0);
13382   ;
13383   return 0;
13384 }
13385 _ACEOF
13386 rm -rf conftest.$ac_objext
13387 if { (ac_try="$ac_compile"
13388 case "(($ac_try" in
13389   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13390   *) ac_try_echo=$ac_try;;
13391 esac
13392 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13393 $as_echo "$ac_try_echo") >&5
13394   (eval "$ac_compile") 2>conftest.er1
13395   ac_status=$?
13396   grep -v '^ *+' conftest.er1 >conftest.err
13397   rm -rf conftest.er1
13398   cat conftest.err >&5
13399   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13400   (exit $ac_status); } && {
13401          test -z "$ac_c_werror_flag" ||
13402          test ! -s conftest.err
13403        } && test -s conftest.$ac_objext; then
13404   ac_cv_randr_12=yes
13405 else
13406   $as_echo "$as_me: failed program was:" >&5
13407 sed 's/^/| /' conftest.$ac_ext >&5
13408
13409         ac_cv_randr_12=no
13410 fi
13411
13412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13413   CPPFLAGS="$ac_save_CPPFLAGS"
13414 fi
13415 { $as_echo "$as_me:$LINENO: result: $ac_cv_randr_12" >&5
13416 $as_echo "$ac_cv_randr_12" >&6; }
13417     if test "$ac_cv_randr_12" = yes ; then
13418       cat >>confdefs.h <<\_ACEOF
13419 #define HAVE_RANDR_12 1
13420 _ACEOF
13421
13422     fi
13423 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
13424 #                  [true], $SAVER_LIBS)
13425   fi
13426
13427
13428 elif test "$with_randr" != no; then
13429   echo "error: must be yes or no: --with-randr-ext=$with_randr"
13430   exit 1
13431 fi
13432
13433
13434 ###############################################################################
13435 #
13436 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
13437 #       using other XF86 stuff.)
13438 #
13439 ###############################################################################
13440
13441 have_xf86miscsetgrabkeysstate=no
13442 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
13443
13444   ac_save_CPPFLAGS="$CPPFLAGS"
13445   ac_save_LDFLAGS="$LDFLAGS"
13446 #  ac_save_LIBS="$LIBS"
13447
13448   if test \! -z "$includedir" ; then
13449     CPPFLAGS="$CPPFLAGS -I$includedir"
13450   fi
13451   # note: $X_CFLAGS includes $x_includes
13452   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13453
13454   if test \! -z "$libdir" ; then
13455     LDFLAGS="$LDFLAGS -L$libdir"
13456   fi
13457   # note: $X_LIBS includes $x_libraries
13458   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13459
13460   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13461   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13462   { $as_echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
13463 $as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
13464 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
13465   $as_echo_n "(cached) " >&6
13466 else
13467   ac_check_lib_save_LIBS=$LIBS
13468 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
13469 cat >conftest.$ac_ext <<_ACEOF
13470 /* confdefs.h.  */
13471 _ACEOF
13472 cat confdefs.h >>conftest.$ac_ext
13473 cat >>conftest.$ac_ext <<_ACEOF
13474 /* end confdefs.h.  */
13475
13476 /* Override any GCC internal prototype to avoid an error.
13477    Use char because int might match the return type of a GCC
13478    builtin and then its argument prototype would still apply.  */
13479 #ifdef __cplusplus
13480 extern "C"
13481 #endif
13482 char XF86MiscSetGrabKeysState ();
13483 int
13484 main ()
13485 {
13486 return XF86MiscSetGrabKeysState ();
13487   ;
13488   return 0;
13489 }
13490 _ACEOF
13491 rm -rf conftest.$ac_objext conftest$ac_exeext
13492 if { (ac_try="$ac_link"
13493 case "(($ac_try" in
13494   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13495   *) ac_try_echo=$ac_try;;
13496 esac
13497 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13498 $as_echo "$ac_try_echo") >&5
13499   (eval "$ac_link") 2>conftest.er1
13500   ac_status=$?
13501   grep -v '^ *+' conftest.er1 >conftest.err
13502   rm -rf conftest.er1
13503   cat conftest.err >&5
13504   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13505   (exit $ac_status); } && {
13506          test -z "$ac_c_werror_flag" ||
13507          test ! -s conftest.err
13508        } && test -s conftest$ac_exeext && {
13509          test "$cross_compiling" = yes ||
13510          $as_test_x conftest$ac_exeext
13511        }; then
13512   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
13513 else
13514   $as_echo "$as_me: failed program was:" >&5
13515 sed 's/^/| /' conftest.$ac_ext >&5
13516
13517         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
13518 fi
13519
13520 rm -rf conftest.dSYM
13521 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13522       conftest$ac_exeext conftest.$ac_ext
13523 LIBS=$ac_check_lib_save_LIBS
13524 fi
13525 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
13526 $as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
13527 if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = x""yes; then
13528   have_xf86miscsetgrabkeysstate=yes
13529 else
13530   true
13531 fi
13532
13533   CPPFLAGS="$ac_save_CPPFLAGS"
13534   LDFLAGS="$ac_save_LDFLAGS"
13535 #  LIBS="$ac_save_LIBS"
13536
13537   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
13538     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
13539     cat >>confdefs.h <<\_ACEOF
13540 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
13541 _ACEOF
13542
13543   fi
13544 fi
13545
13546
13547 ###############################################################################
13548 #
13549 #       Check for HP XHPDisableReset and XHPEnableReset.
13550 #
13551 ###############################################################################
13552
13553 { $as_echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
13554 $as_echo_n "checking for XHPDisableReset in X11/XHPlib.h... " >&6; }
13555
13556   ac_save_CPPFLAGS="$CPPFLAGS"
13557   if test \! -z "$includedir" ; then
13558     CPPFLAGS="$CPPFLAGS -I$includedir"
13559   fi
13560   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13561   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13562   cat >conftest.$ac_ext <<_ACEOF
13563 /* confdefs.h.  */
13564 _ACEOF
13565 cat confdefs.h >>conftest.$ac_ext
13566 cat >>conftest.$ac_ext <<_ACEOF
13567 /* end confdefs.h.  */
13568 #include <X11/XHPlib.h>
13569
13570 _ACEOF
13571 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13572   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
13573   cat >>confdefs.h <<\_ACEOF
13574 #define HAVE_XHPDISABLERESET 1
13575 _ACEOF
13576
13577                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
13578                    { $as_echo "$as_me:$LINENO: result: yes" >&5
13579 $as_echo "yes" >&6; }
13580 else
13581   { $as_echo "$as_me:$LINENO: result: no" >&5
13582 $as_echo "no" >&6; }
13583 fi
13584 rm -rf conftest*
13585
13586   CPPFLAGS="$ac_save_CPPFLAGS"
13587
13588
13589 ###############################################################################
13590 #
13591 #       Check for /proc/interrupts.
13592 #
13593 ###############################################################################
13594
13595 have_proc_interrupts=no
13596 with_proc_interrupts_req=unspecified
13597
13598 # Check whether --with-proc-interrupts was given.
13599 if test "${with_proc_interrupts+set}" = set; then
13600   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
13601 else
13602   with_proc_interrupts=yes
13603 fi
13604
13605
13606 if test "$with_proc_interrupts" = yes; then
13607
13608   # Note that we may be building in an environment (e.g. Debian buildd chroot)
13609   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
13610   # check that it has the bits we need, but otherwise we'll just go on faith.
13611   #
13612   have_proc_interrupts=yes
13613
13614   if test -f /proc/interrupts; then
13615    { $as_echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
13616 $as_echo_n "checking whether /proc/interrupts contains keyboard data... " >&6; }
13617 if test "${ac_cv_have_proc_interrupts+set}" = set; then
13618   $as_echo_n "(cached) " >&6
13619 else
13620   ac_cv_have_proc_interrupts=no
13621      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
13622        ac_cv_have_proc_interrupts=yes
13623      fi
13624
13625 fi
13626 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
13627 $as_echo "$ac_cv_have_proc_interrupts" >&6; }
13628    have_proc_interrupts=$ac_cv_have_proc_interrupts
13629   fi
13630
13631   if test "$have_proc_interrupts" = yes; then
13632     cat >>confdefs.h <<\_ACEOF
13633 #define HAVE_PROC_INTERRUPTS 1
13634 _ACEOF
13635
13636   fi
13637
13638 elif test "$with_proc_interrupts" != no; then
13639   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
13640   exit 1
13641 fi
13642
13643
13644 ###############################################################################
13645 #
13646 #       The --enable-locking option
13647 #
13648 ###############################################################################
13649
13650 # Check whether --enable-locking was given.
13651 if test "${enable_locking+set}" = set; then
13652   enableval=$enable_locking; enable_locking="$enableval"
13653 else
13654   if test "$ac_macosx" = yes; then
13655     # We can't lock on MacOS X, so default to not compiling in support for it.
13656     # But allow --enable-locking to override that, so I can debug Linux locking
13657     # under MacOS X11.
13658     enable_locking=no
13659    else
13660     enable_locking=yes
13661    fi
13662 fi
13663
13664 if test "$enable_locking" = yes; then
13665   true
13666 elif test "$enable_locking" = no; then
13667   cat >>confdefs.h <<\_ACEOF
13668 #define NO_LOCKING 1
13669 _ACEOF
13670
13671 else
13672   echo "error: must be yes or no: --enable-locking=$enable_locking"
13673   exit 1
13674 fi
13675
13676
13677 ###############################################################################
13678 #
13679 #       Whether to allow root password to unblank.
13680 #
13681 ###############################################################################
13682 # Check whether --enable-root-passwd was given.
13683 if test "${enable_root_passwd+set}" = set; then
13684   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
13685 else
13686   enable_root_passwd=yes
13687 fi
13688
13689 if test "$enable_root_passwd" = yes; then
13690   cat >>confdefs.h <<\_ACEOF
13691 #define ALLOW_ROOT_PASSWD 1
13692 _ACEOF
13693
13694   true
13695 elif test "$enable_root_passwd" != no; then
13696   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
13697   exit 1
13698 fi
13699
13700 ###############################################################################
13701 #
13702 #       Check for PAM.
13703 #
13704 ###############################################################################
13705
13706 case "$host" in
13707   *-solaris*)
13708    # Solaris systems tend to come with PAM misconfigured.
13709    #  Don't build it by default, even if the headers exist.
13710    with_pam_default=no
13711    ;;
13712   *)
13713    # Default to building PAM support on all other systems, if it exists.
13714    with_pam_default=yes
13715   ;;
13716 esac
13717
13718 have_pam=no
13719 with_pam_req=unspecified
13720
13721
13722 # Check whether --with-pam was given.
13723 if test "${with_pam+set}" = set; then
13724   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
13725 else
13726   with_pam=$with_pam_default
13727 fi
13728
13729
13730
13731 # Check whether --with-pam_service_name was given.
13732 if test "${with_pam_service_name+set}" = set; then
13733   withval=$with_pam_service_name; pam_service_name="$withval"
13734 else
13735   pam_service_name="xscreensaver"
13736 fi
13737
13738
13739 # Check whether --enable-pam-check-account-type was given.
13740 if test "${enable_pam_check_account_type+set}" = set; then
13741   enableval=$enable_pam_check_account_type; enable_pam_check_account_type="$enableval"
13742 else
13743   enable_pam_check_account_type=no
13744 fi
13745
13746 if test "$enable_pam_check_account_type" = yes ; then
13747   cat >>confdefs.h <<\_ACEOF
13748 #define PAM_CHECK_ACCOUNT_TYPE 1
13749 _ACEOF
13750
13751   true
13752 elif test "$enable_pam_check_account_type" != no ; then
13753   echo "error: must be yes or no: --enable-pam-check-account-type=$enable_pam_check_account_type"
13754   exit 1
13755 fi
13756
13757
13758    case "$with_pam" in
13759     yes) ;;
13760     no)  ;;
13761
13762     /*)
13763      { $as_echo "$as_me:$LINENO: checking for PAM headers" >&5
13764 $as_echo_n "checking for PAM headers... " >&6; }
13765      d=$with_pam/include
13766      if test -d $d; then
13767        X_CFLAGS="-I$d $X_CFLAGS"
13768        { $as_echo "$as_me:$LINENO: result: $d" >&5
13769 $as_echo "$d" >&6; }
13770      else
13771        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13772 $as_echo "not found ($d: no such directory)" >&6; }
13773      fi
13774
13775      { $as_echo "$as_me:$LINENO: checking for PAM libs" >&5
13776 $as_echo_n "checking for PAM libs... " >&6; }
13777      d=$with_pam/lib
13778      if test -d $d; then
13779        X_LIBS="-L$d $X_LIBS"
13780        { $as_echo "$as_me:$LINENO: result: $d" >&5
13781 $as_echo "$d" >&6; }
13782      else
13783        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13784 $as_echo "not found ($d: no such directory)" >&6; }
13785      fi
13786
13787      # replace the directory string with "yes".
13788      with_pam_req="yes"
13789      with_pam=$with_pam_req
13790      ;;
13791
13792     *)
13793      echo ""
13794      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
13795      echo "       If it is a directory, then \`DIR/include' will be added to"
13796      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13797      exit 1
13798      ;;
13799    esac
13800
13801
13802 if test "$enable_locking" = yes -a "$with_pam" = yes; then
13803   { $as_echo "$as_me:$LINENO: checking for PAM" >&5
13804 $as_echo_n "checking for PAM... " >&6; }
13805 if test "${ac_cv_pam+set}" = set; then
13806   $as_echo_n "(cached) " >&6
13807 else
13808
13809   ac_save_CPPFLAGS="$CPPFLAGS"
13810   if test \! -z "$includedir" ; then
13811     CPPFLAGS="$CPPFLAGS -I$includedir"
13812   fi
13813   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13814   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13815   cat >conftest.$ac_ext <<_ACEOF
13816 /* confdefs.h.  */
13817 _ACEOF
13818 cat confdefs.h >>conftest.$ac_ext
13819 cat >>conftest.$ac_ext <<_ACEOF
13820 /* end confdefs.h.  */
13821 #include <security/pam_appl.h>
13822 int
13823 main ()
13824 {
13825
13826   ;
13827   return 0;
13828 }
13829 _ACEOF
13830 rm -rf conftest.$ac_objext
13831 if { (ac_try="$ac_compile"
13832 case "(($ac_try" in
13833   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13834   *) ac_try_echo=$ac_try;;
13835 esac
13836 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13837 $as_echo "$ac_try_echo") >&5
13838   (eval "$ac_compile") 2>conftest.er1
13839   ac_status=$?
13840   grep -v '^ *+' conftest.er1 >conftest.err
13841   rm -rf conftest.er1
13842   cat conftest.err >&5
13843   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13844   (exit $ac_status); } && {
13845          test -z "$ac_c_werror_flag" ||
13846          test ! -s conftest.err
13847        } && test -s conftest.$ac_objext; then
13848   ac_cv_pam=yes
13849 else
13850   $as_echo "$as_me: failed program was:" >&5
13851 sed 's/^/| /' conftest.$ac_ext >&5
13852
13853         ac_cv_pam=no
13854 fi
13855
13856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13857   CPPFLAGS="$ac_save_CPPFLAGS"
13858 fi
13859 { $as_echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
13860 $as_echo "$ac_cv_pam" >&6; }
13861   if test "$ac_cv_pam" = yes ; then
13862     have_pam=yes
13863     cat >>confdefs.h <<\_ACEOF
13864 #define HAVE_PAM 1
13865 _ACEOF
13866
13867     cat >>confdefs.h <<_ACEOF
13868 #define PAM_SERVICE_NAME "$pam_service_name"
13869 _ACEOF
13870
13871
13872     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
13873
13874     # libpam typically requires dlopen and dlsym.  On FreeBSD,
13875     # those are in libc.  On Linux and Solaris, they're in libdl.
13876     { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13877 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13878 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13879   $as_echo_n "(cached) " >&6
13880 else
13881   ac_check_lib_save_LIBS=$LIBS
13882 LIBS="-ldl  $LIBS"
13883 cat >conftest.$ac_ext <<_ACEOF
13884 /* confdefs.h.  */
13885 _ACEOF
13886 cat confdefs.h >>conftest.$ac_ext
13887 cat >>conftest.$ac_ext <<_ACEOF
13888 /* end confdefs.h.  */
13889
13890 /* Override any GCC internal prototype to avoid an error.
13891    Use char because int might match the return type of a GCC
13892    builtin and then its argument prototype would still apply.  */
13893 #ifdef __cplusplus
13894 extern "C"
13895 #endif
13896 char dlopen ();
13897 int
13898 main ()
13899 {
13900 return dlopen ();
13901   ;
13902   return 0;
13903 }
13904 _ACEOF
13905 rm -rf conftest.$ac_objext conftest$ac_exeext
13906 if { (ac_try="$ac_link"
13907 case "(($ac_try" in
13908   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13909   *) ac_try_echo=$ac_try;;
13910 esac
13911 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13912 $as_echo "$ac_try_echo") >&5
13913   (eval "$ac_link") 2>conftest.er1
13914   ac_status=$?
13915   grep -v '^ *+' conftest.er1 >conftest.err
13916   rm -rf conftest.er1
13917   cat conftest.err >&5
13918   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13919   (exit $ac_status); } && {
13920          test -z "$ac_c_werror_flag" ||
13921          test ! -s conftest.err
13922        } && test -s conftest$ac_exeext && {
13923          test "$cross_compiling" = yes ||
13924          $as_test_x conftest$ac_exeext
13925        }; then
13926   ac_cv_lib_dl_dlopen=yes
13927 else
13928   $as_echo "$as_me: failed program was:" >&5
13929 sed 's/^/| /' conftest.$ac_ext >&5
13930
13931         ac_cv_lib_dl_dlopen=no
13932 fi
13933
13934 rm -rf conftest.dSYM
13935 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13936       conftest$ac_exeext conftest.$ac_ext
13937 LIBS=$ac_check_lib_save_LIBS
13938 fi
13939 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13940 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13941 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
13942   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
13943 fi
13944
13945
13946     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
13947     have_timedwait=no
13948     { $as_echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
13949 $as_echo_n "checking for sigtimedwait in -lc... " >&6; }
13950 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
13951   $as_echo_n "(cached) " >&6
13952 else
13953   ac_check_lib_save_LIBS=$LIBS
13954 LIBS="-lc  $LIBS"
13955 cat >conftest.$ac_ext <<_ACEOF
13956 /* confdefs.h.  */
13957 _ACEOF
13958 cat confdefs.h >>conftest.$ac_ext
13959 cat >>conftest.$ac_ext <<_ACEOF
13960 /* end confdefs.h.  */
13961
13962 /* Override any GCC internal prototype to avoid an error.
13963    Use char because int might match the return type of a GCC
13964    builtin and then its argument prototype would still apply.  */
13965 #ifdef __cplusplus
13966 extern "C"
13967 #endif
13968 char sigtimedwait ();
13969 int
13970 main ()
13971 {
13972 return sigtimedwait ();
13973   ;
13974   return 0;
13975 }
13976 _ACEOF
13977 rm -rf conftest.$ac_objext conftest$ac_exeext
13978 if { (ac_try="$ac_link"
13979 case "(($ac_try" in
13980   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13981   *) ac_try_echo=$ac_try;;
13982 esac
13983 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13984 $as_echo "$ac_try_echo") >&5
13985   (eval "$ac_link") 2>conftest.er1
13986   ac_status=$?
13987   grep -v '^ *+' conftest.er1 >conftest.err
13988   rm -rf conftest.er1
13989   cat conftest.err >&5
13990   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13991   (exit $ac_status); } && {
13992          test -z "$ac_c_werror_flag" ||
13993          test ! -s conftest.err
13994        } && test -s conftest$ac_exeext && {
13995          test "$cross_compiling" = yes ||
13996          $as_test_x conftest$ac_exeext
13997        }; then
13998   ac_cv_lib_c_sigtimedwait=yes
13999 else
14000   $as_echo "$as_me: failed program was:" >&5
14001 sed 's/^/| /' conftest.$ac_ext >&5
14002
14003         ac_cv_lib_c_sigtimedwait=no
14004 fi
14005
14006 rm -rf conftest.dSYM
14007 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14008       conftest$ac_exeext conftest.$ac_ext
14009 LIBS=$ac_check_lib_save_LIBS
14010 fi
14011 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
14012 $as_echo "$ac_cv_lib_c_sigtimedwait" >&6; }
14013 if test "x$ac_cv_lib_c_sigtimedwait" = x""yes; then
14014   have_timedwait=yes
14015                   cat >>confdefs.h <<\_ACEOF
14016 #define HAVE_SIGTIMEDWAIT 1
14017 _ACEOF
14018
14019 fi
14020
14021     if test "$have_timedwait" = no ; then
14022       { $as_echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
14023 $as_echo_n "checking for sigtimedwait in -lrt... " >&6; }
14024 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
14025   $as_echo_n "(cached) " >&6
14026 else
14027   ac_check_lib_save_LIBS=$LIBS
14028 LIBS="-lrt  $LIBS"
14029 cat >conftest.$ac_ext <<_ACEOF
14030 /* confdefs.h.  */
14031 _ACEOF
14032 cat confdefs.h >>conftest.$ac_ext
14033 cat >>conftest.$ac_ext <<_ACEOF
14034 /* end confdefs.h.  */
14035
14036 /* Override any GCC internal prototype to avoid an error.
14037    Use char because int might match the return type of a GCC
14038    builtin and then its argument prototype would still apply.  */
14039 #ifdef __cplusplus
14040 extern "C"
14041 #endif
14042 char sigtimedwait ();
14043 int
14044 main ()
14045 {
14046 return sigtimedwait ();
14047   ;
14048   return 0;
14049 }
14050 _ACEOF
14051 rm -rf conftest.$ac_objext conftest$ac_exeext
14052 if { (ac_try="$ac_link"
14053 case "(($ac_try" in
14054   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14055   *) ac_try_echo=$ac_try;;
14056 esac
14057 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14058 $as_echo "$ac_try_echo") >&5
14059   (eval "$ac_link") 2>conftest.er1
14060   ac_status=$?
14061   grep -v '^ *+' conftest.er1 >conftest.err
14062   rm -rf conftest.er1
14063   cat conftest.err >&5
14064   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14065   (exit $ac_status); } && {
14066          test -z "$ac_c_werror_flag" ||
14067          test ! -s conftest.err
14068        } && test -s conftest$ac_exeext && {
14069          test "$cross_compiling" = yes ||
14070          $as_test_x conftest$ac_exeext
14071        }; then
14072   ac_cv_lib_rt_sigtimedwait=yes
14073 else
14074   $as_echo "$as_me: failed program was:" >&5
14075 sed 's/^/| /' conftest.$ac_ext >&5
14076
14077         ac_cv_lib_rt_sigtimedwait=no
14078 fi
14079
14080 rm -rf conftest.dSYM
14081 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14082       conftest$ac_exeext conftest.$ac_ext
14083 LIBS=$ac_check_lib_save_LIBS
14084 fi
14085 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
14086 $as_echo "$ac_cv_lib_rt_sigtimedwait" >&6; }
14087 if test "x$ac_cv_lib_rt_sigtimedwait" = x""yes; then
14088   have_timedwait=yes
14089                                       cat >>confdefs.h <<\_ACEOF
14090 #define HAVE_SIGTIMEDWAIT 1
14091 _ACEOF
14092
14093                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
14094 fi
14095
14096     fi
14097
14098     { $as_echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
14099 $as_echo_n "checking how to call pam_strerror... " >&6; }
14100     if test "${ac_cv_pam_strerror_args+set}" = set; then
14101   $as_echo_n "(cached) " >&6
14102 else
14103
14104   ac_save_CPPFLAGS="$CPPFLAGS"
14105   if test \! -z "$includedir" ; then
14106     CPPFLAGS="$CPPFLAGS -I$includedir"
14107   fi
14108   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14109   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14110   cat >conftest.$ac_ext <<_ACEOF
14111 /* confdefs.h.  */
14112 _ACEOF
14113 cat confdefs.h >>conftest.$ac_ext
14114 cat >>conftest.$ac_ext <<_ACEOF
14115 /* end confdefs.h.  */
14116 #include <stdio.h>
14117                         #include <stdlib.h>
14118                         #include <security/pam_appl.h>
14119 int
14120 main ()
14121 {
14122 pam_handle_t *pamh = 0;
14123                         char *s = pam_strerror(pamh, PAM_SUCCESS);
14124   ;
14125   return 0;
14126 }
14127 _ACEOF
14128 rm -rf conftest.$ac_objext
14129 if { (ac_try="$ac_compile"
14130 case "(($ac_try" in
14131   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14132   *) ac_try_echo=$ac_try;;
14133 esac
14134 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14135 $as_echo "$ac_try_echo") >&5
14136   (eval "$ac_compile") 2>conftest.er1
14137   ac_status=$?
14138   grep -v '^ *+' conftest.er1 >conftest.err
14139   rm -rf conftest.er1
14140   cat conftest.err >&5
14141   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14142   (exit $ac_status); } && {
14143          test -z "$ac_c_werror_flag" ||
14144          test ! -s conftest.err
14145        } && test -s conftest.$ac_objext; then
14146   ac_pam_strerror_args=2
14147 else
14148   $as_echo "$as_me: failed program was:" >&5
14149 sed 's/^/| /' conftest.$ac_ext >&5
14150
14151
14152   ac_save_CPPFLAGS="$CPPFLAGS"
14153   if test \! -z "$includedir" ; then
14154     CPPFLAGS="$CPPFLAGS -I$includedir"
14155   fi
14156   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14157   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14158   cat >conftest.$ac_ext <<_ACEOF
14159 /* confdefs.h.  */
14160 _ACEOF
14161 cat confdefs.h >>conftest.$ac_ext
14162 cat >>conftest.$ac_ext <<_ACEOF
14163 /* end confdefs.h.  */
14164 #include <stdio.h>
14165                                           #include <stdlib.h>
14166                                           #include <security/pam_appl.h>
14167 int
14168 main ()
14169 {
14170 char *s =
14171                                            pam_strerror(PAM_SUCCESS);
14172   ;
14173   return 0;
14174 }
14175 _ACEOF
14176 rm -rf conftest.$ac_objext
14177 if { (ac_try="$ac_compile"
14178 case "(($ac_try" in
14179   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14180   *) ac_try_echo=$ac_try;;
14181 esac
14182 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14183 $as_echo "$ac_try_echo") >&5
14184   (eval "$ac_compile") 2>conftest.er1
14185   ac_status=$?
14186   grep -v '^ *+' conftest.er1 >conftest.err
14187   rm -rf conftest.er1
14188   cat conftest.err >&5
14189   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14190   (exit $ac_status); } && {
14191          test -z "$ac_c_werror_flag" ||
14192          test ! -s conftest.err
14193        } && test -s conftest.$ac_objext; then
14194   ac_pam_strerror_args=1
14195 else
14196   $as_echo "$as_me: failed program was:" >&5
14197 sed 's/^/| /' conftest.$ac_ext >&5
14198
14199         ac_pam_strerror_args=0
14200 fi
14201
14202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14203   CPPFLAGS="$ac_save_CPPFLAGS"
14204 fi
14205
14206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14207   CPPFLAGS="$ac_save_CPPFLAGS"
14208       ac_cv_pam_strerror_args=$ac_pam_strerror_args
14209 fi
14210
14211     ac_pam_strerror_args=$ac_cv_pam_strerror_args
14212     if test "$ac_pam_strerror_args" = 1 ; then
14213       { $as_echo "$as_me:$LINENO: result: one argument" >&5
14214 $as_echo "one argument" >&6; }
14215     elif test "$ac_pam_strerror_args" = 2 ; then
14216       cat >>confdefs.h <<\_ACEOF
14217 #define PAM_STRERROR_TWO_ARGS 1
14218 _ACEOF
14219
14220       { $as_echo "$as_me:$LINENO: result: two arguments" >&5
14221 $as_echo "two arguments" >&6; }
14222     else
14223       { $as_echo "$as_me:$LINENO: result: unknown" >&5
14224 $as_echo "unknown" >&6; }
14225     fi
14226
14227 # Check pam_fail_delay
14228     { $as_echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
14229 $as_echo_n "checking pam_fail_delay in -lpam... " >&6; }
14230     if test "${ac_cv_pam_fail_delay+set}" = set; then
14231   $as_echo_n "(cached) " >&6
14232 else
14233   ac_save_LDFLAGS="$LDFLAGS"
14234       LDFLAGS="-lpam"
14235       cat >conftest.$ac_ext <<_ACEOF
14236 /* confdefs.h.  */
14237 _ACEOF
14238 cat confdefs.h >>conftest.$ac_ext
14239 cat >>conftest.$ac_ext <<_ACEOF
14240 /* end confdefs.h.  */
14241 #include <security/pam_appl.h>
14242 int
14243 main ()
14244 {
14245 pam_handle_t *pamh = 0;
14246                    unsigned int usec = 1;
14247                    int status = pam_fail_delay (pamh, usec);
14248   ;
14249   return 0;
14250 }
14251 _ACEOF
14252 rm -rf conftest.$ac_objext conftest$ac_exeext
14253 if { (ac_try="$ac_link"
14254 case "(($ac_try" in
14255   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14256   *) ac_try_echo=$ac_try;;
14257 esac
14258 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14259 $as_echo "$ac_try_echo") >&5
14260   (eval "$ac_link") 2>conftest.er1
14261   ac_status=$?
14262   grep -v '^ *+' conftest.er1 >conftest.err
14263   rm -rf conftest.er1
14264   cat conftest.err >&5
14265   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14266   (exit $ac_status); } && {
14267          test -z "$ac_c_werror_flag" ||
14268          test ! -s conftest.err
14269        } && test -s conftest$ac_exeext && {
14270          test "$cross_compiling" = yes ||
14271          $as_test_x conftest$ac_exeext
14272        }; then
14273   ac_pam_fail_delay=yes
14274 else
14275   $as_echo "$as_me: failed program was:" >&5
14276 sed 's/^/| /' conftest.$ac_ext >&5
14277
14278         ac_pam_fail_delay=no
14279 fi
14280
14281 rm -rf conftest.dSYM
14282 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14283       conftest$ac_exeext conftest.$ac_ext
14284       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
14285       LDFLAGS=$ac_save_LDFLAGS
14286 fi
14287
14288
14289       if test "$ac_pam_fail_delay" = yes ; then
14290         { $as_echo "$as_me:$LINENO: result: yes" >&5
14291 $as_echo "yes" >&6; }
14292         cat >>confdefs.h <<\_ACEOF
14293 #define HAVE_PAM_FAIL_DELAY 1
14294 _ACEOF
14295
14296       else
14297         { $as_echo "$as_me:$LINENO: result: no" >&5
14298 $as_echo "no" >&6; }
14299       fi
14300
14301   fi
14302 fi
14303
14304
14305 ###############################################################################
14306 #
14307 #       Check for Kerberos.
14308 #
14309 ###############################################################################
14310
14311 have_kerberos=no
14312 have_kerberos5=no
14313 with_kerberos_req=unspecified
14314
14315
14316 # Check whether --with-kerberos was given.
14317 if test "${with_kerberos+set}" = set; then
14318   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
14319 else
14320   with_kerberos=yes
14321 fi
14322
14323
14324
14325    case "$with_kerberos" in
14326     yes) ;;
14327     no)  ;;
14328
14329     /*)
14330      { $as_echo "$as_me:$LINENO: checking for Kerberos headers" >&5
14331 $as_echo_n "checking for Kerberos headers... " >&6; }
14332      d=$with_kerberos/include
14333      if test -d $d; then
14334        X_CFLAGS="-I$d $X_CFLAGS"
14335        { $as_echo "$as_me:$LINENO: result: $d" >&5
14336 $as_echo "$d" >&6; }
14337      else
14338        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14339 $as_echo "not found ($d: no such directory)" >&6; }
14340      fi
14341
14342      { $as_echo "$as_me:$LINENO: checking for Kerberos libs" >&5
14343 $as_echo_n "checking for Kerberos libs... " >&6; }
14344      d=$with_kerberos/lib
14345      if test -d $d; then
14346        X_LIBS="-L$d $X_LIBS"
14347        { $as_echo "$as_me:$LINENO: result: $d" >&5
14348 $as_echo "$d" >&6; }
14349      else
14350        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14351 $as_echo "not found ($d: no such directory)" >&6; }
14352      fi
14353
14354      # replace the directory string with "yes".
14355      with_kerberos_req="yes"
14356      with_kerberos=$with_kerberos_req
14357      ;;
14358
14359     *)
14360      echo ""
14361      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
14362      echo "       If it is a directory, then \`DIR/include' will be added to"
14363      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14364      exit 1
14365      ;;
14366    esac
14367
14368
14369 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
14370   { $as_echo "$as_me:$LINENO: checking for Kerberos 4" >&5
14371 $as_echo_n "checking for Kerberos 4... " >&6; }
14372 if test "${ac_cv_kerberos+set}" = set; then
14373   $as_echo_n "(cached) " >&6
14374 else
14375
14376   ac_save_CPPFLAGS="$CPPFLAGS"
14377   if test \! -z "$includedir" ; then
14378     CPPFLAGS="$CPPFLAGS -I$includedir"
14379   fi
14380   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14381   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14382   cat >conftest.$ac_ext <<_ACEOF
14383 /* confdefs.h.  */
14384 _ACEOF
14385 cat confdefs.h >>conftest.$ac_ext
14386 cat >>conftest.$ac_ext <<_ACEOF
14387 /* end confdefs.h.  */
14388 #include <krb.h>
14389 int
14390 main ()
14391 {
14392
14393   ;
14394   return 0;
14395 }
14396 _ACEOF
14397 rm -rf conftest.$ac_objext
14398 if { (ac_try="$ac_compile"
14399 case "(($ac_try" in
14400   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14401   *) ac_try_echo=$ac_try;;
14402 esac
14403 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14404 $as_echo "$ac_try_echo") >&5
14405   (eval "$ac_compile") 2>conftest.er1
14406   ac_status=$?
14407   grep -v '^ *+' conftest.er1 >conftest.err
14408   rm -rf conftest.er1
14409   cat conftest.err >&5
14410   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14411   (exit $ac_status); } && {
14412          test -z "$ac_c_werror_flag" ||
14413          test ! -s conftest.err
14414        } && test -s conftest.$ac_objext; then
14415   ac_cv_kerberos=yes
14416 else
14417   $as_echo "$as_me: failed program was:" >&5
14418 sed 's/^/| /' conftest.$ac_ext >&5
14419
14420         ac_cv_kerberos=no
14421 fi
14422
14423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14424   CPPFLAGS="$ac_save_CPPFLAGS"
14425 fi
14426 { $as_echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
14427 $as_echo "$ac_cv_kerberos" >&6; }
14428   { $as_echo "$as_me:$LINENO: checking for Kerberos 5" >&5
14429 $as_echo_n "checking for Kerberos 5... " >&6; }
14430 if test "${ac_cv_kerberos5+set}" = set; then
14431   $as_echo_n "(cached) " >&6
14432 else
14433
14434   ac_save_CPPFLAGS="$CPPFLAGS"
14435   if test \! -z "$includedir" ; then
14436     CPPFLAGS="$CPPFLAGS -I$includedir"
14437   fi
14438   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14439   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14440   cat >conftest.$ac_ext <<_ACEOF
14441 /* confdefs.h.  */
14442 _ACEOF
14443 cat confdefs.h >>conftest.$ac_ext
14444 cat >>conftest.$ac_ext <<_ACEOF
14445 /* end confdefs.h.  */
14446 #include <kerberosIV/krb.h>
14447 int
14448 main ()
14449 {
14450
14451   ;
14452   return 0;
14453 }
14454 _ACEOF
14455 rm -rf conftest.$ac_objext
14456 if { (ac_try="$ac_compile"
14457 case "(($ac_try" in
14458   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14459   *) ac_try_echo=$ac_try;;
14460 esac
14461 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14462 $as_echo "$ac_try_echo") >&5
14463   (eval "$ac_compile") 2>conftest.er1
14464   ac_status=$?
14465   grep -v '^ *+' conftest.er1 >conftest.err
14466   rm -rf conftest.er1
14467   cat conftest.err >&5
14468   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14469   (exit $ac_status); } && {
14470          test -z "$ac_c_werror_flag" ||
14471          test ! -s conftest.err
14472        } && test -s conftest.$ac_objext; then
14473   ac_cv_kerberos5=yes
14474 else
14475   $as_echo "$as_me: failed program was:" >&5
14476 sed 's/^/| /' conftest.$ac_ext >&5
14477
14478         ac_cv_kerberos5=no
14479 fi
14480
14481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14482   CPPFLAGS="$ac_save_CPPFLAGS"
14483 fi
14484 { $as_echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
14485 $as_echo "$ac_cv_kerberos5" >&6; }
14486
14487   if test "$ac_cv_kerberos" = yes ; then
14488     have_kerberos=yes
14489     cat >>confdefs.h <<\_ACEOF
14490 #define HAVE_KERBEROS 1
14491 _ACEOF
14492
14493   fi
14494
14495   if test "$ac_cv_kerberos5" = yes ; then
14496
14497     # Andrew Snare <ajs@pigpond.com> wrote:
14498     #
14499     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
14500     # (krb4) was also available.  This turns out not to be the case with
14501     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
14502     # is optional.
14503     #
14504     # So, disable kerberosV support if libkrb4 can't be found.
14505     # This is not the best solution, but it makes the compile not fail.
14506     #
14507
14508   ac_save_CPPFLAGS="$CPPFLAGS"
14509   ac_save_LDFLAGS="$LDFLAGS"
14510 #  ac_save_LIBS="$LIBS"
14511
14512   if test \! -z "$includedir" ; then
14513     CPPFLAGS="$CPPFLAGS -I$includedir"
14514   fi
14515   # note: $X_CFLAGS includes $x_includes
14516   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14517
14518   if test \! -z "$libdir" ; then
14519     LDFLAGS="$LDFLAGS -L$libdir"
14520   fi
14521   # note: $X_LIBS includes $x_libraries
14522   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14523
14524   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14525   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14526   { $as_echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
14527 $as_echo_n "checking for krb_get_tf_realm in -lkrb4... " >&6; }
14528 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
14529   $as_echo_n "(cached) " >&6
14530 else
14531   ac_check_lib_save_LIBS=$LIBS
14532 LIBS="-lkrb4  $LIBS"
14533 cat >conftest.$ac_ext <<_ACEOF
14534 /* confdefs.h.  */
14535 _ACEOF
14536 cat confdefs.h >>conftest.$ac_ext
14537 cat >>conftest.$ac_ext <<_ACEOF
14538 /* end confdefs.h.  */
14539
14540 /* Override any GCC internal prototype to avoid an error.
14541    Use char because int might match the return type of a GCC
14542    builtin and then its argument prototype would still apply.  */
14543 #ifdef __cplusplus
14544 extern "C"
14545 #endif
14546 char krb_get_tf_realm ();
14547 int
14548 main ()
14549 {
14550 return krb_get_tf_realm ();
14551   ;
14552   return 0;
14553 }
14554 _ACEOF
14555 rm -rf conftest.$ac_objext conftest$ac_exeext
14556 if { (ac_try="$ac_link"
14557 case "(($ac_try" in
14558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14559   *) ac_try_echo=$ac_try;;
14560 esac
14561 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14562 $as_echo "$ac_try_echo") >&5
14563   (eval "$ac_link") 2>conftest.er1
14564   ac_status=$?
14565   grep -v '^ *+' conftest.er1 >conftest.err
14566   rm -rf conftest.er1
14567   cat conftest.err >&5
14568   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14569   (exit $ac_status); } && {
14570          test -z "$ac_c_werror_flag" ||
14571          test ! -s conftest.err
14572        } && test -s conftest$ac_exeext && {
14573          test "$cross_compiling" = yes ||
14574          $as_test_x conftest$ac_exeext
14575        }; then
14576   ac_cv_lib_krb4_krb_get_tf_realm=yes
14577 else
14578   $as_echo "$as_me: failed program was:" >&5
14579 sed 's/^/| /' conftest.$ac_ext >&5
14580
14581         ac_cv_lib_krb4_krb_get_tf_realm=no
14582 fi
14583
14584 rm -rf conftest.dSYM
14585 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14586       conftest$ac_exeext conftest.$ac_ext
14587 LIBS=$ac_check_lib_save_LIBS
14588 fi
14589 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
14590 $as_echo "$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
14591 if test "x$ac_cv_lib_krb4_krb_get_tf_realm" = x""yes; then
14592   have_kerberos=yes
14593 else
14594   have_kerberos=no
14595 fi
14596
14597   CPPFLAGS="$ac_save_CPPFLAGS"
14598   LDFLAGS="$ac_save_LDFLAGS"
14599 #  LIBS="$ac_save_LIBS"
14600
14601     if test "$have_kerberos" = yes ; then
14602       have_kerberos5=yes
14603       cat >>confdefs.h <<\_ACEOF
14604 #define HAVE_KERBEROS 1
14605 _ACEOF
14606
14607       cat >>confdefs.h <<\_ACEOF
14608 #define HAVE_KERBEROS5 1
14609 _ACEOF
14610
14611     else
14612       have_kerberos5=no
14613       { $as_echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
14614 $as_echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
14615     fi
14616
14617   fi
14618
14619   if test "$have_kerberos5" = yes ; then
14620     # from Matt Knopp <mhat@infocalypse.netlag.com>
14621     # (who got it from amu@mit.edu)
14622
14623     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
14624
14625     # jwz: MacOS X uses -lkrb5, but not -lcrypt
14626
14627   ac_save_CPPFLAGS="$CPPFLAGS"
14628   ac_save_LDFLAGS="$LDFLAGS"
14629 #  ac_save_LIBS="$LIBS"
14630
14631   if test \! -z "$includedir" ; then
14632     CPPFLAGS="$CPPFLAGS -I$includedir"
14633   fi
14634   # note: $X_CFLAGS includes $x_includes
14635   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14636
14637   if test \! -z "$libdir" ; then
14638     LDFLAGS="$LDFLAGS -L$libdir"
14639   fi
14640   # note: $X_LIBS includes $x_libraries
14641   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14642
14643   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14644   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
14645   { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14646 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
14647 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14648   $as_echo_n "(cached) " >&6
14649 else
14650   ac_check_lib_save_LIBS=$LIBS
14651 LIBS="-lcrypt  $LIBS"
14652 cat >conftest.$ac_ext <<_ACEOF
14653 /* confdefs.h.  */
14654 _ACEOF
14655 cat confdefs.h >>conftest.$ac_ext
14656 cat >>conftest.$ac_ext <<_ACEOF
14657 /* end confdefs.h.  */
14658
14659 /* Override any GCC internal prototype to avoid an error.
14660    Use char because int might match the return type of a GCC
14661    builtin and then its argument prototype would still apply.  */
14662 #ifdef __cplusplus
14663 extern "C"
14664 #endif
14665 char crypt ();
14666 int
14667 main ()
14668 {
14669 return crypt ();
14670   ;
14671   return 0;
14672 }
14673 _ACEOF
14674 rm -rf conftest.$ac_objext conftest$ac_exeext
14675 if { (ac_try="$ac_link"
14676 case "(($ac_try" in
14677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14678   *) ac_try_echo=$ac_try;;
14679 esac
14680 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14681 $as_echo "$ac_try_echo") >&5
14682   (eval "$ac_link") 2>conftest.er1
14683   ac_status=$?
14684   grep -v '^ *+' conftest.er1 >conftest.err
14685   rm -rf conftest.er1
14686   cat conftest.err >&5
14687   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14688   (exit $ac_status); } && {
14689          test -z "$ac_c_werror_flag" ||
14690          test ! -s conftest.err
14691        } && test -s conftest$ac_exeext && {
14692          test "$cross_compiling" = yes ||
14693          $as_test_x conftest$ac_exeext
14694        }; then
14695   ac_cv_lib_crypt_crypt=yes
14696 else
14697   $as_echo "$as_me: failed program was:" >&5
14698 sed 's/^/| /' conftest.$ac_ext >&5
14699
14700         ac_cv_lib_crypt_crypt=no
14701 fi
14702
14703 rm -rf conftest.dSYM
14704 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14705       conftest$ac_exeext conftest.$ac_ext
14706 LIBS=$ac_check_lib_save_LIBS
14707 fi
14708 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14709 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
14710 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
14711   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14712 fi
14713
14714   CPPFLAGS="$ac_save_CPPFLAGS"
14715   LDFLAGS="$ac_save_LDFLAGS"
14716 #  LIBS="$ac_save_LIBS"
14717
14718
14719   elif test "$have_kerberos" = yes ; then
14720     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
14721     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
14722   fi
14723
14724   if test "$have_kerberos" = yes ; then
14725     { $as_echo "$as_me:$LINENO: checking for res_search" >&5
14726 $as_echo_n "checking for res_search... " >&6; }
14727 if test "${ac_cv_func_res_search+set}" = set; then
14728   $as_echo_n "(cached) " >&6
14729 else
14730   cat >conftest.$ac_ext <<_ACEOF
14731 /* confdefs.h.  */
14732 _ACEOF
14733 cat confdefs.h >>conftest.$ac_ext
14734 cat >>conftest.$ac_ext <<_ACEOF
14735 /* end confdefs.h.  */
14736 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
14737    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14738 #define res_search innocuous_res_search
14739
14740 /* System header to define __stub macros and hopefully few prototypes,
14741     which can conflict with char res_search (); below.
14742     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14743     <limits.h> exists even on freestanding compilers.  */
14744
14745 #ifdef __STDC__
14746 # include <limits.h>
14747 #else
14748 # include <assert.h>
14749 #endif
14750
14751 #undef res_search
14752
14753 /* Override any GCC internal prototype to avoid an error.
14754    Use char because int might match the return type of a GCC
14755    builtin and then its argument prototype would still apply.  */
14756 #ifdef __cplusplus
14757 extern "C"
14758 #endif
14759 char res_search ();
14760 /* The GNU C library defines this for functions which it implements
14761     to always fail with ENOSYS.  Some functions are actually named
14762     something starting with __ and the normal name is an alias.  */
14763 #if defined __stub_res_search || defined __stub___res_search
14764 choke me
14765 #endif
14766
14767 int
14768 main ()
14769 {
14770 return res_search ();
14771   ;
14772   return 0;
14773 }
14774 _ACEOF
14775 rm -rf conftest.$ac_objext conftest$ac_exeext
14776 if { (ac_try="$ac_link"
14777 case "(($ac_try" in
14778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14779   *) ac_try_echo=$ac_try;;
14780 esac
14781 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14782 $as_echo "$ac_try_echo") >&5
14783   (eval "$ac_link") 2>conftest.er1
14784   ac_status=$?
14785   grep -v '^ *+' conftest.er1 >conftest.err
14786   rm -rf conftest.er1
14787   cat conftest.err >&5
14788   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14789   (exit $ac_status); } && {
14790          test -z "$ac_c_werror_flag" ||
14791          test ! -s conftest.err
14792        } && test -s conftest$ac_exeext && {
14793          test "$cross_compiling" = yes ||
14794          $as_test_x conftest$ac_exeext
14795        }; then
14796   ac_cv_func_res_search=yes
14797 else
14798   $as_echo "$as_me: failed program was:" >&5
14799 sed 's/^/| /' conftest.$ac_ext >&5
14800
14801         ac_cv_func_res_search=no
14802 fi
14803
14804 rm -rf conftest.dSYM
14805 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14806       conftest$ac_exeext conftest.$ac_ext
14807 fi
14808 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
14809 $as_echo "$ac_cv_func_res_search" >&6; }
14810 if test "x$ac_cv_func_res_search" = x""yes; then
14811   :
14812 else
14813   { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
14814 $as_echo_n "checking for res_search in -lresolv... " >&6; }
14815 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
14816   $as_echo_n "(cached) " >&6
14817 else
14818   ac_check_lib_save_LIBS=$LIBS
14819 LIBS="-lresolv  $LIBS"
14820 cat >conftest.$ac_ext <<_ACEOF
14821 /* confdefs.h.  */
14822 _ACEOF
14823 cat confdefs.h >>conftest.$ac_ext
14824 cat >>conftest.$ac_ext <<_ACEOF
14825 /* end confdefs.h.  */
14826
14827 /* Override any GCC internal prototype to avoid an error.
14828    Use char because int might match the return type of a GCC
14829    builtin and then its argument prototype would still apply.  */
14830 #ifdef __cplusplus
14831 extern "C"
14832 #endif
14833 char res_search ();
14834 int
14835 main ()
14836 {
14837 return res_search ();
14838   ;
14839   return 0;
14840 }
14841 _ACEOF
14842 rm -rf conftest.$ac_objext conftest$ac_exeext
14843 if { (ac_try="$ac_link"
14844 case "(($ac_try" in
14845   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14846   *) ac_try_echo=$ac_try;;
14847 esac
14848 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14849 $as_echo "$ac_try_echo") >&5
14850   (eval "$ac_link") 2>conftest.er1
14851   ac_status=$?
14852   grep -v '^ *+' conftest.er1 >conftest.err
14853   rm -rf conftest.er1
14854   cat conftest.err >&5
14855   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14856   (exit $ac_status); } && {
14857          test -z "$ac_c_werror_flag" ||
14858          test ! -s conftest.err
14859        } && test -s conftest$ac_exeext && {
14860          test "$cross_compiling" = yes ||
14861          $as_test_x conftest$ac_exeext
14862        }; then
14863   ac_cv_lib_resolv_res_search=yes
14864 else
14865   $as_echo "$as_me: failed program was:" >&5
14866 sed 's/^/| /' conftest.$ac_ext >&5
14867
14868         ac_cv_lib_resolv_res_search=no
14869 fi
14870
14871 rm -rf conftest.dSYM
14872 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14873       conftest$ac_exeext conftest.$ac_ext
14874 LIBS=$ac_check_lib_save_LIBS
14875 fi
14876 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
14877 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
14878 if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
14879   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
14880 else
14881   { $as_echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
14882 $as_echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
14883
14884 fi
14885
14886 fi
14887
14888   fi
14889 fi
14890
14891
14892 ###############################################################################
14893 #
14894 #       Check for the nine billion variants of shadow passwords...
14895 #
14896 ###############################################################################
14897
14898 need_setuid=no
14899
14900 have_shadow=no
14901 with_shadow_req=unspecified
14902
14903
14904 # Check whether --with-shadow was given.
14905 if test "${with_shadow+set}" = set; then
14906   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
14907 else
14908   with_shadow=yes
14909 fi
14910
14911
14912
14913    case "$with_shadow" in
14914     yes) ;;
14915     no)  ;;
14916
14917     /*)
14918      { $as_echo "$as_me:$LINENO: checking for shadow password headers" >&5
14919 $as_echo_n "checking for shadow password headers... " >&6; }
14920      d=$with_shadow/include
14921      if test -d $d; then
14922        X_CFLAGS="-I$d $X_CFLAGS"
14923        { $as_echo "$as_me:$LINENO: result: $d" >&5
14924 $as_echo "$d" >&6; }
14925      else
14926        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14927 $as_echo "not found ($d: no such directory)" >&6; }
14928      fi
14929
14930      { $as_echo "$as_me:$LINENO: checking for shadow password libs" >&5
14931 $as_echo_n "checking for shadow password libs... " >&6; }
14932      d=$with_shadow/lib
14933      if test -d $d; then
14934        X_LIBS="-L$d $X_LIBS"
14935        { $as_echo "$as_me:$LINENO: result: $d" >&5
14936 $as_echo "$d" >&6; }
14937      else
14938        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14939 $as_echo "not found ($d: no such directory)" >&6; }
14940      fi
14941
14942      # replace the directory string with "yes".
14943      with_shadow_req="yes"
14944      with_shadow=$with_shadow_req
14945      ;;
14946
14947     *)
14948      echo ""
14949      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
14950      echo "       If it is a directory, then \`DIR/include' will be added to"
14951      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14952      exit 1
14953      ;;
14954    esac
14955
14956
14957 if test "$enable_locking" = no ; then
14958   with_shadow_req=no
14959   with_shadow=no
14960 fi
14961
14962
14963 ###############################################################################
14964 #
14965 #       Check for Sun "adjunct" passwords.
14966 #
14967 ###############################################################################
14968
14969 if test "$with_shadow" = yes ; then
14970   { $as_echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
14971 $as_echo_n "checking for Sun-style shadow passwords... " >&6; }
14972 if test "${ac_cv_sun_adjunct+set}" = set; then
14973   $as_echo_n "(cached) " >&6
14974 else
14975
14976   ac_save_CPPFLAGS="$CPPFLAGS"
14977   if test \! -z "$includedir" ; then
14978     CPPFLAGS="$CPPFLAGS -I$includedir"
14979   fi
14980   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14981   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14982   cat >conftest.$ac_ext <<_ACEOF
14983 /* confdefs.h.  */
14984 _ACEOF
14985 cat confdefs.h >>conftest.$ac_ext
14986 cat >>conftest.$ac_ext <<_ACEOF
14987 /* end confdefs.h.  */
14988 #include <stdlib.h>
14989                                     #include <unistd.h>
14990                                     #include <sys/types.h>
14991                                     #include <sys/label.h>
14992                                     #include <sys/audit.h>
14993                                     #include <pwdadj.h>
14994 int
14995 main ()
14996 {
14997 struct passwd_adjunct *p = getpwanam("nobody");
14998                        const char *pw = p->pwa_passwd;
14999   ;
15000   return 0;
15001 }
15002 _ACEOF
15003 rm -rf conftest.$ac_objext
15004 if { (ac_try="$ac_compile"
15005 case "(($ac_try" in
15006   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15007   *) ac_try_echo=$ac_try;;
15008 esac
15009 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15010 $as_echo "$ac_try_echo") >&5
15011   (eval "$ac_compile") 2>conftest.er1
15012   ac_status=$?
15013   grep -v '^ *+' conftest.er1 >conftest.err
15014   rm -rf conftest.er1
15015   cat conftest.err >&5
15016   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15017   (exit $ac_status); } && {
15018          test -z "$ac_c_werror_flag" ||
15019          test ! -s conftest.err
15020        } && test -s conftest.$ac_objext; then
15021   ac_cv_sun_adjunct=yes
15022 else
15023   $as_echo "$as_me: failed program was:" >&5
15024 sed 's/^/| /' conftest.$ac_ext >&5
15025
15026         ac_cv_sun_adjunct=no
15027 fi
15028
15029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15030   CPPFLAGS="$ac_save_CPPFLAGS"
15031 fi
15032 { $as_echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
15033 $as_echo "$ac_cv_sun_adjunct" >&6; }
15034   if test "$ac_cv_sun_adjunct" = yes; then
15035     have_shadow_adjunct=yes
15036     have_shadow=yes
15037     need_setuid=yes
15038   fi
15039 fi
15040
15041
15042 ###############################################################################
15043 #
15044 #       Check for DEC and SCO so-called "enhanced" security.
15045 #
15046 ###############################################################################
15047
15048 if test "$with_shadow" = yes ; then
15049   { $as_echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
15050 $as_echo_n "checking for DEC-style shadow passwords... " >&6; }
15051 if test "${ac_cv_enhanced_passwd+set}" = set; then
15052   $as_echo_n "(cached) " >&6
15053 else
15054
15055   ac_save_CPPFLAGS="$CPPFLAGS"
15056   if test \! -z "$includedir" ; then
15057     CPPFLAGS="$CPPFLAGS -I$includedir"
15058   fi
15059   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15060   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15061   cat >conftest.$ac_ext <<_ACEOF
15062 /* confdefs.h.  */
15063 _ACEOF
15064 cat confdefs.h >>conftest.$ac_ext
15065 cat >>conftest.$ac_ext <<_ACEOF
15066 /* end confdefs.h.  */
15067 #include <stdlib.h>
15068                                     #include <unistd.h>
15069                                     #include <sys/types.h>
15070                                     #include <pwd.h>
15071                                     #include <sys/security.h>
15072                                     #include <prot.h>
15073 int
15074 main ()
15075 {
15076 struct pr_passwd *p;
15077                        const char *pw;
15078                        set_auth_parameters(0, 0);
15079                        check_auth_parameters();
15080                        p = getprpwnam("nobody");
15081                        pw = p->ufld.fd_encrypt;
15082   ;
15083   return 0;
15084 }
15085 _ACEOF
15086 rm -rf conftest.$ac_objext
15087 if { (ac_try="$ac_compile"
15088 case "(($ac_try" in
15089   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15090   *) ac_try_echo=$ac_try;;
15091 esac
15092 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15093 $as_echo "$ac_try_echo") >&5
15094   (eval "$ac_compile") 2>conftest.er1
15095   ac_status=$?
15096   grep -v '^ *+' conftest.er1 >conftest.err
15097   rm -rf conftest.er1
15098   cat conftest.err >&5
15099   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15100   (exit $ac_status); } && {
15101          test -z "$ac_c_werror_flag" ||
15102          test ! -s conftest.err
15103        } && test -s conftest.$ac_objext; then
15104   ac_cv_enhanced_passwd=yes
15105 else
15106   $as_echo "$as_me: failed program was:" >&5
15107 sed 's/^/| /' conftest.$ac_ext >&5
15108
15109         ac_cv_enhanced_passwd=no
15110 fi
15111
15112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15113   CPPFLAGS="$ac_save_CPPFLAGS"
15114 fi
15115 { $as_echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
15116 $as_echo "$ac_cv_enhanced_passwd" >&6; }
15117   if test $ac_cv_enhanced_passwd = yes; then
15118     have_shadow_enhanced=yes
15119     have_shadow=yes
15120     need_setuid=yes
15121
15122     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
15123     # (I'm told it needs -lcurses too, but I don't understand why.)
15124     # But on DEC, it's in -lsecurity.
15125     #
15126     { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
15127 $as_echo_n "checking for getprpwnam in -lprot... " >&6; }
15128 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
15129   $as_echo_n "(cached) " >&6
15130 else
15131   ac_check_lib_save_LIBS=$LIBS
15132 LIBS="-lprot -lx $LIBS"
15133 cat >conftest.$ac_ext <<_ACEOF
15134 /* confdefs.h.  */
15135 _ACEOF
15136 cat confdefs.h >>conftest.$ac_ext
15137 cat >>conftest.$ac_ext <<_ACEOF
15138 /* end confdefs.h.  */
15139
15140 /* Override any GCC internal prototype to avoid an error.
15141    Use char because int might match the return type of a GCC
15142    builtin and then its argument prototype would still apply.  */
15143 #ifdef __cplusplus
15144 extern "C"
15145 #endif
15146 char getprpwnam ();
15147 int
15148 main ()
15149 {
15150 return getprpwnam ();
15151   ;
15152   return 0;
15153 }
15154 _ACEOF
15155 rm -rf conftest.$ac_objext conftest$ac_exeext
15156 if { (ac_try="$ac_link"
15157 case "(($ac_try" in
15158   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15159   *) ac_try_echo=$ac_try;;
15160 esac
15161 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15162 $as_echo "$ac_try_echo") >&5
15163   (eval "$ac_link") 2>conftest.er1
15164   ac_status=$?
15165   grep -v '^ *+' conftest.er1 >conftest.err
15166   rm -rf conftest.er1
15167   cat conftest.err >&5
15168   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15169   (exit $ac_status); } && {
15170          test -z "$ac_c_werror_flag" ||
15171          test ! -s conftest.err
15172        } && test -s conftest$ac_exeext && {
15173          test "$cross_compiling" = yes ||
15174          $as_test_x conftest$ac_exeext
15175        }; then
15176   ac_cv_lib_prot_getprpwnam=yes
15177 else
15178   $as_echo "$as_me: failed program was:" >&5
15179 sed 's/^/| /' conftest.$ac_ext >&5
15180
15181         ac_cv_lib_prot_getprpwnam=no
15182 fi
15183
15184 rm -rf conftest.dSYM
15185 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15186       conftest$ac_exeext conftest.$ac_ext
15187 LIBS=$ac_check_lib_save_LIBS
15188 fi
15189 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
15190 $as_echo "$ac_cv_lib_prot_getprpwnam" >&6; }
15191 if test "x$ac_cv_lib_prot_getprpwnam" = x""yes; then
15192   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
15193 else
15194   { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
15195 $as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
15196 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
15197   $as_echo_n "(cached) " >&6
15198 else
15199   ac_check_lib_save_LIBS=$LIBS
15200 LIBS="-lsecurity  $LIBS"
15201 cat >conftest.$ac_ext <<_ACEOF
15202 /* confdefs.h.  */
15203 _ACEOF
15204 cat confdefs.h >>conftest.$ac_ext
15205 cat >>conftest.$ac_ext <<_ACEOF
15206 /* end confdefs.h.  */
15207
15208 /* Override any GCC internal prototype to avoid an error.
15209    Use char because int might match the return type of a GCC
15210    builtin and then its argument prototype would still apply.  */
15211 #ifdef __cplusplus
15212 extern "C"
15213 #endif
15214 char getprpwnam ();
15215 int
15216 main ()
15217 {
15218 return getprpwnam ();
15219   ;
15220   return 0;
15221 }
15222 _ACEOF
15223 rm -rf conftest.$ac_objext conftest$ac_exeext
15224 if { (ac_try="$ac_link"
15225 case "(($ac_try" in
15226   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15227   *) ac_try_echo=$ac_try;;
15228 esac
15229 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15230 $as_echo "$ac_try_echo") >&5
15231   (eval "$ac_link") 2>conftest.er1
15232   ac_status=$?
15233   grep -v '^ *+' conftest.er1 >conftest.err
15234   rm -rf conftest.er1
15235   cat conftest.err >&5
15236   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15237   (exit $ac_status); } && {
15238          test -z "$ac_c_werror_flag" ||
15239          test ! -s conftest.err
15240        } && test -s conftest$ac_exeext && {
15241          test "$cross_compiling" = yes ||
15242          $as_test_x conftest$ac_exeext
15243        }; then
15244   ac_cv_lib_security_getprpwnam=yes
15245 else
15246   $as_echo "$as_me: failed program was:" >&5
15247 sed 's/^/| /' conftest.$ac_ext >&5
15248
15249         ac_cv_lib_security_getprpwnam=no
15250 fi
15251
15252 rm -rf conftest.dSYM
15253 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15254       conftest$ac_exeext conftest.$ac_ext
15255 LIBS=$ac_check_lib_save_LIBS
15256 fi
15257 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
15258 $as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
15259 if test "x$ac_cv_lib_security_getprpwnam" = x""yes; then
15260   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
15261 fi
15262
15263 fi
15264
15265   fi
15266 fi
15267
15268 ###############################################################################
15269 #
15270 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
15271 #
15272 ###############################################################################
15273
15274 if test "$with_shadow" = yes ; then
15275   { $as_echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
15276 $as_echo_n "checking for HP-style shadow passwords... " >&6; }
15277 if test "${ac_cv_hpux_passwd+set}" = set; then
15278   $as_echo_n "(cached) " >&6
15279 else
15280
15281   ac_save_CPPFLAGS="$CPPFLAGS"
15282   if test \! -z "$includedir" ; then
15283     CPPFLAGS="$CPPFLAGS -I$includedir"
15284   fi
15285   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15286   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15287   cat >conftest.$ac_ext <<_ACEOF
15288 /* confdefs.h.  */
15289 _ACEOF
15290 cat confdefs.h >>conftest.$ac_ext
15291 cat >>conftest.$ac_ext <<_ACEOF
15292 /* end confdefs.h.  */
15293 #include <stdlib.h>
15294                                     #include <unistd.h>
15295                                     #include <sys/types.h>
15296                                     #include <pwd.h>
15297                                     #include <hpsecurity.h>
15298                                     #include <prot.h>
15299 int
15300 main ()
15301 {
15302 struct s_passwd *p = getspwnam("nobody");
15303                        const char *pw = p->pw_passwd;
15304   ;
15305   return 0;
15306 }
15307 _ACEOF
15308 rm -rf conftest.$ac_objext
15309 if { (ac_try="$ac_compile"
15310 case "(($ac_try" in
15311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15312   *) ac_try_echo=$ac_try;;
15313 esac
15314 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15315 $as_echo "$ac_try_echo") >&5
15316   (eval "$ac_compile") 2>conftest.er1
15317   ac_status=$?
15318   grep -v '^ *+' conftest.er1 >conftest.err
15319   rm -rf conftest.er1
15320   cat conftest.err >&5
15321   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15322   (exit $ac_status); } && {
15323          test -z "$ac_c_werror_flag" ||
15324          test ! -s conftest.err
15325        } && test -s conftest.$ac_objext; then
15326   ac_cv_hpux_passwd=yes
15327 else
15328   $as_echo "$as_me: failed program was:" >&5
15329 sed 's/^/| /' conftest.$ac_ext >&5
15330
15331         ac_cv_hpux_passwd=no
15332 fi
15333
15334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15335   CPPFLAGS="$ac_save_CPPFLAGS"
15336 fi
15337 { $as_echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
15338 $as_echo "$ac_cv_hpux_passwd" >&6; }
15339   if test "$ac_cv_hpux_passwd" = yes; then
15340     have_shadow_hpux=yes
15341     have_shadow=yes
15342     need_setuid=yes
15343
15344     # on HPUX, bigcrypt is in -lsec
15345     { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
15346 $as_echo_n "checking for bigcrypt in -lsec... " >&6; }
15347 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
15348   $as_echo_n "(cached) " >&6
15349 else
15350   ac_check_lib_save_LIBS=$LIBS
15351 LIBS="-lsec  $LIBS"
15352 cat >conftest.$ac_ext <<_ACEOF
15353 /* confdefs.h.  */
15354 _ACEOF
15355 cat confdefs.h >>conftest.$ac_ext
15356 cat >>conftest.$ac_ext <<_ACEOF
15357 /* end confdefs.h.  */
15358
15359 /* Override any GCC internal prototype to avoid an error.
15360    Use char because int might match the return type of a GCC
15361    builtin and then its argument prototype would still apply.  */
15362 #ifdef __cplusplus
15363 extern "C"
15364 #endif
15365 char bigcrypt ();
15366 int
15367 main ()
15368 {
15369 return bigcrypt ();
15370   ;
15371   return 0;
15372 }
15373 _ACEOF
15374 rm -rf conftest.$ac_objext conftest$ac_exeext
15375 if { (ac_try="$ac_link"
15376 case "(($ac_try" in
15377   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15378   *) ac_try_echo=$ac_try;;
15379 esac
15380 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15381 $as_echo "$ac_try_echo") >&5
15382   (eval "$ac_link") 2>conftest.er1
15383   ac_status=$?
15384   grep -v '^ *+' conftest.er1 >conftest.err
15385   rm -rf conftest.er1
15386   cat conftest.err >&5
15387   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15388   (exit $ac_status); } && {
15389          test -z "$ac_c_werror_flag" ||
15390          test ! -s conftest.err
15391        } && test -s conftest$ac_exeext && {
15392          test "$cross_compiling" = yes ||
15393          $as_test_x conftest$ac_exeext
15394        }; then
15395   ac_cv_lib_sec_bigcrypt=yes
15396 else
15397   $as_echo "$as_me: failed program was:" >&5
15398 sed 's/^/| /' conftest.$ac_ext >&5
15399
15400         ac_cv_lib_sec_bigcrypt=no
15401 fi
15402
15403 rm -rf conftest.dSYM
15404 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15405       conftest$ac_exeext conftest.$ac_ext
15406 LIBS=$ac_check_lib_save_LIBS
15407 fi
15408 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
15409 $as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
15410 if test "x$ac_cv_lib_sec_bigcrypt" = x""yes; then
15411   PASSWD_LIBS="$PASSWD_LIBS -lsec"
15412 fi
15413
15414   fi
15415 fi
15416
15417
15418 ###############################################################################
15419 #
15420 #       Check for FreeBSD-style shadow passwords.
15421 #
15422 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
15423 #       password systems -- except you only get stuff in the pw_passwd field
15424 #       if the running program is setuid.  So, guess that we've got this
15425 #       lossage to contend with if /etc/master.passwd exists, and default to
15426 #       a setuid installation.
15427 #
15428 ###############################################################################
15429
15430 if test "$with_shadow" = yes ; then
15431   { $as_echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
15432 $as_echo_n "checking for FreeBSD-style shadow passwords... " >&6; }
15433 if test "${ac_cv_master_passwd+set}" = set; then
15434   $as_echo_n "(cached) " >&6
15435 else
15436   if test -f /etc/master.passwd ; then
15437                     ac_cv_master_passwd=yes
15438                   else
15439                     ac_cv_master_passwd=no
15440                   fi
15441 fi
15442 { $as_echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
15443 $as_echo "$ac_cv_master_passwd" >&6; }
15444   if test "$ac_cv_master_passwd" = yes; then
15445     need_setuid=yes
15446   fi
15447 fi
15448
15449
15450 ###############################################################################
15451 #
15452 #       Check for traditional (ha!) shadow passwords.
15453 #
15454 ###############################################################################
15455
15456 if test "$with_shadow" = yes ; then
15457   { $as_echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
15458 $as_echo_n "checking for generic shadow passwords... " >&6; }
15459 if test "${ac_cv_shadow+set}" = set; then
15460   $as_echo_n "(cached) " >&6
15461 else
15462
15463   ac_save_CPPFLAGS="$CPPFLAGS"
15464   if test \! -z "$includedir" ; then
15465     CPPFLAGS="$CPPFLAGS -I$includedir"
15466   fi
15467   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15468   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15469   cat >conftest.$ac_ext <<_ACEOF
15470 /* confdefs.h.  */
15471 _ACEOF
15472 cat confdefs.h >>conftest.$ac_ext
15473 cat >>conftest.$ac_ext <<_ACEOF
15474 /* end confdefs.h.  */
15475 #include <stdlib.h>
15476                                     #include <unistd.h>
15477                                     #include <sys/types.h>
15478                                     #include <pwd.h>
15479                                     #include <shadow.h>
15480 int
15481 main ()
15482 {
15483 struct spwd *p = getspnam("nobody");
15484                        const char *pw = p->sp_pwdp;
15485   ;
15486   return 0;
15487 }
15488 _ACEOF
15489 rm -rf conftest.$ac_objext
15490 if { (ac_try="$ac_compile"
15491 case "(($ac_try" in
15492   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15493   *) ac_try_echo=$ac_try;;
15494 esac
15495 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15496 $as_echo "$ac_try_echo") >&5
15497   (eval "$ac_compile") 2>conftest.er1
15498   ac_status=$?
15499   grep -v '^ *+' conftest.er1 >conftest.err
15500   rm -rf conftest.er1
15501   cat conftest.err >&5
15502   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15503   (exit $ac_status); } && {
15504          test -z "$ac_c_werror_flag" ||
15505          test ! -s conftest.err
15506        } && test -s conftest.$ac_objext; then
15507   ac_cv_shadow=yes
15508 else
15509   $as_echo "$as_me: failed program was:" >&5
15510 sed 's/^/| /' conftest.$ac_ext >&5
15511
15512         ac_cv_shadow=no
15513 fi
15514
15515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15516   CPPFLAGS="$ac_save_CPPFLAGS"
15517 fi
15518 { $as_echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
15519 $as_echo "$ac_cv_shadow" >&6; }
15520   if test "$ac_cv_shadow" = yes; then
15521     have_shadow=yes
15522     need_setuid=yes
15523
15524     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
15525     have_getspnam=no
15526     { $as_echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
15527 $as_echo_n "checking for getspnam in -lc... " >&6; }
15528 if test "${ac_cv_lib_c_getspnam+set}" = set; then
15529   $as_echo_n "(cached) " >&6
15530 else
15531   ac_check_lib_save_LIBS=$LIBS
15532 LIBS="-lc  $LIBS"
15533 cat >conftest.$ac_ext <<_ACEOF
15534 /* confdefs.h.  */
15535 _ACEOF
15536 cat confdefs.h >>conftest.$ac_ext
15537 cat >>conftest.$ac_ext <<_ACEOF
15538 /* end confdefs.h.  */
15539
15540 /* Override any GCC internal prototype to avoid an error.
15541    Use char because int might match the return type of a GCC
15542    builtin and then its argument prototype would still apply.  */
15543 #ifdef __cplusplus
15544 extern "C"
15545 #endif
15546 char getspnam ();
15547 int
15548 main ()
15549 {
15550 return getspnam ();
15551   ;
15552   return 0;
15553 }
15554 _ACEOF
15555 rm -rf conftest.$ac_objext conftest$ac_exeext
15556 if { (ac_try="$ac_link"
15557 case "(($ac_try" in
15558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15559   *) ac_try_echo=$ac_try;;
15560 esac
15561 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15562 $as_echo "$ac_try_echo") >&5
15563   (eval "$ac_link") 2>conftest.er1
15564   ac_status=$?
15565   grep -v '^ *+' conftest.er1 >conftest.err
15566   rm -rf conftest.er1
15567   cat conftest.err >&5
15568   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15569   (exit $ac_status); } && {
15570          test -z "$ac_c_werror_flag" ||
15571          test ! -s conftest.err
15572        } && test -s conftest$ac_exeext && {
15573          test "$cross_compiling" = yes ||
15574          $as_test_x conftest$ac_exeext
15575        }; then
15576   ac_cv_lib_c_getspnam=yes
15577 else
15578   $as_echo "$as_me: failed program was:" >&5
15579 sed 's/^/| /' conftest.$ac_ext >&5
15580
15581         ac_cv_lib_c_getspnam=no
15582 fi
15583
15584 rm -rf conftest.dSYM
15585 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15586       conftest$ac_exeext conftest.$ac_ext
15587 LIBS=$ac_check_lib_save_LIBS
15588 fi
15589 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
15590 $as_echo "$ac_cv_lib_c_getspnam" >&6; }
15591 if test "x$ac_cv_lib_c_getspnam" = x""yes; then
15592   have_getspnam=yes
15593 fi
15594
15595     if test "$have_getspnam" = no ; then
15596       { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
15597 $as_echo_n "checking for getspnam in -lgen... " >&6; }
15598 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
15599   $as_echo_n "(cached) " >&6
15600 else
15601   ac_check_lib_save_LIBS=$LIBS
15602 LIBS="-lgen  $LIBS"
15603 cat >conftest.$ac_ext <<_ACEOF
15604 /* confdefs.h.  */
15605 _ACEOF
15606 cat confdefs.h >>conftest.$ac_ext
15607 cat >>conftest.$ac_ext <<_ACEOF
15608 /* end confdefs.h.  */
15609
15610 /* Override any GCC internal prototype to avoid an error.
15611    Use char because int might match the return type of a GCC
15612    builtin and then its argument prototype would still apply.  */
15613 #ifdef __cplusplus
15614 extern "C"
15615 #endif
15616 char getspnam ();
15617 int
15618 main ()
15619 {
15620 return getspnam ();
15621   ;
15622   return 0;
15623 }
15624 _ACEOF
15625 rm -rf conftest.$ac_objext conftest$ac_exeext
15626 if { (ac_try="$ac_link"
15627 case "(($ac_try" in
15628   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15629   *) ac_try_echo=$ac_try;;
15630 esac
15631 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15632 $as_echo "$ac_try_echo") >&5
15633   (eval "$ac_link") 2>conftest.er1
15634   ac_status=$?
15635   grep -v '^ *+' conftest.er1 >conftest.err
15636   rm -rf conftest.er1
15637   cat conftest.err >&5
15638   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15639   (exit $ac_status); } && {
15640          test -z "$ac_c_werror_flag" ||
15641          test ! -s conftest.err
15642        } && test -s conftest$ac_exeext && {
15643          test "$cross_compiling" = yes ||
15644          $as_test_x conftest$ac_exeext
15645        }; then
15646   ac_cv_lib_gen_getspnam=yes
15647 else
15648   $as_echo "$as_me: failed program was:" >&5
15649 sed 's/^/| /' conftest.$ac_ext >&5
15650
15651         ac_cv_lib_gen_getspnam=no
15652 fi
15653
15654 rm -rf conftest.dSYM
15655 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15656       conftest$ac_exeext conftest.$ac_ext
15657 LIBS=$ac_check_lib_save_LIBS
15658 fi
15659 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
15660 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
15661 if test "x$ac_cv_lib_gen_getspnam" = x""yes; then
15662   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
15663 fi
15664
15665     fi
15666   fi
15667 fi
15668
15669
15670 ###############################################################################
15671 #
15672 #       Check for other libraries needed for non-shadow passwords.
15673 #
15674 ###############################################################################
15675
15676 if test "$enable_locking" = yes ; then
15677
15678   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
15679   have_crypt=no
15680   { $as_echo "$as_me:$LINENO: checking for crypt in -lc" >&5
15681 $as_echo_n "checking for crypt in -lc... " >&6; }
15682 if test "${ac_cv_lib_c_crypt+set}" = set; then
15683   $as_echo_n "(cached) " >&6
15684 else
15685   ac_check_lib_save_LIBS=$LIBS
15686 LIBS="-lc  $LIBS"
15687 cat >conftest.$ac_ext <<_ACEOF
15688 /* confdefs.h.  */
15689 _ACEOF
15690 cat confdefs.h >>conftest.$ac_ext
15691 cat >>conftest.$ac_ext <<_ACEOF
15692 /* end confdefs.h.  */
15693
15694 /* Override any GCC internal prototype to avoid an error.
15695    Use char because int might match the return type of a GCC
15696    builtin and then its argument prototype would still apply.  */
15697 #ifdef __cplusplus
15698 extern "C"
15699 #endif
15700 char crypt ();
15701 int
15702 main ()
15703 {
15704 return crypt ();
15705   ;
15706   return 0;
15707 }
15708 _ACEOF
15709 rm -rf conftest.$ac_objext conftest$ac_exeext
15710 if { (ac_try="$ac_link"
15711 case "(($ac_try" in
15712   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15713   *) ac_try_echo=$ac_try;;
15714 esac
15715 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15716 $as_echo "$ac_try_echo") >&5
15717   (eval "$ac_link") 2>conftest.er1
15718   ac_status=$?
15719   grep -v '^ *+' conftest.er1 >conftest.err
15720   rm -rf conftest.er1
15721   cat conftest.err >&5
15722   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15723   (exit $ac_status); } && {
15724          test -z "$ac_c_werror_flag" ||
15725          test ! -s conftest.err
15726        } && test -s conftest$ac_exeext && {
15727          test "$cross_compiling" = yes ||
15728          $as_test_x conftest$ac_exeext
15729        }; then
15730   ac_cv_lib_c_crypt=yes
15731 else
15732   $as_echo "$as_me: failed program was:" >&5
15733 sed 's/^/| /' conftest.$ac_ext >&5
15734
15735         ac_cv_lib_c_crypt=no
15736 fi
15737
15738 rm -rf conftest.dSYM
15739 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15740       conftest$ac_exeext conftest.$ac_ext
15741 LIBS=$ac_check_lib_save_LIBS
15742 fi
15743 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
15744 $as_echo "$ac_cv_lib_c_crypt" >&6; }
15745 if test "x$ac_cv_lib_c_crypt" = x""yes; then
15746   have_crypt=yes
15747 fi
15748
15749   if test "$have_crypt" = no ; then
15750     { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
15751 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
15752 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
15753   $as_echo_n "(cached) " >&6
15754 else
15755   ac_check_lib_save_LIBS=$LIBS
15756 LIBS="-lcrypt  $LIBS"
15757 cat >conftest.$ac_ext <<_ACEOF
15758 /* confdefs.h.  */
15759 _ACEOF
15760 cat confdefs.h >>conftest.$ac_ext
15761 cat >>conftest.$ac_ext <<_ACEOF
15762 /* end confdefs.h.  */
15763
15764 /* Override any GCC internal prototype to avoid an error.
15765    Use char because int might match the return type of a GCC
15766    builtin and then its argument prototype would still apply.  */
15767 #ifdef __cplusplus
15768 extern "C"
15769 #endif
15770 char crypt ();
15771 int
15772 main ()
15773 {
15774 return crypt ();
15775   ;
15776   return 0;
15777 }
15778 _ACEOF
15779 rm -rf conftest.$ac_objext conftest$ac_exeext
15780 if { (ac_try="$ac_link"
15781 case "(($ac_try" in
15782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15783   *) ac_try_echo=$ac_try;;
15784 esac
15785 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15786 $as_echo "$ac_try_echo") >&5
15787   (eval "$ac_link") 2>conftest.er1
15788   ac_status=$?
15789   grep -v '^ *+' conftest.er1 >conftest.err
15790   rm -rf conftest.er1
15791   cat conftest.err >&5
15792   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15793   (exit $ac_status); } && {
15794          test -z "$ac_c_werror_flag" ||
15795          test ! -s conftest.err
15796        } && test -s conftest$ac_exeext && {
15797          test "$cross_compiling" = yes ||
15798          $as_test_x conftest$ac_exeext
15799        }; then
15800   ac_cv_lib_crypt_crypt=yes
15801 else
15802   $as_echo "$as_me: failed program was:" >&5
15803 sed 's/^/| /' conftest.$ac_ext >&5
15804
15805         ac_cv_lib_crypt_crypt=no
15806 fi
15807
15808 rm -rf conftest.dSYM
15809 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15810       conftest$ac_exeext conftest.$ac_ext
15811 LIBS=$ac_check_lib_save_LIBS
15812 fi
15813 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
15814 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
15815 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
15816   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
15817 fi
15818
15819   fi
15820 fi
15821
15822
15823 # Most of the above shadow mechanisms will have set need_setuid to yes,
15824 # if they were found.  But, on some systems, we need setuid even when
15825 # using plain old vanilla passwords.
15826 #
15827 if test "$enable_locking" = yes ; then
15828   case "$host" in
15829     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
15830       need_setuid=yes
15831     ;;
15832   esac
15833 fi
15834
15835
15836 if test "$have_shadow_adjunct" = yes ; then
15837   cat >>confdefs.h <<\_ACEOF
15838 #define HAVE_ADJUNCT_PASSWD 1
15839 _ACEOF
15840
15841 elif test "$have_shadow_enhanced" = yes ; then
15842   cat >>confdefs.h <<\_ACEOF
15843 #define HAVE_ENHANCED_PASSWD 1
15844 _ACEOF
15845
15846 elif test "$have_shadow_hpux" = yes ; then
15847   cat >>confdefs.h <<\_ACEOF
15848 #define HAVE_HPUX_PASSWD 1
15849 _ACEOF
15850
15851 elif test "$have_shadow" = yes ; then
15852   cat >>confdefs.h <<\_ACEOF
15853 #define HAVE_SHADOW_PASSWD 1
15854 _ACEOF
15855
15856 fi
15857
15858
15859 ###############################################################################
15860 #
15861 #       Check for external password helper
15862 #       On SuSE, instead of having xscreensaver be a setuid program, they
15863 #       fork an external program that takes the password on stdin, and
15864 #       returns true if that password is a valid one.  Then only that
15865 #       smaller program needs to be setuid.
15866 #
15867 #       (Note that this external program is not a GUI: the GUI is still
15868 #       all in xscreensaver itself; the external program just does auth.)
15869 #
15870 ###############################################################################
15871
15872 have_passwd_helper=no
15873 with_passwd_helper_req=unspecified
15874
15875
15876 # Check whether --with-passwd-helper was given.
15877 if test "${with_passwd_helper+set}" = set; then
15878   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
15879 else
15880   with_passwd_helper=no
15881 fi
15882
15883 # no HANDLE_X_PATH_ARG for this one
15884
15885 if test "$enable_locking" = no ; then
15886   with_passwd_helper_req=no
15887   with_passwd_helper=no
15888 fi
15889
15890 case "$with_passwd_helper" in
15891   ""|no) : ;;
15892   /*)
15893     cat >>confdefs.h <<_ACEOF
15894 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
15895 _ACEOF
15896
15897     have_passwd_helper=yes;;
15898   *)
15899     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
15900     exit 1
15901 esac
15902
15903
15904 ###############################################################################
15905 #
15906 #       Check for a login manager for a "New Login" button on the lock dialog.
15907 #       Usually this will be "/usr/bin/gdmflexiserver".
15908 #
15909 ###############################################################################
15910
15911 with_login_manager_req=unspecified
15912 default_login_manager_1='gdmflexiserver -ls'
15913 default_login_manager_2='kdmctl reserve'
15914
15915
15916 # Check whether --with-login-manager was given.
15917 if test "${with_login_manager+set}" = set; then
15918   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
15919 else
15920   with_login_manager=yes
15921 fi
15922
15923 # no HANDLE_X_PATH_ARG for this one
15924
15925 if test "$enable_locking" = no ; then
15926   with_login_manager_req=no
15927   with_login_manager=no
15928 fi
15929
15930 case "$with_login_manager_req" in
15931   no)
15932     with_login_manager=""
15933   ;;
15934
15935   yes|unspecified)
15936     # Try both defaults, use the one that exists.
15937
15938     set dummy $default_login_manager_1 ; login_manager_tmp=$2
15939     unset ac_cv_path_login_manager_tmp  # don't cache
15940     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15941 set dummy $login_manager_tmp; ac_word=$2
15942 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15943 $as_echo_n "checking for $ac_word... " >&6; }
15944 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15945   $as_echo_n "(cached) " >&6
15946 else
15947   case $login_manager_tmp in
15948   [\\/]* | ?:[\\/]*)
15949   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15950   ;;
15951   *)
15952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15953 for as_dir in $PATH
15954 do
15955   IFS=$as_save_IFS
15956   test -z "$as_dir" && as_dir=.
15957   for ac_exec_ext in '' $ac_executable_extensions; do
15958   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15959     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15960     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15961     break 2
15962   fi
15963 done
15964 done
15965 IFS=$as_save_IFS
15966
15967   ;;
15968 esac
15969 fi
15970 login_manager_tmp=$ac_cv_path_login_manager_tmp
15971 if test -n "$login_manager_tmp"; then
15972   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15973 $as_echo "$login_manager_tmp" >&6; }
15974 else
15975   { $as_echo "$as_me:$LINENO: result: no" >&5
15976 $as_echo "no" >&6; }
15977 fi
15978
15979
15980     if test ! -z "$login_manager_tmp" ; then
15981       with_login_manager="$default_login_manager_1"
15982     else
15983       set dummy $default_login_manager_2 ; login_manager_tmp=$2
15984       unset ac_cv_path_login_manager_tmp  # don't cache
15985       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15986 set dummy $login_manager_tmp; ac_word=$2
15987 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15988 $as_echo_n "checking for $ac_word... " >&6; }
15989 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15990   $as_echo_n "(cached) " >&6
15991 else
15992   case $login_manager_tmp in
15993   [\\/]* | ?:[\\/]*)
15994   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15995   ;;
15996   *)
15997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15998 for as_dir in $PATH
15999 do
16000   IFS=$as_save_IFS
16001   test -z "$as_dir" && as_dir=.
16002   for ac_exec_ext in '' $ac_executable_extensions; do
16003   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16004     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
16005     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16006     break 2
16007   fi
16008 done
16009 done
16010 IFS=$as_save_IFS
16011
16012   ;;
16013 esac
16014 fi
16015 login_manager_tmp=$ac_cv_path_login_manager_tmp
16016 if test -n "$login_manager_tmp"; then
16017   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
16018 $as_echo "$login_manager_tmp" >&6; }
16019 else
16020   { $as_echo "$as_me:$LINENO: result: no" >&5
16021 $as_echo "no" >&6; }
16022 fi
16023
16024
16025       if test ! -z "$login_manager_tmp" ; then
16026         with_login_manager="$default_login_manager_2"
16027       else
16028         with_login_manager=""
16029       fi
16030     fi
16031   ;;
16032
16033   /*)
16034     # absolute path specified on cmd line
16035     set dummy $with_login_manager_req ; login_manager_tmp=$2
16036     { $as_echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
16037 $as_echo_n "checking for $login_manager_tmp... " >&6; }
16038     if test -x "$login_manager_tmp" ; then
16039       { $as_echo "$as_me:$LINENO: result: yes" >&5
16040 $as_echo "yes" >&6; }
16041     else
16042       { $as_echo "$as_me:$LINENO: result: no" >&5
16043 $as_echo "no" >&6; }
16044       with_login_manager=""
16045     fi
16046   ;;
16047
16048   *)
16049     # relative path specified on cmd line
16050     set dummy $with_login_manager_req ; login_manager_tmp=$2
16051     unset ac_cv_path_login_manager_tmp    # don't cache
16052     # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
16053 set dummy $login_manager_tmp; ac_word=$2
16054 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16055 $as_echo_n "checking for $ac_word... " >&6; }
16056 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
16057   $as_echo_n "(cached) " >&6
16058 else
16059   case $login_manager_tmp in
16060   [\\/]* | ?:[\\/]*)
16061   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
16062   ;;
16063   *)
16064   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16065 for as_dir in $PATH
16066 do
16067   IFS=$as_save_IFS
16068   test -z "$as_dir" && as_dir=.
16069   for ac_exec_ext in '' $ac_executable_extensions; do
16070   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16071     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
16072     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16073     break 2
16074   fi
16075 done
16076 done
16077 IFS=$as_save_IFS
16078
16079   ;;
16080 esac
16081 fi
16082 login_manager_tmp=$ac_cv_path_login_manager_tmp
16083 if test -n "$login_manager_tmp"; then
16084   { $as_echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
16085 $as_echo "$login_manager_tmp" >&6; }
16086 else
16087   { $as_echo "$as_me:$LINENO: result: no" >&5
16088 $as_echo "no" >&6; }
16089 fi
16090
16091
16092     if test -z "$login_manager_tmp" ; then
16093       with_login_manager=""
16094     else
16095       with_login_manager="$login_manager_tmp"
16096     fi
16097   ;;
16098 esac
16099 ac_cv_login_manager_program="$with_login_manager"
16100
16101 NEW_LOGIN_COMMAND_P=''
16102 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
16103
16104 { $as_echo "$as_me:$LINENO: checking for login manager" >&5
16105 $as_echo_n "checking for login manager... " >&6; }
16106 if test -z "$NEW_LOGIN_COMMAND" ; then
16107   NEW_LOGIN_COMMAND="$default_login_manager_1"
16108   NEW_LOGIN_COMMAND_P='! '
16109   { $as_echo "$as_me:$LINENO: result: $NEW_LOGIN_COMMAND (disabled)" >&5
16110 $as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
16111 else
16112   { $as_echo "$as_me:$LINENO: result: $NEW_LOGIN_COMMAND" >&5
16113 $as_echo "$NEW_LOGIN_COMMAND" >&6; }
16114 fi
16115
16116
16117 ###############################################################################
16118 #
16119 #       Check for -lgtk (and Gnome stuff)
16120 #
16121 ###############################################################################
16122
16123 have_gtk=no
16124 with_gtk_req=unspecified
16125
16126 # Check whether --with-gtk was given.
16127 if test "${with_gtk+set}" = set; then
16128   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
16129 else
16130   with_gtk=yes
16131 fi
16132
16133
16134 # if --with-gtk=/directory/ was specified, remember that directory so that
16135 # we can also look for the `gtk-config' program in that directory.
16136 case "$with_gtk" in
16137   /*)
16138     gtk_dir="$with_gtk"
16139     ;;
16140   *)
16141     gtk_dir=""
16142     ;;
16143 esac
16144
16145
16146    case "$with_gtk" in
16147     yes) ;;
16148     no)  ;;
16149
16150     /*)
16151      { $as_echo "$as_me:$LINENO: checking for Gtk headers" >&5
16152 $as_echo_n "checking for Gtk headers... " >&6; }
16153      d=$with_gtk/include
16154      if test -d $d; then
16155        X_CFLAGS="-I$d $X_CFLAGS"
16156        { $as_echo "$as_me:$LINENO: result: $d" >&5
16157 $as_echo "$d" >&6; }
16158      else
16159        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16160 $as_echo "not found ($d: no such directory)" >&6; }
16161      fi
16162
16163      { $as_echo "$as_me:$LINENO: checking for Gtk libs" >&5
16164 $as_echo_n "checking for Gtk libs... " >&6; }
16165      d=$with_gtk/lib
16166      if test -d $d; then
16167        X_LIBS="-L$d $X_LIBS"
16168        { $as_echo "$as_me:$LINENO: result: $d" >&5
16169 $as_echo "$d" >&6; }
16170      else
16171        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16172 $as_echo "not found ($d: no such directory)" >&6; }
16173      fi
16174
16175      # replace the directory string with "yes".
16176      with_gtk_req="yes"
16177      with_gtk=$with_gtk_req
16178      ;;
16179
16180     *)
16181      echo ""
16182      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
16183      echo "       If it is a directory, then \`DIR/include' will be added to"
16184      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16185      exit 1
16186      ;;
16187    esac
16188
16189
16190 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
16191   echo "error: must be yes or no: --with-gtk=$with_gtk"
16192   exit 1
16193 fi
16194
16195
16196 parse_gtk_version_string() {
16197   # M4 sucks!!
16198
16199   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
16200   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
16201
16202   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
16203   if test -z "$ac_gtk_version"; then
16204     ac_gtk_version=unknown
16205     ac_gtk_version_string=unknown
16206   fi
16207 }
16208
16209 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
16210 # if the user specified --with-gtk=/foo/ then look there.
16211 #
16212 gtk_path="$PATH"
16213 if test ! -z "$gtk_dir"; then
16214   # canonicalize slashes.
16215   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
16216   gtk_path="$foo:$gtk_path"
16217 fi
16218
16219 for ac_prog in pkg-config
16220 do
16221   # Extract the first word of "$ac_prog", so it can be a program name with args.
16222 set dummy $ac_prog; ac_word=$2
16223 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16224 $as_echo_n "checking for $ac_word... " >&6; }
16225 if test "${ac_cv_path_pkg_config+set}" = set; then
16226   $as_echo_n "(cached) " >&6
16227 else
16228   case $pkg_config in
16229   [\\/]* | ?:[\\/]*)
16230   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
16231   ;;
16232   *)
16233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16234 for as_dir in $gtk_path
16235 do
16236   IFS=$as_save_IFS
16237   test -z "$as_dir" && as_dir=.
16238   for ac_exec_ext in '' $ac_executable_extensions; do
16239   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16240     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
16241     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16242     break 2
16243   fi
16244 done
16245 done
16246 IFS=$as_save_IFS
16247
16248   ;;
16249 esac
16250 fi
16251 pkg_config=$ac_cv_path_pkg_config
16252 if test -n "$pkg_config"; then
16253   { $as_echo "$as_me:$LINENO: result: $pkg_config" >&5
16254 $as_echo "$pkg_config" >&6; }
16255 else
16256   { $as_echo "$as_me:$LINENO: result: no" >&5
16257 $as_echo "no" >&6; }
16258 fi
16259
16260
16261   test -n "$pkg_config" && break
16262 done
16263
16264
16265 if test -z "$pkg_config" ; then
16266   { $as_echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
16267 $as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
16268   pkg_config="false"
16269 fi
16270
16271
16272 # Utility function for running pkg-config-based tests...
16273 #
16274 pkgs=''
16275 pkg_check_version() {
16276   if test "$ok" = yes ; then
16277     req="$1"
16278     min="$2"
16279     { $as_echo "$as_me:$LINENO: checking for $req" >&5
16280 $as_echo_n "checking for $req... " >&6; }
16281     if $pkg_config --exists "$req" ; then
16282       vers=`$pkg_config --modversion "$req"`
16283       if $pkg_config --exists "$req >= $min" ; then
16284         { $as_echo "$as_me:$LINENO: result: $vers" >&5
16285 $as_echo "$vers" >&6; }
16286         pkgs="$pkgs $req"
16287         return 1
16288       else
16289         { $as_echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
16290 $as_echo "$vers (wanted >= $min)" >&6; }
16291         ok=no
16292         return 0
16293       fi
16294     else
16295       { $as_echo "$as_me:$LINENO: result: no" >&5
16296 $as_echo "no" >&6; }
16297       ok=no
16298       return 0
16299     fi
16300   fi
16301 }
16302
16303
16304 jurassic_gtk=no
16305 gtk_halfassed=no
16306
16307 if test "$with_gtk" = yes; then
16308   have_gtk=no
16309
16310   ok="yes"
16311   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
16312   pkg_check_version         gmodule-2.0  2.0.0
16313   pkg_check_version          libxml-2.0  2.4.6
16314   pkg_check_version        libglade-2.0  1.99.0
16315   pkg_check_version      gdk-pixbuf-2.0  2.0.0
16316   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
16317   have_gtk="$ok"
16318
16319   if test "$have_gtk" = no; then
16320     if test -n "$ac_gtk_version_string" ; then
16321       gtk_halfassed="$ac_gtk_version_string"
16322       gtk_halfassed_lib="$req"
16323     fi
16324   fi
16325
16326   if test "$have_gtk" = yes; then
16327     parse_gtk_version_string
16328     jurassic_gtk=no
16329   fi
16330
16331   if test "$have_gtk" = yes; then
16332     { $as_echo "$as_me:$LINENO: checking for Gtk includes" >&5
16333 $as_echo_n "checking for Gtk includes... " >&6; }
16334 if test "${ac_cv_gtk_config_cflags+set}" = set; then
16335   $as_echo_n "(cached) " >&6
16336 else
16337   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
16338 fi
16339 { $as_echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
16340 $as_echo "$ac_cv_gtk_config_cflags" >&6; }
16341     { $as_echo "$as_me:$LINENO: checking for Gtk libs" >&5
16342 $as_echo_n "checking for Gtk libs... " >&6; }
16343 if test "${ac_cv_gtk_config_libs+set}" = set; then
16344   $as_echo_n "(cached) " >&6
16345 else
16346   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
16347 fi
16348 { $as_echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
16349 $as_echo "$ac_cv_gtk_config_libs" >&6; }
16350   fi
16351
16352   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
16353   ac_gtk_config_libs=$ac_cv_gtk_config_libs
16354
16355   GTK_EXTRA_OBJS=""
16356   GTK_DATADIR=""
16357   if test "$have_gtk" = yes; then
16358     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
16359     GTK_DATADIR="$GTK_DATADIR/share"
16360   fi
16361
16362   if test "$have_gtk" = yes; then
16363     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
16364     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
16365     cat >>confdefs.h <<\_ACEOF
16366 #define HAVE_GTK 1
16367 _ACEOF
16368
16369     cat >>confdefs.h <<\_ACEOF
16370 #define HAVE_GTK2 1
16371 _ACEOF
16372
16373     cat >>confdefs.h <<\_ACEOF
16374 #define HAVE_XML 1
16375 _ACEOF
16376
16377   fi
16378
16379 fi
16380
16381
16382 # Check for the various Gnome help and URL loading programs.
16383 #
16384 WITH_BROWSER=gnome-open
16385 if test "$have_gtk" = yes; then
16386   for ac_prog in gnome-open
16387 do
16388   # Extract the first word of "$ac_prog", so it can be a program name with args.
16389 set dummy $ac_prog; ac_word=$2
16390 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16391 $as_echo_n "checking for $ac_word... " >&6; }
16392 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
16393   $as_echo_n "(cached) " >&6
16394 else
16395   if test -n "$gnome_open_program"; then
16396   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
16397 else
16398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16399 for as_dir in $PATH
16400 do
16401   IFS=$as_save_IFS
16402   test -z "$as_dir" && as_dir=.
16403   for ac_exec_ext in '' $ac_executable_extensions; do
16404   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16405     ac_cv_prog_gnome_open_program="$ac_prog"
16406     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16407     break 2
16408   fi
16409 done
16410 done
16411 IFS=$as_save_IFS
16412
16413 fi
16414 fi
16415 gnome_open_program=$ac_cv_prog_gnome_open_program
16416 if test -n "$gnome_open_program"; then
16417   { $as_echo "$as_me:$LINENO: result: $gnome_open_program" >&5
16418 $as_echo "$gnome_open_program" >&6; }
16419 else
16420   { $as_echo "$as_me:$LINENO: result: no" >&5
16421 $as_echo "no" >&6; }
16422 fi
16423
16424
16425   test -n "$gnome_open_program" && break
16426 done
16427
16428   for ac_prog in gnome-url-show
16429 do
16430   # Extract the first word of "$ac_prog", so it can be a program name with args.
16431 set dummy $ac_prog; ac_word=$2
16432 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16433 $as_echo_n "checking for $ac_word... " >&6; }
16434 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
16435   $as_echo_n "(cached) " >&6
16436 else
16437   if test -n "$gnome_url_show_program"; then
16438   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
16439 else
16440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16441 for as_dir in $PATH
16442 do
16443   IFS=$as_save_IFS
16444   test -z "$as_dir" && as_dir=.
16445   for ac_exec_ext in '' $ac_executable_extensions; do
16446   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16447     ac_cv_prog_gnome_url_show_program="$ac_prog"
16448     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16449     break 2
16450   fi
16451 done
16452 done
16453 IFS=$as_save_IFS
16454
16455 fi
16456 fi
16457 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
16458 if test -n "$gnome_url_show_program"; then
16459   { $as_echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
16460 $as_echo "$gnome_url_show_program" >&6; }
16461 else
16462   { $as_echo "$as_me:$LINENO: result: no" >&5
16463 $as_echo "no" >&6; }
16464 fi
16465
16466
16467   test -n "$gnome_url_show_program" && break
16468 done
16469
16470 fi
16471
16472
16473 ###############################################################################
16474 #
16475 #       Check for -lXm.
16476 #
16477 ###############################################################################
16478
16479 have_motif=no
16480 with_motif_req=unspecified
16481
16482 # Check whether --with-motif was given.
16483 if test "${with_motif+set}" = set; then
16484   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
16485 else
16486   with_motif=no
16487 fi
16488
16489
16490
16491    case "$with_motif" in
16492     yes) ;;
16493     no)  ;;
16494
16495     /*)
16496      { $as_echo "$as_me:$LINENO: checking for Motif headers" >&5
16497 $as_echo_n "checking for Motif headers... " >&6; }
16498      d=$with_motif/include
16499      if test -d $d; then
16500        X_CFLAGS="-I$d $X_CFLAGS"
16501        { $as_echo "$as_me:$LINENO: result: $d" >&5
16502 $as_echo "$d" >&6; }
16503      else
16504        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16505 $as_echo "not found ($d: no such directory)" >&6; }
16506      fi
16507
16508      { $as_echo "$as_me:$LINENO: checking for Motif libs" >&5
16509 $as_echo_n "checking for Motif libs... " >&6; }
16510      d=$with_motif/lib
16511      if test -d $d; then
16512        X_LIBS="-L$d $X_LIBS"
16513        { $as_echo "$as_me:$LINENO: result: $d" >&5
16514 $as_echo "$d" >&6; }
16515      else
16516        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16517 $as_echo "not found ($d: no such directory)" >&6; }
16518      fi
16519
16520      # replace the directory string with "yes".
16521      with_motif_req="yes"
16522      with_motif=$with_motif_req
16523      ;;
16524
16525     *)
16526      echo ""
16527      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
16528      echo "       If it is a directory, then \`DIR/include' will be added to"
16529      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16530      exit 1
16531      ;;
16532    esac
16533
16534
16535 if test "$with_motif" != yes -a "$with_motif" != no ; then
16536   echo "error: must be yes or no: --with-motif=$with_motif"
16537   exit 1
16538 fi
16539
16540 if test "$with_motif" = yes; then
16541   have_motif=no
16542
16543   ac_save_CPPFLAGS="$CPPFLAGS"
16544   if test \! -z "$includedir" ; then
16545     CPPFLAGS="$CPPFLAGS -I$includedir"
16546   fi
16547   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16548   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16549   { $as_echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
16550 $as_echo_n "checking for Xm/Xm.h... " >&6; }
16551 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
16552   $as_echo_n "(cached) " >&6
16553 else
16554   cat >conftest.$ac_ext <<_ACEOF
16555 /* confdefs.h.  */
16556 _ACEOF
16557 cat confdefs.h >>conftest.$ac_ext
16558 cat >>conftest.$ac_ext <<_ACEOF
16559 /* end confdefs.h.  */
16560 #include <stdlib.h>
16561                      #include <stdio.h>
16562                      #include <X11/Intrinsic.h>
16563
16564 #include <Xm/Xm.h>
16565 _ACEOF
16566 rm -rf conftest.$ac_objext
16567 if { (ac_try="$ac_compile"
16568 case "(($ac_try" in
16569   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16570   *) ac_try_echo=$ac_try;;
16571 esac
16572 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16573 $as_echo "$ac_try_echo") >&5
16574   (eval "$ac_compile") 2>conftest.er1
16575   ac_status=$?
16576   grep -v '^ *+' conftest.er1 >conftest.err
16577   rm -rf conftest.er1
16578   cat conftest.err >&5
16579   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16580   (exit $ac_status); } && {
16581          test -z "$ac_c_werror_flag" ||
16582          test ! -s conftest.err
16583        } && test -s conftest.$ac_objext; then
16584   ac_cv_header_Xm_Xm_h=yes
16585 else
16586   $as_echo "$as_me: failed program was:" >&5
16587 sed 's/^/| /' conftest.$ac_ext >&5
16588
16589         ac_cv_header_Xm_Xm_h=no
16590 fi
16591
16592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16593 fi
16594 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
16595 $as_echo "$ac_cv_header_Xm_Xm_h" >&6; }
16596 if test "x$ac_cv_header_Xm_Xm_h" = x""yes; then
16597   have_motif=yes
16598                      cat >>confdefs.h <<\_ACEOF
16599 #define HAVE_MOTIF 1
16600 _ACEOF
16601
16602                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
16603 fi
16604
16605
16606   CPPFLAGS="$ac_save_CPPFLAGS"
16607 fi
16608
16609
16610 if test "$have_motif" = yes; then
16611
16612   ac_save_CPPFLAGS="$CPPFLAGS"
16613   if test \! -z "$includedir" ; then
16614     CPPFLAGS="$CPPFLAGS -I$includedir"
16615   fi
16616   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16617   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16618   { $as_echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
16619 $as_echo_n "checking for Xm/ComboBox.h... " >&6; }
16620 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
16621   $as_echo_n "(cached) " >&6
16622 else
16623   cat >conftest.$ac_ext <<_ACEOF
16624 /* confdefs.h.  */
16625 _ACEOF
16626 cat confdefs.h >>conftest.$ac_ext
16627 cat >>conftest.$ac_ext <<_ACEOF
16628 /* end confdefs.h.  */
16629 #include <stdlib.h>
16630                      #include <stdio.h>
16631                      #include <X11/Intrinsic.h>
16632
16633 #include <Xm/ComboBox.h>
16634 _ACEOF
16635 rm -rf conftest.$ac_objext
16636 if { (ac_try="$ac_compile"
16637 case "(($ac_try" in
16638   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16639   *) ac_try_echo=$ac_try;;
16640 esac
16641 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16642 $as_echo "$ac_try_echo") >&5
16643   (eval "$ac_compile") 2>conftest.er1
16644   ac_status=$?
16645   grep -v '^ *+' conftest.er1 >conftest.err
16646   rm -rf conftest.er1
16647   cat conftest.err >&5
16648   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16649   (exit $ac_status); } && {
16650          test -z "$ac_c_werror_flag" ||
16651          test ! -s conftest.err
16652        } && test -s conftest.$ac_objext; then
16653   ac_cv_header_Xm_ComboBox_h=yes
16654 else
16655   $as_echo "$as_me: failed program was:" >&5
16656 sed 's/^/| /' conftest.$ac_ext >&5
16657
16658         ac_cv_header_Xm_ComboBox_h=no
16659 fi
16660
16661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16662 fi
16663 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
16664 $as_echo "$ac_cv_header_Xm_ComboBox_h" >&6; }
16665 if test "x$ac_cv_header_Xm_ComboBox_h" = x""yes; then
16666   cat >>confdefs.h <<\_ACEOF
16667 #define HAVE_XMCOMBOBOX 1
16668 _ACEOF
16669
16670 fi
16671
16672
16673   CPPFLAGS="$ac_save_CPPFLAGS"
16674 fi
16675
16676
16677 ###############################################################################
16678 #
16679 #       Checking whether Motif is really Lesstif.
16680 #
16681 ###############################################################################
16682
16683 have_lesstif=no
16684 if test "$have_motif" = yes ; then
16685   { $as_echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
16686 $as_echo_n "checking whether Motif is really LessTif... " >&6; }
16687 if test "${ac_cv_have_lesstif+set}" = set; then
16688   $as_echo_n "(cached) " >&6
16689 else
16690
16691   ac_save_CPPFLAGS="$CPPFLAGS"
16692   if test \! -z "$includedir" ; then
16693     CPPFLAGS="$CPPFLAGS -I$includedir"
16694   fi
16695   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16696   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16697   cat >conftest.$ac_ext <<_ACEOF
16698 /* confdefs.h.  */
16699 _ACEOF
16700 cat confdefs.h >>conftest.$ac_ext
16701 cat >>conftest.$ac_ext <<_ACEOF
16702 /* end confdefs.h.  */
16703 #include <Xm/Xm.h>
16704 int
16705 main ()
16706 {
16707 long vers = LesstifVersion;
16708   ;
16709   return 0;
16710 }
16711 _ACEOF
16712 rm -rf conftest.$ac_objext
16713 if { (ac_try="$ac_compile"
16714 case "(($ac_try" in
16715   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16716   *) ac_try_echo=$ac_try;;
16717 esac
16718 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16719 $as_echo "$ac_try_echo") >&5
16720   (eval "$ac_compile") 2>conftest.er1
16721   ac_status=$?
16722   grep -v '^ *+' conftest.er1 >conftest.err
16723   rm -rf conftest.er1
16724   cat conftest.err >&5
16725   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16726   (exit $ac_status); } && {
16727          test -z "$ac_c_werror_flag" ||
16728          test ! -s conftest.err
16729        } && test -s conftest.$ac_objext; then
16730   ac_cv_have_lesstif=yes
16731 else
16732   $as_echo "$as_me: failed program was:" >&5
16733 sed 's/^/| /' conftest.$ac_ext >&5
16734
16735         ac_cv_have_lesstif=no
16736 fi
16737
16738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16739   CPPFLAGS="$ac_save_CPPFLAGS"
16740 fi
16741 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
16742 $as_echo "$ac_cv_have_lesstif" >&6; }
16743   have_lesstif=$ac_cv_have_lesstif
16744 fi
16745
16746
16747 lesstif_version=unknown
16748 lesstif_version_string=unknown
16749
16750 if test "$have_lesstif" = yes ; then
16751   ltv=unknown
16752   echo unknown > conftest-lt
16753   { $as_echo "$as_me:$LINENO: checking LessTif version number" >&5
16754 $as_echo_n "checking LessTif version number... " >&6; }
16755 if test "${ac_cv_lesstif_version_string+set}" = set; then
16756   $as_echo_n "(cached) " >&6
16757 else
16758
16759   ac_save_CPPFLAGS="$CPPFLAGS"
16760   if test \! -z "$includedir" ; then
16761     CPPFLAGS="$CPPFLAGS -I$includedir"
16762   fi
16763   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16764   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16765   if test "$cross_compiling" = yes; then
16766   ac_cv_lesstif_version=unknown
16767                      ac_cv_lesstif_version_string=unknown
16768 else
16769   cat >conftest.$ac_ext <<_ACEOF
16770 /* confdefs.h.  */
16771 _ACEOF
16772 cat confdefs.h >>conftest.$ac_ext
16773 cat >>conftest.$ac_ext <<_ACEOF
16774 /* end confdefs.h.  */
16775 #include <stdio.h>
16776                      #include <Xm/Xm.h>
16777                      int main() {
16778                        FILE *f = fopen("conftest-lt", "w");
16779                        if (!f) exit(1);
16780                        fprintf(f, "%d %d.%d\n", LesstifVersion,
16781                           LESSTIF_VERSION, LESSTIF_REVISION);
16782                        fclose(f);
16783                        exit(0);
16784                      }
16785 _ACEOF
16786 rm -rf conftest$ac_exeext
16787 if { (ac_try="$ac_link"
16788 case "(($ac_try" in
16789   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16790   *) ac_try_echo=$ac_try;;
16791 esac
16792 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16793 $as_echo "$ac_try_echo") >&5
16794   (eval "$ac_link") 2>&5
16795   ac_status=$?
16796   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16797   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16798   { (case "(($ac_try" in
16799   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16800   *) ac_try_echo=$ac_try;;
16801 esac
16802 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16803 $as_echo "$ac_try_echo") >&5
16804   (eval "$ac_try") 2>&5
16805   ac_status=$?
16806   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16807   (exit $ac_status); }; }; then
16808   ltv=`cat conftest-lt`
16809                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
16810                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
16811 else
16812   $as_echo "$as_me: program exited with status $ac_status" >&5
16813 $as_echo "$as_me: failed program was:" >&5
16814 sed 's/^/| /' conftest.$ac_ext >&5
16815
16816 ( exit $ac_status )
16817 ac_cv_lesstif_version=unknown
16818                      ac_cv_lesstif_version_string=unknown
16819 fi
16820 rm -rf conftest.dSYM
16821 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16822 fi
16823
16824
16825   CPPFLAGS="$ac_save_CPPFLAGS"
16826 fi
16827 { $as_echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
16828 $as_echo "$ac_cv_lesstif_version_string" >&6; }
16829   rm -rf conftest-lt
16830   lesstif_version=$ac_cv_lesstif_version
16831   lesstif_version_string=$ac_cv_lesstif_version_string
16832
16833 fi
16834
16835
16836 if test "$have_motif" = yes ; then
16837   mtv=unknown
16838   echo unknown > conftest-mt
16839   { $as_echo "$as_me:$LINENO: checking Motif version number" >&5
16840 $as_echo_n "checking Motif version number... " >&6; }
16841 if test "${ac_cv_motif_version_string+set}" = set; then
16842   $as_echo_n "(cached) " >&6
16843 else
16844
16845   ac_save_CPPFLAGS="$CPPFLAGS"
16846   if test \! -z "$includedir" ; then
16847     CPPFLAGS="$CPPFLAGS -I$includedir"
16848   fi
16849   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16850   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16851   if test "$cross_compiling" = yes; then
16852   ac_cv_motif_version=unknown
16853                      ac_cv_motif_version_string=unknown
16854 else
16855   cat >conftest.$ac_ext <<_ACEOF
16856 /* confdefs.h.  */
16857 _ACEOF
16858 cat confdefs.h >>conftest.$ac_ext
16859 cat >>conftest.$ac_ext <<_ACEOF
16860 /* end confdefs.h.  */
16861 #include <stdio.h>
16862                      #include <Xm/Xm.h>
16863                      int main() {
16864                        FILE *f = fopen("conftest-mt", "w");
16865                        if (!f) exit(1);
16866                        fprintf(f, "%d %d.%d\n", XmVersion,
16867                           XmVERSION, XmREVISION);
16868                        fclose(f);
16869                        exit(0);
16870                      }
16871 _ACEOF
16872 rm -rf conftest$ac_exeext
16873 if { (ac_try="$ac_link"
16874 case "(($ac_try" in
16875   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16876   *) ac_try_echo=$ac_try;;
16877 esac
16878 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16879 $as_echo "$ac_try_echo") >&5
16880   (eval "$ac_link") 2>&5
16881   ac_status=$?
16882   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16883   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16884   { (case "(($ac_try" in
16885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16886   *) ac_try_echo=$ac_try;;
16887 esac
16888 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16889 $as_echo "$ac_try_echo") >&5
16890   (eval "$ac_try") 2>&5
16891   ac_status=$?
16892   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16893   (exit $ac_status); }; }; then
16894   mtv=`cat conftest-mt`
16895                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
16896                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
16897 else
16898   $as_echo "$as_me: program exited with status $ac_status" >&5
16899 $as_echo "$as_me: failed program was:" >&5
16900 sed 's/^/| /' conftest.$ac_ext >&5
16901
16902 ( exit $ac_status )
16903 ac_cv_motif_version=unknown
16904                      ac_cv_motif_version_string=unknown
16905 fi
16906 rm -rf conftest.dSYM
16907 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16908 fi
16909
16910
16911   CPPFLAGS="$ac_save_CPPFLAGS"
16912 fi
16913 { $as_echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
16914 $as_echo "$ac_cv_motif_version_string" >&6; }
16915   rm -rf conftest-mt
16916   motif_version=$ac_cv_motif_version
16917   motif_version_string=$ac_cv_motif_version_string
16918
16919 fi
16920
16921
16922 ###############################################################################
16923 #
16924 #       Checking whether Motif requires -lXpm.
16925 #
16926 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
16927 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
16928 #       of the library whether to build the XPM code into libXm, or whether
16929 #       to rely on an external libXm.  So the only way to tell whether XPM is
16930 #       a link-time requirement is to examine libXm.a, which is very
16931 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
16932 #       always link against XPM if the XPM lib exists (and this will be a
16933 #       no-op if libXm happens to already have the XPM code in it.)
16934 #
16935 ###############################################################################
16936
16937 motif_requires_xpm=no
16938 if test "$have_motif" = yes ; then
16939    { $as_echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
16940 $as_echo_n "checking whether Motif requires XPM... " >&6; }
16941    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
16942    then
16943      motif_requires_xpm=yes
16944      { $as_echo "$as_me:$LINENO: result: maybe" >&5
16945 $as_echo "maybe" >&6; }
16946    else
16947      { $as_echo "$as_me:$LINENO: result: no" >&5
16948 $as_echo "no" >&6; }
16949    fi
16950 fi
16951
16952
16953 ###############################################################################
16954 #
16955 #       Checking whether Motif requires -lXp.
16956 #
16957 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
16958 #       Extension".   Why this extension isn't in -lXext with all the others,
16959 #       I have no idea.
16960 #
16961 ###############################################################################
16962
16963 have_xp_ext=no
16964 if test "$have_motif" = yes ; then
16965    have_xp_ext=no
16966
16967   ac_save_CPPFLAGS="$CPPFLAGS"
16968   ac_save_LDFLAGS="$LDFLAGS"
16969 #  ac_save_LIBS="$LIBS"
16970
16971   if test \! -z "$includedir" ; then
16972     CPPFLAGS="$CPPFLAGS -I$includedir"
16973   fi
16974   # note: $X_CFLAGS includes $x_includes
16975   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16976
16977   if test \! -z "$libdir" ; then
16978     LDFLAGS="$LDFLAGS -L$libdir"
16979   fi
16980   # note: $X_LIBS includes $x_libraries
16981   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16982
16983   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16984   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16985   { $as_echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
16986 $as_echo_n "checking for XpQueryExtension in -lXp... " >&6; }
16987 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
16988   $as_echo_n "(cached) " >&6
16989 else
16990   ac_check_lib_save_LIBS=$LIBS
16991 LIBS="-lXp -lX11 -lXext -lm $LIBS"
16992 cat >conftest.$ac_ext <<_ACEOF
16993 /* confdefs.h.  */
16994 _ACEOF
16995 cat confdefs.h >>conftest.$ac_ext
16996 cat >>conftest.$ac_ext <<_ACEOF
16997 /* end confdefs.h.  */
16998
16999 /* Override any GCC internal prototype to avoid an error.
17000    Use char because int might match the return type of a GCC
17001    builtin and then its argument prototype would still apply.  */
17002 #ifdef __cplusplus
17003 extern "C"
17004 #endif
17005 char XpQueryExtension ();
17006 int
17007 main ()
17008 {
17009 return XpQueryExtension ();
17010   ;
17011   return 0;
17012 }
17013 _ACEOF
17014 rm -rf conftest.$ac_objext conftest$ac_exeext
17015 if { (ac_try="$ac_link"
17016 case "(($ac_try" in
17017   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17018   *) ac_try_echo=$ac_try;;
17019 esac
17020 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17021 $as_echo "$ac_try_echo") >&5
17022   (eval "$ac_link") 2>conftest.er1
17023   ac_status=$?
17024   grep -v '^ *+' conftest.er1 >conftest.err
17025   rm -rf conftest.er1
17026   cat conftest.err >&5
17027   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17028   (exit $ac_status); } && {
17029          test -z "$ac_c_werror_flag" ||
17030          test ! -s conftest.err
17031        } && test -s conftest$ac_exeext && {
17032          test "$cross_compiling" = yes ||
17033          $as_test_x conftest$ac_exeext
17034        }; then
17035   ac_cv_lib_Xp_XpQueryExtension=yes
17036 else
17037   $as_echo "$as_me: failed program was:" >&5
17038 sed 's/^/| /' conftest.$ac_ext >&5
17039
17040         ac_cv_lib_Xp_XpQueryExtension=no
17041 fi
17042
17043 rm -rf conftest.dSYM
17044 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17045       conftest$ac_exeext conftest.$ac_ext
17046 LIBS=$ac_check_lib_save_LIBS
17047 fi
17048 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
17049 $as_echo "$ac_cv_lib_Xp_XpQueryExtension" >&6; }
17050 if test "x$ac_cv_lib_Xp_XpQueryExtension" = x""yes; then
17051   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
17052 else
17053   true
17054 fi
17055
17056   CPPFLAGS="$ac_save_CPPFLAGS"
17057   LDFLAGS="$ac_save_LDFLAGS"
17058 #  LIBS="$ac_save_LIBS"
17059
17060 fi
17061
17062
17063 ###############################################################################
17064 #
17065 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
17066 #
17067 ###############################################################################
17068
17069 have_xintl=no
17070 if test "$have_motif" = yes ; then
17071
17072   ac_save_CPPFLAGS="$CPPFLAGS"
17073   ac_save_LDFLAGS="$LDFLAGS"
17074 #  ac_save_LIBS="$LIBS"
17075
17076   if test \! -z "$includedir" ; then
17077     CPPFLAGS="$CPPFLAGS -I$includedir"
17078   fi
17079   # note: $X_CFLAGS includes $x_includes
17080   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17081
17082   if test \! -z "$libdir" ; then
17083     LDFLAGS="$LDFLAGS -L$libdir"
17084   fi
17085   # note: $X_LIBS includes $x_libraries
17086   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17087
17088   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17089   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17090   { $as_echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
17091 $as_echo_n "checking for _Xsetlocale in -lXintl... " >&6; }
17092 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
17093   $as_echo_n "(cached) " >&6
17094 else
17095   ac_check_lib_save_LIBS=$LIBS
17096 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
17097 cat >conftest.$ac_ext <<_ACEOF
17098 /* confdefs.h.  */
17099 _ACEOF
17100 cat confdefs.h >>conftest.$ac_ext
17101 cat >>conftest.$ac_ext <<_ACEOF
17102 /* end confdefs.h.  */
17103
17104 /* Override any GCC internal prototype to avoid an error.
17105    Use char because int might match the return type of a GCC
17106    builtin and then its argument prototype would still apply.  */
17107 #ifdef __cplusplus
17108 extern "C"
17109 #endif
17110 char _Xsetlocale ();
17111 int
17112 main ()
17113 {
17114 return _Xsetlocale ();
17115   ;
17116   return 0;
17117 }
17118 _ACEOF
17119 rm -rf conftest.$ac_objext conftest$ac_exeext
17120 if { (ac_try="$ac_link"
17121 case "(($ac_try" in
17122   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17123   *) ac_try_echo=$ac_try;;
17124 esac
17125 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17126 $as_echo "$ac_try_echo") >&5
17127   (eval "$ac_link") 2>conftest.er1
17128   ac_status=$?
17129   grep -v '^ *+' conftest.er1 >conftest.err
17130   rm -rf conftest.er1
17131   cat conftest.err >&5
17132   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17133   (exit $ac_status); } && {
17134          test -z "$ac_c_werror_flag" ||
17135          test ! -s conftest.err
17136        } && test -s conftest$ac_exeext && {
17137          test "$cross_compiling" = yes ||
17138          $as_test_x conftest$ac_exeext
17139        }; then
17140   ac_cv_lib_Xintl__Xsetlocale=yes
17141 else
17142   $as_echo "$as_me: failed program was:" >&5
17143 sed 's/^/| /' conftest.$ac_ext >&5
17144
17145         ac_cv_lib_Xintl__Xsetlocale=no
17146 fi
17147
17148 rm -rf conftest.dSYM
17149 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17150       conftest$ac_exeext conftest.$ac_ext
17151 LIBS=$ac_check_lib_save_LIBS
17152 fi
17153 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
17154 $as_echo "$ac_cv_lib_Xintl__Xsetlocale" >&6; }
17155 if test "x$ac_cv_lib_Xintl__Xsetlocale" = x""yes; then
17156   have_xintl=yes
17157 else
17158   have_xintl=no
17159 fi
17160
17161   CPPFLAGS="$ac_save_CPPFLAGS"
17162   LDFLAGS="$ac_save_LDFLAGS"
17163 #  LIBS="$ac_save_LIBS"
17164
17165   if test "$have_xintl" = yes; then
17166     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
17167   fi
17168 fi
17169
17170
17171 ###############################################################################
17172 #
17173 #       Check for -lGL or -lMesaGL.
17174 #
17175 ###############################################################################
17176
17177 have_gl=no
17178 ac_have_mesa_gl=no
17179 with_gl_req=unspecified
17180 gl_halfassed=no
17181
17182 # Check whether --with-gl was given.
17183 if test "${with_gl+set}" = set; then
17184   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
17185 else
17186   with_gl=yes
17187 fi
17188
17189
17190
17191    case "$with_gl" in
17192     yes) ;;
17193     no)  ;;
17194
17195     /*)
17196      { $as_echo "$as_me:$LINENO: checking for GL headers" >&5
17197 $as_echo_n "checking for GL headers... " >&6; }
17198      d=$with_gl/include
17199      if test -d $d; then
17200        X_CFLAGS="-I$d $X_CFLAGS"
17201        { $as_echo "$as_me:$LINENO: result: $d" >&5
17202 $as_echo "$d" >&6; }
17203      else
17204        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17205 $as_echo "not found ($d: no such directory)" >&6; }
17206      fi
17207
17208      { $as_echo "$as_me:$LINENO: checking for GL libs" >&5
17209 $as_echo_n "checking for GL libs... " >&6; }
17210      d=$with_gl/lib
17211      if test -d $d; then
17212        X_LIBS="-L$d $X_LIBS"
17213        { $as_echo "$as_me:$LINENO: result: $d" >&5
17214 $as_echo "$d" >&6; }
17215      else
17216        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17217 $as_echo "not found ($d: no such directory)" >&6; }
17218      fi
17219
17220      # replace the directory string with "yes".
17221      with_gl_req="yes"
17222      with_gl=$with_gl_req
17223      ;;
17224
17225     *)
17226      echo ""
17227      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
17228      echo "       If it is a directory, then \`DIR/include' will be added to"
17229      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17230      exit 1
17231      ;;
17232    esac
17233
17234
17235 ac_mesagl_version=unknown
17236 ac_mesagl_version_string=unknown
17237
17238 if test "$with_gl" = yes; then
17239
17240   ac_save_CPPFLAGS="$CPPFLAGS"
17241   if test \! -z "$includedir" ; then
17242     CPPFLAGS="$CPPFLAGS -I$includedir"
17243   fi
17244   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17245   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17246   if test "${ac_cv_header_GL_gl_h+set}" = set; then
17247   { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5
17248 $as_echo_n "checking for GL/gl.h... " >&6; }
17249 if test "${ac_cv_header_GL_gl_h+set}" = set; then
17250   $as_echo_n "(cached) " >&6
17251 fi
17252 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
17253 $as_echo "$ac_cv_header_GL_gl_h" >&6; }
17254 else
17255   # Is the header compilable?
17256 { $as_echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
17257 $as_echo_n "checking GL/gl.h usability... " >&6; }
17258 cat >conftest.$ac_ext <<_ACEOF
17259 /* confdefs.h.  */
17260 _ACEOF
17261 cat confdefs.h >>conftest.$ac_ext
17262 cat >>conftest.$ac_ext <<_ACEOF
17263 /* end confdefs.h.  */
17264 $ac_includes_default
17265 #include <GL/gl.h>
17266 _ACEOF
17267 rm -rf conftest.$ac_objext
17268 if { (ac_try="$ac_compile"
17269 case "(($ac_try" in
17270   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17271   *) ac_try_echo=$ac_try;;
17272 esac
17273 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17274 $as_echo "$ac_try_echo") >&5
17275   (eval "$ac_compile") 2>conftest.er1
17276   ac_status=$?
17277   grep -v '^ *+' conftest.er1 >conftest.err
17278   rm -rf conftest.er1
17279   cat conftest.err >&5
17280   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17281   (exit $ac_status); } && {
17282          test -z "$ac_c_werror_flag" ||
17283          test ! -s conftest.err
17284        } && test -s conftest.$ac_objext; then
17285   ac_header_compiler=yes
17286 else
17287   $as_echo "$as_me: failed program was:" >&5
17288 sed 's/^/| /' conftest.$ac_ext >&5
17289
17290         ac_header_compiler=no
17291 fi
17292
17293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17294 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17295 $as_echo "$ac_header_compiler" >&6; }
17296
17297 # Is the header present?
17298 { $as_echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
17299 $as_echo_n "checking GL/gl.h presence... " >&6; }
17300 cat >conftest.$ac_ext <<_ACEOF
17301 /* confdefs.h.  */
17302 _ACEOF
17303 cat confdefs.h >>conftest.$ac_ext
17304 cat >>conftest.$ac_ext <<_ACEOF
17305 /* end confdefs.h.  */
17306 #include <GL/gl.h>
17307 _ACEOF
17308 if { (ac_try="$ac_cpp conftest.$ac_ext"
17309 case "(($ac_try" in
17310   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17311   *) ac_try_echo=$ac_try;;
17312 esac
17313 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17314 $as_echo "$ac_try_echo") >&5
17315   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17316   ac_status=$?
17317   grep -v '^ *+' conftest.er1 >conftest.err
17318   rm -rf conftest.er1
17319   cat conftest.err >&5
17320   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17321   (exit $ac_status); } >/dev/null && {
17322          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17323          test ! -s conftest.err
17324        }; then
17325   ac_header_preproc=yes
17326 else
17327   $as_echo "$as_me: failed program was:" >&5
17328 sed 's/^/| /' conftest.$ac_ext >&5
17329
17330   ac_header_preproc=no
17331 fi
17332
17333 rm -rf conftest.err conftest.$ac_ext
17334 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17335 $as_echo "$ac_header_preproc" >&6; }
17336
17337 # So?  What about this header?
17338 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17339   yes:no: )
17340     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
17341 $as_echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17342     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
17343 $as_echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
17344     ac_header_preproc=yes
17345     ;;
17346   no:yes:* )
17347     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
17348 $as_echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
17349     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
17350 $as_echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
17351     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
17352 $as_echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
17353     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
17354 $as_echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17355     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
17356 $as_echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
17357     { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
17358 $as_echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
17359
17360     ;;
17361 esac
17362 { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5
17363 $as_echo_n "checking for GL/gl.h... " >&6; }
17364 if test "${ac_cv_header_GL_gl_h+set}" = set; then
17365   $as_echo_n "(cached) " >&6
17366 else
17367   ac_cv_header_GL_gl_h=$ac_header_preproc
17368 fi
17369 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
17370 $as_echo "$ac_cv_header_GL_gl_h" >&6; }
17371
17372 fi
17373 if test "x$ac_cv_header_GL_gl_h" = x""yes; then
17374   have_gl=yes
17375 else
17376   have_gl=no
17377 fi
17378
17379
17380   CPPFLAGS="$ac_save_CPPFLAGS"
17381   if test "$have_gl" = yes ; then
17382
17383   ac_save_CPPFLAGS="$CPPFLAGS"
17384   if test \! -z "$includedir" ; then
17385     CPPFLAGS="$CPPFLAGS -I$includedir"
17386   fi
17387   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17388   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17389   { $as_echo "$as_me:$LINENO: checking for GL/glx.h" >&5
17390 $as_echo_n "checking for GL/glx.h... " >&6; }
17391 if test "${ac_cv_header_GL_glx_h+set}" = set; then
17392   $as_echo_n "(cached) " >&6
17393 else
17394   cat >conftest.$ac_ext <<_ACEOF
17395 /* confdefs.h.  */
17396 _ACEOF
17397 cat confdefs.h >>conftest.$ac_ext
17398 cat >>conftest.$ac_ext <<_ACEOF
17399 /* end confdefs.h.  */
17400 #include <GL/gl.h>
17401
17402 #include <GL/glx.h>
17403 _ACEOF
17404 rm -rf conftest.$ac_objext
17405 if { (ac_try="$ac_compile"
17406 case "(($ac_try" in
17407   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17408   *) ac_try_echo=$ac_try;;
17409 esac
17410 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17411 $as_echo "$ac_try_echo") >&5
17412   (eval "$ac_compile") 2>conftest.er1
17413   ac_status=$?
17414   grep -v '^ *+' conftest.er1 >conftest.err
17415   rm -rf conftest.er1
17416   cat conftest.err >&5
17417   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17418   (exit $ac_status); } && {
17419          test -z "$ac_c_werror_flag" ||
17420          test ! -s conftest.err
17421        } && test -s conftest.$ac_objext; then
17422   ac_cv_header_GL_glx_h=yes
17423 else
17424   $as_echo "$as_me: failed program was:" >&5
17425 sed 's/^/| /' conftest.$ac_ext >&5
17426
17427         ac_cv_header_GL_glx_h=no
17428 fi
17429
17430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17431 fi
17432 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
17433 $as_echo "$ac_cv_header_GL_glx_h" >&6; }
17434 if test "x$ac_cv_header_GL_glx_h" = x""yes; then
17435   have_gl=yes
17436 else
17437   have_gl=no
17438 fi
17439
17440
17441   CPPFLAGS="$ac_save_CPPFLAGS"
17442   fi
17443
17444   # If we have the headers, try and figure out which vendor it's from.
17445   #
17446   if test "$have_gl" = yes ; then
17447
17448     # We need to know whether it's MesaGL so that we know which libraries
17449     # to link against.
17450     #
17451     { $as_echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
17452 $as_echo_n "checking whether GL is really MesaGL... " >&6; }
17453 if test "${ac_cv_have_mesa_gl+set}" = set; then
17454   $as_echo_n "(cached) " >&6
17455 else
17456   ac_cv_have_mesa_gl=no
17457        if test "$ac_macosx" = no; then
17458          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
17459          # It's not really Mesa, is it?
17460
17461   ac_save_CPPFLAGS="$CPPFLAGS"
17462   if test \! -z "$includedir" ; then
17463     CPPFLAGS="$CPPFLAGS -I$includedir"
17464   fi
17465   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17466   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17467   cat >conftest.$ac_ext <<_ACEOF
17468 /* confdefs.h.  */
17469 _ACEOF
17470 cat confdefs.h >>conftest.$ac_ext
17471 cat >>conftest.$ac_ext <<_ACEOF
17472 /* end confdefs.h.  */
17473 #include <GL/glx.h>
17474
17475 _ACEOF
17476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17477   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
17478   ac_cv_have_mesa_gl=yes
17479 fi
17480 rm -rf conftest*
17481
17482   CPPFLAGS="$ac_save_CPPFLAGS"
17483        fi
17484 fi
17485 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
17486 $as_echo "$ac_cv_have_mesa_gl" >&6; }
17487     ac_have_mesa_gl=$ac_cv_have_mesa_gl
17488
17489     gl_lib_1=""
17490     GL_LIBS=""
17491
17492     if test "$ac_macosx" = yes; then
17493
17494       # Without these, every link against libGL gets a bunch of useless
17495       # warnings.
17496       #
17497       osx_crud="-bind_at_load -multiply_defined suppress"
17498       { $as_echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
17499 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
17500       GL_LIBS="$GL_LIBS $osx_crud"
17501       unset osx_crud
17502
17503       # New lossage in 10.5.0: without this, we get:
17504       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
17505       #
17506       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
17507       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
17508
17509       { $as_echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
17510 $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
17511       GL_LIBS="$GL_LIBS $osx_crud"
17512       unset osx_crud
17513
17514       # New lossage in 10.6.8: we can't allow -L/opt/local/lib to be in the
17515       # link line, or at runtime XQueryExtension gets a segv due to some kind
17516       # of library version skew.  Libs must come from /usr/X11/lib even if
17517       # $prefix and/or $exec_prefix are set to /opt/local/.
17518       #
17519       { $as_echo "$as_me:$LINENO: result: omitting \"$libdir\" from LDFLAGS" >&5
17520 $as_echo "omitting \"$libdir\" from LDFLAGS" >&6; }
17521       libdir=''
17522
17523     fi
17524
17525
17526     # Some versions of MesaGL are compiled to require -lpthread.
17527     # So if the Mesa headers exist, and -lpthread exists, then always
17528     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
17529     #
17530     if test "$ac_have_mesa_gl" = yes; then
17531       { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
17532 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
17533 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
17534   $as_echo_n "(cached) " >&6
17535 else
17536   ac_check_lib_save_LIBS=$LIBS
17537 LIBS="-lpthread  $LIBS"
17538 cat >conftest.$ac_ext <<_ACEOF
17539 /* confdefs.h.  */
17540 _ACEOF
17541 cat confdefs.h >>conftest.$ac_ext
17542 cat >>conftest.$ac_ext <<_ACEOF
17543 /* end confdefs.h.  */
17544
17545 /* Override any GCC internal prototype to avoid an error.
17546    Use char because int might match the return type of a GCC
17547    builtin and then its argument prototype would still apply.  */
17548 #ifdef __cplusplus
17549 extern "C"
17550 #endif
17551 char pthread_create ();
17552 int
17553 main ()
17554 {
17555 return pthread_create ();
17556   ;
17557   return 0;
17558 }
17559 _ACEOF
17560 rm -rf conftest.$ac_objext conftest$ac_exeext
17561 if { (ac_try="$ac_link"
17562 case "(($ac_try" in
17563   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17564   *) ac_try_echo=$ac_try;;
17565 esac
17566 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17567 $as_echo "$ac_try_echo") >&5
17568   (eval "$ac_link") 2>conftest.er1
17569   ac_status=$?
17570   grep -v '^ *+' conftest.er1 >conftest.err
17571   rm -rf conftest.er1
17572   cat conftest.err >&5
17573   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17574   (exit $ac_status); } && {
17575          test -z "$ac_c_werror_flag" ||
17576          test ! -s conftest.err
17577        } && test -s conftest$ac_exeext && {
17578          test "$cross_compiling" = yes ||
17579          $as_test_x conftest$ac_exeext
17580        }; then
17581   ac_cv_lib_pthread_pthread_create=yes
17582 else
17583   $as_echo "$as_me: failed program was:" >&5
17584 sed 's/^/| /' conftest.$ac_ext >&5
17585
17586         ac_cv_lib_pthread_pthread_create=no
17587 fi
17588
17589 rm -rf conftest.dSYM
17590 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17591       conftest$ac_exeext conftest.$ac_ext
17592 LIBS=$ac_check_lib_save_LIBS
17593 fi
17594 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
17595 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
17596 if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
17597   GL_LIBS="-lpthread"
17598 fi
17599
17600     fi
17601
17602
17603     # If we have Mesa headers, check to see if we can link against -lMesaGL.
17604     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
17605     # Else, warn that GL is busted.  (We have the headers, but no libs.)
17606     #
17607
17608     if test "$ac_have_mesa_gl" = yes ; then
17609
17610   ac_save_CPPFLAGS="$CPPFLAGS"
17611   ac_save_LDFLAGS="$LDFLAGS"
17612 #  ac_save_LIBS="$LIBS"
17613
17614   if test \! -z "$includedir" ; then
17615     CPPFLAGS="$CPPFLAGS -I$includedir"
17616   fi
17617   # note: $X_CFLAGS includes $x_includes
17618   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17619
17620   if test \! -z "$libdir" ; then
17621     LDFLAGS="$LDFLAGS -L$libdir"
17622   fi
17623   # note: $X_LIBS includes $x_libraries
17624   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17625
17626   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17627   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17628   { $as_echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
17629 $as_echo_n "checking for glXCreateContext in -lMesaGL... " >&6; }
17630 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
17631   $as_echo_n "(cached) " >&6
17632 else
17633   ac_check_lib_save_LIBS=$LIBS
17634 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
17635 cat >conftest.$ac_ext <<_ACEOF
17636 /* confdefs.h.  */
17637 _ACEOF
17638 cat confdefs.h >>conftest.$ac_ext
17639 cat >>conftest.$ac_ext <<_ACEOF
17640 /* end confdefs.h.  */
17641
17642 /* Override any GCC internal prototype to avoid an error.
17643    Use char because int might match the return type of a GCC
17644    builtin and then its argument prototype would still apply.  */
17645 #ifdef __cplusplus
17646 extern "C"
17647 #endif
17648 char glXCreateContext ();
17649 int
17650 main ()
17651 {
17652 return glXCreateContext ();
17653   ;
17654   return 0;
17655 }
17656 _ACEOF
17657 rm -rf conftest.$ac_objext conftest$ac_exeext
17658 if { (ac_try="$ac_link"
17659 case "(($ac_try" in
17660   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17661   *) ac_try_echo=$ac_try;;
17662 esac
17663 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17664 $as_echo "$ac_try_echo") >&5
17665   (eval "$ac_link") 2>conftest.er1
17666   ac_status=$?
17667   grep -v '^ *+' conftest.er1 >conftest.err
17668   rm -rf conftest.er1
17669   cat conftest.err >&5
17670   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17671   (exit $ac_status); } && {
17672          test -z "$ac_c_werror_flag" ||
17673          test ! -s conftest.err
17674        } && test -s conftest$ac_exeext && {
17675          test "$cross_compiling" = yes ||
17676          $as_test_x conftest$ac_exeext
17677        }; then
17678   ac_cv_lib_MesaGL_glXCreateContext=yes
17679 else
17680   $as_echo "$as_me: failed program was:" >&5
17681 sed 's/^/| /' conftest.$ac_ext >&5
17682
17683         ac_cv_lib_MesaGL_glXCreateContext=no
17684 fi
17685
17686 rm -rf conftest.dSYM
17687 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17688       conftest$ac_exeext conftest.$ac_ext
17689 LIBS=$ac_check_lib_save_LIBS
17690 fi
17691 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
17692 $as_echo "$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
17693 if test "x$ac_cv_lib_MesaGL_glXCreateContext" = x""yes; then
17694   gl_lib_1="MesaGL"
17695                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
17696 fi
17697
17698   CPPFLAGS="$ac_save_CPPFLAGS"
17699   LDFLAGS="$ac_save_LDFLAGS"
17700 #  LIBS="$ac_save_LIBS"
17701
17702     fi
17703
17704     if test "$gl_lib_1" = "" ; then
17705
17706   ac_save_CPPFLAGS="$CPPFLAGS"
17707   ac_save_LDFLAGS="$LDFLAGS"
17708 #  ac_save_LIBS="$LIBS"
17709
17710   if test \! -z "$includedir" ; then
17711     CPPFLAGS="$CPPFLAGS -I$includedir"
17712   fi
17713   # note: $X_CFLAGS includes $x_includes
17714   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17715
17716   if test \! -z "$libdir" ; then
17717     LDFLAGS="$LDFLAGS -L$libdir"
17718   fi
17719   # note: $X_LIBS includes $x_libraries
17720   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17721
17722   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17723   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17724   { $as_echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
17725 $as_echo_n "checking for glXCreateContext in -lGL... " >&6; }
17726 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
17727   $as_echo_n "(cached) " >&6
17728 else
17729   ac_check_lib_save_LIBS=$LIBS
17730 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
17731 cat >conftest.$ac_ext <<_ACEOF
17732 /* confdefs.h.  */
17733 _ACEOF
17734 cat confdefs.h >>conftest.$ac_ext
17735 cat >>conftest.$ac_ext <<_ACEOF
17736 /* end confdefs.h.  */
17737
17738 /* Override any GCC internal prototype to avoid an error.
17739    Use char because int might match the return type of a GCC
17740    builtin and then its argument prototype would still apply.  */
17741 #ifdef __cplusplus
17742 extern "C"
17743 #endif
17744 char glXCreateContext ();
17745 int
17746 main ()
17747 {
17748 return glXCreateContext ();
17749   ;
17750   return 0;
17751 }
17752 _ACEOF
17753 rm -rf conftest.$ac_objext conftest$ac_exeext
17754 if { (ac_try="$ac_link"
17755 case "(($ac_try" in
17756   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17757   *) ac_try_echo=$ac_try;;
17758 esac
17759 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17760 $as_echo "$ac_try_echo") >&5
17761   (eval "$ac_link") 2>conftest.er1
17762   ac_status=$?
17763   grep -v '^ *+' conftest.er1 >conftest.err
17764   rm -rf conftest.er1
17765   cat conftest.err >&5
17766   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17767   (exit $ac_status); } && {
17768          test -z "$ac_c_werror_flag" ||
17769          test ! -s conftest.err
17770        } && test -s conftest$ac_exeext && {
17771          test "$cross_compiling" = yes ||
17772          $as_test_x conftest$ac_exeext
17773        }; then
17774   ac_cv_lib_GL_glXCreateContext=yes
17775 else
17776   $as_echo "$as_me: failed program was:" >&5
17777 sed 's/^/| /' conftest.$ac_ext >&5
17778
17779         ac_cv_lib_GL_glXCreateContext=no
17780 fi
17781
17782 rm -rf conftest.dSYM
17783 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17784       conftest$ac_exeext conftest.$ac_ext
17785 LIBS=$ac_check_lib_save_LIBS
17786 fi
17787 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
17788 $as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; }
17789 if test "x$ac_cv_lib_GL_glXCreateContext" = x""yes; then
17790   gl_lib_1="GL"
17791                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
17792 fi
17793
17794   CPPFLAGS="$ac_save_CPPFLAGS"
17795   LDFLAGS="$ac_save_LDFLAGS"
17796 #  LIBS="$ac_save_LIBS"
17797
17798     fi
17799
17800     if test "$gl_lib_1" = "" ; then
17801       # we have headers, but no libs -- bail.
17802       have_gl=no
17803       ac_have_mesa_gl=no
17804       gl_halfassed=yes
17805     else
17806       # linking works -- we can build the GL hacks.
17807       cat >>confdefs.h <<\_ACEOF
17808 #define HAVE_GL 1
17809 _ACEOF
17810
17811       if test "$ac_have_mesa_gl" = yes ; then
17812         cat >>confdefs.h <<\_ACEOF
17813 #define HAVE_MESA_GL 1
17814 _ACEOF
17815
17816       fi
17817     fi
17818   fi
17819
17820
17821   # Now that we know we have GL headers and libs, do some more GL testing.
17822   #
17823
17824   if test "$have_gl" = yes ; then
17825     # If it's MesaGL, we'd like to issue a warning if the version number
17826     # is less than or equal to 2.6, because that version had a security bug.
17827     #
17828     if test "$ac_have_mesa_gl" = yes; then
17829
17830       { $as_echo "$as_me:$LINENO: checking MesaGL version number" >&5
17831 $as_echo_n "checking MesaGL version number... " >&6; }
17832 if test "${ac_cv_mesagl_version_string+set}" = set; then
17833   $as_echo_n "(cached) " >&6
17834 else
17835   cat > conftest.$ac_ext <<EOF
17836 #line 17840 "configure"
17837 #include "confdefs.h"
17838 #include <GL/gl.h>
17839 #ifndef MESA_MAJOR_VERSION
17840 # include <GL/xmesa.h>
17841 # ifdef XMESA_MAJOR_VERSION
17842    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
17843       we have to check the XMesa version number (the number of the X protocol
17844       support, which seems to be the same as the Mesa version number.)
17845     */
17846 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
17847 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
17848 # else
17849    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
17850       so we have no way of telling what version of Mesa this is at all.
17851       So, we'll guess that the osmesa version (the "offscreen protocol")
17852       is less than or equal to the real mesa version number.  Except that
17853       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
17854       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
17855     */
17856 # include <GL/osmesa.h>
17857 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
17858 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
17859 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
17860 #   undef MESA_MINOR_VERSION
17861 #   define MESA_MINOR_VERSION 4 or newer, probably?
17862 #  endif
17863 # endif
17864 #endif
17865 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
17866 EOF
17867
17868          ac_save_CPPFLAGS="$CPPFLAGS"
17869          if test \! -z "$includedir" ; then
17870            CPPFLAGS="$CPPFLAGS -I$includedir"
17871          fi
17872          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17873
17874          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
17875
17876          # M4 sucks!!
17877
17878           mglv=`echo "$mglv" | sed -n \
17879              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
17880
17881
17882          rm -rf conftest.$ac_ext
17883
17884          CPPFLAGS="$ac_save_CPPFLAGS"
17885
17886          if test "$mglv" = ""; then
17887            ac_mesagl_version=unknown
17888            ac_mesagl_version_string=unknown
17889          else
17890            ac_mesagl_version_string="$mglv"
17891            # M4 sucks!!
17892
17893            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
17894            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
17895
17896            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
17897            if test -z "$ac_mesagl_version"; then
17898              ac_mesagl_version=unknown
17899              ac_mesagl_version_string=unknown
17900            fi
17901          fi
17902          ac_cv_mesagl_version=$ac_mesagl_version
17903          ac_cv_mesagl_version_string=$ac_mesagl_version_string
17904
17905 fi
17906 { $as_echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
17907 $as_echo "$ac_cv_mesagl_version_string" >&6; }
17908       ac_mesagl_version=$ac_cv_mesagl_version
17909       ac_mesagl_version_string=$ac_cv_mesagl_version_string
17910     fi
17911
17912
17913     # Check for OpenGL 1.1 features.
17914     #
17915
17916   ac_save_CPPFLAGS="$CPPFLAGS"
17917   ac_save_LDFLAGS="$LDFLAGS"
17918 #  ac_save_LIBS="$LIBS"
17919
17920   if test \! -z "$includedir" ; then
17921     CPPFLAGS="$CPPFLAGS -I$includedir"
17922   fi
17923   # note: $X_CFLAGS includes $x_includes
17924   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17925
17926   if test \! -z "$libdir" ; then
17927     LDFLAGS="$LDFLAGS -L$libdir"
17928   fi
17929   # note: $X_LIBS includes $x_libraries
17930   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17931
17932   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17933   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17934   as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
17935 { $as_echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
17936 $as_echo_n "checking for glBindTexture in -l$gl_lib_1... " >&6; }
17937 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
17938   $as_echo_n "(cached) " >&6
17939 else
17940   ac_check_lib_save_LIBS=$LIBS
17941 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
17942 cat >conftest.$ac_ext <<_ACEOF
17943 /* confdefs.h.  */
17944 _ACEOF
17945 cat confdefs.h >>conftest.$ac_ext
17946 cat >>conftest.$ac_ext <<_ACEOF
17947 /* end confdefs.h.  */
17948
17949 /* Override any GCC internal prototype to avoid an error.
17950    Use char because int might match the return type of a GCC
17951    builtin and then its argument prototype would still apply.  */
17952 #ifdef __cplusplus
17953 extern "C"
17954 #endif
17955 char glBindTexture ();
17956 int
17957 main ()
17958 {
17959 return glBindTexture ();
17960   ;
17961   return 0;
17962 }
17963 _ACEOF
17964 rm -rf conftest.$ac_objext conftest$ac_exeext
17965 if { (ac_try="$ac_link"
17966 case "(($ac_try" in
17967   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17968   *) ac_try_echo=$ac_try;;
17969 esac
17970 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17971 $as_echo "$ac_try_echo") >&5
17972   (eval "$ac_link") 2>conftest.er1
17973   ac_status=$?
17974   grep -v '^ *+' conftest.er1 >conftest.err
17975   rm -rf conftest.er1
17976   cat conftest.err >&5
17977   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17978   (exit $ac_status); } && {
17979          test -z "$ac_c_werror_flag" ||
17980          test ! -s conftest.err
17981        } && test -s conftest$ac_exeext && {
17982          test "$cross_compiling" = yes ||
17983          $as_test_x conftest$ac_exeext
17984        }; then
17985   eval "$as_ac_Lib=yes"
17986 else
17987   $as_echo "$as_me: failed program was:" >&5
17988 sed 's/^/| /' conftest.$ac_ext >&5
17989
17990         eval "$as_ac_Lib=no"
17991 fi
17992
17993 rm -rf conftest.dSYM
17994 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17995       conftest$ac_exeext conftest.$ac_ext
17996 LIBS=$ac_check_lib_save_LIBS
17997 fi
17998 ac_res=`eval 'as_val=${'$as_ac_Lib'}
17999                  $as_echo "$as_val"'`
18000                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18001 $as_echo "$ac_res" >&6; }
18002 as_val=`eval 'as_val=${'$as_ac_Lib'}
18003                  $as_echo "$as_val"'`
18004    if test "x$as_val" = x""yes; then
18005   cat >>confdefs.h <<\_ACEOF
18006 #define HAVE_GLBINDTEXTURE 1
18007 _ACEOF
18008
18009 else
18010   true
18011 fi
18012
18013   CPPFLAGS="$ac_save_CPPFLAGS"
18014   LDFLAGS="$ac_save_LDFLAGS"
18015 #  LIBS="$ac_save_LIBS"
18016
18017   fi
18018
18019 elif test "$with_gl" != no; then
18020   echo "error: must be yes or no: --with-gl=$with_gl"
18021   exit 1
18022 fi
18023
18024
18025 ###############################################################################
18026 #
18027 #       Check for -lgle.
18028 #
18029 ###############################################################################
18030
18031 have_gle=no
18032 with_gle_req=unspecified
18033 gle_halfassed=no
18034
18035 # Check whether --with-gle was given.
18036 if test "${with_gle+set}" = set; then
18037   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
18038 else
18039   with_gle=yes
18040 fi
18041
18042
18043
18044    case "$with_gle" in
18045     yes) ;;
18046     no)  ;;
18047
18048     /*)
18049      { $as_echo "$as_me:$LINENO: checking for GLE headers" >&5
18050 $as_echo_n "checking for GLE headers... " >&6; }
18051      d=$with_gle/include
18052      if test -d $d; then
18053        X_CFLAGS="-I$d $X_CFLAGS"
18054        { $as_echo "$as_me:$LINENO: result: $d" >&5
18055 $as_echo "$d" >&6; }
18056      else
18057        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18058 $as_echo "not found ($d: no such directory)" >&6; }
18059      fi
18060
18061      { $as_echo "$as_me:$LINENO: checking for GLE libs" >&5
18062 $as_echo_n "checking for GLE libs... " >&6; }
18063      d=$with_gle/lib
18064      if test -d $d; then
18065        X_LIBS="-L$d $X_LIBS"
18066        { $as_echo "$as_me:$LINENO: result: $d" >&5
18067 $as_echo "$d" >&6; }
18068      else
18069        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18070 $as_echo "not found ($d: no such directory)" >&6; }
18071      fi
18072
18073      # replace the directory string with "yes".
18074      with_gle_req="yes"
18075      with_gle=$with_gle_req
18076      ;;
18077
18078     *)
18079      echo ""
18080      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
18081      echo "       If it is a directory, then \`DIR/include' will be added to"
18082      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18083      exit 1
18084      ;;
18085    esac
18086
18087
18088 GLE_LIBS=""
18089
18090 if test "$have_gl" = no ; then
18091  true
18092 elif test "$with_gle" = yes; then
18093
18094
18095   ac_save_CPPFLAGS="$CPPFLAGS"
18096   if test \! -z "$includedir" ; then
18097     CPPFLAGS="$CPPFLAGS -I$includedir"
18098   fi
18099   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18100   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18101   { $as_echo "$as_me:$LINENO: checking for GL/gle.h" >&5
18102 $as_echo_n "checking for GL/gle.h... " >&6; }
18103 if test "${ac_cv_header_GL_gle_h+set}" = set; then
18104   $as_echo_n "(cached) " >&6
18105 else
18106   cat >conftest.$ac_ext <<_ACEOF
18107 /* confdefs.h.  */
18108 _ACEOF
18109 cat confdefs.h >>conftest.$ac_ext
18110 cat >>conftest.$ac_ext <<_ACEOF
18111 /* end confdefs.h.  */
18112 #include <GL/gl.h>
18113
18114 #include <GL/gle.h>
18115 _ACEOF
18116 rm -rf conftest.$ac_objext
18117 if { (ac_try="$ac_compile"
18118 case "(($ac_try" in
18119   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18120   *) ac_try_echo=$ac_try;;
18121 esac
18122 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18123 $as_echo "$ac_try_echo") >&5
18124   (eval "$ac_compile") 2>conftest.er1
18125   ac_status=$?
18126   grep -v '^ *+' conftest.er1 >conftest.err
18127   rm -rf conftest.er1
18128   cat conftest.err >&5
18129   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18130   (exit $ac_status); } && {
18131          test -z "$ac_c_werror_flag" ||
18132          test ! -s conftest.err
18133        } && test -s conftest.$ac_objext; then
18134   ac_cv_header_GL_gle_h=yes
18135 else
18136   $as_echo "$as_me: failed program was:" >&5
18137 sed 's/^/| /' conftest.$ac_ext >&5
18138
18139         ac_cv_header_GL_gle_h=no
18140 fi
18141
18142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18143 fi
18144 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
18145 $as_echo "$ac_cv_header_GL_gle_h" >&6; }
18146 if test "x$ac_cv_header_GL_gle_h" = x""yes; then
18147   have_gle3=yes
18148 else
18149   have_gle3=no
18150 fi
18151
18152
18153   CPPFLAGS="$ac_save_CPPFLAGS"
18154   if test "$have_gle3" = yes ; then
18155     have_gle=yes;
18156   else
18157
18158   ac_save_CPPFLAGS="$CPPFLAGS"
18159   if test \! -z "$includedir" ; then
18160     CPPFLAGS="$CPPFLAGS -I$includedir"
18161   fi
18162   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18163   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18164   { $as_echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
18165 $as_echo_n "checking for GL/gutil.h... " >&6; }
18166 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
18167   $as_echo_n "(cached) " >&6
18168 else
18169   cat >conftest.$ac_ext <<_ACEOF
18170 /* confdefs.h.  */
18171 _ACEOF
18172 cat confdefs.h >>conftest.$ac_ext
18173 cat >>conftest.$ac_ext <<_ACEOF
18174 /* end confdefs.h.  */
18175 #include <GL/gl.h>
18176
18177 #include <GL/gutil.h>
18178 _ACEOF
18179 rm -rf conftest.$ac_objext
18180 if { (ac_try="$ac_compile"
18181 case "(($ac_try" in
18182   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18183   *) ac_try_echo=$ac_try;;
18184 esac
18185 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18186 $as_echo "$ac_try_echo") >&5
18187   (eval "$ac_compile") 2>conftest.er1
18188   ac_status=$?
18189   grep -v '^ *+' conftest.er1 >conftest.err
18190   rm -rf conftest.er1
18191   cat conftest.err >&5
18192   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18193   (exit $ac_status); } && {
18194          test -z "$ac_c_werror_flag" ||
18195          test ! -s conftest.err
18196        } && test -s conftest.$ac_objext; then
18197   ac_cv_header_GL_gutil_h=yes
18198 else
18199   $as_echo "$as_me: failed program was:" >&5
18200 sed 's/^/| /' conftest.$ac_ext >&5
18201
18202         ac_cv_header_GL_gutil_h=no
18203 fi
18204
18205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18206 fi
18207 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
18208 $as_echo "$ac_cv_header_GL_gutil_h" >&6; }
18209 if test "x$ac_cv_header_GL_gutil_h" = x""yes; then
18210   have_gle=yes
18211 else
18212   have_gle=no
18213 fi
18214
18215
18216   CPPFLAGS="$ac_save_CPPFLAGS"
18217     if test "$have_gle" = yes ; then
18218
18219   ac_save_CPPFLAGS="$CPPFLAGS"
18220   if test \! -z "$includedir" ; then
18221     CPPFLAGS="$CPPFLAGS -I$includedir"
18222   fi
18223   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18224   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18225   { $as_echo "$as_me:$LINENO: checking for GL/tube.h" >&5
18226 $as_echo_n "checking for GL/tube.h... " >&6; }
18227 if test "${ac_cv_header_GL_tube_h+set}" = set; then
18228   $as_echo_n "(cached) " >&6
18229 else
18230   cat >conftest.$ac_ext <<_ACEOF
18231 /* confdefs.h.  */
18232 _ACEOF
18233 cat confdefs.h >>conftest.$ac_ext
18234 cat >>conftest.$ac_ext <<_ACEOF
18235 /* end confdefs.h.  */
18236 #include <GL/gl.h>
18237
18238 #include <GL/tube.h>
18239 _ACEOF
18240 rm -rf conftest.$ac_objext
18241 if { (ac_try="$ac_compile"
18242 case "(($ac_try" in
18243   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18244   *) ac_try_echo=$ac_try;;
18245 esac
18246 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18247 $as_echo "$ac_try_echo") >&5
18248   (eval "$ac_compile") 2>conftest.er1
18249   ac_status=$?
18250   grep -v '^ *+' conftest.er1 >conftest.err
18251   rm -rf conftest.er1
18252   cat conftest.err >&5
18253   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18254   (exit $ac_status); } && {
18255          test -z "$ac_c_werror_flag" ||
18256          test ! -s conftest.err
18257        } && test -s conftest.$ac_objext; then
18258   ac_cv_header_GL_tube_h=yes
18259 else
18260   $as_echo "$as_me: failed program was:" >&5
18261 sed 's/^/| /' conftest.$ac_ext >&5
18262
18263         ac_cv_header_GL_tube_h=no
18264 fi
18265
18266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18267 fi
18268 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
18269 $as_echo "$ac_cv_header_GL_tube_h" >&6; }
18270 if test "x$ac_cv_header_GL_tube_h" = x""yes; then
18271   have_gle=yes
18272 else
18273   have_gle=no
18274 fi
18275
18276
18277   CPPFLAGS="$ac_save_CPPFLAGS"
18278     fi
18279   fi
18280
18281   if test "$have_gle" = yes ; then
18282     have_gle=no
18283     gle_halfassed=yes
18284
18285   ac_save_CPPFLAGS="$CPPFLAGS"
18286   ac_save_LDFLAGS="$LDFLAGS"
18287 #  ac_save_LIBS="$LIBS"
18288
18289   if test \! -z "$includedir" ; then
18290     CPPFLAGS="$CPPFLAGS -I$includedir"
18291   fi
18292   # note: $X_CFLAGS includes $x_includes
18293   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18294
18295   if test \! -z "$libdir" ; then
18296     LDFLAGS="$LDFLAGS -L$libdir"
18297   fi
18298   # note: $X_LIBS includes $x_libraries
18299   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18300
18301   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18302   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18303   { $as_echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
18304 $as_echo_n "checking for gleCreateGC in -lgle... " >&6; }
18305 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
18306   $as_echo_n "(cached) " >&6
18307 else
18308   ac_check_lib_save_LIBS=$LIBS
18309 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
18310 cat >conftest.$ac_ext <<_ACEOF
18311 /* confdefs.h.  */
18312 _ACEOF
18313 cat confdefs.h >>conftest.$ac_ext
18314 cat >>conftest.$ac_ext <<_ACEOF
18315 /* end confdefs.h.  */
18316
18317 /* Override any GCC internal prototype to avoid an error.
18318    Use char because int might match the return type of a GCC
18319    builtin and then its argument prototype would still apply.  */
18320 #ifdef __cplusplus
18321 extern "C"
18322 #endif
18323 char gleCreateGC ();
18324 int
18325 main ()
18326 {
18327 return gleCreateGC ();
18328   ;
18329   return 0;
18330 }
18331 _ACEOF
18332 rm -rf conftest.$ac_objext conftest$ac_exeext
18333 if { (ac_try="$ac_link"
18334 case "(($ac_try" in
18335   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18336   *) ac_try_echo=$ac_try;;
18337 esac
18338 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18339 $as_echo "$ac_try_echo") >&5
18340   (eval "$ac_link") 2>conftest.er1
18341   ac_status=$?
18342   grep -v '^ *+' conftest.er1 >conftest.err
18343   rm -rf conftest.er1
18344   cat conftest.err >&5
18345   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18346   (exit $ac_status); } && {
18347          test -z "$ac_c_werror_flag" ||
18348          test ! -s conftest.err
18349        } && test -s conftest$ac_exeext && {
18350          test "$cross_compiling" = yes ||
18351          $as_test_x conftest$ac_exeext
18352        }; then
18353   ac_cv_lib_gle_gleCreateGC=yes
18354 else
18355   $as_echo "$as_me: failed program was:" >&5
18356 sed 's/^/| /' conftest.$ac_ext >&5
18357
18358         ac_cv_lib_gle_gleCreateGC=no
18359 fi
18360
18361 rm -rf conftest.dSYM
18362 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18363       conftest$ac_exeext conftest.$ac_ext
18364 LIBS=$ac_check_lib_save_LIBS
18365 fi
18366 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
18367 $as_echo "$ac_cv_lib_gle_gleCreateGC" >&6; }
18368 if test "x$ac_cv_lib_gle_gleCreateGC" = x""yes; then
18369   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
18370 fi
18371
18372   CPPFLAGS="$ac_save_CPPFLAGS"
18373   LDFLAGS="$ac_save_LDFLAGS"
18374 #  LIBS="$ac_save_LIBS"
18375
18376   fi
18377   if test "$have_gle" = yes ; then
18378     have_gle=no
18379     gle_halfassed=yes
18380
18381     # sometimes the libmatrix stuff is included in libgle.  look there first.
18382 #
18383 # I don't get it.  For some reason, this test passes on SGI, as if
18384 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
18385 # Yet the link is succeeding.  Why???
18386 #
18387 #    AC_CHECK_X_LIB(gle, uview_direction_d,
18388 #                   [have_gle=yes; gle_halfassed=no],
18389 #                   [], $GL_LIBS -lX11 -lXext -lm)
18390
18391     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
18392     # *sigh*
18393     if test "$have_gle3" = yes ; then
18394
18395   ac_save_CPPFLAGS="$CPPFLAGS"
18396   ac_save_LDFLAGS="$LDFLAGS"
18397 #  ac_save_LIBS="$LIBS"
18398
18399   if test \! -z "$includedir" ; then
18400     CPPFLAGS="$CPPFLAGS -I$includedir"
18401   fi
18402   # note: $X_CFLAGS includes $x_includes
18403   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18404
18405   if test \! -z "$libdir" ; then
18406     LDFLAGS="$LDFLAGS -L$libdir"
18407   fi
18408   # note: $X_LIBS includes $x_libraries
18409   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18410
18411   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18412   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18413   { $as_echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
18414 $as_echo_n "checking for uview_direction in -lgle... " >&6; }
18415 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
18416   $as_echo_n "(cached) " >&6
18417 else
18418   ac_check_lib_save_LIBS=$LIBS
18419 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
18420 cat >conftest.$ac_ext <<_ACEOF
18421 /* confdefs.h.  */
18422 _ACEOF
18423 cat confdefs.h >>conftest.$ac_ext
18424 cat >>conftest.$ac_ext <<_ACEOF
18425 /* end confdefs.h.  */
18426
18427 /* Override any GCC internal prototype to avoid an error.
18428    Use char because int might match the return type of a GCC
18429    builtin and then its argument prototype would still apply.  */
18430 #ifdef __cplusplus
18431 extern "C"
18432 #endif
18433 char uview_direction ();
18434 int
18435 main ()
18436 {
18437 return uview_direction ();
18438   ;
18439   return 0;
18440 }
18441 _ACEOF
18442 rm -rf conftest.$ac_objext conftest$ac_exeext
18443 if { (ac_try="$ac_link"
18444 case "(($ac_try" in
18445   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18446   *) ac_try_echo=$ac_try;;
18447 esac
18448 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18449 $as_echo "$ac_try_echo") >&5
18450   (eval "$ac_link") 2>conftest.er1
18451   ac_status=$?
18452   grep -v '^ *+' conftest.er1 >conftest.err
18453   rm -rf conftest.er1
18454   cat conftest.err >&5
18455   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18456   (exit $ac_status); } && {
18457          test -z "$ac_c_werror_flag" ||
18458          test ! -s conftest.err
18459        } && test -s conftest$ac_exeext && {
18460          test "$cross_compiling" = yes ||
18461          $as_test_x conftest$ac_exeext
18462        }; then
18463   ac_cv_lib_gle_uview_direction=yes
18464 else
18465   $as_echo "$as_me: failed program was:" >&5
18466 sed 's/^/| /' conftest.$ac_ext >&5
18467
18468         ac_cv_lib_gle_uview_direction=no
18469 fi
18470
18471 rm -rf conftest.dSYM
18472 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18473       conftest$ac_exeext conftest.$ac_ext
18474 LIBS=$ac_check_lib_save_LIBS
18475 fi
18476 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
18477 $as_echo "$ac_cv_lib_gle_uview_direction" >&6; }
18478 if test "x$ac_cv_lib_gle_uview_direction" = x""yes; then
18479   have_gle=yes; gle_halfassed=no
18480 fi
18481
18482   CPPFLAGS="$ac_save_CPPFLAGS"
18483   LDFLAGS="$ac_save_LDFLAGS"
18484 #  LIBS="$ac_save_LIBS"
18485
18486     fi
18487     # if it wasn't in libgle, then look in libmatrix.
18488     if test "$have_gle" = no ; then
18489
18490   ac_save_CPPFLAGS="$CPPFLAGS"
18491   ac_save_LDFLAGS="$LDFLAGS"
18492 #  ac_save_LIBS="$LIBS"
18493
18494   if test \! -z "$includedir" ; then
18495     CPPFLAGS="$CPPFLAGS -I$includedir"
18496   fi
18497   # note: $X_CFLAGS includes $x_includes
18498   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18499
18500   if test \! -z "$libdir" ; then
18501     LDFLAGS="$LDFLAGS -L$libdir"
18502   fi
18503   # note: $X_LIBS includes $x_libraries
18504   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18505
18506   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18507   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18508   { $as_echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
18509 $as_echo_n "checking for uview_direction_d in -lmatrix... " >&6; }
18510 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
18511   $as_echo_n "(cached) " >&6
18512 else
18513   ac_check_lib_save_LIBS=$LIBS
18514 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
18515 cat >conftest.$ac_ext <<_ACEOF
18516 /* confdefs.h.  */
18517 _ACEOF
18518 cat confdefs.h >>conftest.$ac_ext
18519 cat >>conftest.$ac_ext <<_ACEOF
18520 /* end confdefs.h.  */
18521
18522 /* Override any GCC internal prototype to avoid an error.
18523    Use char because int might match the return type of a GCC
18524    builtin and then its argument prototype would still apply.  */
18525 #ifdef __cplusplus
18526 extern "C"
18527 #endif
18528 char uview_direction_d ();
18529 int
18530 main ()
18531 {
18532 return uview_direction_d ();
18533   ;
18534   return 0;
18535 }
18536 _ACEOF
18537 rm -rf conftest.$ac_objext conftest$ac_exeext
18538 if { (ac_try="$ac_link"
18539 case "(($ac_try" in
18540   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18541   *) ac_try_echo=$ac_try;;
18542 esac
18543 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18544 $as_echo "$ac_try_echo") >&5
18545   (eval "$ac_link") 2>conftest.er1
18546   ac_status=$?
18547   grep -v '^ *+' conftest.er1 >conftest.err
18548   rm -rf conftest.er1
18549   cat conftest.err >&5
18550   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18551   (exit $ac_status); } && {
18552          test -z "$ac_c_werror_flag" ||
18553          test ! -s conftest.err
18554        } && test -s conftest$ac_exeext && {
18555          test "$cross_compiling" = yes ||
18556          $as_test_x conftest$ac_exeext
18557        }; then
18558   ac_cv_lib_matrix_uview_direction_d=yes
18559 else
18560   $as_echo "$as_me: failed program was:" >&5
18561 sed 's/^/| /' conftest.$ac_ext >&5
18562
18563         ac_cv_lib_matrix_uview_direction_d=no
18564 fi
18565
18566 rm -rf conftest.dSYM
18567 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18568       conftest$ac_exeext conftest.$ac_ext
18569 LIBS=$ac_check_lib_save_LIBS
18570 fi
18571 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
18572 $as_echo "$ac_cv_lib_matrix_uview_direction_d" >&6; }
18573 if test "x$ac_cv_lib_matrix_uview_direction_d" = x""yes; then
18574   have_gle=yes; gle_halfassed=no;
18575                       GLE_LIBS="$GLE_LIBS -lmatrix"
18576 fi
18577
18578   CPPFLAGS="$ac_save_CPPFLAGS"
18579   LDFLAGS="$ac_save_LDFLAGS"
18580 #  LIBS="$ac_save_LIBS"
18581
18582     fi
18583   fi
18584
18585   if test "$have_gle" = yes ; then
18586     cat >>confdefs.h <<\_ACEOF
18587 #define HAVE_GLE 1
18588 _ACEOF
18589
18590     if test "$have_gle3" = yes ; then
18591       cat >>confdefs.h <<\_ACEOF
18592 #define HAVE_GLE3 1
18593 _ACEOF
18594
18595     fi
18596   fi
18597
18598 elif test "$with_gle" != no; then
18599   echo "error: must be yes or no: --with-gle=$with_gle"
18600   exit 1
18601
18602 fi
18603
18604
18605 ###############################################################################
18606 #
18607 #       Handle --with-gles
18608 #
18609 ###############################################################################
18610
18611 with_gles_req=unspecified
18612
18613 # Check whether --with-gles was given.
18614 if test "${with_gles+set}" = set; then
18615   withval=$with_gles; with_gles="$withval"; with_gles_req="$withval"
18616 else
18617   with_gles=no
18618 fi
18619
18620
18621
18622    case "$with_gles" in
18623     yes) ;;
18624     no)  ;;
18625
18626     /*)
18627      { $as_echo "$as_me:$LINENO: checking for JWZGLES headers" >&5
18628 $as_echo_n "checking for JWZGLES headers... " >&6; }
18629      d=$with_gles/include
18630      if test -d $d; then
18631        X_CFLAGS="-I$d $X_CFLAGS"
18632        { $as_echo "$as_me:$LINENO: result: $d" >&5
18633 $as_echo "$d" >&6; }
18634      else
18635        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18636 $as_echo "not found ($d: no such directory)" >&6; }
18637      fi
18638
18639      { $as_echo "$as_me:$LINENO: checking for JWZGLES libs" >&5
18640 $as_echo_n "checking for JWZGLES libs... " >&6; }
18641      d=$with_gles/lib
18642      if test -d $d; then
18643        X_LIBS="-L$d $X_LIBS"
18644        { $as_echo "$as_me:$LINENO: result: $d" >&5
18645 $as_echo "$d" >&6; }
18646      else
18647        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18648 $as_echo "not found ($d: no such directory)" >&6; }
18649      fi
18650
18651      # replace the directory string with "yes".
18652      with_gles_req="yes"
18653      with_gles=$with_gles_req
18654      ;;
18655
18656     *)
18657      echo ""
18658      echo "error: argument to --with-gles must be \"yes\", \"no\", or a directory."
18659      echo "       If it is a directory, then \`DIR/include' will be added to"
18660      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18661      exit 1
18662      ;;
18663    esac
18664
18665
18666 if test "$with_gles" = yes; then
18667   have_gles=yes
18668   cat >>confdefs.h <<\_ACEOF
18669 #define HAVE_JWZGLES 1
18670 _ACEOF
18671
18672   JWZGLES_OBJS="jwzgles.o"
18673   { $as_echo "$as_me:$LINENO: result: using OpenGL ES compatiblity shim" >&5
18674 $as_echo "using OpenGL ES compatiblity shim" >&6; }
18675 elif test "$with_gles" != no; then
18676   echo "error: must be yes or no: --with-gles=$with_xpm"
18677   exit 1
18678 fi
18679
18680 # May want to phase out glBitmap even in a non-GLES world.
18681 #
18682 if test "$have_gles" = yes; then
18683   GLFPS_OBJS="fps-gl.o glxfonts.o texfont.o"
18684   GLFONT_OBJS=""
18685 else
18686   cat >>confdefs.h <<\_ACEOF
18687 #define HAVE_GLBITMAP 1
18688 _ACEOF
18689
18690   GLFPS_OBJS="fps-gl.o glxfonts.o"
18691   GLFONT_OBJS="texfont.o"
18692 fi
18693
18694
18695 ###############################################################################
18696 #
18697 #       Check for -lgdk_pixbuf.
18698 #       These tests are for gdk_pixbuf usage of the hacks,
18699 #       not xscreensaver-demo (thus we have to test again to get
18700 #       the libraries right: don't want to pull in all of GTK
18701 #       for the hacks.)
18702 #
18703 ###############################################################################
18704
18705 have_gdk_pixbuf=no
18706 with_gdk_pixbuf_req=unspecified
18707
18708 # Check whether --with-pixbuf was given.
18709 if test "${with_pixbuf+set}" = set; then
18710   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
18711 else
18712   with_gdk_pixbuf=yes
18713 fi
18714
18715
18716 # if --with-pixbuf=/directory/ was specified, remember that directory so that
18717 # we can also look for the `gdk-pixbuf-config' program in that directory.
18718 case "$with_gdk_pixbuf" in
18719   /*)
18720     gdk_pixbuf_dir="$with_gdk_pixbuf"
18721     ;;
18722   *)
18723     gdk_pixbuf_dir=""
18724     ;;
18725 esac
18726
18727
18728    case "$with_gdk_pixbuf" in
18729     yes) ;;
18730     no)  ;;
18731
18732     /*)
18733      { $as_echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
18734 $as_echo_n "checking for GDK_PIXBUF headers... " >&6; }
18735      d=$with_gdk_pixbuf/include
18736      if test -d $d; then
18737        X_CFLAGS="-I$d $X_CFLAGS"
18738        { $as_echo "$as_me:$LINENO: result: $d" >&5
18739 $as_echo "$d" >&6; }
18740      else
18741        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18742 $as_echo "not found ($d: no such directory)" >&6; }
18743      fi
18744
18745      { $as_echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
18746 $as_echo_n "checking for GDK_PIXBUF libs... " >&6; }
18747      d=$with_gdk_pixbuf/lib
18748      if test -d $d; then
18749        X_LIBS="-L$d $X_LIBS"
18750        { $as_echo "$as_me:$LINENO: result: $d" >&5
18751 $as_echo "$d" >&6; }
18752      else
18753        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18754 $as_echo "not found ($d: no such directory)" >&6; }
18755      fi
18756
18757      # replace the directory string with "yes".
18758      with_gdk_pixbuf_req="yes"
18759      with_gdk_pixbuf=$with_gdk_pixbuf_req
18760      ;;
18761
18762     *)
18763      echo ""
18764      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
18765      echo "       If it is a directory, then \`DIR/include' will be added to"
18766      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18767      exit 1
18768      ;;
18769    esac
18770
18771
18772 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
18773   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
18774   exit 1
18775 fi
18776
18777 if test "$with_gdk_pixbuf" = yes; then
18778   have_gdk_pixbuf=no
18779
18780   pkgs=''
18781   ok="yes"
18782
18783   pkg_check_version gdk-pixbuf-2.0      2.0.0
18784   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
18785   have_gdk_pixbuf="$ok"
18786
18787   if test "$have_gdk_pixbuf" = yes; then
18788     { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
18789 $as_echo_n "checking for gdk-pixbuf includes... " >&6; }
18790 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
18791   $as_echo_n "(cached) " >&6
18792 else
18793   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
18794 fi
18795 { $as_echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
18796 $as_echo "$ac_cv_gdk_pixbuf_config_cflags" >&6; }
18797     { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
18798 $as_echo_n "checking for gdk-pixbuf libs... " >&6; }
18799 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
18800   $as_echo_n "(cached) " >&6
18801 else
18802   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
18803 fi
18804 { $as_echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
18805 $as_echo "$ac_cv_gdk_pixbuf_config_libs" >&6; }
18806   fi
18807
18808   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
18809   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
18810
18811
18812   if test "$have_gdk_pixbuf" = yes; then
18813     #
18814     # we appear to have pixbuf; check for headers/libs to be sure.
18815     #
18816     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
18817     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
18818
18819     have_gdk_pixbuf=no
18820
18821     # check for header A...
18822
18823   ac_save_CPPFLAGS="$CPPFLAGS"
18824   if test \! -z "$includedir" ; then
18825     CPPFLAGS="$CPPFLAGS -I$includedir"
18826   fi
18827   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18828   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18829   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18830   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
18831 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf.h... " >&6; }
18832 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18833   $as_echo_n "(cached) " >&6
18834 fi
18835 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
18836 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
18837 else
18838   # Is the header compilable?
18839 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
18840 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf.h usability... " >&6; }
18841 cat >conftest.$ac_ext <<_ACEOF
18842 /* confdefs.h.  */
18843 _ACEOF
18844 cat confdefs.h >>conftest.$ac_ext
18845 cat >>conftest.$ac_ext <<_ACEOF
18846 /* end confdefs.h.  */
18847 $ac_includes_default
18848 #include <gdk-pixbuf/gdk-pixbuf.h>
18849 _ACEOF
18850 rm -rf conftest.$ac_objext
18851 if { (ac_try="$ac_compile"
18852 case "(($ac_try" in
18853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18854   *) ac_try_echo=$ac_try;;
18855 esac
18856 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18857 $as_echo "$ac_try_echo") >&5
18858   (eval "$ac_compile") 2>conftest.er1
18859   ac_status=$?
18860   grep -v '^ *+' conftest.er1 >conftest.err
18861   rm -rf conftest.er1
18862   cat conftest.err >&5
18863   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18864   (exit $ac_status); } && {
18865          test -z "$ac_c_werror_flag" ||
18866          test ! -s conftest.err
18867        } && test -s conftest.$ac_objext; then
18868   ac_header_compiler=yes
18869 else
18870   $as_echo "$as_me: failed program was:" >&5
18871 sed 's/^/| /' conftest.$ac_ext >&5
18872
18873         ac_header_compiler=no
18874 fi
18875
18876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18877 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18878 $as_echo "$ac_header_compiler" >&6; }
18879
18880 # Is the header present?
18881 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
18882 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf.h presence... " >&6; }
18883 cat >conftest.$ac_ext <<_ACEOF
18884 /* confdefs.h.  */
18885 _ACEOF
18886 cat confdefs.h >>conftest.$ac_ext
18887 cat >>conftest.$ac_ext <<_ACEOF
18888 /* end confdefs.h.  */
18889 #include <gdk-pixbuf/gdk-pixbuf.h>
18890 _ACEOF
18891 if { (ac_try="$ac_cpp conftest.$ac_ext"
18892 case "(($ac_try" in
18893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18894   *) ac_try_echo=$ac_try;;
18895 esac
18896 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18897 $as_echo "$ac_try_echo") >&5
18898   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18899   ac_status=$?
18900   grep -v '^ *+' conftest.er1 >conftest.err
18901   rm -rf conftest.er1
18902   cat conftest.err >&5
18903   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18904   (exit $ac_status); } >/dev/null && {
18905          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18906          test ! -s conftest.err
18907        }; then
18908   ac_header_preproc=yes
18909 else
18910   $as_echo "$as_me: failed program was:" >&5
18911 sed 's/^/| /' conftest.$ac_ext >&5
18912
18913   ac_header_preproc=no
18914 fi
18915
18916 rm -rf conftest.err conftest.$ac_ext
18917 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18918 $as_echo "$ac_header_preproc" >&6; }
18919
18920 # So?  What about this header?
18921 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18922   yes:no: )
18923     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
18924 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18925     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
18926 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
18927     ac_header_preproc=yes
18928     ;;
18929   no:yes:* )
18930     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
18931 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
18932     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
18933 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
18934     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
18935 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
18936     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
18937 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18938     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
18939 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
18940     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
18941 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
18942
18943     ;;
18944 esac
18945 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
18946 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf.h... " >&6; }
18947 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18948   $as_echo_n "(cached) " >&6
18949 else
18950   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
18951 fi
18952 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
18953 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
18954
18955 fi
18956 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" = x""yes; then
18957   have_gdk_pixbuf=yes
18958 fi
18959
18960
18961   CPPFLAGS="$ac_save_CPPFLAGS"
18962
18963     # if that worked, check for header B...
18964     if test "$have_gdk_pixbuf" = yes; then
18965       have_gdk_pixbuf=no
18966       gdk_pixbuf_halfassed=yes
18967
18968   ac_save_CPPFLAGS="$CPPFLAGS"
18969   if test \! -z "$includedir" ; then
18970     CPPFLAGS="$CPPFLAGS -I$includedir"
18971   fi
18972   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18973   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18974   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18975   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
18976 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... " >&6; }
18977 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18978   $as_echo_n "(cached) " >&6
18979 fi
18980 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
18981 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
18982 else
18983   # Is the header compilable?
18984 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
18985 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... " >&6; }
18986 cat >conftest.$ac_ext <<_ACEOF
18987 /* confdefs.h.  */
18988 _ACEOF
18989 cat confdefs.h >>conftest.$ac_ext
18990 cat >>conftest.$ac_ext <<_ACEOF
18991 /* end confdefs.h.  */
18992 $ac_includes_default
18993 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
18994 _ACEOF
18995 rm -rf conftest.$ac_objext
18996 if { (ac_try="$ac_compile"
18997 case "(($ac_try" in
18998   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18999   *) ac_try_echo=$ac_try;;
19000 esac
19001 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19002 $as_echo "$ac_try_echo") >&5
19003   (eval "$ac_compile") 2>conftest.er1
19004   ac_status=$?
19005   grep -v '^ *+' conftest.er1 >conftest.err
19006   rm -rf conftest.er1
19007   cat conftest.err >&5
19008   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19009   (exit $ac_status); } && {
19010          test -z "$ac_c_werror_flag" ||
19011          test ! -s conftest.err
19012        } && test -s conftest.$ac_objext; then
19013   ac_header_compiler=yes
19014 else
19015   $as_echo "$as_me: failed program was:" >&5
19016 sed 's/^/| /' conftest.$ac_ext >&5
19017
19018         ac_header_compiler=no
19019 fi
19020
19021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19022 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19023 $as_echo "$ac_header_compiler" >&6; }
19024
19025 # Is the header present?
19026 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
19027 $as_echo_n "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... " >&6; }
19028 cat >conftest.$ac_ext <<_ACEOF
19029 /* confdefs.h.  */
19030 _ACEOF
19031 cat confdefs.h >>conftest.$ac_ext
19032 cat >>conftest.$ac_ext <<_ACEOF
19033 /* end confdefs.h.  */
19034 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
19035 _ACEOF
19036 if { (ac_try="$ac_cpp conftest.$ac_ext"
19037 case "(($ac_try" in
19038   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19039   *) ac_try_echo=$ac_try;;
19040 esac
19041 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19042 $as_echo "$ac_try_echo") >&5
19043   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19044   ac_status=$?
19045   grep -v '^ *+' conftest.er1 >conftest.err
19046   rm -rf conftest.er1
19047   cat conftest.err >&5
19048   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19049   (exit $ac_status); } >/dev/null && {
19050          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19051          test ! -s conftest.err
19052        }; then
19053   ac_header_preproc=yes
19054 else
19055   $as_echo "$as_me: failed program was:" >&5
19056 sed 's/^/| /' conftest.$ac_ext >&5
19057
19058   ac_header_preproc=no
19059 fi
19060
19061 rm -rf conftest.err conftest.$ac_ext
19062 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19063 $as_echo "$ac_header_preproc" >&6; }
19064
19065 # So?  What about this header?
19066 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19067   yes:no: )
19068     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
19069 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19070     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
19071 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
19072     ac_header_preproc=yes
19073     ;;
19074   no:yes:* )
19075     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
19076 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
19077     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
19078 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
19079     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
19080 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
19081     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
19082 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19083     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
19084 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
19085     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
19086 $as_echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
19087
19088     ;;
19089 esac
19090 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
19091 $as_echo_n "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... " >&6; }
19092 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
19093   $as_echo_n "(cached) " >&6
19094 else
19095   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
19096 fi
19097 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
19098 $as_echo "$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
19099
19100 fi
19101 if test "x$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" = x""yes; then
19102   have_gdk_pixbuf=yes
19103                          gdk_pixbuf_halfassed=no
19104 fi
19105
19106
19107   CPPFLAGS="$ac_save_CPPFLAGS"
19108
19109       # yay, it has a new name in Gtk 2.x...
19110       if test "$have_gdk_pixbuf" = no; then
19111         have_gdk_pixbuf=no
19112         gdk_pixbuf_halfassed=yes
19113
19114   ac_save_CPPFLAGS="$CPPFLAGS"
19115   if test \! -z "$includedir" ; then
19116     CPPFLAGS="$CPPFLAGS -I$includedir"
19117   fi
19118   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19119   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19120   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
19121   { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
19122 $as_echo_n "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... " >&6; }
19123 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
19124   $as_echo_n "(cached) " >&6
19125 fi
19126 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
19127 $as_echo "$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
19128 else
19129   # Is the header compilable?
19130 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
19131 $as_echo_n "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... " >&6; }
19132 cat >conftest.$ac_ext <<_ACEOF
19133 /* confdefs.h.  */
19134 _ACEOF
19135 cat confdefs.h >>conftest.$ac_ext
19136 cat >>conftest.$ac_ext <<_ACEOF
19137 /* end confdefs.h.  */
19138 $ac_includes_default
19139 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
19140 _ACEOF
19141 rm -rf conftest.$ac_objext
19142 if { (ac_try="$ac_compile"
19143 case "(($ac_try" in
19144   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19145   *) ac_try_echo=$ac_try;;
19146 esac
19147 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19148 $as_echo "$ac_try_echo") >&5
19149   (eval "$ac_compile") 2>conftest.er1
19150   ac_status=$?
19151   grep -v '^ *+' conftest.er1 >conftest.err
19152   rm -rf conftest.er1
19153   cat conftest.err >&5
19154   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19155   (exit $ac_status); } && {
19156          test -z "$ac_c_werror_flag" ||
19157          test ! -s conftest.err
19158        } && test -s conftest.$ac_objext; then
19159   ac_header_compiler=yes
19160 else
19161   $as_echo "$as_me: failed program was:" >&5
19162 sed 's/^/| /' conftest.$ac_ext >&5
19163
19164         ac_header_compiler=no
19165 fi
19166
19167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19168 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19169 $as_echo "$ac_header_compiler" >&6; }
19170
19171 # Is the header present?
19172 { $as_echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
19173 $as_echo_n "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... " >&6; }
19174 cat >conftest.$ac_ext <<_ACEOF
19175 /* confdefs.h.  */
19176 _ACEOF
19177 cat confdefs.h >>conftest.$ac_ext
19178 cat >>conftest.$ac_ext <<_ACEOF
19179 /* end confdefs.h.  */
19180 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
19181 _ACEOF
19182 if { (ac_try="$ac_cpp conftest.$ac_ext"
19183 case "(($ac_try" in
19184   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19185   *) ac_try_echo=$ac_try;;
19186 esac
19187 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19188 $as_echo "$ac_try_echo") >&5
19189   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19190   ac_status=$?
19191   grep -v '^ *+' conftest.er1 >conftest.err
19192   rm -rf conftest.er1
19193   cat conftest.err >&5
19194   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19195   (exit $ac_status); } >/dev/null && {
19196          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19197          test ! -s conftest.err
19198        }; then
19199   ac_header_preproc=yes
19200 else
19201   $as_echo "$as_me: failed program was:" >&5
19202 sed 's/^/| /' conftest.$ac_ext >&5
19203
19204   ac_header_preproc=no
19205 fi
19206
19207 rm -rf conftest.err conftest.$ac_ext
19208 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19209 $as_echo "$ac_header_preproc" >&6; }
19210
19211 # So?  What about this header?
19212 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19213   yes:no: )
19214     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
19215 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19216     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
19217 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
19218     ac_header_preproc=yes
19219     ;;
19220   no:yes:* )
19221     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
19222 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
19223     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
19224 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
19225     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
19226 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
19227     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
19228 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19229     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
19230 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
19231     { $as_echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
19232 $as_echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
19233
19234     ;;
19235 esac
19236 { $as_echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
19237 $as_echo_n "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... " >&6; }
19238 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
19239   $as_echo_n "(cached) " >&6
19240 else
19241   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
19242 fi
19243 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
19244 $as_echo "$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
19245
19246 fi
19247 if test "x$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" = x""yes; then
19248   have_gdk_pixbuf=yes
19249                            gdk_pixbuf_halfassed=no
19250 fi
19251
19252
19253   CPPFLAGS="$ac_save_CPPFLAGS"
19254       fi
19255     fi
19256     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
19257   fi
19258
19259   if test "$have_gdk_pixbuf" = yes; then
19260     # we have the headers, now check for the libraries
19261     have_gdk_pixbuf=no
19262     gdk_pixbuf_halfassed=yes
19263
19264     { $as_echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
19265 $as_echo "checking for gdk_pixbuf usability..." >&6; }
19266
19267     # library A...
19268
19269   ac_save_CPPFLAGS="$CPPFLAGS"
19270   ac_save_LDFLAGS="$LDFLAGS"
19271 #  ac_save_LIBS="$LIBS"
19272
19273   if test \! -z "$includedir" ; then
19274     CPPFLAGS="$CPPFLAGS -I$includedir"
19275   fi
19276   # note: $X_CFLAGS includes $x_includes
19277   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19278
19279   if test \! -z "$libdir" ; then
19280     LDFLAGS="$LDFLAGS -L$libdir"
19281   fi
19282   # note: $X_LIBS includes $x_libraries
19283   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19284
19285   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19286   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19287   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
19288 $as_echo_n "checking for gdk_pixbuf_new_from_file in -lc... " >&6; }
19289 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
19290   $as_echo_n "(cached) " >&6
19291 else
19292   ac_check_lib_save_LIBS=$LIBS
19293 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
19294 cat >conftest.$ac_ext <<_ACEOF
19295 /* confdefs.h.  */
19296 _ACEOF
19297 cat confdefs.h >>conftest.$ac_ext
19298 cat >>conftest.$ac_ext <<_ACEOF
19299 /* end confdefs.h.  */
19300
19301 /* Override any GCC internal prototype to avoid an error.
19302    Use char because int might match the return type of a GCC
19303    builtin and then its argument prototype would still apply.  */
19304 #ifdef __cplusplus
19305 extern "C"
19306 #endif
19307 char gdk_pixbuf_new_from_file ();
19308 int
19309 main ()
19310 {
19311 return gdk_pixbuf_new_from_file ();
19312   ;
19313   return 0;
19314 }
19315 _ACEOF
19316 rm -rf conftest.$ac_objext conftest$ac_exeext
19317 if { (ac_try="$ac_link"
19318 case "(($ac_try" in
19319   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19320   *) ac_try_echo=$ac_try;;
19321 esac
19322 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19323 $as_echo "$ac_try_echo") >&5
19324   (eval "$ac_link") 2>conftest.er1
19325   ac_status=$?
19326   grep -v '^ *+' conftest.er1 >conftest.err
19327   rm -rf conftest.er1
19328   cat conftest.err >&5
19329   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19330   (exit $ac_status); } && {
19331          test -z "$ac_c_werror_flag" ||
19332          test ! -s conftest.err
19333        } && test -s conftest$ac_exeext && {
19334          test "$cross_compiling" = yes ||
19335          $as_test_x conftest$ac_exeext
19336        }; then
19337   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
19338 else
19339   $as_echo "$as_me: failed program was:" >&5
19340 sed 's/^/| /' conftest.$ac_ext >&5
19341
19342         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
19343 fi
19344
19345 rm -rf conftest.dSYM
19346 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19347       conftest$ac_exeext conftest.$ac_ext
19348 LIBS=$ac_check_lib_save_LIBS
19349 fi
19350 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
19351 $as_echo "$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
19352 if test "x$ac_cv_lib_c_gdk_pixbuf_new_from_file" = x""yes; then
19353   have_gdk_pixbuf=yes
19354 fi
19355
19356   CPPFLAGS="$ac_save_CPPFLAGS"
19357   LDFLAGS="$ac_save_LDFLAGS"
19358 #  LIBS="$ac_save_LIBS"
19359
19360     # library B...
19361     if test "$have_gdk_pixbuf" = yes; then
19362       have_gdk_pixbuf=no
19363
19364   ac_save_CPPFLAGS="$CPPFLAGS"
19365   ac_save_LDFLAGS="$LDFLAGS"
19366 #  ac_save_LIBS="$LIBS"
19367
19368   if test \! -z "$includedir" ; then
19369     CPPFLAGS="$CPPFLAGS -I$includedir"
19370   fi
19371   # note: $X_CFLAGS includes $x_includes
19372   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19373
19374   if test \! -z "$libdir" ; then
19375     LDFLAGS="$LDFLAGS -L$libdir"
19376   fi
19377   # note: $X_LIBS includes $x_libraries
19378   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19379
19380   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19381   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19382   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
19383 $as_echo_n "checking for gdk_pixbuf_xlib_init in -lc... " >&6; }
19384 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
19385   $as_echo_n "(cached) " >&6
19386 else
19387   ac_check_lib_save_LIBS=$LIBS
19388 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
19389 cat >conftest.$ac_ext <<_ACEOF
19390 /* confdefs.h.  */
19391 _ACEOF
19392 cat confdefs.h >>conftest.$ac_ext
19393 cat >>conftest.$ac_ext <<_ACEOF
19394 /* end confdefs.h.  */
19395
19396 /* Override any GCC internal prototype to avoid an error.
19397    Use char because int might match the return type of a GCC
19398    builtin and then its argument prototype would still apply.  */
19399 #ifdef __cplusplus
19400 extern "C"
19401 #endif
19402 char gdk_pixbuf_xlib_init ();
19403 int
19404 main ()
19405 {
19406 return gdk_pixbuf_xlib_init ();
19407   ;
19408   return 0;
19409 }
19410 _ACEOF
19411 rm -rf conftest.$ac_objext conftest$ac_exeext
19412 if { (ac_try="$ac_link"
19413 case "(($ac_try" in
19414   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19415   *) ac_try_echo=$ac_try;;
19416 esac
19417 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19418 $as_echo "$ac_try_echo") >&5
19419   (eval "$ac_link") 2>conftest.er1
19420   ac_status=$?
19421   grep -v '^ *+' conftest.er1 >conftest.err
19422   rm -rf conftest.er1
19423   cat conftest.err >&5
19424   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19425   (exit $ac_status); } && {
19426          test -z "$ac_c_werror_flag" ||
19427          test ! -s conftest.err
19428        } && test -s conftest$ac_exeext && {
19429          test "$cross_compiling" = yes ||
19430          $as_test_x conftest$ac_exeext
19431        }; then
19432   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
19433 else
19434   $as_echo "$as_me: failed program was:" >&5
19435 sed 's/^/| /' conftest.$ac_ext >&5
19436
19437         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
19438 fi
19439
19440 rm -rf conftest.dSYM
19441 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19442       conftest$ac_exeext conftest.$ac_ext
19443 LIBS=$ac_check_lib_save_LIBS
19444 fi
19445 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
19446 $as_echo "$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
19447 if test "x$ac_cv_lib_c_gdk_pixbuf_xlib_init" = x""yes; then
19448   have_gdk_pixbuf=yes
19449                       gdk_pixbuf_halfassed=no
19450 fi
19451
19452   CPPFLAGS="$ac_save_CPPFLAGS"
19453   LDFLAGS="$ac_save_LDFLAGS"
19454 #  LIBS="$ac_save_LIBS"
19455
19456     fi
19457   fi
19458
19459   if test "$have_gdk_pixbuf" = yes; then
19460     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
19461     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
19462     cat >>confdefs.h <<\_ACEOF
19463 #define HAVE_GDK_PIXBUF 1
19464 _ACEOF
19465
19466   else
19467     { $as_echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
19468 $as_echo "checking for gdk_pixbuf usability... no" >&6; }
19469   fi
19470
19471   if test "$have_gdk_pixbuf" = yes; then
19472
19473   ac_save_CPPFLAGS="$CPPFLAGS"
19474   ac_save_LDFLAGS="$LDFLAGS"
19475 #  ac_save_LIBS="$LIBS"
19476
19477   if test \! -z "$includedir" ; then
19478     CPPFLAGS="$CPPFLAGS -I$includedir"
19479   fi
19480   # note: $X_CFLAGS includes $x_includes
19481   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19482
19483   if test \! -z "$libdir" ; then
19484     LDFLAGS="$LDFLAGS -L$libdir"
19485   fi
19486   # note: $X_LIBS includes $x_libraries
19487   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19488
19489   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19490   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19491   { $as_echo "$as_me:$LINENO: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
19492 $as_echo_n "checking for gdk_pixbuf_apply_embedded_orientation in -lc... " >&6; }
19493 if test "${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+set}" = set; then
19494   $as_echo_n "(cached) " >&6
19495 else
19496   ac_check_lib_save_LIBS=$LIBS
19497 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
19498 cat >conftest.$ac_ext <<_ACEOF
19499 /* confdefs.h.  */
19500 _ACEOF
19501 cat confdefs.h >>conftest.$ac_ext
19502 cat >>conftest.$ac_ext <<_ACEOF
19503 /* end confdefs.h.  */
19504
19505 /* Override any GCC internal prototype to avoid an error.
19506    Use char because int might match the return type of a GCC
19507    builtin and then its argument prototype would still apply.  */
19508 #ifdef __cplusplus
19509 extern "C"
19510 #endif
19511 char gdk_pixbuf_apply_embedded_orientation ();
19512 int
19513 main ()
19514 {
19515 return gdk_pixbuf_apply_embedded_orientation ();
19516   ;
19517   return 0;
19518 }
19519 _ACEOF
19520 rm -rf conftest.$ac_objext conftest$ac_exeext
19521 if { (ac_try="$ac_link"
19522 case "(($ac_try" in
19523   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19524   *) ac_try_echo=$ac_try;;
19525 esac
19526 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19527 $as_echo "$ac_try_echo") >&5
19528   (eval "$ac_link") 2>conftest.er1
19529   ac_status=$?
19530   grep -v '^ *+' conftest.er1 >conftest.err
19531   rm -rf conftest.er1
19532   cat conftest.err >&5
19533   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19534   (exit $ac_status); } && {
19535          test -z "$ac_c_werror_flag" ||
19536          test ! -s conftest.err
19537        } && test -s conftest$ac_exeext && {
19538          test "$cross_compiling" = yes ||
19539          $as_test_x conftest$ac_exeext
19540        }; then
19541   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
19542 else
19543   $as_echo "$as_me: failed program was:" >&5
19544 sed 's/^/| /' conftest.$ac_ext >&5
19545
19546         ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
19547 fi
19548
19549 rm -rf conftest.dSYM
19550 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19551       conftest$ac_exeext conftest.$ac_ext
19552 LIBS=$ac_check_lib_save_LIBS
19553 fi
19554 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
19555 $as_echo "$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
19556 if test "x$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" = x""yes; then
19557   cat >>confdefs.h <<\_ACEOF
19558 #define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1
19559 _ACEOF
19560
19561 fi
19562
19563   CPPFLAGS="$ac_save_CPPFLAGS"
19564   LDFLAGS="$ac_save_LDFLAGS"
19565 #  LIBS="$ac_save_LIBS"
19566
19567   fi
19568 fi
19569
19570
19571 ###############################################################################
19572 #
19573 #       Check for -lXpm.
19574 #
19575 ###############################################################################
19576
19577 have_xpm=no
19578 with_xpm_req=unspecified
19579
19580 # Check whether --with-xpm was given.
19581 if test "${with_xpm+set}" = set; then
19582   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
19583 else
19584   with_xpm=yes
19585 fi
19586
19587
19588
19589    case "$with_xpm" in
19590     yes) ;;
19591     no)  ;;
19592
19593     /*)
19594      { $as_echo "$as_me:$LINENO: checking for XPM headers" >&5
19595 $as_echo_n "checking for XPM headers... " >&6; }
19596      d=$with_xpm/include
19597      if test -d $d; then
19598        X_CFLAGS="-I$d $X_CFLAGS"
19599        { $as_echo "$as_me:$LINENO: result: $d" >&5
19600 $as_echo "$d" >&6; }
19601      else
19602        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19603 $as_echo "not found ($d: no such directory)" >&6; }
19604      fi
19605
19606      { $as_echo "$as_me:$LINENO: checking for XPM libs" >&5
19607 $as_echo_n "checking for XPM libs... " >&6; }
19608      d=$with_xpm/lib
19609      if test -d $d; then
19610        X_LIBS="-L$d $X_LIBS"
19611        { $as_echo "$as_me:$LINENO: result: $d" >&5
19612 $as_echo "$d" >&6; }
19613      else
19614        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19615 $as_echo "not found ($d: no such directory)" >&6; }
19616      fi
19617
19618      # replace the directory string with "yes".
19619      with_xpm_req="yes"
19620      with_xpm=$with_xpm_req
19621      ;;
19622
19623     *)
19624      echo ""
19625      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
19626      echo "       If it is a directory, then \`DIR/include' will be added to"
19627      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19628      exit 1
19629      ;;
19630    esac
19631
19632
19633 if test "$with_xpm" = yes; then
19634
19635   ac_save_CPPFLAGS="$CPPFLAGS"
19636   if test \! -z "$includedir" ; then
19637     CPPFLAGS="$CPPFLAGS -I$includedir"
19638   fi
19639   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19640   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19641   { $as_echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
19642 $as_echo_n "checking for X11/xpm.h... " >&6; }
19643 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
19644   $as_echo_n "(cached) " >&6
19645 else
19646   cat >conftest.$ac_ext <<_ACEOF
19647 /* confdefs.h.  */
19648 _ACEOF
19649 cat confdefs.h >>conftest.$ac_ext
19650 cat >>conftest.$ac_ext <<_ACEOF
19651 /* end confdefs.h.  */
19652 #include <X11/Xlib.h>
19653
19654 #include <X11/xpm.h>
19655 _ACEOF
19656 rm -rf conftest.$ac_objext
19657 if { (ac_try="$ac_compile"
19658 case "(($ac_try" in
19659   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19660   *) ac_try_echo=$ac_try;;
19661 esac
19662 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19663 $as_echo "$ac_try_echo") >&5
19664   (eval "$ac_compile") 2>conftest.er1
19665   ac_status=$?
19666   grep -v '^ *+' conftest.er1 >conftest.err
19667   rm -rf conftest.er1
19668   cat conftest.err >&5
19669   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19670   (exit $ac_status); } && {
19671          test -z "$ac_c_werror_flag" ||
19672          test ! -s conftest.err
19673        } && test -s conftest.$ac_objext; then
19674   ac_cv_header_X11_xpm_h=yes
19675 else
19676   $as_echo "$as_me: failed program was:" >&5
19677 sed 's/^/| /' conftest.$ac_ext >&5
19678
19679         ac_cv_header_X11_xpm_h=no
19680 fi
19681
19682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19683 fi
19684 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
19685 $as_echo "$ac_cv_header_X11_xpm_h" >&6; }
19686 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then
19687   have_xpm=yes
19688                     cat >>confdefs.h <<\_ACEOF
19689 #define HAVE_XPM 1
19690 _ACEOF
19691
19692                     XPM_LIBS="-lXpm $XPM_LIBS"
19693 fi
19694
19695
19696   CPPFLAGS="$ac_save_CPPFLAGS"
19697 elif test "$with_xpm" != no; then
19698   echo "error: must be yes or no: --with-xpm=$with_xpm"
19699   exit 1
19700 fi
19701
19702 # See comment near $motif_requires_xpm, above.
19703 # Need to do this here, after both Motif and XPM have been checked for.
19704 #
19705 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
19706   if test "$motif_requires_xpm" = yes ; then
19707     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
19708   fi
19709 fi
19710
19711 if test "$XPM_LIBS" = "" ; then
19712   XPM_LIBS=$(MINIXPM)
19713 fi
19714
19715
19716 ###############################################################################
19717 #
19718 #       Check for -ljpeg
19719 #
19720 ###############################################################################
19721
19722 have_jpeg=no
19723 with_jpeg_req=unspecified
19724 jpeg_halfassed=no
19725
19726 # Check whether --with-jpeg was given.
19727 if test "${with_jpeg+set}" = set; then
19728   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
19729 else
19730   with_jpeg=yes
19731 fi
19732
19733
19734
19735    case "$with_jpeg" in
19736     yes) ;;
19737     no)  ;;
19738
19739     /*)
19740      { $as_echo "$as_me:$LINENO: checking for JPEG headers" >&5
19741 $as_echo_n "checking for JPEG headers... " >&6; }
19742      d=$with_jpeg/include
19743      if test -d $d; then
19744        X_CFLAGS="-I$d $X_CFLAGS"
19745        { $as_echo "$as_me:$LINENO: result: $d" >&5
19746 $as_echo "$d" >&6; }
19747      else
19748        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19749 $as_echo "not found ($d: no such directory)" >&6; }
19750      fi
19751
19752      { $as_echo "$as_me:$LINENO: checking for JPEG libs" >&5
19753 $as_echo_n "checking for JPEG libs... " >&6; }
19754      d=$with_jpeg/lib
19755      if test -d $d; then
19756        X_LIBS="-L$d $X_LIBS"
19757        { $as_echo "$as_me:$LINENO: result: $d" >&5
19758 $as_echo "$d" >&6; }
19759      else
19760        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19761 $as_echo "not found ($d: no such directory)" >&6; }
19762      fi
19763
19764      # replace the directory string with "yes".
19765      with_jpeg_req="yes"
19766      with_jpeg=$with_jpeg_req
19767      ;;
19768
19769     *)
19770      echo ""
19771      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
19772      echo "       If it is a directory, then \`DIR/include' will be added to"
19773      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19774      exit 1
19775      ;;
19776    esac
19777
19778
19779 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
19780   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
19781   exit 1
19782 fi
19783
19784 if test "$with_jpeg" = yes; then
19785
19786   have_jpeg=no
19787
19788   ac_save_CPPFLAGS="$CPPFLAGS"
19789   if test \! -z "$includedir" ; then
19790     CPPFLAGS="$CPPFLAGS -I$includedir"
19791   fi
19792   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19793   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19794   if test "${ac_cv_header_jpeglib_h+set}" = set; then
19795   { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5
19796 $as_echo_n "checking for jpeglib.h... " >&6; }
19797 if test "${ac_cv_header_jpeglib_h+set}" = set; then
19798   $as_echo_n "(cached) " >&6
19799 fi
19800 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
19801 $as_echo "$ac_cv_header_jpeglib_h" >&6; }
19802 else
19803   # Is the header compilable?
19804 { $as_echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
19805 $as_echo_n "checking jpeglib.h usability... " >&6; }
19806 cat >conftest.$ac_ext <<_ACEOF
19807 /* confdefs.h.  */
19808 _ACEOF
19809 cat confdefs.h >>conftest.$ac_ext
19810 cat >>conftest.$ac_ext <<_ACEOF
19811 /* end confdefs.h.  */
19812 $ac_includes_default
19813 #include <jpeglib.h>
19814 _ACEOF
19815 rm -rf conftest.$ac_objext
19816 if { (ac_try="$ac_compile"
19817 case "(($ac_try" in
19818   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19819   *) ac_try_echo=$ac_try;;
19820 esac
19821 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19822 $as_echo "$ac_try_echo") >&5
19823   (eval "$ac_compile") 2>conftest.er1
19824   ac_status=$?
19825   grep -v '^ *+' conftest.er1 >conftest.err
19826   rm -rf conftest.er1
19827   cat conftest.err >&5
19828   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19829   (exit $ac_status); } && {
19830          test -z "$ac_c_werror_flag" ||
19831          test ! -s conftest.err
19832        } && test -s conftest.$ac_objext; then
19833   ac_header_compiler=yes
19834 else
19835   $as_echo "$as_me: failed program was:" >&5
19836 sed 's/^/| /' conftest.$ac_ext >&5
19837
19838         ac_header_compiler=no
19839 fi
19840
19841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19842 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19843 $as_echo "$ac_header_compiler" >&6; }
19844
19845 # Is the header present?
19846 { $as_echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
19847 $as_echo_n "checking jpeglib.h presence... " >&6; }
19848 cat >conftest.$ac_ext <<_ACEOF
19849 /* confdefs.h.  */
19850 _ACEOF
19851 cat confdefs.h >>conftest.$ac_ext
19852 cat >>conftest.$ac_ext <<_ACEOF
19853 /* end confdefs.h.  */
19854 #include <jpeglib.h>
19855 _ACEOF
19856 if { (ac_try="$ac_cpp conftest.$ac_ext"
19857 case "(($ac_try" in
19858   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19859   *) ac_try_echo=$ac_try;;
19860 esac
19861 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19862 $as_echo "$ac_try_echo") >&5
19863   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19864   ac_status=$?
19865   grep -v '^ *+' conftest.er1 >conftest.err
19866   rm -rf conftest.er1
19867   cat conftest.err >&5
19868   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19869   (exit $ac_status); } >/dev/null && {
19870          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19871          test ! -s conftest.err
19872        }; then
19873   ac_header_preproc=yes
19874 else
19875   $as_echo "$as_me: failed program was:" >&5
19876 sed 's/^/| /' conftest.$ac_ext >&5
19877
19878   ac_header_preproc=no
19879 fi
19880
19881 rm -rf conftest.err conftest.$ac_ext
19882 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19883 $as_echo "$ac_header_preproc" >&6; }
19884
19885 # So?  What about this header?
19886 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19887   yes:no: )
19888     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
19889 $as_echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19890     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
19891 $as_echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
19892     ac_header_preproc=yes
19893     ;;
19894   no:yes:* )
19895     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
19896 $as_echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
19897     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
19898 $as_echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
19899     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
19900 $as_echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
19901     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
19902 $as_echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19903     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
19904 $as_echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
19905     { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
19906 $as_echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
19907
19908     ;;
19909 esac
19910 { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5
19911 $as_echo_n "checking for jpeglib.h... " >&6; }
19912 if test "${ac_cv_header_jpeglib_h+set}" = set; then
19913   $as_echo_n "(cached) " >&6
19914 else
19915   ac_cv_header_jpeglib_h=$ac_header_preproc
19916 fi
19917 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
19918 $as_echo "$ac_cv_header_jpeglib_h" >&6; }
19919
19920 fi
19921 if test "x$ac_cv_header_jpeglib_h" = x""yes; then
19922   have_jpeg=yes
19923 fi
19924
19925
19926   CPPFLAGS="$ac_save_CPPFLAGS"
19927
19928   if test "$have_jpeg" = yes; then
19929     # we have the header, now check for the library
19930     have_jpeg=no
19931     jpeg_halfassed=yes
19932
19933   ac_save_CPPFLAGS="$CPPFLAGS"
19934   ac_save_LDFLAGS="$LDFLAGS"
19935 #  ac_save_LIBS="$LIBS"
19936
19937   if test \! -z "$includedir" ; then
19938     CPPFLAGS="$CPPFLAGS -I$includedir"
19939   fi
19940   # note: $X_CFLAGS includes $x_includes
19941   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19942
19943   if test \! -z "$libdir" ; then
19944     LDFLAGS="$LDFLAGS -L$libdir"
19945   fi
19946   # note: $X_LIBS includes $x_libraries
19947   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19948
19949   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19950   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19951   { $as_echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
19952 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
19953 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
19954   $as_echo_n "(cached) " >&6
19955 else
19956   ac_check_lib_save_LIBS=$LIBS
19957 LIBS="-ljpeg  $LIBS"
19958 cat >conftest.$ac_ext <<_ACEOF
19959 /* confdefs.h.  */
19960 _ACEOF
19961 cat confdefs.h >>conftest.$ac_ext
19962 cat >>conftest.$ac_ext <<_ACEOF
19963 /* end confdefs.h.  */
19964
19965 /* Override any GCC internal prototype to avoid an error.
19966    Use char because int might match the return type of a GCC
19967    builtin and then its argument prototype would still apply.  */
19968 #ifdef __cplusplus
19969 extern "C"
19970 #endif
19971 char jpeg_start_compress ();
19972 int
19973 main ()
19974 {
19975 return jpeg_start_compress ();
19976   ;
19977   return 0;
19978 }
19979 _ACEOF
19980 rm -rf conftest.$ac_objext conftest$ac_exeext
19981 if { (ac_try="$ac_link"
19982 case "(($ac_try" in
19983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19984   *) ac_try_echo=$ac_try;;
19985 esac
19986 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19987 $as_echo "$ac_try_echo") >&5
19988   (eval "$ac_link") 2>conftest.er1
19989   ac_status=$?
19990   grep -v '^ *+' conftest.er1 >conftest.err
19991   rm -rf conftest.er1
19992   cat conftest.err >&5
19993   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19994   (exit $ac_status); } && {
19995          test -z "$ac_c_werror_flag" ||
19996          test ! -s conftest.err
19997        } && test -s conftest$ac_exeext && {
19998          test "$cross_compiling" = yes ||
19999          $as_test_x conftest$ac_exeext
20000        }; then
20001   ac_cv_lib_jpeg_jpeg_start_compress=yes
20002 else
20003   $as_echo "$as_me: failed program was:" >&5
20004 sed 's/^/| /' conftest.$ac_ext >&5
20005
20006         ac_cv_lib_jpeg_jpeg_start_compress=no
20007 fi
20008
20009 rm -rf conftest.dSYM
20010 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20011       conftest$ac_exeext conftest.$ac_ext
20012 LIBS=$ac_check_lib_save_LIBS
20013 fi
20014 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
20015 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
20016 if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = x""yes; then
20017   have_jpeg=yes
20018                     jpeg_halfassed=no
20019                     JPEG_LIBS="-ljpeg"
20020                     cat >>confdefs.h <<\_ACEOF
20021 #define HAVE_JPEGLIB 1
20022 _ACEOF
20023
20024 fi
20025
20026   CPPFLAGS="$ac_save_CPPFLAGS"
20027   LDFLAGS="$ac_save_LDFLAGS"
20028 #  LIBS="$ac_save_LIBS"
20029
20030   fi
20031 fi
20032
20033
20034 ###############################################################################
20035 #
20036 #       Check for pty support: this allows 'phosphor' and 'apple2'
20037 #       to run curses-based programs, or be used as terminal windows.
20038 #
20039 ###############################################################################
20040
20041 PTY_LIBS=
20042
20043
20044 for ac_header in pty.h util.h
20045 do
20046 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20047 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20048   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
20049 $as_echo_n "checking for $ac_header... " >&6; }
20050 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20051   $as_echo_n "(cached) " >&6
20052 fi
20053 ac_res=`eval 'as_val=${'$as_ac_Header'}
20054                  $as_echo "$as_val"'`
20055                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20056 $as_echo "$ac_res" >&6; }
20057 else
20058   # Is the header compilable?
20059 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
20060 $as_echo_n "checking $ac_header usability... " >&6; }
20061 cat >conftest.$ac_ext <<_ACEOF
20062 /* confdefs.h.  */
20063 _ACEOF
20064 cat confdefs.h >>conftest.$ac_ext
20065 cat >>conftest.$ac_ext <<_ACEOF
20066 /* end confdefs.h.  */
20067 $ac_includes_default
20068 #include <$ac_header>
20069 _ACEOF
20070 rm -rf conftest.$ac_objext
20071 if { (ac_try="$ac_compile"
20072 case "(($ac_try" in
20073   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20074   *) ac_try_echo=$ac_try;;
20075 esac
20076 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20077 $as_echo "$ac_try_echo") >&5
20078   (eval "$ac_compile") 2>conftest.er1
20079   ac_status=$?
20080   grep -v '^ *+' conftest.er1 >conftest.err
20081   rm -rf conftest.er1
20082   cat conftest.err >&5
20083   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20084   (exit $ac_status); } && {
20085          test -z "$ac_c_werror_flag" ||
20086          test ! -s conftest.err
20087        } && test -s conftest.$ac_objext; then
20088   ac_header_compiler=yes
20089 else
20090   $as_echo "$as_me: failed program was:" >&5
20091 sed 's/^/| /' conftest.$ac_ext >&5
20092
20093         ac_header_compiler=no
20094 fi
20095
20096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20097 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20098 $as_echo "$ac_header_compiler" >&6; }
20099
20100 # Is the header present?
20101 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
20102 $as_echo_n "checking $ac_header presence... " >&6; }
20103 cat >conftest.$ac_ext <<_ACEOF
20104 /* confdefs.h.  */
20105 _ACEOF
20106 cat confdefs.h >>conftest.$ac_ext
20107 cat >>conftest.$ac_ext <<_ACEOF
20108 /* end confdefs.h.  */
20109 #include <$ac_header>
20110 _ACEOF
20111 if { (ac_try="$ac_cpp conftest.$ac_ext"
20112 case "(($ac_try" in
20113   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20114   *) ac_try_echo=$ac_try;;
20115 esac
20116 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20117 $as_echo "$ac_try_echo") >&5
20118   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20119   ac_status=$?
20120   grep -v '^ *+' conftest.er1 >conftest.err
20121   rm -rf conftest.er1
20122   cat conftest.err >&5
20123   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20124   (exit $ac_status); } >/dev/null && {
20125          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20126          test ! -s conftest.err
20127        }; then
20128   ac_header_preproc=yes
20129 else
20130   $as_echo "$as_me: failed program was:" >&5
20131 sed 's/^/| /' conftest.$ac_ext >&5
20132
20133   ac_header_preproc=no
20134 fi
20135
20136 rm -rf conftest.err conftest.$ac_ext
20137 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20138 $as_echo "$ac_header_preproc" >&6; }
20139
20140 # So?  What about this header?
20141 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20142   yes:no: )
20143     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20144 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20145     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20146 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20147     ac_header_preproc=yes
20148     ;;
20149   no:yes:* )
20150     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20151 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20152     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
20153 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
20154     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20155 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20156     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
20157 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
20158     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20159 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20160     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20161 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20162
20163     ;;
20164 esac
20165 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
20166 $as_echo_n "checking for $ac_header... " >&6; }
20167 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20168   $as_echo_n "(cached) " >&6
20169 else
20170   eval "$as_ac_Header=\$ac_header_preproc"
20171 fi
20172 ac_res=`eval 'as_val=${'$as_ac_Header'}
20173                  $as_echo "$as_val"'`
20174                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20175 $as_echo "$ac_res" >&6; }
20176
20177 fi
20178 as_val=`eval 'as_val=${'$as_ac_Header'}
20179                  $as_echo "$as_val"'`
20180    if test "x$as_val" = x""yes; then
20181   cat >>confdefs.h <<_ACEOF
20182 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20183 _ACEOF
20184
20185 fi
20186
20187 done
20188
20189
20190   ac_save_CPPFLAGS="$CPPFLAGS"
20191   ac_save_LDFLAGS="$LDFLAGS"
20192 #  ac_save_LIBS="$LIBS"
20193
20194   if test \! -z "$includedir" ; then
20195     CPPFLAGS="$CPPFLAGS -I$includedir"
20196   fi
20197   # note: $X_CFLAGS includes $x_includes
20198   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20199
20200   if test \! -z "$libdir" ; then
20201     LDFLAGS="$LDFLAGS -L$libdir"
20202   fi
20203   # note: $X_LIBS includes $x_libraries
20204   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20205
20206   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20207   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
20208   { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20209 $as_echo_n "checking for forkpty in -lutil... " >&6; }
20210 if test "${ac_cv_lib_util_forkpty+set}" = set; then
20211   $as_echo_n "(cached) " >&6
20212 else
20213   ac_check_lib_save_LIBS=$LIBS
20214 LIBS="-lutil  $LIBS"
20215 cat >conftest.$ac_ext <<_ACEOF
20216 /* confdefs.h.  */
20217 _ACEOF
20218 cat confdefs.h >>conftest.$ac_ext
20219 cat >>conftest.$ac_ext <<_ACEOF
20220 /* end confdefs.h.  */
20221
20222 /* Override any GCC internal prototype to avoid an error.
20223    Use char because int might match the return type of a GCC
20224    builtin and then its argument prototype would still apply.  */
20225 #ifdef __cplusplus
20226 extern "C"
20227 #endif
20228 char forkpty ();
20229 int
20230 main ()
20231 {
20232 return forkpty ();
20233   ;
20234   return 0;
20235 }
20236 _ACEOF
20237 rm -rf conftest.$ac_objext conftest$ac_exeext
20238 if { (ac_try="$ac_link"
20239 case "(($ac_try" in
20240   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20241   *) ac_try_echo=$ac_try;;
20242 esac
20243 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20244 $as_echo "$ac_try_echo") >&5
20245   (eval "$ac_link") 2>conftest.er1
20246   ac_status=$?
20247   grep -v '^ *+' conftest.er1 >conftest.err
20248   rm -rf conftest.er1
20249   cat conftest.err >&5
20250   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20251   (exit $ac_status); } && {
20252          test -z "$ac_c_werror_flag" ||
20253          test ! -s conftest.err
20254        } && test -s conftest$ac_exeext && {
20255          test "$cross_compiling" = yes ||
20256          $as_test_x conftest$ac_exeext
20257        }; then
20258   ac_cv_lib_util_forkpty=yes
20259 else
20260   $as_echo "$as_me: failed program was:" >&5
20261 sed 's/^/| /' conftest.$ac_ext >&5
20262
20263         ac_cv_lib_util_forkpty=no
20264 fi
20265
20266 rm -rf conftest.dSYM
20267 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20268       conftest$ac_exeext conftest.$ac_ext
20269 LIBS=$ac_check_lib_save_LIBS
20270 fi
20271 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20272 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
20273 if test "x$ac_cv_lib_util_forkpty" = x""yes; then
20274   PTY_LIBS="-lutil"
20275                 ac_have_forkpty=yes
20276                 cat >>confdefs.h <<\_ACEOF
20277 #define HAVE_FORKPTY 1
20278 _ACEOF
20279
20280 fi
20281
20282   CPPFLAGS="$ac_save_CPPFLAGS"
20283   LDFLAGS="$ac_save_LDFLAGS"
20284 #  LIBS="$ac_save_LIBS"
20285
20286
20287 if test "$ac_have_forkpty" != yes ; then
20288   # we don't need (or have) -lutil on MacOS 10.4.2...
20289
20290   ac_save_CPPFLAGS="$CPPFLAGS"
20291   ac_save_LDFLAGS="$LDFLAGS"
20292 #  ac_save_LIBS="$LIBS"
20293
20294   if test \! -z "$includedir" ; then
20295     CPPFLAGS="$CPPFLAGS -I$includedir"
20296   fi
20297   # note: $X_CFLAGS includes $x_includes
20298   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20299
20300   if test \! -z "$libdir" ; then
20301     LDFLAGS="$LDFLAGS -L$libdir"
20302   fi
20303   # note: $X_LIBS includes $x_libraries
20304   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20305
20306   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20307   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
20308   { $as_echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
20309 $as_echo_n "checking for forkpty in -lc... " >&6; }
20310 if test "${ac_cv_lib_c_forkpty+set}" = set; then
20311   $as_echo_n "(cached) " >&6
20312 else
20313   ac_check_lib_save_LIBS=$LIBS
20314 LIBS="-lc  $LIBS"
20315 cat >conftest.$ac_ext <<_ACEOF
20316 /* confdefs.h.  */
20317 _ACEOF
20318 cat confdefs.h >>conftest.$ac_ext
20319 cat >>conftest.$ac_ext <<_ACEOF
20320 /* end confdefs.h.  */
20321
20322 /* Override any GCC internal prototype to avoid an error.
20323    Use char because int might match the return type of a GCC
20324    builtin and then its argument prototype would still apply.  */
20325 #ifdef __cplusplus
20326 extern "C"
20327 #endif
20328 char forkpty ();
20329 int
20330 main ()
20331 {
20332 return forkpty ();
20333   ;
20334   return 0;
20335 }
20336 _ACEOF
20337 rm -rf conftest.$ac_objext conftest$ac_exeext
20338 if { (ac_try="$ac_link"
20339 case "(($ac_try" in
20340   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20341   *) ac_try_echo=$ac_try;;
20342 esac
20343 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20344 $as_echo "$ac_try_echo") >&5
20345   (eval "$ac_link") 2>conftest.er1
20346   ac_status=$?
20347   grep -v '^ *+' conftest.er1 >conftest.err
20348   rm -rf conftest.er1
20349   cat conftest.err >&5
20350   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20351   (exit $ac_status); } && {
20352          test -z "$ac_c_werror_flag" ||
20353          test ! -s conftest.err
20354        } && test -s conftest$ac_exeext && {
20355          test "$cross_compiling" = yes ||
20356          $as_test_x conftest$ac_exeext
20357        }; then
20358   ac_cv_lib_c_forkpty=yes
20359 else
20360   $as_echo "$as_me: failed program was:" >&5
20361 sed 's/^/| /' conftest.$ac_ext >&5
20362
20363         ac_cv_lib_c_forkpty=no
20364 fi
20365
20366 rm -rf conftest.dSYM
20367 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20368       conftest$ac_exeext conftest.$ac_ext
20369 LIBS=$ac_check_lib_save_LIBS
20370 fi
20371 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
20372 $as_echo "$ac_cv_lib_c_forkpty" >&6; }
20373 if test "x$ac_cv_lib_c_forkpty" = x""yes; then
20374   PTY_LIBS=""
20375                   cat >>confdefs.h <<\_ACEOF
20376 #define HAVE_FORKPTY 1
20377 _ACEOF
20378
20379 fi
20380
20381   CPPFLAGS="$ac_save_CPPFLAGS"
20382   LDFLAGS="$ac_save_LDFLAGS"
20383 #  LIBS="$ac_save_LIBS"
20384
20385 fi
20386
20387 ###############################################################################
20388 #
20389 #       Check for the XSHM server extension.
20390 #
20391 ###############################################################################
20392
20393 have_xshm=no
20394 with_xshm_req=unspecified
20395
20396 # Check whether --with-xshm-ext was given.
20397 if test "${with_xshm_ext+set}" = set; then
20398   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
20399 else
20400   with_xshm=yes
20401 fi
20402
20403
20404
20405    case "$with_xshm" in
20406     yes) ;;
20407     no)  ;;
20408
20409     /*)
20410      { $as_echo "$as_me:$LINENO: checking for XSHM headers" >&5
20411 $as_echo_n "checking for XSHM headers... " >&6; }
20412      d=$with_xshm/include
20413      if test -d $d; then
20414        X_CFLAGS="-I$d $X_CFLAGS"
20415        { $as_echo "$as_me:$LINENO: result: $d" >&5
20416 $as_echo "$d" >&6; }
20417      else
20418        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20419 $as_echo "not found ($d: no such directory)" >&6; }
20420      fi
20421
20422      { $as_echo "$as_me:$LINENO: checking for XSHM libs" >&5
20423 $as_echo_n "checking for XSHM libs... " >&6; }
20424      d=$with_xshm/lib
20425      if test -d $d; then
20426        X_LIBS="-L$d $X_LIBS"
20427        { $as_echo "$as_me:$LINENO: result: $d" >&5
20428 $as_echo "$d" >&6; }
20429      else
20430        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20431 $as_echo "not found ($d: no such directory)" >&6; }
20432      fi
20433
20434      # replace the directory string with "yes".
20435      with_xshm_req="yes"
20436      with_xshm=$with_xshm_req
20437      ;;
20438
20439     *)
20440      echo ""
20441      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
20442      echo "       If it is a directory, then \`DIR/include' will be added to"
20443      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20444      exit 1
20445      ;;
20446    esac
20447
20448
20449 if test "$with_xshm" = yes; then
20450
20451   # first check for Xshm.h.
20452
20453   ac_save_CPPFLAGS="$CPPFLAGS"
20454   if test \! -z "$includedir" ; then
20455     CPPFLAGS="$CPPFLAGS -I$includedir"
20456   fi
20457   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20458   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20459   { $as_echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
20460 $as_echo_n "checking for X11/extensions/XShm.h... " >&6; }
20461 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
20462   $as_echo_n "(cached) " >&6
20463 else
20464   cat >conftest.$ac_ext <<_ACEOF
20465 /* confdefs.h.  */
20466 _ACEOF
20467 cat confdefs.h >>conftest.$ac_ext
20468 cat >>conftest.$ac_ext <<_ACEOF
20469 /* end confdefs.h.  */
20470 #include <X11/Xlib.h>
20471
20472 #include <X11/extensions/XShm.h>
20473 _ACEOF
20474 rm -rf conftest.$ac_objext
20475 if { (ac_try="$ac_compile"
20476 case "(($ac_try" in
20477   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20478   *) ac_try_echo=$ac_try;;
20479 esac
20480 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20481 $as_echo "$ac_try_echo") >&5
20482   (eval "$ac_compile") 2>conftest.er1
20483   ac_status=$?
20484   grep -v '^ *+' conftest.er1 >conftest.err
20485   rm -rf conftest.er1
20486   cat conftest.err >&5
20487   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20488   (exit $ac_status); } && {
20489          test -z "$ac_c_werror_flag" ||
20490          test ! -s conftest.err
20491        } && test -s conftest.$ac_objext; then
20492   ac_cv_header_X11_extensions_XShm_h=yes
20493 else
20494   $as_echo "$as_me: failed program was:" >&5
20495 sed 's/^/| /' conftest.$ac_ext >&5
20496
20497         ac_cv_header_X11_extensions_XShm_h=no
20498 fi
20499
20500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20501 fi
20502 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
20503 $as_echo "$ac_cv_header_X11_extensions_XShm_h" >&6; }
20504 if test "x$ac_cv_header_X11_extensions_XShm_h" = x""yes; then
20505   have_xshm=yes
20506 fi
20507
20508
20509   CPPFLAGS="$ac_save_CPPFLAGS"
20510
20511   # if that succeeded, then check for sys/ipc.h.
20512   if test "$have_xshm" = yes; then
20513     have_xshm=no
20514
20515   ac_save_CPPFLAGS="$CPPFLAGS"
20516   if test \! -z "$includedir" ; then
20517     CPPFLAGS="$CPPFLAGS -I$includedir"
20518   fi
20519   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20520   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20521   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20522   { $as_echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
20523 $as_echo_n "checking for sys/ipc.h... " >&6; }
20524 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20525   $as_echo_n "(cached) " >&6
20526 fi
20527 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
20528 $as_echo "$ac_cv_header_sys_ipc_h" >&6; }
20529 else
20530   # Is the header compilable?
20531 { $as_echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
20532 $as_echo_n "checking sys/ipc.h usability... " >&6; }
20533 cat >conftest.$ac_ext <<_ACEOF
20534 /* confdefs.h.  */
20535 _ACEOF
20536 cat confdefs.h >>conftest.$ac_ext
20537 cat >>conftest.$ac_ext <<_ACEOF
20538 /* end confdefs.h.  */
20539 $ac_includes_default
20540 #include <sys/ipc.h>
20541 _ACEOF
20542 rm -rf conftest.$ac_objext
20543 if { (ac_try="$ac_compile"
20544 case "(($ac_try" in
20545   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20546   *) ac_try_echo=$ac_try;;
20547 esac
20548 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20549 $as_echo "$ac_try_echo") >&5
20550   (eval "$ac_compile") 2>conftest.er1
20551   ac_status=$?
20552   grep -v '^ *+' conftest.er1 >conftest.err
20553   rm -rf conftest.er1
20554   cat conftest.err >&5
20555   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20556   (exit $ac_status); } && {
20557          test -z "$ac_c_werror_flag" ||
20558          test ! -s conftest.err
20559        } && test -s conftest.$ac_objext; then
20560   ac_header_compiler=yes
20561 else
20562   $as_echo "$as_me: failed program was:" >&5
20563 sed 's/^/| /' conftest.$ac_ext >&5
20564
20565         ac_header_compiler=no
20566 fi
20567
20568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20569 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20570 $as_echo "$ac_header_compiler" >&6; }
20571
20572 # Is the header present?
20573 { $as_echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
20574 $as_echo_n "checking sys/ipc.h presence... " >&6; }
20575 cat >conftest.$ac_ext <<_ACEOF
20576 /* confdefs.h.  */
20577 _ACEOF
20578 cat confdefs.h >>conftest.$ac_ext
20579 cat >>conftest.$ac_ext <<_ACEOF
20580 /* end confdefs.h.  */
20581 #include <sys/ipc.h>
20582 _ACEOF
20583 if { (ac_try="$ac_cpp conftest.$ac_ext"
20584 case "(($ac_try" in
20585   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20586   *) ac_try_echo=$ac_try;;
20587 esac
20588 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20589 $as_echo "$ac_try_echo") >&5
20590   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20591   ac_status=$?
20592   grep -v '^ *+' conftest.er1 >conftest.err
20593   rm -rf conftest.er1
20594   cat conftest.err >&5
20595   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20596   (exit $ac_status); } >/dev/null && {
20597          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20598          test ! -s conftest.err
20599        }; then
20600   ac_header_preproc=yes
20601 else
20602   $as_echo "$as_me: failed program was:" >&5
20603 sed 's/^/| /' conftest.$ac_ext >&5
20604
20605   ac_header_preproc=no
20606 fi
20607
20608 rm -rf conftest.err conftest.$ac_ext
20609 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20610 $as_echo "$ac_header_preproc" >&6; }
20611
20612 # So?  What about this header?
20613 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20614   yes:no: )
20615     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
20616 $as_echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20617     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
20618 $as_echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
20619     ac_header_preproc=yes
20620     ;;
20621   no:yes:* )
20622     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
20623 $as_echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
20624     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
20625 $as_echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
20626     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
20627 $as_echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
20628     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
20629 $as_echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20630     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
20631 $as_echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
20632     { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
20633 $as_echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
20634
20635     ;;
20636 esac
20637 { $as_echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
20638 $as_echo_n "checking for sys/ipc.h... " >&6; }
20639 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
20640   $as_echo_n "(cached) " >&6
20641 else
20642   ac_cv_header_sys_ipc_h=$ac_header_preproc
20643 fi
20644 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
20645 $as_echo "$ac_cv_header_sys_ipc_h" >&6; }
20646
20647 fi
20648 if test "x$ac_cv_header_sys_ipc_h" = x""yes; then
20649   have_xshm=yes
20650 fi
20651
20652
20653   CPPFLAGS="$ac_save_CPPFLAGS"
20654   fi
20655
20656   # if that succeeded, then check for sys/shm.h.
20657   if test "$have_xshm" = yes; then
20658     have_xshm=no
20659
20660   ac_save_CPPFLAGS="$CPPFLAGS"
20661   if test \! -z "$includedir" ; then
20662     CPPFLAGS="$CPPFLAGS -I$includedir"
20663   fi
20664   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20665   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20666   if test "${ac_cv_header_sys_shm_h+set}" = set; then
20667   { $as_echo "$as_me:$LINENO: checking for sys/shm.h" >&5
20668 $as_echo_n "checking for sys/shm.h... " >&6; }
20669 if test "${ac_cv_header_sys_shm_h+set}" = set; then
20670   $as_echo_n "(cached) " >&6
20671 fi
20672 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
20673 $as_echo "$ac_cv_header_sys_shm_h" >&6; }
20674 else
20675   # Is the header compilable?
20676 { $as_echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
20677 $as_echo_n "checking sys/shm.h usability... " >&6; }
20678 cat >conftest.$ac_ext <<_ACEOF
20679 /* confdefs.h.  */
20680 _ACEOF
20681 cat confdefs.h >>conftest.$ac_ext
20682 cat >>conftest.$ac_ext <<_ACEOF
20683 /* end confdefs.h.  */
20684 $ac_includes_default
20685 #include <sys/shm.h>
20686 _ACEOF
20687 rm -rf conftest.$ac_objext
20688 if { (ac_try="$ac_compile"
20689 case "(($ac_try" in
20690   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20691   *) ac_try_echo=$ac_try;;
20692 esac
20693 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20694 $as_echo "$ac_try_echo") >&5
20695   (eval "$ac_compile") 2>conftest.er1
20696   ac_status=$?
20697   grep -v '^ *+' conftest.er1 >conftest.err
20698   rm -rf conftest.er1
20699   cat conftest.err >&5
20700   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20701   (exit $ac_status); } && {
20702          test -z "$ac_c_werror_flag" ||
20703          test ! -s conftest.err
20704        } && test -s conftest.$ac_objext; then
20705   ac_header_compiler=yes
20706 else
20707   $as_echo "$as_me: failed program was:" >&5
20708 sed 's/^/| /' conftest.$ac_ext >&5
20709
20710         ac_header_compiler=no
20711 fi
20712
20713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20714 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20715 $as_echo "$ac_header_compiler" >&6; }
20716
20717 # Is the header present?
20718 { $as_echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
20719 $as_echo_n "checking sys/shm.h presence... " >&6; }
20720 cat >conftest.$ac_ext <<_ACEOF
20721 /* confdefs.h.  */
20722 _ACEOF
20723 cat confdefs.h >>conftest.$ac_ext
20724 cat >>conftest.$ac_ext <<_ACEOF
20725 /* end confdefs.h.  */
20726 #include <sys/shm.h>
20727 _ACEOF
20728 if { (ac_try="$ac_cpp conftest.$ac_ext"
20729 case "(($ac_try" in
20730   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20731   *) ac_try_echo=$ac_try;;
20732 esac
20733 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20734 $as_echo "$ac_try_echo") >&5
20735   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20736   ac_status=$?
20737   grep -v '^ *+' conftest.er1 >conftest.err
20738   rm -rf conftest.er1
20739   cat conftest.err >&5
20740   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20741   (exit $ac_status); } >/dev/null && {
20742          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20743          test ! -s conftest.err
20744        }; then
20745   ac_header_preproc=yes
20746 else
20747   $as_echo "$as_me: failed program was:" >&5
20748 sed 's/^/| /' conftest.$ac_ext >&5
20749
20750   ac_header_preproc=no
20751 fi
20752
20753 rm -rf conftest.err conftest.$ac_ext
20754 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20755 $as_echo "$ac_header_preproc" >&6; }
20756
20757 # So?  What about this header?
20758 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20759   yes:no: )
20760     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
20761 $as_echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20762     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
20763 $as_echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
20764     ac_header_preproc=yes
20765     ;;
20766   no:yes:* )
20767     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
20768 $as_echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
20769     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
20770 $as_echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
20771     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
20772 $as_echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
20773     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
20774 $as_echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20775     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
20776 $as_echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
20777     { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
20778 $as_echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
20779
20780     ;;
20781 esac
20782 { $as_echo "$as_me:$LINENO: checking for sys/shm.h" >&5
20783 $as_echo_n "checking for sys/shm.h... " >&6; }
20784 if test "${ac_cv_header_sys_shm_h+set}" = set; then
20785   $as_echo_n "(cached) " >&6
20786 else
20787   ac_cv_header_sys_shm_h=$ac_header_preproc
20788 fi
20789 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
20790 $as_echo "$ac_cv_header_sys_shm_h" >&6; }
20791
20792 fi
20793 if test "x$ac_cv_header_sys_shm_h" = x""yes; then
20794   have_xshm=yes
20795 fi
20796
20797
20798   CPPFLAGS="$ac_save_CPPFLAGS"
20799   fi
20800
20801   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
20802   # to exist, but the library code to not exist.  And even better, the library
20803   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
20804   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
20805   # that's not quite right, but close enough.)
20806   #
20807   case "$host" in
20808     *-aix*)
20809       if  `uname -v` -eq 3 ; then
20810         have_xshm=no
20811
20812   ac_save_CPPFLAGS="$CPPFLAGS"
20813   ac_save_LDFLAGS="$LDFLAGS"
20814 #  ac_save_LIBS="$LIBS"
20815
20816   if test \! -z "$includedir" ; then
20817     CPPFLAGS="$CPPFLAGS -I$includedir"
20818   fi
20819   # note: $X_CFLAGS includes $x_includes
20820   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20821
20822   if test \! -z "$libdir" ; then
20823     LDFLAGS="$LDFLAGS -L$libdir"
20824   fi
20825   # note: $X_LIBS includes $x_libraries
20826   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20827
20828   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20829   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
20830   { $as_echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
20831 $as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
20832 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
20833   $as_echo_n "(cached) " >&6
20834 else
20835   ac_check_lib_save_LIBS=$LIBS
20836 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
20837 cat >conftest.$ac_ext <<_ACEOF
20838 /* confdefs.h.  */
20839 _ACEOF
20840 cat confdefs.h >>conftest.$ac_ext
20841 cat >>conftest.$ac_ext <<_ACEOF
20842 /* end confdefs.h.  */
20843
20844 /* Override any GCC internal prototype to avoid an error.
20845    Use char because int might match the return type of a GCC
20846    builtin and then its argument prototype would still apply.  */
20847 #ifdef __cplusplus
20848 extern "C"
20849 #endif
20850 char XShmQueryExtension ();
20851 int
20852 main ()
20853 {
20854 return XShmQueryExtension ();
20855   ;
20856   return 0;
20857 }
20858 _ACEOF
20859 rm -rf conftest.$ac_objext conftest$ac_exeext
20860 if { (ac_try="$ac_link"
20861 case "(($ac_try" in
20862   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20863   *) ac_try_echo=$ac_try;;
20864 esac
20865 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20866 $as_echo "$ac_try_echo") >&5
20867   (eval "$ac_link") 2>conftest.er1
20868   ac_status=$?
20869   grep -v '^ *+' conftest.er1 >conftest.err
20870   rm -rf conftest.er1
20871   cat conftest.err >&5
20872   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20873   (exit $ac_status); } && {
20874          test -z "$ac_c_werror_flag" ||
20875          test ! -s conftest.err
20876        } && test -s conftest$ac_exeext && {
20877          test "$cross_compiling" = yes ||
20878          $as_test_x conftest$ac_exeext
20879        }; then
20880   ac_cv_lib_XextSam_XShmQueryExtension=yes
20881 else
20882   $as_echo "$as_me: failed program was:" >&5
20883 sed 's/^/| /' conftest.$ac_ext >&5
20884
20885         ac_cv_lib_XextSam_XShmQueryExtension=no
20886 fi
20887
20888 rm -rf conftest.dSYM
20889 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20890       conftest$ac_exeext conftest.$ac_ext
20891 LIBS=$ac_check_lib_save_LIBS
20892 fi
20893 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
20894 $as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
20895 if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = x""yes; then
20896   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
20897 else
20898   true
20899 fi
20900
20901   CPPFLAGS="$ac_save_CPPFLAGS"
20902   LDFLAGS="$ac_save_LDFLAGS"
20903 #  LIBS="$ac_save_LIBS"
20904
20905       fi
20906     ;;
20907   esac
20908
20909   # if that succeeded, then we've really got it.
20910   if test "$have_xshm" = yes; then
20911     cat >>confdefs.h <<\_ACEOF
20912 #define HAVE_XSHM_EXTENSION 1
20913 _ACEOF
20914
20915   fi
20916
20917 elif test "$with_xshm" != no; then
20918   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
20919   exit 1
20920 fi
20921
20922
20923 ###############################################################################
20924 #
20925 #       Check for the DOUBLE-BUFFER server extension.
20926 #
20927 ###############################################################################
20928
20929 have_xdbe=no
20930 with_xdbe_req=unspecified
20931
20932 # Check whether --with-xdbe-ext was given.
20933 if test "${with_xdbe_ext+set}" = set; then
20934   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
20935 else
20936   with_xdbe=yes
20937 fi
20938
20939
20940
20941    case "$with_xdbe" in
20942     yes) ;;
20943     no)  ;;
20944
20945     /*)
20946      { $as_echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
20947 $as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
20948      d=$with_xdbe/include
20949      if test -d $d; then
20950        X_CFLAGS="-I$d $X_CFLAGS"
20951        { $as_echo "$as_me:$LINENO: result: $d" >&5
20952 $as_echo "$d" >&6; }
20953      else
20954        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20955 $as_echo "not found ($d: no such directory)" >&6; }
20956      fi
20957
20958      { $as_echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
20959 $as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
20960      d=$with_xdbe/lib
20961      if test -d $d; then
20962        X_LIBS="-L$d $X_LIBS"
20963        { $as_echo "$as_me:$LINENO: result: $d" >&5
20964 $as_echo "$d" >&6; }
20965      else
20966        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20967 $as_echo "not found ($d: no such directory)" >&6; }
20968      fi
20969
20970      # replace the directory string with "yes".
20971      with_xdbe_req="yes"
20972      with_xdbe=$with_xdbe_req
20973      ;;
20974
20975     *)
20976      echo ""
20977      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
20978      echo "       If it is a directory, then \`DIR/include' will be added to"
20979      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20980      exit 1
20981      ;;
20982    esac
20983
20984
20985 if test "$with_xdbe" = yes; then
20986
20987
20988   ac_save_CPPFLAGS="$CPPFLAGS"
20989   if test \! -z "$includedir" ; then
20990     CPPFLAGS="$CPPFLAGS -I$includedir"
20991   fi
20992   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20993   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
20994   { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
20995 $as_echo_n "checking for X11/extensions/Xdbe.h... " >&6; }
20996 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
20997   $as_echo_n "(cached) " >&6
20998 else
20999   cat >conftest.$ac_ext <<_ACEOF
21000 /* confdefs.h.  */
21001 _ACEOF
21002 cat confdefs.h >>conftest.$ac_ext
21003 cat >>conftest.$ac_ext <<_ACEOF
21004 /* end confdefs.h.  */
21005 #include <X11/Xlib.h>
21006
21007 #include <X11/extensions/Xdbe.h>
21008 _ACEOF
21009 rm -rf conftest.$ac_objext
21010 if { (ac_try="$ac_compile"
21011 case "(($ac_try" in
21012   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21013   *) ac_try_echo=$ac_try;;
21014 esac
21015 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21016 $as_echo "$ac_try_echo") >&5
21017   (eval "$ac_compile") 2>conftest.er1
21018   ac_status=$?
21019   grep -v '^ *+' conftest.er1 >conftest.err
21020   rm -rf conftest.er1
21021   cat conftest.err >&5
21022   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21023   (exit $ac_status); } && {
21024          test -z "$ac_c_werror_flag" ||
21025          test ! -s conftest.err
21026        } && test -s conftest.$ac_objext; then
21027   ac_cv_header_X11_extensions_Xdbe_h=yes
21028 else
21029   $as_echo "$as_me: failed program was:" >&5
21030 sed 's/^/| /' conftest.$ac_ext >&5
21031
21032         ac_cv_header_X11_extensions_Xdbe_h=no
21033 fi
21034
21035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21036 fi
21037 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
21038 $as_echo "$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
21039 if test "x$ac_cv_header_X11_extensions_Xdbe_h" = x""yes; then
21040   have_xdbe=yes
21041 fi
21042
21043
21044   CPPFLAGS="$ac_save_CPPFLAGS"
21045   if test "$have_xdbe" = yes; then
21046     cat >>confdefs.h <<\_ACEOF
21047 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
21048 _ACEOF
21049
21050   fi
21051
21052 elif test "$with_xdbe" != no; then
21053   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
21054   exit 1
21055 fi
21056
21057
21058 ###############################################################################
21059 #
21060 #       Check for the SGI XReadDisplay server extension.
21061 #
21062 #       Note: this has to be down here, rather than up with the other server
21063 #       extension tests, so that the output of `configure --help' is in the
21064 #       right order.  Arrgh!
21065 #
21066 ###############################################################################
21067
21068 have_readdisplay=no
21069 with_readdisplay_req=unspecified
21070
21071 # Check whether --with-readdisplay was given.
21072 if test "${with_readdisplay+set}" = set; then
21073   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
21074 else
21075   with_readdisplay=yes
21076 fi
21077
21078
21079
21080    case "$with_readdisplay" in
21081     yes) ;;
21082     no)  ;;
21083
21084     /*)
21085      { $as_echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
21086 $as_echo_n "checking for XReadDisplay headers... " >&6; }
21087      d=$with_readdisplay/include
21088      if test -d $d; then
21089        X_CFLAGS="-I$d $X_CFLAGS"
21090        { $as_echo "$as_me:$LINENO: result: $d" >&5
21091 $as_echo "$d" >&6; }
21092      else
21093        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21094 $as_echo "not found ($d: no such directory)" >&6; }
21095      fi
21096
21097      { $as_echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
21098 $as_echo_n "checking for XReadDisplay libs... " >&6; }
21099      d=$with_readdisplay/lib
21100      if test -d $d; then
21101        X_LIBS="-L$d $X_LIBS"
21102        { $as_echo "$as_me:$LINENO: result: $d" >&5
21103 $as_echo "$d" >&6; }
21104      else
21105        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21106 $as_echo "not found ($d: no such directory)" >&6; }
21107      fi
21108
21109      # replace the directory string with "yes".
21110      with_readdisplay_req="yes"
21111      with_readdisplay=$with_readdisplay_req
21112      ;;
21113
21114     *)
21115      echo ""
21116      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
21117      echo "       If it is a directory, then \`DIR/include' will be added to"
21118      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
21119      exit 1
21120      ;;
21121    esac
21122
21123
21124 if test "$with_readdisplay" = yes; then
21125
21126   ac_save_CPPFLAGS="$CPPFLAGS"
21127   if test \! -z "$includedir" ; then
21128     CPPFLAGS="$CPPFLAGS -I$includedir"
21129   fi
21130   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
21131   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
21132   { $as_echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
21133 $as_echo_n "checking for X11/extensions/readdisplay.h... " >&6; }
21134 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
21135   $as_echo_n "(cached) " >&6
21136 else
21137   cat >conftest.$ac_ext <<_ACEOF
21138 /* confdefs.h.  */
21139 _ACEOF
21140 cat confdefs.h >>conftest.$ac_ext
21141 cat >>conftest.$ac_ext <<_ACEOF
21142 /* end confdefs.h.  */
21143 #include <X11/Xlib.h>
21144
21145 #include <X11/extensions/readdisplay.h>
21146 _ACEOF
21147 rm -rf conftest.$ac_objext
21148 if { (ac_try="$ac_compile"
21149 case "(($ac_try" in
21150   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21151   *) ac_try_echo=$ac_try;;
21152 esac
21153 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21154 $as_echo "$ac_try_echo") >&5
21155   (eval "$ac_compile") 2>conftest.er1
21156   ac_status=$?
21157   grep -v '^ *+' conftest.er1 >conftest.err
21158   rm -rf conftest.er1
21159   cat conftest.err >&5
21160   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21161   (exit $ac_status); } && {
21162          test -z "$ac_c_werror_flag" ||
21163          test ! -s conftest.err
21164        } && test -s conftest.$ac_objext; then
21165   ac_cv_header_X11_extensions_readdisplay_h=yes
21166 else
21167   $as_echo "$as_me: failed program was:" >&5
21168 sed 's/^/| /' conftest.$ac_ext >&5
21169
21170         ac_cv_header_X11_extensions_readdisplay_h=no
21171 fi
21172
21173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21174 fi
21175 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
21176 $as_echo "$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
21177 if test "x$ac_cv_header_X11_extensions_readdisplay_h" = x""yes; then
21178   cat >>confdefs.h <<\_ACEOF
21179 #define HAVE_READ_DISPLAY_EXTENSION 1
21180 _ACEOF
21181
21182 fi
21183
21184
21185   CPPFLAGS="$ac_save_CPPFLAGS"
21186 elif test "$with_readdisplay" != no; then
21187   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
21188   exit 1
21189 fi
21190
21191
21192 ###############################################################################
21193 #
21194 #       Check for a directory full of images to use as the default value
21195 #       of the "imageDirectory" preference.
21196 #
21197 ###############################################################################
21198
21199 have_imagedir=no
21200 with_imagedir_req=unspecified
21201
21202
21203 # Check whether --with-image-directory was given.
21204 if test "${with_image_directory+set}" = set; then
21205   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
21206 else
21207   with_imagedir=yes
21208 fi
21209
21210 # no HANDLE_X_PATH_ARG for this one
21211
21212 case "$with_imagedir" in
21213   /*)
21214     # absolute path
21215     { $as_echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
21216 $as_echo_n "checking for image directory $with_imagedir... " >&6; }
21217     if test -d "$with_imagedir" ; then
21218       { $as_echo "$as_me:$LINENO: result: yes" >&5
21219 $as_echo "yes" >&6; }
21220     else
21221       { $as_echo "$as_me:$LINENO: result: no" >&5
21222 $as_echo "no" >&6; }
21223       with_imagedir=""
21224     fi
21225   ;;
21226   yes)
21227     with_imagedir=""
21228
21229     #### Could use some more defaults here...
21230     for dd in \
21231       "/usr/share/backgrounds/images/"          \
21232       "/usr/share/wallpapers/"                  \
21233       "/Library/Desktop Pictures/"              \
21234     ; do
21235       if test -z "$with_imagedir"; then
21236         { $as_echo "$as_me:$LINENO: checking for image directory $dd" >&5
21237 $as_echo_n "checking for image directory $dd... " >&6; }
21238         if test -d "$dd" ; then
21239           { $as_echo "$as_me:$LINENO: result: yes" >&5
21240 $as_echo "yes" >&6; }
21241           with_imagedir="$dd"
21242         else
21243           { $as_echo "$as_me:$LINENO: result: no" >&5
21244 $as_echo "no" >&6; }
21245         fi
21246       fi
21247     done
21248
21249   ;;
21250   no)
21251     with_imagedir=""
21252   ;;
21253
21254   *)
21255     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
21256     exit 1
21257   ;;
21258 esac
21259 ac_cv_imagedir="$with_imagedir"
21260
21261 DEFAULT_IMAGES_P='True'
21262 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
21263
21264 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
21265   DEFAULT_IMAGES_P='False'
21266 fi
21267
21268
21269 ###############################################################################
21270 #
21271 #       Pick a text file to use as the default of the "textFile" preference.
21272 #       Any old file will do, but preferably one that will make interesting
21273 #       shapes when displayed by "starwars" and "fontglide".
21274 #
21275 ###############################################################################
21276
21277 have_textfile=no
21278 with_textfile_req=unspecified
21279
21280
21281 # Check whether --with-text-file was given.
21282 if test "${with_text_file+set}" = set; then
21283   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
21284 else
21285   with_textfile=yes
21286 fi
21287
21288 # no HANDLE_X_PATH_ARG for this one
21289
21290 case "$with_textfile" in
21291   /*)
21292     # absolute path
21293     { $as_echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
21294 $as_echo_n "checking for text file $with_textfile... " >&6; }
21295     if test -f "$with_textfile" ; then
21296       { $as_echo "$as_me:$LINENO: result: yes" >&5
21297 $as_echo "yes" >&6; }
21298     else
21299       { $as_echo "$as_me:$LINENO: result: no" >&5
21300 $as_echo "no" >&6; }
21301       with_textfile=""
21302     fi
21303   ;;
21304   yes)
21305     with_textfile=""
21306
21307     #### Could use some more defaults here...
21308     for f in \
21309       "/usr/X11R6/lib/X11/doc/README"              \
21310       "/usr/share/doc/xserver-common/copyright"    \
21311       "/usr/share/doc/xserver-xorg-core/copyright" \
21312       "/usr/X11R6/README"                          \
21313       "/usr/share/doc/libX11*/COPYING"             \
21314       "/usr/X11/share/X11/doc/README*"             \
21315       "/usr/share/doc/debian/debian-manifesto"     \
21316     ; do
21317       if test -z "$with_textfile"; then
21318         { $as_echo "$as_me:$LINENO: checking for text file $f" >&5
21319 $as_echo_n "checking for text file $f... " >&6; }
21320         f=`/bin/ls $f 2>&- | head -1`
21321         if test -f "$f" ; then
21322           { $as_echo "$as_me:$LINENO: result: yes" >&5
21323 $as_echo "yes" >&6; }
21324           with_textfile="$f"
21325         else
21326           { $as_echo "$as_me:$LINENO: result: no" >&5
21327 $as_echo "no" >&6; }
21328         fi
21329       fi
21330     done
21331
21332   ;;
21333   no)
21334     with_textfile=""
21335   ;;
21336
21337   *)
21338     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
21339     exit 1
21340   ;;
21341 esac
21342 ac_cv_textfile="$with_textfile"
21343
21344 DEFAULT_TEXT_FILE="$ac_cv_textfile"
21345
21346
21347 ###############################################################################
21348 #
21349 #       Check the browser to see help URL
21350 #
21351 ###############################################################################
21352
21353 have_browser=no
21354 with_browser_req=unspecified
21355
21356
21357 # Check whether --with-browser was given.
21358 if test "${with_browser+set}" = set; then
21359   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
21360 else
21361   with_browser=no
21362 fi
21363
21364 # no HANDLE_X_PATH_ARG for this one
21365
21366 case "$with_browser" in
21367   no )
21368   ;;
21369   * )
21370     WITH_BROWSER=$with_browser
21371     gnome_open_program=$with_browser
21372     { $as_echo "$as_me:$LINENO: checking for browser $with_browser" >&5
21373 $as_echo_n "checking for browser $with_browser... " >&6; }
21374     with_browser_fullpath=`which $with_browser 2>/dev/null`
21375     case $with_browser_fullpath in
21376          /* )
21377                 { $as_echo "$as_me:$LINENO: result: yes" >&5
21378 $as_echo "yes" >&6; }
21379                  have_browser=yes
21380                  ;;
21381         * )
21382                { $as_echo "$as_me:$LINENO: result: no" >&5
21383 $as_echo "no" >&6; }
21384 # Only warning: we don't want to install all packages for the
21385 # dependency of the browser in building stage...
21386                echo "WARNING: browser not found: --with-browser=$with_browser"
21387                ;;
21388     esac
21389   ;;
21390 esac
21391 ac_cv_browser="$with_browser"
21392
21393 ###############################################################################
21394 #
21395 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
21396 #       This should be safe, but let's give people the option.
21397 #
21398 ###############################################################################
21399
21400 setuid_hacks_default=no
21401 setuid_hacks="$setuid_hacks_default"
21402
21403 # Check whether --with-setuid-hacks was given.
21404 if test "${with_setuid_hacks+set}" = set; then
21405   withval=$with_setuid_hacks; setuid_hacks="$withval"
21406 else
21407   setuid_hacks="$setuid_hacks_default"
21408 fi
21409
21410
21411
21412    case "$setuid_hacks" in
21413     yes) ;;
21414     no)  ;;
21415
21416     /*)
21417      { $as_echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
21418 $as_echo_n "checking for setuid hacks headers... " >&6; }
21419      d=$setuid_hacks/include
21420      if test -d $d; then
21421        X_CFLAGS="-I$d $X_CFLAGS"
21422        { $as_echo "$as_me:$LINENO: result: $d" >&5
21423 $as_echo "$d" >&6; }
21424      else
21425        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21426 $as_echo "not found ($d: no such directory)" >&6; }
21427      fi
21428
21429      { $as_echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
21430 $as_echo_n "checking for setuid hacks libs... " >&6; }
21431      d=$setuid_hacks/lib
21432      if test -d $d; then
21433        X_LIBS="-L$d $X_LIBS"
21434        { $as_echo "$as_me:$LINENO: result: $d" >&5
21435 $as_echo "$d" >&6; }
21436      else
21437        { $as_echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21438 $as_echo "not found ($d: no such directory)" >&6; }
21439      fi
21440
21441      # replace the directory string with "yes".
21442      setuid_hacks_req="yes"
21443      setuid_hacks=$setuid_hacks_req
21444      ;;
21445
21446     *)
21447      echo ""
21448      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
21449      echo "       If it is a directory, then \`DIR/include' will be added to"
21450      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
21451      exit 1
21452      ;;
21453    esac
21454
21455
21456 if test "$setuid_hacks" = yes; then
21457   true
21458 elif test "$setuid_hacks" != no; then
21459   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
21460   exit 1
21461 fi
21462
21463
21464 ###############################################################################
21465 #
21466 #       Done testing.  Now, set up the various -I and -L variables,
21467 #       and decide which GUI program to build by default.
21468 #
21469 ###############################################################################
21470
21471 DEPEND=makedepend
21472 DEPEND_FLAGS=
21473 DEPEND_DEFINES=
21474
21475
21476 if test \! -z "$includedir" ; then
21477   INCLUDES="$INCLUDES -I$includedir"
21478 fi
21479
21480 if test \! -z "$libdir" ; then
21481   LDFLAGS="$LDFLAGS -L$libdir"
21482 fi
21483
21484
21485 PREFERRED_DEMO_PROGRAM=''
21486 ALL_DEMO_PROGRAMS=
21487 if test "$have_motif" = yes; then
21488   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
21489   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
21490 fi
21491 if test "$have_gtk" = yes; then
21492   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
21493   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
21494 fi
21495
21496
21497 if test "$have_kerberos" = yes; then
21498   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
21499   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
21500 fi
21501 if test "$have_pam" = yes; then
21502   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
21503   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
21504   INSTALL_PAM="install-pam"
21505 fi
21506 if test "$enable_pam_check_account_type" = yes; then
21507   COMMENT_PAM_CHECK_ACCOUNT=""
21508 else
21509   COMMENT_PAM_CHECK_ACCOUNT="#"
21510 fi
21511 if test "$have_passwd_helper" = yes; then
21512   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
21513   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
21514 fi
21515   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
21516   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
21517
21518
21519 if test "$enable_locking" = yes; then
21520   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
21521   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
21522 else
21523   LOCK_SRCS='$(NOLOCK_SRCS_1)'
21524   LOCK_OBJS='$(NOLOCK_OBJS_1)'
21525 fi
21526
21527 if test "$ac_macosx" = yes; then
21528   EXES_OSX='$(EXES_OSX)'
21529   SCRIPTS_OSX='$(SCRIPTS_OSX)'
21530   MEN_OSX='$(MEN_OSX)'
21531 else
21532   EXES_OSX=
21533   SCRIPTS_OSX=
21534   MEN_OSX=
21535 fi
21536
21537
21538 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
21539
21540 if test "$need_setuid" = yes; then
21541   NEED_SETUID=yes
21542 else
21543   NEED_SETUID=no
21544 fi
21545
21546 if test "$setuid_hacks" = yes; then
21547   SETUID_HACKS=yes
21548 else
21549   SETUID_HACKS=no
21550 fi
21551
21552 tab='   '
21553 if test "$have_gl" = yes; then
21554   GL_EXES='$(GL_EXES)'
21555   SUID_EXES='$(SUID_EXES)'
21556   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
21557   GL_UTIL_EXES='$(GL_UTIL_EXES)'
21558   GL_MEN='$(GL_MEN)'
21559   GL_KLUDGE=" "
21560 else
21561   GL_KLUDGE="-"
21562 fi
21563
21564 if test "$have_gle" = yes; then
21565   GLE_EXES='$(GLE_EXES)'
21566   GLE_KLUDGE=" "
21567 else
21568   GLE_KLUDGE="-"
21569 fi
21570
21571 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
21572  JPEG_EXES='$(JPEG_EXES)'
21573 fi
21574
21575
21576 # Another substitution in the XScreenSaver.ad.in file:
21577 #
21578 if test "$gnome_open_program" != ''; then
21579   GNOME24=''
21580   GNOME22='!    '
21581   NOGNOME='!    '
21582 elif test "$gnome_url_show_program" != ''; then
21583   GNOME24='!    '
21584   GNOME22=''
21585   NOGNOME='!    '
21586 else
21587   GNOME24='!    '
21588   GNOME22='!    '
21589   NOGNOME=''
21590 fi
21591
21592
21593 # Set PO_DATADIR to something sensible.
21594 #
21595 { $as_echo "$as_me:$LINENO: checking for locale directory" >&5
21596 $as_echo_n "checking for locale directory... " >&6; }
21597 if test -n "$GTK_DATADIR" ; then
21598   PO_DATADIR="$GTK_DATADIR"
21599 elif test "$have_gtk" = yes; then
21600   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
21601   PO_DATADIR="$PO_DATADIR/share"
21602 fi
21603
21604 if test -z "$PO_DATADIR" ; then
21605   #
21606   # #### Total fucking kludge --
21607   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
21608   # but of course we need to expand all the nested variables to do that...
21609   #
21610   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
21611   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
21612 fi
21613
21614 { $as_echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
21615 $as_echo "$PO_DATADIR/locale" >&6; }
21616
21617
21618 # canonicalize slashes.
21619 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21620
21621 # gcc 3.0 likes to issue this warning for every file:
21622 #
21623 # cc1: warning: changing search order for system directory "/usr/local/include"
21624 # cc1: warning:   as it has already been specified as a non-system directory
21625 #
21626 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
21627 # Which *should* be totally redundant, and thus an ok thing to delete?
21628 #
21629 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
21630
21631
21632 ###############################################################################
21633 #
21634 #       Perform substitutions and write Makefiles.
21635 #
21636 ###############################################################################
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706 APPDEFAULTS=$ac_x_app_defaults
21707
21708
21709
21710
21711
21712
21713
21714 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile driver/xscreensaver.pam hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
21715
21716 cat >confcache <<\_ACEOF
21717 # This file is a shell script that caches the results of configure
21718 # tests run on this system so they can be shared between configure
21719 # scripts and configure runs, see configure's option --config-cache.
21720 # It is not useful on other systems.  If it contains results you don't
21721 # want to keep, you may remove or edit it.
21722 #
21723 # config.status only pays attention to the cache file if you give it
21724 # the --recheck option to rerun configure.
21725 #
21726 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21727 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21728 # following values.
21729
21730 _ACEOF
21731
21732 # The following way of writing the cache mishandles newlines in values,
21733 # but we know of no workaround that is simple, portable, and efficient.
21734 # So, we kill variables containing newlines.
21735 # Ultrix sh set writes to stderr and can't be redirected directly,
21736 # and sets the high bit in the cache file unless we assign to the vars.
21737 (
21738   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21739     eval ac_val=\$$ac_var
21740     case $ac_val in #(
21741     *${as_nl}*)
21742       case $ac_var in #(
21743       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
21744 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21745       esac
21746       case $ac_var in #(
21747       _ | IFS | as_nl) ;; #(
21748       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21749       *) $as_unset $ac_var ;;
21750       esac ;;
21751     esac
21752   done
21753
21754   (set) 2>&1 |
21755     case $as_nl`(ac_space=' '; set) 2>&1` in #(
21756     *${as_nl}ac_space=\ *)
21757       # `set' does not quote correctly, so add quotes (double-quote
21758       # substitution turns \\\\ into \\, and sed turns \\ into \).
21759       sed -n \
21760         "s/'/'\\\\''/g;
21761           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21762       ;; #(
21763     *)
21764       # `set' quotes correctly as required by POSIX, so do not add quotes.
21765       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21766       ;;
21767     esac |
21768     sort
21769 ) |
21770   sed '
21771      /^ac_cv_env_/b end
21772      t clear
21773      :clear
21774      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21775      t end
21776      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21777      :end' >>confcache
21778 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21779   if test -w "$cache_file"; then
21780     test "x$cache_file" != "x/dev/null" &&
21781       { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
21782 $as_echo "$as_me: updating cache $cache_file" >&6;}
21783     cat confcache >$cache_file
21784   else
21785     { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
21786 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21787   fi
21788 fi
21789 rm -f confcache
21790
21791 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21792 # Let make expand exec_prefix.
21793 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21794
21795 DEFS=-DHAVE_CONFIG_H
21796
21797 ac_libobjs=
21798 ac_ltlibobjs=
21799 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21800   # 1. Remove the extension, and $U if already installed.
21801   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21802   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21803   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21804   #    will be set to the directory where LIBOBJS objects are built.
21805   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21806   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
21807 done
21808 LIBOBJS=$ac_libobjs
21809
21810 LTLIBOBJS=$ac_ltlibobjs
21811
21812
21813
21814
21815         mv -f po/POTFILES po/POTFILES.tmp
21816         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
21817         rm -f po/POTFILES.tmp
21818
21819
21820
21821 : ${CONFIG_STATUS=./config.status}
21822 ac_write_fail=0
21823 ac_clean_files_save=$ac_clean_files
21824 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21825 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21826 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21827 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21828 #! $SHELL
21829 # Generated by $as_me.
21830 # Run this file to recreate the current configuration.
21831 # Compiler output produced by configure, useful for debugging
21832 # configure, is in config.log if it exists.
21833
21834 debug=false
21835 ac_cs_recheck=false
21836 ac_cs_silent=false
21837 SHELL=\${CONFIG_SHELL-$SHELL}
21838 _ACEOF
21839
21840 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21841 ## --------------------- ##
21842 ## M4sh Initialization.  ##
21843 ## --------------------- ##
21844
21845 # Be more Bourne compatible
21846 DUALCASE=1; export DUALCASE # for MKS sh
21847 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21848   emulate sh
21849   NULLCMD=:
21850   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21851   # is contrary to our usage.  Disable this feature.
21852   alias -g '${1+"$@"}'='"$@"'
21853   setopt NO_GLOB_SUBST
21854 else
21855   case `(set -o) 2>/dev/null` in
21856   *posix*) set -o posix ;;
21857 esac
21858
21859 fi
21860
21861
21862
21863
21864 # PATH needs CR
21865 # Avoid depending upon Character Ranges.
21866 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21867 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21868 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21869 as_cr_digits='0123456789'
21870 as_cr_alnum=$as_cr_Letters$as_cr_digits
21871
21872 as_nl='
21873 '
21874 export as_nl
21875 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21876 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21877 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21878 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21879 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21880   as_echo='printf %s\n'
21881   as_echo_n='printf %s'
21882 else
21883   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21884     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21885     as_echo_n='/usr/ucb/echo -n'
21886   else
21887     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21888     as_echo_n_body='eval
21889       arg=$1;
21890       case $arg in
21891       *"$as_nl"*)
21892         expr "X$arg" : "X\\(.*\\)$as_nl";
21893         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21894       esac;
21895       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21896     '
21897     export as_echo_n_body
21898     as_echo_n='sh -c $as_echo_n_body as_echo'
21899   fi
21900   export as_echo_body
21901   as_echo='sh -c $as_echo_body as_echo'
21902 fi
21903
21904 # The user is always right.
21905 if test "${PATH_SEPARATOR+set}" != set; then
21906   PATH_SEPARATOR=:
21907   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21908     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21909       PATH_SEPARATOR=';'
21910   }
21911 fi
21912
21913 # Support unset when possible.
21914 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21915   as_unset=unset
21916 else
21917   as_unset=false
21918 fi
21919
21920
21921 # IFS
21922 # We need space, tab and new line, in precisely that order.  Quoting is
21923 # there to prevent editors from complaining about space-tab.
21924 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21925 # splitting by setting IFS to empty value.)
21926 IFS=" ""        $as_nl"
21927
21928 # Find who we are.  Look in the path if we contain no directory separator.
21929 case $0 in
21930   *[\\/]* ) as_myself=$0 ;;
21931   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21932 for as_dir in $PATH
21933 do
21934   IFS=$as_save_IFS
21935   test -z "$as_dir" && as_dir=.
21936   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21937 done
21938 IFS=$as_save_IFS
21939
21940      ;;
21941 esac
21942 # We did not find ourselves, most probably we were run as `sh COMMAND'
21943 # in which case we are not to be found in the path.
21944 if test "x$as_myself" = x; then
21945   as_myself=$0
21946 fi
21947 if test ! -f "$as_myself"; then
21948   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21949   { (exit 1); exit 1; }
21950 fi
21951
21952 # Work around bugs in pre-3.0 UWIN ksh.
21953 for as_var in ENV MAIL MAILPATH
21954 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
21955 done
21956 PS1='$ '
21957 PS2='> '
21958 PS4='+ '
21959
21960 # NLS nuisances.
21961 LC_ALL=C
21962 export LC_ALL
21963 LANGUAGE=C
21964 export LANGUAGE
21965
21966 # Required to use basename.
21967 if expr a : '\(a\)' >/dev/null 2>&1 &&
21968    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21969   as_expr=expr
21970 else
21971   as_expr=false
21972 fi
21973
21974 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21975   as_basename=basename
21976 else
21977   as_basename=false
21978 fi
21979
21980
21981 # Name of the executable.
21982 as_me=`$as_basename -- "$0" ||
21983 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21984          X"$0" : 'X\(//\)$' \| \
21985          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21986 $as_echo X/"$0" |
21987     sed '/^.*\/\([^/][^/]*\)\/*$/{
21988             s//\1/
21989             q
21990           }
21991           /^X\/\(\/\/\)$/{
21992             s//\1/
21993             q
21994           }
21995           /^X\/\(\/\).*/{
21996             s//\1/
21997             q
21998           }
21999           s/.*/./; q'`
22000
22001 # CDPATH.
22002 $as_unset CDPATH
22003
22004
22005
22006   as_lineno_1=$LINENO
22007   as_lineno_2=$LINENO
22008   test "x$as_lineno_1" != "x$as_lineno_2" &&
22009   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
22010
22011   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22012   # uniformly replaced by the line number.  The first 'sed' inserts a
22013   # line-number line after each line using $LINENO; the second 'sed'
22014   # does the real work.  The second script uses 'N' to pair each
22015   # line-number line with the line containing $LINENO, and appends
22016   # trailing '-' during substitution so that $LINENO is not a special
22017   # case at line end.
22018   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22019   # scripts with optimization help from Paolo Bonzini.  Blame Lee
22020   # E. McMahon (1931-1989) for sed's syntax.  :-)
22021   sed -n '
22022     p
22023     /[$]LINENO/=
22024   ' <$as_myself |
22025     sed '
22026       s/[$]LINENO.*/&-/
22027       t lineno
22028       b
22029       :lineno
22030       N
22031       :loop
22032       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
22033       t loop
22034       s/-\n.*//
22035     ' >$as_me.lineno &&
22036   chmod +x "$as_me.lineno" ||
22037     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
22038    { (exit 1); exit 1; }; }
22039
22040   # Don't try to exec as it changes $[0], causing all sort of problems
22041   # (the dirname of $[0] is not the place where we might find the
22042   # original and so on.  Autoconf is especially sensitive to this).
22043   . "./$as_me.lineno"
22044   # Exit status is that of the last command.
22045   exit
22046 }
22047
22048
22049 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
22050   as_dirname=dirname
22051 else
22052   as_dirname=false
22053 fi
22054
22055 ECHO_C= ECHO_N= ECHO_T=
22056 case `echo -n x` in
22057 -n*)
22058   case `echo 'x\c'` in
22059   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
22060   *)   ECHO_C='\c';;
22061   esac;;
22062 *)
22063   ECHO_N='-n';;
22064 esac
22065 if expr a : '\(a\)' >/dev/null 2>&1 &&
22066    test "X`expr 00001 : '.*\(...\)'`" = X001; then
22067   as_expr=expr
22068 else
22069   as_expr=false
22070 fi
22071
22072 rm -f conf$$ conf$$.exe conf$$.file
22073 if test -d conf$$.dir; then
22074   rm -f conf$$.dir/conf$$.file
22075 else
22076   rm -f conf$$.dir
22077   mkdir conf$$.dir 2>/dev/null
22078 fi
22079 if (echo >conf$$.file) 2>/dev/null; then
22080   if ln -s conf$$.file conf$$ 2>/dev/null; then
22081     as_ln_s='ln -s'
22082     # ... but there are two gotchas:
22083     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
22084     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
22085     # In both cases, we have to default to `cp -p'.
22086     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
22087       as_ln_s='cp -p'
22088   elif ln conf$$.file conf$$ 2>/dev/null; then
22089     as_ln_s=ln
22090   else
22091     as_ln_s='cp -p'
22092   fi
22093 else
22094   as_ln_s='cp -p'
22095 fi
22096 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
22097 rmdir conf$$.dir 2>/dev/null
22098
22099 if mkdir -p . 2>/dev/null; then
22100   as_mkdir_p=:
22101 else
22102   test -d ./-p && rmdir ./-p
22103   as_mkdir_p=false
22104 fi
22105
22106 if test -x / >/dev/null 2>&1; then
22107   as_test_x='test -x'
22108 else
22109   if ls -dL / >/dev/null 2>&1; then
22110     as_ls_L_option=L
22111   else
22112     as_ls_L_option=
22113   fi
22114   as_test_x='
22115     eval sh -c '\''
22116       if test -d "$1"; then
22117         test -d "$1/.";
22118       else
22119         case $1 in
22120         -*)set "./$1";;
22121         esac;
22122         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
22123         ???[sx]*):;;*)false;;esac;fi
22124     '\'' sh
22125   '
22126 fi
22127 as_executable_p=$as_test_x
22128
22129 # Sed expression to map a string onto a valid CPP name.
22130 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22131
22132 # Sed expression to map a string onto a valid variable name.
22133 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22134
22135
22136 exec 6>&1
22137
22138 # Save the log message, to keep $[0] and so on meaningful, and to
22139 # report actual input values of CONFIG_FILES etc. instead of their
22140 # values after options handling.
22141 ac_log="
22142 This file was extended by $as_me, which was
22143 generated by GNU Autoconf 2.63.  Invocation command line was
22144
22145   CONFIG_FILES    = $CONFIG_FILES
22146   CONFIG_HEADERS  = $CONFIG_HEADERS
22147   CONFIG_LINKS    = $CONFIG_LINKS
22148   CONFIG_COMMANDS = $CONFIG_COMMANDS
22149   $ $0 $@
22150
22151 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22152 "
22153
22154 _ACEOF
22155
22156 case $ac_config_files in *"
22157 "*) set x $ac_config_files; shift; ac_config_files=$*;;
22158 esac
22159
22160 case $ac_config_headers in *"
22161 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
22162 esac
22163
22164
22165 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22166 # Files that config.status was made for.
22167 config_files="$ac_config_files"
22168 config_headers="$ac_config_headers"
22169 config_commands="$ac_config_commands"
22170
22171 _ACEOF
22172
22173 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22174 ac_cs_usage="\
22175 \`$as_me' instantiates files from templates according to the
22176 current configuration.
22177
22178 Usage: $0 [OPTION]... [FILE]...
22179
22180   -h, --help       print this help, then exit
22181   -V, --version    print version number and configuration settings, then exit
22182   -q, --quiet, --silent
22183                    do not print progress messages
22184   -d, --debug      don't remove temporary files
22185       --recheck    update $as_me by reconfiguring in the same conditions
22186       --file=FILE[:TEMPLATE]
22187                    instantiate the configuration file FILE
22188       --header=FILE[:TEMPLATE]
22189                    instantiate the configuration header FILE
22190
22191 Configuration files:
22192 $config_files
22193
22194 Configuration headers:
22195 $config_headers
22196
22197 Configuration commands:
22198 $config_commands
22199
22200 Report bugs to <bug-autoconf@gnu.org>."
22201
22202 _ACEOF
22203 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22204 ac_cs_version="\\
22205 config.status
22206 configured by $0, generated by GNU Autoconf 2.63,
22207   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
22208
22209 Copyright (C) 2008 Free Software Foundation, Inc.
22210 This config.status script is free software; the Free Software Foundation
22211 gives unlimited permission to copy, distribute and modify it."
22212
22213 ac_pwd='$ac_pwd'
22214 srcdir='$srcdir'
22215 INSTALL='$INSTALL'
22216 test -n "\$AWK" || AWK=awk
22217 _ACEOF
22218
22219 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22220 # The default lists apply if the user does not specify any file.
22221 ac_need_defaults=:
22222 while test $# != 0
22223 do
22224   case $1 in
22225   --*=*)
22226     ac_option=`expr "X$1" : 'X\([^=]*\)='`
22227     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
22228     ac_shift=:
22229     ;;
22230   *)
22231     ac_option=$1
22232     ac_optarg=$2
22233     ac_shift=shift
22234     ;;
22235   esac
22236
22237   case $ac_option in
22238   # Handling of the options.
22239   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22240     ac_cs_recheck=: ;;
22241   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
22242     $as_echo "$ac_cs_version"; exit ;;
22243   --debug | --debu | --deb | --de | --d | -d )
22244     debug=: ;;
22245   --file | --fil | --fi | --f )
22246     $ac_shift
22247     case $ac_optarg in
22248     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22249     esac
22250     CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
22251     ac_need_defaults=false;;
22252   --header | --heade | --head | --hea )
22253     $ac_shift
22254     case $ac_optarg in
22255     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22256     esac
22257     CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
22258     ac_need_defaults=false;;
22259   --he | --h)
22260     # Conflict between --help and --header
22261     { $as_echo "$as_me: error: ambiguous option: $1
22262 Try \`$0 --help' for more information." >&2
22263    { (exit 1); exit 1; }; };;
22264   --help | --hel | -h )
22265     $as_echo "$ac_cs_usage"; exit ;;
22266   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22267   | -silent | --silent | --silen | --sile | --sil | --si | --s)
22268     ac_cs_silent=: ;;
22269
22270   # This is an error.
22271   -*) { $as_echo "$as_me: error: unrecognized option: $1
22272 Try \`$0 --help' for more information." >&2
22273    { (exit 1); exit 1; }; } ;;
22274
22275   *) ac_config_targets="$ac_config_targets $1"
22276      ac_need_defaults=false ;;
22277
22278   esac
22279   shift
22280 done
22281
22282 ac_configure_extra_args=
22283
22284 if $ac_cs_silent; then
22285   exec 6>/dev/null
22286   ac_configure_extra_args="$ac_configure_extra_args --silent"
22287 fi
22288
22289 _ACEOF
22290 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22291 if \$ac_cs_recheck; then
22292   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22293   shift
22294   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
22295   CONFIG_SHELL='$SHELL'
22296   export CONFIG_SHELL
22297   exec "\$@"
22298 fi
22299
22300 _ACEOF
22301 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22302 exec 5>>config.log
22303 {
22304   echo
22305   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22306 ## Running $as_me. ##
22307 _ASBOX
22308   $as_echo "$ac_log"
22309 } >&5
22310
22311 _ACEOF
22312 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22313 #
22314 # INIT-COMMANDS
22315 #
22316 INTLTOOL_PERL=${INTLTOOL_PERL}
22317
22318
22319 _ACEOF
22320
22321 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22322
22323 # Handling of arguments.
22324 for ac_config_target in $ac_config_targets
22325 do
22326   case $ac_config_target in
22327     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
22328     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
22329     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
22330     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22331     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
22332     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
22333     "driver/xscreensaver.pam") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.pam" ;;
22334     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
22335     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
22336     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
22337     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
22338
22339   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
22340 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22341    { (exit 1); exit 1; }; };;
22342   esac
22343 done
22344
22345
22346 # If the user did not use the arguments to specify the items to instantiate,
22347 # then the envvar interface is used.  Set only those that are not.
22348 # We use the long form for the default assignment because of an extremely
22349 # bizarre bug on SunOS 4.1.3.
22350 if $ac_need_defaults; then
22351   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22352   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22353   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22354 fi
22355
22356 # Have a temporary directory for convenience.  Make it in the build tree
22357 # simply because there is no reason against having it here, and in addition,
22358 # creating and moving files from /tmp can sometimes cause problems.
22359 # Hook for its removal unless debugging.
22360 # Note that there is a small window in which the directory will not be cleaned:
22361 # after its creation but before its name has been assigned to `$tmp'.
22362 $debug ||
22363 {
22364   tmp=
22365   trap 'exit_status=$?
22366   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
22367 ' 0
22368   trap '{ (exit 1); exit 1; }' 1 2 13 15
22369 }
22370 # Create a (secure) tmp directory for tmp files.
22371
22372 {
22373   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22374   test -n "$tmp" && test -d "$tmp"
22375 }  ||
22376 {
22377   tmp=./conf$$-$RANDOM
22378   (umask 077 && mkdir "$tmp")
22379 } ||
22380 {
22381    $as_echo "$as_me: cannot create a temporary directory in ." >&2
22382    { (exit 1); exit 1; }
22383 }
22384
22385 # Set up the scripts for CONFIG_FILES section.
22386 # No need to generate them if there are no CONFIG_FILES.
22387 # This happens for instance with `./config.status config.h'.
22388 if test -n "$CONFIG_FILES"; then
22389
22390
22391 ac_cr='\r'
22392 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22393 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22394   ac_cs_awk_cr='\\r'
22395 else
22396   ac_cs_awk_cr=$ac_cr
22397 fi
22398
22399 echo 'BEGIN {' >"$tmp/subs1.awk" &&
22400 _ACEOF
22401
22402
22403 {
22404   echo "cat >conf$$subs.awk <<_ACEOF" &&
22405   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22406   echo "_ACEOF"
22407 } >conf$$subs.sh ||
22408   { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
22409 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
22410    { (exit 1); exit 1; }; }
22411 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
22412 ac_delim='%!_!# '
22413 for ac_last_try in false false false false false :; do
22414   . ./conf$$subs.sh ||
22415     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
22416 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
22417    { (exit 1); exit 1; }; }
22418
22419   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22420   if test $ac_delim_n = $ac_delim_num; then
22421     break
22422   elif $ac_last_try; then
22423     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
22424 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
22425    { (exit 1); exit 1; }; }
22426   else
22427     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22428   fi
22429 done
22430 rm -f conf$$subs.sh
22431
22432 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22433 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
22434 _ACEOF
22435 sed -n '
22436 h
22437 s/^/S["/; s/!.*/"]=/
22438 p
22439 g
22440 s/^[^!]*!//
22441 :repl
22442 t repl
22443 s/'"$ac_delim"'$//
22444 t delim
22445 :nl
22446 h
22447 s/\(.\{148\}\).*/\1/
22448 t more1
22449 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22450 p
22451 n
22452 b repl
22453 :more1
22454 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22455 p
22456 g
22457 s/.\{148\}//
22458 t nl
22459 :delim
22460 h
22461 s/\(.\{148\}\).*/\1/
22462 t more2
22463 s/["\\]/\\&/g; s/^/"/; s/$/"/
22464 p
22465 b
22466 :more2
22467 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22468 p
22469 g
22470 s/.\{148\}//
22471 t delim
22472 ' <conf$$subs.awk | sed '
22473 /^[^""]/{
22474   N
22475   s/\n//
22476 }
22477 ' >>$CONFIG_STATUS || ac_write_fail=1
22478 rm -f conf$$subs.awk
22479 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22480 _ACAWK
22481 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
22482   for (key in S) S_is_set[key] = 1
22483   FS = "\a"
22484
22485 }
22486 {
22487   line = $ 0
22488   nfields = split(line, field, "@")
22489   substed = 0
22490   len = length(field[1])
22491   for (i = 2; i < nfields; i++) {
22492     key = field[i]
22493     keylen = length(key)
22494     if (S_is_set[key]) {
22495       value = S[key]
22496       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22497       len += length(value) + length(field[++i])
22498       substed = 1
22499     } else
22500       len += 1 + keylen
22501   }
22502
22503   print line
22504 }
22505
22506 _ACAWK
22507 _ACEOF
22508 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22509 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22510   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22511 else
22512   cat
22513 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
22514   || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
22515 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
22516    { (exit 1); exit 1; }; }
22517 _ACEOF
22518
22519 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22520 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22521 # trailing colons and then remove the whole line if VPATH becomes empty
22522 # (actually we leave an empty line to preserve line numbers).
22523 if test "x$srcdir" = x.; then
22524   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22525 s/:*\$(srcdir):*/:/
22526 s/:*\${srcdir}:*/:/
22527 s/:*@srcdir@:*/:/
22528 s/^\([^=]*=[     ]*\):*/\1/
22529 s/:*$//
22530 s/^[^=]*=[       ]*$//
22531 }'
22532 fi
22533
22534 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22535 fi # test -n "$CONFIG_FILES"
22536
22537 # Set up the scripts for CONFIG_HEADERS section.
22538 # No need to generate them if there are no CONFIG_HEADERS.
22539 # This happens for instance with `./config.status Makefile'.
22540 if test -n "$CONFIG_HEADERS"; then
22541 cat >"$tmp/defines.awk" <<\_ACAWK ||
22542 BEGIN {
22543 _ACEOF
22544
22545 # Transform confdefs.h into an awk script `defines.awk', embedded as
22546 # here-document in config.status, that substitutes the proper values into
22547 # config.h.in to produce config.h.
22548
22549 # Create a delimiter string that does not exist in confdefs.h, to ease
22550 # handling of long lines.
22551 ac_delim='%!_!# '
22552 for ac_last_try in false false :; do
22553   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
22554   if test -z "$ac_t"; then
22555     break
22556   elif $ac_last_try; then
22557     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
22558 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
22559    { (exit 1); exit 1; }; }
22560   else
22561     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22562   fi
22563 done
22564
22565 # For the awk script, D is an array of macro values keyed by name,
22566 # likewise P contains macro parameters if any.  Preserve backslash
22567 # newline sequences.
22568
22569 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22570 sed -n '
22571 s/.\{148\}/&'"$ac_delim"'/g
22572 t rset
22573 :rset
22574 s/^[     ]*#[    ]*define[       ][      ]*/ /
22575 t def
22576 d
22577 :def
22578 s/\\$//
22579 t bsnl
22580 s/["\\]/\\&/g
22581 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22582 D["\1"]=" \3"/p
22583 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
22584 d
22585 :bsnl
22586 s/["\\]/\\&/g
22587 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22588 D["\1"]=" \3\\\\\\n"\\/p
22589 t cont
22590 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22591 t cont
22592 d
22593 :cont
22594 n
22595 s/.\{148\}/&'"$ac_delim"'/g
22596 t clear
22597 :clear
22598 s/\\$//
22599 t bsnlc
22600 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22601 d
22602 :bsnlc
22603 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22604 b cont
22605 ' <confdefs.h | sed '
22606 s/'"$ac_delim"'/"\\\
22607 "/g' >>$CONFIG_STATUS || ac_write_fail=1
22608
22609 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22610   for (key in D) D_is_set[key] = 1
22611   FS = "\a"
22612 }
22613 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22614   line = \$ 0
22615   split(line, arg, " ")
22616   if (arg[1] == "#") {
22617     defundef = arg[2]
22618     mac1 = arg[3]
22619   } else {
22620     defundef = substr(arg[1], 2)
22621     mac1 = arg[2]
22622   }
22623   split(mac1, mac2, "(") #)
22624   macro = mac2[1]
22625   prefix = substr(line, 1, index(line, defundef) - 1)
22626   if (D_is_set[macro]) {
22627     # Preserve the white space surrounding the "#".
22628     print prefix "define", macro P[macro] D[macro]
22629     next
22630   } else {
22631     # Replace #undef with comments.  This is necessary, for example,
22632     # in the case of _POSIX_SOURCE, which is predefined and required
22633     # on some systems where configure will not decide to define it.
22634     if (defundef == "undef") {
22635       print "/*", prefix defundef, macro, "*/"
22636       next
22637     }
22638   }
22639 }
22640 { print }
22641 _ACAWK
22642 _ACEOF
22643 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22644   { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
22645 $as_echo "$as_me: error: could not setup config headers machinery" >&2;}
22646    { (exit 1); exit 1; }; }
22647 fi # test -n "$CONFIG_HEADERS"
22648
22649
22650 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
22651 shift
22652 for ac_tag
22653 do
22654   case $ac_tag in
22655   :[FHLC]) ac_mode=$ac_tag; continue;;
22656   esac
22657   case $ac_mode$ac_tag in
22658   :[FHL]*:*);;
22659   :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
22660 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
22661    { (exit 1); exit 1; }; };;
22662   :[FH]-) ac_tag=-:-;;
22663   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22664   esac
22665   ac_save_IFS=$IFS
22666   IFS=:
22667   set x $ac_tag
22668   IFS=$ac_save_IFS
22669   shift
22670   ac_file=$1
22671   shift
22672
22673   case $ac_mode in
22674   :L) ac_source=$1;;
22675   :[FH])
22676     ac_file_inputs=
22677     for ac_f
22678     do
22679       case $ac_f in
22680       -) ac_f="$tmp/stdin";;
22681       *) # Look for the file first in the build tree, then in the source tree
22682          # (if the path is not absolute).  The absolute path cannot be DOS-style,
22683          # because $ac_f cannot contain `:'.
22684          test -f "$ac_f" ||
22685            case $ac_f in
22686            [\\/$]*) false;;
22687            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22688            esac ||
22689            { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
22690 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
22691    { (exit 1); exit 1; }; };;
22692       esac
22693       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22694       ac_file_inputs="$ac_file_inputs '$ac_f'"
22695     done
22696
22697     # Let's still pretend it is `configure' which instantiates (i.e., don't
22698     # use $as_me), people would be surprised to read:
22699     #    /* config.h.  Generated by config.status.  */
22700     configure_input='Generated from '`
22701           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22702         `' by configure.'
22703     if test x"$ac_file" != x-; then
22704       configure_input="$ac_file.  $configure_input"
22705       { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
22706 $as_echo "$as_me: creating $ac_file" >&6;}
22707     fi
22708     # Neutralize special characters interpreted by sed in replacement strings.
22709     case $configure_input in #(
22710     *\&* | *\|* | *\\* )
22711        ac_sed_conf_input=`$as_echo "$configure_input" |
22712        sed 's/[\\\\&|]/\\\\&/g'`;; #(
22713     *) ac_sed_conf_input=$configure_input;;
22714     esac
22715
22716     case $ac_tag in
22717     *:-:* | *:-) cat >"$tmp/stdin" \
22718       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22719 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22720    { (exit 1); exit 1; }; } ;;
22721     esac
22722     ;;
22723   esac
22724
22725   ac_dir=`$as_dirname -- "$ac_file" ||
22726 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22727          X"$ac_file" : 'X\(//\)[^/]' \| \
22728          X"$ac_file" : 'X\(//\)$' \| \
22729          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22730 $as_echo X"$ac_file" |
22731     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22732             s//\1/
22733             q
22734           }
22735           /^X\(\/\/\)[^/].*/{
22736             s//\1/
22737             q
22738           }
22739           /^X\(\/\/\)$/{
22740             s//\1/
22741             q
22742           }
22743           /^X\(\/\).*/{
22744             s//\1/
22745             q
22746           }
22747           s/.*/./; q'`
22748   { as_dir="$ac_dir"
22749   case $as_dir in #(
22750   -*) as_dir=./$as_dir;;
22751   esac
22752   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
22753     as_dirs=
22754     while :; do
22755       case $as_dir in #(
22756       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
22757       *) as_qdir=$as_dir;;
22758       esac
22759       as_dirs="'$as_qdir' $as_dirs"
22760       as_dir=`$as_dirname -- "$as_dir" ||
22761 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22762          X"$as_dir" : 'X\(//\)[^/]' \| \
22763          X"$as_dir" : 'X\(//\)$' \| \
22764          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
22765 $as_echo X"$as_dir" |
22766     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22767             s//\1/
22768             q
22769           }
22770           /^X\(\/\/\)[^/].*/{
22771             s//\1/
22772             q
22773           }
22774           /^X\(\/\/\)$/{
22775             s//\1/
22776             q
22777           }
22778           /^X\(\/\).*/{
22779             s//\1/
22780             q
22781           }
22782           s/.*/./; q'`
22783       test -d "$as_dir" && break
22784     done
22785     test -z "$as_dirs" || eval "mkdir $as_dirs"
22786   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
22787 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
22788    { (exit 1); exit 1; }; }; }
22789   ac_builddir=.
22790
22791 case "$ac_dir" in
22792 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22793 *)
22794   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22795   # A ".." for each directory in $ac_dir_suffix.
22796   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22797   case $ac_top_builddir_sub in
22798   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22799   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22800   esac ;;
22801 esac
22802 ac_abs_top_builddir=$ac_pwd
22803 ac_abs_builddir=$ac_pwd$ac_dir_suffix
22804 # for backward compatibility:
22805 ac_top_builddir=$ac_top_build_prefix
22806
22807 case $srcdir in
22808   .)  # We are building in place.
22809     ac_srcdir=.
22810     ac_top_srcdir=$ac_top_builddir_sub
22811     ac_abs_top_srcdir=$ac_pwd ;;
22812   [\\/]* | ?:[\\/]* )  # Absolute name.
22813     ac_srcdir=$srcdir$ac_dir_suffix;
22814     ac_top_srcdir=$srcdir
22815     ac_abs_top_srcdir=$srcdir ;;
22816   *) # Relative name.
22817     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22818     ac_top_srcdir=$ac_top_build_prefix$srcdir
22819     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22820 esac
22821 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22822
22823
22824   case $ac_mode in
22825   :F)
22826   #
22827   # CONFIG_FILE
22828   #
22829
22830   case $INSTALL in
22831   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22832   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
22833   esac
22834 _ACEOF
22835
22836 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22837 # If the template does not know about datarootdir, expand it.
22838 # FIXME: This hack should be removed a few years after 2.60.
22839 ac_datarootdir_hack=; ac_datarootdir_seen=
22840
22841 ac_sed_dataroot='
22842 /datarootdir/ {
22843   p
22844   q
22845 }
22846 /@datadir@/p
22847 /@docdir@/p
22848 /@infodir@/p
22849 /@localedir@/p
22850 /@mandir@/p
22851 '
22852 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22853 *datarootdir*) ac_datarootdir_seen=yes;;
22854 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22855   { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22856 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22857 _ACEOF
22858 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22859   ac_datarootdir_hack='
22860   s&@datadir@&$datadir&g
22861   s&@docdir@&$docdir&g
22862   s&@infodir@&$infodir&g
22863   s&@localedir@&$localedir&g
22864   s&@mandir@&$mandir&g
22865     s&\\\${datarootdir}&$datarootdir&g' ;;
22866 esac
22867 _ACEOF
22868
22869 # Neutralize VPATH when `$srcdir' = `.'.
22870 # Shell code in configure.ac might set extrasub.
22871 # FIXME: do we really want to maintain this feature?
22872 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22873 ac_sed_extra="$ac_vpsub
22874 $extrasub
22875 _ACEOF
22876 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22877 :t
22878 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22879 s|@configure_input@|$ac_sed_conf_input|;t t
22880 s&@top_builddir@&$ac_top_builddir_sub&;t t
22881 s&@top_build_prefix@&$ac_top_build_prefix&;t t
22882 s&@srcdir@&$ac_srcdir&;t t
22883 s&@abs_srcdir@&$ac_abs_srcdir&;t t
22884 s&@top_srcdir@&$ac_top_srcdir&;t t
22885 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22886 s&@builddir@&$ac_builddir&;t t
22887 s&@abs_builddir@&$ac_abs_builddir&;t t
22888 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22889 s&@INSTALL@&$ac_INSTALL&;t t
22890 $ac_datarootdir_hack
22891 "
22892 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
22893   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22894 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22895    { (exit 1); exit 1; }; }
22896
22897 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22898   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
22899   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
22900   { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22901 which seems to be undefined.  Please make sure it is defined." >&5
22902 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22903 which seems to be undefined.  Please make sure it is defined." >&2;}
22904
22905   rm -f "$tmp/stdin"
22906   case $ac_file in
22907   -) cat "$tmp/out" && rm -f "$tmp/out";;
22908   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
22909   esac \
22910   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22911 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22912    { (exit 1); exit 1; }; }
22913  ;;
22914   :H)
22915   #
22916   # CONFIG_HEADER
22917   #
22918   if test x"$ac_file" != x-; then
22919     {
22920       $as_echo "/* $configure_input  */" \
22921       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
22922     } >"$tmp/config.h" \
22923       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22924 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22925    { (exit 1); exit 1; }; }
22926     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
22927       { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22928 $as_echo "$as_me: $ac_file is unchanged" >&6;}
22929     else
22930       rm -f "$ac_file"
22931       mv "$tmp/config.h" "$ac_file" \
22932         || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
22933 $as_echo "$as_me: error: could not create $ac_file" >&2;}
22934    { (exit 1); exit 1; }; }
22935     fi
22936   else
22937     $as_echo "/* $configure_input  */" \
22938       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
22939       || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
22940 $as_echo "$as_me: error: could not create -" >&2;}
22941    { (exit 1); exit 1; }; }
22942   fi
22943  ;;
22944
22945   :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
22946 $as_echo "$as_me: executing $ac_file commands" >&6;}
22947  ;;
22948   esac
22949
22950
22951   case $ac_file$ac_mode in
22952     "default-1":C)
22953
22954 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
22955 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
22956   rm -f intltool-extract.out
22957 else
22958   mv -f intltool-extract.out intltool-extract
22959 fi
22960 chmod ugo+x intltool-extract
22961 chmod u+w intltool-extract
22962
22963 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
22964 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
22965   rm -f intltool-merge.out
22966 else
22967   mv -f intltool-merge.out intltool-merge
22968 fi
22969 chmod ugo+x intltool-merge
22970 chmod u+w intltool-merge
22971
22972 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
22973 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
22974   rm -f intltool-update.out
22975 else
22976   mv -f intltool-update.out intltool-update
22977 fi
22978 chmod ugo+x intltool-update
22979 chmod u+w intltool-update
22980
22981  ;;
22982     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
22983         rm -f po/stamp-it po/stamp-it.tmp
22984         > po/stamp-it.tmp
22985         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
22986         mv po/stamp-it.tmp po/stamp-it
22987       esac ;;
22988
22989   esac
22990 done # for ac_tag
22991
22992
22993 { (exit 0); exit 0; }
22994 _ACEOF
22995 chmod +x $CONFIG_STATUS
22996 ac_clean_files=$ac_clean_files_save
22997
22998 test $ac_write_fail = 0 ||
22999   { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
23000 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
23001    { (exit 1); exit 1; }; }
23002
23003
23004 # configure is writing to config.log, and then calls config.status.
23005 # config.status does its own redirection, appending to config.log.
23006 # Unfortunately, on DOS this fails, as config.log is still kept open
23007 # by configure, so config.status won't be able to write to it; its
23008 # output is simply discarded.  So we exec the FD to /dev/null,
23009 # effectively closing config.log, so it can be properly (re)opened and
23010 # appended to by config.status.  When coming back to configure, we
23011 # need to make the FD available again.
23012 if test "$no_create" != yes; then
23013   ac_cs_success=:
23014   ac_config_status_args=
23015   test "$silent" = yes &&
23016     ac_config_status_args="$ac_config_status_args --quiet"
23017   exec 5>/dev/null
23018   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23019   exec 5>>config.log
23020   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23021   # would make configure fail if this is the last instruction.
23022   $ac_cs_success || { (exit 1); exit 1; }
23023 fi
23024 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
23025   { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
23026 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
23027 fi
23028
23029
23030 ###############################################################################
23031 #
23032 #       Print some warnings at the end.
23033 #
23034 ###############################################################################
23035
23036 warn_prefix_1="    Warning:"
23037 warn_prefix_2="       Note:"
23038 warn_prefix="$warn_prefix_1"
23039
23040 warning=no
23041 warnsep='    #################################################################'
23042
23043 warnpre() {
23044   if test "$warning" = no ; then
23045     echo '' ; echo "$warnsep" ; echo ''
23046     warning=yes
23047   fi
23048 }
23049
23050 warn() {
23051   warnpre
23052   if test "$warning" = long ; then echo '' ; fi
23053   warning=yes
23054   rest="$@"
23055   echo "$warn_prefix $rest"
23056 }
23057
23058 warnL() {
23059   was=$warning
23060   warnpre
23061   warning=yes
23062   if test "$was" != no ; then echo '' ; fi
23063   rest="$@"
23064   echo "$warn_prefix $rest"
23065 }
23066
23067 warn2() {
23068   rest="$@"
23069   echo "             $rest"
23070   warning=long
23071 }
23072
23073 note() {
23074   warn_prefix="$warn_prefix_2"
23075   warn $@
23076   warn_prefix="$warn_prefix_1"
23077 }
23078
23079 noteL() {
23080   warn_prefix="$warn_prefix_2"
23081   warnL $@
23082   warn_prefix="$warn_prefix_1"
23083 }
23084
23085
23086 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
23087   warn 'The SGI saver extension was requested, but was not found.'
23088 fi
23089
23090 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
23091   warn 'The XIdle extension was requested, but was not found.'
23092 fi
23093
23094 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
23095   warn 'The XSHM extension was requested, but was not found.'
23096 fi
23097
23098 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
23099   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
23100 fi
23101
23102 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
23103   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
23104 fi
23105
23106 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
23107   warn 'The DPMS extension was requested, but was not found.'
23108 fi
23109
23110 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
23111   warn 'The Xinerama extension was requested, but was not found.'
23112 fi
23113
23114 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
23115   warn 'The XF86VMODE extension was requested, but was not found.'
23116 fi
23117
23118 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
23119   warn 'The RANDR extension was requested, but was not found.'
23120 fi
23121
23122 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
23123   warn "Checking of /proc/interrupts was requested, but it's bogus."
23124 fi
23125
23126 if test "$pkg_config" = false ; then
23127   warnL 'The "pkg-config" program was not found.  Without that,'
23128   warn2 "detection of the various GTK libraries won't work."
23129 else
23130   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
23131   if test "x$pkgerr" != "x" ; then
23132     warnL 'The "pkg-config" program produces errors.  This often causes'
23133     warn2 "detection of the various GTK libraries to malfunction."
23134     warn2 "The errors are:"
23135     echo ''
23136     echo "$pkgerr" | sed 's/^/             > /g'
23137   fi
23138 fi
23139
23140 if test "$gtk_halfassed" != no ; then
23141   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
23142   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
23143   warn2 "Perhaps some of the development packages are not installed?"
23144   if test "$have_gtk" = yes ; then
23145     v="$ac_gtk_version_string"
23146     warn2 "GTK $v is also installed, so it will be used instead."
23147     warn2 "Please read the above output and the \`config.log' file"
23148     warn2 "for more details."
23149   fi
23150 fi
23151
23152 motif_warn2() {
23153   warn2 'Though the Motif front-end to xscreensaver is still'
23154   warn2 'maintained, it is no longer being updated with new'
23155   warn2 'features: all new development on the xscreensaver-demo'
23156   warn2 'program is happening in the GTK version, and not in the'
23157   warn2 'Motif version.  It is recommended that you build against'
23158   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
23159 }
23160
23161 if test "$have_motif" = no -a "$have_gtk" = no; then
23162
23163   if test "$with_motif" = yes; then
23164     warnL "Neither the GTK nor Motif libraries were found; the"
23165     warn2 "\`xscreensaver-demo' program requires one of these."
23166     echo ''
23167     motif_warn2
23168   else
23169     warnL "The GTK libraries do not seem to be available; the"
23170     warn2 "\`xscreensaver-demo' program requires them."
23171 #   echo ''
23172 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
23173 #   warn2 "\`--with-motif' option) but that is NOT recommended."
23174 #   motif_warn2
23175   fi
23176
23177 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
23178   warnL "Use of Motif was requested, but it wasn't found;"
23179   warn2 "Gtk will be used instead."
23180
23181 elif test "$jurassic_gtk" = yes ; then
23182
23183   pref_gtk=2.0
23184
23185   v="$ac_gtk_version_string"
23186   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
23187     warnL "Use of Gtk was requested, but its version number is unknown;"
23188   elif test "$with_gtk_req" = yes ; then
23189     warnL "Use of Gtk was requested, but it is version $v;"
23190   else
23191     warnL "Gtk was found on this system, but it is version $v;"
23192   fi
23193
23194   warn2 "Gtk $pref_gtk or newer is required."
23195
23196 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
23197   warnL "Use of Gtk was requested, but it wasn't found."
23198 fi
23199
23200
23201 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
23202   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
23203   warn2 "headers were not found.  That can't be good.  Please"
23204   warn2 "install the GDK-Pixbuf development kit and re-configure."
23205 fi
23206
23207 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
23208
23209   preferred_lesstif=0.92
23210
23211   if test "$lesstif_version" = unknown; then
23212     warnL "Unable to determine the LessTif version number!"
23213     warn2 "Make sure you are using version $preferred_lesstif or newer."
23214     warn2 "See <http://www.lesstif.org/>."
23215
23216   elif test \! $lesstif_version -gt 82; then
23217     warnL "LessTif version $lesstif_version_string is being used."
23218     warn2 "LessTif versions 0.82 and earlier are too buggy to"
23219     warn2 "use with XScreenSaver; it is strongly recommended"
23220     warn2 "that you upgrade to at least version $preferred_lesstif!"
23221     warn2 "See <http://www.lesstif.org/>."
23222   fi
23223 fi
23224
23225
23226 if test "$have_motif" = yes -a "$have_gtk" = no ; then
23227   warn  'Motif is being used, and GTK is not.'
23228   echo  ''
23229   motif_warn2
23230 fi
23231
23232
23233 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
23234   warnL 'Use of XPM was requested, but it was not found.'
23235 fi
23236
23237 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
23238   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
23239 fi
23240
23241 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
23242    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
23243
23244   if test "$with_gdk_pixbuf_req" = yes ; then
23245     true
23246   elif test "$with_gdk_pixbuf_req" = no ; then
23247     warnL 'The GDK-Pixbuf library is not being used.'
23248   else
23249     warnL 'The GDK-Pixbuf library was not found.'
23250   fi
23251
23252   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
23253     true
23254   elif test "$with_xpm_req" = no ; then
23255     warnL 'The XPM library is not being used.'
23256   else
23257     warnL 'The XPM library was not found.'
23258   fi
23259
23260   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
23261     warn2 'The XPM library is being used instead.'
23262   fi
23263
23264   if test "$gdk_pixbuf_halfassed" = yes ; then
23265     echo ''
23266     warn2 'More specifically, we found the headers, but not the'
23267     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
23268     warn2 "system, or something else went wrong.  The \`config.log'"
23269     warn2 'file might contain some clues.'
23270   fi
23271
23272   echo ''
23273   warn2 'Some of the demos will not use images as much as they could.'
23274   warn2 'You should consider installing GDK-Pixbuf and re-running'
23275   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
23276   warn2 'provides support for more image formats.)'
23277 fi
23278
23279
23280 if test "$have_jpeg" = no ; then
23281   if test "$with_jpeg_req" = yes ; then
23282     warnL 'Use of libjpeg was requested, but it was not found.'
23283   elif test "$with_jpeg_req" = no ; then
23284     noteL 'The JPEG library is not being used.'
23285   else
23286     noteL 'The JPEG library was not found.'
23287   fi
23288
23289   if test "$jpeg_halfassed" = yes ; then
23290     echo ''
23291     warn2 'More specifically, we found the headers, but not the'
23292     warn2 'library; so either JPEG is half-installed on this'
23293     warn2 "system, or something else went wrong.  The \`config.log'"
23294     warn2 'file might contain some clues.'
23295     echo ''
23296   fi
23297
23298   if test "$have_gdk_pixbuf" = no ; then
23299     warn2 "This means that it won't be possible for the image-manipulating"
23300     warn2 "display modes to load files from disk; and it also means that"
23301     warn2 "the \`webcollage' program will be much slower."
23302   else
23303     warn2 "This means the \`webcollage' program will be much slower."
23304   fi
23305 fi
23306
23307
23308 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
23309   preferred_mesagl=3.4
23310   mgv="$ac_mesagl_version_string"
23311   pgl="$preferred_mesagl"
23312
23313   if test "$ac_mesagl_version" = unknown; then
23314     true
23315     # warnL "Unable to determine the MesaGL version number!"
23316     # warn2 "Make sure you are using version $preferred_mesagl or newer."
23317
23318   elif test \! "$ac_mesagl_version" -gt 2006; then
23319     warnL "MesaGL version number is $mgv --"
23320     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
23321     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
23322
23323   elif test \! "$ac_mesagl_version" -gt 3003; then
23324     warnL "MesaGL version number is $mgv --"
23325     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
23326     warn2 "that you upgrade to $pgl or newer."
23327   fi
23328 fi
23329
23330 if test "$have_gl" = no ; then
23331   if test "$with_gl_req" = yes ; then
23332     warnL 'Use of GL was requested, but it was not found.'
23333   elif test "$with_gl_req" = no ; then
23334     noteL 'The OpenGL 3D library is not being used.'
23335   else
23336     noteL 'The OpenGL 3D library was not found.'
23337   fi
23338
23339   if test "$gl_halfassed" = yes ; then
23340     echo ''
23341     warn2 'More specifically, we found the headers, but not the'
23342     warn2 'libraries; so either GL is half-installed on this'
23343     warn2 "system, or something else went wrong.  The \`config.log'"
23344     warn2 'file might contain some clues.'
23345   fi
23346
23347   echo ''
23348   warn2 'Those demos which use 3D will not be built or installed.'
23349   warn2 'You might want to consider installing OpenGL and'
23350   warn2 "re-running configure.  If your vendor doesn't ship"
23351   warn2 'their own implementation of OpenGL, you can get a free'
23352   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
23353   warn2 'info, see <http://www.opengl.org/>.'
23354
23355 fi
23356
23357
23358 if test "$have_gl" = yes -a "$have_gle" = no ; then
23359
23360  # nobody cares about this; don't print the warning unless it was
23361  # requested and not found, or halfway-found.
23362  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
23363
23364   if test "$with_gle_req" = yes ; then
23365     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
23366     warn2 'it was not found (though the OpenGL library was found, and'
23367     warn2 'is being used.)'
23368   elif test "$with_gle_req" = no ; then
23369     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
23370     warn2 'library is not.'
23371   else
23372     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
23373     warn2 'was not.'
23374   fi
23375
23376   if test "$gle_halfassed" = yes ; then
23377     echo ''
23378     warn2 'More specifically, we found the headers, but not the'
23379     warn2 'libraries; so either GLE is half-installed on this'
23380     warn2 "system, or something else went wrong.  The \`config.log'"
23381     warn2 'file might contain some clues.'
23382   fi
23383
23384   echo ''
23385   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
23386   warn2 'will not be built or installed.  You might want to consider'
23387   warn2 'installing GLE and re-running configure.  You can find the'
23388   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
23389   warn2 'OpenGL info, see <http://www.opengl.org/>.'
23390
23391  fi
23392 fi
23393
23394
23395 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
23396   warn 'Use of XReadDisplay was requested, but it was not found.'
23397 fi
23398
23399 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
23400   warn 'Use of Kerberos was requested, but it was not found.'
23401 fi
23402
23403 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
23404   warn 'Use of PAM was requested, but it was not found.'
23405 fi
23406
23407 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
23408   warn 'Use of shadow passwords was requested, but they were not found.'
23409 fi
23410
23411 if test "$ac_macosx" = yes ; then
23412   if test "$enable_locking" = yes ; then
23413     warn  "You have specified --enable-locking on MacOS X."
23414     warn2 "THIS DOES NOT WORK!  Don't do this!"
23415   fi
23416 fi
23417
23418
23419 # You are in a twisty maze of namespaces and syntaxes, all alike.
23420 # Fuck the skull of Unix.
23421 #
23422 bindir=`eval eval eval eval eval eval eval echo $bindir`
23423 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
23424 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
23425
23426 # canonicalize slashes.
23427 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
23428 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
23429 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
23430
23431
23432 # Sanity check the hackdir
23433 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
23434   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
23435     echo ""
23436     { { $as_echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
23437                    There will be an executable installed with that name, so
23438                    that can't be the name of a directory as well.  Please
23439                    re-configure with a different directory name." >&5
23440 $as_echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
23441                    There will be an executable installed with that name, so
23442                    that can't be the name of a directory as well.  Please
23443                    re-configure with a different directory name." >&2;}
23444    { (exit 1); exit 1; }; }
23445   fi
23446 done
23447
23448
23449 do_dir_warning=no
23450
23451 # Now let's warn if there's a previous RPM version already installed.
23452 # But don't bother with this test if we are currently *building* an RPM.
23453
23454 if test -z "$RPM_PACKAGE_VERSION" ; then
23455
23456   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
23457
23458   # M4 sucks!!
23459
23460   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
23461         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
23462         head -1`
23463
23464
23465   if test \! -z "$rpmv" ; then
23466     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
23467     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
23468
23469     warning=no
23470     warnL "There is already an installed RPM of xscreensaver $rpmv"
23471     warn2 'on this system.  You might want to remove it ("rpm -ve")'
23472     warn2 'before running "make install" in this directory.'
23473     echo ""
23474     warn2 "Alternately, you could build this version of xscreensaver"
23475     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
23476     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
23477     warn2 "See the RPM documentation for more info."
23478     echo ""
23479
23480     if test "$rpmbdir" = "$rpmhdir" ; then
23481       warn2 "The RPM version was installed in $rpmbdir/."
23482       do_dir_warning=yes
23483     else
23484       warn2 "The RPM version was installed in $rpmbdir/,"
23485       warn2 "with demos in $rpmhdir/."
23486     fi
23487   fi
23488 fi
23489
23490 # Also warn if there's a Debian package installed.
23491 #
23492 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
23493 debv=''
23494 for dpkg in $debnames ; do
23495   if test -z "$debv"; then
23496     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
23497   fi
23498 done
23499
23500 if test \! -z "$debv" ; then
23501   debbdir=`dpkg -L $debnames 2>/dev/null | \
23502             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
23503   debhdir=`dpkg -L $debnames 2>/dev/null | \
23504             sed -n 's@^\(.*/\)popsquares$@\1@p'`
23505   if test -z "$debbdir" ; then debbdir='???'; fi
23506   if test -z "$debhdir" ; then debhdir='???'; fi
23507
23508   warning=no
23509   warnL "There is already an installed dpkg of xscreensaver"
23510   warn2 "version \"$debv\" on this system."
23511   echo ""
23512   warn2 "The dpkg was installed in $debbdir,"
23513   warn2 "with demos in $debhdir."
23514 fi
23515
23516
23517 if test "${bindir}" = "${HACKDIR}" ; then
23518   do_dir_warning=yes
23519 fi
23520
23521 if test "$do_dir_warning" = yes; then
23522   echo ""
23523   echo "$warnsep"
23524   echo ""
23525   echo '      When you run "make install", the "xscreensaver",'
23526   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
23527   echo "      will be installed in ${bindir}/."
23528   echo ""
23529   echo "      The various graphics demos (190+ different executables) will"
23530   echo "      be installed in ${HACKDIR}/."
23531   echo ""
23532   echo "      If you would prefer the demos to be installed elsewhere,"
23533   echo "      you should re-run configure with the --with-hackdir=DIR"
23534   echo "      option.  For more information, run \`./configure --help'."
23535   warning=yes
23536 fi
23537
23538 if test "$warning" != no; then
23539   echo '' ; echo "$warnsep" ; echo ''
23540 fi
23541
23542 if test "$do_dir_warning" = no; then
23543   if test "$warning" = no; then
23544     echo ''
23545   fi
23546   echo "User programs will be installed in ${bindir}/"
23547   echo "Screen savers will be installed in ${HACKDIR}/"
23548   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
23549   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
23550   echo ''
23551 fi