http://ftp.nluug.nl/pub/os/Linux/distr/pardusrepo/sources/xscreensaver-5.02.tar.gz
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.60.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006 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 Bourne compatible
14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15   emulate sh
16   NULLCMD=:
17   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18   # is contrary to our usage.  Disable this feature.
19   alias -g '${1+"$@"}'='"$@"'
20   setopt NO_GLOB_SUBST
21 else
22   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
23 fi
24 BIN_SH=xpg4; export BIN_SH # for Tru64
25 DUALCASE=1; export DUALCASE # for MKS sh
26
27
28 # PATH needs CR
29 # Avoid depending upon Character Ranges.
30 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33 as_cr_digits='0123456789'
34 as_cr_alnum=$as_cr_Letters$as_cr_digits
35
36 # The user is always right.
37 if test "${PATH_SEPARATOR+set}" != set; then
38   echo "#! /bin/sh" >conf$$.sh
39   echo  "exit 0"   >>conf$$.sh
40   chmod +x conf$$.sh
41   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
42     PATH_SEPARATOR=';'
43   else
44     PATH_SEPARATOR=:
45   fi
46   rm -f conf$$.sh
47 fi
48
49 # Support unset when possible.
50 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
51   as_unset=unset
52 else
53   as_unset=false
54 fi
55
56
57 # IFS
58 # We need space, tab and new line, in precisely that order.  Quoting is
59 # there to prevent editors from complaining about space-tab.
60 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
61 # splitting by setting IFS to empty value.)
62 as_nl='
63 '
64 IFS=" ""        $as_nl"
65
66 # Find who we are.  Look in the path if we contain no directory separator.
67 case $0 in
68   *[\\/]* ) as_myself=$0 ;;
69   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
70 for as_dir in $PATH
71 do
72   IFS=$as_save_IFS
73   test -z "$as_dir" && as_dir=.
74   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
75 done
76 IFS=$as_save_IFS
77
78      ;;
79 esac
80 # We did not find ourselves, most probably we were run as `sh COMMAND'
81 # in which case we are not to be found in the path.
82 if test "x$as_myself" = x; then
83   as_myself=$0
84 fi
85 if test ! -f "$as_myself"; then
86   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
87   { (exit 1); exit 1; }
88 fi
89
90 # Work around bugs in pre-3.0 UWIN ksh.
91 for as_var in ENV MAIL MAILPATH
92 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
93 done
94 PS1='$ '
95 PS2='> '
96 PS4='+ '
97
98 # NLS nuisances.
99 for as_var in \
100   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
101   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
102   LC_TELEPHONE LC_TIME
103 do
104   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
105     eval $as_var=C; export $as_var
106   else
107     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
108   fi
109 done
110
111 # Required to use basename.
112 if expr a : '\(a\)' >/dev/null 2>&1 &&
113    test "X`expr 00001 : '.*\(...\)'`" = X001; then
114   as_expr=expr
115 else
116   as_expr=false
117 fi
118
119 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
120   as_basename=basename
121 else
122   as_basename=false
123 fi
124
125
126 # Name of the executable.
127 as_me=`$as_basename -- "$0" ||
128 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
129          X"$0" : 'X\(//\)$' \| \
130          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
131 echo X/"$0" |
132     sed '/^.*\/\([^/][^/]*\)\/*$/{
133             s//\1/
134             q
135           }
136           /^X\/\(\/\/\)$/{
137             s//\1/
138             q
139           }
140           /^X\/\(\/\).*/{
141             s//\1/
142             q
143           }
144           s/.*/./; q'`
145
146 # CDPATH.
147 $as_unset CDPATH
148
149
150 if test "x$CONFIG_SHELL" = x; then
151   if (eval ":") 2>/dev/null; then
152   as_have_required=yes
153 else
154   as_have_required=no
155 fi
156
157   if test $as_have_required = yes &&     (eval ":
158 (as_func_return () {
159   (exit \$1)
160 }
161 as_func_success () {
162   as_func_return 0
163 }
164 as_func_failure () {
165   as_func_return 1
166 }
167 as_func_ret_success () {
168   return 0
169 }
170 as_func_ret_failure () {
171   return 1
172 }
173
174 exitcode=0
175 if as_func_success; then
176   :
177 else
178   exitcode=1
179   echo as_func_success failed.
180 fi
181
182 if as_func_failure; then
183   exitcode=1
184   echo as_func_failure succeeded.
185 fi
186
187 if as_func_ret_success; then
188   :
189 else
190   exitcode=1
191   echo as_func_ret_success failed.
192 fi
193
194 if as_func_ret_failure; then
195   exitcode=1
196   echo as_func_ret_failure succeeded.
197 fi
198
199 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
200   :
201 else
202   exitcode=1
203   echo positional parameters were not saved.
204 fi
205
206 test \$exitcode = 0) || { (exit 1); exit 1; }
207
208 (
209   as_lineno_1=\$LINENO
210   as_lineno_2=\$LINENO
211   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
212   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
213 ") 2> /dev/null; then
214   :
215 else
216   as_candidate_shells=
217     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
218 for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219 do
220   IFS=$as_save_IFS
221   test -z "$as_dir" && as_dir=.
222   case $as_dir in
223          /*)
224            for as_base in sh bash ksh sh5; do
225              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
226            done;;
227        esac
228 done
229 IFS=$as_save_IFS
230
231
232       for as_shell in $as_candidate_shells $SHELL; do
233          # Try only shells that exist, to save several forks.
234          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
235                 { ("$as_shell") 2> /dev/null <<\_ASEOF
236 # Be Bourne compatible
237 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
238   emulate sh
239   NULLCMD=:
240   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
241   # is contrary to our usage.  Disable this feature.
242   alias -g '${1+"$@"}'='"$@"'
243   setopt NO_GLOB_SUBST
244 else
245   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
246 fi
247 BIN_SH=xpg4; export BIN_SH # for Tru64
248 DUALCASE=1; export DUALCASE # for MKS sh
249
250 :
251 _ASEOF
252 }; then
253   CONFIG_SHELL=$as_shell
254                as_have_required=yes
255                if { "$as_shell" 2> /dev/null <<\_ASEOF
256 # Be Bourne compatible
257 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
258   emulate sh
259   NULLCMD=:
260   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
261   # is contrary to our usage.  Disable this feature.
262   alias -g '${1+"$@"}'='"$@"'
263   setopt NO_GLOB_SUBST
264 else
265   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
266 fi
267 BIN_SH=xpg4; export BIN_SH # for Tru64
268 DUALCASE=1; export DUALCASE # for MKS sh
269
270 :
271 (as_func_return () {
272   (exit $1)
273 }
274 as_func_success () {
275   as_func_return 0
276 }
277 as_func_failure () {
278   as_func_return 1
279 }
280 as_func_ret_success () {
281   return 0
282 }
283 as_func_ret_failure () {
284   return 1
285 }
286
287 exitcode=0
288 if as_func_success; then
289   :
290 else
291   exitcode=1
292   echo as_func_success failed.
293 fi
294
295 if as_func_failure; then
296   exitcode=1
297   echo as_func_failure succeeded.
298 fi
299
300 if as_func_ret_success; then
301   :
302 else
303   exitcode=1
304   echo as_func_ret_success failed.
305 fi
306
307 if as_func_ret_failure; then
308   exitcode=1
309   echo as_func_ret_failure succeeded.
310 fi
311
312 if ( set x; as_func_ret_success y && test x = "$1" ); then
313   :
314 else
315   exitcode=1
316   echo positional parameters were not saved.
317 fi
318
319 test $exitcode = 0) || { (exit 1); exit 1; }
320
321 (
322   as_lineno_1=$LINENO
323   as_lineno_2=$LINENO
324   test "x$as_lineno_1" != "x$as_lineno_2" &&
325   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
326
327 _ASEOF
328 }; then
329   break
330 fi
331
332 fi
333
334       done
335
336       if test "x$CONFIG_SHELL" != x; then
337   for as_var in BASH_ENV ENV
338         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
339         done
340         export CONFIG_SHELL
341         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
342 fi
343
344
345     if test $as_have_required = no; then
346   echo This script requires a shell more modern than all the
347       echo shells that I found on your system.  Please install a
348       echo modern shell, or manually run the script under such a
349       echo shell if you do have one.
350       { (exit 1); exit 1; }
351 fi
352
353
354 fi
355
356 fi
357
358
359
360 (eval "as_func_return () {
361   (exit \$1)
362 }
363 as_func_success () {
364   as_func_return 0
365 }
366 as_func_failure () {
367   as_func_return 1
368 }
369 as_func_ret_success () {
370   return 0
371 }
372 as_func_ret_failure () {
373   return 1
374 }
375
376 exitcode=0
377 if as_func_success; then
378   :
379 else
380   exitcode=1
381   echo as_func_success failed.
382 fi
383
384 if as_func_failure; then
385   exitcode=1
386   echo as_func_failure succeeded.
387 fi
388
389 if as_func_ret_success; then
390   :
391 else
392   exitcode=1
393   echo as_func_ret_success failed.
394 fi
395
396 if as_func_ret_failure; then
397   exitcode=1
398   echo as_func_ret_failure succeeded.
399 fi
400
401 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
402   :
403 else
404   exitcode=1
405   echo positional parameters were not saved.
406 fi
407
408 test \$exitcode = 0") || {
409   echo No shell found that supports shell functions.
410   echo Please tell autoconf@gnu.org about your system,
411   echo including any error possibly output before this
412   echo message
413 }
414
415
416
417   as_lineno_1=$LINENO
418   as_lineno_2=$LINENO
419   test "x$as_lineno_1" != "x$as_lineno_2" &&
420   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
421
422   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
423   # uniformly replaced by the line number.  The first 'sed' inserts a
424   # line-number line after each line using $LINENO; the second 'sed'
425   # does the real work.  The second script uses 'N' to pair each
426   # line-number line with the line containing $LINENO, and appends
427   # trailing '-' during substitution so that $LINENO is not a special
428   # case at line end.
429   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
430   # scripts with optimization help from Paolo Bonzini.  Blame Lee
431   # E. McMahon (1931-1989) for sed's syntax.  :-)
432   sed -n '
433     p
434     /[$]LINENO/=
435   ' <$as_myself |
436     sed '
437       s/[$]LINENO.*/&-/
438       t lineno
439       b
440       :lineno
441       N
442       :loop
443       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
444       t loop
445       s/-\n.*//
446     ' >$as_me.lineno &&
447   chmod +x "$as_me.lineno" ||
448     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
449    { (exit 1); exit 1; }; }
450
451   # Don't try to exec as it changes $[0], causing all sort of problems
452   # (the dirname of $[0] is not the place where we might find the
453   # original and so on.  Autoconf is especially sensitive to this).
454   . "./$as_me.lineno"
455   # Exit status is that of the last command.
456   exit
457 }
458
459
460 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
461   as_dirname=dirname
462 else
463   as_dirname=false
464 fi
465
466 ECHO_C= ECHO_N= ECHO_T=
467 case `echo -n x` in
468 -n*)
469   case `echo 'x\c'` in
470   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
471   *)   ECHO_C='\c';;
472   esac;;
473 *)
474   ECHO_N='-n';;
475 esac
476
477 if expr a : '\(a\)' >/dev/null 2>&1 &&
478    test "X`expr 00001 : '.*\(...\)'`" = X001; then
479   as_expr=expr
480 else
481   as_expr=false
482 fi
483
484 rm -f conf$$ conf$$.exe conf$$.file
485 if test -d conf$$.dir; then
486   rm -f conf$$.dir/conf$$.file
487 else
488   rm -f conf$$.dir
489   mkdir conf$$.dir
490 fi
491 echo >conf$$.file
492 if ln -s conf$$.file conf$$ 2>/dev/null; then
493   as_ln_s='ln -s'
494   # ... but there are two gotchas:
495   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
496   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
497   # In both cases, we have to default to `cp -p'.
498   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
499     as_ln_s='cp -p'
500 elif ln conf$$.file conf$$ 2>/dev/null; then
501   as_ln_s=ln
502 else
503   as_ln_s='cp -p'
504 fi
505 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
506 rmdir conf$$.dir 2>/dev/null
507
508 if mkdir -p . 2>/dev/null; then
509   as_mkdir_p=:
510 else
511   test -d ./-p && rmdir ./-p
512   as_mkdir_p=false
513 fi
514
515 # Find out whether ``test -x'' works.  Don't use a zero-byte file, as
516 # systems may use methods other than mode bits to determine executability.
517 cat >conf$$.file <<_ASEOF
518 #! /bin/sh
519 exit 0
520 _ASEOF
521 chmod +x conf$$.file
522 if test -x conf$$.file >/dev/null 2>&1; then
523   as_executable_p="test -x"
524 else
525   as_executable_p=:
526 fi
527 rm -f conf$$.file
528
529 # Sed expression to map a string onto a valid CPP name.
530 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
531
532 # Sed expression to map a string onto a valid variable name.
533 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
534
535
536
537 exec 7<&0 </dev/null 6>&1
538
539 # Name of the host.
540 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
541 # so uname gets run too.
542 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
543
544 #
545 # Initializations.
546 #
547 ac_default_prefix=/usr/local
548 ac_clean_files=
549 ac_config_libobj_dir=.
550 LIBOBJS=
551 cross_compiling=no
552 subdirs=
553 MFLAGS=
554 MAKEFLAGS=
555 SHELL=${CONFIG_SHELL-/bin/sh}
556
557 # Identity of this package.
558 PACKAGE_NAME=
559 PACKAGE_TARNAME=
560 PACKAGE_VERSION=
561 PACKAGE_STRING=
562 PACKAGE_BUGREPORT=
563
564 ac_unique_file="driver/subprocs.c"
565 # Factoring default headers for most tests.
566 ac_includes_default="\
567 #include <stdio.h>
568 #if HAVE_SYS_TYPES_H
569 # include <sys/types.h>
570 #endif
571 #if HAVE_SYS_STAT_H
572 # include <sys/stat.h>
573 #endif
574 #if STDC_HEADERS
575 # include <stdlib.h>
576 # include <stddef.h>
577 #else
578 # if HAVE_STDLIB_H
579 #  include <stdlib.h>
580 # endif
581 #endif
582 #if HAVE_STRING_H
583 # if !STDC_HEADERS && HAVE_MEMORY_H
584 #  include <memory.h>
585 # endif
586 # include <string.h>
587 #endif
588 #if HAVE_STRINGS_H
589 # include <strings.h>
590 #endif
591 #if HAVE_INTTYPES_H
592 # include <inttypes.h>
593 #endif
594 #if HAVE_STDINT_H
595 # include <stdint.h>
596 #endif
597 #if HAVE_UNISTD_H
598 # include <unistd.h>
599 #endif"
600
601 ac_subst_vars='SHELL
602 PATH_SEPARATOR
603 PACKAGE_NAME
604 PACKAGE_TARNAME
605 PACKAGE_VERSION
606 PACKAGE_STRING
607 PACKAGE_BUGREPORT
608 exec_prefix
609 prefix
610 program_transform_name
611 bindir
612 sbindir
613 libexecdir
614 datarootdir
615 datadir
616 sysconfdir
617 sharedstatedir
618 localstatedir
619 includedir
620 oldincludedir
621 docdir
622 infodir
623 htmldir
624 dvidir
625 pdfdir
626 psdir
627 libdir
628 localedir
629 mandir
630 DEFS
631 ECHO_C
632 ECHO_N
633 ECHO_T
634 LIBS
635 build_alias
636 host_alias
637 target_alias
638 build
639 build_cpu
640 build_vendor
641 build_os
642 host
643 host_cpu
644 host_vendor
645 host_os
646 CC
647 CFLAGS
648 LDFLAGS
649 CPPFLAGS
650 ac_ct_CC
651 EXEEXT
652 OBJEXT
653 CPP
654 INSTALL_PROGRAM
655 INSTALL_SCRIPT
656 INSTALL_DATA
657 SET_MAKE
658 GREP
659 EGREP
660 PERL
661 XMKMF
662 X_CFLAGS
663 X_PRE_LIBS
664 X_LIBS
665 X_EXTRA_LIBS
666 INTLTOOL_DESKTOP_RULE
667 INTLTOOL_DIRECTORY_RULE
668 INTLTOOL_KEYS_RULE
669 INTLTOOL_OAF_RULE
670 INTLTOOL_PONG_RULE
671 INTLTOOL_SERVER_RULE
672 INTLTOOL_SHEET_RULE
673 INTLTOOL_SOUNDLIST_RULE
674 INTLTOOL_UI_RULE
675 INTLTOOL_XML_RULE
676 INTLTOOL_CAVES_RULE
677 INTLTOOL_EXTRACT
678 INTLTOOL_MERGE
679 INTLTOOL_UPDATE
680 INTLTOOL_PERL
681 GETTEXT_PACKAGE
682 RANLIB
683 ALLOCA
684 USE_NLS
685 MSGFMT
686 GMSGFMT
687 XGETTEXT
688 CATALOGS
689 CATOBJEXT
690 DATADIRNAME
691 GMOFILES
692 INSTOBJEXT
693 INTLDEPS
694 INTLLIBS
695 INTLOBJS
696 POFILES
697 POSUB
698 MKINSTALLDIRS
699 login_manager_tmp
700 pkg_config
701 gnome_open_program
702 gnome_url_show_program
703 INCLUDES
704 PREFERRED_DEMO_PROGRAM
705 ALL_DEMO_PROGRAMS
706 SAVER_LIBS
707 MOTIF_LIBS
708 GTK_LIBS
709 XML_LIBS
710 JPEG_LIBS
711 HACK_LIBS
712 XPM_LIBS
713 PTY_LIBS
714 GL_LIBS
715 GLE_LIBS
716 XDPMS_LIBS
717 XINERAMA_LIBS
718 PASSWD_LIBS
719 INSTALL_SETUID
720 SETUID_HACKS
721 INSTALL_DIRS
722 NEED_SETUID
723 INSTALL_PAM
724 HAVE_PAM_FAIL_DELAY
725 NEW_LOGIN_COMMAND
726 NEW_LOGIN_COMMAND_P
727 DEFAULT_IMAGES_P
728 DEFAULT_IMAGE_DIRECTORY
729 DEFAULT_TEXT_FILE
730 WITH_BROWSER
731 OBJCC
732 EXES_OSX
733 SCRIPTS_OSX
734 MEN_OSX
735 PASSWD_SRCS
736 PASSWD_OBJS
737 XMU_SRCS
738 XMU_OBJS
739 XMU_LIBS
740 SAVER_GL_SRCS
741 SAVER_GL_OBJS
742 SAVER_GL_LIBS
743 LOCK_SRCS
744 LOCK_OBJS
745 JPEG_EXES
746 GL_EXES
747 GL_UTIL_EXES
748 GL_MEN
749 GL_KLUDGE
750 GLE_EXES
751 GLE_KLUDGE
752 GNOME24
753 GNOME22
754 NOGNOME
755 HACKDIR
756 HACKDIR_FULL
757 GTK_DATADIR
758 PO_DATADIR
759 HACK_CONF_DIR
760 GTK_EXTRA_OBJS
761 APPDEFAULTS
762 DEPEND
763 DEPEND_FLAGS
764 DEPEND_DEFINES
765 LIBOBJS
766 LTLIBOBJS'
767 ac_subst_files=''
768       ac_precious_vars='build_alias
769 host_alias
770 target_alias
771 CC
772 CFLAGS
773 LDFLAGS
774 CPPFLAGS
775 CPP
776 XMKMF'
777
778
779 # Initialize some variables set by options.
780 ac_init_help=
781 ac_init_version=false
782 # The variables have the same names as the options, with
783 # dashes changed to underlines.
784 cache_file=/dev/null
785 exec_prefix=NONE
786 no_create=
787 no_recursion=
788 prefix=NONE
789 program_prefix=NONE
790 program_suffix=NONE
791 program_transform_name=s,x,x,
792 silent=
793 site=
794 srcdir=
795 verbose=
796 x_includes=NONE
797 x_libraries=NONE
798
799 # Installation directory options.
800 # These are left unexpanded so users can "make install exec_prefix=/foo"
801 # and all the variables that are supposed to be based on exec_prefix
802 # by default will actually change.
803 # Use braces instead of parens because sh, perl, etc. also accept them.
804 # (The list follows the same order as the GNU Coding Standards.)
805 bindir='${exec_prefix}/bin'
806 sbindir='${exec_prefix}/sbin'
807 libexecdir='${exec_prefix}/libexec'
808 datarootdir='${prefix}/share'
809 datadir='${datarootdir}'
810 sysconfdir='${prefix}/etc'
811 sharedstatedir='${prefix}/com'
812 localstatedir='${prefix}/var'
813 includedir='${prefix}/include'
814 oldincludedir='/usr/include'
815 docdir='${datarootdir}/doc/${PACKAGE}'
816 infodir='${datarootdir}/info'
817 htmldir='${docdir}'
818 dvidir='${docdir}'
819 pdfdir='${docdir}'
820 psdir='${docdir}'
821 libdir='${exec_prefix}/lib'
822 localedir='${datarootdir}/locale'
823 mandir='${datarootdir}/man'
824
825 ac_prev=
826 ac_dashdash=
827 for ac_option
828 do
829   # If the previous option needs an argument, assign it.
830   if test -n "$ac_prev"; then
831     eval $ac_prev=\$ac_option
832     ac_prev=
833     continue
834   fi
835
836   case $ac_option in
837   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
838   *)    ac_optarg=yes ;;
839   esac
840
841   # Accept the important Cygnus configure options, so we can diagnose typos.
842
843   case $ac_dashdash$ac_option in
844   --)
845     ac_dashdash=yes ;;
846
847   -bindir | --bindir | --bindi | --bind | --bin | --bi)
848     ac_prev=bindir ;;
849   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
850     bindir=$ac_optarg ;;
851
852   -build | --build | --buil | --bui | --bu)
853     ac_prev=build_alias ;;
854   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
855     build_alias=$ac_optarg ;;
856
857   -cache-file | --cache-file | --cache-fil | --cache-fi \
858   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
859     ac_prev=cache_file ;;
860   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
861   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
862     cache_file=$ac_optarg ;;
863
864   --config-cache | -C)
865     cache_file=config.cache ;;
866
867   -datadir | --datadir | --datadi | --datad)
868     ac_prev=datadir ;;
869   -datadir=* | --datadir=* | --datadi=* | --datad=*)
870     datadir=$ac_optarg ;;
871
872   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
873   | --dataroo | --dataro | --datar)
874     ac_prev=datarootdir ;;
875   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
876   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
877     datarootdir=$ac_optarg ;;
878
879   -disable-* | --disable-*)
880     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
881     # Reject names that are not valid shell variable names.
882     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
883       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
884    { (exit 1); exit 1; }; }
885     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
886     eval enable_$ac_feature=no ;;
887
888   -docdir | --docdir | --docdi | --doc | --do)
889     ac_prev=docdir ;;
890   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
891     docdir=$ac_optarg ;;
892
893   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
894     ac_prev=dvidir ;;
895   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
896     dvidir=$ac_optarg ;;
897
898   -enable-* | --enable-*)
899     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
900     # Reject names that are not valid shell variable names.
901     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
902       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
903    { (exit 1); exit 1; }; }
904     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
905     eval enable_$ac_feature=\$ac_optarg ;;
906
907   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
908   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
909   | --exec | --exe | --ex)
910     ac_prev=exec_prefix ;;
911   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
912   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
913   | --exec=* | --exe=* | --ex=*)
914     exec_prefix=$ac_optarg ;;
915
916   -gas | --gas | --ga | --g)
917     # Obsolete; use --with-gas.
918     with_gas=yes ;;
919
920   -help | --help | --hel | --he | -h)
921     ac_init_help=long ;;
922   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
923     ac_init_help=recursive ;;
924   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
925     ac_init_help=short ;;
926
927   -host | --host | --hos | --ho)
928     ac_prev=host_alias ;;
929   -host=* | --host=* | --hos=* | --ho=*)
930     host_alias=$ac_optarg ;;
931
932   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
933     ac_prev=htmldir ;;
934   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
935   | --ht=*)
936     htmldir=$ac_optarg ;;
937
938   -includedir | --includedir | --includedi | --included | --include \
939   | --includ | --inclu | --incl | --inc)
940     ac_prev=includedir ;;
941   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
942   | --includ=* | --inclu=* | --incl=* | --inc=*)
943     includedir=$ac_optarg ;;
944
945   -infodir | --infodir | --infodi | --infod | --info | --inf)
946     ac_prev=infodir ;;
947   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
948     infodir=$ac_optarg ;;
949
950   -libdir | --libdir | --libdi | --libd)
951     ac_prev=libdir ;;
952   -libdir=* | --libdir=* | --libdi=* | --libd=*)
953     libdir=$ac_optarg ;;
954
955   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
956   | --libexe | --libex | --libe)
957     ac_prev=libexecdir ;;
958   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
959   | --libexe=* | --libex=* | --libe=*)
960     libexecdir=$ac_optarg ;;
961
962   -localedir | --localedir | --localedi | --localed | --locale)
963     ac_prev=localedir ;;
964   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
965     localedir=$ac_optarg ;;
966
967   -localstatedir | --localstatedir | --localstatedi | --localstated \
968   | --localstate | --localstat | --localsta | --localst | --locals)
969     ac_prev=localstatedir ;;
970   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
971   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
972     localstatedir=$ac_optarg ;;
973
974   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
975     ac_prev=mandir ;;
976   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
977     mandir=$ac_optarg ;;
978
979   -nfp | --nfp | --nf)
980     # Obsolete; use --without-fp.
981     with_fp=no ;;
982
983   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
984   | --no-cr | --no-c | -n)
985     no_create=yes ;;
986
987   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
988   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
989     no_recursion=yes ;;
990
991   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
992   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
993   | --oldin | --oldi | --old | --ol | --o)
994     ac_prev=oldincludedir ;;
995   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
996   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
997   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
998     oldincludedir=$ac_optarg ;;
999
1000   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1001     ac_prev=prefix ;;
1002   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1003     prefix=$ac_optarg ;;
1004
1005   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1006   | --program-pre | --program-pr | --program-p)
1007     ac_prev=program_prefix ;;
1008   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1009   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1010     program_prefix=$ac_optarg ;;
1011
1012   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1013   | --program-suf | --program-su | --program-s)
1014     ac_prev=program_suffix ;;
1015   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1016   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1017     program_suffix=$ac_optarg ;;
1018
1019   -program-transform-name | --program-transform-name \
1020   | --program-transform-nam | --program-transform-na \
1021   | --program-transform-n | --program-transform- \
1022   | --program-transform | --program-transfor \
1023   | --program-transfo | --program-transf \
1024   | --program-trans | --program-tran \
1025   | --progr-tra | --program-tr | --program-t)
1026     ac_prev=program_transform_name ;;
1027   -program-transform-name=* | --program-transform-name=* \
1028   | --program-transform-nam=* | --program-transform-na=* \
1029   | --program-transform-n=* | --program-transform-=* \
1030   | --program-transform=* | --program-transfor=* \
1031   | --program-transfo=* | --program-transf=* \
1032   | --program-trans=* | --program-tran=* \
1033   | --progr-tra=* | --program-tr=* | --program-t=*)
1034     program_transform_name=$ac_optarg ;;
1035
1036   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1037     ac_prev=pdfdir ;;
1038   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1039     pdfdir=$ac_optarg ;;
1040
1041   -psdir | --psdir | --psdi | --psd | --ps)
1042     ac_prev=psdir ;;
1043   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1044     psdir=$ac_optarg ;;
1045
1046   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1047   | -silent | --silent | --silen | --sile | --sil)
1048     silent=yes ;;
1049
1050   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1051     ac_prev=sbindir ;;
1052   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1053   | --sbi=* | --sb=*)
1054     sbindir=$ac_optarg ;;
1055
1056   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1057   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1058   | --sharedst | --shareds | --shared | --share | --shar \
1059   | --sha | --sh)
1060     ac_prev=sharedstatedir ;;
1061   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1062   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1063   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1064   | --sha=* | --sh=*)
1065     sharedstatedir=$ac_optarg ;;
1066
1067   -site | --site | --sit)
1068     ac_prev=site ;;
1069   -site=* | --site=* | --sit=*)
1070     site=$ac_optarg ;;
1071
1072   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1073     ac_prev=srcdir ;;
1074   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1075     srcdir=$ac_optarg ;;
1076
1077   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1078   | --syscon | --sysco | --sysc | --sys | --sy)
1079     ac_prev=sysconfdir ;;
1080   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1081   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1082     sysconfdir=$ac_optarg ;;
1083
1084   -target | --target | --targe | --targ | --tar | --ta | --t)
1085     ac_prev=target_alias ;;
1086   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1087     target_alias=$ac_optarg ;;
1088
1089   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1090     verbose=yes ;;
1091
1092   -version | --version | --versio | --versi | --vers | -V)
1093     ac_init_version=: ;;
1094
1095   -with-* | --with-*)
1096     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1097     # Reject names that are not valid shell variable names.
1098     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1099       { echo "$as_me: error: invalid package name: $ac_package" >&2
1100    { (exit 1); exit 1; }; }
1101     ac_package=`echo $ac_package| sed 's/-/_/g'`
1102     eval with_$ac_package=\$ac_optarg ;;
1103
1104   -without-* | --without-*)
1105     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1106     # Reject names that are not valid shell variable names.
1107     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1108       { echo "$as_me: error: invalid package name: $ac_package" >&2
1109    { (exit 1); exit 1; }; }
1110     ac_package=`echo $ac_package | sed 's/-/_/g'`
1111     eval with_$ac_package=no ;;
1112
1113   --x)
1114     # Obsolete; use --with-x.
1115     with_x=yes ;;
1116
1117   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1118   | --x-incl | --x-inc | --x-in | --x-i)
1119     ac_prev=x_includes ;;
1120   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1121   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1122     x_includes=$ac_optarg ;;
1123
1124   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1125   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1126     ac_prev=x_libraries ;;
1127   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1128   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1129     x_libraries=$ac_optarg ;;
1130
1131   -*) { echo "$as_me: error: unrecognized option: $ac_option
1132 Try \`$0 --help' for more information." >&2
1133    { (exit 1); exit 1; }; }
1134     ;;
1135
1136   *=*)
1137     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1138     # Reject names that are not valid shell variable names.
1139     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1140       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1141    { (exit 1); exit 1; }; }
1142     eval $ac_envvar=\$ac_optarg
1143     export $ac_envvar ;;
1144
1145   *)
1146     # FIXME: should be removed in autoconf 3.0.
1147     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1148     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1149       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1150     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1151     ;;
1152
1153   esac
1154 done
1155
1156 if test -n "$ac_prev"; then
1157   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1158   { echo "$as_me: error: missing argument to $ac_option" >&2
1159    { (exit 1); exit 1; }; }
1160 fi
1161
1162 # Be sure to have absolute directory names.
1163 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1164                 datadir sysconfdir sharedstatedir localstatedir includedir \
1165                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1166                 libdir localedir mandir
1167 do
1168   eval ac_val=\$$ac_var
1169   case $ac_val in
1170     [\\/$]* | ?:[\\/]* )  continue;;
1171     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1172   esac
1173   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1174    { (exit 1); exit 1; }; }
1175 done
1176
1177 # There might be people who depend on the old broken behavior: `$host'
1178 # used to hold the argument of --host etc.
1179 # FIXME: To remove some day.
1180 build=$build_alias
1181 host=$host_alias
1182 target=$target_alias
1183
1184 # FIXME: To remove some day.
1185 if test "x$host_alias" != x; then
1186   if test "x$build_alias" = x; then
1187     cross_compiling=maybe
1188     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1189     If a cross compiler is detected then cross compile mode will be used." >&2
1190   elif test "x$build_alias" != "x$host_alias"; then
1191     cross_compiling=yes
1192   fi
1193 fi
1194
1195 ac_tool_prefix=
1196 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1197
1198 test "$silent" = yes && exec 6>/dev/null
1199
1200
1201 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1202 ac_ls_di=`ls -di .` &&
1203 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1204   { echo "$as_me: error: Working directory cannot be determined" >&2
1205    { (exit 1); exit 1; }; }
1206 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1207   { echo "$as_me: error: pwd does not report name of working directory" >&2
1208    { (exit 1); exit 1; }; }
1209
1210
1211 # Find the source files, if location was not specified.
1212 if test -z "$srcdir"; then
1213   ac_srcdir_defaulted=yes
1214   # Try the directory containing this script, then the parent directory.
1215   ac_confdir=`$as_dirname -- "$0" ||
1216 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1217          X"$0" : 'X\(//\)[^/]' \| \
1218          X"$0" : 'X\(//\)$' \| \
1219          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1220 echo X"$0" |
1221     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1222             s//\1/
1223             q
1224           }
1225           /^X\(\/\/\)[^/].*/{
1226             s//\1/
1227             q
1228           }
1229           /^X\(\/\/\)$/{
1230             s//\1/
1231             q
1232           }
1233           /^X\(\/\).*/{
1234             s//\1/
1235             q
1236           }
1237           s/.*/./; q'`
1238   srcdir=$ac_confdir
1239   if test ! -r "$srcdir/$ac_unique_file"; then
1240     srcdir=..
1241   fi
1242 else
1243   ac_srcdir_defaulted=no
1244 fi
1245 if test ! -r "$srcdir/$ac_unique_file"; then
1246   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1247   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1248    { (exit 1); exit 1; }; }
1249 fi
1250 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1251 ac_abs_confdir=`(
1252         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1253    { (exit 1); exit 1; }; }
1254         pwd)`
1255 # When building in place, set srcdir=.
1256 if test "$ac_abs_confdir" = "$ac_pwd"; then
1257   srcdir=.
1258 fi
1259 # Remove unnecessary trailing slashes from srcdir.
1260 # Double slashes in file names in object file debugging info
1261 # mess up M-x gdb in Emacs.
1262 case $srcdir in
1263 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1264 esac
1265 for ac_var in $ac_precious_vars; do
1266   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1267   eval ac_env_${ac_var}_value=\$${ac_var}
1268   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1269   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1270 done
1271
1272 #
1273 # Report the --help message.
1274 #
1275 if test "$ac_init_help" = "long"; then
1276   # Omit some internal or obsolete options to make the list less imposing.
1277   # This message is too long to be a string in the A/UX 3.1 sh.
1278   cat <<_ACEOF
1279 \`configure' configures this package to adapt to many kinds of systems.
1280
1281 Usage: $0 [OPTION]... [VAR=VALUE]...
1282
1283 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1284 VAR=VALUE.  See below for descriptions of some of the useful variables.
1285
1286 Defaults for the options are specified in brackets.
1287
1288
1289 Configuration:
1290
1291   -h, --help              display this help and exit
1292       --help=short        display options specific to this package
1293       --help=recursive    display the short help of all the included packages
1294   -V, --version           display version information and exit
1295   -q, --quiet, --silent   do not print \`checking...' messages
1296       --cache-file=FILE   cache test results in FILE [disabled]
1297   -C, --config-cache      alias for \`--cache-file=config.cache'
1298   -n, --no-create         do not create output files
1299       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1300
1301 Installation directories:
1302   --prefix=PREFIX         install architecture-independent files in PREFIX
1303                           [$ac_default_prefix]
1304   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1305                           [PREFIX]
1306
1307 By default, \`make install' will install all the files in
1308 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1309 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1310 for instance \`--prefix=\$HOME'.
1311
1312 For better control, use the options below.
1313
1314 Fine tuning of the installation directories:
1315   --bindir=DIR           user executables [EPREFIX/bin]
1316   --libexecdir=DIR       program executables [EPREFIX/libexec]
1317   --libdir=DIR           object code libraries [EPREFIX/lib]
1318   --includedir=DIR       C header files [PREFIX/include]
1319   --x-includes=DIR        X include files are in DIR
1320   --x-libraries=DIR       X library files are in DIR
1321   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1322   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1323   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1324   --mandir=DIR           man documentation [DATAROOTDIR/man]
1325   --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
1326   --htmldir=DIR          html documentation [DOCDIR]
1327   --dvidir=DIR           dvi documentation [DOCDIR]
1328   --pdfdir=DIR           pdf documentation [DOCDIR]
1329   --psdir=DIR            ps documentation [DOCDIR]
1330 _ACEOF
1331
1332   cat <<\_ACEOF
1333
1334 X features:
1335   --x-includes=DIR    X include files are in DIR
1336   --x-libraries=DIR   X library files are in DIR
1337
1338 System types:
1339   --build=BUILD     configure for building on BUILD [guessed]
1340   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1341 _ACEOF
1342 fi
1343
1344 if test -n "$ac_init_help"; then
1345
1346   cat <<\_ACEOF
1347
1348 Optional Features:
1349   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1350   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1351
1352 Screen locking options:
1353   --enable-locking        Compile in support for locking the display.
1354   --disable-locking       Do not allow locking at all.
1355
1356   --enable-root-passwd        Allow root passwd to unlock screen.
1357   --disable-root-passwd       Do not allow that.
1358
1359 Optional Packages:
1360   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1361   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1362
1363
1364 Installation options:
1365   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1366                           Default: `PREFIX/libexec/xscreensaver/'
1367   --with-configdir=DIR    Where to install the data files that describe each
1368                           of the display modes to the GUI.
1369                           Default: `PREFIX/share/xscreensaver/config/'
1370   --with-x-app-defaults=DIR
1371                            Where to install xscreensaver configuration file.
1372
1373 Except where noted, all of the --with options below can also take a
1374 directory argument: for example, `--with-motif=/opt/Motif'.  That would
1375 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
1376 to be added to the -L list, assuming those directories exist.
1377
1378 By default, support for each of these options will be built in, if the
1379 relevant library routines exist.  At run time, they will then be used
1380 only if the X server being used supports them.  Each --with option has
1381 a corresponding --without option, to override building support for them
1382 at all.
1383
1384 Screen blanking and idle-detection options:
1385
1386   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
1387   --with-xidle-ext        Include support for the XIDLE extension.
1388   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
1389   --with-dpms-ext         Include support for the DPMS extension.
1390   --with-xinerama-ext     Include support for the XINERAMA extension.
1391   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1392   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1393   --with-randr-ext        Include support for the X Resize+Rotate extension.
1394   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1395                           file to notice keyboard activity.
1396   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1397   --with-pam-service-name=NAME
1398                           NAME is the name of the PAM service that
1399                           xscreensaver will authenticate as.
1400   --with-kerberos         Include support for Kerberos authentication.
1401   --with-shadow           Include support for shadow password authentication.
1402   --with-passwd-helper    Include support for an external password
1403                           verification helper program.
1404   --with-login-manager    Put a "New Login" button on the unlock dialog that
1405                           runs a login manager such as gdmflexiserver.
1406
1407 User interface options:
1408
1409   --with-gtk              Use the Gtk toolkit for the user interface.
1410   --with-motif            Use the Motif toolkit for the user interface
1411                           (not recommended.)
1412
1413 Graphics options:
1414
1415   --with-gl               Build those demos which depend on OpenGL.
1416   --with-gle              Build those demos which depend on GLE
1417                           (the OpenGL "extrusion" library.)
1418   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1419                           demos, which will make it possible for them to read
1420                           GIF, JPEG, and PNG files as well.
1421   --with-xpm              Include support for XPM files in some demos.
1422                           (Not needed if Pixbuf is used.)
1423   --with-jpeg             Include support for the JPEG library.
1424   --with-xshm-ext         Include support for the Shared Memory extension.
1425   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1426   --with-readdisplay      Include support for the XReadDisplay extension.
1427   --with-image-directory=DIR  By default, some demos may display random images
1428                           from this directory.
1429   --with-text-file=FILE   By default, some demos may display this file.
1430   --with-browser=BROWSER   Specify the browser to show help URL.
1431   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1432                           (which is needed in order to ping other hosts.)
1433
1434
1435 Some influential environment variables:
1436   CC          C compiler command
1437   CFLAGS      C compiler flags
1438   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1439               nonstandard directory <lib dir>
1440   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1441               you have headers in a nonstandard directory <include dir>
1442   CPP         C preprocessor
1443   XMKMF       Path to xmkmf, Makefile generator for X Window System
1444
1445 Use these variables to override the choices made by `configure' or to help
1446 it to find libraries and programs with nonstandard names/locations.
1447
1448 _ACEOF
1449 ac_status=$?
1450 fi
1451
1452 if test "$ac_init_help" = "recursive"; then
1453   # If there are subdirs, report their specific --help.
1454   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1455     test -d "$ac_dir" || continue
1456     ac_builddir=.
1457
1458 case "$ac_dir" in
1459 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1460 *)
1461   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1462   # A ".." for each directory in $ac_dir_suffix.
1463   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1464   case $ac_top_builddir_sub in
1465   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1466   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1467   esac ;;
1468 esac
1469 ac_abs_top_builddir=$ac_pwd
1470 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1471 # for backward compatibility:
1472 ac_top_builddir=$ac_top_build_prefix
1473
1474 case $srcdir in
1475   .)  # We are building in place.
1476     ac_srcdir=.
1477     ac_top_srcdir=$ac_top_builddir_sub
1478     ac_abs_top_srcdir=$ac_pwd ;;
1479   [\\/]* | ?:[\\/]* )  # Absolute name.
1480     ac_srcdir=$srcdir$ac_dir_suffix;
1481     ac_top_srcdir=$srcdir
1482     ac_abs_top_srcdir=$srcdir ;;
1483   *) # Relative name.
1484     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1485     ac_top_srcdir=$ac_top_build_prefix$srcdir
1486     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1487 esac
1488 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1489
1490     cd "$ac_dir" || { ac_status=$?; continue; }
1491     # Check for guested configure.
1492     if test -f "$ac_srcdir/configure.gnu"; then
1493       echo &&
1494       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1495     elif test -f "$ac_srcdir/configure"; then
1496       echo &&
1497       $SHELL "$ac_srcdir/configure" --help=recursive
1498     else
1499       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1500     fi || ac_status=$?
1501     cd "$ac_pwd" || { ac_status=$?; break; }
1502   done
1503 fi
1504
1505 test -n "$ac_init_help" && exit $ac_status
1506 if $ac_init_version; then
1507   cat <<\_ACEOF
1508 configure
1509 generated by GNU Autoconf 2.60
1510
1511 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1512 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1513 This configure script is free software; the Free Software Foundation
1514 gives unlimited permission to copy, distribute and modify it.
1515 _ACEOF
1516   exit
1517 fi
1518 cat >config.log <<_ACEOF
1519 This file contains any messages produced by compilers while
1520 running configure, to aid debugging if configure makes a mistake.
1521
1522 It was created by $as_me, which was
1523 generated by GNU Autoconf 2.60.  Invocation command line was
1524
1525   $ $0 $@
1526
1527 _ACEOF
1528 exec 5>>config.log
1529 {
1530 cat <<_ASUNAME
1531 ## --------- ##
1532 ## Platform. ##
1533 ## --------- ##
1534
1535 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1536 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1537 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1538 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1539 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1540
1541 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1542 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1543
1544 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1545 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1546 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1547 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1548 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1549 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1550 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1551
1552 _ASUNAME
1553
1554 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1555 for as_dir in $PATH
1556 do
1557   IFS=$as_save_IFS
1558   test -z "$as_dir" && as_dir=.
1559   echo "PATH: $as_dir"
1560 done
1561 IFS=$as_save_IFS
1562
1563 } >&5
1564
1565 cat >&5 <<_ACEOF
1566
1567
1568 ## ----------- ##
1569 ## Core tests. ##
1570 ## ----------- ##
1571
1572 _ACEOF
1573
1574
1575 # Keep a trace of the command line.
1576 # Strip out --no-create and --no-recursion so they do not pile up.
1577 # Strip out --silent because we don't want to record it for future runs.
1578 # Also quote any args containing shell meta-characters.
1579 # Make two passes to allow for proper duplicate-argument suppression.
1580 ac_configure_args=
1581 ac_configure_args0=
1582 ac_configure_args1=
1583 ac_must_keep_next=false
1584 for ac_pass in 1 2
1585 do
1586   for ac_arg
1587   do
1588     case $ac_arg in
1589     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1590     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1591     | -silent | --silent | --silen | --sile | --sil)
1592       continue ;;
1593     *\'*)
1594       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1595     esac
1596     case $ac_pass in
1597     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1598     2)
1599       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1600       if test $ac_must_keep_next = true; then
1601         ac_must_keep_next=false # Got value, back to normal.
1602       else
1603         case $ac_arg in
1604           *=* | --config-cache | -C | -disable-* | --disable-* \
1605           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1606           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1607           | -with-* | --with-* | -without-* | --without-* | --x)
1608             case "$ac_configure_args0 " in
1609               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1610             esac
1611             ;;
1612           -* ) ac_must_keep_next=true ;;
1613         esac
1614       fi
1615       ac_configure_args="$ac_configure_args '$ac_arg'"
1616       ;;
1617     esac
1618   done
1619 done
1620 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1621 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1622
1623 # When interrupted or exit'd, cleanup temporary files, and complete
1624 # config.log.  We remove comments because anyway the quotes in there
1625 # would cause problems or look ugly.
1626 # WARNING: Use '\'' to represent an apostrophe within the trap.
1627 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1628 trap 'exit_status=$?
1629   # Save into config.log some information that might help in debugging.
1630   {
1631     echo
1632
1633     cat <<\_ASBOX
1634 ## ---------------- ##
1635 ## Cache variables. ##
1636 ## ---------------- ##
1637 _ASBOX
1638     echo
1639     # The following way of writing the cache mishandles newlines in values,
1640 (
1641   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1642     eval ac_val=\$$ac_var
1643     case $ac_val in #(
1644     *${as_nl}*)
1645       case $ac_var in #(
1646       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1647 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1648       esac
1649       case $ac_var in #(
1650       _ | IFS | as_nl) ;; #(
1651       *) $as_unset $ac_var ;;
1652       esac ;;
1653     esac
1654   done
1655   (set) 2>&1 |
1656     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1657     *${as_nl}ac_space=\ *)
1658       sed -n \
1659         "s/'\''/'\''\\\\'\'''\''/g;
1660           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1661       ;; #(
1662     *)
1663       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1664       ;;
1665     esac |
1666     sort
1667 )
1668     echo
1669
1670     cat <<\_ASBOX
1671 ## ----------------- ##
1672 ## Output variables. ##
1673 ## ----------------- ##
1674 _ASBOX
1675     echo
1676     for ac_var in $ac_subst_vars
1677     do
1678       eval ac_val=\$$ac_var
1679       case $ac_val in
1680       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1681       esac
1682       echo "$ac_var='\''$ac_val'\''"
1683     done | sort
1684     echo
1685
1686     if test -n "$ac_subst_files"; then
1687       cat <<\_ASBOX
1688 ## ------------------- ##
1689 ## File substitutions. ##
1690 ## ------------------- ##
1691 _ASBOX
1692       echo
1693       for ac_var in $ac_subst_files
1694       do
1695         eval ac_val=\$$ac_var
1696         case $ac_val in
1697         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1698         esac
1699         echo "$ac_var='\''$ac_val'\''"
1700       done | sort
1701       echo
1702     fi
1703
1704     if test -s confdefs.h; then
1705       cat <<\_ASBOX
1706 ## ----------- ##
1707 ## confdefs.h. ##
1708 ## ----------- ##
1709 _ASBOX
1710       echo
1711       cat confdefs.h
1712       echo
1713     fi
1714     test "$ac_signal" != 0 &&
1715       echo "$as_me: caught signal $ac_signal"
1716     echo "$as_me: exit $exit_status"
1717   } >&5
1718   rm -f core *.core core.conftest.* &&
1719     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1720     exit $exit_status
1721 ' 0
1722 for ac_signal in 1 2 13 15; do
1723   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1724 done
1725 ac_signal=0
1726
1727 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1728 rm -f -r conftest* confdefs.h
1729
1730 # Predefined preprocessor variables.
1731
1732 cat >>confdefs.h <<_ACEOF
1733 #define PACKAGE_NAME "$PACKAGE_NAME"
1734 _ACEOF
1735
1736
1737 cat >>confdefs.h <<_ACEOF
1738 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1739 _ACEOF
1740
1741
1742 cat >>confdefs.h <<_ACEOF
1743 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1744 _ACEOF
1745
1746
1747 cat >>confdefs.h <<_ACEOF
1748 #define PACKAGE_STRING "$PACKAGE_STRING"
1749 _ACEOF
1750
1751
1752 cat >>confdefs.h <<_ACEOF
1753 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1754 _ACEOF
1755
1756
1757 # Let the site file select an alternate cache file if it wants to.
1758 # Prefer explicitly selected file to automatically selected ones.
1759 if test -n "$CONFIG_SITE"; then
1760   set x "$CONFIG_SITE"
1761 elif test "x$prefix" != xNONE; then
1762   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1763 else
1764   set x "$ac_default_prefix/share/config.site" \
1765         "$ac_default_prefix/etc/config.site"
1766 fi
1767 shift
1768 for ac_site_file
1769 do
1770   if test -r "$ac_site_file"; then
1771     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1772 echo "$as_me: loading site script $ac_site_file" >&6;}
1773     sed 's/^/| /' "$ac_site_file" >&5
1774     . "$ac_site_file"
1775   fi
1776 done
1777
1778 if test -r "$cache_file"; then
1779   # Some versions of bash will fail to source /dev/null (special
1780   # files actually), so we avoid doing that.
1781   if test -f "$cache_file"; then
1782     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1783 echo "$as_me: loading cache $cache_file" >&6;}
1784     case $cache_file in
1785       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1786       *)                      . "./$cache_file";;
1787     esac
1788   fi
1789 else
1790   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1791 echo "$as_me: creating cache $cache_file" >&6;}
1792   >$cache_file
1793 fi
1794
1795 # Check that the precious variables saved in the cache have kept the same
1796 # value.
1797 ac_cache_corrupted=false
1798 for ac_var in $ac_precious_vars; do
1799   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1800   eval ac_new_set=\$ac_env_${ac_var}_set
1801   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1802   eval ac_new_val=\$ac_env_${ac_var}_value
1803   case $ac_old_set,$ac_new_set in
1804     set,)
1805       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1806 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1807       ac_cache_corrupted=: ;;
1808     ,set)
1809       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1810 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1811       ac_cache_corrupted=: ;;
1812     ,);;
1813     *)
1814       if test "x$ac_old_val" != "x$ac_new_val"; then
1815         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1816 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1817         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1818 echo "$as_me:   former value:  $ac_old_val" >&2;}
1819         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1820 echo "$as_me:   current value: $ac_new_val" >&2;}
1821         ac_cache_corrupted=:
1822       fi;;
1823   esac
1824   # Pass precious variables to config.status.
1825   if test "$ac_new_set" = set; then
1826     case $ac_new_val in
1827     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1828     *) ac_arg=$ac_var=$ac_new_val ;;
1829     esac
1830     case " $ac_configure_args " in
1831       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1832       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1833     esac
1834   fi
1835 done
1836 if $ac_cache_corrupted; then
1837   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1838 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1839   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1840 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1841    { (exit 1); exit 1; }; }
1842 fi
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860 ac_ext=c
1861 ac_cpp='$CPP $CPPFLAGS'
1862 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1863 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1864 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1865
1866
1867 ac_config_headers="$ac_config_headers config.h"
1868
1869
1870 echo "current directory: `pwd`"
1871 echo "command line was: $0 $@"
1872
1873 ###############################################################################
1874 #
1875 #       Autoheader stuff
1876 #
1877 ###############################################################################
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043 # After checking to see that --srcdir is correct (which AC_INIT does)
2044 # check for some random other files that come later in the tar file,
2045 # to make sure everything is here.
2046 #
2047 for d in driver utils hacks hacks/glx ; do
2048   f=$srcdir/$d/Makefile.in
2049   if test \! -r $f ; then
2050     echo ""
2051     echo "ERROR: The package is incomplete: $f does not exist."
2052     echo "       This probably means that your download was truncated."
2053     echo ""
2054     exit 1
2055   fi
2056 done
2057
2058 ###############################################################################
2059 #
2060 #       Function to figure out how to run the compiler.
2061 #
2062 ###############################################################################
2063
2064
2065
2066
2067 ###############################################################################
2068 #
2069 #       Functions to figure out how to disable // comments in ANSI C code.
2070 #
2071 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2072 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2073 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2074 #       so much for compatibility!)
2075 #
2076 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2077 #       declarations preceed statements, without resorting to "-pedantic".
2078 #       This means that there is no way to get gcc3 to issue warnings that
2079 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2080 #       also drowning in totally useless warnings.  Thank you master may I
2081 #       have another.
2082 #
2083 #       So, I give up, let's just use -pedantic.
2084 #
2085 ###############################################################################
2086
2087
2088
2089
2090
2091
2092 ###############################################################################
2093 #
2094 #       Function to figure out how to turn off Objective C on MacOS X.
2095 #       (We have to do this to work around an Apple-specific gcc bug.)
2096 #
2097 ###############################################################################
2098
2099
2100
2101
2102
2103
2104 ###############################################################################
2105 #
2106 #       Function to figure out how to create directory trees.
2107 #
2108 ###############################################################################
2109
2110
2111
2112
2113 ###############################################################################
2114 #
2115 #       Function to check whether gettimeofday() exists, and how to call it.
2116 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2117 #
2118 ###############################################################################
2119
2120
2121
2122
2123 ###############################################################################
2124 #
2125 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2126 #
2127 ###############################################################################
2128
2129 # M4 sucks!!  perl sucks too!!
2130
2131 perl_version_cmd='print $]'
2132
2133
2134
2135
2136
2137 ###############################################################################
2138 #
2139 #       Function to demand "bc".  Losers.
2140 #
2141 ###############################################################################
2142
2143
2144
2145 ###############################################################################
2146 #
2147 #       Functions to check how to do ICMP PING requests.
2148 #
2149 ###############################################################################
2150
2151
2152
2153
2154
2155
2156 ###############################################################################
2157 #
2158 #       Functions to check for various X11 crap.
2159 #
2160 ###############################################################################
2161
2162 # Try and find the app-defaults directory.
2163 # It sucks that autoconf doesn't do this already...
2164 #
2165
2166
2167 ###############################################################################
2168 #
2169 #       Handle the --with-x-app-defaults option HERE
2170 #
2171 ###############################################################################
2172
2173
2174 # Check whether --with-x-app-defaults was given.
2175 if test "${with_x_app_defaults+set}" = set; then
2176   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2177 else
2178   eval ac_x_app_defaults="$withval"
2179 fi
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191 # Random special-cases for X on certain pathological OSes.
2192 # You know who you are.
2193 #
2194
2195
2196
2197
2198 ###############################################################################
2199 #
2200 #       Some utility functions to make checking for X things easier.
2201 #
2202 ###############################################################################
2203
2204 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2205 #
2206
2207
2208 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2209 #
2210
2211
2212 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2213 #
2214
2215
2216
2217 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2218 # Use this sparingly; it probably doesn't work very well on X programs.
2219 #
2220
2221
2222 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2223 # (But not the -L directories!)
2224 #
2225
2226
2227
2228
2229 # Usage: HANDLE_X_PATH_ARG([variable_name],
2230 #                          [--command-line-option],
2231 #                          [descriptive string])
2232 #
2233 # All of the --with options take three forms:
2234 #
2235 #   --with-foo (or --with-foo=yes)
2236 #   --without-foo (or --with-foo=no)
2237 #   --with-foo=/DIR
2238 #
2239 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2240 # a directory (string beginning with a slash) it checks to see whether
2241 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2242 # as appropriate.
2243 #
2244
2245
2246
2247
2248 ###############################################################################
2249 ###############################################################################
2250 #
2251 #       End of function definitions.  Now start actually executing stuff.
2252 #
2253 ###############################################################################
2254 ###############################################################################
2255
2256 # random compiler setup
2257 ac_aux_dir=
2258 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2259   if test -f "$ac_dir/install-sh"; then
2260     ac_aux_dir=$ac_dir
2261     ac_install_sh="$ac_aux_dir/install-sh -c"
2262     break
2263   elif test -f "$ac_dir/install.sh"; then
2264     ac_aux_dir=$ac_dir
2265     ac_install_sh="$ac_aux_dir/install.sh -c"
2266     break
2267   elif test -f "$ac_dir/shtool"; then
2268     ac_aux_dir=$ac_dir
2269     ac_install_sh="$ac_aux_dir/shtool install -c"
2270     break
2271   fi
2272 done
2273 if test -z "$ac_aux_dir"; then
2274   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2275 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2276    { (exit 1); exit 1; }; }
2277 fi
2278
2279 # These three variables are undocumented and unsupported,
2280 # and are intended to be withdrawn in a future Autoconf release.
2281 # They can cause serious problems if a builder's source tree is in a directory
2282 # whose full name contains unusual characters.
2283 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2284 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2285 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2286
2287
2288 # Make sure we can run config.sub.
2289 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2290   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2291 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2292    { (exit 1); exit 1; }; }
2293
2294 { echo "$as_me:$LINENO: checking build system type" >&5
2295 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
2296 if test "${ac_cv_build+set}" = set; then
2297   echo $ECHO_N "(cached) $ECHO_C" >&6
2298 else
2299   ac_build_alias=$build_alias
2300 test "x$ac_build_alias" = x &&
2301   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2302 test "x$ac_build_alias" = x &&
2303   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2304 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2305    { (exit 1); exit 1; }; }
2306 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2307   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2308 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2309    { (exit 1); exit 1; }; }
2310
2311 fi
2312 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2313 echo "${ECHO_T}$ac_cv_build" >&6; }
2314 case $ac_cv_build in
2315 *-*-*) ;;
2316 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2317 echo "$as_me: error: invalid value of canonical build" >&2;}
2318    { (exit 1); exit 1; }; };;
2319 esac
2320 build=$ac_cv_build
2321 ac_save_IFS=$IFS; IFS='-'
2322 set x $ac_cv_build
2323 shift
2324 build_cpu=$1
2325 build_vendor=$2
2326 shift; shift
2327 # Remember, the first character of IFS is used to create $*,
2328 # except with old shells:
2329 build_os=$*
2330 IFS=$ac_save_IFS
2331 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2332
2333
2334 { echo "$as_me:$LINENO: checking host system type" >&5
2335 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
2336 if test "${ac_cv_host+set}" = set; then
2337   echo $ECHO_N "(cached) $ECHO_C" >&6
2338 else
2339   if test "x$host_alias" = x; then
2340   ac_cv_host=$ac_cv_build
2341 else
2342   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2343     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2344 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2345    { (exit 1); exit 1; }; }
2346 fi
2347
2348 fi
2349 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2350 echo "${ECHO_T}$ac_cv_host" >&6; }
2351 case $ac_cv_host in
2352 *-*-*) ;;
2353 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2354 echo "$as_me: error: invalid value of canonical host" >&2;}
2355    { (exit 1); exit 1; }; };;
2356 esac
2357 host=$ac_cv_host
2358 ac_save_IFS=$IFS; IFS='-'
2359 set x $ac_cv_host
2360 shift
2361 host_cpu=$1
2362 host_vendor=$2
2363 shift; shift
2364 # Remember, the first character of IFS is used to create $*,
2365 # except with old shells:
2366 host_os=$*
2367 IFS=$ac_save_IFS
2368 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2369
2370
2371
2372 ac_ext=c
2373 ac_cpp='$CPP $CPPFLAGS'
2374 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2375 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2376 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2377 if test -n "$ac_tool_prefix"; then
2378   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2379 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2380 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2381 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2382 if test "${ac_cv_prog_CC+set}" = set; then
2383   echo $ECHO_N "(cached) $ECHO_C" >&6
2384 else
2385   if test -n "$CC"; then
2386   ac_cv_prog_CC="$CC" # Let the user override the test.
2387 else
2388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2389 for as_dir in $PATH
2390 do
2391   IFS=$as_save_IFS
2392   test -z "$as_dir" && as_dir=.
2393   for ac_exec_ext in '' $ac_executable_extensions; do
2394   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2395     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2396     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2397     break 2
2398   fi
2399 done
2400 done
2401 IFS=$as_save_IFS
2402
2403 fi
2404 fi
2405 CC=$ac_cv_prog_CC
2406 if test -n "$CC"; then
2407   { echo "$as_me:$LINENO: result: $CC" >&5
2408 echo "${ECHO_T}$CC" >&6; }
2409 else
2410   { echo "$as_me:$LINENO: result: no" >&5
2411 echo "${ECHO_T}no" >&6; }
2412 fi
2413
2414
2415 fi
2416 if test -z "$ac_cv_prog_CC"; then
2417   ac_ct_CC=$CC
2418   # Extract the first word of "gcc", so it can be a program name with args.
2419 set dummy gcc; ac_word=$2
2420 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2421 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2422 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2423   echo $ECHO_N "(cached) $ECHO_C" >&6
2424 else
2425   if test -n "$ac_ct_CC"; then
2426   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2427 else
2428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2429 for as_dir in $PATH
2430 do
2431   IFS=$as_save_IFS
2432   test -z "$as_dir" && as_dir=.
2433   for ac_exec_ext in '' $ac_executable_extensions; do
2434   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2435     ac_cv_prog_ac_ct_CC="gcc"
2436     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2437     break 2
2438   fi
2439 done
2440 done
2441 IFS=$as_save_IFS
2442
2443 fi
2444 fi
2445 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2446 if test -n "$ac_ct_CC"; then
2447   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2448 echo "${ECHO_T}$ac_ct_CC" >&6; }
2449 else
2450   { echo "$as_me:$LINENO: result: no" >&5
2451 echo "${ECHO_T}no" >&6; }
2452 fi
2453
2454   if test "x$ac_ct_CC" = x; then
2455     CC=""
2456   else
2457     case $cross_compiling:$ac_tool_warned in
2458 yes:)
2459 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2460 whose name does not start with the host triplet.  If you think this
2461 configuration is useful to you, please write to autoconf@gnu.org." >&5
2462 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2463 whose name does not start with the host triplet.  If you think this
2464 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2465 ac_tool_warned=yes ;;
2466 esac
2467     CC=$ac_ct_CC
2468   fi
2469 else
2470   CC="$ac_cv_prog_CC"
2471 fi
2472
2473 if test -z "$CC"; then
2474           if test -n "$ac_tool_prefix"; then
2475     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2476 set dummy ${ac_tool_prefix}cc; ac_word=$2
2477 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2478 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2479 if test "${ac_cv_prog_CC+set}" = set; then
2480   echo $ECHO_N "(cached) $ECHO_C" >&6
2481 else
2482   if test -n "$CC"; then
2483   ac_cv_prog_CC="$CC" # Let the user override the test.
2484 else
2485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2486 for as_dir in $PATH
2487 do
2488   IFS=$as_save_IFS
2489   test -z "$as_dir" && as_dir=.
2490   for ac_exec_ext in '' $ac_executable_extensions; do
2491   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2492     ac_cv_prog_CC="${ac_tool_prefix}cc"
2493     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2494     break 2
2495   fi
2496 done
2497 done
2498 IFS=$as_save_IFS
2499
2500 fi
2501 fi
2502 CC=$ac_cv_prog_CC
2503 if test -n "$CC"; then
2504   { echo "$as_me:$LINENO: result: $CC" >&5
2505 echo "${ECHO_T}$CC" >&6; }
2506 else
2507   { echo "$as_me:$LINENO: result: no" >&5
2508 echo "${ECHO_T}no" >&6; }
2509 fi
2510
2511
2512   fi
2513 fi
2514 if test -z "$CC"; then
2515   # Extract the first word of "cc", so it can be a program name with args.
2516 set dummy cc; ac_word=$2
2517 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2518 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2519 if test "${ac_cv_prog_CC+set}" = set; then
2520   echo $ECHO_N "(cached) $ECHO_C" >&6
2521 else
2522   if test -n "$CC"; then
2523   ac_cv_prog_CC="$CC" # Let the user override the test.
2524 else
2525   ac_prog_rejected=no
2526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2527 for as_dir in $PATH
2528 do
2529   IFS=$as_save_IFS
2530   test -z "$as_dir" && as_dir=.
2531   for ac_exec_ext in '' $ac_executable_extensions; do
2532   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2533     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2534        ac_prog_rejected=yes
2535        continue
2536      fi
2537     ac_cv_prog_CC="cc"
2538     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2539     break 2
2540   fi
2541 done
2542 done
2543 IFS=$as_save_IFS
2544
2545 if test $ac_prog_rejected = yes; then
2546   # We found a bogon in the path, so make sure we never use it.
2547   set dummy $ac_cv_prog_CC
2548   shift
2549   if test $# != 0; then
2550     # We chose a different compiler from the bogus one.
2551     # However, it has the same basename, so the bogon will be chosen
2552     # first if we set CC to just the basename; use the full file name.
2553     shift
2554     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2555   fi
2556 fi
2557 fi
2558 fi
2559 CC=$ac_cv_prog_CC
2560 if test -n "$CC"; then
2561   { echo "$as_me:$LINENO: result: $CC" >&5
2562 echo "${ECHO_T}$CC" >&6; }
2563 else
2564   { echo "$as_me:$LINENO: result: no" >&5
2565 echo "${ECHO_T}no" >&6; }
2566 fi
2567
2568
2569 fi
2570 if test -z "$CC"; then
2571   if test -n "$ac_tool_prefix"; then
2572   for ac_prog in cl.exe
2573   do
2574     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2575 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2576 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2578 if test "${ac_cv_prog_CC+set}" = set; then
2579   echo $ECHO_N "(cached) $ECHO_C" >&6
2580 else
2581   if test -n "$CC"; then
2582   ac_cv_prog_CC="$CC" # Let the user override the test.
2583 else
2584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2585 for as_dir in $PATH
2586 do
2587   IFS=$as_save_IFS
2588   test -z "$as_dir" && as_dir=.
2589   for ac_exec_ext in '' $ac_executable_extensions; do
2590   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2591     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2592     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2593     break 2
2594   fi
2595 done
2596 done
2597 IFS=$as_save_IFS
2598
2599 fi
2600 fi
2601 CC=$ac_cv_prog_CC
2602 if test -n "$CC"; then
2603   { echo "$as_me:$LINENO: result: $CC" >&5
2604 echo "${ECHO_T}$CC" >&6; }
2605 else
2606   { echo "$as_me:$LINENO: result: no" >&5
2607 echo "${ECHO_T}no" >&6; }
2608 fi
2609
2610
2611     test -n "$CC" && break
2612   done
2613 fi
2614 if test -z "$CC"; then
2615   ac_ct_CC=$CC
2616   for ac_prog in cl.exe
2617 do
2618   # Extract the first word of "$ac_prog", so it can be a program name with args.
2619 set dummy $ac_prog; ac_word=$2
2620 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2621 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2622 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2623   echo $ECHO_N "(cached) $ECHO_C" >&6
2624 else
2625   if test -n "$ac_ct_CC"; then
2626   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2627 else
2628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2629 for as_dir in $PATH
2630 do
2631   IFS=$as_save_IFS
2632   test -z "$as_dir" && as_dir=.
2633   for ac_exec_ext in '' $ac_executable_extensions; do
2634   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2635     ac_cv_prog_ac_ct_CC="$ac_prog"
2636     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2637     break 2
2638   fi
2639 done
2640 done
2641 IFS=$as_save_IFS
2642
2643 fi
2644 fi
2645 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2646 if test -n "$ac_ct_CC"; then
2647   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2648 echo "${ECHO_T}$ac_ct_CC" >&6; }
2649 else
2650   { echo "$as_me:$LINENO: result: no" >&5
2651 echo "${ECHO_T}no" >&6; }
2652 fi
2653
2654
2655   test -n "$ac_ct_CC" && break
2656 done
2657
2658   if test "x$ac_ct_CC" = x; then
2659     CC=""
2660   else
2661     case $cross_compiling:$ac_tool_warned in
2662 yes:)
2663 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2664 whose name does not start with the host triplet.  If you think this
2665 configuration is useful to you, please write to autoconf@gnu.org." >&5
2666 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2667 whose name does not start with the host triplet.  If you think this
2668 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2669 ac_tool_warned=yes ;;
2670 esac
2671     CC=$ac_ct_CC
2672   fi
2673 fi
2674
2675 fi
2676
2677
2678 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2679 See \`config.log' for more details." >&5
2680 echo "$as_me: error: no acceptable C compiler found in \$PATH
2681 See \`config.log' for more details." >&2;}
2682    { (exit 1); exit 1; }; }
2683
2684 # Provide some information about the compiler.
2685 echo "$as_me:$LINENO: checking for C compiler version" >&5
2686 ac_compiler=`set X $ac_compile; echo $2`
2687 { (ac_try="$ac_compiler --version >&5"
2688 case "(($ac_try" in
2689   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690   *) ac_try_echo=$ac_try;;
2691 esac
2692 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2693   (eval "$ac_compiler --version >&5") 2>&5
2694   ac_status=$?
2695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2696   (exit $ac_status); }
2697 { (ac_try="$ac_compiler -v >&5"
2698 case "(($ac_try" in
2699   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2700   *) ac_try_echo=$ac_try;;
2701 esac
2702 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2703   (eval "$ac_compiler -v >&5") 2>&5
2704   ac_status=$?
2705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2706   (exit $ac_status); }
2707 { (ac_try="$ac_compiler -V >&5"
2708 case "(($ac_try" in
2709   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2710   *) ac_try_echo=$ac_try;;
2711 esac
2712 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2713   (eval "$ac_compiler -V >&5") 2>&5
2714   ac_status=$?
2715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2716   (exit $ac_status); }
2717
2718 cat >conftest.$ac_ext <<_ACEOF
2719 /* confdefs.h.  */
2720 _ACEOF
2721 cat confdefs.h >>conftest.$ac_ext
2722 cat >>conftest.$ac_ext <<_ACEOF
2723 /* end confdefs.h.  */
2724
2725 int
2726 main ()
2727 {
2728
2729   ;
2730   return 0;
2731 }
2732 _ACEOF
2733 ac_clean_files_save=$ac_clean_files
2734 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2735 # Try to create an executable without -o first, disregard a.out.
2736 # It will help us diagnose broken compilers, and finding out an intuition
2737 # of exeext.
2738 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2739 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2740 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2741 #
2742 # List of possible output files, starting from the most likely.
2743 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2744 # only as a last resort.  b.out is created by i960 compilers.
2745 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2746 #
2747 # The IRIX 6 linker writes into existing files which may not be
2748 # executable, retaining their permissions.  Remove them first so a
2749 # subsequent execution test works.
2750 ac_rmfiles=
2751 for ac_file in $ac_files
2752 do
2753   case $ac_file in
2754     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2755     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2756   esac
2757 done
2758 rm -f $ac_rmfiles
2759
2760 if { (ac_try="$ac_link_default"
2761 case "(($ac_try" in
2762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2763   *) ac_try_echo=$ac_try;;
2764 esac
2765 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2766   (eval "$ac_link_default") 2>&5
2767   ac_status=$?
2768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2769   (exit $ac_status); }; then
2770   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2771 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2772 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2773 # so that the user can short-circuit this test for compilers unknown to
2774 # Autoconf.
2775 for ac_file in $ac_files
2776 do
2777   test -f "$ac_file" || continue
2778   case $ac_file in
2779     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2780         ;;
2781     [ab].out )
2782         # We found the default executable, but exeext='' is most
2783         # certainly right.
2784         break;;
2785     *.* )
2786         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2787         then :; else
2788            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2789         fi
2790         # We set ac_cv_exeext here because the later test for it is not
2791         # safe: cross compilers may not add the suffix if given an `-o'
2792         # argument, so we may need to know it at that point already.
2793         # Even if this section looks crufty: it has the advantage of
2794         # actually working.
2795         break;;
2796     * )
2797         break;;
2798   esac
2799 done
2800 test "$ac_cv_exeext" = no && ac_cv_exeext=
2801
2802 else
2803   echo "$as_me: failed program was:" >&5
2804 sed 's/^/| /' conftest.$ac_ext >&5
2805
2806 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2807 See \`config.log' for more details." >&5
2808 echo "$as_me: error: C compiler cannot create executables
2809 See \`config.log' for more details." >&2;}
2810    { (exit 77); exit 77; }; }
2811 fi
2812
2813 ac_exeext=$ac_cv_exeext
2814 { echo "$as_me:$LINENO: result: $ac_file" >&5
2815 echo "${ECHO_T}$ac_file" >&6; }
2816
2817 # Check that the compiler produces executables we can run.  If not, either
2818 # the compiler is broken, or we cross compile.
2819 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2820 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2821 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2822 # If not cross compiling, check that we can run a simple program.
2823 if test "$cross_compiling" != yes; then
2824   if { ac_try='./$ac_file'
2825   { (case "(($ac_try" in
2826   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2827   *) ac_try_echo=$ac_try;;
2828 esac
2829 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2830   (eval "$ac_try") 2>&5
2831   ac_status=$?
2832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2833   (exit $ac_status); }; }; then
2834     cross_compiling=no
2835   else
2836     if test "$cross_compiling" = maybe; then
2837         cross_compiling=yes
2838     else
2839         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2840 If you meant to cross compile, use \`--host'.
2841 See \`config.log' for more details." >&5
2842 echo "$as_me: error: cannot run C compiled programs.
2843 If you meant to cross compile, use \`--host'.
2844 See \`config.log' for more details." >&2;}
2845    { (exit 1); exit 1; }; }
2846     fi
2847   fi
2848 fi
2849 { echo "$as_me:$LINENO: result: yes" >&5
2850 echo "${ECHO_T}yes" >&6; }
2851
2852 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2853 ac_clean_files=$ac_clean_files_save
2854 # Check that the compiler produces executables we can run.  If not, either
2855 # the compiler is broken, or we cross compile.
2856 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2857 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2858 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2859 echo "${ECHO_T}$cross_compiling" >&6; }
2860
2861 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2862 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2863 if { (ac_try="$ac_link"
2864 case "(($ac_try" in
2865   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2866   *) ac_try_echo=$ac_try;;
2867 esac
2868 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2869   (eval "$ac_link") 2>&5
2870   ac_status=$?
2871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2872   (exit $ac_status); }; then
2873   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2874 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2875 # work properly (i.e., refer to `conftest.exe'), while it won't with
2876 # `rm'.
2877 for ac_file in conftest.exe conftest conftest.*; do
2878   test -f "$ac_file" || continue
2879   case $ac_file in
2880     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2881     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2882           break;;
2883     * ) break;;
2884   esac
2885 done
2886 else
2887   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2888 See \`config.log' for more details." >&5
2889 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2890 See \`config.log' for more details." >&2;}
2891    { (exit 1); exit 1; }; }
2892 fi
2893
2894 rm -f conftest$ac_cv_exeext
2895 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2896 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2897
2898 rm -f conftest.$ac_ext
2899 EXEEXT=$ac_cv_exeext
2900 ac_exeext=$EXEEXT
2901 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2902 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2903 if test "${ac_cv_objext+set}" = set; then
2904   echo $ECHO_N "(cached) $ECHO_C" >&6
2905 else
2906   cat >conftest.$ac_ext <<_ACEOF
2907 /* confdefs.h.  */
2908 _ACEOF
2909 cat confdefs.h >>conftest.$ac_ext
2910 cat >>conftest.$ac_ext <<_ACEOF
2911 /* end confdefs.h.  */
2912
2913 int
2914 main ()
2915 {
2916
2917   ;
2918   return 0;
2919 }
2920 _ACEOF
2921 rm -f conftest.o conftest.obj
2922 if { (ac_try="$ac_compile"
2923 case "(($ac_try" in
2924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2925   *) ac_try_echo=$ac_try;;
2926 esac
2927 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2928   (eval "$ac_compile") 2>&5
2929   ac_status=$?
2930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2931   (exit $ac_status); }; then
2932   for ac_file in conftest.o conftest.obj conftest.*; do
2933   test -f "$ac_file" || continue;
2934   case $ac_file in
2935     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2936     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2937        break;;
2938   esac
2939 done
2940 else
2941   echo "$as_me: failed program was:" >&5
2942 sed 's/^/| /' conftest.$ac_ext >&5
2943
2944 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2945 See \`config.log' for more details." >&5
2946 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2947 See \`config.log' for more details." >&2;}
2948    { (exit 1); exit 1; }; }
2949 fi
2950
2951 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2952 fi
2953 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2954 echo "${ECHO_T}$ac_cv_objext" >&6; }
2955 OBJEXT=$ac_cv_objext
2956 ac_objext=$OBJEXT
2957 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2958 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2959 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2960   echo $ECHO_N "(cached) $ECHO_C" >&6
2961 else
2962   cat >conftest.$ac_ext <<_ACEOF
2963 /* confdefs.h.  */
2964 _ACEOF
2965 cat confdefs.h >>conftest.$ac_ext
2966 cat >>conftest.$ac_ext <<_ACEOF
2967 /* end confdefs.h.  */
2968
2969 int
2970 main ()
2971 {
2972 #ifndef __GNUC__
2973        choke me
2974 #endif
2975
2976   ;
2977   return 0;
2978 }
2979 _ACEOF
2980 rm -f conftest.$ac_objext
2981 if { (ac_try="$ac_compile"
2982 case "(($ac_try" in
2983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2984   *) ac_try_echo=$ac_try;;
2985 esac
2986 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2987   (eval "$ac_compile") 2>conftest.er1
2988   ac_status=$?
2989   grep -v '^ *+' conftest.er1 >conftest.err
2990   rm -f conftest.er1
2991   cat conftest.err >&5
2992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2993   (exit $ac_status); } &&
2994          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2995   { (case "(($ac_try" in
2996   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2997   *) ac_try_echo=$ac_try;;
2998 esac
2999 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3000   (eval "$ac_try") 2>&5
3001   ac_status=$?
3002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3003   (exit $ac_status); }; } &&
3004          { ac_try='test -s conftest.$ac_objext'
3005   { (case "(($ac_try" in
3006   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3007   *) ac_try_echo=$ac_try;;
3008 esac
3009 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3010   (eval "$ac_try") 2>&5
3011   ac_status=$?
3012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3013   (exit $ac_status); }; }; then
3014   ac_compiler_gnu=yes
3015 else
3016   echo "$as_me: failed program was:" >&5
3017 sed 's/^/| /' conftest.$ac_ext >&5
3018
3019         ac_compiler_gnu=no
3020 fi
3021
3022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3023 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3024
3025 fi
3026 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3027 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3028 GCC=`test $ac_compiler_gnu = yes && echo yes`
3029 ac_test_CFLAGS=${CFLAGS+set}
3030 ac_save_CFLAGS=$CFLAGS
3031 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3032 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3033 if test "${ac_cv_prog_cc_g+set}" = set; then
3034   echo $ECHO_N "(cached) $ECHO_C" >&6
3035 else
3036   ac_save_c_werror_flag=$ac_c_werror_flag
3037    ac_c_werror_flag=yes
3038    ac_cv_prog_cc_g=no
3039    CFLAGS="-g"
3040    cat >conftest.$ac_ext <<_ACEOF
3041 /* confdefs.h.  */
3042 _ACEOF
3043 cat confdefs.h >>conftest.$ac_ext
3044 cat >>conftest.$ac_ext <<_ACEOF
3045 /* end confdefs.h.  */
3046
3047 int
3048 main ()
3049 {
3050
3051   ;
3052   return 0;
3053 }
3054 _ACEOF
3055 rm -f conftest.$ac_objext
3056 if { (ac_try="$ac_compile"
3057 case "(($ac_try" in
3058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3059   *) ac_try_echo=$ac_try;;
3060 esac
3061 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3062   (eval "$ac_compile") 2>conftest.er1
3063   ac_status=$?
3064   grep -v '^ *+' conftest.er1 >conftest.err
3065   rm -f conftest.er1
3066   cat conftest.err >&5
3067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3068   (exit $ac_status); } &&
3069          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3070   { (case "(($ac_try" in
3071   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3072   *) ac_try_echo=$ac_try;;
3073 esac
3074 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3075   (eval "$ac_try") 2>&5
3076   ac_status=$?
3077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3078   (exit $ac_status); }; } &&
3079          { ac_try='test -s conftest.$ac_objext'
3080   { (case "(($ac_try" in
3081   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3082   *) ac_try_echo=$ac_try;;
3083 esac
3084 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3085   (eval "$ac_try") 2>&5
3086   ac_status=$?
3087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3088   (exit $ac_status); }; }; then
3089   ac_cv_prog_cc_g=yes
3090 else
3091   echo "$as_me: failed program was:" >&5
3092 sed 's/^/| /' conftest.$ac_ext >&5
3093
3094         CFLAGS=""
3095       cat >conftest.$ac_ext <<_ACEOF
3096 /* confdefs.h.  */
3097 _ACEOF
3098 cat confdefs.h >>conftest.$ac_ext
3099 cat >>conftest.$ac_ext <<_ACEOF
3100 /* end confdefs.h.  */
3101
3102 int
3103 main ()
3104 {
3105
3106   ;
3107   return 0;
3108 }
3109 _ACEOF
3110 rm -f conftest.$ac_objext
3111 if { (ac_try="$ac_compile"
3112 case "(($ac_try" in
3113   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3114   *) ac_try_echo=$ac_try;;
3115 esac
3116 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3117   (eval "$ac_compile") 2>conftest.er1
3118   ac_status=$?
3119   grep -v '^ *+' conftest.er1 >conftest.err
3120   rm -f conftest.er1
3121   cat conftest.err >&5
3122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3123   (exit $ac_status); } &&
3124          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3125   { (case "(($ac_try" in
3126   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3127   *) ac_try_echo=$ac_try;;
3128 esac
3129 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3130   (eval "$ac_try") 2>&5
3131   ac_status=$?
3132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3133   (exit $ac_status); }; } &&
3134          { ac_try='test -s conftest.$ac_objext'
3135   { (case "(($ac_try" in
3136   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3137   *) ac_try_echo=$ac_try;;
3138 esac
3139 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3140   (eval "$ac_try") 2>&5
3141   ac_status=$?
3142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3143   (exit $ac_status); }; }; then
3144   :
3145 else
3146   echo "$as_me: failed program was:" >&5
3147 sed 's/^/| /' conftest.$ac_ext >&5
3148
3149         ac_c_werror_flag=$ac_save_c_werror_flag
3150          CFLAGS="-g"
3151          cat >conftest.$ac_ext <<_ACEOF
3152 /* confdefs.h.  */
3153 _ACEOF
3154 cat confdefs.h >>conftest.$ac_ext
3155 cat >>conftest.$ac_ext <<_ACEOF
3156 /* end confdefs.h.  */
3157
3158 int
3159 main ()
3160 {
3161
3162   ;
3163   return 0;
3164 }
3165 _ACEOF
3166 rm -f conftest.$ac_objext
3167 if { (ac_try="$ac_compile"
3168 case "(($ac_try" in
3169   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3170   *) ac_try_echo=$ac_try;;
3171 esac
3172 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3173   (eval "$ac_compile") 2>conftest.er1
3174   ac_status=$?
3175   grep -v '^ *+' conftest.er1 >conftest.err
3176   rm -f conftest.er1
3177   cat conftest.err >&5
3178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3179   (exit $ac_status); } &&
3180          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3181   { (case "(($ac_try" in
3182   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3183   *) ac_try_echo=$ac_try;;
3184 esac
3185 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3186   (eval "$ac_try") 2>&5
3187   ac_status=$?
3188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3189   (exit $ac_status); }; } &&
3190          { ac_try='test -s conftest.$ac_objext'
3191   { (case "(($ac_try" in
3192   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3193   *) ac_try_echo=$ac_try;;
3194 esac
3195 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3196   (eval "$ac_try") 2>&5
3197   ac_status=$?
3198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3199   (exit $ac_status); }; }; then
3200   ac_cv_prog_cc_g=yes
3201 else
3202   echo "$as_me: failed program was:" >&5
3203 sed 's/^/| /' conftest.$ac_ext >&5
3204
3205
3206 fi
3207
3208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3209 fi
3210
3211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3212 fi
3213
3214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3215    ac_c_werror_flag=$ac_save_c_werror_flag
3216 fi
3217 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3218 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3219 if test "$ac_test_CFLAGS" = set; then
3220   CFLAGS=$ac_save_CFLAGS
3221 elif test $ac_cv_prog_cc_g = yes; then
3222   if test "$GCC" = yes; then
3223     CFLAGS="-g -O2"
3224   else
3225     CFLAGS="-g"
3226   fi
3227 else
3228   if test "$GCC" = yes; then
3229     CFLAGS="-O2"
3230   else
3231     CFLAGS=
3232   fi
3233 fi
3234 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3235 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3236 if test "${ac_cv_prog_cc_c89+set}" = set; then
3237   echo $ECHO_N "(cached) $ECHO_C" >&6
3238 else
3239   ac_cv_prog_cc_c89=no
3240 ac_save_CC=$CC
3241 cat >conftest.$ac_ext <<_ACEOF
3242 /* confdefs.h.  */
3243 _ACEOF
3244 cat confdefs.h >>conftest.$ac_ext
3245 cat >>conftest.$ac_ext <<_ACEOF
3246 /* end confdefs.h.  */
3247 #include <stdarg.h>
3248 #include <stdio.h>
3249 #include <sys/types.h>
3250 #include <sys/stat.h>
3251 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3252 struct buf { int x; };
3253 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3254 static char *e (p, i)
3255      char **p;
3256      int i;
3257 {
3258   return p[i];
3259 }
3260 static char *f (char * (*g) (char **, int), char **p, ...)
3261 {
3262   char *s;
3263   va_list v;
3264   va_start (v,p);
3265   s = g (p, va_arg (v,int));
3266   va_end (v);
3267   return s;
3268 }
3269
3270 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3271    function prototypes and stuff, but not '\xHH' hex character constants.
3272    These don't provoke an error unfortunately, instead are silently treated
3273    as 'x'.  The following induces an error, until -std is added to get
3274    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3275    array size at least.  It's necessary to write '\x00'==0 to get something
3276    that's true only with -std.  */
3277 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3278
3279 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3280    inside strings and character constants.  */
3281 #define FOO(x) 'x'
3282 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3283
3284 int test (int i, double x);
3285 struct s1 {int (*f) (int a);};
3286 struct s2 {int (*f) (double a);};
3287 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3288 int argc;
3289 char **argv;
3290 int
3291 main ()
3292 {
3293 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3294   ;
3295   return 0;
3296 }
3297 _ACEOF
3298 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3299         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3300 do
3301   CC="$ac_save_CC $ac_arg"
3302   rm -f conftest.$ac_objext
3303 if { (ac_try="$ac_compile"
3304 case "(($ac_try" in
3305   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3306   *) ac_try_echo=$ac_try;;
3307 esac
3308 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3309   (eval "$ac_compile") 2>conftest.er1
3310   ac_status=$?
3311   grep -v '^ *+' conftest.er1 >conftest.err
3312   rm -f conftest.er1
3313   cat conftest.err >&5
3314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3315   (exit $ac_status); } &&
3316          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3317   { (case "(($ac_try" in
3318   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3319   *) ac_try_echo=$ac_try;;
3320 esac
3321 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3322   (eval "$ac_try") 2>&5
3323   ac_status=$?
3324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3325   (exit $ac_status); }; } &&
3326          { ac_try='test -s conftest.$ac_objext'
3327   { (case "(($ac_try" in
3328   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3329   *) ac_try_echo=$ac_try;;
3330 esac
3331 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3332   (eval "$ac_try") 2>&5
3333   ac_status=$?
3334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3335   (exit $ac_status); }; }; then
3336   ac_cv_prog_cc_c89=$ac_arg
3337 else
3338   echo "$as_me: failed program was:" >&5
3339 sed 's/^/| /' conftest.$ac_ext >&5
3340
3341
3342 fi
3343
3344 rm -f core conftest.err conftest.$ac_objext
3345   test "x$ac_cv_prog_cc_c89" != "xno" && break
3346 done
3347 rm -f conftest.$ac_ext
3348 CC=$ac_save_CC
3349
3350 fi
3351 # AC_CACHE_VAL
3352 case "x$ac_cv_prog_cc_c89" in
3353   x)
3354     { echo "$as_me:$LINENO: result: none needed" >&5
3355 echo "${ECHO_T}none needed" >&6; } ;;
3356   xno)
3357     { echo "$as_me:$LINENO: result: unsupported" >&5
3358 echo "${ECHO_T}unsupported" >&6; } ;;
3359   *)
3360     CC="$CC $ac_cv_prog_cc_c89"
3361     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3362 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3363 esac
3364
3365
3366 ac_ext=c
3367 ac_cpp='$CPP $CPPFLAGS'
3368 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3369 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3370 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3371
3372
3373   if test -z "$GCC"; then
3374     # not using GCC
3375     { echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3376 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6; }
3377     case "$host" in
3378       *-hpux* )
3379         { echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3380 echo "${ECHO_T}HPUX: adding -Ae" >&6; }
3381         CC="$CC -Ae"
3382       ;;
3383       *-aix* )
3384         { echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3385 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3386         CC="$CC -qlanglvl=ansi -qhalt=e"
3387       ;;
3388       *-dec-* )
3389         { echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3390 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6; }
3391         CC="$CC -std1"
3392       ;;
3393       *)
3394         { echo "$as_me:$LINENO: result: no idea" >&5
3395 echo "${ECHO_T}no idea" >&6; }
3396       ;;
3397     esac
3398   else
3399     # using GCC
3400     case "$host" in
3401       *-solaris*)
3402         { echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3403 echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6; }
3404         CC="$CC -D__EXTENSIONS__"
3405       ;;
3406     esac
3407   fi
3408
3409   OBJCC="$CC"
3410
3411   { echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3412 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6; }
3413   if test "$cross_compiling" = yes; then
3414   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3415 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3416    { (exit 1); exit 1; }; }
3417 else
3418   cat >conftest.$ac_ext <<_ACEOF
3419 /* confdefs.h.  */
3420 _ACEOF
3421 cat confdefs.h >>conftest.$ac_ext
3422 cat >>conftest.$ac_ext <<_ACEOF
3423 /* end confdefs.h.  */
3424  main(int ac, char **av) { return 0; }
3425 _ACEOF
3426 rm -f conftest$ac_exeext
3427 if { (ac_try="$ac_link"
3428 case "(($ac_try" in
3429   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3430   *) ac_try_echo=$ac_try;;
3431 esac
3432 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3433   (eval "$ac_link") 2>&5
3434   ac_status=$?
3435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3436   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3437   { (case "(($ac_try" in
3438   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3439   *) ac_try_echo=$ac_try;;
3440 esac
3441 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3442   (eval "$ac_try") 2>&5
3443   ac_status=$?
3444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3445   (exit $ac_status); }; }; then
3446   { echo "$as_me:$LINENO: result: yes" >&5
3447 echo "${ECHO_T}yes" >&6; }
3448 else
3449   echo "$as_me: program exited with status $ac_status" >&5
3450 echo "$as_me: failed program was:" >&5
3451 sed 's/^/| /' conftest.$ac_ext >&5
3452
3453 ( exit $ac_status )
3454 { echo "$as_me:$LINENO: result: no" >&5
3455 echo "${ECHO_T}no" >&6; }
3456      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3457 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3458    { (exit 1); exit 1; }; }
3459 fi
3460 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3461 fi
3462
3463
3464
3465   if test -n "$GCC"; then
3466     { echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3467 echo "${ECHO_T}Turning on gcc compiler warnings." >&6; }
3468     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3469     OBJCC="$OBJCC -Wall"
3470     # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
3471     # and then perhaps we can do without -pedantic?
3472   else
3473     case "$host" in
3474       *-irix5* |*-irix6.0-3* )
3475         { echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3476 echo "${ECHO_T}Turning on SGI compiler warnings." >&6; }
3477         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3478       ;;
3479 #     *-dec-osf* )
3480 #       if test -z "$GCC"; then
3481 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3482 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3483 #       fi
3484 #     ;;
3485     esac
3486   fi
3487
3488 if test -n "$GCC"; then
3489    if test -n "$GCC"; then
3490    { echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
3491 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6; }
3492 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3493   echo $ECHO_N "(cached) $ECHO_C" >&6
3494 else
3495   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
3496           grep unrecognized >/dev/null ); then
3497        ac_cv_gcc_accepts_std=no
3498      else
3499        ac_cv_gcc_accepts_std=yes
3500      fi
3501 fi
3502 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3503 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6; }
3504    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3505   fi
3506
3507    { echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3508 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6; }
3509    #
3510    # The reason that // comments are banned from xscreensaver is that gcc is
3511    # basically the only compiler in the world that supports them in C code.
3512    # All other vendors support them only in their C++ compilers, not in their
3513    # ANSI C compilers.  This means that it's a portability problem: every time
3514    # these comments have snuck into the xscreensaver source code, I've gotten
3515    # complaints about it the next day.  So we turn off support for them in gcc
3516    # as well to prevent them from accidentially slipping in.
3517    #
3518    if test "$ac_gcc_accepts_std" = yes ; then
3519      #
3520      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3521      # (That appears to be the only additional preprocessor symbol
3522      # it defines, in addition to the syntax changes it makes.)
3523      #
3524      # -std=gnu89 is no good, because // comments were a GNU extension
3525      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3526      # with -std=gnu89 but not with -std=c89.)
3527      #
3528      CC="$CC -std=c89 -U__STRICT_ANSI__"
3529    else
3530      # The old way:
3531      CC="$CC -Wp,-lang-c89"
3532    fi
3533   fi
3534
3535 if test -n "$GCC"; then
3536    if test -n "$GCC"; then
3537    { echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3538 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6; }
3539 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3540   echo $ECHO_N "(cached) $ECHO_C" >&6
3541 else
3542   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
3543           grep unrecognized >/dev/null ); then
3544        ac_cv_gcc_accepts_no_cpp_precomp=no
3545      else
3546        ac_cv_gcc_accepts_no_cpp_precomp=yes
3547      fi
3548 fi
3549 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3550 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3551    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3552   fi
3553
3554    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
3555      { echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
3556 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6; }
3557      CC="$CC -no-cpp-precomp"
3558    fi
3559   fi
3560
3561 ac_ext=c
3562 ac_cpp='$CPP $CPPFLAGS'
3563 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3564 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3565 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3566 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3567 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3568 # On Suns, sometimes $CPP names a directory.
3569 if test -n "$CPP" && test -d "$CPP"; then
3570   CPP=
3571 fi
3572 if test -z "$CPP"; then
3573   if test "${ac_cv_prog_CPP+set}" = set; then
3574   echo $ECHO_N "(cached) $ECHO_C" >&6
3575 else
3576       # Double quotes because CPP needs to be expanded
3577     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3578     do
3579       ac_preproc_ok=false
3580 for ac_c_preproc_warn_flag in '' yes
3581 do
3582   # Use a header file that comes with gcc, so configuring glibc
3583   # with a fresh cross-compiler works.
3584   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3585   # <limits.h> exists even on freestanding compilers.
3586   # On the NeXT, cc -E runs the code through the compiler's parser,
3587   # not just through cpp. "Syntax error" is here to catch this case.
3588   cat >conftest.$ac_ext <<_ACEOF
3589 /* confdefs.h.  */
3590 _ACEOF
3591 cat confdefs.h >>conftest.$ac_ext
3592 cat >>conftest.$ac_ext <<_ACEOF
3593 /* end confdefs.h.  */
3594 #ifdef __STDC__
3595 # include <limits.h>
3596 #else
3597 # include <assert.h>
3598 #endif
3599                      Syntax error
3600 _ACEOF
3601 if { (ac_try="$ac_cpp conftest.$ac_ext"
3602 case "(($ac_try" in
3603   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3604   *) ac_try_echo=$ac_try;;
3605 esac
3606 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3607   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3608   ac_status=$?
3609   grep -v '^ *+' conftest.er1 >conftest.err
3610   rm -f conftest.er1
3611   cat conftest.err >&5
3612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3613   (exit $ac_status); } >/dev/null; then
3614   if test -s conftest.err; then
3615     ac_cpp_err=$ac_c_preproc_warn_flag
3616     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3617   else
3618     ac_cpp_err=
3619   fi
3620 else
3621   ac_cpp_err=yes
3622 fi
3623 if test -z "$ac_cpp_err"; then
3624   :
3625 else
3626   echo "$as_me: failed program was:" >&5
3627 sed 's/^/| /' conftest.$ac_ext >&5
3628
3629   # Broken: fails on valid input.
3630 continue
3631 fi
3632
3633 rm -f conftest.err conftest.$ac_ext
3634
3635   # OK, works on sane cases.  Now check whether nonexistent headers
3636   # can be detected and how.
3637   cat >conftest.$ac_ext <<_ACEOF
3638 /* confdefs.h.  */
3639 _ACEOF
3640 cat confdefs.h >>conftest.$ac_ext
3641 cat >>conftest.$ac_ext <<_ACEOF
3642 /* end confdefs.h.  */
3643 #include <ac_nonexistent.h>
3644 _ACEOF
3645 if { (ac_try="$ac_cpp conftest.$ac_ext"
3646 case "(($ac_try" in
3647   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3648   *) ac_try_echo=$ac_try;;
3649 esac
3650 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3651   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3652   ac_status=$?
3653   grep -v '^ *+' conftest.er1 >conftest.err
3654   rm -f conftest.er1
3655   cat conftest.err >&5
3656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3657   (exit $ac_status); } >/dev/null; then
3658   if test -s conftest.err; then
3659     ac_cpp_err=$ac_c_preproc_warn_flag
3660     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3661   else
3662     ac_cpp_err=
3663   fi
3664 else
3665   ac_cpp_err=yes
3666 fi
3667 if test -z "$ac_cpp_err"; then
3668   # Broken: success on invalid input.
3669 continue
3670 else
3671   echo "$as_me: failed program was:" >&5
3672 sed 's/^/| /' conftest.$ac_ext >&5
3673
3674   # Passes both tests.
3675 ac_preproc_ok=:
3676 break
3677 fi
3678
3679 rm -f conftest.err conftest.$ac_ext
3680
3681 done
3682 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3683 rm -f conftest.err conftest.$ac_ext
3684 if $ac_preproc_ok; then
3685   break
3686 fi
3687
3688     done
3689     ac_cv_prog_CPP=$CPP
3690
3691 fi
3692   CPP=$ac_cv_prog_CPP
3693 else
3694   ac_cv_prog_CPP=$CPP
3695 fi
3696 { echo "$as_me:$LINENO: result: $CPP" >&5
3697 echo "${ECHO_T}$CPP" >&6; }
3698 ac_preproc_ok=false
3699 for ac_c_preproc_warn_flag in '' yes
3700 do
3701   # Use a header file that comes with gcc, so configuring glibc
3702   # with a fresh cross-compiler works.
3703   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3704   # <limits.h> exists even on freestanding compilers.
3705   # On the NeXT, cc -E runs the code through the compiler's parser,
3706   # not just through cpp. "Syntax error" is here to catch this case.
3707   cat >conftest.$ac_ext <<_ACEOF
3708 /* confdefs.h.  */
3709 _ACEOF
3710 cat confdefs.h >>conftest.$ac_ext
3711 cat >>conftest.$ac_ext <<_ACEOF
3712 /* end confdefs.h.  */
3713 #ifdef __STDC__
3714 # include <limits.h>
3715 #else
3716 # include <assert.h>
3717 #endif
3718                      Syntax error
3719 _ACEOF
3720 if { (ac_try="$ac_cpp conftest.$ac_ext"
3721 case "(($ac_try" in
3722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3723   *) ac_try_echo=$ac_try;;
3724 esac
3725 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3726   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3727   ac_status=$?
3728   grep -v '^ *+' conftest.er1 >conftest.err
3729   rm -f conftest.er1
3730   cat conftest.err >&5
3731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3732   (exit $ac_status); } >/dev/null; then
3733   if test -s conftest.err; then
3734     ac_cpp_err=$ac_c_preproc_warn_flag
3735     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3736   else
3737     ac_cpp_err=
3738   fi
3739 else
3740   ac_cpp_err=yes
3741 fi
3742 if test -z "$ac_cpp_err"; then
3743   :
3744 else
3745   echo "$as_me: failed program was:" >&5
3746 sed 's/^/| /' conftest.$ac_ext >&5
3747
3748   # Broken: fails on valid input.
3749 continue
3750 fi
3751
3752 rm -f conftest.err conftest.$ac_ext
3753
3754   # OK, works on sane cases.  Now check whether nonexistent headers
3755   # can be detected and how.
3756   cat >conftest.$ac_ext <<_ACEOF
3757 /* confdefs.h.  */
3758 _ACEOF
3759 cat confdefs.h >>conftest.$ac_ext
3760 cat >>conftest.$ac_ext <<_ACEOF
3761 /* end confdefs.h.  */
3762 #include <ac_nonexistent.h>
3763 _ACEOF
3764 if { (ac_try="$ac_cpp conftest.$ac_ext"
3765 case "(($ac_try" in
3766   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3767   *) ac_try_echo=$ac_try;;
3768 esac
3769 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3770   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3771   ac_status=$?
3772   grep -v '^ *+' conftest.er1 >conftest.err
3773   rm -f conftest.er1
3774   cat conftest.err >&5
3775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3776   (exit $ac_status); } >/dev/null; then
3777   if test -s conftest.err; then
3778     ac_cpp_err=$ac_c_preproc_warn_flag
3779     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3780   else
3781     ac_cpp_err=
3782   fi
3783 else
3784   ac_cpp_err=yes
3785 fi
3786 if test -z "$ac_cpp_err"; then
3787   # Broken: success on invalid input.
3788 continue
3789 else
3790   echo "$as_me: failed program was:" >&5
3791 sed 's/^/| /' conftest.$ac_ext >&5
3792
3793   # Passes both tests.
3794 ac_preproc_ok=:
3795 break
3796 fi
3797
3798 rm -f conftest.err conftest.$ac_ext
3799
3800 done
3801 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3802 rm -f conftest.err conftest.$ac_ext
3803 if $ac_preproc_ok; then
3804   :
3805 else
3806   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3807 See \`config.log' for more details." >&5
3808 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3809 See \`config.log' for more details." >&2;}
3810    { (exit 1); exit 1; }; }
3811 fi
3812
3813 ac_ext=c
3814 ac_cpp='$CPP $CPPFLAGS'
3815 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3816 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3817 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3818
3819 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3820 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
3821 if test "${ac_cv_c_const+set}" = set; then
3822   echo $ECHO_N "(cached) $ECHO_C" >&6
3823 else
3824   cat >conftest.$ac_ext <<_ACEOF
3825 /* confdefs.h.  */
3826 _ACEOF
3827 cat confdefs.h >>conftest.$ac_ext
3828 cat >>conftest.$ac_ext <<_ACEOF
3829 /* end confdefs.h.  */
3830
3831 int
3832 main ()
3833 {
3834 /* FIXME: Include the comments suggested by Paul. */
3835 #ifndef __cplusplus
3836   /* Ultrix mips cc rejects this.  */
3837   typedef int charset[2];
3838   const charset x;
3839   /* SunOS 4.1.1 cc rejects this.  */
3840   char const *const *ccp;
3841   char **p;
3842   /* NEC SVR4.0.2 mips cc rejects this.  */
3843   struct point {int x, y;};
3844   static struct point const zero = {0,0};
3845   /* AIX XL C 1.02.0.0 rejects this.
3846      It does not let you subtract one const X* pointer from another in
3847      an arm of an if-expression whose if-part is not a constant
3848      expression */
3849   const char *g = "string";
3850   ccp = &g + (g ? g-g : 0);
3851   /* HPUX 7.0 cc rejects these. */
3852   ++ccp;
3853   p = (char**) ccp;
3854   ccp = (char const *const *) p;
3855   { /* SCO 3.2v4 cc rejects this.  */
3856     char *t;
3857     char const *s = 0 ? (char *) 0 : (char const *) 0;
3858
3859     *t++ = 0;
3860     if (s) return 0;
3861   }
3862   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3863     int x[] = {25, 17};
3864     const int *foo = &x[0];
3865     ++foo;
3866   }
3867   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3868     typedef const int *iptr;
3869     iptr p = 0;
3870     ++p;
3871   }
3872   { /* AIX XL C 1.02.0.0 rejects this saying
3873        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3874     struct s { int j; const int *ap[3]; };
3875     struct s *b; b->j = 5;
3876   }
3877   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3878     const int foo = 10;
3879     if (!foo) return 0;
3880   }
3881   return !x[0] && !zero.x;
3882 #endif
3883
3884   ;
3885   return 0;
3886 }
3887 _ACEOF
3888 rm -f conftest.$ac_objext
3889 if { (ac_try="$ac_compile"
3890 case "(($ac_try" in
3891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3892   *) ac_try_echo=$ac_try;;
3893 esac
3894 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3895   (eval "$ac_compile") 2>conftest.er1
3896   ac_status=$?
3897   grep -v '^ *+' conftest.er1 >conftest.err
3898   rm -f conftest.er1
3899   cat conftest.err >&5
3900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3901   (exit $ac_status); } &&
3902          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3903   { (case "(($ac_try" in
3904   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3905   *) ac_try_echo=$ac_try;;
3906 esac
3907 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3908   (eval "$ac_try") 2>&5
3909   ac_status=$?
3910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3911   (exit $ac_status); }; } &&
3912          { ac_try='test -s conftest.$ac_objext'
3913   { (case "(($ac_try" in
3914   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3915   *) ac_try_echo=$ac_try;;
3916 esac
3917 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3918   (eval "$ac_try") 2>&5
3919   ac_status=$?
3920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3921   (exit $ac_status); }; }; then
3922   ac_cv_c_const=yes
3923 else
3924   echo "$as_me: failed program was:" >&5
3925 sed 's/^/| /' conftest.$ac_ext >&5
3926
3927         ac_cv_c_const=no
3928 fi
3929
3930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3931 fi
3932 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3933 echo "${ECHO_T}$ac_cv_c_const" >&6; }
3934 if test $ac_cv_c_const = no; then
3935
3936 cat >>confdefs.h <<\_ACEOF
3937 #define const
3938 _ACEOF
3939
3940 fi
3941
3942 { echo "$as_me:$LINENO: checking for inline" >&5
3943 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
3944 if test "${ac_cv_c_inline+set}" = set; then
3945   echo $ECHO_N "(cached) $ECHO_C" >&6
3946 else
3947   ac_cv_c_inline=no
3948 for ac_kw in inline __inline__ __inline; do
3949   cat >conftest.$ac_ext <<_ACEOF
3950 /* confdefs.h.  */
3951 _ACEOF
3952 cat confdefs.h >>conftest.$ac_ext
3953 cat >>conftest.$ac_ext <<_ACEOF
3954 /* end confdefs.h.  */
3955 #ifndef __cplusplus
3956 typedef int foo_t;
3957 static $ac_kw foo_t static_foo () {return 0; }
3958 $ac_kw foo_t foo () {return 0; }
3959 #endif
3960
3961 _ACEOF
3962 rm -f conftest.$ac_objext
3963 if { (ac_try="$ac_compile"
3964 case "(($ac_try" in
3965   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3966   *) ac_try_echo=$ac_try;;
3967 esac
3968 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3969   (eval "$ac_compile") 2>conftest.er1
3970   ac_status=$?
3971   grep -v '^ *+' conftest.er1 >conftest.err
3972   rm -f conftest.er1
3973   cat conftest.err >&5
3974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3975   (exit $ac_status); } &&
3976          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3977   { (case "(($ac_try" in
3978   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3979   *) ac_try_echo=$ac_try;;
3980 esac
3981 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3982   (eval "$ac_try") 2>&5
3983   ac_status=$?
3984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3985   (exit $ac_status); }; } &&
3986          { ac_try='test -s conftest.$ac_objext'
3987   { (case "(($ac_try" in
3988   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3989   *) ac_try_echo=$ac_try;;
3990 esac
3991 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3992   (eval "$ac_try") 2>&5
3993   ac_status=$?
3994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3995   (exit $ac_status); }; }; then
3996   ac_cv_c_inline=$ac_kw
3997 else
3998   echo "$as_me: failed program was:" >&5
3999 sed 's/^/| /' conftest.$ac_ext >&5
4000
4001
4002 fi
4003
4004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4005   test "$ac_cv_c_inline" != no && break
4006 done
4007
4008 fi
4009 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
4010 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
4011
4012
4013 case $ac_cv_c_inline in
4014   inline | yes) ;;
4015   *)
4016     case $ac_cv_c_inline in
4017       no) ac_val=;;
4018       *) ac_val=$ac_cv_c_inline;;
4019     esac
4020     cat >>confdefs.h <<_ACEOF
4021 #ifndef __cplusplus
4022 #define inline $ac_val
4023 #endif
4024 _ACEOF
4025     ;;
4026 esac
4027
4028
4029 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
4030   { echo "$as_me:$LINENO: checking for bc" >&5
4031 echo $ECHO_N "checking for bc... $ECHO_C" >&6; }
4032   if test "$ac_bc_result" = "15" ; then
4033     { echo "$as_me:$LINENO: result: yes" >&5
4034 echo "${ECHO_T}yes" >&6; }
4035   else
4036     { echo "$as_me:$LINENO: result: no" >&5
4037 echo "${ECHO_T}no" >&6; }
4038     echo ''
4039     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
4040                   part of Unix since the 1970s.  Come back when your vendor
4041                   has grown a clue." >&5
4042 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
4043                   part of Unix since the 1970s.  Come back when your vendor
4044                   has grown a clue." >&2;}
4045    { (exit 1); exit 1; }; }
4046   fi
4047
4048
4049 # stuff for Makefiles
4050 # Find a good install program.  We prefer a C program (faster),
4051 # so one script is as good as another.  But avoid the broken or
4052 # incompatible versions:
4053 # SysV /etc/install, /usr/sbin/install
4054 # SunOS /usr/etc/install
4055 # IRIX /sbin/install
4056 # AIX /bin/install
4057 # AmigaOS /C/install, which installs bootblocks on floppy discs
4058 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4059 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4060 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4061 # OS/2's system install, which has a completely different semantic
4062 # ./install, which can be erroneously created by make from ./install.sh.
4063 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4064 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
4065 if test -z "$INSTALL"; then
4066 if test "${ac_cv_path_install+set}" = set; then
4067   echo $ECHO_N "(cached) $ECHO_C" >&6
4068 else
4069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4070 for as_dir in $PATH
4071 do
4072   IFS=$as_save_IFS
4073   test -z "$as_dir" && as_dir=.
4074   # Account for people who put trailing slashes in PATH elements.
4075 case $as_dir/ in
4076   ./ | .// | /cC/* | \
4077   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4078   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4079   /usr/ucb/* ) ;;
4080   *)
4081     # OSF1 and SCO ODT 3.0 have their own names for install.
4082     # Don't use installbsd from OSF since it installs stuff as root
4083     # by default.
4084     for ac_prog in ginstall scoinst install; do
4085       for ac_exec_ext in '' $ac_executable_extensions; do
4086         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
4087           if test $ac_prog = install &&
4088             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4089             # AIX install.  It has an incompatible calling convention.
4090             :
4091           elif test $ac_prog = install &&
4092             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4093             # program-specific install script used by HP pwplus--don't use.
4094             :
4095           else
4096             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4097             break 3
4098           fi
4099         fi
4100       done
4101     done
4102     ;;
4103 esac
4104 done
4105 IFS=$as_save_IFS
4106
4107
4108 fi
4109   if test "${ac_cv_path_install+set}" = set; then
4110     INSTALL=$ac_cv_path_install
4111   else
4112     # As a last resort, use the slow shell script.  Don't cache a
4113     # value for INSTALL within a source directory, because that will
4114     # break other packages using the cache if that directory is
4115     # removed, or if the value is a relative name.
4116     INSTALL=$ac_install_sh
4117   fi
4118 fi
4119 { echo "$as_me:$LINENO: result: $INSTALL" >&5
4120 echo "${ECHO_T}$INSTALL" >&6; }
4121
4122 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4123 # It thinks the first close brace ends the variable substitution.
4124 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4125
4126 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4127
4128 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4129
4130 { echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4131 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6; }
4132 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4133   echo $ECHO_N "(cached) $ECHO_C" >&6
4134 else
4135   ac_cv_install_d_creates_dirs=no
4136      rm -rf conftestdir
4137      if mkdir conftestdir; then
4138        cd conftestdir 2>/dev/null
4139        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4140        if test -d dir1/dir2/. ; then
4141          ac_cv_install_d_creates_dirs=yes
4142        fi
4143        cd .. 2>/dev/null
4144        rm -rf conftestdir
4145      fi
4146
4147 fi
4148 { echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4149 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6; }
4150
4151   if test "$ac_cv_install_d_creates_dirs" = no ; then
4152     { echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4153 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6; }
4154 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4155   echo $ECHO_N "(cached) $ECHO_C" >&6
4156 else
4157   ac_cv_mkdir_p_creates_dirs=no
4158        rm -rf conftestdir
4159        if mkdir conftestdir; then
4160          cd conftestdir 2>/dev/null
4161          mkdir -p dir1/dir2 >/dev/null 2>&1
4162          if test -d dir1/dir2/. ; then
4163            ac_cv_mkdir_p_creates_dirs=yes
4164          fi
4165          cd .. 2>/dev/null
4166          rm -rf conftestdir
4167        fi
4168
4169 fi
4170 { echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4171 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6; }
4172   fi
4173
4174   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4175     INSTALL_DIRS='${INSTALL} -d'
4176   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4177     INSTALL_DIRS='mkdir -p'
4178   else
4179     # any other ideas?
4180     INSTALL_DIRS='${INSTALL} -d'
4181   fi
4182
4183 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4184 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
4185 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4186 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4187   echo $ECHO_N "(cached) $ECHO_C" >&6
4188 else
4189   cat >conftest.make <<\_ACEOF
4190 SHELL = /bin/sh
4191 all:
4192         @echo '@@@%%%=$(MAKE)=@@@%%%'
4193 _ACEOF
4194 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4195 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4196   *@@@%%%=?*=@@@%%%*)
4197     eval ac_cv_prog_make_${ac_make}_set=yes;;
4198   *)
4199     eval ac_cv_prog_make_${ac_make}_set=no;;
4200 esac
4201 rm -f conftest.make
4202 fi
4203 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4204   { echo "$as_me:$LINENO: result: yes" >&5
4205 echo "${ECHO_T}yes" >&6; }
4206   SET_MAKE=
4207 else
4208   { echo "$as_me:$LINENO: result: no" >&5
4209 echo "${ECHO_T}no" >&6; }
4210   SET_MAKE="MAKE=${MAKE-make}"
4211 fi
4212
4213
4214 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4215 # That's wrong: it should be set to '${INSTALL}', so that one can
4216 # implement the "install-strip" target properly (strip executables,
4217 # but do not try to strip scripts.)
4218 #
4219 INSTALL_SCRIPT='${INSTALL}'
4220
4221 # random libc stuff
4222
4223 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4224 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4225 if test "${ac_cv_path_GREP+set}" = set; then
4226   echo $ECHO_N "(cached) $ECHO_C" >&6
4227 else
4228   # Extract the first word of "grep ggrep" to use in msg output
4229 if test -z "$GREP"; then
4230 set dummy grep ggrep; ac_prog_name=$2
4231 if test "${ac_cv_path_GREP+set}" = set; then
4232   echo $ECHO_N "(cached) $ECHO_C" >&6
4233 else
4234   ac_path_GREP_found=false
4235 # Loop through the user's path and test for each of PROGNAME-LIST
4236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4237 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4238 do
4239   IFS=$as_save_IFS
4240   test -z "$as_dir" && as_dir=.
4241   for ac_prog in grep ggrep; do
4242   for ac_exec_ext in '' $ac_executable_extensions; do
4243     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4244     { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
4245     # Check for GNU ac_path_GREP and select it if it is found.
4246   # Check for GNU $ac_path_GREP
4247 case `"$ac_path_GREP" --version 2>&1` in
4248 *GNU*)
4249   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4250 *)
4251   ac_count=0
4252   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4253   while :
4254   do
4255     cat "conftest.in" "conftest.in" >"conftest.tmp"
4256     mv "conftest.tmp" "conftest.in"
4257     cp "conftest.in" "conftest.nl"
4258     echo 'GREP' >> "conftest.nl"
4259     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4260     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4261     ac_count=`expr $ac_count + 1`
4262     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4263       # Best one so far, save it but keep looking for a better one
4264       ac_cv_path_GREP="$ac_path_GREP"
4265       ac_path_GREP_max=$ac_count
4266     fi
4267     # 10*(2^10) chars as input seems more than enough
4268     test $ac_count -gt 10 && break
4269   done
4270   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4271 esac
4272
4273
4274     $ac_path_GREP_found && break 3
4275   done
4276 done
4277
4278 done
4279 IFS=$as_save_IFS
4280
4281
4282 fi
4283
4284 GREP="$ac_cv_path_GREP"
4285 if test -z "$GREP"; then
4286   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4287 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4288    { (exit 1); exit 1; }; }
4289 fi
4290
4291 else
4292   ac_cv_path_GREP=$GREP
4293 fi
4294
4295
4296 fi
4297 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4298 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4299  GREP="$ac_cv_path_GREP"
4300
4301
4302 { echo "$as_me:$LINENO: checking for egrep" >&5
4303 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4304 if test "${ac_cv_path_EGREP+set}" = set; then
4305   echo $ECHO_N "(cached) $ECHO_C" >&6
4306 else
4307   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4308    then ac_cv_path_EGREP="$GREP -E"
4309    else
4310      # Extract the first word of "egrep" to use in msg output
4311 if test -z "$EGREP"; then
4312 set dummy egrep; ac_prog_name=$2
4313 if test "${ac_cv_path_EGREP+set}" = set; then
4314   echo $ECHO_N "(cached) $ECHO_C" >&6
4315 else
4316   ac_path_EGREP_found=false
4317 # Loop through the user's path and test for each of PROGNAME-LIST
4318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4319 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4320 do
4321   IFS=$as_save_IFS
4322   test -z "$as_dir" && as_dir=.
4323   for ac_prog in egrep; do
4324   for ac_exec_ext in '' $ac_executable_extensions; do
4325     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4326     { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
4327     # Check for GNU ac_path_EGREP and select it if it is found.
4328   # Check for GNU $ac_path_EGREP
4329 case `"$ac_path_EGREP" --version 2>&1` in
4330 *GNU*)
4331   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4332 *)
4333   ac_count=0
4334   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4335   while :
4336   do
4337     cat "conftest.in" "conftest.in" >"conftest.tmp"
4338     mv "conftest.tmp" "conftest.in"
4339     cp "conftest.in" "conftest.nl"
4340     echo 'EGREP' >> "conftest.nl"
4341     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4342     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4343     ac_count=`expr $ac_count + 1`
4344     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4345       # Best one so far, save it but keep looking for a better one
4346       ac_cv_path_EGREP="$ac_path_EGREP"
4347       ac_path_EGREP_max=$ac_count
4348     fi
4349     # 10*(2^10) chars as input seems more than enough
4350     test $ac_count -gt 10 && break
4351   done
4352   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4353 esac
4354
4355
4356     $ac_path_EGREP_found && break 3
4357   done
4358 done
4359
4360 done
4361 IFS=$as_save_IFS
4362
4363
4364 fi
4365
4366 EGREP="$ac_cv_path_EGREP"
4367 if test -z "$EGREP"; then
4368   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4369 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4370    { (exit 1); exit 1; }; }
4371 fi
4372
4373 else
4374   ac_cv_path_EGREP=$EGREP
4375 fi
4376
4377
4378    fi
4379 fi
4380 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4381 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4382  EGREP="$ac_cv_path_EGREP"
4383
4384
4385 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4386 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4387 if test "${ac_cv_header_stdc+set}" = set; then
4388   echo $ECHO_N "(cached) $ECHO_C" >&6
4389 else
4390   cat >conftest.$ac_ext <<_ACEOF
4391 /* confdefs.h.  */
4392 _ACEOF
4393 cat confdefs.h >>conftest.$ac_ext
4394 cat >>conftest.$ac_ext <<_ACEOF
4395 /* end confdefs.h.  */
4396 #include <stdlib.h>
4397 #include <stdarg.h>
4398 #include <string.h>
4399 #include <float.h>
4400
4401 int
4402 main ()
4403 {
4404
4405   ;
4406   return 0;
4407 }
4408 _ACEOF
4409 rm -f conftest.$ac_objext
4410 if { (ac_try="$ac_compile"
4411 case "(($ac_try" in
4412   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4413   *) ac_try_echo=$ac_try;;
4414 esac
4415 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4416   (eval "$ac_compile") 2>conftest.er1
4417   ac_status=$?
4418   grep -v '^ *+' conftest.er1 >conftest.err
4419   rm -f conftest.er1
4420   cat conftest.err >&5
4421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4422   (exit $ac_status); } &&
4423          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4424   { (case "(($ac_try" in
4425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4426   *) ac_try_echo=$ac_try;;
4427 esac
4428 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4429   (eval "$ac_try") 2>&5
4430   ac_status=$?
4431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4432   (exit $ac_status); }; } &&
4433          { ac_try='test -s conftest.$ac_objext'
4434   { (case "(($ac_try" in
4435   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4436   *) ac_try_echo=$ac_try;;
4437 esac
4438 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4439   (eval "$ac_try") 2>&5
4440   ac_status=$?
4441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4442   (exit $ac_status); }; }; then
4443   ac_cv_header_stdc=yes
4444 else
4445   echo "$as_me: failed program was:" >&5
4446 sed 's/^/| /' conftest.$ac_ext >&5
4447
4448         ac_cv_header_stdc=no
4449 fi
4450
4451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4452
4453 if test $ac_cv_header_stdc = yes; then
4454   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4455   cat >conftest.$ac_ext <<_ACEOF
4456 /* confdefs.h.  */
4457 _ACEOF
4458 cat confdefs.h >>conftest.$ac_ext
4459 cat >>conftest.$ac_ext <<_ACEOF
4460 /* end confdefs.h.  */
4461 #include <string.h>
4462
4463 _ACEOF
4464 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4465   $EGREP "memchr" >/dev/null 2>&1; then
4466   :
4467 else
4468   ac_cv_header_stdc=no
4469 fi
4470 rm -f conftest*
4471
4472 fi
4473
4474 if test $ac_cv_header_stdc = yes; then
4475   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4476   cat >conftest.$ac_ext <<_ACEOF
4477 /* confdefs.h.  */
4478 _ACEOF
4479 cat confdefs.h >>conftest.$ac_ext
4480 cat >>conftest.$ac_ext <<_ACEOF
4481 /* end confdefs.h.  */
4482 #include <stdlib.h>
4483
4484 _ACEOF
4485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4486   $EGREP "free" >/dev/null 2>&1; then
4487   :
4488 else
4489   ac_cv_header_stdc=no
4490 fi
4491 rm -f conftest*
4492
4493 fi
4494
4495 if test $ac_cv_header_stdc = yes; then
4496   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4497   if test "$cross_compiling" = yes; then
4498   :
4499 else
4500   cat >conftest.$ac_ext <<_ACEOF
4501 /* confdefs.h.  */
4502 _ACEOF
4503 cat confdefs.h >>conftest.$ac_ext
4504 cat >>conftest.$ac_ext <<_ACEOF
4505 /* end confdefs.h.  */
4506 #include <ctype.h>
4507 #include <stdlib.h>
4508 #if ((' ' & 0x0FF) == 0x020)
4509 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4510 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4511 #else
4512 # define ISLOWER(c) \
4513                    (('a' <= (c) && (c) <= 'i') \
4514                      || ('j' <= (c) && (c) <= 'r') \
4515                      || ('s' <= (c) && (c) <= 'z'))
4516 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4517 #endif
4518
4519 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4520 int
4521 main ()
4522 {
4523   int i;
4524   for (i = 0; i < 256; i++)
4525     if (XOR (islower (i), ISLOWER (i))
4526         || toupper (i) != TOUPPER (i))
4527       return 2;
4528   return 0;
4529 }
4530 _ACEOF
4531 rm -f conftest$ac_exeext
4532 if { (ac_try="$ac_link"
4533 case "(($ac_try" in
4534   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4535   *) ac_try_echo=$ac_try;;
4536 esac
4537 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4538   (eval "$ac_link") 2>&5
4539   ac_status=$?
4540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4541   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4542   { (case "(($ac_try" in
4543   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4544   *) ac_try_echo=$ac_try;;
4545 esac
4546 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4547   (eval "$ac_try") 2>&5
4548   ac_status=$?
4549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4550   (exit $ac_status); }; }; then
4551   :
4552 else
4553   echo "$as_me: program exited with status $ac_status" >&5
4554 echo "$as_me: failed program was:" >&5
4555 sed 's/^/| /' conftest.$ac_ext >&5
4556
4557 ( exit $ac_status )
4558 ac_cv_header_stdc=no
4559 fi
4560 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4561 fi
4562
4563
4564 fi
4565 fi
4566 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4567 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4568 if test $ac_cv_header_stdc = yes; then
4569
4570 cat >>confdefs.h <<\_ACEOF
4571 #define STDC_HEADERS 1
4572 _ACEOF
4573
4574 fi
4575
4576 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4587                   inttypes.h stdint.h unistd.h
4588 do
4589 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4590 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4591 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4592 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4593   echo $ECHO_N "(cached) $ECHO_C" >&6
4594 else
4595   cat >conftest.$ac_ext <<_ACEOF
4596 /* confdefs.h.  */
4597 _ACEOF
4598 cat confdefs.h >>conftest.$ac_ext
4599 cat >>conftest.$ac_ext <<_ACEOF
4600 /* end confdefs.h.  */
4601 $ac_includes_default
4602
4603 #include <$ac_header>
4604 _ACEOF
4605 rm -f conftest.$ac_objext
4606 if { (ac_try="$ac_compile"
4607 case "(($ac_try" in
4608   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4609   *) ac_try_echo=$ac_try;;
4610 esac
4611 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4612   (eval "$ac_compile") 2>conftest.er1
4613   ac_status=$?
4614   grep -v '^ *+' conftest.er1 >conftest.err
4615   rm -f conftest.er1
4616   cat conftest.err >&5
4617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4618   (exit $ac_status); } &&
4619          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4620   { (case "(($ac_try" in
4621   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4622   *) ac_try_echo=$ac_try;;
4623 esac
4624 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4625   (eval "$ac_try") 2>&5
4626   ac_status=$?
4627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4628   (exit $ac_status); }; } &&
4629          { ac_try='test -s conftest.$ac_objext'
4630   { (case "(($ac_try" in
4631   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4632   *) ac_try_echo=$ac_try;;
4633 esac
4634 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4635   (eval "$ac_try") 2>&5
4636   ac_status=$?
4637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4638   (exit $ac_status); }; }; then
4639   eval "$as_ac_Header=yes"
4640 else
4641   echo "$as_me: failed program was:" >&5
4642 sed 's/^/| /' conftest.$ac_ext >&5
4643
4644         eval "$as_ac_Header=no"
4645 fi
4646
4647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4648 fi
4649 ac_res=`eval echo '${'$as_ac_Header'}'`
4650                { echo "$as_me:$LINENO: result: $ac_res" >&5
4651 echo "${ECHO_T}$ac_res" >&6; }
4652 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4653   cat >>confdefs.h <<_ACEOF
4654 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4655 _ACEOF
4656
4657 fi
4658
4659 done
4660
4661
4662
4663 for ac_header in unistd.h
4664 do
4665 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4666 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4667   { echo "$as_me:$LINENO: checking for $ac_header" >&5
4668 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4669 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4670   echo $ECHO_N "(cached) $ECHO_C" >&6
4671 fi
4672 ac_res=`eval echo '${'$as_ac_Header'}'`
4673                { echo "$as_me:$LINENO: result: $ac_res" >&5
4674 echo "${ECHO_T}$ac_res" >&6; }
4675 else
4676   # Is the header compilable?
4677 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
4678 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
4679 cat >conftest.$ac_ext <<_ACEOF
4680 /* confdefs.h.  */
4681 _ACEOF
4682 cat confdefs.h >>conftest.$ac_ext
4683 cat >>conftest.$ac_ext <<_ACEOF
4684 /* end confdefs.h.  */
4685 $ac_includes_default
4686 #include <$ac_header>
4687 _ACEOF
4688 rm -f conftest.$ac_objext
4689 if { (ac_try="$ac_compile"
4690 case "(($ac_try" in
4691   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4692   *) ac_try_echo=$ac_try;;
4693 esac
4694 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4695   (eval "$ac_compile") 2>conftest.er1
4696   ac_status=$?
4697   grep -v '^ *+' conftest.er1 >conftest.err
4698   rm -f conftest.er1
4699   cat conftest.err >&5
4700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4701   (exit $ac_status); } &&
4702          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4703   { (case "(($ac_try" in
4704   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4705   *) ac_try_echo=$ac_try;;
4706 esac
4707 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4708   (eval "$ac_try") 2>&5
4709   ac_status=$?
4710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4711   (exit $ac_status); }; } &&
4712          { ac_try='test -s conftest.$ac_objext'
4713   { (case "(($ac_try" in
4714   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4715   *) ac_try_echo=$ac_try;;
4716 esac
4717 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4718   (eval "$ac_try") 2>&5
4719   ac_status=$?
4720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4721   (exit $ac_status); }; }; then
4722   ac_header_compiler=yes
4723 else
4724   echo "$as_me: failed program was:" >&5
4725 sed 's/^/| /' conftest.$ac_ext >&5
4726
4727         ac_header_compiler=no
4728 fi
4729
4730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4731 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4732 echo "${ECHO_T}$ac_header_compiler" >&6; }
4733
4734 # Is the header present?
4735 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
4736 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
4737 cat >conftest.$ac_ext <<_ACEOF
4738 /* confdefs.h.  */
4739 _ACEOF
4740 cat confdefs.h >>conftest.$ac_ext
4741 cat >>conftest.$ac_ext <<_ACEOF
4742 /* end confdefs.h.  */
4743 #include <$ac_header>
4744 _ACEOF
4745 if { (ac_try="$ac_cpp conftest.$ac_ext"
4746 case "(($ac_try" in
4747   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4748   *) ac_try_echo=$ac_try;;
4749 esac
4750 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4751   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4752   ac_status=$?
4753   grep -v '^ *+' conftest.er1 >conftest.err
4754   rm -f conftest.er1
4755   cat conftest.err >&5
4756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4757   (exit $ac_status); } >/dev/null; then
4758   if test -s conftest.err; then
4759     ac_cpp_err=$ac_c_preproc_warn_flag
4760     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4761   else
4762     ac_cpp_err=
4763   fi
4764 else
4765   ac_cpp_err=yes
4766 fi
4767 if test -z "$ac_cpp_err"; then
4768   ac_header_preproc=yes
4769 else
4770   echo "$as_me: failed program was:" >&5
4771 sed 's/^/| /' conftest.$ac_ext >&5
4772
4773   ac_header_preproc=no
4774 fi
4775
4776 rm -f conftest.err conftest.$ac_ext
4777 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4778 echo "${ECHO_T}$ac_header_preproc" >&6; }
4779
4780 # So?  What about this header?
4781 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4782   yes:no: )
4783     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4784 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4785     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4786 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4787     ac_header_preproc=yes
4788     ;;
4789   no:yes:* )
4790     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4791 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4792     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4793 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4794     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4795 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4796     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4797 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4798     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4799 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4800     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4801 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4802
4803     ;;
4804 esac
4805 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4806 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4807 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4808   echo $ECHO_N "(cached) $ECHO_C" >&6
4809 else
4810   eval "$as_ac_Header=\$ac_header_preproc"
4811 fi
4812 ac_res=`eval echo '${'$as_ac_Header'}'`
4813                { echo "$as_me:$LINENO: result: $ac_res" >&5
4814 echo "${ECHO_T}$ac_res" >&6; }
4815
4816 fi
4817 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4818   cat >>confdefs.h <<_ACEOF
4819 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4820 _ACEOF
4821
4822 fi
4823
4824 done
4825
4826 { echo "$as_me:$LINENO: checking for mode_t" >&5
4827 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
4828 if test "${ac_cv_type_mode_t+set}" = set; then
4829   echo $ECHO_N "(cached) $ECHO_C" >&6
4830 else
4831   cat >conftest.$ac_ext <<_ACEOF
4832 /* confdefs.h.  */
4833 _ACEOF
4834 cat confdefs.h >>conftest.$ac_ext
4835 cat >>conftest.$ac_ext <<_ACEOF
4836 /* end confdefs.h.  */
4837 $ac_includes_default
4838 typedef mode_t ac__type_new_;
4839 int
4840 main ()
4841 {
4842 if ((ac__type_new_ *) 0)
4843   return 0;
4844 if (sizeof (ac__type_new_))
4845   return 0;
4846   ;
4847   return 0;
4848 }
4849 _ACEOF
4850 rm -f conftest.$ac_objext
4851 if { (ac_try="$ac_compile"
4852 case "(($ac_try" in
4853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4854   *) ac_try_echo=$ac_try;;
4855 esac
4856 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4857   (eval "$ac_compile") 2>conftest.er1
4858   ac_status=$?
4859   grep -v '^ *+' conftest.er1 >conftest.err
4860   rm -f conftest.er1
4861   cat conftest.err >&5
4862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4863   (exit $ac_status); } &&
4864          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4865   { (case "(($ac_try" in
4866   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4867   *) ac_try_echo=$ac_try;;
4868 esac
4869 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4870   (eval "$ac_try") 2>&5
4871   ac_status=$?
4872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4873   (exit $ac_status); }; } &&
4874          { ac_try='test -s conftest.$ac_objext'
4875   { (case "(($ac_try" in
4876   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4877   *) ac_try_echo=$ac_try;;
4878 esac
4879 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4880   (eval "$ac_try") 2>&5
4881   ac_status=$?
4882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4883   (exit $ac_status); }; }; then
4884   ac_cv_type_mode_t=yes
4885 else
4886   echo "$as_me: failed program was:" >&5
4887 sed 's/^/| /' conftest.$ac_ext >&5
4888
4889         ac_cv_type_mode_t=no
4890 fi
4891
4892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4893 fi
4894 { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4895 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
4896 if test $ac_cv_type_mode_t = yes; then
4897   :
4898 else
4899
4900 cat >>confdefs.h <<_ACEOF
4901 #define mode_t int
4902 _ACEOF
4903
4904 fi
4905
4906 { echo "$as_me:$LINENO: checking for pid_t" >&5
4907 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
4908 if test "${ac_cv_type_pid_t+set}" = set; then
4909   echo $ECHO_N "(cached) $ECHO_C" >&6
4910 else
4911   cat >conftest.$ac_ext <<_ACEOF
4912 /* confdefs.h.  */
4913 _ACEOF
4914 cat confdefs.h >>conftest.$ac_ext
4915 cat >>conftest.$ac_ext <<_ACEOF
4916 /* end confdefs.h.  */
4917 $ac_includes_default
4918 typedef pid_t ac__type_new_;
4919 int
4920 main ()
4921 {
4922 if ((ac__type_new_ *) 0)
4923   return 0;
4924 if (sizeof (ac__type_new_))
4925   return 0;
4926   ;
4927   return 0;
4928 }
4929 _ACEOF
4930 rm -f conftest.$ac_objext
4931 if { (ac_try="$ac_compile"
4932 case "(($ac_try" in
4933   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4934   *) ac_try_echo=$ac_try;;
4935 esac
4936 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4937   (eval "$ac_compile") 2>conftest.er1
4938   ac_status=$?
4939   grep -v '^ *+' conftest.er1 >conftest.err
4940   rm -f conftest.er1
4941   cat conftest.err >&5
4942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4943   (exit $ac_status); } &&
4944          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4945   { (case "(($ac_try" in
4946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4947   *) ac_try_echo=$ac_try;;
4948 esac
4949 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4950   (eval "$ac_try") 2>&5
4951   ac_status=$?
4952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4953   (exit $ac_status); }; } &&
4954          { ac_try='test -s conftest.$ac_objext'
4955   { (case "(($ac_try" in
4956   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4957   *) ac_try_echo=$ac_try;;
4958 esac
4959 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4960   (eval "$ac_try") 2>&5
4961   ac_status=$?
4962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4963   (exit $ac_status); }; }; then
4964   ac_cv_type_pid_t=yes
4965 else
4966   echo "$as_me: failed program was:" >&5
4967 sed 's/^/| /' conftest.$ac_ext >&5
4968
4969         ac_cv_type_pid_t=no
4970 fi
4971
4972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4973 fi
4974 { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4975 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
4976 if test $ac_cv_type_pid_t = yes; then
4977   :
4978 else
4979
4980 cat >>confdefs.h <<_ACEOF
4981 #define pid_t int
4982 _ACEOF
4983
4984 fi
4985
4986 { echo "$as_me:$LINENO: checking for size_t" >&5
4987 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
4988 if test "${ac_cv_type_size_t+set}" = set; then
4989   echo $ECHO_N "(cached) $ECHO_C" >&6
4990 else
4991   cat >conftest.$ac_ext <<_ACEOF
4992 /* confdefs.h.  */
4993 _ACEOF
4994 cat confdefs.h >>conftest.$ac_ext
4995 cat >>conftest.$ac_ext <<_ACEOF
4996 /* end confdefs.h.  */
4997 $ac_includes_default
4998 typedef size_t ac__type_new_;
4999 int
5000 main ()
5001 {
5002 if ((ac__type_new_ *) 0)
5003   return 0;
5004 if (sizeof (ac__type_new_))
5005   return 0;
5006   ;
5007   return 0;
5008 }
5009 _ACEOF
5010 rm -f conftest.$ac_objext
5011 if { (ac_try="$ac_compile"
5012 case "(($ac_try" in
5013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5014   *) ac_try_echo=$ac_try;;
5015 esac
5016 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5017   (eval "$ac_compile") 2>conftest.er1
5018   ac_status=$?
5019   grep -v '^ *+' conftest.er1 >conftest.err
5020   rm -f conftest.er1
5021   cat conftest.err >&5
5022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5023   (exit $ac_status); } &&
5024          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5025   { (case "(($ac_try" in
5026   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5027   *) ac_try_echo=$ac_try;;
5028 esac
5029 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5030   (eval "$ac_try") 2>&5
5031   ac_status=$?
5032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5033   (exit $ac_status); }; } &&
5034          { ac_try='test -s conftest.$ac_objext'
5035   { (case "(($ac_try" in
5036   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5037   *) ac_try_echo=$ac_try;;
5038 esac
5039 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5040   (eval "$ac_try") 2>&5
5041   ac_status=$?
5042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5043   (exit $ac_status); }; }; then
5044   ac_cv_type_size_t=yes
5045 else
5046   echo "$as_me: failed program was:" >&5
5047 sed 's/^/| /' conftest.$ac_ext >&5
5048
5049         ac_cv_type_size_t=no
5050 fi
5051
5052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5053 fi
5054 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5055 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
5056 if test $ac_cv_type_size_t = yes; then
5057   :
5058 else
5059
5060 cat >>confdefs.h <<_ACEOF
5061 #define size_t unsigned int
5062 _ACEOF
5063
5064 fi
5065
5066 { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5067 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
5068 if test "${ac_cv_type_signal+set}" = set; then
5069   echo $ECHO_N "(cached) $ECHO_C" >&6
5070 else
5071   cat >conftest.$ac_ext <<_ACEOF
5072 /* confdefs.h.  */
5073 _ACEOF
5074 cat confdefs.h >>conftest.$ac_ext
5075 cat >>conftest.$ac_ext <<_ACEOF
5076 /* end confdefs.h.  */
5077 #include <sys/types.h>
5078 #include <signal.h>
5079
5080 int
5081 main ()
5082 {
5083 return *(signal (0, 0)) (0) == 1;
5084   ;
5085   return 0;
5086 }
5087 _ACEOF
5088 rm -f conftest.$ac_objext
5089 if { (ac_try="$ac_compile"
5090 case "(($ac_try" in
5091   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5092   *) ac_try_echo=$ac_try;;
5093 esac
5094 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5095   (eval "$ac_compile") 2>conftest.er1
5096   ac_status=$?
5097   grep -v '^ *+' conftest.er1 >conftest.err
5098   rm -f conftest.er1
5099   cat conftest.err >&5
5100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101   (exit $ac_status); } &&
5102          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5103   { (case "(($ac_try" in
5104   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5105   *) ac_try_echo=$ac_try;;
5106 esac
5107 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5108   (eval "$ac_try") 2>&5
5109   ac_status=$?
5110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5111   (exit $ac_status); }; } &&
5112          { ac_try='test -s conftest.$ac_objext'
5113   { (case "(($ac_try" in
5114   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5115   *) ac_try_echo=$ac_try;;
5116 esac
5117 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5118   (eval "$ac_try") 2>&5
5119   ac_status=$?
5120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5121   (exit $ac_status); }; }; then
5122   ac_cv_type_signal=int
5123 else
5124   echo "$as_me: failed program was:" >&5
5125 sed 's/^/| /' conftest.$ac_ext >&5
5126
5127         ac_cv_type_signal=void
5128 fi
5129
5130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5131 fi
5132 { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5133 echo "${ECHO_T}$ac_cv_type_signal" >&6; }
5134
5135 cat >>confdefs.h <<_ACEOF
5136 #define RETSIGTYPE $ac_cv_type_signal
5137 _ACEOF
5138
5139
5140 { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
5141 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
5142 if test "${ac_cv_header_time+set}" = set; then
5143   echo $ECHO_N "(cached) $ECHO_C" >&6
5144 else
5145   cat >conftest.$ac_ext <<_ACEOF
5146 /* confdefs.h.  */
5147 _ACEOF
5148 cat confdefs.h >>conftest.$ac_ext
5149 cat >>conftest.$ac_ext <<_ACEOF
5150 /* end confdefs.h.  */
5151 #include <sys/types.h>
5152 #include <sys/time.h>
5153 #include <time.h>
5154
5155 int
5156 main ()
5157 {
5158 if ((struct tm *) 0)
5159 return 0;
5160   ;
5161   return 0;
5162 }
5163 _ACEOF
5164 rm -f conftest.$ac_objext
5165 if { (ac_try="$ac_compile"
5166 case "(($ac_try" in
5167   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5168   *) ac_try_echo=$ac_try;;
5169 esac
5170 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5171   (eval "$ac_compile") 2>conftest.er1
5172   ac_status=$?
5173   grep -v '^ *+' conftest.er1 >conftest.err
5174   rm -f conftest.er1
5175   cat conftest.err >&5
5176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5177   (exit $ac_status); } &&
5178          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5179   { (case "(($ac_try" in
5180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5181   *) ac_try_echo=$ac_try;;
5182 esac
5183 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5184   (eval "$ac_try") 2>&5
5185   ac_status=$?
5186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5187   (exit $ac_status); }; } &&
5188          { ac_try='test -s conftest.$ac_objext'
5189   { (case "(($ac_try" in
5190   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5191   *) ac_try_echo=$ac_try;;
5192 esac
5193 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5194   (eval "$ac_try") 2>&5
5195   ac_status=$?
5196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5197   (exit $ac_status); }; }; then
5198   ac_cv_header_time=yes
5199 else
5200   echo "$as_me: failed program was:" >&5
5201 sed 's/^/| /' conftest.$ac_ext >&5
5202
5203         ac_cv_header_time=no
5204 fi
5205
5206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5207 fi
5208 { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5209 echo "${ECHO_T}$ac_cv_header_time" >&6; }
5210 if test $ac_cv_header_time = yes; then
5211
5212 cat >>confdefs.h <<\_ACEOF
5213 #define TIME_WITH_SYS_TIME 1
5214 _ACEOF
5215
5216 fi
5217
5218 { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5219 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
5220 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5221   echo $ECHO_N "(cached) $ECHO_C" >&6
5222 else
5223   cat >conftest.$ac_ext <<_ACEOF
5224 /* confdefs.h.  */
5225 _ACEOF
5226 cat confdefs.h >>conftest.$ac_ext
5227 cat >>conftest.$ac_ext <<_ACEOF
5228 /* end confdefs.h.  */
5229 #include <sys/types.h>
5230 #include <sys/wait.h>
5231 #ifndef WEXITSTATUS
5232 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5233 #endif
5234 #ifndef WIFEXITED
5235 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5236 #endif
5237
5238 int
5239 main ()
5240 {
5241   int s;
5242   wait (&s);
5243   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5244   ;
5245   return 0;
5246 }
5247 _ACEOF
5248 rm -f conftest.$ac_objext
5249 if { (ac_try="$ac_compile"
5250 case "(($ac_try" in
5251   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5252   *) ac_try_echo=$ac_try;;
5253 esac
5254 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5255   (eval "$ac_compile") 2>conftest.er1
5256   ac_status=$?
5257   grep -v '^ *+' conftest.er1 >conftest.err
5258   rm -f conftest.er1
5259   cat conftest.err >&5
5260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5261   (exit $ac_status); } &&
5262          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5263   { (case "(($ac_try" in
5264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5265   *) ac_try_echo=$ac_try;;
5266 esac
5267 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5268   (eval "$ac_try") 2>&5
5269   ac_status=$?
5270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5271   (exit $ac_status); }; } &&
5272          { ac_try='test -s conftest.$ac_objext'
5273   { (case "(($ac_try" in
5274   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5275   *) ac_try_echo=$ac_try;;
5276 esac
5277 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5278   (eval "$ac_try") 2>&5
5279   ac_status=$?
5280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5281   (exit $ac_status); }; }; then
5282   ac_cv_header_sys_wait_h=yes
5283 else
5284   echo "$as_me: failed program was:" >&5
5285 sed 's/^/| /' conftest.$ac_ext >&5
5286
5287         ac_cv_header_sys_wait_h=no
5288 fi
5289
5290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5291 fi
5292 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5293 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
5294 if test $ac_cv_header_sys_wait_h = yes; then
5295
5296 cat >>confdefs.h <<\_ACEOF
5297 #define HAVE_SYS_WAIT_H 1
5298 _ACEOF
5299
5300 fi
5301
5302
5303
5304
5305
5306
5307 ac_header_dirent=no
5308 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5309   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5310 { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5311 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5312 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5313   echo $ECHO_N "(cached) $ECHO_C" >&6
5314 else
5315   cat >conftest.$ac_ext <<_ACEOF
5316 /* confdefs.h.  */
5317 _ACEOF
5318 cat confdefs.h >>conftest.$ac_ext
5319 cat >>conftest.$ac_ext <<_ACEOF
5320 /* end confdefs.h.  */
5321 #include <sys/types.h>
5322 #include <$ac_hdr>
5323
5324 int
5325 main ()
5326 {
5327 if ((DIR *) 0)
5328 return 0;
5329   ;
5330   return 0;
5331 }
5332 _ACEOF
5333 rm -f conftest.$ac_objext
5334 if { (ac_try="$ac_compile"
5335 case "(($ac_try" in
5336   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5337   *) ac_try_echo=$ac_try;;
5338 esac
5339 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5340   (eval "$ac_compile") 2>conftest.er1
5341   ac_status=$?
5342   grep -v '^ *+' conftest.er1 >conftest.err
5343   rm -f conftest.er1
5344   cat conftest.err >&5
5345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5346   (exit $ac_status); } &&
5347          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5348   { (case "(($ac_try" in
5349   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5350   *) ac_try_echo=$ac_try;;
5351 esac
5352 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5353   (eval "$ac_try") 2>&5
5354   ac_status=$?
5355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5356   (exit $ac_status); }; } &&
5357          { ac_try='test -s conftest.$ac_objext'
5358   { (case "(($ac_try" in
5359   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5360   *) ac_try_echo=$ac_try;;
5361 esac
5362 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5363   (eval "$ac_try") 2>&5
5364   ac_status=$?
5365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5366   (exit $ac_status); }; }; then
5367   eval "$as_ac_Header=yes"
5368 else
5369   echo "$as_me: failed program was:" >&5
5370 sed 's/^/| /' conftest.$ac_ext >&5
5371
5372         eval "$as_ac_Header=no"
5373 fi
5374
5375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5376 fi
5377 ac_res=`eval echo '${'$as_ac_Header'}'`
5378                { echo "$as_me:$LINENO: result: $ac_res" >&5
5379 echo "${ECHO_T}$ac_res" >&6; }
5380 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5381   cat >>confdefs.h <<_ACEOF
5382 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5383 _ACEOF
5384
5385 ac_header_dirent=$ac_hdr; break
5386 fi
5387
5388 done
5389 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5390 if test $ac_header_dirent = dirent.h; then
5391   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5392 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5393 if test "${ac_cv_search_opendir+set}" = set; then
5394   echo $ECHO_N "(cached) $ECHO_C" >&6
5395 else
5396   ac_func_search_save_LIBS=$LIBS
5397 cat >conftest.$ac_ext <<_ACEOF
5398 /* confdefs.h.  */
5399 _ACEOF
5400 cat confdefs.h >>conftest.$ac_ext
5401 cat >>conftest.$ac_ext <<_ACEOF
5402 /* end confdefs.h.  */
5403
5404 /* Override any GCC internal prototype to avoid an error.
5405    Use char because int might match the return type of a GCC
5406    builtin and then its argument prototype would still apply.  */
5407 #ifdef __cplusplus
5408 extern "C"
5409 #endif
5410 char opendir ();
5411 int
5412 main ()
5413 {
5414 return opendir ();
5415   ;
5416   return 0;
5417 }
5418 _ACEOF
5419 for ac_lib in '' dir; do
5420   if test -z "$ac_lib"; then
5421     ac_res="none required"
5422   else
5423     ac_res=-l$ac_lib
5424     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5425   fi
5426   rm -f conftest.$ac_objext conftest$ac_exeext
5427 if { (ac_try="$ac_link"
5428 case "(($ac_try" in
5429   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5430   *) ac_try_echo=$ac_try;;
5431 esac
5432 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5433   (eval "$ac_link") 2>conftest.er1
5434   ac_status=$?
5435   grep -v '^ *+' conftest.er1 >conftest.err
5436   rm -f conftest.er1
5437   cat conftest.err >&5
5438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5439   (exit $ac_status); } &&
5440          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5441   { (case "(($ac_try" in
5442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5443   *) ac_try_echo=$ac_try;;
5444 esac
5445 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5446   (eval "$ac_try") 2>&5
5447   ac_status=$?
5448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5449   (exit $ac_status); }; } &&
5450          { ac_try='test -s conftest$ac_exeext'
5451   { (case "(($ac_try" in
5452   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5453   *) ac_try_echo=$ac_try;;
5454 esac
5455 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5456   (eval "$ac_try") 2>&5
5457   ac_status=$?
5458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5459   (exit $ac_status); }; }; then
5460   ac_cv_search_opendir=$ac_res
5461 else
5462   echo "$as_me: failed program was:" >&5
5463 sed 's/^/| /' conftest.$ac_ext >&5
5464
5465
5466 fi
5467
5468 rm -f core conftest.err conftest.$ac_objext \
5469       conftest$ac_exeext
5470   if test "${ac_cv_search_opendir+set}" = set; then
5471   break
5472 fi
5473 done
5474 if test "${ac_cv_search_opendir+set}" = set; then
5475   :
5476 else
5477   ac_cv_search_opendir=no
5478 fi
5479 rm conftest.$ac_ext
5480 LIBS=$ac_func_search_save_LIBS
5481 fi
5482 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5483 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5484 ac_res=$ac_cv_search_opendir
5485 if test "$ac_res" != no; then
5486   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5487
5488 fi
5489
5490 else
5491   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5492 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5493 if test "${ac_cv_search_opendir+set}" = set; then
5494   echo $ECHO_N "(cached) $ECHO_C" >&6
5495 else
5496   ac_func_search_save_LIBS=$LIBS
5497 cat >conftest.$ac_ext <<_ACEOF
5498 /* confdefs.h.  */
5499 _ACEOF
5500 cat confdefs.h >>conftest.$ac_ext
5501 cat >>conftest.$ac_ext <<_ACEOF
5502 /* end confdefs.h.  */
5503
5504 /* Override any GCC internal prototype to avoid an error.
5505    Use char because int might match the return type of a GCC
5506    builtin and then its argument prototype would still apply.  */
5507 #ifdef __cplusplus
5508 extern "C"
5509 #endif
5510 char opendir ();
5511 int
5512 main ()
5513 {
5514 return opendir ();
5515   ;
5516   return 0;
5517 }
5518 _ACEOF
5519 for ac_lib in '' x; do
5520   if test -z "$ac_lib"; then
5521     ac_res="none required"
5522   else
5523     ac_res=-l$ac_lib
5524     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5525   fi
5526   rm -f conftest.$ac_objext conftest$ac_exeext
5527 if { (ac_try="$ac_link"
5528 case "(($ac_try" in
5529   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5530   *) ac_try_echo=$ac_try;;
5531 esac
5532 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5533   (eval "$ac_link") 2>conftest.er1
5534   ac_status=$?
5535   grep -v '^ *+' conftest.er1 >conftest.err
5536   rm -f conftest.er1
5537   cat conftest.err >&5
5538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5539   (exit $ac_status); } &&
5540          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5541   { (case "(($ac_try" in
5542   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5543   *) ac_try_echo=$ac_try;;
5544 esac
5545 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5546   (eval "$ac_try") 2>&5
5547   ac_status=$?
5548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5549   (exit $ac_status); }; } &&
5550          { ac_try='test -s conftest$ac_exeext'
5551   { (case "(($ac_try" in
5552   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5553   *) ac_try_echo=$ac_try;;
5554 esac
5555 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5556   (eval "$ac_try") 2>&5
5557   ac_status=$?
5558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5559   (exit $ac_status); }; }; then
5560   ac_cv_search_opendir=$ac_res
5561 else
5562   echo "$as_me: failed program was:" >&5
5563 sed 's/^/| /' conftest.$ac_ext >&5
5564
5565
5566 fi
5567
5568 rm -f core conftest.err conftest.$ac_objext \
5569       conftest$ac_exeext
5570   if test "${ac_cv_search_opendir+set}" = set; then
5571   break
5572 fi
5573 done
5574 if test "${ac_cv_search_opendir+set}" = set; then
5575   :
5576 else
5577   ac_cv_search_opendir=no
5578 fi
5579 rm conftest.$ac_ext
5580 LIBS=$ac_func_search_save_LIBS
5581 fi
5582 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5583 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5584 ac_res=$ac_cv_search_opendir
5585 if test "$ac_res" != no; then
5586   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5587
5588 fi
5589
5590 fi
5591
5592 { echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5593 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6; }
5594   if test "${ac_cv_gettimeofday_args+set}" = set; then
5595   echo $ECHO_N "(cached) $ECHO_C" >&6
5596 else
5597   cat >conftest.$ac_ext <<_ACEOF
5598 /* confdefs.h.  */
5599 _ACEOF
5600 cat confdefs.h >>conftest.$ac_ext
5601 cat >>conftest.$ac_ext <<_ACEOF
5602 /* end confdefs.h.  */
5603 #include <stdlib.h>
5604                     #include <sys/time.h>
5605 int
5606 main ()
5607 {
5608 struct timeval tv; struct timezone tzp;
5609                     gettimeofday(&tv, &tzp);
5610   ;
5611   return 0;
5612 }
5613 _ACEOF
5614 rm -f conftest.$ac_objext
5615 if { (ac_try="$ac_compile"
5616 case "(($ac_try" in
5617   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5618   *) ac_try_echo=$ac_try;;
5619 esac
5620 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5621   (eval "$ac_compile") 2>conftest.er1
5622   ac_status=$?
5623   grep -v '^ *+' conftest.er1 >conftest.err
5624   rm -f conftest.er1
5625   cat conftest.err >&5
5626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627   (exit $ac_status); } &&
5628          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5629   { (case "(($ac_try" in
5630   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5631   *) ac_try_echo=$ac_try;;
5632 esac
5633 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5634   (eval "$ac_try") 2>&5
5635   ac_status=$?
5636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5637   (exit $ac_status); }; } &&
5638          { ac_try='test -s conftest.$ac_objext'
5639   { (case "(($ac_try" in
5640   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5641   *) ac_try_echo=$ac_try;;
5642 esac
5643 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5644   (eval "$ac_try") 2>&5
5645   ac_status=$?
5646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647   (exit $ac_status); }; }; then
5648   ac_gettimeofday_args=2
5649 else
5650   echo "$as_me: failed program was:" >&5
5651 sed 's/^/| /' conftest.$ac_ext >&5
5652
5653         cat >conftest.$ac_ext <<_ACEOF
5654 /* confdefs.h.  */
5655 _ACEOF
5656 cat confdefs.h >>conftest.$ac_ext
5657 cat >>conftest.$ac_ext <<_ACEOF
5658 /* end confdefs.h.  */
5659 #include <stdlib.h>
5660                                     #include <sys/time.h>
5661 int
5662 main ()
5663 {
5664 struct timeval tv; gettimeofday(&tv);
5665   ;
5666   return 0;
5667 }
5668 _ACEOF
5669 rm -f 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5676   (eval "$ac_compile") 2>conftest.er1
5677   ac_status=$?
5678   grep -v '^ *+' conftest.er1 >conftest.err
5679   rm -f conftest.er1
5680   cat conftest.err >&5
5681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5682   (exit $ac_status); } &&
5683          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5684   { (case "(($ac_try" in
5685   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5686   *) ac_try_echo=$ac_try;;
5687 esac
5688 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5689   (eval "$ac_try") 2>&5
5690   ac_status=$?
5691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5692   (exit $ac_status); }; } &&
5693          { ac_try='test -s conftest.$ac_objext'
5694   { (case "(($ac_try" in
5695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5696   *) ac_try_echo=$ac_try;;
5697 esac
5698 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5699   (eval "$ac_try") 2>&5
5700   ac_status=$?
5701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5702   (exit $ac_status); }; }; then
5703   ac_gettimeofday_args=1
5704 else
5705   echo "$as_me: failed program was:" >&5
5706 sed 's/^/| /' conftest.$ac_ext >&5
5707
5708         ac_gettimeofday_args=0
5709 fi
5710
5711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5712 fi
5713
5714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5715     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5716 fi
5717
5718   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5719   if test "$ac_gettimeofday_args" = 1 ; then
5720     cat >>confdefs.h <<\_ACEOF
5721 #define HAVE_GETTIMEOFDAY 1
5722 _ACEOF
5723
5724     { echo "$as_me:$LINENO: result: one argument" >&5
5725 echo "${ECHO_T}one argument" >&6; }
5726   elif test "$ac_gettimeofday_args" = 2 ; then
5727     cat >>confdefs.h <<\_ACEOF
5728 #define HAVE_GETTIMEOFDAY 1
5729 _ACEOF
5730
5731     cat >>confdefs.h <<\_ACEOF
5732 #define GETTIMEOFDAY_TWO_ARGS 1
5733 _ACEOF
5734
5735     { echo "$as_me:$LINENO: result: two arguments" >&5
5736 echo "${ECHO_T}two arguments" >&6; }
5737   else
5738     { echo "$as_me:$LINENO: result: unknown" >&5
5739 echo "${ECHO_T}unknown" >&6; }
5740   fi
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5752 do
5753 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5754 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5755 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5756 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5757   echo $ECHO_N "(cached) $ECHO_C" >&6
5758 else
5759   cat >conftest.$ac_ext <<_ACEOF
5760 /* confdefs.h.  */
5761 _ACEOF
5762 cat confdefs.h >>conftest.$ac_ext
5763 cat >>conftest.$ac_ext <<_ACEOF
5764 /* end confdefs.h.  */
5765 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5766    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5767 #define $ac_func innocuous_$ac_func
5768
5769 /* System header to define __stub macros and hopefully few prototypes,
5770     which can conflict with char $ac_func (); below.
5771     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5772     <limits.h> exists even on freestanding compilers.  */
5773
5774 #ifdef __STDC__
5775 # include <limits.h>
5776 #else
5777 # include <assert.h>
5778 #endif
5779
5780 #undef $ac_func
5781
5782 /* Override any GCC internal prototype to avoid an error.
5783    Use char because int might match the return type of a GCC
5784    builtin and then its argument prototype would still apply.  */
5785 #ifdef __cplusplus
5786 extern "C"
5787 #endif
5788 char $ac_func ();
5789 /* The GNU C library defines this for functions which it implements
5790     to always fail with ENOSYS.  Some functions are actually named
5791     something starting with __ and the normal name is an alias.  */
5792 #if defined __stub_$ac_func || defined __stub___$ac_func
5793 choke me
5794 #endif
5795
5796 int
5797 main ()
5798 {
5799 return $ac_func ();
5800   ;
5801   return 0;
5802 }
5803 _ACEOF
5804 rm -f conftest.$ac_objext conftest$ac_exeext
5805 if { (ac_try="$ac_link"
5806 case "(($ac_try" in
5807   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5808   *) ac_try_echo=$ac_try;;
5809 esac
5810 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5811   (eval "$ac_link") 2>conftest.er1
5812   ac_status=$?
5813   grep -v '^ *+' conftest.er1 >conftest.err
5814   rm -f conftest.er1
5815   cat conftest.err >&5
5816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5817   (exit $ac_status); } &&
5818          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5819   { (case "(($ac_try" in
5820   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5821   *) ac_try_echo=$ac_try;;
5822 esac
5823 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5824   (eval "$ac_try") 2>&5
5825   ac_status=$?
5826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827   (exit $ac_status); }; } &&
5828          { ac_try='test -s conftest$ac_exeext'
5829   { (case "(($ac_try" in
5830   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5831   *) ac_try_echo=$ac_try;;
5832 esac
5833 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5834   (eval "$ac_try") 2>&5
5835   ac_status=$?
5836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5837   (exit $ac_status); }; }; then
5838   eval "$as_ac_var=yes"
5839 else
5840   echo "$as_me: failed program was:" >&5
5841 sed 's/^/| /' conftest.$ac_ext >&5
5842
5843         eval "$as_ac_var=no"
5844 fi
5845
5846 rm -f core conftest.err conftest.$ac_objext \
5847       conftest$ac_exeext conftest.$ac_ext
5848 fi
5849 ac_res=`eval echo '${'$as_ac_var'}'`
5850                { echo "$as_me:$LINENO: result: $ac_res" >&5
5851 echo "${ECHO_T}$ac_res" >&6; }
5852 if test `eval echo '${'$as_ac_var'}'` = yes; then
5853   cat >>confdefs.h <<_ACEOF
5854 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5855 _ACEOF
5856
5857 fi
5858 done
5859
5860
5861
5862
5863
5864 for ac_func in sigaction syslog realpath setrlimit
5865 do
5866 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5867 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5868 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5869 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5870   echo $ECHO_N "(cached) $ECHO_C" >&6
5871 else
5872   cat >conftest.$ac_ext <<_ACEOF
5873 /* confdefs.h.  */
5874 _ACEOF
5875 cat confdefs.h >>conftest.$ac_ext
5876 cat >>conftest.$ac_ext <<_ACEOF
5877 /* end confdefs.h.  */
5878 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5879    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5880 #define $ac_func innocuous_$ac_func
5881
5882 /* System header to define __stub macros and hopefully few prototypes,
5883     which can conflict with char $ac_func (); below.
5884     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5885     <limits.h> exists even on freestanding compilers.  */
5886
5887 #ifdef __STDC__
5888 # include <limits.h>
5889 #else
5890 # include <assert.h>
5891 #endif
5892
5893 #undef $ac_func
5894
5895 /* Override any GCC internal prototype to avoid an error.
5896    Use char because int might match the return type of a GCC
5897    builtin and then its argument prototype would still apply.  */
5898 #ifdef __cplusplus
5899 extern "C"
5900 #endif
5901 char $ac_func ();
5902 /* The GNU C library defines this for functions which it implements
5903     to always fail with ENOSYS.  Some functions are actually named
5904     something starting with __ and the normal name is an alias.  */
5905 #if defined __stub_$ac_func || defined __stub___$ac_func
5906 choke me
5907 #endif
5908
5909 int
5910 main ()
5911 {
5912 return $ac_func ();
5913   ;
5914   return 0;
5915 }
5916 _ACEOF
5917 rm -f conftest.$ac_objext conftest$ac_exeext
5918 if { (ac_try="$ac_link"
5919 case "(($ac_try" in
5920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5921   *) ac_try_echo=$ac_try;;
5922 esac
5923 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5924   (eval "$ac_link") 2>conftest.er1
5925   ac_status=$?
5926   grep -v '^ *+' conftest.er1 >conftest.err
5927   rm -f conftest.er1
5928   cat conftest.err >&5
5929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5930   (exit $ac_status); } &&
5931          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5932   { (case "(($ac_try" in
5933   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5934   *) ac_try_echo=$ac_try;;
5935 esac
5936 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5937   (eval "$ac_try") 2>&5
5938   ac_status=$?
5939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5940   (exit $ac_status); }; } &&
5941          { ac_try='test -s conftest$ac_exeext'
5942   { (case "(($ac_try" in
5943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5944   *) ac_try_echo=$ac_try;;
5945 esac
5946 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5947   (eval "$ac_try") 2>&5
5948   ac_status=$?
5949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5950   (exit $ac_status); }; }; then
5951   eval "$as_ac_var=yes"
5952 else
5953   echo "$as_me: failed program was:" >&5
5954 sed 's/^/| /' conftest.$ac_ext >&5
5955
5956         eval "$as_ac_var=no"
5957 fi
5958
5959 rm -f core conftest.err conftest.$ac_objext \
5960       conftest$ac_exeext conftest.$ac_ext
5961 fi
5962 ac_res=`eval echo '${'$as_ac_var'}'`
5963                { echo "$as_me:$LINENO: result: $ac_res" >&5
5964 echo "${ECHO_T}$ac_res" >&6; }
5965 if test `eval echo '${'$as_ac_var'}'` = yes; then
5966   cat >>confdefs.h <<_ACEOF
5967 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5968 _ACEOF
5969
5970 fi
5971 done
5972
5973
5974 for ac_func in setlocale
5975 do
5976 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5977 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5978 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5979 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5980   echo $ECHO_N "(cached) $ECHO_C" >&6
5981 else
5982   cat >conftest.$ac_ext <<_ACEOF
5983 /* confdefs.h.  */
5984 _ACEOF
5985 cat confdefs.h >>conftest.$ac_ext
5986 cat >>conftest.$ac_ext <<_ACEOF
5987 /* end confdefs.h.  */
5988 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5989    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5990 #define $ac_func innocuous_$ac_func
5991
5992 /* System header to define __stub macros and hopefully few prototypes,
5993     which can conflict with char $ac_func (); below.
5994     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5995     <limits.h> exists even on freestanding compilers.  */
5996
5997 #ifdef __STDC__
5998 # include <limits.h>
5999 #else
6000 # include <assert.h>
6001 #endif
6002
6003 #undef $ac_func
6004
6005 /* Override any GCC internal prototype to avoid an error.
6006    Use char because int might match the return type of a GCC
6007    builtin and then its argument prototype would still apply.  */
6008 #ifdef __cplusplus
6009 extern "C"
6010 #endif
6011 char $ac_func ();
6012 /* The GNU C library defines this for functions which it implements
6013     to always fail with ENOSYS.  Some functions are actually named
6014     something starting with __ and the normal name is an alias.  */
6015 #if defined __stub_$ac_func || defined __stub___$ac_func
6016 choke me
6017 #endif
6018
6019 int
6020 main ()
6021 {
6022 return $ac_func ();
6023   ;
6024   return 0;
6025 }
6026 _ACEOF
6027 rm -f conftest.$ac_objext conftest$ac_exeext
6028 if { (ac_try="$ac_link"
6029 case "(($ac_try" in
6030   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6031   *) ac_try_echo=$ac_try;;
6032 esac
6033 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6034   (eval "$ac_link") 2>conftest.er1
6035   ac_status=$?
6036   grep -v '^ *+' conftest.er1 >conftest.err
6037   rm -f conftest.er1
6038   cat conftest.err >&5
6039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6040   (exit $ac_status); } &&
6041          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6042   { (case "(($ac_try" in
6043   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6044   *) ac_try_echo=$ac_try;;
6045 esac
6046 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6047   (eval "$ac_try") 2>&5
6048   ac_status=$?
6049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6050   (exit $ac_status); }; } &&
6051          { ac_try='test -s conftest$ac_exeext'
6052   { (case "(($ac_try" in
6053   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6054   *) ac_try_echo=$ac_try;;
6055 esac
6056 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6057   (eval "$ac_try") 2>&5
6058   ac_status=$?
6059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6060   (exit $ac_status); }; }; then
6061   eval "$as_ac_var=yes"
6062 else
6063   echo "$as_me: failed program was:" >&5
6064 sed 's/^/| /' conftest.$ac_ext >&5
6065
6066         eval "$as_ac_var=no"
6067 fi
6068
6069 rm -f core conftest.err conftest.$ac_objext \
6070       conftest$ac_exeext conftest.$ac_ext
6071 fi
6072 ac_res=`eval echo '${'$as_ac_var'}'`
6073                { echo "$as_me:$LINENO: result: $ac_res" >&5
6074 echo "${ECHO_T}$ac_res" >&6; }
6075 if test `eval echo '${'$as_ac_var'}'` = yes; then
6076   cat >>confdefs.h <<_ACEOF
6077 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6078 _ACEOF
6079
6080 fi
6081 done
6082
6083 { echo "$as_me:$LINENO: checking for struct icmp" >&5
6084 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6; }
6085 if test "${ac_cv_have_icmp+set}" = set; then
6086   echo $ECHO_N "(cached) $ECHO_C" >&6
6087 else
6088   cat >conftest.$ac_ext <<_ACEOF
6089 /* confdefs.h.  */
6090 _ACEOF
6091 cat confdefs.h >>conftest.$ac_ext
6092 cat >>conftest.$ac_ext <<_ACEOF
6093 /* end confdefs.h.  */
6094 #include <stdlib.h>
6095                    #include <stdio.h>
6096                    #include <math.h>
6097                    #include <unistd.h>
6098                    #include <limits.h>
6099                    #include <signal.h>
6100                    #include <fcntl.h>
6101                    #include <sys/types.h>
6102                    #include <sys/time.h>
6103                    #include <sys/ipc.h>
6104                    #include <sys/shm.h>
6105                    #include <sys/socket.h>
6106                    #include <netinet/in_systm.h>
6107                    #include <netinet/in.h>
6108                    #include <netinet/ip.h>
6109                    #include <netinet/ip_icmp.h>
6110                    #include <netinet/udp.h>
6111                    #include <arpa/inet.h>
6112                    #include <netdb.h>
6113 int
6114 main ()
6115 {
6116 struct icmp i;
6117                    struct sockaddr s;
6118                    struct sockaddr_in si;
6119                    struct ip ip;
6120                    i.icmp_type = ICMP_ECHO;
6121                    i.icmp_code = 0;
6122                    i.icmp_cksum = 0;
6123                    i.icmp_id = 0;
6124                    i.icmp_seq = 0;
6125                    si.sin_family = AF_INET;
6126                    #if defined(__DECC) || defined(_IP_VHL)
6127                    ip.ip_vhl = 0;
6128                    #else
6129                    ip.ip_hl = 0;
6130                    #endif
6131
6132   ;
6133   return 0;
6134 }
6135 _ACEOF
6136 rm -f conftest.$ac_objext
6137 if { (ac_try="$ac_compile"
6138 case "(($ac_try" in
6139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6140   *) ac_try_echo=$ac_try;;
6141 esac
6142 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6143   (eval "$ac_compile") 2>conftest.er1
6144   ac_status=$?
6145   grep -v '^ *+' conftest.er1 >conftest.err
6146   rm -f conftest.er1
6147   cat conftest.err >&5
6148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6149   (exit $ac_status); } &&
6150          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6151   { (case "(($ac_try" in
6152   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6153   *) ac_try_echo=$ac_try;;
6154 esac
6155 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6156   (eval "$ac_try") 2>&5
6157   ac_status=$?
6158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6159   (exit $ac_status); }; } &&
6160          { ac_try='test -s conftest.$ac_objext'
6161   { (case "(($ac_try" in
6162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6163   *) ac_try_echo=$ac_try;;
6164 esac
6165 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6166   (eval "$ac_try") 2>&5
6167   ac_status=$?
6168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6169   (exit $ac_status); }; }; then
6170   ac_cv_have_icmp=yes
6171 else
6172   echo "$as_me: failed program was:" >&5
6173 sed 's/^/| /' conftest.$ac_ext >&5
6174
6175         ac_cv_have_icmp=no
6176 fi
6177
6178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6179 fi
6180 { echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
6181 echo "${ECHO_T}$ac_cv_have_icmp" >&6; }
6182  if test "$ac_cv_have_icmp" = yes ; then
6183    cat >>confdefs.h <<\_ACEOF
6184 #define HAVE_ICMP 1
6185 _ACEOF
6186
6187  fi
6188 { echo "$as_me:$LINENO: checking for struct icmphdr" >&5
6189 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6; }
6190 if test "${ac_cv_have_icmphdr+set}" = set; then
6191   echo $ECHO_N "(cached) $ECHO_C" >&6
6192 else
6193   cat >conftest.$ac_ext <<_ACEOF
6194 /* confdefs.h.  */
6195 _ACEOF
6196 cat confdefs.h >>conftest.$ac_ext
6197 cat >>conftest.$ac_ext <<_ACEOF
6198 /* end confdefs.h.  */
6199 #include <stdlib.h>
6200                    #include <stdio.h>
6201                    #include <math.h>
6202                    #include <unistd.h>
6203                    #include <limits.h>
6204                    #include <signal.h>
6205                    #include <fcntl.h>
6206                    #include <sys/types.h>
6207                    #include <sys/time.h>
6208                    #include <sys/ipc.h>
6209                    #include <sys/shm.h>
6210                    #include <sys/socket.h>
6211                    #include <netinet/in_systm.h>
6212                    #include <netinet/in.h>
6213                    #include <netinet/ip.h>
6214                    #include <netinet/ip_icmp.h>
6215                    #include <netinet/udp.h>
6216                    #include <arpa/inet.h>
6217                    #include <netdb.h>
6218 int
6219 main ()
6220 {
6221 struct icmphdr i;
6222                    struct sockaddr s;
6223                    struct sockaddr_in si;
6224                    struct ip ip;
6225                    i.type = ICMP_ECHO;
6226                    i.code = 0;
6227                    i.checksum = 0;
6228                    i.un.echo.id = 0;
6229                    i.un.echo.sequence = 0;
6230                    si.sin_family = AF_INET;
6231                    ip.ip_hl = 0;
6232   ;
6233   return 0;
6234 }
6235 _ACEOF
6236 rm -f conftest.$ac_objext
6237 if { (ac_try="$ac_compile"
6238 case "(($ac_try" in
6239   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6240   *) ac_try_echo=$ac_try;;
6241 esac
6242 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6243   (eval "$ac_compile") 2>conftest.er1
6244   ac_status=$?
6245   grep -v '^ *+' conftest.er1 >conftest.err
6246   rm -f conftest.er1
6247   cat conftest.err >&5
6248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6249   (exit $ac_status); } &&
6250          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6251   { (case "(($ac_try" in
6252   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6253   *) ac_try_echo=$ac_try;;
6254 esac
6255 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6256   (eval "$ac_try") 2>&5
6257   ac_status=$?
6258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6259   (exit $ac_status); }; } &&
6260          { ac_try='test -s conftest.$ac_objext'
6261   { (case "(($ac_try" in
6262   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6263   *) ac_try_echo=$ac_try;;
6264 esac
6265 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6266   (eval "$ac_try") 2>&5
6267   ac_status=$?
6268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6269   (exit $ac_status); }; }; then
6270   ac_cv_have_icmphdr=yes
6271 else
6272   echo "$as_me: failed program was:" >&5
6273 sed 's/^/| /' conftest.$ac_ext >&5
6274
6275         ac_cv_have_icmphdr=no
6276 fi
6277
6278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6279 fi
6280 { echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
6281 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6; }
6282  if test "$ac_cv_have_icmphdr" = yes ; then
6283    cat >>confdefs.h <<\_ACEOF
6284 #define HAVE_ICMPHDR 1
6285 _ACEOF
6286
6287  fi
6288
6289
6290 for ac_header in crypt.h sys/select.h
6291 do
6292 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6293 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6294   { echo "$as_me:$LINENO: checking for $ac_header" >&5
6295 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6296 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6297   echo $ECHO_N "(cached) $ECHO_C" >&6
6298 fi
6299 ac_res=`eval echo '${'$as_ac_Header'}'`
6300                { echo "$as_me:$LINENO: result: $ac_res" >&5
6301 echo "${ECHO_T}$ac_res" >&6; }
6302 else
6303   # Is the header compilable?
6304 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
6305 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6306 cat >conftest.$ac_ext <<_ACEOF
6307 /* confdefs.h.  */
6308 _ACEOF
6309 cat confdefs.h >>conftest.$ac_ext
6310 cat >>conftest.$ac_ext <<_ACEOF
6311 /* end confdefs.h.  */
6312 $ac_includes_default
6313 #include <$ac_header>
6314 _ACEOF
6315 rm -f conftest.$ac_objext
6316 if { (ac_try="$ac_compile"
6317 case "(($ac_try" in
6318   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6319   *) ac_try_echo=$ac_try;;
6320 esac
6321 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6322   (eval "$ac_compile") 2>conftest.er1
6323   ac_status=$?
6324   grep -v '^ *+' conftest.er1 >conftest.err
6325   rm -f conftest.er1
6326   cat conftest.err >&5
6327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6328   (exit $ac_status); } &&
6329          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6330   { (case "(($ac_try" in
6331   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6332   *) ac_try_echo=$ac_try;;
6333 esac
6334 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6335   (eval "$ac_try") 2>&5
6336   ac_status=$?
6337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6338   (exit $ac_status); }; } &&
6339          { ac_try='test -s conftest.$ac_objext'
6340   { (case "(($ac_try" in
6341   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6342   *) ac_try_echo=$ac_try;;
6343 esac
6344 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6345   (eval "$ac_try") 2>&5
6346   ac_status=$?
6347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6348   (exit $ac_status); }; }; then
6349   ac_header_compiler=yes
6350 else
6351   echo "$as_me: failed program was:" >&5
6352 sed 's/^/| /' conftest.$ac_ext >&5
6353
6354         ac_header_compiler=no
6355 fi
6356
6357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6358 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6359 echo "${ECHO_T}$ac_header_compiler" >&6; }
6360
6361 # Is the header present?
6362 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
6363 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6364 cat >conftest.$ac_ext <<_ACEOF
6365 /* confdefs.h.  */
6366 _ACEOF
6367 cat confdefs.h >>conftest.$ac_ext
6368 cat >>conftest.$ac_ext <<_ACEOF
6369 /* end confdefs.h.  */
6370 #include <$ac_header>
6371 _ACEOF
6372 if { (ac_try="$ac_cpp conftest.$ac_ext"
6373 case "(($ac_try" in
6374   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6375   *) ac_try_echo=$ac_try;;
6376 esac
6377 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6378   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6379   ac_status=$?
6380   grep -v '^ *+' conftest.er1 >conftest.err
6381   rm -f conftest.er1
6382   cat conftest.err >&5
6383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6384   (exit $ac_status); } >/dev/null; then
6385   if test -s conftest.err; then
6386     ac_cpp_err=$ac_c_preproc_warn_flag
6387     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6388   else
6389     ac_cpp_err=
6390   fi
6391 else
6392   ac_cpp_err=yes
6393 fi
6394 if test -z "$ac_cpp_err"; then
6395   ac_header_preproc=yes
6396 else
6397   echo "$as_me: failed program was:" >&5
6398 sed 's/^/| /' conftest.$ac_ext >&5
6399
6400   ac_header_preproc=no
6401 fi
6402
6403 rm -f conftest.err conftest.$ac_ext
6404 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6405 echo "${ECHO_T}$ac_header_preproc" >&6; }
6406
6407 # So?  What about this header?
6408 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6409   yes:no: )
6410     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6411 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6412     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6413 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6414     ac_header_preproc=yes
6415     ;;
6416   no:yes:* )
6417     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6418 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6419     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6420 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6421     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6422 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6423     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6424 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6425     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6426 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6427     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6428 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6429
6430     ;;
6431 esac
6432 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6433 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6434 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6435   echo $ECHO_N "(cached) $ECHO_C" >&6
6436 else
6437   eval "$as_ac_Header=\$ac_header_preproc"
6438 fi
6439 ac_res=`eval echo '${'$as_ac_Header'}'`
6440                { echo "$as_me:$LINENO: result: $ac_res" >&5
6441 echo "${ECHO_T}$ac_res" >&6; }
6442
6443 fi
6444 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6445   cat >>confdefs.h <<_ACEOF
6446 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6447 _ACEOF
6448
6449 fi
6450
6451 done
6452
6453 for ac_prog in perl5 perl
6454 do
6455   # Extract the first word of "$ac_prog", so it can be a program name with args.
6456 set dummy $ac_prog; ac_word=$2
6457 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6458 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6459 if test "${ac_cv_path_PERL+set}" = set; then
6460   echo $ECHO_N "(cached) $ECHO_C" >&6
6461 else
6462   case $PERL in
6463   [\\/]* | ?:[\\/]*)
6464   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6465   ;;
6466   *)
6467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6468 for as_dir in $PATH
6469 do
6470   IFS=$as_save_IFS
6471   test -z "$as_dir" && as_dir=.
6472   for ac_exec_ext in '' $ac_executable_extensions; do
6473   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
6474     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6475     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6476     break 2
6477   fi
6478 done
6479 done
6480 IFS=$as_save_IFS
6481
6482   ;;
6483 esac
6484 fi
6485 PERL=$ac_cv_path_PERL
6486 if test -n "$PERL"; then
6487   { echo "$as_me:$LINENO: result: $PERL" >&5
6488 echo "${ECHO_T}$PERL" >&6; }
6489 else
6490   { echo "$as_me:$LINENO: result: no" >&5
6491 echo "${ECHO_T}no" >&6; }
6492 fi
6493
6494
6495   test -n "$PERL" && break
6496 done
6497
6498   if test -z "$PERL" ; then
6499     PERL_VERSION=0
6500   else
6501     { echo "$as_me:$LINENO: checking perl version" >&5
6502 echo $ECHO_N "checking perl version... $ECHO_C" >&6; }
6503 if test "${ac_cv_perl_version+set}" = set; then
6504   echo $ECHO_N "(cached) $ECHO_C" >&6
6505 else
6506   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6507 fi
6508 { echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6509 echo "${ECHO_T}$ac_cv_perl_version" >&6; }
6510     PERL_VERSION=$ac_cv_perl_version
6511   fi
6512
6513
6514 if test -z "$PERL" ; then
6515   # don't let it be blank...
6516   PERL=/usr/bin/perl
6517 fi
6518
6519 { echo "$as_me:$LINENO: checking for X" >&5
6520 echo $ECHO_N "checking for X... $ECHO_C" >&6; }
6521
6522
6523 # Check whether --with-x was given.
6524 if test "${with_x+set}" = set; then
6525   withval=$with_x;
6526 fi
6527
6528 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6529 if test "x$with_x" = xno; then
6530   # The user explicitly disabled X.
6531   have_x=disabled
6532 else
6533   case $x_includes,$x_libraries in #(
6534     *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
6535 echo "$as_me: error: Cannot use X directory names containing '" >&2;}
6536    { (exit 1); exit 1; }; };; #(
6537     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6538   echo $ECHO_N "(cached) $ECHO_C" >&6
6539 else
6540   # One or both of the vars are not set, and there is no cached value.
6541 ac_x_includes=no ac_x_libraries=no
6542 rm -f -r conftest.dir
6543 if mkdir conftest.dir; then
6544   cd conftest.dir
6545   cat >Imakefile <<'_ACEOF'
6546 incroot:
6547         @echo incroot='${INCROOT}'
6548 usrlibdir:
6549         @echo usrlibdir='${USRLIBDIR}'
6550 libdir:
6551         @echo libdir='${LIBDIR}'
6552 _ACEOF
6553   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6554     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6555     for ac_var in incroot usrlibdir libdir; do
6556       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6557     done
6558     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6559     for ac_extension in a so sl; do
6560       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6561          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6562         ac_im_usrlibdir=$ac_im_libdir; break
6563       fi
6564     done
6565     # Screen out bogus values from the imake configuration.  They are
6566     # bogus both because they are the default anyway, and because
6567     # using them would break gcc on systems where it needs fixed includes.
6568     case $ac_im_incroot in
6569         /usr/include) ac_x_includes= ;;
6570         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6571     esac
6572     case $ac_im_usrlibdir in
6573         /usr/lib | /lib) ;;
6574         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6575     esac
6576   fi
6577   cd ..
6578   rm -f -r conftest.dir
6579 fi
6580
6581 # Standard set of common directories for X headers.
6582 # Check X11 before X11Rn because it is often a symlink to the current release.
6583 ac_x_header_dirs='
6584 /usr/X11/include
6585 /usr/X11R6/include
6586 /usr/X11R5/include
6587 /usr/X11R4/include
6588
6589 /usr/include/X11
6590 /usr/include/X11R6
6591 /usr/include/X11R5
6592 /usr/include/X11R4
6593
6594 /usr/local/X11/include
6595 /usr/local/X11R6/include
6596 /usr/local/X11R5/include
6597 /usr/local/X11R4/include
6598
6599 /usr/local/include/X11
6600 /usr/local/include/X11R6
6601 /usr/local/include/X11R5
6602 /usr/local/include/X11R4
6603
6604 /usr/X386/include
6605 /usr/x386/include
6606 /usr/XFree86/include/X11
6607
6608 /usr/include
6609 /usr/local/include
6610 /usr/unsupported/include
6611 /usr/athena/include
6612 /usr/local/x11r5/include
6613 /usr/lpp/Xamples/include
6614
6615 /usr/openwin/include
6616 /usr/openwin/share/include'
6617
6618 if test "$ac_x_includes" = no; then
6619   # Guess where to find include files, by looking for Xlib.h.
6620   # First, try using that file with no special directory specified.
6621   cat >conftest.$ac_ext <<_ACEOF
6622 /* confdefs.h.  */
6623 _ACEOF
6624 cat confdefs.h >>conftest.$ac_ext
6625 cat >>conftest.$ac_ext <<_ACEOF
6626 /* end confdefs.h.  */
6627 #include <X11/Xlib.h>
6628 _ACEOF
6629 if { (ac_try="$ac_cpp conftest.$ac_ext"
6630 case "(($ac_try" in
6631   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6632   *) ac_try_echo=$ac_try;;
6633 esac
6634 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6635   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6636   ac_status=$?
6637   grep -v '^ *+' conftest.er1 >conftest.err
6638   rm -f conftest.er1
6639   cat conftest.err >&5
6640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6641   (exit $ac_status); } >/dev/null; then
6642   if test -s conftest.err; then
6643     ac_cpp_err=$ac_c_preproc_warn_flag
6644     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6645   else
6646     ac_cpp_err=
6647   fi
6648 else
6649   ac_cpp_err=yes
6650 fi
6651 if test -z "$ac_cpp_err"; then
6652   # We can compile using X headers with no special include directory.
6653 ac_x_includes=
6654 else
6655   echo "$as_me: failed program was:" >&5
6656 sed 's/^/| /' conftest.$ac_ext >&5
6657
6658   for ac_dir in $ac_x_header_dirs; do
6659   if test -r "$ac_dir/X11/Xlib.h"; then
6660     ac_x_includes=$ac_dir
6661     break
6662   fi
6663 done
6664 fi
6665
6666 rm -f conftest.err conftest.$ac_ext
6667 fi # $ac_x_includes = no
6668
6669 if test "$ac_x_libraries" = no; then
6670   # Check for the libraries.
6671   # See if we find them without any special options.
6672   # Don't add to $LIBS permanently.
6673   ac_save_LIBS=$LIBS
6674   LIBS="-lXt $LIBS"
6675   cat >conftest.$ac_ext <<_ACEOF
6676 /* confdefs.h.  */
6677 _ACEOF
6678 cat confdefs.h >>conftest.$ac_ext
6679 cat >>conftest.$ac_ext <<_ACEOF
6680 /* end confdefs.h.  */
6681 #include <X11/Xlib.h>
6682 int
6683 main ()
6684 {
6685 XrmInitialize ()
6686   ;
6687   return 0;
6688 }
6689 _ACEOF
6690 rm -f conftest.$ac_objext conftest$ac_exeext
6691 if { (ac_try="$ac_link"
6692 case "(($ac_try" in
6693   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6694   *) ac_try_echo=$ac_try;;
6695 esac
6696 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6697   (eval "$ac_link") 2>conftest.er1
6698   ac_status=$?
6699   grep -v '^ *+' conftest.er1 >conftest.err
6700   rm -f conftest.er1
6701   cat conftest.err >&5
6702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6703   (exit $ac_status); } &&
6704          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6705   { (case "(($ac_try" in
6706   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6707   *) ac_try_echo=$ac_try;;
6708 esac
6709 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6710   (eval "$ac_try") 2>&5
6711   ac_status=$?
6712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6713   (exit $ac_status); }; } &&
6714          { ac_try='test -s conftest$ac_exeext'
6715   { (case "(($ac_try" in
6716   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6717   *) ac_try_echo=$ac_try;;
6718 esac
6719 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6720   (eval "$ac_try") 2>&5
6721   ac_status=$?
6722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6723   (exit $ac_status); }; }; then
6724   LIBS=$ac_save_LIBS
6725 # We can link X programs with no special library path.
6726 ac_x_libraries=
6727 else
6728   echo "$as_me: failed program was:" >&5
6729 sed 's/^/| /' conftest.$ac_ext >&5
6730
6731         LIBS=$ac_save_LIBS
6732 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6733 do
6734   # Don't even attempt the hair of trying to link an X program!
6735   for ac_extension in a so sl; do
6736     if test -r "$ac_dir/libXt.$ac_extension"; then
6737       ac_x_libraries=$ac_dir
6738       break 2
6739     fi
6740   done
6741 done
6742 fi
6743
6744 rm -f core conftest.err conftest.$ac_objext \
6745       conftest$ac_exeext conftest.$ac_ext
6746 fi # $ac_x_libraries = no
6747
6748 case $ac_x_includes,$ac_x_libraries in #(
6749   no,* | *,no | *\'*)
6750     # Didn't find X, or a directory has "'" in its name.
6751     ac_cv_have_x="have_x=no";; #(
6752   *)
6753     # Record where we found X for the cache.
6754     ac_cv_have_x="have_x=yes\
6755         ac_x_includes='$ac_x_includes'\
6756         ac_x_libraries='$ac_x_libraries'"
6757 esac
6758 fi
6759 ;; #(
6760     *) have_x=yes;;
6761   esac
6762   eval "$ac_cv_have_x"
6763 fi # $with_x != no
6764
6765 if test "$have_x" != yes; then
6766   { echo "$as_me:$LINENO: result: $have_x" >&5
6767 echo "${ECHO_T}$have_x" >&6; }
6768   no_x=yes
6769 else
6770   # If each of the values was on the command line, it overrides each guess.
6771   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6772   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6773   # Update the cache value to reflect the command line values.
6774   ac_cv_have_x="have_x=yes\
6775         ac_x_includes='$x_includes'\
6776         ac_x_libraries='$x_libraries'"
6777   { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6778 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
6779 fi
6780
6781 if test "$no_x" = yes; then
6782   # Not all programs may use this symbol, but it does not hurt to define it.
6783
6784 cat >>confdefs.h <<\_ACEOF
6785 #define X_DISPLAY_MISSING 1
6786 _ACEOF
6787
6788   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6789 else
6790   if test -n "$x_includes"; then
6791     X_CFLAGS="$X_CFLAGS -I$x_includes"
6792   fi
6793
6794   # It would also be nice to do this for all -L options, not just this one.
6795   if test -n "$x_libraries"; then
6796     X_LIBS="$X_LIBS -L$x_libraries"
6797     # For Solaris; some versions of Sun CC require a space after -R and
6798     # others require no space.  Words are not sufficient . . . .
6799     case `(uname -sr) 2>/dev/null` in
6800     "SunOS 5"*)
6801       { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6802 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
6803       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6804       cat >conftest.$ac_ext <<_ACEOF
6805 /* confdefs.h.  */
6806 _ACEOF
6807 cat confdefs.h >>conftest.$ac_ext
6808 cat >>conftest.$ac_ext <<_ACEOF
6809 /* end confdefs.h.  */
6810
6811 int
6812 main ()
6813 {
6814
6815   ;
6816   return 0;
6817 }
6818 _ACEOF
6819 rm -f conftest.$ac_objext conftest$ac_exeext
6820 if { (ac_try="$ac_link"
6821 case "(($ac_try" in
6822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6823   *) ac_try_echo=$ac_try;;
6824 esac
6825 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6826   (eval "$ac_link") 2>conftest.er1
6827   ac_status=$?
6828   grep -v '^ *+' conftest.er1 >conftest.err
6829   rm -f conftest.er1
6830   cat conftest.err >&5
6831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6832   (exit $ac_status); } &&
6833          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6834   { (case "(($ac_try" in
6835   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6836   *) ac_try_echo=$ac_try;;
6837 esac
6838 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6839   (eval "$ac_try") 2>&5
6840   ac_status=$?
6841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6842   (exit $ac_status); }; } &&
6843          { ac_try='test -s conftest$ac_exeext'
6844   { (case "(($ac_try" in
6845   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6846   *) ac_try_echo=$ac_try;;
6847 esac
6848 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6849   (eval "$ac_try") 2>&5
6850   ac_status=$?
6851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6852   (exit $ac_status); }; }; then
6853   ac_R_nospace=yes
6854 else
6855   echo "$as_me: failed program was:" >&5
6856 sed 's/^/| /' conftest.$ac_ext >&5
6857
6858         ac_R_nospace=no
6859 fi
6860
6861 rm -f core conftest.err conftest.$ac_objext \
6862       conftest$ac_exeext conftest.$ac_ext
6863       if test $ac_R_nospace = yes; then
6864         { echo "$as_me:$LINENO: result: no" >&5
6865 echo "${ECHO_T}no" >&6; }
6866         X_LIBS="$X_LIBS -R$x_libraries"
6867       else
6868         LIBS="$ac_xsave_LIBS -R $x_libraries"
6869         cat >conftest.$ac_ext <<_ACEOF
6870 /* confdefs.h.  */
6871 _ACEOF
6872 cat confdefs.h >>conftest.$ac_ext
6873 cat >>conftest.$ac_ext <<_ACEOF
6874 /* end confdefs.h.  */
6875
6876 int
6877 main ()
6878 {
6879
6880   ;
6881   return 0;
6882 }
6883 _ACEOF
6884 rm -f conftest.$ac_objext conftest$ac_exeext
6885 if { (ac_try="$ac_link"
6886 case "(($ac_try" in
6887   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6888   *) ac_try_echo=$ac_try;;
6889 esac
6890 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6891   (eval "$ac_link") 2>conftest.er1
6892   ac_status=$?
6893   grep -v '^ *+' conftest.er1 >conftest.err
6894   rm -f conftest.er1
6895   cat conftest.err >&5
6896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6897   (exit $ac_status); } &&
6898          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6899   { (case "(($ac_try" in
6900   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6901   *) ac_try_echo=$ac_try;;
6902 esac
6903 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6904   (eval "$ac_try") 2>&5
6905   ac_status=$?
6906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6907   (exit $ac_status); }; } &&
6908          { ac_try='test -s conftest$ac_exeext'
6909   { (case "(($ac_try" in
6910   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6911   *) ac_try_echo=$ac_try;;
6912 esac
6913 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6914   (eval "$ac_try") 2>&5
6915   ac_status=$?
6916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6917   (exit $ac_status); }; }; then
6918   ac_R_space=yes
6919 else
6920   echo "$as_me: failed program was:" >&5
6921 sed 's/^/| /' conftest.$ac_ext >&5
6922
6923         ac_R_space=no
6924 fi
6925
6926 rm -f core conftest.err conftest.$ac_objext \
6927       conftest$ac_exeext conftest.$ac_ext
6928         if test $ac_R_space = yes; then
6929           { echo "$as_me:$LINENO: result: yes" >&5
6930 echo "${ECHO_T}yes" >&6; }
6931           X_LIBS="$X_LIBS -R $x_libraries"
6932         else
6933           { echo "$as_me:$LINENO: result: neither works" >&5
6934 echo "${ECHO_T}neither works" >&6; }
6935         fi
6936       fi
6937       LIBS=$ac_xsave_LIBS
6938     esac
6939   fi
6940
6941   # Check for system-dependent libraries X programs must link with.
6942   # Do this before checking for the system-independent R6 libraries
6943   # (-lICE), since we may need -lsocket or whatever for X linking.
6944
6945   if test "$ISC" = yes; then
6946     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6947   else
6948     # Martyn Johnson says this is needed for Ultrix, if the X
6949     # libraries were built with DECnet support.  And Karl Berry says
6950     # the Alpha needs dnet_stub (dnet does not exist).
6951     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6952     cat >conftest.$ac_ext <<_ACEOF
6953 /* confdefs.h.  */
6954 _ACEOF
6955 cat confdefs.h >>conftest.$ac_ext
6956 cat >>conftest.$ac_ext <<_ACEOF
6957 /* end confdefs.h.  */
6958
6959 /* Override any GCC internal prototype to avoid an error.
6960    Use char because int might match the return type of a GCC
6961    builtin and then its argument prototype would still apply.  */
6962 #ifdef __cplusplus
6963 extern "C"
6964 #endif
6965 char XOpenDisplay ();
6966 int
6967 main ()
6968 {
6969 return XOpenDisplay ();
6970   ;
6971   return 0;
6972 }
6973 _ACEOF
6974 rm -f conftest.$ac_objext conftest$ac_exeext
6975 if { (ac_try="$ac_link"
6976 case "(($ac_try" in
6977   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6978   *) ac_try_echo=$ac_try;;
6979 esac
6980 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6981   (eval "$ac_link") 2>conftest.er1
6982   ac_status=$?
6983   grep -v '^ *+' conftest.er1 >conftest.err
6984   rm -f conftest.er1
6985   cat conftest.err >&5
6986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6987   (exit $ac_status); } &&
6988          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6989   { (case "(($ac_try" in
6990   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6991   *) ac_try_echo=$ac_try;;
6992 esac
6993 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6994   (eval "$ac_try") 2>&5
6995   ac_status=$?
6996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6997   (exit $ac_status); }; } &&
6998          { ac_try='test -s conftest$ac_exeext'
6999   { (case "(($ac_try" in
7000   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7001   *) ac_try_echo=$ac_try;;
7002 esac
7003 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7004   (eval "$ac_try") 2>&5
7005   ac_status=$?
7006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7007   (exit $ac_status); }; }; then
7008   :
7009 else
7010   echo "$as_me: failed program was:" >&5
7011 sed 's/^/| /' conftest.$ac_ext >&5
7012
7013         { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
7014 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
7015 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
7016   echo $ECHO_N "(cached) $ECHO_C" >&6
7017 else
7018   ac_check_lib_save_LIBS=$LIBS
7019 LIBS="-ldnet  $LIBS"
7020 cat >conftest.$ac_ext <<_ACEOF
7021 /* confdefs.h.  */
7022 _ACEOF
7023 cat confdefs.h >>conftest.$ac_ext
7024 cat >>conftest.$ac_ext <<_ACEOF
7025 /* end confdefs.h.  */
7026
7027 /* Override any GCC internal prototype to avoid an error.
7028    Use char because int might match the return type of a GCC
7029    builtin and then its argument prototype would still apply.  */
7030 #ifdef __cplusplus
7031 extern "C"
7032 #endif
7033 char dnet_ntoa ();
7034 int
7035 main ()
7036 {
7037 return dnet_ntoa ();
7038   ;
7039   return 0;
7040 }
7041 _ACEOF
7042 rm -f conftest.$ac_objext conftest$ac_exeext
7043 if { (ac_try="$ac_link"
7044 case "(($ac_try" in
7045   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7046   *) ac_try_echo=$ac_try;;
7047 esac
7048 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7049   (eval "$ac_link") 2>conftest.er1
7050   ac_status=$?
7051   grep -v '^ *+' conftest.er1 >conftest.err
7052   rm -f conftest.er1
7053   cat conftest.err >&5
7054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7055   (exit $ac_status); } &&
7056          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7057   { (case "(($ac_try" in
7058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7059   *) ac_try_echo=$ac_try;;
7060 esac
7061 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7062   (eval "$ac_try") 2>&5
7063   ac_status=$?
7064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7065   (exit $ac_status); }; } &&
7066          { ac_try='test -s conftest$ac_exeext'
7067   { (case "(($ac_try" in
7068   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7069   *) ac_try_echo=$ac_try;;
7070 esac
7071 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7072   (eval "$ac_try") 2>&5
7073   ac_status=$?
7074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7075   (exit $ac_status); }; }; then
7076   ac_cv_lib_dnet_dnet_ntoa=yes
7077 else
7078   echo "$as_me: failed program was:" >&5
7079 sed 's/^/| /' conftest.$ac_ext >&5
7080
7081         ac_cv_lib_dnet_dnet_ntoa=no
7082 fi
7083
7084 rm -f core conftest.err conftest.$ac_objext \
7085       conftest$ac_exeext conftest.$ac_ext
7086 LIBS=$ac_check_lib_save_LIBS
7087 fi
7088 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7089 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
7090 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
7091   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
7092 fi
7093
7094     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
7095       { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
7096 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
7097 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
7098   echo $ECHO_N "(cached) $ECHO_C" >&6
7099 else
7100   ac_check_lib_save_LIBS=$LIBS
7101 LIBS="-ldnet_stub  $LIBS"
7102 cat >conftest.$ac_ext <<_ACEOF
7103 /* confdefs.h.  */
7104 _ACEOF
7105 cat confdefs.h >>conftest.$ac_ext
7106 cat >>conftest.$ac_ext <<_ACEOF
7107 /* end confdefs.h.  */
7108
7109 /* Override any GCC internal prototype to avoid an error.
7110    Use char because int might match the return type of a GCC
7111    builtin and then its argument prototype would still apply.  */
7112 #ifdef __cplusplus
7113 extern "C"
7114 #endif
7115 char dnet_ntoa ();
7116 int
7117 main ()
7118 {
7119 return dnet_ntoa ();
7120   ;
7121   return 0;
7122 }
7123 _ACEOF
7124 rm -f conftest.$ac_objext conftest$ac_exeext
7125 if { (ac_try="$ac_link"
7126 case "(($ac_try" in
7127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7128   *) ac_try_echo=$ac_try;;
7129 esac
7130 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7131   (eval "$ac_link") 2>conftest.er1
7132   ac_status=$?
7133   grep -v '^ *+' conftest.er1 >conftest.err
7134   rm -f conftest.er1
7135   cat conftest.err >&5
7136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7137   (exit $ac_status); } &&
7138          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7139   { (case "(($ac_try" in
7140   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7141   *) ac_try_echo=$ac_try;;
7142 esac
7143 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7144   (eval "$ac_try") 2>&5
7145   ac_status=$?
7146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7147   (exit $ac_status); }; } &&
7148          { ac_try='test -s conftest$ac_exeext'
7149   { (case "(($ac_try" in
7150   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7151   *) ac_try_echo=$ac_try;;
7152 esac
7153 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7154   (eval "$ac_try") 2>&5
7155   ac_status=$?
7156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7157   (exit $ac_status); }; }; then
7158   ac_cv_lib_dnet_stub_dnet_ntoa=yes
7159 else
7160   echo "$as_me: failed program was:" >&5
7161 sed 's/^/| /' conftest.$ac_ext >&5
7162
7163         ac_cv_lib_dnet_stub_dnet_ntoa=no
7164 fi
7165
7166 rm -f core conftest.err conftest.$ac_objext \
7167       conftest$ac_exeext conftest.$ac_ext
7168 LIBS=$ac_check_lib_save_LIBS
7169 fi
7170 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
7171 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
7172 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
7173   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7174 fi
7175
7176     fi
7177 fi
7178
7179 rm -f core conftest.err conftest.$ac_objext \
7180       conftest$ac_exeext conftest.$ac_ext
7181     LIBS="$ac_xsave_LIBS"
7182
7183     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
7184     # to get the SysV transport functions.
7185     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
7186     # needs -lnsl.
7187     # The nsl library prevents programs from opening the X display
7188     # on Irix 5.2, according to T.E. Dickey.
7189     # The functions gethostbyname, getservbyname, and inet_addr are
7190     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
7191     { echo "$as_me:$LINENO: checking for gethostbyname" >&5
7192 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
7193 if test "${ac_cv_func_gethostbyname+set}" = set; then
7194   echo $ECHO_N "(cached) $ECHO_C" >&6
7195 else
7196   cat >conftest.$ac_ext <<_ACEOF
7197 /* confdefs.h.  */
7198 _ACEOF
7199 cat confdefs.h >>conftest.$ac_ext
7200 cat >>conftest.$ac_ext <<_ACEOF
7201 /* end confdefs.h.  */
7202 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
7203    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7204 #define gethostbyname innocuous_gethostbyname
7205
7206 /* System header to define __stub macros and hopefully few prototypes,
7207     which can conflict with char gethostbyname (); below.
7208     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7209     <limits.h> exists even on freestanding compilers.  */
7210
7211 #ifdef __STDC__
7212 # include <limits.h>
7213 #else
7214 # include <assert.h>
7215 #endif
7216
7217 #undef gethostbyname
7218
7219 /* Override any GCC internal prototype to avoid an error.
7220    Use char because int might match the return type of a GCC
7221    builtin and then its argument prototype would still apply.  */
7222 #ifdef __cplusplus
7223 extern "C"
7224 #endif
7225 char gethostbyname ();
7226 /* The GNU C library defines this for functions which it implements
7227     to always fail with ENOSYS.  Some functions are actually named
7228     something starting with __ and the normal name is an alias.  */
7229 #if defined __stub_gethostbyname || defined __stub___gethostbyname
7230 choke me
7231 #endif
7232
7233 int
7234 main ()
7235 {
7236 return gethostbyname ();
7237   ;
7238   return 0;
7239 }
7240 _ACEOF
7241 rm -f conftest.$ac_objext conftest$ac_exeext
7242 if { (ac_try="$ac_link"
7243 case "(($ac_try" in
7244   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7245   *) ac_try_echo=$ac_try;;
7246 esac
7247 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7248   (eval "$ac_link") 2>conftest.er1
7249   ac_status=$?
7250   grep -v '^ *+' conftest.er1 >conftest.err
7251   rm -f conftest.er1
7252   cat conftest.err >&5
7253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7254   (exit $ac_status); } &&
7255          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7256   { (case "(($ac_try" in
7257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7258   *) ac_try_echo=$ac_try;;
7259 esac
7260 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7261   (eval "$ac_try") 2>&5
7262   ac_status=$?
7263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7264   (exit $ac_status); }; } &&
7265          { ac_try='test -s conftest$ac_exeext'
7266   { (case "(($ac_try" in
7267   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7268   *) ac_try_echo=$ac_try;;
7269 esac
7270 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7271   (eval "$ac_try") 2>&5
7272   ac_status=$?
7273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274   (exit $ac_status); }; }; then
7275   ac_cv_func_gethostbyname=yes
7276 else
7277   echo "$as_me: failed program was:" >&5
7278 sed 's/^/| /' conftest.$ac_ext >&5
7279
7280         ac_cv_func_gethostbyname=no
7281 fi
7282
7283 rm -f core conftest.err conftest.$ac_objext \
7284       conftest$ac_exeext conftest.$ac_ext
7285 fi
7286 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
7287 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
7288
7289     if test $ac_cv_func_gethostbyname = no; then
7290       { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
7291 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
7292 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
7293   echo $ECHO_N "(cached) $ECHO_C" >&6
7294 else
7295   ac_check_lib_save_LIBS=$LIBS
7296 LIBS="-lnsl  $LIBS"
7297 cat >conftest.$ac_ext <<_ACEOF
7298 /* confdefs.h.  */
7299 _ACEOF
7300 cat confdefs.h >>conftest.$ac_ext
7301 cat >>conftest.$ac_ext <<_ACEOF
7302 /* end confdefs.h.  */
7303
7304 /* Override any GCC internal prototype to avoid an error.
7305    Use char because int might match the return type of a GCC
7306    builtin and then its argument prototype would still apply.  */
7307 #ifdef __cplusplus
7308 extern "C"
7309 #endif
7310 char gethostbyname ();
7311 int
7312 main ()
7313 {
7314 return gethostbyname ();
7315   ;
7316   return 0;
7317 }
7318 _ACEOF
7319 rm -f conftest.$ac_objext conftest$ac_exeext
7320 if { (ac_try="$ac_link"
7321 case "(($ac_try" in
7322   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7323   *) ac_try_echo=$ac_try;;
7324 esac
7325 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7326   (eval "$ac_link") 2>conftest.er1
7327   ac_status=$?
7328   grep -v '^ *+' conftest.er1 >conftest.err
7329   rm -f conftest.er1
7330   cat conftest.err >&5
7331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7332   (exit $ac_status); } &&
7333          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7334   { (case "(($ac_try" in
7335   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7336   *) ac_try_echo=$ac_try;;
7337 esac
7338 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7339   (eval "$ac_try") 2>&5
7340   ac_status=$?
7341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342   (exit $ac_status); }; } &&
7343          { ac_try='test -s conftest$ac_exeext'
7344   { (case "(($ac_try" in
7345   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7346   *) ac_try_echo=$ac_try;;
7347 esac
7348 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7349   (eval "$ac_try") 2>&5
7350   ac_status=$?
7351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7352   (exit $ac_status); }; }; then
7353   ac_cv_lib_nsl_gethostbyname=yes
7354 else
7355   echo "$as_me: failed program was:" >&5
7356 sed 's/^/| /' conftest.$ac_ext >&5
7357
7358         ac_cv_lib_nsl_gethostbyname=no
7359 fi
7360
7361 rm -f core conftest.err conftest.$ac_objext \
7362       conftest$ac_exeext conftest.$ac_ext
7363 LIBS=$ac_check_lib_save_LIBS
7364 fi
7365 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
7366 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
7367 if test $ac_cv_lib_nsl_gethostbyname = yes; then
7368   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7369 fi
7370
7371       if test $ac_cv_lib_nsl_gethostbyname = no; then
7372         { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
7373 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
7374 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
7375   echo $ECHO_N "(cached) $ECHO_C" >&6
7376 else
7377   ac_check_lib_save_LIBS=$LIBS
7378 LIBS="-lbsd  $LIBS"
7379 cat >conftest.$ac_ext <<_ACEOF
7380 /* confdefs.h.  */
7381 _ACEOF
7382 cat confdefs.h >>conftest.$ac_ext
7383 cat >>conftest.$ac_ext <<_ACEOF
7384 /* end confdefs.h.  */
7385
7386 /* Override any GCC internal prototype to avoid an error.
7387    Use char because int might match the return type of a GCC
7388    builtin and then its argument prototype would still apply.  */
7389 #ifdef __cplusplus
7390 extern "C"
7391 #endif
7392 char gethostbyname ();
7393 int
7394 main ()
7395 {
7396 return gethostbyname ();
7397   ;
7398   return 0;
7399 }
7400 _ACEOF
7401 rm -f conftest.$ac_objext conftest$ac_exeext
7402 if { (ac_try="$ac_link"
7403 case "(($ac_try" in
7404   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7405   *) ac_try_echo=$ac_try;;
7406 esac
7407 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7408   (eval "$ac_link") 2>conftest.er1
7409   ac_status=$?
7410   grep -v '^ *+' conftest.er1 >conftest.err
7411   rm -f conftest.er1
7412   cat conftest.err >&5
7413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7414   (exit $ac_status); } &&
7415          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7416   { (case "(($ac_try" in
7417   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7418   *) ac_try_echo=$ac_try;;
7419 esac
7420 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7421   (eval "$ac_try") 2>&5
7422   ac_status=$?
7423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424   (exit $ac_status); }; } &&
7425          { ac_try='test -s conftest$ac_exeext'
7426   { (case "(($ac_try" in
7427   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7428   *) ac_try_echo=$ac_try;;
7429 esac
7430 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7431   (eval "$ac_try") 2>&5
7432   ac_status=$?
7433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7434   (exit $ac_status); }; }; then
7435   ac_cv_lib_bsd_gethostbyname=yes
7436 else
7437   echo "$as_me: failed program was:" >&5
7438 sed 's/^/| /' conftest.$ac_ext >&5
7439
7440         ac_cv_lib_bsd_gethostbyname=no
7441 fi
7442
7443 rm -f core conftest.err conftest.$ac_objext \
7444       conftest$ac_exeext conftest.$ac_ext
7445 LIBS=$ac_check_lib_save_LIBS
7446 fi
7447 { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
7448 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
7449 if test $ac_cv_lib_bsd_gethostbyname = yes; then
7450   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
7451 fi
7452
7453       fi
7454     fi
7455
7456     # lieder@skyler.mavd.honeywell.com says without -lsocket,
7457     # socket/setsockopt and other routines are undefined under SCO ODT
7458     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
7459     # on later versions), says Simon Leinen: it contains gethostby*
7460     # variants that don't use the name server (or something).  -lsocket
7461     # must be given before -lnsl if both are needed.  We assume that
7462     # if connect needs -lnsl, so does gethostbyname.
7463     { echo "$as_me:$LINENO: checking for connect" >&5
7464 echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
7465 if test "${ac_cv_func_connect+set}" = set; then
7466   echo $ECHO_N "(cached) $ECHO_C" >&6
7467 else
7468   cat >conftest.$ac_ext <<_ACEOF
7469 /* confdefs.h.  */
7470 _ACEOF
7471 cat confdefs.h >>conftest.$ac_ext
7472 cat >>conftest.$ac_ext <<_ACEOF
7473 /* end confdefs.h.  */
7474 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
7475    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7476 #define connect innocuous_connect
7477
7478 /* System header to define __stub macros and hopefully few prototypes,
7479     which can conflict with char connect (); below.
7480     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7481     <limits.h> exists even on freestanding compilers.  */
7482
7483 #ifdef __STDC__
7484 # include <limits.h>
7485 #else
7486 # include <assert.h>
7487 #endif
7488
7489 #undef connect
7490
7491 /* Override any GCC internal prototype to avoid an error.
7492    Use char because int might match the return type of a GCC
7493    builtin and then its argument prototype would still apply.  */
7494 #ifdef __cplusplus
7495 extern "C"
7496 #endif
7497 char connect ();
7498 /* The GNU C library defines this for functions which it implements
7499     to always fail with ENOSYS.  Some functions are actually named
7500     something starting with __ and the normal name is an alias.  */
7501 #if defined __stub_connect || defined __stub___connect
7502 choke me
7503 #endif
7504
7505 int
7506 main ()
7507 {
7508 return connect ();
7509   ;
7510   return 0;
7511 }
7512 _ACEOF
7513 rm -f conftest.$ac_objext conftest$ac_exeext
7514 if { (ac_try="$ac_link"
7515 case "(($ac_try" in
7516   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7517   *) ac_try_echo=$ac_try;;
7518 esac
7519 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7520   (eval "$ac_link") 2>conftest.er1
7521   ac_status=$?
7522   grep -v '^ *+' conftest.er1 >conftest.err
7523   rm -f conftest.er1
7524   cat conftest.err >&5
7525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7526   (exit $ac_status); } &&
7527          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7528   { (case "(($ac_try" in
7529   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7530   *) ac_try_echo=$ac_try;;
7531 esac
7532 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7533   (eval "$ac_try") 2>&5
7534   ac_status=$?
7535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7536   (exit $ac_status); }; } &&
7537          { ac_try='test -s conftest$ac_exeext'
7538   { (case "(($ac_try" in
7539   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7540   *) ac_try_echo=$ac_try;;
7541 esac
7542 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7543   (eval "$ac_try") 2>&5
7544   ac_status=$?
7545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7546   (exit $ac_status); }; }; then
7547   ac_cv_func_connect=yes
7548 else
7549   echo "$as_me: failed program was:" >&5
7550 sed 's/^/| /' conftest.$ac_ext >&5
7551
7552         ac_cv_func_connect=no
7553 fi
7554
7555 rm -f core conftest.err conftest.$ac_objext \
7556       conftest$ac_exeext conftest.$ac_ext
7557 fi
7558 { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
7559 echo "${ECHO_T}$ac_cv_func_connect" >&6; }
7560
7561     if test $ac_cv_func_connect = no; then
7562       { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
7563 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
7564 if test "${ac_cv_lib_socket_connect+set}" = set; then
7565   echo $ECHO_N "(cached) $ECHO_C" >&6
7566 else
7567   ac_check_lib_save_LIBS=$LIBS
7568 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7569 cat >conftest.$ac_ext <<_ACEOF
7570 /* confdefs.h.  */
7571 _ACEOF
7572 cat confdefs.h >>conftest.$ac_ext
7573 cat >>conftest.$ac_ext <<_ACEOF
7574 /* end confdefs.h.  */
7575
7576 /* Override any GCC internal prototype to avoid an error.
7577    Use char because int might match the return type of a GCC
7578    builtin and then its argument prototype would still apply.  */
7579 #ifdef __cplusplus
7580 extern "C"
7581 #endif
7582 char connect ();
7583 int
7584 main ()
7585 {
7586 return connect ();
7587   ;
7588   return 0;
7589 }
7590 _ACEOF
7591 rm -f conftest.$ac_objext conftest$ac_exeext
7592 if { (ac_try="$ac_link"
7593 case "(($ac_try" in
7594   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7595   *) ac_try_echo=$ac_try;;
7596 esac
7597 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7598   (eval "$ac_link") 2>conftest.er1
7599   ac_status=$?
7600   grep -v '^ *+' conftest.er1 >conftest.err
7601   rm -f conftest.er1
7602   cat conftest.err >&5
7603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7604   (exit $ac_status); } &&
7605          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7606   { (case "(($ac_try" in
7607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7608   *) ac_try_echo=$ac_try;;
7609 esac
7610 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7611   (eval "$ac_try") 2>&5
7612   ac_status=$?
7613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7614   (exit $ac_status); }; } &&
7615          { ac_try='test -s conftest$ac_exeext'
7616   { (case "(($ac_try" in
7617   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7618   *) ac_try_echo=$ac_try;;
7619 esac
7620 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7621   (eval "$ac_try") 2>&5
7622   ac_status=$?
7623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624   (exit $ac_status); }; }; then
7625   ac_cv_lib_socket_connect=yes
7626 else
7627   echo "$as_me: failed program was:" >&5
7628 sed 's/^/| /' conftest.$ac_ext >&5
7629
7630         ac_cv_lib_socket_connect=no
7631 fi
7632
7633 rm -f core conftest.err conftest.$ac_objext \
7634       conftest$ac_exeext conftest.$ac_ext
7635 LIBS=$ac_check_lib_save_LIBS
7636 fi
7637 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7638 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
7639 if test $ac_cv_lib_socket_connect = yes; then
7640   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7641 fi
7642
7643     fi
7644
7645     # Guillermo Gomez says -lposix is necessary on A/UX.
7646     { echo "$as_me:$LINENO: checking for remove" >&5
7647 echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
7648 if test "${ac_cv_func_remove+set}" = set; then
7649   echo $ECHO_N "(cached) $ECHO_C" >&6
7650 else
7651   cat >conftest.$ac_ext <<_ACEOF
7652 /* confdefs.h.  */
7653 _ACEOF
7654 cat confdefs.h >>conftest.$ac_ext
7655 cat >>conftest.$ac_ext <<_ACEOF
7656 /* end confdefs.h.  */
7657 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7658    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7659 #define remove innocuous_remove
7660
7661 /* System header to define __stub macros and hopefully few prototypes,
7662     which can conflict with char remove (); below.
7663     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7664     <limits.h> exists even on freestanding compilers.  */
7665
7666 #ifdef __STDC__
7667 # include <limits.h>
7668 #else
7669 # include <assert.h>
7670 #endif
7671
7672 #undef remove
7673
7674 /* Override any GCC internal prototype to avoid an error.
7675    Use char because int might match the return type of a GCC
7676    builtin and then its argument prototype would still apply.  */
7677 #ifdef __cplusplus
7678 extern "C"
7679 #endif
7680 char remove ();
7681 /* The GNU C library defines this for functions which it implements
7682     to always fail with ENOSYS.  Some functions are actually named
7683     something starting with __ and the normal name is an alias.  */
7684 #if defined __stub_remove || defined __stub___remove
7685 choke me
7686 #endif
7687
7688 int
7689 main ()
7690 {
7691 return remove ();
7692   ;
7693   return 0;
7694 }
7695 _ACEOF
7696 rm -f conftest.$ac_objext conftest$ac_exeext
7697 if { (ac_try="$ac_link"
7698 case "(($ac_try" in
7699   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7700   *) ac_try_echo=$ac_try;;
7701 esac
7702 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7703   (eval "$ac_link") 2>conftest.er1
7704   ac_status=$?
7705   grep -v '^ *+' conftest.er1 >conftest.err
7706   rm -f conftest.er1
7707   cat conftest.err >&5
7708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7709   (exit $ac_status); } &&
7710          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7711   { (case "(($ac_try" in
7712   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7713   *) ac_try_echo=$ac_try;;
7714 esac
7715 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7716   (eval "$ac_try") 2>&5
7717   ac_status=$?
7718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7719   (exit $ac_status); }; } &&
7720          { ac_try='test -s conftest$ac_exeext'
7721   { (case "(($ac_try" in
7722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7723   *) ac_try_echo=$ac_try;;
7724 esac
7725 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7726   (eval "$ac_try") 2>&5
7727   ac_status=$?
7728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7729   (exit $ac_status); }; }; then
7730   ac_cv_func_remove=yes
7731 else
7732   echo "$as_me: failed program was:" >&5
7733 sed 's/^/| /' conftest.$ac_ext >&5
7734
7735         ac_cv_func_remove=no
7736 fi
7737
7738 rm -f core conftest.err conftest.$ac_objext \
7739       conftest$ac_exeext conftest.$ac_ext
7740 fi
7741 { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7742 echo "${ECHO_T}$ac_cv_func_remove" >&6; }
7743
7744     if test $ac_cv_func_remove = no; then
7745       { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7746 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
7747 if test "${ac_cv_lib_posix_remove+set}" = set; then
7748   echo $ECHO_N "(cached) $ECHO_C" >&6
7749 else
7750   ac_check_lib_save_LIBS=$LIBS
7751 LIBS="-lposix  $LIBS"
7752 cat >conftest.$ac_ext <<_ACEOF
7753 /* confdefs.h.  */
7754 _ACEOF
7755 cat confdefs.h >>conftest.$ac_ext
7756 cat >>conftest.$ac_ext <<_ACEOF
7757 /* end confdefs.h.  */
7758
7759 /* Override any GCC internal prototype to avoid an error.
7760    Use char because int might match the return type of a GCC
7761    builtin and then its argument prototype would still apply.  */
7762 #ifdef __cplusplus
7763 extern "C"
7764 #endif
7765 char remove ();
7766 int
7767 main ()
7768 {
7769 return remove ();
7770   ;
7771   return 0;
7772 }
7773 _ACEOF
7774 rm -f conftest.$ac_objext conftest$ac_exeext
7775 if { (ac_try="$ac_link"
7776 case "(($ac_try" in
7777   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7778   *) ac_try_echo=$ac_try;;
7779 esac
7780 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7781   (eval "$ac_link") 2>conftest.er1
7782   ac_status=$?
7783   grep -v '^ *+' conftest.er1 >conftest.err
7784   rm -f conftest.er1
7785   cat conftest.err >&5
7786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7787   (exit $ac_status); } &&
7788          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7789   { (case "(($ac_try" in
7790   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7791   *) ac_try_echo=$ac_try;;
7792 esac
7793 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7794   (eval "$ac_try") 2>&5
7795   ac_status=$?
7796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7797   (exit $ac_status); }; } &&
7798          { ac_try='test -s conftest$ac_exeext'
7799   { (case "(($ac_try" in
7800   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7801   *) ac_try_echo=$ac_try;;
7802 esac
7803 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7804   (eval "$ac_try") 2>&5
7805   ac_status=$?
7806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7807   (exit $ac_status); }; }; then
7808   ac_cv_lib_posix_remove=yes
7809 else
7810   echo "$as_me: failed program was:" >&5
7811 sed 's/^/| /' conftest.$ac_ext >&5
7812
7813         ac_cv_lib_posix_remove=no
7814 fi
7815
7816 rm -f core conftest.err conftest.$ac_objext \
7817       conftest$ac_exeext conftest.$ac_ext
7818 LIBS=$ac_check_lib_save_LIBS
7819 fi
7820 { echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7821 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
7822 if test $ac_cv_lib_posix_remove = yes; then
7823   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7824 fi
7825
7826     fi
7827
7828     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7829     { echo "$as_me:$LINENO: checking for shmat" >&5
7830 echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
7831 if test "${ac_cv_func_shmat+set}" = set; then
7832   echo $ECHO_N "(cached) $ECHO_C" >&6
7833 else
7834   cat >conftest.$ac_ext <<_ACEOF
7835 /* confdefs.h.  */
7836 _ACEOF
7837 cat confdefs.h >>conftest.$ac_ext
7838 cat >>conftest.$ac_ext <<_ACEOF
7839 /* end confdefs.h.  */
7840 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7841    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7842 #define shmat innocuous_shmat
7843
7844 /* System header to define __stub macros and hopefully few prototypes,
7845     which can conflict with char shmat (); below.
7846     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7847     <limits.h> exists even on freestanding compilers.  */
7848
7849 #ifdef __STDC__
7850 # include <limits.h>
7851 #else
7852 # include <assert.h>
7853 #endif
7854
7855 #undef shmat
7856
7857 /* Override any GCC internal prototype to avoid an error.
7858    Use char because int might match the return type of a GCC
7859    builtin and then its argument prototype would still apply.  */
7860 #ifdef __cplusplus
7861 extern "C"
7862 #endif
7863 char shmat ();
7864 /* The GNU C library defines this for functions which it implements
7865     to always fail with ENOSYS.  Some functions are actually named
7866     something starting with __ and the normal name is an alias.  */
7867 #if defined __stub_shmat || defined __stub___shmat
7868 choke me
7869 #endif
7870
7871 int
7872 main ()
7873 {
7874 return shmat ();
7875   ;
7876   return 0;
7877 }
7878 _ACEOF
7879 rm -f conftest.$ac_objext conftest$ac_exeext
7880 if { (ac_try="$ac_link"
7881 case "(($ac_try" in
7882   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7883   *) ac_try_echo=$ac_try;;
7884 esac
7885 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7886   (eval "$ac_link") 2>conftest.er1
7887   ac_status=$?
7888   grep -v '^ *+' conftest.er1 >conftest.err
7889   rm -f conftest.er1
7890   cat conftest.err >&5
7891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7892   (exit $ac_status); } &&
7893          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7894   { (case "(($ac_try" in
7895   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7896   *) ac_try_echo=$ac_try;;
7897 esac
7898 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7899   (eval "$ac_try") 2>&5
7900   ac_status=$?
7901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7902   (exit $ac_status); }; } &&
7903          { ac_try='test -s conftest$ac_exeext'
7904   { (case "(($ac_try" in
7905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7906   *) ac_try_echo=$ac_try;;
7907 esac
7908 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7909   (eval "$ac_try") 2>&5
7910   ac_status=$?
7911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7912   (exit $ac_status); }; }; then
7913   ac_cv_func_shmat=yes
7914 else
7915   echo "$as_me: failed program was:" >&5
7916 sed 's/^/| /' conftest.$ac_ext >&5
7917
7918         ac_cv_func_shmat=no
7919 fi
7920
7921 rm -f core conftest.err conftest.$ac_objext \
7922       conftest$ac_exeext conftest.$ac_ext
7923 fi
7924 { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7925 echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
7926
7927     if test $ac_cv_func_shmat = no; then
7928       { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7929 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
7930 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7931   echo $ECHO_N "(cached) $ECHO_C" >&6
7932 else
7933   ac_check_lib_save_LIBS=$LIBS
7934 LIBS="-lipc  $LIBS"
7935 cat >conftest.$ac_ext <<_ACEOF
7936 /* confdefs.h.  */
7937 _ACEOF
7938 cat confdefs.h >>conftest.$ac_ext
7939 cat >>conftest.$ac_ext <<_ACEOF
7940 /* end confdefs.h.  */
7941
7942 /* Override any GCC internal prototype to avoid an error.
7943    Use char because int might match the return type of a GCC
7944    builtin and then its argument prototype would still apply.  */
7945 #ifdef __cplusplus
7946 extern "C"
7947 #endif
7948 char shmat ();
7949 int
7950 main ()
7951 {
7952 return shmat ();
7953   ;
7954   return 0;
7955 }
7956 _ACEOF
7957 rm -f conftest.$ac_objext conftest$ac_exeext
7958 if { (ac_try="$ac_link"
7959 case "(($ac_try" in
7960   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7961   *) ac_try_echo=$ac_try;;
7962 esac
7963 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7964   (eval "$ac_link") 2>conftest.er1
7965   ac_status=$?
7966   grep -v '^ *+' conftest.er1 >conftest.err
7967   rm -f conftest.er1
7968   cat conftest.err >&5
7969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7970   (exit $ac_status); } &&
7971          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7972   { (case "(($ac_try" in
7973   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7974   *) ac_try_echo=$ac_try;;
7975 esac
7976 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7977   (eval "$ac_try") 2>&5
7978   ac_status=$?
7979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980   (exit $ac_status); }; } &&
7981          { ac_try='test -s conftest$ac_exeext'
7982   { (case "(($ac_try" in
7983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7984   *) ac_try_echo=$ac_try;;
7985 esac
7986 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7987   (eval "$ac_try") 2>&5
7988   ac_status=$?
7989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7990   (exit $ac_status); }; }; then
7991   ac_cv_lib_ipc_shmat=yes
7992 else
7993   echo "$as_me: failed program was:" >&5
7994 sed 's/^/| /' conftest.$ac_ext >&5
7995
7996         ac_cv_lib_ipc_shmat=no
7997 fi
7998
7999 rm -f core conftest.err conftest.$ac_objext \
8000       conftest$ac_exeext conftest.$ac_ext
8001 LIBS=$ac_check_lib_save_LIBS
8002 fi
8003 { echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
8004 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
8005 if test $ac_cv_lib_ipc_shmat = yes; then
8006   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
8007 fi
8008
8009     fi
8010   fi
8011
8012   # Check for libraries that X11R6 Xt/Xaw programs need.
8013   ac_save_LDFLAGS=$LDFLAGS
8014   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
8015   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
8016   # check for ICE first), but we must link in the order -lSM -lICE or
8017   # we get undefined symbols.  So assume we have SM if we have ICE.
8018   # These have to be linked with before -lX11, unlike the other
8019   # libraries we check for below, so use a different variable.
8020   # John Interrante, Karl Berry
8021   { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
8022 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
8023 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
8024   echo $ECHO_N "(cached) $ECHO_C" >&6
8025 else
8026   ac_check_lib_save_LIBS=$LIBS
8027 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8028 cat >conftest.$ac_ext <<_ACEOF
8029 /* confdefs.h.  */
8030 _ACEOF
8031 cat confdefs.h >>conftest.$ac_ext
8032 cat >>conftest.$ac_ext <<_ACEOF
8033 /* end confdefs.h.  */
8034
8035 /* Override any GCC internal prototype to avoid an error.
8036    Use char because int might match the return type of a GCC
8037    builtin and then its argument prototype would still apply.  */
8038 #ifdef __cplusplus
8039 extern "C"
8040 #endif
8041 char IceConnectionNumber ();
8042 int
8043 main ()
8044 {
8045 return IceConnectionNumber ();
8046   ;
8047   return 0;
8048 }
8049 _ACEOF
8050 rm -f conftest.$ac_objext conftest$ac_exeext
8051 if { (ac_try="$ac_link"
8052 case "(($ac_try" in
8053   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8054   *) ac_try_echo=$ac_try;;
8055 esac
8056 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8057   (eval "$ac_link") 2>conftest.er1
8058   ac_status=$?
8059   grep -v '^ *+' conftest.er1 >conftest.err
8060   rm -f conftest.er1
8061   cat conftest.err >&5
8062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8063   (exit $ac_status); } &&
8064          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8065   { (case "(($ac_try" in
8066   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8067   *) ac_try_echo=$ac_try;;
8068 esac
8069 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8070   (eval "$ac_try") 2>&5
8071   ac_status=$?
8072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8073   (exit $ac_status); }; } &&
8074          { ac_try='test -s conftest$ac_exeext'
8075   { (case "(($ac_try" in
8076   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8077   *) ac_try_echo=$ac_try;;
8078 esac
8079 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8080   (eval "$ac_try") 2>&5
8081   ac_status=$?
8082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8083   (exit $ac_status); }; }; then
8084   ac_cv_lib_ICE_IceConnectionNumber=yes
8085 else
8086   echo "$as_me: failed program was:" >&5
8087 sed 's/^/| /' conftest.$ac_ext >&5
8088
8089         ac_cv_lib_ICE_IceConnectionNumber=no
8090 fi
8091
8092 rm -f core conftest.err conftest.$ac_objext \
8093       conftest$ac_exeext conftest.$ac_ext
8094 LIBS=$ac_check_lib_save_LIBS
8095 fi
8096 { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
8097 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
8098 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
8099   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
8100 fi
8101
8102   LDFLAGS=$ac_save_LDFLAGS
8103
8104 fi
8105
8106
8107 if test "$have_x" != yes; then
8108   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
8109 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
8110    { (exit 1); exit 1; }; }
8111 fi
8112
8113
8114     { echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
8115 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6; }
8116 if test "${ac_cv_x_app_defaults+set}" = set; then
8117   echo $ECHO_N "(cached) $ECHO_C" >&6
8118 else
8119
8120   rm -fr conftestdir
8121   if mkdir conftestdir; then
8122     cd conftestdir 2>/dev/null
8123     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8124     cat > Imakefile <<'EOF'
8125 acfindx:
8126         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
8127 EOF
8128     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
8129       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
8130       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8131     fi
8132     cd .. 2>/dev/null
8133     rm -fr conftestdir
8134   fi
8135       if test x"$ac_x_app_defaults" = x; then
8136
8137   # Look for the directory under a standard set of common directories.
8138   # Check X11 before X11Rn because it's often a symlink to the current release.
8139   for ac_dir in                                 \
8140     /usr/X11/lib/app-defaults                   \
8141     /usr/X11R6/lib/app-defaults                 \
8142     /usr/X11R6/lib/X11/app-defaults             \
8143     /usr/X11R5/lib/app-defaults                 \
8144     /usr/X11R5/lib/X11/app-defaults             \
8145     /usr/X11R4/lib/app-defaults                 \
8146     /usr/X11R4/lib/X11/app-defaults             \
8147                                                 \
8148     /usr/lib/X11/app-defaults                   \
8149     /usr/lib/X11R6/app-defaults                 \
8150     /usr/lib/X11R5/app-defaults                 \
8151     /usr/lib/X11R4/app-defaults                 \
8152                                                 \
8153     /usr/local/X11/lib/app-defaults             \
8154     /usr/local/X11R6/lib/app-defaults           \
8155     /usr/local/X11R5/lib/app-defaults           \
8156     /usr/local/X11R4/lib/app-defaults           \
8157                                                 \
8158     /usr/local/lib/X11/app-defaults             \
8159     /usr/local/lib/X11R6/app-defaults           \
8160     /usr/local/lib/X11R6/X11/app-defaults       \
8161     /usr/local/lib/X11R5/app-defaults           \
8162     /usr/local/lib/X11R5/X11/app-defaults       \
8163     /usr/local/lib/X11R4/app-defaults           \
8164     /usr/local/lib/X11R4/X11/app-defaults       \
8165                                                 \
8166     /usr/X386/lib/X11/app-defaults              \
8167     /usr/x386/lib/X11/app-defaults              \
8168     /usr/XFree86/lib/X11/app-defaults           \
8169                                                 \
8170     /usr/lib/X11/app-defaults                   \
8171     /usr/local/lib/X11/app-defaults             \
8172     /usr/unsupported/lib/X11/app-defaults       \
8173     /usr/athena/lib/X11/app-defaults            \
8174     /usr/local/x11r5/lib/X11/app-defaults       \
8175     /usr/lpp/Xamples/lib/X11/app-defaults       \
8176     /lib/usr/lib/X11/app-defaults               \
8177                                                 \
8178     /usr/openwin/lib/app-defaults               \
8179     /usr/openwin/lib/X11/app-defaults           \
8180     /usr/openwin/share/lib/app-defaults         \
8181     /usr/openwin/share/lib/X11/app-defaults     \
8182                                                 \
8183     /X11R6/lib/app-defaults                     \
8184     /X11R5/lib/app-defaults                     \
8185     /X11R4/lib/app-defaults                     \
8186     ; \
8187   do
8188     if test -d "$ac_dir"; then
8189       ac_x_app_defaults=$ac_dir
8190       break
8191     fi
8192   done
8193
8194       fi
8195       if test x"$ac_x_app_defaults" = x; then
8196         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
8197       else
8198         # Record where we found app-defaults for the cache.
8199         ac_cv_x_app_defaults="$ac_x_app_defaults"
8200       fi
8201 fi
8202 { echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
8203 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6; }
8204     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
8205 case "$host" in
8206     *-hpux*)
8207
8208       # The following arcana was gleaned from conversations with
8209       # Eric Schwartz <erics@col.hp.com>:
8210       #
8211       # On HPUX 10.x, the parts of X that HP considers "standard" live in
8212       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
8213       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
8214       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
8215       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
8216       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
8217       # you don't need any -I or -L arguments.
8218       #
8219       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
8220       # are the same division as 10.x.  However, there are no symlinks to
8221       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
8222       # arguments are always necessary.
8223       #
8224       # However, X11R6 was available on HPUX 9.x as a patch: if that
8225       # patch was installed, then all of X11R6 went in to
8226       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
8227       #
8228       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
8229       # whether R5 was available as a patch; R6 undoubtedly was not.)
8230       #
8231       # So.  We try and use the highest numbered pair of
8232       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
8233       # that are available.  We do not mix and match different versions
8234       # of X.
8235       #
8236       # Question I still don't know the answer to: (do you?)
8237       #
8238       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
8239       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
8240       #     that contrib directory?  Did it contain so-called "standard"
8241       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
8242       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
8243       #     be a situation where one had to reach into the R5 headers and
8244       #     libs to find Xmu?  That is, must both R6 and R5 directories
8245       #     be on the -I and -L lists in that case?
8246       #
8247       for version in X11R6 X11R5 X11R4 ; do
8248         # if either pair of directories exists...
8249         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
8250         then
8251            # if contrib exists, use it...
8252            if test -d /usr/contrib/$version/include ; then
8253              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
8254              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
8255            fi
8256            # if the "standard" one exists, use it.
8257            if test -d /usr/include/$version ; then
8258              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
8259              X_LIBS="$X_LIBS -L/usr/lib/$version"
8260            fi
8261            # since at least one of the pair exists, go no farther.
8262            break
8263         fi
8264       done
8265
8266       # Now find Motif.  Thanks for not making xmkmf find this by
8267       # default, you losers.
8268       #
8269       if test -d /usr/include/Motif2.1 ; then
8270         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
8271         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
8272       elif test -d /usr/include/Motif1.2 ; then
8273         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
8274         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
8275       elif test -d /usr/include/Motif1.1 ; then
8276         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
8277         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
8278       fi
8279
8280       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
8281       #
8282       if test -d /opt/graphics/OpenGL/include ; then
8283         # HP-UX 10.20 puts it here
8284         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
8285         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
8286       elif test -d /opt/Mesa/lib ; then
8287         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
8288         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
8289       fi
8290
8291
8292       if test -d /opt/xpm/lib/X11 ; then
8293         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
8294         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
8295       fi
8296
8297       # On HPUX, default to installing in /opt/xscreensaver/ instead of
8298       # in /usr/local/, unless there is already an xscreensaver in
8299       # /usr/local/bin/.  This can be overridden with the --prefix arg
8300       # to configure.  I'm not sure this is the right thing to do, but
8301       # Richard Lloyd says so...
8302       #
8303       if test \! -x /usr/local/bin/xscreensaver ; then
8304         ac_default_prefix=/opt/xscreensaver
8305       fi
8306
8307     ;;
8308     *-solaris*)
8309
8310       # Thanks for not making xmkmf find this by default, pinheads.
8311       # And thanks for moving things around again, too.  Is this
8312       # really the standard location now?  What happened to the
8313       # joke that this kind of thing went in /opt?
8314       # cthomp says "answer: CDE (Common Disorganized Environment)"
8315       #
8316       if test -f /usr/dt/include/Xm/Xm.h ; then
8317         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
8318         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
8319
8320         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
8321         { echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
8322 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6; }
8323 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
8324   echo $ECHO_N "(cached) $ECHO_C" >&6
8325 else
8326   ac_check_lib_save_LIBS=$LIBS
8327 LIBS="-lgen  $LIBS"
8328 cat >conftest.$ac_ext <<_ACEOF
8329 /* confdefs.h.  */
8330 _ACEOF
8331 cat confdefs.h >>conftest.$ac_ext
8332 cat >>conftest.$ac_ext <<_ACEOF
8333 /* end confdefs.h.  */
8334
8335 /* Override any GCC internal prototype to avoid an error.
8336    Use char because int might match the return type of a GCC
8337    builtin and then its argument prototype would still apply.  */
8338 #ifdef __cplusplus
8339 extern "C"
8340 #endif
8341 char regcmp ();
8342 int
8343 main ()
8344 {
8345 return regcmp ();
8346   ;
8347   return 0;
8348 }
8349 _ACEOF
8350 rm -f conftest.$ac_objext conftest$ac_exeext
8351 if { (ac_try="$ac_link"
8352 case "(($ac_try" in
8353   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8354   *) ac_try_echo=$ac_try;;
8355 esac
8356 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8357   (eval "$ac_link") 2>conftest.er1
8358   ac_status=$?
8359   grep -v '^ *+' conftest.er1 >conftest.err
8360   rm -f conftest.er1
8361   cat conftest.err >&5
8362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8363   (exit $ac_status); } &&
8364          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8365   { (case "(($ac_try" in
8366   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8367   *) ac_try_echo=$ac_try;;
8368 esac
8369 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8370   (eval "$ac_try") 2>&5
8371   ac_status=$?
8372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8373   (exit $ac_status); }; } &&
8374          { ac_try='test -s conftest$ac_exeext'
8375   { (case "(($ac_try" in
8376   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8377   *) ac_try_echo=$ac_try;;
8378 esac
8379 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8380   (eval "$ac_try") 2>&5
8381   ac_status=$?
8382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8383   (exit $ac_status); }; }; then
8384   ac_cv_lib_gen_regcmp=yes
8385 else
8386   echo "$as_me: failed program was:" >&5
8387 sed 's/^/| /' conftest.$ac_ext >&5
8388
8389         ac_cv_lib_gen_regcmp=no
8390 fi
8391
8392 rm -f core conftest.err conftest.$ac_objext \
8393       conftest$ac_exeext conftest.$ac_ext
8394 LIBS=$ac_check_lib_save_LIBS
8395 fi
8396 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
8397 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6; }
8398 if test $ac_cv_lib_gen_regcmp = yes; then
8399   MOTIF_LIBS="$MOTIF_LIBS -lgen"
8400 fi
8401
8402       fi
8403
8404     ;;
8405     *-darwin*)
8406
8407       # On MacOS X (10.x with "fink"), many things are under /sw/.
8408       #
8409       if test -d /sw/include ; then
8410         X_CFLAGS="-I/sw/include $X_CFLAGS"
8411         X_LIBS="-L/sw/lib $X_LIBS"
8412       fi
8413     ;;
8414   esac
8415 { echo "$as_me:$LINENO: checking for XPointer" >&5
8416 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6; }
8417 if test "${ac_cv_xpointer+set}" = set; then
8418   echo $ECHO_N "(cached) $ECHO_C" >&6
8419 else
8420
8421   ac_save_CPPFLAGS="$CPPFLAGS"
8422   if test \! -z "$includedir" ; then
8423     CPPFLAGS="$CPPFLAGS -I$includedir"
8424   fi
8425   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8426   cat >conftest.$ac_ext <<_ACEOF
8427 /* confdefs.h.  */
8428 _ACEOF
8429 cat confdefs.h >>conftest.$ac_ext
8430 cat >>conftest.$ac_ext <<_ACEOF
8431 /* end confdefs.h.  */
8432 #include <X11/Xlib.h>
8433 int
8434 main ()
8435 {
8436 XPointer foo = (XPointer) 0;
8437   ;
8438   return 0;
8439 }
8440 _ACEOF
8441 rm -f conftest.$ac_objext
8442 if { (ac_try="$ac_compile"
8443 case "(($ac_try" in
8444   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8445   *) ac_try_echo=$ac_try;;
8446 esac
8447 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8448   (eval "$ac_compile") 2>conftest.er1
8449   ac_status=$?
8450   grep -v '^ *+' conftest.er1 >conftest.err
8451   rm -f conftest.er1
8452   cat conftest.err >&5
8453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8454   (exit $ac_status); } &&
8455          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8456   { (case "(($ac_try" in
8457   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8458   *) ac_try_echo=$ac_try;;
8459 esac
8460 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8461   (eval "$ac_try") 2>&5
8462   ac_status=$?
8463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8464   (exit $ac_status); }; } &&
8465          { ac_try='test -s conftest.$ac_objext'
8466   { (case "(($ac_try" in
8467   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8468   *) ac_try_echo=$ac_try;;
8469 esac
8470 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8471   (eval "$ac_try") 2>&5
8472   ac_status=$?
8473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8474   (exit $ac_status); }; }; then
8475   ac_cv_xpointer=yes
8476 else
8477   echo "$as_me: failed program was:" >&5
8478 sed 's/^/| /' conftest.$ac_ext >&5
8479
8480         ac_cv_xpointer=no
8481 fi
8482
8483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8484   CPPFLAGS="$ac_save_CPPFLAGS"
8485 fi
8486 { echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
8487 echo "${ECHO_T}$ac_cv_xpointer" >&6; }
8488   if test "$ac_cv_xpointer" != yes; then
8489    cat >>confdefs.h <<\_ACEOF
8490 #define XPointer char*
8491 _ACEOF
8492
8493   fi
8494
8495 { echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
8496 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6; }
8497   ac_macosx=no
8498   case "$host" in
8499     *-apple-darwin* )
8500       ac_macosx=yes
8501     ;;
8502   esac
8503 { echo "$as_me:$LINENO: result: $ac_macosx" >&5
8504 echo "${ECHO_T}$ac_macosx" >&6; }
8505
8506
8507 if test "$ac_macosx" = yes; then
8508   if test -n "$GCC"; then
8509     # Without these, every link against libGL gets a bunch of useless warnings.
8510     osx_crud="-bind_at_load -multiply_defined suppress"
8511     { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to LDFLAGS" >&5
8512 echo "${ECHO_T}adding \"$osx_crud\" to LDFLAGS" >&6; }
8513      LDFLAGS="$LDFLAGS $osx_crud"
8514   fi
8515 fi
8516
8517 ###############################################################################
8518 #
8519 #       Gettext support
8520 #
8521 ###############################################################################
8522
8523
8524
8525 if test -n ""; then
8526     { echo "$as_me:$LINENO: checking for intltool >= " >&5
8527 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6; }
8528
8529     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
8530     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
8531
8532     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
8533
8534
8535     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
8536         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
8537 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
8538     else
8539         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
8540 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
8541         exit 1
8542     fi
8543 fi
8544
8545   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'
8546 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'
8547      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'
8548       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
8549      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'
8550    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'
8551     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'
8552 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'
8553        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'
8554       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'
8555     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'
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569 # Use the tools built into the package, not the ones that are installed.
8570
8571 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
8572 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
8573 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
8574
8575
8576
8577
8578
8579 # Extract the first word of "perl", so it can be a program name with args.
8580 set dummy perl; ac_word=$2
8581 { echo "$as_me:$LINENO: checking for $ac_word" >&5
8582 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
8583 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
8584   echo $ECHO_N "(cached) $ECHO_C" >&6
8585 else
8586   case $INTLTOOL_PERL in
8587   [\\/]* | ?:[\\/]*)
8588   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
8589   ;;
8590   *)
8591   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8592 for as_dir in $PATH
8593 do
8594   IFS=$as_save_IFS
8595   test -z "$as_dir" && as_dir=.
8596   for ac_exec_ext in '' $ac_executable_extensions; do
8597   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
8598     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
8599     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8600     break 2
8601   fi
8602 done
8603 done
8604 IFS=$as_save_IFS
8605
8606   ;;
8607 esac
8608 fi
8609 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
8610 if test -n "$INTLTOOL_PERL"; then
8611   { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
8612 echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
8613 else
8614   { echo "$as_me:$LINENO: result: no" >&5
8615 echo "${ECHO_T}no" >&6; }
8616 fi
8617
8618
8619 if test -z "$INTLTOOL_PERL"; then
8620    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
8621 echo "$as_me: error: perl not found; required for intltool" >&2;}
8622    { (exit 1); exit 1; }; }
8623 fi
8624 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
8625    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
8626 echo "$as_me: error: perl 5.x required for intltool" >&2;}
8627    { (exit 1); exit 1; }; }
8628 fi
8629
8630 # Remove file type tags (using []) from po/POTFILES.
8631
8632
8633
8634
8635
8636
8637
8638 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
8639
8640 ac_config_commands="$ac_config_commands default-1"
8641
8642
8643
8644 GETTEXT_PACKAGE=xscreensaver
8645
8646 cat >>confdefs.h <<_ACEOF
8647 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
8648 _ACEOF
8649
8650
8651 cat >>confdefs.h <<_ACEOF
8652 #define PACKAGE "$GETTEXT_PACKAGE"
8653 _ACEOF
8654
8655
8656
8657 ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
8658 if test -n "$ac_tool_prefix"; then
8659   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8660 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8661 { echo "$as_me:$LINENO: checking for $ac_word" >&5
8662 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
8663 if test "${ac_cv_prog_RANLIB+set}" = set; then
8664   echo $ECHO_N "(cached) $ECHO_C" >&6
8665 else
8666   if test -n "$RANLIB"; then
8667   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8668 else
8669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8670 for as_dir in $PATH
8671 do
8672   IFS=$as_save_IFS
8673   test -z "$as_dir" && as_dir=.
8674   for ac_exec_ext in '' $ac_executable_extensions; do
8675   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
8676     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8677     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8678     break 2
8679   fi
8680 done
8681 done
8682 IFS=$as_save_IFS
8683
8684 fi
8685 fi
8686 RANLIB=$ac_cv_prog_RANLIB
8687 if test -n "$RANLIB"; then
8688   { echo "$as_me:$LINENO: result: $RANLIB" >&5
8689 echo "${ECHO_T}$RANLIB" >&6; }
8690 else
8691   { echo "$as_me:$LINENO: result: no" >&5
8692 echo "${ECHO_T}no" >&6; }
8693 fi
8694
8695
8696 fi
8697 if test -z "$ac_cv_prog_RANLIB"; then
8698   ac_ct_RANLIB=$RANLIB
8699   # Extract the first word of "ranlib", so it can be a program name with args.
8700 set dummy ranlib; ac_word=$2
8701 { echo "$as_me:$LINENO: checking for $ac_word" >&5
8702 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
8703 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8704   echo $ECHO_N "(cached) $ECHO_C" >&6
8705 else
8706   if test -n "$ac_ct_RANLIB"; then
8707   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8708 else
8709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8710 for as_dir in $PATH
8711 do
8712   IFS=$as_save_IFS
8713   test -z "$as_dir" && as_dir=.
8714   for ac_exec_ext in '' $ac_executable_extensions; do
8715   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
8716     ac_cv_prog_ac_ct_RANLIB="ranlib"
8717     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8718     break 2
8719   fi
8720 done
8721 done
8722 IFS=$as_save_IFS
8723
8724 fi
8725 fi
8726 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8727 if test -n "$ac_ct_RANLIB"; then
8728   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8729 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
8730 else
8731   { echo "$as_me:$LINENO: result: no" >&5
8732 echo "${ECHO_T}no" >&6; }
8733 fi
8734
8735   if test "x$ac_ct_RANLIB" = x; then
8736     RANLIB=":"
8737   else
8738     case $cross_compiling:$ac_tool_warned in
8739 yes:)
8740 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
8741 whose name does not start with the host triplet.  If you think this
8742 configuration is useful to you, please write to autoconf@gnu.org." >&5
8743 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
8744 whose name does not start with the host triplet.  If you think this
8745 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
8746 ac_tool_warned=yes ;;
8747 esac
8748     RANLIB=$ac_ct_RANLIB
8749   fi
8750 else
8751   RANLIB="$ac_cv_prog_RANLIB"
8752 fi
8753
8754 { echo "$as_me:$LINENO: checking for off_t" >&5
8755 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
8756 if test "${ac_cv_type_off_t+set}" = set; then
8757   echo $ECHO_N "(cached) $ECHO_C" >&6
8758 else
8759   cat >conftest.$ac_ext <<_ACEOF
8760 /* confdefs.h.  */
8761 _ACEOF
8762 cat confdefs.h >>conftest.$ac_ext
8763 cat >>conftest.$ac_ext <<_ACEOF
8764 /* end confdefs.h.  */
8765 $ac_includes_default
8766 typedef off_t ac__type_new_;
8767 int
8768 main ()
8769 {
8770 if ((ac__type_new_ *) 0)
8771   return 0;
8772 if (sizeof (ac__type_new_))
8773   return 0;
8774   ;
8775   return 0;
8776 }
8777 _ACEOF
8778 rm -f conftest.$ac_objext
8779 if { (ac_try="$ac_compile"
8780 case "(($ac_try" in
8781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8782   *) ac_try_echo=$ac_try;;
8783 esac
8784 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8785   (eval "$ac_compile") 2>conftest.er1
8786   ac_status=$?
8787   grep -v '^ *+' conftest.er1 >conftest.err
8788   rm -f conftest.er1
8789   cat conftest.err >&5
8790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8791   (exit $ac_status); } &&
8792          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8793   { (case "(($ac_try" in
8794   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8795   *) ac_try_echo=$ac_try;;
8796 esac
8797 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8798   (eval "$ac_try") 2>&5
8799   ac_status=$?
8800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8801   (exit $ac_status); }; } &&
8802          { ac_try='test -s conftest.$ac_objext'
8803   { (case "(($ac_try" in
8804   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8805   *) ac_try_echo=$ac_try;;
8806 esac
8807 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8808   (eval "$ac_try") 2>&5
8809   ac_status=$?
8810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8811   (exit $ac_status); }; }; then
8812   ac_cv_type_off_t=yes
8813 else
8814   echo "$as_me: failed program was:" >&5
8815 sed 's/^/| /' conftest.$ac_ext >&5
8816
8817         ac_cv_type_off_t=no
8818 fi
8819
8820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8821 fi
8822 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8823 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
8824 if test $ac_cv_type_off_t = yes; then
8825   :
8826 else
8827
8828 cat >>confdefs.h <<_ACEOF
8829 #define off_t long int
8830 _ACEOF
8831
8832 fi
8833
8834 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8835 # for constant arguments.  Useless!
8836 { echo "$as_me:$LINENO: checking for working alloca.h" >&5
8837 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
8838 if test "${ac_cv_working_alloca_h+set}" = set; then
8839   echo $ECHO_N "(cached) $ECHO_C" >&6
8840 else
8841   cat >conftest.$ac_ext <<_ACEOF
8842 /* confdefs.h.  */
8843 _ACEOF
8844 cat confdefs.h >>conftest.$ac_ext
8845 cat >>conftest.$ac_ext <<_ACEOF
8846 /* end confdefs.h.  */
8847 #include <alloca.h>
8848 int
8849 main ()
8850 {
8851 char *p = (char *) alloca (2 * sizeof (int));
8852                           if (p) return 0;
8853   ;
8854   return 0;
8855 }
8856 _ACEOF
8857 rm -f conftest.$ac_objext conftest$ac_exeext
8858 if { (ac_try="$ac_link"
8859 case "(($ac_try" in
8860   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8861   *) ac_try_echo=$ac_try;;
8862 esac
8863 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8864   (eval "$ac_link") 2>conftest.er1
8865   ac_status=$?
8866   grep -v '^ *+' conftest.er1 >conftest.err
8867   rm -f conftest.er1
8868   cat conftest.err >&5
8869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8870   (exit $ac_status); } &&
8871          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8872   { (case "(($ac_try" in
8873   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8874   *) ac_try_echo=$ac_try;;
8875 esac
8876 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8877   (eval "$ac_try") 2>&5
8878   ac_status=$?
8879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8880   (exit $ac_status); }; } &&
8881          { ac_try='test -s conftest$ac_exeext'
8882   { (case "(($ac_try" in
8883   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8884   *) ac_try_echo=$ac_try;;
8885 esac
8886 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8887   (eval "$ac_try") 2>&5
8888   ac_status=$?
8889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8890   (exit $ac_status); }; }; then
8891   ac_cv_working_alloca_h=yes
8892 else
8893   echo "$as_me: failed program was:" >&5
8894 sed 's/^/| /' conftest.$ac_ext >&5
8895
8896         ac_cv_working_alloca_h=no
8897 fi
8898
8899 rm -f core conftest.err conftest.$ac_objext \
8900       conftest$ac_exeext conftest.$ac_ext
8901 fi
8902 { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8903 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
8904 if test $ac_cv_working_alloca_h = yes; then
8905
8906 cat >>confdefs.h <<\_ACEOF
8907 #define HAVE_ALLOCA_H 1
8908 _ACEOF
8909
8910 fi
8911
8912 { echo "$as_me:$LINENO: checking for alloca" >&5
8913 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
8914 if test "${ac_cv_func_alloca_works+set}" = set; then
8915   echo $ECHO_N "(cached) $ECHO_C" >&6
8916 else
8917   cat >conftest.$ac_ext <<_ACEOF
8918 /* confdefs.h.  */
8919 _ACEOF
8920 cat confdefs.h >>conftest.$ac_ext
8921 cat >>conftest.$ac_ext <<_ACEOF
8922 /* end confdefs.h.  */
8923 #ifdef __GNUC__
8924 # define alloca __builtin_alloca
8925 #else
8926 # ifdef _MSC_VER
8927 #  include <malloc.h>
8928 #  define alloca _alloca
8929 # else
8930 #  if HAVE_ALLOCA_H
8931 #   include <alloca.h>
8932 #  else
8933 #   ifdef _AIX
8934  #pragma alloca
8935 #   else
8936 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8937 char *alloca ();
8938 #    endif
8939 #   endif
8940 #  endif
8941 # endif
8942 #endif
8943
8944 int
8945 main ()
8946 {
8947 char *p = (char *) alloca (1);
8948                                     if (p) return 0;
8949   ;
8950   return 0;
8951 }
8952 _ACEOF
8953 rm -f conftest.$ac_objext conftest$ac_exeext
8954 if { (ac_try="$ac_link"
8955 case "(($ac_try" in
8956   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8957   *) ac_try_echo=$ac_try;;
8958 esac
8959 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8960   (eval "$ac_link") 2>conftest.er1
8961   ac_status=$?
8962   grep -v '^ *+' conftest.er1 >conftest.err
8963   rm -f conftest.er1
8964   cat conftest.err >&5
8965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8966   (exit $ac_status); } &&
8967          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8968   { (case "(($ac_try" in
8969   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8970   *) ac_try_echo=$ac_try;;
8971 esac
8972 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8973   (eval "$ac_try") 2>&5
8974   ac_status=$?
8975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8976   (exit $ac_status); }; } &&
8977          { ac_try='test -s conftest$ac_exeext'
8978   { (case "(($ac_try" in
8979   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8980   *) ac_try_echo=$ac_try;;
8981 esac
8982 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8983   (eval "$ac_try") 2>&5
8984   ac_status=$?
8985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8986   (exit $ac_status); }; }; then
8987   ac_cv_func_alloca_works=yes
8988 else
8989   echo "$as_me: failed program was:" >&5
8990 sed 's/^/| /' conftest.$ac_ext >&5
8991
8992         ac_cv_func_alloca_works=no
8993 fi
8994
8995 rm -f core conftest.err conftest.$ac_objext \
8996       conftest$ac_exeext conftest.$ac_ext
8997 fi
8998 { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8999 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
9000
9001 if test $ac_cv_func_alloca_works = yes; then
9002
9003 cat >>confdefs.h <<\_ACEOF
9004 #define HAVE_ALLOCA 1
9005 _ACEOF
9006
9007 else
9008   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9009 # that cause trouble.  Some versions do not even contain alloca or
9010 # contain a buggy version.  If you still want to use their alloca,
9011 # use ar to extract alloca.o from them instead of compiling alloca.c.
9012
9013 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
9014
9015 cat >>confdefs.h <<\_ACEOF
9016 #define C_ALLOCA 1
9017 _ACEOF
9018
9019
9020 { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
9021 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
9022 if test "${ac_cv_os_cray+set}" = set; then
9023   echo $ECHO_N "(cached) $ECHO_C" >&6
9024 else
9025   cat >conftest.$ac_ext <<_ACEOF
9026 /* confdefs.h.  */
9027 _ACEOF
9028 cat confdefs.h >>conftest.$ac_ext
9029 cat >>conftest.$ac_ext <<_ACEOF
9030 /* end confdefs.h.  */
9031 #if defined CRAY && ! defined CRAY2
9032 webecray
9033 #else
9034 wenotbecray
9035 #endif
9036
9037 _ACEOF
9038 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9039   $EGREP "webecray" >/dev/null 2>&1; then
9040   ac_cv_os_cray=yes
9041 else
9042   ac_cv_os_cray=no
9043 fi
9044 rm -f conftest*
9045
9046 fi
9047 { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
9048 echo "${ECHO_T}$ac_cv_os_cray" >&6; }
9049 if test $ac_cv_os_cray = yes; then
9050   for ac_func in _getb67 GETB67 getb67; do
9051     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9052 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9053 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9054 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9055   echo $ECHO_N "(cached) $ECHO_C" >&6
9056 else
9057   cat >conftest.$ac_ext <<_ACEOF
9058 /* confdefs.h.  */
9059 _ACEOF
9060 cat confdefs.h >>conftest.$ac_ext
9061 cat >>conftest.$ac_ext <<_ACEOF
9062 /* end confdefs.h.  */
9063 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9064    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9065 #define $ac_func innocuous_$ac_func
9066
9067 /* System header to define __stub macros and hopefully few prototypes,
9068     which can conflict with char $ac_func (); below.
9069     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9070     <limits.h> exists even on freestanding compilers.  */
9071
9072 #ifdef __STDC__
9073 # include <limits.h>
9074 #else
9075 # include <assert.h>
9076 #endif
9077
9078 #undef $ac_func
9079
9080 /* Override any GCC internal prototype to avoid an error.
9081    Use char because int might match the return type of a GCC
9082    builtin and then its argument prototype would still apply.  */
9083 #ifdef __cplusplus
9084 extern "C"
9085 #endif
9086 char $ac_func ();
9087 /* The GNU C library defines this for functions which it implements
9088     to always fail with ENOSYS.  Some functions are actually named
9089     something starting with __ and the normal name is an alias.  */
9090 #if defined __stub_$ac_func || defined __stub___$ac_func
9091 choke me
9092 #endif
9093
9094 int
9095 main ()
9096 {
9097 return $ac_func ();
9098   ;
9099   return 0;
9100 }
9101 _ACEOF
9102 rm -f conftest.$ac_objext conftest$ac_exeext
9103 if { (ac_try="$ac_link"
9104 case "(($ac_try" in
9105   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9106   *) ac_try_echo=$ac_try;;
9107 esac
9108 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9109   (eval "$ac_link") 2>conftest.er1
9110   ac_status=$?
9111   grep -v '^ *+' conftest.er1 >conftest.err
9112   rm -f conftest.er1
9113   cat conftest.err >&5
9114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9115   (exit $ac_status); } &&
9116          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9117   { (case "(($ac_try" in
9118   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9119   *) ac_try_echo=$ac_try;;
9120 esac
9121 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9122   (eval "$ac_try") 2>&5
9123   ac_status=$?
9124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9125   (exit $ac_status); }; } &&
9126          { ac_try='test -s conftest$ac_exeext'
9127   { (case "(($ac_try" in
9128   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9129   *) ac_try_echo=$ac_try;;
9130 esac
9131 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9132   (eval "$ac_try") 2>&5
9133   ac_status=$?
9134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9135   (exit $ac_status); }; }; then
9136   eval "$as_ac_var=yes"
9137 else
9138   echo "$as_me: failed program was:" >&5
9139 sed 's/^/| /' conftest.$ac_ext >&5
9140
9141         eval "$as_ac_var=no"
9142 fi
9143
9144 rm -f core conftest.err conftest.$ac_objext \
9145       conftest$ac_exeext conftest.$ac_ext
9146 fi
9147 ac_res=`eval echo '${'$as_ac_var'}'`
9148                { echo "$as_me:$LINENO: result: $ac_res" >&5
9149 echo "${ECHO_T}$ac_res" >&6; }
9150 if test `eval echo '${'$as_ac_var'}'` = yes; then
9151
9152 cat >>confdefs.h <<_ACEOF
9153 #define CRAY_STACKSEG_END $ac_func
9154 _ACEOF
9155
9156     break
9157 fi
9158
9159   done
9160 fi
9161
9162 { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
9163 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
9164 if test "${ac_cv_c_stack_direction+set}" = set; then
9165   echo $ECHO_N "(cached) $ECHO_C" >&6
9166 else
9167   if test "$cross_compiling" = yes; then
9168   ac_cv_c_stack_direction=0
9169 else
9170   cat >conftest.$ac_ext <<_ACEOF
9171 /* confdefs.h.  */
9172 _ACEOF
9173 cat confdefs.h >>conftest.$ac_ext
9174 cat >>conftest.$ac_ext <<_ACEOF
9175 /* end confdefs.h.  */
9176 $ac_includes_default
9177 int
9178 find_stack_direction ()
9179 {
9180   static char *addr = 0;
9181   auto char dummy;
9182   if (addr == 0)
9183     {
9184       addr = &dummy;
9185       return find_stack_direction ();
9186     }
9187   else
9188     return (&dummy > addr) ? 1 : -1;
9189 }
9190
9191 int
9192 main ()
9193 {
9194   return find_stack_direction () < 0;
9195 }
9196 _ACEOF
9197 rm -f conftest$ac_exeext
9198 if { (ac_try="$ac_link"
9199 case "(($ac_try" in
9200   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9201   *) ac_try_echo=$ac_try;;
9202 esac
9203 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9204   (eval "$ac_link") 2>&5
9205   ac_status=$?
9206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9207   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9208   { (case "(($ac_try" in
9209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9210   *) ac_try_echo=$ac_try;;
9211 esac
9212 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9213   (eval "$ac_try") 2>&5
9214   ac_status=$?
9215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9216   (exit $ac_status); }; }; then
9217   ac_cv_c_stack_direction=1
9218 else
9219   echo "$as_me: program exited with status $ac_status" >&5
9220 echo "$as_me: failed program was:" >&5
9221 sed 's/^/| /' conftest.$ac_ext >&5
9222
9223 ( exit $ac_status )
9224 ac_cv_c_stack_direction=-1
9225 fi
9226 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9227 fi
9228
9229
9230 fi
9231 { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
9232 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
9233
9234 cat >>confdefs.h <<_ACEOF
9235 #define STACK_DIRECTION $ac_cv_c_stack_direction
9236 _ACEOF
9237
9238
9239 fi
9240
9241
9242
9243 for ac_header in stdlib.h unistd.h
9244 do
9245 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9246 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9247   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9248 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9249 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9250   echo $ECHO_N "(cached) $ECHO_C" >&6
9251 fi
9252 ac_res=`eval echo '${'$as_ac_Header'}'`
9253                { echo "$as_me:$LINENO: result: $ac_res" >&5
9254 echo "${ECHO_T}$ac_res" >&6; }
9255 else
9256   # Is the header compilable?
9257 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9258 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9259 cat >conftest.$ac_ext <<_ACEOF
9260 /* confdefs.h.  */
9261 _ACEOF
9262 cat confdefs.h >>conftest.$ac_ext
9263 cat >>conftest.$ac_ext <<_ACEOF
9264 /* end confdefs.h.  */
9265 $ac_includes_default
9266 #include <$ac_header>
9267 _ACEOF
9268 rm -f conftest.$ac_objext
9269 if { (ac_try="$ac_compile"
9270 case "(($ac_try" in
9271   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9272   *) ac_try_echo=$ac_try;;
9273 esac
9274 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9275   (eval "$ac_compile") 2>conftest.er1
9276   ac_status=$?
9277   grep -v '^ *+' conftest.er1 >conftest.err
9278   rm -f conftest.er1
9279   cat conftest.err >&5
9280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9281   (exit $ac_status); } &&
9282          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9283   { (case "(($ac_try" in
9284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9285   *) ac_try_echo=$ac_try;;
9286 esac
9287 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9288   (eval "$ac_try") 2>&5
9289   ac_status=$?
9290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9291   (exit $ac_status); }; } &&
9292          { ac_try='test -s conftest.$ac_objext'
9293   { (case "(($ac_try" in
9294   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9295   *) ac_try_echo=$ac_try;;
9296 esac
9297 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9298   (eval "$ac_try") 2>&5
9299   ac_status=$?
9300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9301   (exit $ac_status); }; }; then
9302   ac_header_compiler=yes
9303 else
9304   echo "$as_me: failed program was:" >&5
9305 sed 's/^/| /' conftest.$ac_ext >&5
9306
9307         ac_header_compiler=no
9308 fi
9309
9310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9311 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9312 echo "${ECHO_T}$ac_header_compiler" >&6; }
9313
9314 # Is the header present?
9315 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9316 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9317 cat >conftest.$ac_ext <<_ACEOF
9318 /* confdefs.h.  */
9319 _ACEOF
9320 cat confdefs.h >>conftest.$ac_ext
9321 cat >>conftest.$ac_ext <<_ACEOF
9322 /* end confdefs.h.  */
9323 #include <$ac_header>
9324 _ACEOF
9325 if { (ac_try="$ac_cpp conftest.$ac_ext"
9326 case "(($ac_try" in
9327   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9328   *) ac_try_echo=$ac_try;;
9329 esac
9330 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9331   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9332   ac_status=$?
9333   grep -v '^ *+' conftest.er1 >conftest.err
9334   rm -f conftest.er1
9335   cat conftest.err >&5
9336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9337   (exit $ac_status); } >/dev/null; then
9338   if test -s conftest.err; then
9339     ac_cpp_err=$ac_c_preproc_warn_flag
9340     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9341   else
9342     ac_cpp_err=
9343   fi
9344 else
9345   ac_cpp_err=yes
9346 fi
9347 if test -z "$ac_cpp_err"; then
9348   ac_header_preproc=yes
9349 else
9350   echo "$as_me: failed program was:" >&5
9351 sed 's/^/| /' conftest.$ac_ext >&5
9352
9353   ac_header_preproc=no
9354 fi
9355
9356 rm -f conftest.err conftest.$ac_ext
9357 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9358 echo "${ECHO_T}$ac_header_preproc" >&6; }
9359
9360 # So?  What about this header?
9361 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9362   yes:no: )
9363     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9364 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9365     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9366 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9367     ac_header_preproc=yes
9368     ;;
9369   no:yes:* )
9370     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9371 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9372     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9373 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9374     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9375 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9376     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9377 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9378     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9379 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9380     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9381 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9382
9383     ;;
9384 esac
9385 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9386 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9387 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9388   echo $ECHO_N "(cached) $ECHO_C" >&6
9389 else
9390   eval "$as_ac_Header=\$ac_header_preproc"
9391 fi
9392 ac_res=`eval echo '${'$as_ac_Header'}'`
9393                { echo "$as_me:$LINENO: result: $ac_res" >&5
9394 echo "${ECHO_T}$ac_res" >&6; }
9395
9396 fi
9397 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9398   cat >>confdefs.h <<_ACEOF
9399 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9400 _ACEOF
9401
9402 fi
9403
9404 done
9405
9406
9407 for ac_func in getpagesize
9408 do
9409 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9410 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9411 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9412 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9413   echo $ECHO_N "(cached) $ECHO_C" >&6
9414 else
9415   cat >conftest.$ac_ext <<_ACEOF
9416 /* confdefs.h.  */
9417 _ACEOF
9418 cat confdefs.h >>conftest.$ac_ext
9419 cat >>conftest.$ac_ext <<_ACEOF
9420 /* end confdefs.h.  */
9421 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9422    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9423 #define $ac_func innocuous_$ac_func
9424
9425 /* System header to define __stub macros and hopefully few prototypes,
9426     which can conflict with char $ac_func (); below.
9427     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9428     <limits.h> exists even on freestanding compilers.  */
9429
9430 #ifdef __STDC__
9431 # include <limits.h>
9432 #else
9433 # include <assert.h>
9434 #endif
9435
9436 #undef $ac_func
9437
9438 /* Override any GCC internal prototype to avoid an error.
9439    Use char because int might match the return type of a GCC
9440    builtin and then its argument prototype would still apply.  */
9441 #ifdef __cplusplus
9442 extern "C"
9443 #endif
9444 char $ac_func ();
9445 /* The GNU C library defines this for functions which it implements
9446     to always fail with ENOSYS.  Some functions are actually named
9447     something starting with __ and the normal name is an alias.  */
9448 #if defined __stub_$ac_func || defined __stub___$ac_func
9449 choke me
9450 #endif
9451
9452 int
9453 main ()
9454 {
9455 return $ac_func ();
9456   ;
9457   return 0;
9458 }
9459 _ACEOF
9460 rm -f conftest.$ac_objext conftest$ac_exeext
9461 if { (ac_try="$ac_link"
9462 case "(($ac_try" in
9463   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9464   *) ac_try_echo=$ac_try;;
9465 esac
9466 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9467   (eval "$ac_link") 2>conftest.er1
9468   ac_status=$?
9469   grep -v '^ *+' conftest.er1 >conftest.err
9470   rm -f conftest.er1
9471   cat conftest.err >&5
9472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9473   (exit $ac_status); } &&
9474          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9475   { (case "(($ac_try" in
9476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9477   *) ac_try_echo=$ac_try;;
9478 esac
9479 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9480   (eval "$ac_try") 2>&5
9481   ac_status=$?
9482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9483   (exit $ac_status); }; } &&
9484          { ac_try='test -s conftest$ac_exeext'
9485   { (case "(($ac_try" in
9486   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9487   *) ac_try_echo=$ac_try;;
9488 esac
9489 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9490   (eval "$ac_try") 2>&5
9491   ac_status=$?
9492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9493   (exit $ac_status); }; }; then
9494   eval "$as_ac_var=yes"
9495 else
9496   echo "$as_me: failed program was:" >&5
9497 sed 's/^/| /' conftest.$ac_ext >&5
9498
9499         eval "$as_ac_var=no"
9500 fi
9501
9502 rm -f core conftest.err conftest.$ac_objext \
9503       conftest$ac_exeext conftest.$ac_ext
9504 fi
9505 ac_res=`eval echo '${'$as_ac_var'}'`
9506                { echo "$as_me:$LINENO: result: $ac_res" >&5
9507 echo "${ECHO_T}$ac_res" >&6; }
9508 if test `eval echo '${'$as_ac_var'}'` = yes; then
9509   cat >>confdefs.h <<_ACEOF
9510 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9511 _ACEOF
9512
9513 fi
9514 done
9515
9516 { echo "$as_me:$LINENO: checking for working mmap" >&5
9517 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
9518 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9519   echo $ECHO_N "(cached) $ECHO_C" >&6
9520 else
9521   if test "$cross_compiling" = yes; then
9522   ac_cv_func_mmap_fixed_mapped=no
9523 else
9524   cat >conftest.$ac_ext <<_ACEOF
9525 /* confdefs.h.  */
9526 _ACEOF
9527 cat confdefs.h >>conftest.$ac_ext
9528 cat >>conftest.$ac_ext <<_ACEOF
9529 /* end confdefs.h.  */
9530 $ac_includes_default
9531 /* malloc might have been renamed as rpl_malloc. */
9532 #undef malloc
9533
9534 /* Thanks to Mike Haertel and Jim Avera for this test.
9535    Here is a matrix of mmap possibilities:
9536         mmap private not fixed
9537         mmap private fixed at somewhere currently unmapped
9538         mmap private fixed at somewhere already mapped
9539         mmap shared not fixed
9540         mmap shared fixed at somewhere currently unmapped
9541         mmap shared fixed at somewhere already mapped
9542    For private mappings, we should verify that changes cannot be read()
9543    back from the file, nor mmap's back from the file at a different
9544    address.  (There have been systems where private was not correctly
9545    implemented like the infamous i386 svr4.0, and systems where the
9546    VM page cache was not coherent with the file system buffer cache
9547    like early versions of FreeBSD and possibly contemporary NetBSD.)
9548    For shared mappings, we should conversely verify that changes get
9549    propagated back to all the places they're supposed to be.
9550
9551    Grep wants private fixed already mapped.
9552    The main things grep needs to know about mmap are:
9553    * does it exist and is it safe to write into the mmap'd area
9554    * how to use it (BSD variants)  */
9555
9556 #include <fcntl.h>
9557 #include <sys/mman.h>
9558
9559 #if !STDC_HEADERS && !HAVE_STDLIB_H
9560 char *malloc ();
9561 #endif
9562
9563 /* This mess was copied from the GNU getpagesize.h.  */
9564 #if !HAVE_GETPAGESIZE
9565 /* Assume that all systems that can run configure have sys/param.h.  */
9566 # if !HAVE_SYS_PARAM_H
9567 #  define HAVE_SYS_PARAM_H 1
9568 # endif
9569
9570 # ifdef _SC_PAGESIZE
9571 #  define getpagesize() sysconf(_SC_PAGESIZE)
9572 # else /* no _SC_PAGESIZE */
9573 #  if HAVE_SYS_PARAM_H
9574 #   include <sys/param.h>
9575 #   ifdef EXEC_PAGESIZE
9576 #    define getpagesize() EXEC_PAGESIZE
9577 #   else /* no EXEC_PAGESIZE */
9578 #    ifdef NBPG
9579 #     define getpagesize() NBPG * CLSIZE
9580 #     ifndef CLSIZE
9581 #      define CLSIZE 1
9582 #     endif /* no CLSIZE */
9583 #    else /* no NBPG */
9584 #     ifdef NBPC
9585 #      define getpagesize() NBPC
9586 #     else /* no NBPC */
9587 #      ifdef PAGESIZE
9588 #       define getpagesize() PAGESIZE
9589 #      endif /* PAGESIZE */
9590 #     endif /* no NBPC */
9591 #    endif /* no NBPG */
9592 #   endif /* no EXEC_PAGESIZE */
9593 #  else /* no HAVE_SYS_PARAM_H */
9594 #   define getpagesize() 8192   /* punt totally */
9595 #  endif /* no HAVE_SYS_PARAM_H */
9596 # endif /* no _SC_PAGESIZE */
9597
9598 #endif /* no HAVE_GETPAGESIZE */
9599
9600 int
9601 main ()
9602 {
9603   char *data, *data2, *data3;
9604   int i, pagesize;
9605   int fd;
9606
9607   pagesize = getpagesize ();
9608
9609   /* First, make a file with some known garbage in it. */
9610   data = (char *) malloc (pagesize);
9611   if (!data)
9612     return 1;
9613   for (i = 0; i < pagesize; ++i)
9614     *(data + i) = rand ();
9615   umask (0);
9616   fd = creat ("conftest.mmap", 0600);
9617   if (fd < 0)
9618     return 1;
9619   if (write (fd, data, pagesize) != pagesize)
9620     return 1;
9621   close (fd);
9622
9623   /* Next, try to mmap the file at a fixed address which already has
9624      something else allocated at it.  If we can, also make sure that
9625      we see the same garbage.  */
9626   fd = open ("conftest.mmap", O_RDWR);
9627   if (fd < 0)
9628     return 1;
9629   data2 = (char *) malloc (2 * pagesize);
9630   if (!data2)
9631     return 1;
9632   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
9633   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9634                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
9635     return 1;
9636   for (i = 0; i < pagesize; ++i)
9637     if (*(data + i) != *(data2 + i))
9638       return 1;
9639
9640   /* Finally, make sure that changes to the mapped area do not
9641      percolate back to the file as seen by read().  (This is a bug on
9642      some variants of i386 svr4.0.)  */
9643   for (i = 0; i < pagesize; ++i)
9644     *(data2 + i) = *(data2 + i) + 1;
9645   data3 = (char *) malloc (pagesize);
9646   if (!data3)
9647     return 1;
9648   if (read (fd, data3, pagesize) != pagesize)
9649     return 1;
9650   for (i = 0; i < pagesize; ++i)
9651     if (*(data + i) != *(data3 + i))
9652       return 1;
9653   close (fd);
9654   return 0;
9655 }
9656 _ACEOF
9657 rm -f conftest$ac_exeext
9658 if { (ac_try="$ac_link"
9659 case "(($ac_try" in
9660   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9661   *) ac_try_echo=$ac_try;;
9662 esac
9663 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9664   (eval "$ac_link") 2>&5
9665   ac_status=$?
9666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9667   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9668   { (case "(($ac_try" in
9669   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9670   *) ac_try_echo=$ac_try;;
9671 esac
9672 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9673   (eval "$ac_try") 2>&5
9674   ac_status=$?
9675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9676   (exit $ac_status); }; }; then
9677   ac_cv_func_mmap_fixed_mapped=yes
9678 else
9679   echo "$as_me: program exited with status $ac_status" >&5
9680 echo "$as_me: failed program was:" >&5
9681 sed 's/^/| /' conftest.$ac_ext >&5
9682
9683 ( exit $ac_status )
9684 ac_cv_func_mmap_fixed_mapped=no
9685 fi
9686 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9687 fi
9688
9689
9690 fi
9691 { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
9692 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
9693 if test $ac_cv_func_mmap_fixed_mapped = yes; then
9694
9695 cat >>confdefs.h <<\_ACEOF
9696 #define HAVE_MMAP 1
9697 _ACEOF
9698
9699 fi
9700 rm -f conftest.mmap
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
9712 unistd.h sys/param.h
9713 do
9714 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9715 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9716   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9717 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9718 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9719   echo $ECHO_N "(cached) $ECHO_C" >&6
9720 fi
9721 ac_res=`eval echo '${'$as_ac_Header'}'`
9722                { echo "$as_me:$LINENO: result: $ac_res" >&5
9723 echo "${ECHO_T}$ac_res" >&6; }
9724 else
9725   # Is the header compilable?
9726 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9727 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9728 cat >conftest.$ac_ext <<_ACEOF
9729 /* confdefs.h.  */
9730 _ACEOF
9731 cat confdefs.h >>conftest.$ac_ext
9732 cat >>conftest.$ac_ext <<_ACEOF
9733 /* end confdefs.h.  */
9734 $ac_includes_default
9735 #include <$ac_header>
9736 _ACEOF
9737 rm -f conftest.$ac_objext
9738 if { (ac_try="$ac_compile"
9739 case "(($ac_try" in
9740   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9741   *) ac_try_echo=$ac_try;;
9742 esac
9743 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9744   (eval "$ac_compile") 2>conftest.er1
9745   ac_status=$?
9746   grep -v '^ *+' conftest.er1 >conftest.err
9747   rm -f conftest.er1
9748   cat conftest.err >&5
9749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9750   (exit $ac_status); } &&
9751          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9752   { (case "(($ac_try" in
9753   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9754   *) ac_try_echo=$ac_try;;
9755 esac
9756 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9757   (eval "$ac_try") 2>&5
9758   ac_status=$?
9759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9760   (exit $ac_status); }; } &&
9761          { ac_try='test -s conftest.$ac_objext'
9762   { (case "(($ac_try" in
9763   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9764   *) ac_try_echo=$ac_try;;
9765 esac
9766 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9767   (eval "$ac_try") 2>&5
9768   ac_status=$?
9769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9770   (exit $ac_status); }; }; then
9771   ac_header_compiler=yes
9772 else
9773   echo "$as_me: failed program was:" >&5
9774 sed 's/^/| /' conftest.$ac_ext >&5
9775
9776         ac_header_compiler=no
9777 fi
9778
9779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9780 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9781 echo "${ECHO_T}$ac_header_compiler" >&6; }
9782
9783 # Is the header present?
9784 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9785 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9786 cat >conftest.$ac_ext <<_ACEOF
9787 /* confdefs.h.  */
9788 _ACEOF
9789 cat confdefs.h >>conftest.$ac_ext
9790 cat >>conftest.$ac_ext <<_ACEOF
9791 /* end confdefs.h.  */
9792 #include <$ac_header>
9793 _ACEOF
9794 if { (ac_try="$ac_cpp conftest.$ac_ext"
9795 case "(($ac_try" in
9796   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9797   *) ac_try_echo=$ac_try;;
9798 esac
9799 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9800   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9801   ac_status=$?
9802   grep -v '^ *+' conftest.er1 >conftest.err
9803   rm -f conftest.er1
9804   cat conftest.err >&5
9805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9806   (exit $ac_status); } >/dev/null; then
9807   if test -s conftest.err; then
9808     ac_cpp_err=$ac_c_preproc_warn_flag
9809     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9810   else
9811     ac_cpp_err=
9812   fi
9813 else
9814   ac_cpp_err=yes
9815 fi
9816 if test -z "$ac_cpp_err"; then
9817   ac_header_preproc=yes
9818 else
9819   echo "$as_me: failed program was:" >&5
9820 sed 's/^/| /' conftest.$ac_ext >&5
9821
9822   ac_header_preproc=no
9823 fi
9824
9825 rm -f conftest.err conftest.$ac_ext
9826 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9827 echo "${ECHO_T}$ac_header_preproc" >&6; }
9828
9829 # So?  What about this header?
9830 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9831   yes:no: )
9832     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9833 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9834     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9835 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9836     ac_header_preproc=yes
9837     ;;
9838   no:yes:* )
9839     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9840 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9841     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9842 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9843     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9844 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9845     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9846 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9847     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9848 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9849     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9850 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9851
9852     ;;
9853 esac
9854 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9855 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9856 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9857   echo $ECHO_N "(cached) $ECHO_C" >&6
9858 else
9859   eval "$as_ac_Header=\$ac_header_preproc"
9860 fi
9861 ac_res=`eval echo '${'$as_ac_Header'}'`
9862                { echo "$as_me:$LINENO: result: $ac_res" >&5
9863 echo "${ECHO_T}$ac_res" >&6; }
9864
9865 fi
9866 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9867   cat >>confdefs.h <<_ACEOF
9868 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9869 _ACEOF
9870
9871 fi
9872
9873 done
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9887 strdup __argz_count __argz_stringify __argz_next
9888 do
9889 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9890 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9891 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9892 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9893   echo $ECHO_N "(cached) $ECHO_C" >&6
9894 else
9895   cat >conftest.$ac_ext <<_ACEOF
9896 /* confdefs.h.  */
9897 _ACEOF
9898 cat confdefs.h >>conftest.$ac_ext
9899 cat >>conftest.$ac_ext <<_ACEOF
9900 /* end confdefs.h.  */
9901 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9902    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9903 #define $ac_func innocuous_$ac_func
9904
9905 /* System header to define __stub macros and hopefully few prototypes,
9906     which can conflict with char $ac_func (); below.
9907     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9908     <limits.h> exists even on freestanding compilers.  */
9909
9910 #ifdef __STDC__
9911 # include <limits.h>
9912 #else
9913 # include <assert.h>
9914 #endif
9915
9916 #undef $ac_func
9917
9918 /* Override any GCC internal prototype to avoid an error.
9919    Use char because int might match the return type of a GCC
9920    builtin and then its argument prototype would still apply.  */
9921 #ifdef __cplusplus
9922 extern "C"
9923 #endif
9924 char $ac_func ();
9925 /* The GNU C library defines this for functions which it implements
9926     to always fail with ENOSYS.  Some functions are actually named
9927     something starting with __ and the normal name is an alias.  */
9928 #if defined __stub_$ac_func || defined __stub___$ac_func
9929 choke me
9930 #endif
9931
9932 int
9933 main ()
9934 {
9935 return $ac_func ();
9936   ;
9937   return 0;
9938 }
9939 _ACEOF
9940 rm -f conftest.$ac_objext conftest$ac_exeext
9941 if { (ac_try="$ac_link"
9942 case "(($ac_try" in
9943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9944   *) ac_try_echo=$ac_try;;
9945 esac
9946 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9947   (eval "$ac_link") 2>conftest.er1
9948   ac_status=$?
9949   grep -v '^ *+' conftest.er1 >conftest.err
9950   rm -f conftest.er1
9951   cat conftest.err >&5
9952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9953   (exit $ac_status); } &&
9954          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9955   { (case "(($ac_try" in
9956   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9957   *) ac_try_echo=$ac_try;;
9958 esac
9959 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9960   (eval "$ac_try") 2>&5
9961   ac_status=$?
9962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9963   (exit $ac_status); }; } &&
9964          { ac_try='test -s conftest$ac_exeext'
9965   { (case "(($ac_try" in
9966   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9967   *) ac_try_echo=$ac_try;;
9968 esac
9969 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9970   (eval "$ac_try") 2>&5
9971   ac_status=$?
9972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9973   (exit $ac_status); }; }; then
9974   eval "$as_ac_var=yes"
9975 else
9976   echo "$as_me: failed program was:" >&5
9977 sed 's/^/| /' conftest.$ac_ext >&5
9978
9979         eval "$as_ac_var=no"
9980 fi
9981
9982 rm -f core conftest.err conftest.$ac_objext \
9983       conftest$ac_exeext conftest.$ac_ext
9984 fi
9985 ac_res=`eval echo '${'$as_ac_var'}'`
9986                { echo "$as_me:$LINENO: result: $ac_res" >&5
9987 echo "${ECHO_T}$ac_res" >&6; }
9988 if test `eval echo '${'$as_ac_var'}'` = yes; then
9989   cat >>confdefs.h <<_ACEOF
9990 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9991 _ACEOF
9992
9993 fi
9994 done
9995
9996
9997    if test $ac_cv_header_locale_h = yes; then
9998     { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9999 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
10000 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
10001   echo $ECHO_N "(cached) $ECHO_C" >&6
10002 else
10003   cat >conftest.$ac_ext <<_ACEOF
10004 /* confdefs.h.  */
10005 _ACEOF
10006 cat confdefs.h >>conftest.$ac_ext
10007 cat >>conftest.$ac_ext <<_ACEOF
10008 /* end confdefs.h.  */
10009 #include <locale.h>
10010 int
10011 main ()
10012 {
10013 return LC_MESSAGES
10014   ;
10015   return 0;
10016 }
10017 _ACEOF
10018 rm -f conftest.$ac_objext conftest$ac_exeext
10019 if { (ac_try="$ac_link"
10020 case "(($ac_try" in
10021   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10022   *) ac_try_echo=$ac_try;;
10023 esac
10024 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10025   (eval "$ac_link") 2>conftest.er1
10026   ac_status=$?
10027   grep -v '^ *+' conftest.er1 >conftest.err
10028   rm -f conftest.er1
10029   cat conftest.err >&5
10030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10031   (exit $ac_status); } &&
10032          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10033   { (case "(($ac_try" in
10034   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10035   *) ac_try_echo=$ac_try;;
10036 esac
10037 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10038   (eval "$ac_try") 2>&5
10039   ac_status=$?
10040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10041   (exit $ac_status); }; } &&
10042          { ac_try='test -s conftest$ac_exeext'
10043   { (case "(($ac_try" in
10044   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10045   *) ac_try_echo=$ac_try;;
10046 esac
10047 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10048   (eval "$ac_try") 2>&5
10049   ac_status=$?
10050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10051   (exit $ac_status); }; }; then
10052   am_cv_val_LC_MESSAGES=yes
10053 else
10054   echo "$as_me: failed program was:" >&5
10055 sed 's/^/| /' conftest.$ac_ext >&5
10056
10057         am_cv_val_LC_MESSAGES=no
10058 fi
10059
10060 rm -f core conftest.err conftest.$ac_objext \
10061       conftest$ac_exeext conftest.$ac_ext
10062 fi
10063 { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
10064 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
10065     if test $am_cv_val_LC_MESSAGES = yes; then
10066
10067 cat >>confdefs.h <<\_ACEOF
10068 #define HAVE_LC_MESSAGES 1
10069 _ACEOF
10070
10071     fi
10072   fi
10073      USE_NLS=yes
10074
10075
10076         nls_cv_force_use_gnu_gettext="no"
10077
10078     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
10079     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
10080                               nls_cv_header_intl=
10081       nls_cv_header_libgt=
10082       CATOBJEXT=NONE
10083
10084       if test "${ac_cv_header_libintl_h+set}" = set; then
10085   { echo "$as_me:$LINENO: checking for libintl.h" >&5
10086 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
10087 if test "${ac_cv_header_libintl_h+set}" = set; then
10088   echo $ECHO_N "(cached) $ECHO_C" >&6
10089 fi
10090 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
10091 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
10092 else
10093   # Is the header compilable?
10094 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
10095 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
10096 cat >conftest.$ac_ext <<_ACEOF
10097 /* confdefs.h.  */
10098 _ACEOF
10099 cat confdefs.h >>conftest.$ac_ext
10100 cat >>conftest.$ac_ext <<_ACEOF
10101 /* end confdefs.h.  */
10102 $ac_includes_default
10103 #include <libintl.h>
10104 _ACEOF
10105 rm -f conftest.$ac_objext
10106 if { (ac_try="$ac_compile"
10107 case "(($ac_try" in
10108   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10109   *) ac_try_echo=$ac_try;;
10110 esac
10111 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10112   (eval "$ac_compile") 2>conftest.er1
10113   ac_status=$?
10114   grep -v '^ *+' conftest.er1 >conftest.err
10115   rm -f conftest.er1
10116   cat conftest.err >&5
10117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10118   (exit $ac_status); } &&
10119          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10120   { (case "(($ac_try" in
10121   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10122   *) ac_try_echo=$ac_try;;
10123 esac
10124 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10125   (eval "$ac_try") 2>&5
10126   ac_status=$?
10127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10128   (exit $ac_status); }; } &&
10129          { ac_try='test -s conftest.$ac_objext'
10130   { (case "(($ac_try" in
10131   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10132   *) ac_try_echo=$ac_try;;
10133 esac
10134 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10135   (eval "$ac_try") 2>&5
10136   ac_status=$?
10137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10138   (exit $ac_status); }; }; then
10139   ac_header_compiler=yes
10140 else
10141   echo "$as_me: failed program was:" >&5
10142 sed 's/^/| /' conftest.$ac_ext >&5
10143
10144         ac_header_compiler=no
10145 fi
10146
10147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10148 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10149 echo "${ECHO_T}$ac_header_compiler" >&6; }
10150
10151 # Is the header present?
10152 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
10153 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
10154 cat >conftest.$ac_ext <<_ACEOF
10155 /* confdefs.h.  */
10156 _ACEOF
10157 cat confdefs.h >>conftest.$ac_ext
10158 cat >>conftest.$ac_ext <<_ACEOF
10159 /* end confdefs.h.  */
10160 #include <libintl.h>
10161 _ACEOF
10162 if { (ac_try="$ac_cpp conftest.$ac_ext"
10163 case "(($ac_try" in
10164   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10165   *) ac_try_echo=$ac_try;;
10166 esac
10167 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10168   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10169   ac_status=$?
10170   grep -v '^ *+' conftest.er1 >conftest.err
10171   rm -f conftest.er1
10172   cat conftest.err >&5
10173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10174   (exit $ac_status); } >/dev/null; then
10175   if test -s conftest.err; then
10176     ac_cpp_err=$ac_c_preproc_warn_flag
10177     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10178   else
10179     ac_cpp_err=
10180   fi
10181 else
10182   ac_cpp_err=yes
10183 fi
10184 if test -z "$ac_cpp_err"; then
10185   ac_header_preproc=yes
10186 else
10187   echo "$as_me: failed program was:" >&5
10188 sed 's/^/| /' conftest.$ac_ext >&5
10189
10190   ac_header_preproc=no
10191 fi
10192
10193 rm -f conftest.err conftest.$ac_ext
10194 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10195 echo "${ECHO_T}$ac_header_preproc" >&6; }
10196
10197 # So?  What about this header?
10198 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10199   yes:no: )
10200     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10201 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10202     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
10203 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
10204     ac_header_preproc=yes
10205     ;;
10206   no:yes:* )
10207     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
10208 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
10209     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
10210 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
10211     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
10212 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
10213     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
10214 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10215     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
10216 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
10217     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
10218 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
10219
10220     ;;
10221 esac
10222 { echo "$as_me:$LINENO: checking for libintl.h" >&5
10223 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
10224 if test "${ac_cv_header_libintl_h+set}" = set; then
10225   echo $ECHO_N "(cached) $ECHO_C" >&6
10226 else
10227   ac_cv_header_libintl_h=$ac_header_preproc
10228 fi
10229 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
10230 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
10231
10232 fi
10233 if test $ac_cv_header_libintl_h = yes; then
10234   { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
10235 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
10236 if test "${gt_cv_func_dgettext_libc+set}" = set; then
10237   echo $ECHO_N "(cached) $ECHO_C" >&6
10238 else
10239   cat >conftest.$ac_ext <<_ACEOF
10240 /* confdefs.h.  */
10241 _ACEOF
10242 cat confdefs.h >>conftest.$ac_ext
10243 cat >>conftest.$ac_ext <<_ACEOF
10244 /* end confdefs.h.  */
10245 #include <libintl.h>
10246 int
10247 main ()
10248 {
10249 return (int) dgettext ("","")
10250   ;
10251   return 0;
10252 }
10253 _ACEOF
10254 rm -f conftest.$ac_objext conftest$ac_exeext
10255 if { (ac_try="$ac_link"
10256 case "(($ac_try" in
10257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10258   *) ac_try_echo=$ac_try;;
10259 esac
10260 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10261   (eval "$ac_link") 2>conftest.er1
10262   ac_status=$?
10263   grep -v '^ *+' conftest.er1 >conftest.err
10264   rm -f conftest.er1
10265   cat conftest.err >&5
10266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10267   (exit $ac_status); } &&
10268          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10269   { (case "(($ac_try" in
10270   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10271   *) ac_try_echo=$ac_try;;
10272 esac
10273 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10274   (eval "$ac_try") 2>&5
10275   ac_status=$?
10276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10277   (exit $ac_status); }; } &&
10278          { ac_try='test -s conftest$ac_exeext'
10279   { (case "(($ac_try" in
10280   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10281   *) ac_try_echo=$ac_try;;
10282 esac
10283 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10284   (eval "$ac_try") 2>&5
10285   ac_status=$?
10286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10287   (exit $ac_status); }; }; then
10288   gt_cv_func_dgettext_libc=yes
10289 else
10290   echo "$as_me: failed program was:" >&5
10291 sed 's/^/| /' conftest.$ac_ext >&5
10292
10293         gt_cv_func_dgettext_libc=no
10294 fi
10295
10296 rm -f core conftest.err conftest.$ac_objext \
10297       conftest$ac_exeext conftest.$ac_ext
10298 fi
10299 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
10300 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
10301
10302           if test "$gt_cv_func_dgettext_libc" != "yes"; then
10303             { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
10304 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
10305 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
10306   echo $ECHO_N "(cached) $ECHO_C" >&6
10307 else
10308   ac_check_lib_save_LIBS=$LIBS
10309 LIBS="-lintl  $LIBS"
10310 cat >conftest.$ac_ext <<_ACEOF
10311 /* confdefs.h.  */
10312 _ACEOF
10313 cat confdefs.h >>conftest.$ac_ext
10314 cat >>conftest.$ac_ext <<_ACEOF
10315 /* end confdefs.h.  */
10316
10317 /* Override any GCC internal prototype to avoid an error.
10318    Use char because int might match the return type of a GCC
10319    builtin and then its argument prototype would still apply.  */
10320 #ifdef __cplusplus
10321 extern "C"
10322 #endif
10323 char bindtextdomain ();
10324 int
10325 main ()
10326 {
10327 return bindtextdomain ();
10328   ;
10329   return 0;
10330 }
10331 _ACEOF
10332 rm -f conftest.$ac_objext conftest$ac_exeext
10333 if { (ac_try="$ac_link"
10334 case "(($ac_try" in
10335   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10336   *) ac_try_echo=$ac_try;;
10337 esac
10338 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10339   (eval "$ac_link") 2>conftest.er1
10340   ac_status=$?
10341   grep -v '^ *+' conftest.er1 >conftest.err
10342   rm -f conftest.er1
10343   cat conftest.err >&5
10344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10345   (exit $ac_status); } &&
10346          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10347   { (case "(($ac_try" in
10348   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10349   *) ac_try_echo=$ac_try;;
10350 esac
10351 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10352   (eval "$ac_try") 2>&5
10353   ac_status=$?
10354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10355   (exit $ac_status); }; } &&
10356          { ac_try='test -s conftest$ac_exeext'
10357   { (case "(($ac_try" in
10358   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10359   *) ac_try_echo=$ac_try;;
10360 esac
10361 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10362   (eval "$ac_try") 2>&5
10363   ac_status=$?
10364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10365   (exit $ac_status); }; }; then
10366   ac_cv_lib_intl_bindtextdomain=yes
10367 else
10368   echo "$as_me: failed program was:" >&5
10369 sed 's/^/| /' conftest.$ac_ext >&5
10370
10371         ac_cv_lib_intl_bindtextdomain=no
10372 fi
10373
10374 rm -f core conftest.err conftest.$ac_objext \
10375       conftest$ac_exeext conftest.$ac_ext
10376 LIBS=$ac_check_lib_save_LIBS
10377 fi
10378 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
10379 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
10380 if test $ac_cv_lib_intl_bindtextdomain = yes; then
10381   { echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
10382 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6; }
10383 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
10384   echo $ECHO_N "(cached) $ECHO_C" >&6
10385 else
10386   { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
10387 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
10388 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
10389   echo $ECHO_N "(cached) $ECHO_C" >&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 -f 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10422   (eval "$ac_link") 2>conftest.er1
10423   ac_status=$?
10424   grep -v '^ *+' conftest.er1 >conftest.err
10425   rm -f conftest.er1
10426   cat conftest.err >&5
10427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10428   (exit $ac_status); } &&
10429          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10430   { (case "(($ac_try" in
10431   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10432   *) ac_try_echo=$ac_try;;
10433 esac
10434 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10435   (eval "$ac_try") 2>&5
10436   ac_status=$?
10437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10438   (exit $ac_status); }; } &&
10439          { ac_try='test -s conftest$ac_exeext'
10440   { (case "(($ac_try" in
10441   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10442   *) ac_try_echo=$ac_try;;
10443 esac
10444 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10445   (eval "$ac_try") 2>&5
10446   ac_status=$?
10447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10448   (exit $ac_status); }; }; then
10449   ac_cv_lib_intl_dgettext=yes
10450 else
10451   echo "$as_me: failed program was:" >&5
10452 sed 's/^/| /' conftest.$ac_ext >&5
10453
10454         ac_cv_lib_intl_dgettext=no
10455 fi
10456
10457 rm -f core conftest.err conftest.$ac_objext \
10458       conftest$ac_exeext conftest.$ac_ext
10459 LIBS=$ac_check_lib_save_LIBS
10460 fi
10461 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
10462 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
10463 if test $ac_cv_lib_intl_dgettext = yes; then
10464   gt_cv_func_dgettext_libintl=yes
10465 else
10466   gt_cv_func_dgettext_libintl=no
10467 fi
10468
10469 fi
10470 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
10471 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6; }
10472 fi
10473
10474           fi
10475
10476           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
10477             LIBS="$LIBS -lintl";
10478           fi
10479
10480           if test "$gt_cv_func_dgettext_libc" = "yes" \
10481             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
10482
10483 cat >>confdefs.h <<\_ACEOF
10484 #define HAVE_GETTEXT 1
10485 _ACEOF
10486
10487             # Extract the first word of "msgfmt", so it can be a program name with args.
10488 set dummy msgfmt; ac_word=$2
10489 { echo "$as_me:$LINENO: checking for $ac_word" >&5
10490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10491 if test "${ac_cv_path_MSGFMT+set}" = set; then
10492   echo $ECHO_N "(cached) $ECHO_C" >&6
10493 else
10494   case "$MSGFMT" in
10495   /*)
10496   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
10497   ;;
10498   *)
10499   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10500   for ac_dir in $PATH; do
10501     test -z "$ac_dir" && ac_dir=.
10502     if test -f $ac_dir/$ac_word; then
10503       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
10504         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
10505         break
10506       fi
10507     fi
10508   done
10509   IFS="$ac_save_ifs"
10510   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
10511   ;;
10512 esac
10513 fi
10514 MSGFMT="$ac_cv_path_MSGFMT"
10515 if test -n "$MSGFMT"; then
10516   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
10517 echo "${ECHO_T}$MSGFMT" >&6; }
10518 else
10519   { echo "$as_me:$LINENO: result: no" >&5
10520 echo "${ECHO_T}no" >&6; }
10521 fi
10522             if test "$MSGFMT" != "no"; then
10523
10524 for ac_func in dcgettext
10525 do
10526 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10527 { echo "$as_me:$LINENO: checking for $ac_func" >&5
10528 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10529 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10530   echo $ECHO_N "(cached) $ECHO_C" >&6
10531 else
10532   cat >conftest.$ac_ext <<_ACEOF
10533 /* confdefs.h.  */
10534 _ACEOF
10535 cat confdefs.h >>conftest.$ac_ext
10536 cat >>conftest.$ac_ext <<_ACEOF
10537 /* end confdefs.h.  */
10538 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10539    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10540 #define $ac_func innocuous_$ac_func
10541
10542 /* System header to define __stub macros and hopefully few prototypes,
10543     which can conflict with char $ac_func (); below.
10544     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10545     <limits.h> exists even on freestanding compilers.  */
10546
10547 #ifdef __STDC__
10548 # include <limits.h>
10549 #else
10550 # include <assert.h>
10551 #endif
10552
10553 #undef $ac_func
10554
10555 /* Override any GCC internal prototype to avoid an error.
10556    Use char because int might match the return type of a GCC
10557    builtin and then its argument prototype would still apply.  */
10558 #ifdef __cplusplus
10559 extern "C"
10560 #endif
10561 char $ac_func ();
10562 /* The GNU C library defines this for functions which it implements
10563     to always fail with ENOSYS.  Some functions are actually named
10564     something starting with __ and the normal name is an alias.  */
10565 #if defined __stub_$ac_func || defined __stub___$ac_func
10566 choke me
10567 #endif
10568
10569 int
10570 main ()
10571 {
10572 return $ac_func ();
10573   ;
10574   return 0;
10575 }
10576 _ACEOF
10577 rm -f conftest.$ac_objext conftest$ac_exeext
10578 if { (ac_try="$ac_link"
10579 case "(($ac_try" in
10580   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10581   *) ac_try_echo=$ac_try;;
10582 esac
10583 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10584   (eval "$ac_link") 2>conftest.er1
10585   ac_status=$?
10586   grep -v '^ *+' conftest.er1 >conftest.err
10587   rm -f conftest.er1
10588   cat conftest.err >&5
10589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10590   (exit $ac_status); } &&
10591          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10592   { (case "(($ac_try" in
10593   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10594   *) ac_try_echo=$ac_try;;
10595 esac
10596 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10597   (eval "$ac_try") 2>&5
10598   ac_status=$?
10599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10600   (exit $ac_status); }; } &&
10601          { ac_try='test -s conftest$ac_exeext'
10602   { (case "(($ac_try" in
10603   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10604   *) ac_try_echo=$ac_try;;
10605 esac
10606 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10607   (eval "$ac_try") 2>&5
10608   ac_status=$?
10609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10610   (exit $ac_status); }; }; then
10611   eval "$as_ac_var=yes"
10612 else
10613   echo "$as_me: failed program was:" >&5
10614 sed 's/^/| /' conftest.$ac_ext >&5
10615
10616         eval "$as_ac_var=no"
10617 fi
10618
10619 rm -f core conftest.err conftest.$ac_objext \
10620       conftest$ac_exeext conftest.$ac_ext
10621 fi
10622 ac_res=`eval echo '${'$as_ac_var'}'`
10623                { echo "$as_me:$LINENO: result: $ac_res" >&5
10624 echo "${ECHO_T}$ac_res" >&6; }
10625 if test `eval echo '${'$as_ac_var'}'` = yes; then
10626   cat >>confdefs.h <<_ACEOF
10627 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10628 _ACEOF
10629
10630 fi
10631 done
10632
10633               # Extract the first word of "gmsgfmt", so it can be a program name with args.
10634 set dummy gmsgfmt; ac_word=$2
10635 { echo "$as_me:$LINENO: checking for $ac_word" >&5
10636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10637 if test "${ac_cv_path_GMSGFMT+set}" = set; then
10638   echo $ECHO_N "(cached) $ECHO_C" >&6
10639 else
10640   case $GMSGFMT in
10641   [\\/]* | ?:[\\/]*)
10642   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
10643   ;;
10644   *)
10645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10646 for as_dir in $PATH
10647 do
10648   IFS=$as_save_IFS
10649   test -z "$as_dir" && as_dir=.
10650   for ac_exec_ext in '' $ac_executable_extensions; do
10651   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
10652     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
10653     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10654     break 2
10655   fi
10656 done
10657 done
10658 IFS=$as_save_IFS
10659
10660   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
10661   ;;
10662 esac
10663 fi
10664 GMSGFMT=$ac_cv_path_GMSGFMT
10665 if test -n "$GMSGFMT"; then
10666   { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
10667 echo "${ECHO_T}$GMSGFMT" >&6; }
10668 else
10669   { echo "$as_me:$LINENO: result: no" >&5
10670 echo "${ECHO_T}no" >&6; }
10671 fi
10672
10673
10674               # Extract the first word of "xgettext", so it can be a program name with args.
10675 set dummy xgettext; ac_word=$2
10676 { echo "$as_me:$LINENO: checking for $ac_word" >&5
10677 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10678 if test "${ac_cv_path_XGETTEXT+set}" = set; then
10679   echo $ECHO_N "(cached) $ECHO_C" >&6
10680 else
10681   case "$XGETTEXT" in
10682   /*)
10683   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
10684   ;;
10685   *)
10686   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
10687   for ac_dir in $PATH; do
10688     test -z "$ac_dir" && ac_dir=.
10689     if test -f $ac_dir/$ac_word; then
10690       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
10691         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
10692         break
10693       fi
10694     fi
10695   done
10696   IFS="$ac_save_ifs"
10697   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
10698   ;;
10699 esac
10700 fi
10701 XGETTEXT="$ac_cv_path_XGETTEXT"
10702 if test -n "$XGETTEXT"; then
10703   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
10704 echo "${ECHO_T}$XGETTEXT" >&6; }
10705 else
10706   { echo "$as_me:$LINENO: result: no" >&5
10707 echo "${ECHO_T}no" >&6; }
10708 fi
10709
10710               cat >conftest.$ac_ext <<_ACEOF
10711 /* confdefs.h.  */
10712 _ACEOF
10713 cat confdefs.h >>conftest.$ac_ext
10714 cat >>conftest.$ac_ext <<_ACEOF
10715 /* end confdefs.h.  */
10716
10717 int
10718 main ()
10719 {
10720 extern int _nl_msg_cat_cntr;
10721                              return _nl_msg_cat_cntr
10722   ;
10723   return 0;
10724 }
10725 _ACEOF
10726 rm -f conftest.$ac_objext conftest$ac_exeext
10727 if { (ac_try="$ac_link"
10728 case "(($ac_try" in
10729   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10730   *) ac_try_echo=$ac_try;;
10731 esac
10732 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10733   (eval "$ac_link") 2>conftest.er1
10734   ac_status=$?
10735   grep -v '^ *+' conftest.er1 >conftest.err
10736   rm -f conftest.er1
10737   cat conftest.err >&5
10738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10739   (exit $ac_status); } &&
10740          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10741   { (case "(($ac_try" in
10742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10743   *) ac_try_echo=$ac_try;;
10744 esac
10745 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10746   (eval "$ac_try") 2>&5
10747   ac_status=$?
10748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10749   (exit $ac_status); }; } &&
10750          { ac_try='test -s conftest$ac_exeext'
10751   { (case "(($ac_try" in
10752   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10753   *) ac_try_echo=$ac_try;;
10754 esac
10755 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10756   (eval "$ac_try") 2>&5
10757   ac_status=$?
10758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10759   (exit $ac_status); }; }; then
10760   CATOBJEXT=.gmo
10761                  DATADIRNAME=share
10762 else
10763   echo "$as_me: failed program was:" >&5
10764 sed 's/^/| /' conftest.$ac_ext >&5
10765
10766         CATOBJEXT=.mo
10767                  DATADIRNAME=lib
10768 fi
10769
10770 rm -f core conftest.err conftest.$ac_objext \
10771       conftest$ac_exeext conftest.$ac_ext
10772               INSTOBJEXT=.mo
10773             fi
10774           fi
10775
10776           # Added by Martin Baulig 12/15/98 for libc5 systems
10777           if test "$gt_cv_func_dgettext_libc" != "yes" \
10778             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
10779             INTLLIBS=-lintl
10780             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
10781           fi
10782
10783 fi
10784
10785
10786
10787       if test "$CATOBJEXT" = "NONE"; then
10788                         nls_cv_use_gnu_gettext=yes
10789       fi
10790     fi
10791
10792     if test "$nls_cv_use_gnu_gettext" != "yes"; then
10793
10794 cat >>confdefs.h <<\_ACEOF
10795 #define ENABLE_NLS 1
10796 _ACEOF
10797
10798     else
10799             CATOBJEXT=
10800     fi
10801
10802         if test "$XGETTEXT" != ":"; then
10803                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
10804         : ;
10805       else
10806         { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
10807 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
10808         XGETTEXT=":"
10809       fi
10810     fi
10811
10812     # We need to process the po/ directory.
10813     POSUB=po
10814
10815     ac_config_commands="$ac_config_commands default-2"
10816
10817
10818                 for lang in $ALL_LINGUAS; do
10819       GMOFILES="$GMOFILES $lang.gmo"
10820       POFILES="$POFILES $lang.po"
10821     done
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835    if test "x$CATOBJEXT" != "x"; then
10836      if test "x$ALL_LINGUAS" = "x"; then
10837        LINGUAS=
10838      else
10839        { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
10840 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
10841        NEW_LINGUAS=
10842        for lang in ${LINGUAS=$ALL_LINGUAS}; do
10843          case "$ALL_LINGUAS" in
10844           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
10845          esac
10846        done
10847        LINGUAS=$NEW_LINGUAS
10848        { echo "$as_me:$LINENO: result: $LINGUAS" >&5
10849 echo "${ECHO_T}$LINGUAS" >&6; }
10850      fi
10851
10852           if test -n "$LINGUAS"; then
10853        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
10854      fi
10855    fi
10856
10857             test -d po || mkdir po
10858    if test "$CATOBJEXT" = ".cat"; then
10859      if test "${ac_cv_header_linux_version_h+set}" = set; then
10860   { echo "$as_me:$LINENO: checking for linux/version.h" >&5
10861 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
10862 if test "${ac_cv_header_linux_version_h+set}" = set; then
10863   echo $ECHO_N "(cached) $ECHO_C" >&6
10864 fi
10865 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10866 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
10867 else
10868   # Is the header compilable?
10869 { echo "$as_me:$LINENO: checking linux/version.h usability" >&5
10870 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; }
10871 cat >conftest.$ac_ext <<_ACEOF
10872 /* confdefs.h.  */
10873 _ACEOF
10874 cat confdefs.h >>conftest.$ac_ext
10875 cat >>conftest.$ac_ext <<_ACEOF
10876 /* end confdefs.h.  */
10877 $ac_includes_default
10878 #include <linux/version.h>
10879 _ACEOF
10880 rm -f conftest.$ac_objext
10881 if { (ac_try="$ac_compile"
10882 case "(($ac_try" in
10883   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10884   *) ac_try_echo=$ac_try;;
10885 esac
10886 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10887   (eval "$ac_compile") 2>conftest.er1
10888   ac_status=$?
10889   grep -v '^ *+' conftest.er1 >conftest.err
10890   rm -f conftest.er1
10891   cat conftest.err >&5
10892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10893   (exit $ac_status); } &&
10894          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10895   { (case "(($ac_try" in
10896   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10897   *) ac_try_echo=$ac_try;;
10898 esac
10899 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10900   (eval "$ac_try") 2>&5
10901   ac_status=$?
10902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10903   (exit $ac_status); }; } &&
10904          { ac_try='test -s conftest.$ac_objext'
10905   { (case "(($ac_try" in
10906   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10907   *) ac_try_echo=$ac_try;;
10908 esac
10909 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10910   (eval "$ac_try") 2>&5
10911   ac_status=$?
10912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10913   (exit $ac_status); }; }; then
10914   ac_header_compiler=yes
10915 else
10916   echo "$as_me: failed program was:" >&5
10917 sed 's/^/| /' conftest.$ac_ext >&5
10918
10919         ac_header_compiler=no
10920 fi
10921
10922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10923 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10924 echo "${ECHO_T}$ac_header_compiler" >&6; }
10925
10926 # Is the header present?
10927 { echo "$as_me:$LINENO: checking linux/version.h presence" >&5
10928 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; }
10929 cat >conftest.$ac_ext <<_ACEOF
10930 /* confdefs.h.  */
10931 _ACEOF
10932 cat confdefs.h >>conftest.$ac_ext
10933 cat >>conftest.$ac_ext <<_ACEOF
10934 /* end confdefs.h.  */
10935 #include <linux/version.h>
10936 _ACEOF
10937 if { (ac_try="$ac_cpp conftest.$ac_ext"
10938 case "(($ac_try" in
10939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10940   *) ac_try_echo=$ac_try;;
10941 esac
10942 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10943   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10944   ac_status=$?
10945   grep -v '^ *+' conftest.er1 >conftest.err
10946   rm -f conftest.er1
10947   cat conftest.err >&5
10948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10949   (exit $ac_status); } >/dev/null; then
10950   if test -s conftest.err; then
10951     ac_cpp_err=$ac_c_preproc_warn_flag
10952     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10953   else
10954     ac_cpp_err=
10955   fi
10956 else
10957   ac_cpp_err=yes
10958 fi
10959 if test -z "$ac_cpp_err"; then
10960   ac_header_preproc=yes
10961 else
10962   echo "$as_me: failed program was:" >&5
10963 sed 's/^/| /' conftest.$ac_ext >&5
10964
10965   ac_header_preproc=no
10966 fi
10967
10968 rm -f conftest.err conftest.$ac_ext
10969 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10970 echo "${ECHO_T}$ac_header_preproc" >&6; }
10971
10972 # So?  What about this header?
10973 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10974   yes:no: )
10975     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
10976 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10977     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
10978 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
10979     ac_header_preproc=yes
10980     ;;
10981   no:yes:* )
10982     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
10983 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
10984     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
10985 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
10986     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
10987 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
10988     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
10989 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10990     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
10991 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
10992     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
10993 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
10994
10995     ;;
10996 esac
10997 { echo "$as_me:$LINENO: checking for linux/version.h" >&5
10998 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
10999 if test "${ac_cv_header_linux_version_h+set}" = set; then
11000   echo $ECHO_N "(cached) $ECHO_C" >&6
11001 else
11002   ac_cv_header_linux_version_h=$ac_header_preproc
11003 fi
11004 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
11005 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
11006
11007 fi
11008 if test $ac_cv_header_linux_version_h = yes; then
11009   msgformat=linux
11010 else
11011   msgformat=xopen
11012 fi
11013
11014
11015
11016                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
11017    fi
11018
11019             MKINSTALLDIRS=
11020 #
11021 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
11022 #
11023 #   if test -n "$ac_aux_dir"; then
11024 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
11025 #   fi
11026    if test -z "$MKINSTALLDIRS"; then
11027      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
11028    fi
11029
11030    # jwz: you know what, screw it.  Let's just use the version that I
11031    # already computed in configure.in, instead of this version that came
11032    # with the i18n crud, ok?
11033    MKINSTALLDIRS="$INSTALL_DIRS"
11034
11035
11036
11037
11038          test -d po || mkdir po
11039    if test "x$srcdir" != "x."; then
11040      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
11041        posrcprefix="$srcdir/"
11042      else
11043        posrcprefix="../$srcdir/"
11044      fi
11045    else
11046      posrcprefix="../"
11047    fi
11048    rm -f po/POTFILES
11049    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
11050         < $srcdir/po/POTFILES.in > po/POTFILES
11051
11052 MKINSTALLDIRS="$INSTALL_DIRS"
11053
11054
11055 ###############################################################################
11056 #
11057 #       Check for -lXmu (some fucked up vendors don't ship it...)
11058 #
11059 ###############################################################################
11060
11061 have_xmu=no
11062
11063   ac_save_CPPFLAGS="$CPPFLAGS"
11064   if test \! -z "$includedir" ; then
11065     CPPFLAGS="$CPPFLAGS -I$includedir"
11066   fi
11067   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11068   { echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
11069 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6; }
11070 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
11071   echo $ECHO_N "(cached) $ECHO_C" >&6
11072 else
11073   cat >conftest.$ac_ext <<_ACEOF
11074 /* confdefs.h.  */
11075 _ACEOF
11076 cat confdefs.h >>conftest.$ac_ext
11077 cat >>conftest.$ac_ext <<_ACEOF
11078 /* end confdefs.h.  */
11079 #include <stdlib.h>
11080                    #include <stdio.h>
11081                    #include <X11/Intrinsic.h>
11082
11083 #include <X11/Xmu/Error.h>
11084 _ACEOF
11085 rm -f conftest.$ac_objext
11086 if { (ac_try="$ac_compile"
11087 case "(($ac_try" in
11088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11089   *) ac_try_echo=$ac_try;;
11090 esac
11091 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11092   (eval "$ac_compile") 2>conftest.er1
11093   ac_status=$?
11094   grep -v '^ *+' conftest.er1 >conftest.err
11095   rm -f conftest.er1
11096   cat conftest.err >&5
11097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11098   (exit $ac_status); } &&
11099          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11100   { (case "(($ac_try" in
11101   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11102   *) ac_try_echo=$ac_try;;
11103 esac
11104 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11105   (eval "$ac_try") 2>&5
11106   ac_status=$?
11107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11108   (exit $ac_status); }; } &&
11109          { ac_try='test -s conftest.$ac_objext'
11110   { (case "(($ac_try" in
11111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11112   *) ac_try_echo=$ac_try;;
11113 esac
11114 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11115   (eval "$ac_try") 2>&5
11116   ac_status=$?
11117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11118   (exit $ac_status); }; }; then
11119   ac_cv_header_X11_Xmu_Error_h=yes
11120 else
11121   echo "$as_me: failed program was:" >&5
11122 sed 's/^/| /' conftest.$ac_ext >&5
11123
11124         ac_cv_header_X11_Xmu_Error_h=no
11125 fi
11126
11127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11128 fi
11129 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
11130 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6; }
11131 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
11132   have_xmu=yes
11133 fi
11134
11135
11136   CPPFLAGS="$ac_save_CPPFLAGS"
11137 if test "$have_xmu" = no ; then
11138   XMU_SRCS='$(UTILS_SRC)/xmu.c'
11139   XMU_OBJS='$(UTILS_BIN)/xmu.o'
11140   XMU_LIBS=''
11141 else
11142   XMU_SRCS=''
11143   XMU_OBJS=''
11144   XMU_LIBS='-lXmu'
11145   cat >>confdefs.h <<\_ACEOF
11146 #define HAVE_XMU 1
11147 _ACEOF
11148
11149 fi
11150
11151
11152 ###############################################################################
11153 #
11154 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
11155 #       See comp.windows.x FAQ question 124.  The right fix is to
11156 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
11157 #
11158 ###############################################################################
11159
11160 if test "$have_xmu" = yes ; then
11161   case "$host" in
11162     *-sunos4*)
11163     { echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
11164 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6; }
11165 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
11166   echo $ECHO_N "(cached) $ECHO_C" >&6
11167 else
11168   ac_save_LDFLAGS="$LDFLAGS"
11169                     if test \! -z "$x_libraries" ; then
11170                       LDFLAGS="$LDFLAGS -L$x_libraries"
11171                     fi
11172                     # Note: this trick never works!  (Generally.)
11173                     # We're only getting away with using AC_TRY_LINK
11174                     # with X libraries because we know it's SunOS.
11175                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
11176                     cat >conftest.$ac_ext <<_ACEOF
11177 /* confdefs.h.  */
11178 _ACEOF
11179 cat confdefs.h >>conftest.$ac_ext
11180 cat >>conftest.$ac_ext <<_ACEOF
11181 /* end confdefs.h.  */
11182
11183 int
11184 main ()
11185 {
11186
11187   ;
11188   return 0;
11189 }
11190 _ACEOF
11191 rm -f conftest.$ac_objext conftest$ac_exeext
11192 if { (ac_try="$ac_link"
11193 case "(($ac_try" in
11194   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11195   *) ac_try_echo=$ac_try;;
11196 esac
11197 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11198   (eval "$ac_link") 2>conftest.er1
11199   ac_status=$?
11200   grep -v '^ *+' conftest.er1 >conftest.err
11201   rm -f conftest.er1
11202   cat conftest.err >&5
11203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11204   (exit $ac_status); } &&
11205          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11206   { (case "(($ac_try" in
11207   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11208   *) ac_try_echo=$ac_try;;
11209 esac
11210 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11211   (eval "$ac_try") 2>&5
11212   ac_status=$?
11213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11214   (exit $ac_status); }; } &&
11215          { ac_try='test -s conftest$ac_exeext'
11216   { (case "(($ac_try" in
11217   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11218   *) ac_try_echo=$ac_try;;
11219 esac
11220 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11221   (eval "$ac_try") 2>&5
11222   ac_status=$?
11223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11224   (exit $ac_status); }; }; then
11225   ac_cv_sunos_xmu_bug=no
11226 else
11227   echo "$as_me: failed program was:" >&5
11228 sed 's/^/| /' conftest.$ac_ext >&5
11229
11230         ac_cv_sunos_xmu_bug=yes
11231 fi
11232
11233 rm -f core conftest.err conftest.$ac_objext \
11234       conftest$ac_exeext conftest.$ac_ext
11235                     LDFLAGS="$ac_save_LDFLAGS"
11236 fi
11237 { echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
11238 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6; }
11239     if test "$ac_cv_sunos_xmu_bug" = yes ; then
11240       { echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
11241 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6; }
11242 if test "${ac_cv_ld_static+set}" = set; then
11243   echo $ECHO_N "(cached) $ECHO_C" >&6
11244 else
11245   ac_save_LDFLAGS="$LDFLAGS"
11246                       LDFLAGS="$LDFLAGS -static"
11247                       cat >conftest.$ac_ext <<_ACEOF
11248 /* confdefs.h.  */
11249 _ACEOF
11250 cat confdefs.h >>conftest.$ac_ext
11251 cat >>conftest.$ac_ext <<_ACEOF
11252 /* end confdefs.h.  */
11253
11254 int
11255 main ()
11256 {
11257
11258   ;
11259   return 0;
11260 }
11261 _ACEOF
11262 rm -f conftest.$ac_objext conftest$ac_exeext
11263 if { (ac_try="$ac_link"
11264 case "(($ac_try" in
11265   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11266   *) ac_try_echo=$ac_try;;
11267 esac
11268 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11269   (eval "$ac_link") 2>conftest.er1
11270   ac_status=$?
11271   grep -v '^ *+' conftest.er1 >conftest.err
11272   rm -f conftest.er1
11273   cat conftest.err >&5
11274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11275   (exit $ac_status); } &&
11276          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11277   { (case "(($ac_try" in
11278   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11279   *) ac_try_echo=$ac_try;;
11280 esac
11281 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11282   (eval "$ac_try") 2>&5
11283   ac_status=$?
11284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11285   (exit $ac_status); }; } &&
11286          { ac_try='test -s conftest$ac_exeext'
11287   { (case "(($ac_try" in
11288   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11289   *) ac_try_echo=$ac_try;;
11290 esac
11291 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11292   (eval "$ac_try") 2>&5
11293   ac_status=$?
11294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11295   (exit $ac_status); }; }; then
11296   ac_cv_ld_static=yes
11297 else
11298   echo "$as_me: failed program was:" >&5
11299 sed 's/^/| /' conftest.$ac_ext >&5
11300
11301         ac_cv_ld_static=no
11302 fi
11303
11304 rm -f core conftest.err conftest.$ac_objext \
11305       conftest$ac_exeext conftest.$ac_ext
11306                     LDFLAGS="$ac_save_LDFLAGS"
11307 fi
11308 { echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
11309 echo "${ECHO_T}$ac_cv_ld_static" >&6; }
11310       if test "$ac_cv_ld_static" = yes ; then
11311         LDFLAGS="$LDFLAGS -static"
11312       else
11313         LDFLAGS="$LDFLAGS -Bstatic"
11314       fi
11315     fi
11316     ;;
11317   esac
11318 fi
11319
11320
11321 ###############################################################################
11322 #
11323 #       Handle the --with-hackdir option
11324 #
11325 ###############################################################################
11326
11327 have_hackdir=yes
11328 with_hackdir_req=unspecified
11329
11330 # Check whether --with-hackdir was given.
11331 if test "${with_hackdir+set}" = set; then
11332   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
11333 else
11334   with_hackdir=yes
11335 fi
11336
11337
11338 if test x"$with_hackdir" = xyes; then
11339   HACKDIR='${libexecdir}/xscreensaver'
11340 elif test x"$with_hackdir" = xno; then
11341   HACKDIR='${bindir}'
11342 else
11343   HACKDIR=$with_hackdir
11344 fi
11345
11346 # canonicalize slashes.
11347 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
11348
11349 # Expand HACKDIR as HACKDIR_FULL
11350 eval HACKDIR_FULL=${HACKDIR}
11351 eval HACKDIR_FULL=${HACKDIR_FULL}
11352 eval HACKDIR_FULL=${HACKDIR_FULL}
11353
11354 # This option used to be called --enable-subdir; make sure that is no longer
11355 # used, since configure brain-damagedly ignores unknown --enable options.
11356
11357 obsolete_enable=
11358 # Check whether --enable-subdir was given.
11359 if test "${enable_subdir+set}" = set; then
11360   enableval=$enable_subdir; obsolete_enable=yes
11361 fi
11362
11363 if test -n "$obsolete_enable"; then
11364   echo "error: the --enable-subdir option has been replaced with"
11365   echo "       the new --with-hackdir option; see \`configure --help'"
11366   echo "       for more information."
11367   exit 1
11368 fi
11369
11370
11371 ###############################################################################
11372 #
11373 #       Handle the --with-configdir option
11374 #       Help for --with-x-app-defaults option added..
11375 #
11376 ###############################################################################
11377
11378 have_configdir=yes
11379 with_configdir_req=unspecified
11380
11381 # Check whether --with-configdir was given.
11382 if test "${with_configdir+set}" = set; then
11383   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
11384 else
11385   with_configdir=yes
11386 fi
11387
11388
11389 if test x"$with_configdir" = xyes; then
11390   HACK_CONF_DIR='${datadir}/xscreensaver/config'
11391 elif test x"$with_configdir" = xno; then
11392   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
11393   exit 1
11394 else
11395   # there must be a better way than this...
11396   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
11397     # absolute path
11398     HACK_CONF_DIR=$with_configdir
11399   else
11400     # relative path
11401     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
11402   fi
11403 fi
11404
11405
11406
11407
11408 ###############################################################################
11409 #
11410 #       Check for the SGI SCREEN_SAVER server extension.
11411 #
11412 ###############################################################################
11413
11414 have_sgi=no
11415 with_sgi_req=unspecified
11416
11417 # Check whether --with-sgi-ext was given.
11418 if test "${with_sgi_ext+set}" = set; then
11419   withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
11420 else
11421   with_sgi=yes
11422 fi
11423
11424
11425
11426    case "$with_sgi" in
11427     yes) ;;
11428     no)  ;;
11429
11430     /*)
11431      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
11432 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6; }
11433      d=$with_sgi/include
11434      if test -d $d; then
11435        X_CFLAGS="-I$d $X_CFLAGS"
11436        { echo "$as_me:$LINENO: result: $d" >&5
11437 echo "${ECHO_T}$d" >&6; }
11438      else
11439        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11440 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11441      fi
11442
11443      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
11444 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6; }
11445      d=$with_sgi/lib
11446      if test -d $d; then
11447        X_LIBS="-L$d $X_LIBS"
11448        { echo "$as_me:$LINENO: result: $d" >&5
11449 echo "${ECHO_T}$d" >&6; }
11450      else
11451        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11452 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11453      fi
11454
11455      # replace the directory string with "yes".
11456      with_sgi_req="yes"
11457      with_sgi=$with_sgi_req
11458      ;;
11459
11460     *)
11461      echo ""
11462      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
11463      echo "       If it is a directory, then \`DIR/include' will be added to"
11464      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11465      exit 1
11466      ;;
11467    esac
11468
11469
11470 if test "$with_sgi" = yes; then
11471
11472   ac_save_CPPFLAGS="$CPPFLAGS"
11473   if test \! -z "$includedir" ; then
11474     CPPFLAGS="$CPPFLAGS -I$includedir"
11475   fi
11476   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11477   { echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
11478 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6; }
11479 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
11480   echo $ECHO_N "(cached) $ECHO_C" >&6
11481 else
11482   cat >conftest.$ac_ext <<_ACEOF
11483 /* confdefs.h.  */
11484 _ACEOF
11485 cat confdefs.h >>conftest.$ac_ext
11486 cat >>conftest.$ac_ext <<_ACEOF
11487 /* end confdefs.h.  */
11488 #include <X11/Xlib.h>
11489
11490 #include <X11/extensions/XScreenSaver.h>
11491 _ACEOF
11492 rm -f conftest.$ac_objext
11493 if { (ac_try="$ac_compile"
11494 case "(($ac_try" in
11495   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11496   *) ac_try_echo=$ac_try;;
11497 esac
11498 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11499   (eval "$ac_compile") 2>conftest.er1
11500   ac_status=$?
11501   grep -v '^ *+' conftest.er1 >conftest.err
11502   rm -f conftest.er1
11503   cat conftest.err >&5
11504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11505   (exit $ac_status); } &&
11506          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11507   { (case "(($ac_try" in
11508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11509   *) ac_try_echo=$ac_try;;
11510 esac
11511 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11512   (eval "$ac_try") 2>&5
11513   ac_status=$?
11514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11515   (exit $ac_status); }; } &&
11516          { ac_try='test -s conftest.$ac_objext'
11517   { (case "(($ac_try" in
11518   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11519   *) ac_try_echo=$ac_try;;
11520 esac
11521 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11522   (eval "$ac_try") 2>&5
11523   ac_status=$?
11524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11525   (exit $ac_status); }; }; then
11526   ac_cv_header_X11_extensions_XScreenSaver_h=yes
11527 else
11528   echo "$as_me: failed program was:" >&5
11529 sed 's/^/| /' conftest.$ac_ext >&5
11530
11531         ac_cv_header_X11_extensions_XScreenSaver_h=no
11532 fi
11533
11534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11535 fi
11536 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
11537 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6; }
11538 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
11539   have_sgi=yes
11540                      cat >>confdefs.h <<\_ACEOF
11541 #define HAVE_SGI_SAVER_EXTENSION 1
11542 _ACEOF
11543
11544 fi
11545
11546
11547   CPPFLAGS="$ac_save_CPPFLAGS"
11548
11549 elif test "$with_sgi" != no; then
11550   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
11551   exit 1
11552 fi
11553
11554
11555 ###############################################################################
11556 #
11557 #       Check for the XIDLE server extension.
11558 #
11559 ###############################################################################
11560
11561 have_xidle=no
11562 with_xidle_req=unspecified
11563
11564 # Check whether --with-xidle-ext was given.
11565 if test "${with_xidle_ext+set}" = set; then
11566   withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
11567 else
11568   with_xidle=yes
11569 fi
11570
11571
11572
11573    case "$with_xidle" in
11574     yes) ;;
11575     no)  ;;
11576
11577     /*)
11578      { echo "$as_me:$LINENO: checking for XIDLE headers" >&5
11579 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6; }
11580      d=$with_xidle/include
11581      if test -d $d; then
11582        X_CFLAGS="-I$d $X_CFLAGS"
11583        { echo "$as_me:$LINENO: result: $d" >&5
11584 echo "${ECHO_T}$d" >&6; }
11585      else
11586        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11587 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11588      fi
11589
11590      { echo "$as_me:$LINENO: checking for XIDLE libs" >&5
11591 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6; }
11592      d=$with_xidle/lib
11593      if test -d $d; then
11594        X_LIBS="-L$d $X_LIBS"
11595        { echo "$as_me:$LINENO: result: $d" >&5
11596 echo "${ECHO_T}$d" >&6; }
11597      else
11598        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11599 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11600      fi
11601
11602      # replace the directory string with "yes".
11603      with_xidle_req="yes"
11604      with_xidle=$with_xidle_req
11605      ;;
11606
11607     *)
11608      echo ""
11609      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
11610      echo "       If it is a directory, then \`DIR/include' will be added to"
11611      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11612      exit 1
11613      ;;
11614    esac
11615
11616
11617 if test "$with_xidle" = yes; then
11618
11619   ac_save_CPPFLAGS="$CPPFLAGS"
11620   if test \! -z "$includedir" ; then
11621     CPPFLAGS="$CPPFLAGS -I$includedir"
11622   fi
11623   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11624   { echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
11625 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6; }
11626 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
11627   echo $ECHO_N "(cached) $ECHO_C" >&6
11628 else
11629   cat >conftest.$ac_ext <<_ACEOF
11630 /* confdefs.h.  */
11631 _ACEOF
11632 cat confdefs.h >>conftest.$ac_ext
11633 cat >>conftest.$ac_ext <<_ACEOF
11634 /* end confdefs.h.  */
11635 #include <X11/Xlib.h>
11636
11637 #include <X11/extensions/xidle.h>
11638 _ACEOF
11639 rm -f conftest.$ac_objext
11640 if { (ac_try="$ac_compile"
11641 case "(($ac_try" in
11642   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11643   *) ac_try_echo=$ac_try;;
11644 esac
11645 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11646   (eval "$ac_compile") 2>conftest.er1
11647   ac_status=$?
11648   grep -v '^ *+' conftest.er1 >conftest.err
11649   rm -f conftest.er1
11650   cat conftest.err >&5
11651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11652   (exit $ac_status); } &&
11653          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11654   { (case "(($ac_try" in
11655   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11656   *) ac_try_echo=$ac_try;;
11657 esac
11658 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11659   (eval "$ac_try") 2>&5
11660   ac_status=$?
11661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11662   (exit $ac_status); }; } &&
11663          { ac_try='test -s conftest.$ac_objext'
11664   { (case "(($ac_try" in
11665   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11666   *) ac_try_echo=$ac_try;;
11667 esac
11668 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11669   (eval "$ac_try") 2>&5
11670   ac_status=$?
11671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11672   (exit $ac_status); }; }; then
11673   ac_cv_header_X11_extensions_xidle_h=yes
11674 else
11675   echo "$as_me: failed program was:" >&5
11676 sed 's/^/| /' conftest.$ac_ext >&5
11677
11678         ac_cv_header_X11_extensions_xidle_h=no
11679 fi
11680
11681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11682 fi
11683 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
11684 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6; }
11685 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
11686   have_xidle=yes
11687                      cat >>confdefs.h <<\_ACEOF
11688 #define HAVE_XIDLE_EXTENSION 1
11689 _ACEOF
11690
11691 fi
11692
11693
11694   CPPFLAGS="$ac_save_CPPFLAGS"
11695 elif test "$with_xidle" != no; then
11696   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
11697   exit 1
11698 fi
11699
11700
11701 ###############################################################################
11702 #
11703 #       Check for the SGI-VIDEO-CONTROL server extension.
11704 #
11705 ###############################################################################
11706
11707 have_sgivc=no
11708 with_sgivc_req=unspecified
11709
11710 # Check whether --with-sgivc-ext was given.
11711 if test "${with_sgivc_ext+set}" = set; then
11712   withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
11713 else
11714   with_sgivc=yes
11715 fi
11716
11717
11718
11719    case "$with_sgivc" in
11720     yes) ;;
11721     no)  ;;
11722
11723     /*)
11724      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
11725 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6; }
11726      d=$with_sgivc/include
11727      if test -d $d; then
11728        X_CFLAGS="-I$d $X_CFLAGS"
11729        { echo "$as_me:$LINENO: result: $d" >&5
11730 echo "${ECHO_T}$d" >&6; }
11731      else
11732        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11733 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11734      fi
11735
11736      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
11737 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6; }
11738      d=$with_sgivc/lib
11739      if test -d $d; then
11740        X_LIBS="-L$d $X_LIBS"
11741        { echo "$as_me:$LINENO: result: $d" >&5
11742 echo "${ECHO_T}$d" >&6; }
11743      else
11744        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11745 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11746      fi
11747
11748      # replace the directory string with "yes".
11749      with_sgivc_req="yes"
11750      with_sgivc=$with_sgivc_req
11751      ;;
11752
11753     *)
11754      echo ""
11755      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
11756      echo "       If it is a directory, then \`DIR/include' will be added to"
11757      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11758      exit 1
11759      ;;
11760    esac
11761
11762
11763 if test "$with_sgivc" = yes; then
11764
11765   # first check for XSGIvc.h
11766
11767   ac_save_CPPFLAGS="$CPPFLAGS"
11768   if test \! -z "$includedir" ; then
11769     CPPFLAGS="$CPPFLAGS -I$includedir"
11770   fi
11771   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11772   { echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
11773 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6; }
11774 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
11775   echo $ECHO_N "(cached) $ECHO_C" >&6
11776 else
11777   cat >conftest.$ac_ext <<_ACEOF
11778 /* confdefs.h.  */
11779 _ACEOF
11780 cat confdefs.h >>conftest.$ac_ext
11781 cat >>conftest.$ac_ext <<_ACEOF
11782 /* end confdefs.h.  */
11783 #include <X11/Xlib.h>
11784
11785 #include <X11/extensions/XSGIvc.h>
11786 _ACEOF
11787 rm -f conftest.$ac_objext
11788 if { (ac_try="$ac_compile"
11789 case "(($ac_try" in
11790   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11791   *) ac_try_echo=$ac_try;;
11792 esac
11793 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11794   (eval "$ac_compile") 2>conftest.er1
11795   ac_status=$?
11796   grep -v '^ *+' conftest.er1 >conftest.err
11797   rm -f conftest.er1
11798   cat conftest.err >&5
11799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11800   (exit $ac_status); } &&
11801          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11802   { (case "(($ac_try" in
11803   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11804   *) ac_try_echo=$ac_try;;
11805 esac
11806 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11807   (eval "$ac_try") 2>&5
11808   ac_status=$?
11809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11810   (exit $ac_status); }; } &&
11811          { ac_try='test -s conftest.$ac_objext'
11812   { (case "(($ac_try" in
11813   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11814   *) ac_try_echo=$ac_try;;
11815 esac
11816 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11817   (eval "$ac_try") 2>&5
11818   ac_status=$?
11819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11820   (exit $ac_status); }; }; then
11821   ac_cv_header_X11_extensions_XSGIvc_h=yes
11822 else
11823   echo "$as_me: failed program was:" >&5
11824 sed 's/^/| /' conftest.$ac_ext >&5
11825
11826         ac_cv_header_X11_extensions_XSGIvc_h=no
11827 fi
11828
11829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11830 fi
11831 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
11832 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6; }
11833 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
11834   have_sgivc=yes
11835 fi
11836
11837
11838   CPPFLAGS="$ac_save_CPPFLAGS"
11839
11840   # if that succeeded, then check for the -lXsgivc
11841   if test "$have_sgivc" = yes; then
11842     have_sgivc=no
11843
11844   ac_save_CPPFLAGS="$CPPFLAGS"
11845   ac_save_LDFLAGS="$LDFLAGS"
11846 #  ac_save_LIBS="$LIBS"
11847
11848   if test \! -z "$includedir" ; then
11849     CPPFLAGS="$CPPFLAGS -I$includedir"
11850   fi
11851   # note: $X_CFLAGS includes $x_includes
11852   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11853
11854   if test \! -z "$libdir" ; then
11855     LDFLAGS="$LDFLAGS -L$libdir"
11856   fi
11857   # note: $X_LIBS includes $x_libraries
11858   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11859
11860   { echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
11861 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6; }
11862 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
11863   echo $ECHO_N "(cached) $ECHO_C" >&6
11864 else
11865   ac_check_lib_save_LIBS=$LIBS
11866 LIBS="-lXsgivc -lXext -lX11 $LIBS"
11867 cat >conftest.$ac_ext <<_ACEOF
11868 /* confdefs.h.  */
11869 _ACEOF
11870 cat confdefs.h >>conftest.$ac_ext
11871 cat >>conftest.$ac_ext <<_ACEOF
11872 /* end confdefs.h.  */
11873
11874 /* Override any GCC internal prototype to avoid an error.
11875    Use char because int might match the return type of a GCC
11876    builtin and then its argument prototype would still apply.  */
11877 #ifdef __cplusplus
11878 extern "C"
11879 #endif
11880 char XSGIvcQueryGammaMap ();
11881 int
11882 main ()
11883 {
11884 return XSGIvcQueryGammaMap ();
11885   ;
11886   return 0;
11887 }
11888 _ACEOF
11889 rm -f conftest.$ac_objext conftest$ac_exeext
11890 if { (ac_try="$ac_link"
11891 case "(($ac_try" in
11892   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11893   *) ac_try_echo=$ac_try;;
11894 esac
11895 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11896   (eval "$ac_link") 2>conftest.er1
11897   ac_status=$?
11898   grep -v '^ *+' conftest.er1 >conftest.err
11899   rm -f conftest.er1
11900   cat conftest.err >&5
11901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11902   (exit $ac_status); } &&
11903          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11904   { (case "(($ac_try" in
11905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11906   *) ac_try_echo=$ac_try;;
11907 esac
11908 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11909   (eval "$ac_try") 2>&5
11910   ac_status=$?
11911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11912   (exit $ac_status); }; } &&
11913          { ac_try='test -s conftest$ac_exeext'
11914   { (case "(($ac_try" in
11915   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11916   *) ac_try_echo=$ac_try;;
11917 esac
11918 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11919   (eval "$ac_try") 2>&5
11920   ac_status=$?
11921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11922   (exit $ac_status); }; }; then
11923   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
11924 else
11925   echo "$as_me: failed program was:" >&5
11926 sed 's/^/| /' conftest.$ac_ext >&5
11927
11928         ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
11929 fi
11930
11931 rm -f core conftest.err conftest.$ac_objext \
11932       conftest$ac_exeext conftest.$ac_ext
11933 LIBS=$ac_check_lib_save_LIBS
11934 fi
11935 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
11936 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
11937 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
11938   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
11939 else
11940   true
11941 fi
11942
11943   CPPFLAGS="$ac_save_CPPFLAGS"
11944   LDFLAGS="$ac_save_LDFLAGS"
11945 #  LIBS="$ac_save_LIBS"
11946
11947   fi
11948
11949   # if that succeeded, then we've really got it.
11950   if test "$have_sgivc" = yes; then
11951     cat >>confdefs.h <<\_ACEOF
11952 #define HAVE_SGI_VC_EXTENSION 1
11953 _ACEOF
11954
11955   fi
11956
11957 elif test "$with_sgivc" != no; then
11958   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
11959   exit 1
11960 fi
11961
11962
11963 ###############################################################################
11964 #
11965 #       Check for the DPMS server extension.
11966 #
11967 ###############################################################################
11968
11969 have_dpms=no
11970 with_dpms_req=unspecified
11971
11972 # Check whether --with-dpms-ext was given.
11973 if test "${with_dpms_ext+set}" = set; then
11974   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
11975 else
11976   with_dpms=yes
11977 fi
11978
11979
11980
11981    case "$with_dpms" in
11982     yes) ;;
11983     no)  ;;
11984
11985     /*)
11986      { echo "$as_me:$LINENO: checking for DPMS headers" >&5
11987 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6; }
11988      d=$with_dpms/include
11989      if test -d $d; then
11990        X_CFLAGS="-I$d $X_CFLAGS"
11991        { echo "$as_me:$LINENO: result: $d" >&5
11992 echo "${ECHO_T}$d" >&6; }
11993      else
11994        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11995 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11996      fi
11997
11998      { echo "$as_me:$LINENO: checking for DPMS libs" >&5
11999 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6; }
12000      d=$with_dpms/lib
12001      if test -d $d; then
12002        X_LIBS="-L$d $X_LIBS"
12003        { echo "$as_me:$LINENO: result: $d" >&5
12004 echo "${ECHO_T}$d" >&6; }
12005      else
12006        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12007 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12008      fi
12009
12010      # replace the directory string with "yes".
12011      with_dpms_req="yes"
12012      with_dpms=$with_dpms_req
12013      ;;
12014
12015     *)
12016      echo ""
12017      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
12018      echo "       If it is a directory, then \`DIR/include' will be added to"
12019      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12020      exit 1
12021      ;;
12022    esac
12023
12024
12025 if test "$with_dpms" = yes; then
12026
12027   # first check for dpms.h
12028
12029   ac_save_CPPFLAGS="$CPPFLAGS"
12030   if test \! -z "$includedir" ; then
12031     CPPFLAGS="$CPPFLAGS -I$includedir"
12032   fi
12033   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12034   { echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
12035 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6; }
12036 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
12037   echo $ECHO_N "(cached) $ECHO_C" >&6
12038 else
12039   cat >conftest.$ac_ext <<_ACEOF
12040 /* confdefs.h.  */
12041 _ACEOF
12042 cat confdefs.h >>conftest.$ac_ext
12043 cat >>conftest.$ac_ext <<_ACEOF
12044 /* end confdefs.h.  */
12045 #include <X11/Xlib.h>
12046                      #include <X11/Xmd.h>
12047
12048 #include <X11/extensions/dpms.h>
12049 _ACEOF
12050 rm -f conftest.$ac_objext
12051 if { (ac_try="$ac_compile"
12052 case "(($ac_try" in
12053   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12054   *) ac_try_echo=$ac_try;;
12055 esac
12056 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12057   (eval "$ac_compile") 2>conftest.er1
12058   ac_status=$?
12059   grep -v '^ *+' conftest.er1 >conftest.err
12060   rm -f conftest.er1
12061   cat conftest.err >&5
12062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12063   (exit $ac_status); } &&
12064          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12065   { (case "(($ac_try" in
12066   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12067   *) ac_try_echo=$ac_try;;
12068 esac
12069 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12070   (eval "$ac_try") 2>&5
12071   ac_status=$?
12072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12073   (exit $ac_status); }; } &&
12074          { ac_try='test -s conftest.$ac_objext'
12075   { (case "(($ac_try" in
12076   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12077   *) ac_try_echo=$ac_try;;
12078 esac
12079 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12080   (eval "$ac_try") 2>&5
12081   ac_status=$?
12082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12083   (exit $ac_status); }; }; then
12084   ac_cv_header_X11_extensions_dpms_h=yes
12085 else
12086   echo "$as_me: failed program was:" >&5
12087 sed 's/^/| /' conftest.$ac_ext >&5
12088
12089         ac_cv_header_X11_extensions_dpms_h=no
12090 fi
12091
12092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12093 fi
12094 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
12095 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6; }
12096 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
12097   have_dpms=yes
12098 fi
12099
12100
12101   CPPFLAGS="$ac_save_CPPFLAGS"
12102
12103   # if that succeeded, then check for the DPMS code in the libraries
12104   if test "$have_dpms" = yes; then
12105
12106     # first look in -lXext (this is where it is with XFree86 4.0)
12107     have_dpms=no
12108
12109   ac_save_CPPFLAGS="$CPPFLAGS"
12110   ac_save_LDFLAGS="$LDFLAGS"
12111 #  ac_save_LIBS="$LIBS"
12112
12113   if test \! -z "$includedir" ; then
12114     CPPFLAGS="$CPPFLAGS -I$includedir"
12115   fi
12116   # note: $X_CFLAGS includes $x_includes
12117   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12118
12119   if test \! -z "$libdir" ; then
12120     LDFLAGS="$LDFLAGS -L$libdir"
12121   fi
12122   # note: $X_LIBS includes $x_libraries
12123   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12124
12125   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
12126 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6; }
12127 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
12128   echo $ECHO_N "(cached) $ECHO_C" >&6
12129 else
12130   ac_check_lib_save_LIBS=$LIBS
12131 LIBS="-lXext -lXext -lX11 $LIBS"
12132 cat >conftest.$ac_ext <<_ACEOF
12133 /* confdefs.h.  */
12134 _ACEOF
12135 cat confdefs.h >>conftest.$ac_ext
12136 cat >>conftest.$ac_ext <<_ACEOF
12137 /* end confdefs.h.  */
12138
12139 /* Override any GCC internal prototype to avoid an error.
12140    Use char because int might match the return type of a GCC
12141    builtin and then its argument prototype would still apply.  */
12142 #ifdef __cplusplus
12143 extern "C"
12144 #endif
12145 char DPMSInfo ();
12146 int
12147 main ()
12148 {
12149 return DPMSInfo ();
12150   ;
12151   return 0;
12152 }
12153 _ACEOF
12154 rm -f conftest.$ac_objext conftest$ac_exeext
12155 if { (ac_try="$ac_link"
12156 case "(($ac_try" in
12157   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12158   *) ac_try_echo=$ac_try;;
12159 esac
12160 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12161   (eval "$ac_link") 2>conftest.er1
12162   ac_status=$?
12163   grep -v '^ *+' conftest.er1 >conftest.err
12164   rm -f conftest.er1
12165   cat conftest.err >&5
12166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12167   (exit $ac_status); } &&
12168          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12169   { (case "(($ac_try" in
12170   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12171   *) ac_try_echo=$ac_try;;
12172 esac
12173 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12174   (eval "$ac_try") 2>&5
12175   ac_status=$?
12176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12177   (exit $ac_status); }; } &&
12178          { ac_try='test -s conftest$ac_exeext'
12179   { (case "(($ac_try" in
12180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12181   *) ac_try_echo=$ac_try;;
12182 esac
12183 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12184   (eval "$ac_try") 2>&5
12185   ac_status=$?
12186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12187   (exit $ac_status); }; }; then
12188   ac_cv_lib_Xext_DPMSInfo=yes
12189 else
12190   echo "$as_me: failed program was:" >&5
12191 sed 's/^/| /' conftest.$ac_ext >&5
12192
12193         ac_cv_lib_Xext_DPMSInfo=no
12194 fi
12195
12196 rm -f core conftest.err conftest.$ac_objext \
12197       conftest$ac_exeext conftest.$ac_ext
12198 LIBS=$ac_check_lib_save_LIBS
12199 fi
12200 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
12201 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6; }
12202 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
12203   have_dpms=yes
12204 else
12205   true
12206 fi
12207
12208   CPPFLAGS="$ac_save_CPPFLAGS"
12209   LDFLAGS="$ac_save_LDFLAGS"
12210 #  LIBS="$ac_save_LIBS"
12211
12212
12213     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
12214     if test "$have_dpms" = no; then
12215
12216   ac_save_CPPFLAGS="$CPPFLAGS"
12217   ac_save_LDFLAGS="$LDFLAGS"
12218 #  ac_save_LIBS="$LIBS"
12219
12220   if test \! -z "$includedir" ; then
12221     CPPFLAGS="$CPPFLAGS -I$includedir"
12222   fi
12223   # note: $X_CFLAGS includes $x_includes
12224   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12225
12226   if test \! -z "$libdir" ; then
12227     LDFLAGS="$LDFLAGS -L$libdir"
12228   fi
12229   # note: $X_LIBS includes $x_libraries
12230   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12231
12232   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
12233 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6; }
12234 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
12235   echo $ECHO_N "(cached) $ECHO_C" >&6
12236 else
12237   ac_check_lib_save_LIBS=$LIBS
12238 LIBS="-lXdpms -lXext -lX11 $LIBS"
12239 cat >conftest.$ac_ext <<_ACEOF
12240 /* confdefs.h.  */
12241 _ACEOF
12242 cat confdefs.h >>conftest.$ac_ext
12243 cat >>conftest.$ac_ext <<_ACEOF
12244 /* end confdefs.h.  */
12245
12246 /* Override any GCC internal prototype to avoid an error.
12247    Use char because int might match the return type of a GCC
12248    builtin and then its argument prototype would still apply.  */
12249 #ifdef __cplusplus
12250 extern "C"
12251 #endif
12252 char DPMSInfo ();
12253 int
12254 main ()
12255 {
12256 return DPMSInfo ();
12257   ;
12258   return 0;
12259 }
12260 _ACEOF
12261 rm -f conftest.$ac_objext conftest$ac_exeext
12262 if { (ac_try="$ac_link"
12263 case "(($ac_try" in
12264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12265   *) ac_try_echo=$ac_try;;
12266 esac
12267 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12268   (eval "$ac_link") 2>conftest.er1
12269   ac_status=$?
12270   grep -v '^ *+' conftest.er1 >conftest.err
12271   rm -f conftest.er1
12272   cat conftest.err >&5
12273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12274   (exit $ac_status); } &&
12275          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12276   { (case "(($ac_try" in
12277   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12278   *) ac_try_echo=$ac_try;;
12279 esac
12280 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12281   (eval "$ac_try") 2>&5
12282   ac_status=$?
12283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12284   (exit $ac_status); }; } &&
12285          { ac_try='test -s conftest$ac_exeext'
12286   { (case "(($ac_try" in
12287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12288   *) ac_try_echo=$ac_try;;
12289 esac
12290 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12291   (eval "$ac_try") 2>&5
12292   ac_status=$?
12293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12294   (exit $ac_status); }; }; then
12295   ac_cv_lib_Xdpms_DPMSInfo=yes
12296 else
12297   echo "$as_me: failed program was:" >&5
12298 sed 's/^/| /' conftest.$ac_ext >&5
12299
12300         ac_cv_lib_Xdpms_DPMSInfo=no
12301 fi
12302
12303 rm -f core conftest.err conftest.$ac_objext \
12304       conftest$ac_exeext conftest.$ac_ext
12305 LIBS=$ac_check_lib_save_LIBS
12306 fi
12307 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
12308 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
12309 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
12310   have_dpms=yes; XDPMS_LIBS="-lXdpms"
12311 else
12312   true
12313 fi
12314
12315   CPPFLAGS="$ac_save_CPPFLAGS"
12316   LDFLAGS="$ac_save_LDFLAGS"
12317 #  LIBS="$ac_save_LIBS"
12318
12319     fi
12320   fi
12321
12322
12323   # if that succeeded, then we've really got it.
12324   if test "$have_dpms" = yes; then
12325     cat >>confdefs.h <<\_ACEOF
12326 #define HAVE_DPMS_EXTENSION 1
12327 _ACEOF
12328
12329   fi
12330
12331 elif test "$with_dpms" != no; then
12332   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
12333   exit 1
12334 fi
12335
12336
12337 ###############################################################################
12338 #
12339 #       Check for the XINERAMA server extension.
12340 #
12341 ###############################################################################
12342
12343 have_xinerama=no
12344 with_xinerama_req=unspecified
12345
12346 # Check whether --with-xinerama-ext was given.
12347 if test "${with_xinerama_ext+set}" = set; then
12348   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
12349 else
12350   with_xinerama=yes
12351 fi
12352
12353
12354
12355    case "$with_xinerama" in
12356     yes) ;;
12357     no)  ;;
12358
12359     /*)
12360      { echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
12361 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6; }
12362      d=$with_xinerama/include
12363      if test -d $d; then
12364        X_CFLAGS="-I$d $X_CFLAGS"
12365        { echo "$as_me:$LINENO: result: $d" >&5
12366 echo "${ECHO_T}$d" >&6; }
12367      else
12368        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12369 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12370      fi
12371
12372      { echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
12373 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6; }
12374      d=$with_xinerama/lib
12375      if test -d $d; then
12376        X_LIBS="-L$d $X_LIBS"
12377        { echo "$as_me:$LINENO: result: $d" >&5
12378 echo "${ECHO_T}$d" >&6; }
12379      else
12380        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12381 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12382      fi
12383
12384      # replace the directory string with "yes".
12385      with_xinerama_req="yes"
12386      with_xinerama=$with_xinerama_req
12387      ;;
12388
12389     *)
12390      echo ""
12391      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
12392      echo "       If it is a directory, then \`DIR/include' will be added to"
12393      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12394      exit 1
12395      ;;
12396    esac
12397
12398
12399 if test "$with_xinerama" = yes; then
12400
12401   # first check for Xinerama.h
12402
12403   ac_save_CPPFLAGS="$CPPFLAGS"
12404   if test \! -z "$includedir" ; then
12405     CPPFLAGS="$CPPFLAGS -I$includedir"
12406   fi
12407   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12408   { echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
12409 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
12410 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
12411   echo $ECHO_N "(cached) $ECHO_C" >&6
12412 else
12413   cat >conftest.$ac_ext <<_ACEOF
12414 /* confdefs.h.  */
12415 _ACEOF
12416 cat confdefs.h >>conftest.$ac_ext
12417 cat >>conftest.$ac_ext <<_ACEOF
12418 /* end confdefs.h.  */
12419 #include <X11/Xlib.h>
12420
12421 #include <X11/extensions/Xinerama.h>
12422 _ACEOF
12423 rm -f conftest.$ac_objext
12424 if { (ac_try="$ac_compile"
12425 case "(($ac_try" in
12426   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12427   *) ac_try_echo=$ac_try;;
12428 esac
12429 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12430   (eval "$ac_compile") 2>conftest.er1
12431   ac_status=$?
12432   grep -v '^ *+' conftest.er1 >conftest.err
12433   rm -f conftest.er1
12434   cat conftest.err >&5
12435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12436   (exit $ac_status); } &&
12437          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12438   { (case "(($ac_try" in
12439   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12440   *) ac_try_echo=$ac_try;;
12441 esac
12442 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12443   (eval "$ac_try") 2>&5
12444   ac_status=$?
12445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12446   (exit $ac_status); }; } &&
12447          { ac_try='test -s conftest.$ac_objext'
12448   { (case "(($ac_try" in
12449   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12450   *) ac_try_echo=$ac_try;;
12451 esac
12452 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12453   (eval "$ac_try") 2>&5
12454   ac_status=$?
12455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12456   (exit $ac_status); }; }; then
12457   ac_cv_header_X11_extensions_Xinerama_h=yes
12458 else
12459   echo "$as_me: failed program was:" >&5
12460 sed 's/^/| /' conftest.$ac_ext >&5
12461
12462         ac_cv_header_X11_extensions_Xinerama_h=no
12463 fi
12464
12465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12466 fi
12467 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
12468 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
12469 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
12470   have_xinerama=yes
12471 fi
12472
12473
12474   CPPFLAGS="$ac_save_CPPFLAGS"
12475
12476   # if that succeeded, then check for the XINERAMA code in the libraries
12477   if test "$have_xinerama" = yes; then
12478
12479     # first look in -lXext
12480     have_xinerama=no
12481
12482   ac_save_CPPFLAGS="$CPPFLAGS"
12483   ac_save_LDFLAGS="$LDFLAGS"
12484 #  ac_save_LIBS="$LIBS"
12485
12486   if test \! -z "$includedir" ; then
12487     CPPFLAGS="$CPPFLAGS -I$includedir"
12488   fi
12489   # note: $X_CFLAGS includes $x_includes
12490   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12491
12492   if test \! -z "$libdir" ; then
12493     LDFLAGS="$LDFLAGS -L$libdir"
12494   fi
12495   # note: $X_LIBS includes $x_libraries
12496   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12497
12498   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
12499 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6; }
12500 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
12501   echo $ECHO_N "(cached) $ECHO_C" >&6
12502 else
12503   ac_check_lib_save_LIBS=$LIBS
12504 LIBS="-lXext -lXext -lX11 $LIBS"
12505 cat >conftest.$ac_ext <<_ACEOF
12506 /* confdefs.h.  */
12507 _ACEOF
12508 cat confdefs.h >>conftest.$ac_ext
12509 cat >>conftest.$ac_ext <<_ACEOF
12510 /* end confdefs.h.  */
12511
12512 /* Override any GCC internal prototype to avoid an error.
12513    Use char because int might match the return type of a GCC
12514    builtin and then its argument prototype would still apply.  */
12515 #ifdef __cplusplus
12516 extern "C"
12517 #endif
12518 char XineramaQueryScreens ();
12519 int
12520 main ()
12521 {
12522 return XineramaQueryScreens ();
12523   ;
12524   return 0;
12525 }
12526 _ACEOF
12527 rm -f conftest.$ac_objext conftest$ac_exeext
12528 if { (ac_try="$ac_link"
12529 case "(($ac_try" in
12530   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12531   *) ac_try_echo=$ac_try;;
12532 esac
12533 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12534   (eval "$ac_link") 2>conftest.er1
12535   ac_status=$?
12536   grep -v '^ *+' conftest.er1 >conftest.err
12537   rm -f conftest.er1
12538   cat conftest.err >&5
12539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12540   (exit $ac_status); } &&
12541          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12542   { (case "(($ac_try" in
12543   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12544   *) ac_try_echo=$ac_try;;
12545 esac
12546 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12547   (eval "$ac_try") 2>&5
12548   ac_status=$?
12549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12550   (exit $ac_status); }; } &&
12551          { ac_try='test -s conftest$ac_exeext'
12552   { (case "(($ac_try" in
12553   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12554   *) ac_try_echo=$ac_try;;
12555 esac
12556 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12557   (eval "$ac_try") 2>&5
12558   ac_status=$?
12559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12560   (exit $ac_status); }; }; then
12561   ac_cv_lib_Xext_XineramaQueryScreens=yes
12562 else
12563   echo "$as_me: failed program was:" >&5
12564 sed 's/^/| /' conftest.$ac_ext >&5
12565
12566         ac_cv_lib_Xext_XineramaQueryScreens=no
12567 fi
12568
12569 rm -f core conftest.err conftest.$ac_objext \
12570       conftest$ac_exeext conftest.$ac_ext
12571 LIBS=$ac_check_lib_save_LIBS
12572 fi
12573 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
12574 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
12575 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
12576   have_xinerama=yes
12577 else
12578   true
12579 fi
12580
12581   CPPFLAGS="$ac_save_CPPFLAGS"
12582   LDFLAGS="$ac_save_LDFLAGS"
12583 #  LIBS="$ac_save_LIBS"
12584
12585
12586     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
12587     if test "$have_xinerama" = no; then
12588
12589   ac_save_CPPFLAGS="$CPPFLAGS"
12590   ac_save_LDFLAGS="$LDFLAGS"
12591 #  ac_save_LIBS="$LIBS"
12592
12593   if test \! -z "$includedir" ; then
12594     CPPFLAGS="$CPPFLAGS -I$includedir"
12595   fi
12596   # note: $X_CFLAGS includes $x_includes
12597   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12598
12599   if test \! -z "$libdir" ; then
12600     LDFLAGS="$LDFLAGS -L$libdir"
12601   fi
12602   # note: $X_LIBS includes $x_libraries
12603   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12604
12605   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
12606 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6; }
12607 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
12608   echo $ECHO_N "(cached) $ECHO_C" >&6
12609 else
12610   ac_check_lib_save_LIBS=$LIBS
12611 LIBS="-lXinerama -lXext -lX11 $LIBS"
12612 cat >conftest.$ac_ext <<_ACEOF
12613 /* confdefs.h.  */
12614 _ACEOF
12615 cat confdefs.h >>conftest.$ac_ext
12616 cat >>conftest.$ac_ext <<_ACEOF
12617 /* end confdefs.h.  */
12618
12619 /* Override any GCC internal prototype to avoid an error.
12620    Use char because int might match the return type of a GCC
12621    builtin and then its argument prototype would still apply.  */
12622 #ifdef __cplusplus
12623 extern "C"
12624 #endif
12625 char XineramaQueryScreens ();
12626 int
12627 main ()
12628 {
12629 return XineramaQueryScreens ();
12630   ;
12631   return 0;
12632 }
12633 _ACEOF
12634 rm -f conftest.$ac_objext conftest$ac_exeext
12635 if { (ac_try="$ac_link"
12636 case "(($ac_try" in
12637   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12638   *) ac_try_echo=$ac_try;;
12639 esac
12640 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12641   (eval "$ac_link") 2>conftest.er1
12642   ac_status=$?
12643   grep -v '^ *+' conftest.er1 >conftest.err
12644   rm -f conftest.er1
12645   cat conftest.err >&5
12646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12647   (exit $ac_status); } &&
12648          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12649   { (case "(($ac_try" in
12650   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12651   *) ac_try_echo=$ac_try;;
12652 esac
12653 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12654   (eval "$ac_try") 2>&5
12655   ac_status=$?
12656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12657   (exit $ac_status); }; } &&
12658          { ac_try='test -s conftest$ac_exeext'
12659   { (case "(($ac_try" in
12660   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12661   *) ac_try_echo=$ac_try;;
12662 esac
12663 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12664   (eval "$ac_try") 2>&5
12665   ac_status=$?
12666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12667   (exit $ac_status); }; }; then
12668   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
12669 else
12670   echo "$as_me: failed program was:" >&5
12671 sed 's/^/| /' conftest.$ac_ext >&5
12672
12673         ac_cv_lib_Xinerama_XineramaQueryScreens=no
12674 fi
12675
12676 rm -f core conftest.err conftest.$ac_objext \
12677       conftest$ac_exeext conftest.$ac_ext
12678 LIBS=$ac_check_lib_save_LIBS
12679 fi
12680 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
12681 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
12682 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
12683   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
12684 else
12685   true
12686 fi
12687
12688   CPPFLAGS="$ac_save_CPPFLAGS"
12689   LDFLAGS="$ac_save_LDFLAGS"
12690 #  LIBS="$ac_save_LIBS"
12691
12692     fi
12693   fi
12694
12695   # if that succeeded, then we've really got it.
12696   if test "$have_xinerama" = yes; then
12697     cat >>confdefs.h <<\_ACEOF
12698 #define HAVE_XINERAMA 1
12699 _ACEOF
12700
12701   fi
12702
12703 elif test "$with_xinerama" != no; then
12704   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
12705   exit 1
12706 fi
12707
12708
12709 ###############################################################################
12710 #
12711 #       Check for the XF86VMODE server extension (for virtual screens.)
12712 #
12713 ###############################################################################
12714
12715 have_xf86vmode=no
12716 with_xf86vmode_req=unspecified
12717
12718 # Check whether --with-xf86vmode-ext was given.
12719 if test "${with_xf86vmode_ext+set}" = set; then
12720   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
12721 else
12722   with_xf86vmode=yes
12723 fi
12724
12725
12726
12727    case "$with_xf86vmode" in
12728     yes) ;;
12729     no)  ;;
12730
12731     /*)
12732      { echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
12733 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6; }
12734      d=$with_xf86vmode/include
12735      if test -d $d; then
12736        X_CFLAGS="-I$d $X_CFLAGS"
12737        { echo "$as_me:$LINENO: result: $d" >&5
12738 echo "${ECHO_T}$d" >&6; }
12739      else
12740        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12741 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12742      fi
12743
12744      { echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
12745 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6; }
12746      d=$with_xf86vmode/lib
12747      if test -d $d; then
12748        X_LIBS="-L$d $X_LIBS"
12749        { echo "$as_me:$LINENO: result: $d" >&5
12750 echo "${ECHO_T}$d" >&6; }
12751      else
12752        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12753 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12754      fi
12755
12756      # replace the directory string with "yes".
12757      with_xf86vmode_req="yes"
12758      with_xf86vmode=$with_xf86vmode_req
12759      ;;
12760
12761     *)
12762      echo ""
12763      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
12764      echo "       If it is a directory, then \`DIR/include' will be added to"
12765      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12766      exit 1
12767      ;;
12768    esac
12769
12770
12771 VIDMODE_LIBS=""
12772
12773 if test "$with_xf86vmode" = yes; then
12774
12775   # first check for xf86vmode.h
12776
12777   ac_save_CPPFLAGS="$CPPFLAGS"
12778   if test \! -z "$includedir" ; then
12779     CPPFLAGS="$CPPFLAGS -I$includedir"
12780   fi
12781   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12782   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
12783 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
12784 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
12785   echo $ECHO_N "(cached) $ECHO_C" >&6
12786 else
12787   cat >conftest.$ac_ext <<_ACEOF
12788 /* confdefs.h.  */
12789 _ACEOF
12790 cat confdefs.h >>conftest.$ac_ext
12791 cat >>conftest.$ac_ext <<_ACEOF
12792 /* end confdefs.h.  */
12793 #include <X11/Xlib.h>
12794
12795 #include <X11/extensions/xf86vmode.h>
12796 _ACEOF
12797 rm -f conftest.$ac_objext
12798 if { (ac_try="$ac_compile"
12799 case "(($ac_try" in
12800   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12801   *) ac_try_echo=$ac_try;;
12802 esac
12803 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12804   (eval "$ac_compile") 2>conftest.er1
12805   ac_status=$?
12806   grep -v '^ *+' conftest.er1 >conftest.err
12807   rm -f conftest.er1
12808   cat conftest.err >&5
12809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12810   (exit $ac_status); } &&
12811          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12812   { (case "(($ac_try" in
12813   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12814   *) ac_try_echo=$ac_try;;
12815 esac
12816 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12817   (eval "$ac_try") 2>&5
12818   ac_status=$?
12819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12820   (exit $ac_status); }; } &&
12821          { ac_try='test -s conftest.$ac_objext'
12822   { (case "(($ac_try" in
12823   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12824   *) ac_try_echo=$ac_try;;
12825 esac
12826 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12827   (eval "$ac_try") 2>&5
12828   ac_status=$?
12829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12830   (exit $ac_status); }; }; then
12831   ac_cv_header_X11_extensions_xf86vmode_h=yes
12832 else
12833   echo "$as_me: failed program was:" >&5
12834 sed 's/^/| /' conftest.$ac_ext >&5
12835
12836         ac_cv_header_X11_extensions_xf86vmode_h=no
12837 fi
12838
12839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12840 fi
12841 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
12842 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
12843 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
12844   have_xf86vmode=yes
12845 fi
12846
12847
12848   CPPFLAGS="$ac_save_CPPFLAGS"
12849
12850   # if that succeeded, then check for the -lXxf86vm
12851   if test "$have_xf86vmode" = yes; then
12852     have_xf86vmode=no
12853
12854   ac_save_CPPFLAGS="$CPPFLAGS"
12855   ac_save_LDFLAGS="$LDFLAGS"
12856 #  ac_save_LIBS="$LIBS"
12857
12858   if test \! -z "$includedir" ; then
12859     CPPFLAGS="$CPPFLAGS -I$includedir"
12860   fi
12861   # note: $X_CFLAGS includes $x_includes
12862   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12863
12864   if test \! -z "$libdir" ; then
12865     LDFLAGS="$LDFLAGS -L$libdir"
12866   fi
12867   # note: $X_LIBS includes $x_libraries
12868   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12869
12870   { echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
12871 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6; }
12872 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
12873   echo $ECHO_N "(cached) $ECHO_C" >&6
12874 else
12875   ac_check_lib_save_LIBS=$LIBS
12876 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
12877 cat >conftest.$ac_ext <<_ACEOF
12878 /* confdefs.h.  */
12879 _ACEOF
12880 cat confdefs.h >>conftest.$ac_ext
12881 cat >>conftest.$ac_ext <<_ACEOF
12882 /* end confdefs.h.  */
12883
12884 /* Override any GCC internal prototype to avoid an error.
12885    Use char because int might match the return type of a GCC
12886    builtin and then its argument prototype would still apply.  */
12887 #ifdef __cplusplus
12888 extern "C"
12889 #endif
12890 char XF86VidModeGetViewPort ();
12891 int
12892 main ()
12893 {
12894 return XF86VidModeGetViewPort ();
12895   ;
12896   return 0;
12897 }
12898 _ACEOF
12899 rm -f conftest.$ac_objext conftest$ac_exeext
12900 if { (ac_try="$ac_link"
12901 case "(($ac_try" in
12902   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12903   *) ac_try_echo=$ac_try;;
12904 esac
12905 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12906   (eval "$ac_link") 2>conftest.er1
12907   ac_status=$?
12908   grep -v '^ *+' conftest.er1 >conftest.err
12909   rm -f conftest.er1
12910   cat conftest.err >&5
12911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12912   (exit $ac_status); } &&
12913          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12914   { (case "(($ac_try" in
12915   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12916   *) ac_try_echo=$ac_try;;
12917 esac
12918 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12919   (eval "$ac_try") 2>&5
12920   ac_status=$?
12921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12922   (exit $ac_status); }; } &&
12923          { ac_try='test -s conftest$ac_exeext'
12924   { (case "(($ac_try" in
12925   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12926   *) ac_try_echo=$ac_try;;
12927 esac
12928 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12929   (eval "$ac_try") 2>&5
12930   ac_status=$?
12931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12932   (exit $ac_status); }; }; then
12933   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
12934 else
12935   echo "$as_me: failed program was:" >&5
12936 sed 's/^/| /' conftest.$ac_ext >&5
12937
12938         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
12939 fi
12940
12941 rm -f core conftest.err conftest.$ac_objext \
12942       conftest$ac_exeext conftest.$ac_ext
12943 LIBS=$ac_check_lib_save_LIBS
12944 fi
12945 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
12946 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
12947 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
12948   have_xf86vmode=yes;
12949                    VIDMODE_LIBS="-lXxf86vm";
12950                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
12951 else
12952   true
12953 fi
12954
12955   CPPFLAGS="$ac_save_CPPFLAGS"
12956   LDFLAGS="$ac_save_LDFLAGS"
12957 #  LIBS="$ac_save_LIBS"
12958
12959   fi
12960
12961   # if that succeeded, then we've really got it.
12962   if test "$have_xf86vmode" = yes; then
12963     cat >>confdefs.h <<\_ACEOF
12964 #define HAVE_XF86VMODE 1
12965 _ACEOF
12966
12967   fi
12968
12969 elif test "$with_xf86vmode" != no; then
12970   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
12971   exit 1
12972 fi
12973
12974
12975 ###############################################################################
12976 #
12977 #       Check for the XF86VMODE server extension (for gamma fading.)
12978 #
12979 ###############################################################################
12980
12981 have_xf86gamma=no
12982 have_xf86gamma_ramp=no
12983 with_xf86gamma_req=unspecified
12984
12985 # Check whether --with-xf86gamma-ext was given.
12986 if test "${with_xf86gamma_ext+set}" = set; then
12987   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
12988 else
12989   with_xf86gamma=yes
12990 fi
12991
12992
12993
12994    case "$with_xf86gamma" in
12995     yes) ;;
12996     no)  ;;
12997
12998     /*)
12999      { echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
13000 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6; }
13001      d=$with_xf86gamma/include
13002      if test -d $d; then
13003        X_CFLAGS="-I$d $X_CFLAGS"
13004        { echo "$as_me:$LINENO: result: $d" >&5
13005 echo "${ECHO_T}$d" >&6; }
13006      else
13007        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13008 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13009      fi
13010
13011      { echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
13012 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6; }
13013      d=$with_xf86gamma/lib
13014      if test -d $d; then
13015        X_LIBS="-L$d $X_LIBS"
13016        { echo "$as_me:$LINENO: result: $d" >&5
13017 echo "${ECHO_T}$d" >&6; }
13018      else
13019        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13020 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13021      fi
13022
13023      # replace the directory string with "yes".
13024      with_xf86gamma_req="yes"
13025      with_xf86gamma=$with_xf86gamma_req
13026      ;;
13027
13028     *)
13029      echo ""
13030      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
13031      echo "       If it is a directory, then \`DIR/include' will be added to"
13032      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13033      exit 1
13034      ;;
13035    esac
13036
13037
13038 if test "$with_xf86gamma" = yes; then
13039
13040   # first check for xf86vmode.h, if we haven't already
13041   if test "$have_xf86vmode" = yes; then
13042     have_xf86gamma=yes
13043   else
13044
13045   ac_save_CPPFLAGS="$CPPFLAGS"
13046   if test \! -z "$includedir" ; then
13047     CPPFLAGS="$CPPFLAGS -I$includedir"
13048   fi
13049   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13050   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
13051 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
13052 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
13053   echo $ECHO_N "(cached) $ECHO_C" >&6
13054 else
13055   cat >conftest.$ac_ext <<_ACEOF
13056 /* confdefs.h.  */
13057 _ACEOF
13058 cat confdefs.h >>conftest.$ac_ext
13059 cat >>conftest.$ac_ext <<_ACEOF
13060 /* end confdefs.h.  */
13061 #include <X11/Xlib.h>
13062
13063 #include <X11/extensions/xf86vmode.h>
13064 _ACEOF
13065 rm -f conftest.$ac_objext
13066 if { (ac_try="$ac_compile"
13067 case "(($ac_try" in
13068   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13069   *) ac_try_echo=$ac_try;;
13070 esac
13071 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13072   (eval "$ac_compile") 2>conftest.er1
13073   ac_status=$?
13074   grep -v '^ *+' conftest.er1 >conftest.err
13075   rm -f conftest.er1
13076   cat conftest.err >&5
13077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13078   (exit $ac_status); } &&
13079          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13080   { (case "(($ac_try" in
13081   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13082   *) ac_try_echo=$ac_try;;
13083 esac
13084 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13085   (eval "$ac_try") 2>&5
13086   ac_status=$?
13087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13088   (exit $ac_status); }; } &&
13089          { ac_try='test -s conftest.$ac_objext'
13090   { (case "(($ac_try" in
13091   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13092   *) ac_try_echo=$ac_try;;
13093 esac
13094 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13095   (eval "$ac_try") 2>&5
13096   ac_status=$?
13097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13098   (exit $ac_status); }; }; then
13099   ac_cv_header_X11_extensions_xf86vmode_h=yes
13100 else
13101   echo "$as_me: failed program was:" >&5
13102 sed 's/^/| /' conftest.$ac_ext >&5
13103
13104         ac_cv_header_X11_extensions_xf86vmode_h=no
13105 fi
13106
13107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13108 fi
13109 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
13110 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
13111 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
13112   have_xf86gamma=yes
13113 fi
13114
13115
13116   CPPFLAGS="$ac_save_CPPFLAGS"
13117   fi
13118
13119   # if that succeeded, then check for the -lXxf86vm
13120   if test "$have_xf86gamma" = yes; then
13121     have_xf86gamma=no
13122
13123   ac_save_CPPFLAGS="$CPPFLAGS"
13124   ac_save_LDFLAGS="$LDFLAGS"
13125 #  ac_save_LIBS="$LIBS"
13126
13127   if test \! -z "$includedir" ; then
13128     CPPFLAGS="$CPPFLAGS -I$includedir"
13129   fi
13130   # note: $X_CFLAGS includes $x_includes
13131   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13132
13133   if test \! -z "$libdir" ; then
13134     LDFLAGS="$LDFLAGS -L$libdir"
13135   fi
13136   # note: $X_LIBS includes $x_libraries
13137   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13138
13139   { echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
13140 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6; }
13141 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
13142   echo $ECHO_N "(cached) $ECHO_C" >&6
13143 else
13144   ac_check_lib_save_LIBS=$LIBS
13145 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
13146 cat >conftest.$ac_ext <<_ACEOF
13147 /* confdefs.h.  */
13148 _ACEOF
13149 cat confdefs.h >>conftest.$ac_ext
13150 cat >>conftest.$ac_ext <<_ACEOF
13151 /* end confdefs.h.  */
13152
13153 /* Override any GCC internal prototype to avoid an error.
13154    Use char because int might match the return type of a GCC
13155    builtin and then its argument prototype would still apply.  */
13156 #ifdef __cplusplus
13157 extern "C"
13158 #endif
13159 char XF86VidModeSetGamma ();
13160 int
13161 main ()
13162 {
13163 return XF86VidModeSetGamma ();
13164   ;
13165   return 0;
13166 }
13167 _ACEOF
13168 rm -f conftest.$ac_objext conftest$ac_exeext
13169 if { (ac_try="$ac_link"
13170 case "(($ac_try" in
13171   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13172   *) ac_try_echo=$ac_try;;
13173 esac
13174 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13175   (eval "$ac_link") 2>conftest.er1
13176   ac_status=$?
13177   grep -v '^ *+' conftest.er1 >conftest.err
13178   rm -f conftest.er1
13179   cat conftest.err >&5
13180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13181   (exit $ac_status); } &&
13182          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13183   { (case "(($ac_try" in
13184   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13185   *) ac_try_echo=$ac_try;;
13186 esac
13187 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13188   (eval "$ac_try") 2>&5
13189   ac_status=$?
13190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13191   (exit $ac_status); }; } &&
13192          { ac_try='test -s conftest$ac_exeext'
13193   { (case "(($ac_try" in
13194   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13195   *) ac_try_echo=$ac_try;;
13196 esac
13197 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13198   (eval "$ac_try") 2>&5
13199   ac_status=$?
13200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13201   (exit $ac_status); }; }; then
13202   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
13203 else
13204   echo "$as_me: failed program was:" >&5
13205 sed 's/^/| /' conftest.$ac_ext >&5
13206
13207         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
13208 fi
13209
13210 rm -f core conftest.err conftest.$ac_objext \
13211       conftest$ac_exeext conftest.$ac_ext
13212 LIBS=$ac_check_lib_save_LIBS
13213 fi
13214 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
13215 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
13216 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
13217   have_xf86gamma=yes
13218 else
13219   true
13220 fi
13221
13222   CPPFLAGS="$ac_save_CPPFLAGS"
13223   LDFLAGS="$ac_save_LDFLAGS"
13224 #  LIBS="$ac_save_LIBS"
13225
13226   fi
13227
13228   # check for the Ramp versions of the functions too.
13229   if test "$have_xf86gamma" = yes; then
13230     have_xf86gamma_ramp=no
13231
13232   ac_save_CPPFLAGS="$CPPFLAGS"
13233   ac_save_LDFLAGS="$LDFLAGS"
13234 #  ac_save_LIBS="$LIBS"
13235
13236   if test \! -z "$includedir" ; then
13237     CPPFLAGS="$CPPFLAGS -I$includedir"
13238   fi
13239   # note: $X_CFLAGS includes $x_includes
13240   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13241
13242   if test \! -z "$libdir" ; then
13243     LDFLAGS="$LDFLAGS -L$libdir"
13244   fi
13245   # note: $X_LIBS includes $x_libraries
13246   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13247
13248   { echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
13249 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6; }
13250 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
13251   echo $ECHO_N "(cached) $ECHO_C" >&6
13252 else
13253   ac_check_lib_save_LIBS=$LIBS
13254 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
13255 cat >conftest.$ac_ext <<_ACEOF
13256 /* confdefs.h.  */
13257 _ACEOF
13258 cat confdefs.h >>conftest.$ac_ext
13259 cat >>conftest.$ac_ext <<_ACEOF
13260 /* end confdefs.h.  */
13261
13262 /* Override any GCC internal prototype to avoid an error.
13263    Use char because int might match the return type of a GCC
13264    builtin and then its argument prototype would still apply.  */
13265 #ifdef __cplusplus
13266 extern "C"
13267 #endif
13268 char XF86VidModeSetGammaRamp ();
13269 int
13270 main ()
13271 {
13272 return XF86VidModeSetGammaRamp ();
13273   ;
13274   return 0;
13275 }
13276 _ACEOF
13277 rm -f conftest.$ac_objext conftest$ac_exeext
13278 if { (ac_try="$ac_link"
13279 case "(($ac_try" in
13280   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13281   *) ac_try_echo=$ac_try;;
13282 esac
13283 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13284   (eval "$ac_link") 2>conftest.er1
13285   ac_status=$?
13286   grep -v '^ *+' conftest.er1 >conftest.err
13287   rm -f conftest.er1
13288   cat conftest.err >&5
13289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13290   (exit $ac_status); } &&
13291          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13292   { (case "(($ac_try" in
13293   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13294   *) ac_try_echo=$ac_try;;
13295 esac
13296 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13297   (eval "$ac_try") 2>&5
13298   ac_status=$?
13299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13300   (exit $ac_status); }; } &&
13301          { ac_try='test -s conftest$ac_exeext'
13302   { (case "(($ac_try" in
13303   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13304   *) ac_try_echo=$ac_try;;
13305 esac
13306 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13307   (eval "$ac_try") 2>&5
13308   ac_status=$?
13309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13310   (exit $ac_status); }; }; then
13311   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
13312 else
13313   echo "$as_me: failed program was:" >&5
13314 sed 's/^/| /' conftest.$ac_ext >&5
13315
13316         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
13317 fi
13318
13319 rm -f core conftest.err conftest.$ac_objext \
13320       conftest$ac_exeext conftest.$ac_ext
13321 LIBS=$ac_check_lib_save_LIBS
13322 fi
13323 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
13324 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
13325 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
13326   have_xf86gamma_ramp=yes
13327 else
13328   true
13329 fi
13330
13331   CPPFLAGS="$ac_save_CPPFLAGS"
13332   LDFLAGS="$ac_save_LDFLAGS"
13333 #  LIBS="$ac_save_LIBS"
13334
13335   fi
13336
13337   # if those tests succeeded, then we've really got the functions.
13338   if test "$have_xf86gamma" = yes; then
13339     cat >>confdefs.h <<\_ACEOF
13340 #define HAVE_XF86VMODE_GAMMA 1
13341 _ACEOF
13342
13343   fi
13344
13345   if test "$have_xf86gamma_ramp" = yes; then
13346     cat >>confdefs.h <<\_ACEOF
13347 #define HAVE_XF86VMODE_GAMMA_RAMP 1
13348 _ACEOF
13349
13350   fi
13351
13352   # pull in the lib, if we haven't already
13353   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
13354     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
13355   fi
13356
13357 elif test "$with_xf86gamma" != no; then
13358   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
13359   exit 1
13360 fi
13361
13362
13363 ###############################################################################
13364 #
13365 #       Check for the RANDR (Resize and Rotate) server extension.
13366 #
13367 #       We need this to detect when the resolution of the desktop
13368 #       has changed out from under us (this is a newer, different
13369 #       mechanism than the XF86VMODE virtual viewports.)
13370 #
13371 ###############################################################################
13372
13373 have_randr=no
13374 with_randr_req=unspecified
13375
13376 # Check whether --with-randr-ext was given.
13377 if test "${with_randr_ext+set}" = set; then
13378   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
13379 else
13380   with_randr=yes
13381 fi
13382
13383
13384
13385    case "$with_randr" in
13386     yes) ;;
13387     no)  ;;
13388
13389     /*)
13390      { echo "$as_me:$LINENO: checking for RANDR headers" >&5
13391 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6; }
13392      d=$with_randr/include
13393      if test -d $d; then
13394        X_CFLAGS="-I$d $X_CFLAGS"
13395        { echo "$as_me:$LINENO: result: $d" >&5
13396 echo "${ECHO_T}$d" >&6; }
13397      else
13398        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13399 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13400      fi
13401
13402      { echo "$as_me:$LINENO: checking for RANDR libs" >&5
13403 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6; }
13404      d=$with_randr/lib
13405      if test -d $d; then
13406        X_LIBS="-L$d $X_LIBS"
13407        { echo "$as_me:$LINENO: result: $d" >&5
13408 echo "${ECHO_T}$d" >&6; }
13409      else
13410        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13411 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13412      fi
13413
13414      # replace the directory string with "yes".
13415      with_randr_req="yes"
13416      with_randr=$with_randr_req
13417      ;;
13418
13419     *)
13420      echo ""
13421      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
13422      echo "       If it is a directory, then \`DIR/include' will be added to"
13423      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13424      exit 1
13425      ;;
13426    esac
13427
13428
13429 if test "$with_randr" = yes; then
13430
13431   # first check for Randr.h
13432
13433   ac_save_CPPFLAGS="$CPPFLAGS"
13434   if test \! -z "$includedir" ; then
13435     CPPFLAGS="$CPPFLAGS -I$includedir"
13436   fi
13437   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13438   { echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
13439 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6; }
13440 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
13441   echo $ECHO_N "(cached) $ECHO_C" >&6
13442 else
13443   cat >conftest.$ac_ext <<_ACEOF
13444 /* confdefs.h.  */
13445 _ACEOF
13446 cat confdefs.h >>conftest.$ac_ext
13447 cat >>conftest.$ac_ext <<_ACEOF
13448 /* end confdefs.h.  */
13449 #include <X11/Xlib.h>
13450
13451 #include <X11/extensions/Xrandr.h>
13452 _ACEOF
13453 rm -f conftest.$ac_objext
13454 if { (ac_try="$ac_compile"
13455 case "(($ac_try" in
13456   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13457   *) ac_try_echo=$ac_try;;
13458 esac
13459 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13460   (eval "$ac_compile") 2>conftest.er1
13461   ac_status=$?
13462   grep -v '^ *+' conftest.er1 >conftest.err
13463   rm -f conftest.er1
13464   cat conftest.err >&5
13465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13466   (exit $ac_status); } &&
13467          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13468   { (case "(($ac_try" in
13469   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13470   *) ac_try_echo=$ac_try;;
13471 esac
13472 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13473   (eval "$ac_try") 2>&5
13474   ac_status=$?
13475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13476   (exit $ac_status); }; } &&
13477          { ac_try='test -s conftest.$ac_objext'
13478   { (case "(($ac_try" in
13479   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13480   *) ac_try_echo=$ac_try;;
13481 esac
13482 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13483   (eval "$ac_try") 2>&5
13484   ac_status=$?
13485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13486   (exit $ac_status); }; }; then
13487   ac_cv_header_X11_extensions_Xrandr_h=yes
13488 else
13489   echo "$as_me: failed program was:" >&5
13490 sed 's/^/| /' conftest.$ac_ext >&5
13491
13492         ac_cv_header_X11_extensions_Xrandr_h=no
13493 fi
13494
13495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13496 fi
13497 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
13498 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
13499 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
13500   have_randr=yes
13501 fi
13502
13503
13504   CPPFLAGS="$ac_save_CPPFLAGS"
13505
13506   # if that succeeded, then check for the XRR code in the libraries
13507   if test "$have_randr" = yes; then
13508
13509     # RANDR probably needs -lXrender
13510     xrender_libs=
13511
13512   ac_save_CPPFLAGS="$CPPFLAGS"
13513   ac_save_LDFLAGS="$LDFLAGS"
13514 #  ac_save_LIBS="$LIBS"
13515
13516   if test \! -z "$includedir" ; then
13517     CPPFLAGS="$CPPFLAGS -I$includedir"
13518   fi
13519   # note: $X_CFLAGS includes $x_includes
13520   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13521
13522   if test \! -z "$libdir" ; then
13523     LDFLAGS="$LDFLAGS -L$libdir"
13524   fi
13525   # note: $X_LIBS includes $x_libraries
13526   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13527
13528   { echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
13529 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6; }
13530 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
13531   echo $ECHO_N "(cached) $ECHO_C" >&6
13532 else
13533   ac_check_lib_save_LIBS=$LIBS
13534 LIBS="-lXrender -lXext -lX11 $LIBS"
13535 cat >conftest.$ac_ext <<_ACEOF
13536 /* confdefs.h.  */
13537 _ACEOF
13538 cat confdefs.h >>conftest.$ac_ext
13539 cat >>conftest.$ac_ext <<_ACEOF
13540 /* end confdefs.h.  */
13541
13542 /* Override any GCC internal prototype to avoid an error.
13543    Use char because int might match the return type of a GCC
13544    builtin and then its argument prototype would still apply.  */
13545 #ifdef __cplusplus
13546 extern "C"
13547 #endif
13548 char XRenderSetSubpixelOrder ();
13549 int
13550 main ()
13551 {
13552 return XRenderSetSubpixelOrder ();
13553   ;
13554   return 0;
13555 }
13556 _ACEOF
13557 rm -f conftest.$ac_objext conftest$ac_exeext
13558 if { (ac_try="$ac_link"
13559 case "(($ac_try" in
13560   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13561   *) ac_try_echo=$ac_try;;
13562 esac
13563 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13564   (eval "$ac_link") 2>conftest.er1
13565   ac_status=$?
13566   grep -v '^ *+' conftest.er1 >conftest.err
13567   rm -f conftest.er1
13568   cat conftest.err >&5
13569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13570   (exit $ac_status); } &&
13571          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13572   { (case "(($ac_try" in
13573   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13574   *) ac_try_echo=$ac_try;;
13575 esac
13576 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13577   (eval "$ac_try") 2>&5
13578   ac_status=$?
13579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13580   (exit $ac_status); }; } &&
13581          { ac_try='test -s conftest$ac_exeext'
13582   { (case "(($ac_try" in
13583   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13584   *) ac_try_echo=$ac_try;;
13585 esac
13586 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13587   (eval "$ac_try") 2>&5
13588   ac_status=$?
13589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13590   (exit $ac_status); }; }; then
13591   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
13592 else
13593   echo "$as_me: failed program was:" >&5
13594 sed 's/^/| /' conftest.$ac_ext >&5
13595
13596         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
13597 fi
13598
13599 rm -f core conftest.err conftest.$ac_objext \
13600       conftest$ac_exeext conftest.$ac_ext
13601 LIBS=$ac_check_lib_save_LIBS
13602 fi
13603 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
13604 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
13605 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
13606   xrender_libs="-lXrender"
13607 else
13608   true
13609 fi
13610
13611   CPPFLAGS="$ac_save_CPPFLAGS"
13612   LDFLAGS="$ac_save_LDFLAGS"
13613 #  LIBS="$ac_save_LIBS"
13614
13615
13616     # first look for RANDR in -lXext
13617     have_randr=no
13618
13619   ac_save_CPPFLAGS="$CPPFLAGS"
13620   ac_save_LDFLAGS="$LDFLAGS"
13621 #  ac_save_LIBS="$LIBS"
13622
13623   if test \! -z "$includedir" ; then
13624     CPPFLAGS="$CPPFLAGS -I$includedir"
13625   fi
13626   # note: $X_CFLAGS includes $x_includes
13627   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13628
13629   if test \! -z "$libdir" ; then
13630     LDFLAGS="$LDFLAGS -L$libdir"
13631   fi
13632   # note: $X_LIBS includes $x_libraries
13633   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13634
13635   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
13636 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6; }
13637 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
13638   echo $ECHO_N "(cached) $ECHO_C" >&6
13639 else
13640   ac_check_lib_save_LIBS=$LIBS
13641 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
13642 cat >conftest.$ac_ext <<_ACEOF
13643 /* confdefs.h.  */
13644 _ACEOF
13645 cat confdefs.h >>conftest.$ac_ext
13646 cat >>conftest.$ac_ext <<_ACEOF
13647 /* end confdefs.h.  */
13648
13649 /* Override any GCC internal prototype to avoid an error.
13650    Use char because int might match the return type of a GCC
13651    builtin and then its argument prototype would still apply.  */
13652 #ifdef __cplusplus
13653 extern "C"
13654 #endif
13655 char XRRGetScreenInfo ();
13656 int
13657 main ()
13658 {
13659 return XRRGetScreenInfo ();
13660   ;
13661   return 0;
13662 }
13663 _ACEOF
13664 rm -f conftest.$ac_objext conftest$ac_exeext
13665 if { (ac_try="$ac_link"
13666 case "(($ac_try" in
13667   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13668   *) ac_try_echo=$ac_try;;
13669 esac
13670 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13671   (eval "$ac_link") 2>conftest.er1
13672   ac_status=$?
13673   grep -v '^ *+' conftest.er1 >conftest.err
13674   rm -f conftest.er1
13675   cat conftest.err >&5
13676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13677   (exit $ac_status); } &&
13678          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13679   { (case "(($ac_try" in
13680   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13681   *) ac_try_echo=$ac_try;;
13682 esac
13683 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13684   (eval "$ac_try") 2>&5
13685   ac_status=$?
13686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13687   (exit $ac_status); }; } &&
13688          { ac_try='test -s conftest$ac_exeext'
13689   { (case "(($ac_try" in
13690   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13691   *) ac_try_echo=$ac_try;;
13692 esac
13693 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13694   (eval "$ac_try") 2>&5
13695   ac_status=$?
13696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13697   (exit $ac_status); }; }; then
13698   ac_cv_lib_Xext_XRRGetScreenInfo=yes
13699 else
13700   echo "$as_me: failed program was:" >&5
13701 sed 's/^/| /' conftest.$ac_ext >&5
13702
13703         ac_cv_lib_Xext_XRRGetScreenInfo=no
13704 fi
13705
13706 rm -f core conftest.err conftest.$ac_objext \
13707       conftest$ac_exeext conftest.$ac_ext
13708 LIBS=$ac_check_lib_save_LIBS
13709 fi
13710 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
13711 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
13712 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
13713   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
13714 else
13715   true
13716 fi
13717
13718   CPPFLAGS="$ac_save_CPPFLAGS"
13719   LDFLAGS="$ac_save_LDFLAGS"
13720 #  LIBS="$ac_save_LIBS"
13721
13722
13723     # if that failed, look in -lXrandr
13724     if test "$have_randr" = no; then
13725
13726   ac_save_CPPFLAGS="$CPPFLAGS"
13727   ac_save_LDFLAGS="$LDFLAGS"
13728 #  ac_save_LIBS="$LIBS"
13729
13730   if test \! -z "$includedir" ; then
13731     CPPFLAGS="$CPPFLAGS -I$includedir"
13732   fi
13733   # note: $X_CFLAGS includes $x_includes
13734   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13735
13736   if test \! -z "$libdir" ; then
13737     LDFLAGS="$LDFLAGS -L$libdir"
13738   fi
13739   # note: $X_LIBS includes $x_libraries
13740   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13741
13742   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
13743 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6; }
13744 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
13745   echo $ECHO_N "(cached) $ECHO_C" >&6
13746 else
13747   ac_check_lib_save_LIBS=$LIBS
13748 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
13749 cat >conftest.$ac_ext <<_ACEOF
13750 /* confdefs.h.  */
13751 _ACEOF
13752 cat confdefs.h >>conftest.$ac_ext
13753 cat >>conftest.$ac_ext <<_ACEOF
13754 /* end confdefs.h.  */
13755
13756 /* Override any GCC internal prototype to avoid an error.
13757    Use char because int might match the return type of a GCC
13758    builtin and then its argument prototype would still apply.  */
13759 #ifdef __cplusplus
13760 extern "C"
13761 #endif
13762 char XRRGetScreenInfo ();
13763 int
13764 main ()
13765 {
13766 return XRRGetScreenInfo ();
13767   ;
13768   return 0;
13769 }
13770 _ACEOF
13771 rm -f conftest.$ac_objext conftest$ac_exeext
13772 if { (ac_try="$ac_link"
13773 case "(($ac_try" in
13774   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13775   *) ac_try_echo=$ac_try;;
13776 esac
13777 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13778   (eval "$ac_link") 2>conftest.er1
13779   ac_status=$?
13780   grep -v '^ *+' conftest.er1 >conftest.err
13781   rm -f conftest.er1
13782   cat conftest.err >&5
13783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784   (exit $ac_status); } &&
13785          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13786   { (case "(($ac_try" in
13787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13788   *) ac_try_echo=$ac_try;;
13789 esac
13790 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13791   (eval "$ac_try") 2>&5
13792   ac_status=$?
13793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13794   (exit $ac_status); }; } &&
13795          { ac_try='test -s conftest$ac_exeext'
13796   { (case "(($ac_try" in
13797   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13798   *) ac_try_echo=$ac_try;;
13799 esac
13800 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13801   (eval "$ac_try") 2>&5
13802   ac_status=$?
13803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13804   (exit $ac_status); }; }; then
13805   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
13806 else
13807   echo "$as_me: failed program was:" >&5
13808 sed 's/^/| /' conftest.$ac_ext >&5
13809
13810         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
13811 fi
13812
13813 rm -f core conftest.err conftest.$ac_objext \
13814       conftest$ac_exeext conftest.$ac_ext
13815 LIBS=$ac_check_lib_save_LIBS
13816 fi
13817 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
13818 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
13819 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
13820   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
13821 else
13822   true
13823 fi
13824
13825   CPPFLAGS="$ac_save_CPPFLAGS"
13826   LDFLAGS="$ac_save_LDFLAGS"
13827 #  LIBS="$ac_save_LIBS"
13828
13829     fi
13830   fi
13831
13832   # if that succeeded, then we've really got it.
13833   if test "$have_randr" = yes; then
13834     cat >>confdefs.h <<\_ACEOF
13835 #define HAVE_RANDR 1
13836 _ACEOF
13837
13838   fi
13839
13840 elif test "$with_randr" != no; then
13841   echo "error: must be yes or no: --with-randr-ext=$with_randr"
13842   exit 1
13843 fi
13844
13845
13846 ###############################################################################
13847 #
13848 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
13849 #       using other XF86 stuff.)
13850 #
13851 ###############################################################################
13852
13853 have_xf86miscsetgrabkeysstate=no
13854 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
13855
13856   ac_save_CPPFLAGS="$CPPFLAGS"
13857   ac_save_LDFLAGS="$LDFLAGS"
13858 #  ac_save_LIBS="$LIBS"
13859
13860   if test \! -z "$includedir" ; then
13861     CPPFLAGS="$CPPFLAGS -I$includedir"
13862   fi
13863   # note: $X_CFLAGS includes $x_includes
13864   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13865
13866   if test \! -z "$libdir" ; then
13867     LDFLAGS="$LDFLAGS -L$libdir"
13868   fi
13869   # note: $X_LIBS includes $x_libraries
13870   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13871
13872   { echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
13873 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6; }
13874 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
13875   echo $ECHO_N "(cached) $ECHO_C" >&6
13876 else
13877   ac_check_lib_save_LIBS=$LIBS
13878 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
13879 cat >conftest.$ac_ext <<_ACEOF
13880 /* confdefs.h.  */
13881 _ACEOF
13882 cat confdefs.h >>conftest.$ac_ext
13883 cat >>conftest.$ac_ext <<_ACEOF
13884 /* end confdefs.h.  */
13885
13886 /* Override any GCC internal prototype to avoid an error.
13887    Use char because int might match the return type of a GCC
13888    builtin and then its argument prototype would still apply.  */
13889 #ifdef __cplusplus
13890 extern "C"
13891 #endif
13892 char XF86MiscSetGrabKeysState ();
13893 int
13894 main ()
13895 {
13896 return XF86MiscSetGrabKeysState ();
13897   ;
13898   return 0;
13899 }
13900 _ACEOF
13901 rm -f conftest.$ac_objext conftest$ac_exeext
13902 if { (ac_try="$ac_link"
13903 case "(($ac_try" in
13904   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13905   *) ac_try_echo=$ac_try;;
13906 esac
13907 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13908   (eval "$ac_link") 2>conftest.er1
13909   ac_status=$?
13910   grep -v '^ *+' conftest.er1 >conftest.err
13911   rm -f conftest.er1
13912   cat conftest.err >&5
13913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13914   (exit $ac_status); } &&
13915          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13916   { (case "(($ac_try" in
13917   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13918   *) ac_try_echo=$ac_try;;
13919 esac
13920 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13921   (eval "$ac_try") 2>&5
13922   ac_status=$?
13923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13924   (exit $ac_status); }; } &&
13925          { ac_try='test -s conftest$ac_exeext'
13926   { (case "(($ac_try" in
13927   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13928   *) ac_try_echo=$ac_try;;
13929 esac
13930 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13931   (eval "$ac_try") 2>&5
13932   ac_status=$?
13933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13934   (exit $ac_status); }; }; then
13935   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
13936 else
13937   echo "$as_me: failed program was:" >&5
13938 sed 's/^/| /' conftest.$ac_ext >&5
13939
13940         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
13941 fi
13942
13943 rm -f core conftest.err conftest.$ac_objext \
13944       conftest$ac_exeext conftest.$ac_ext
13945 LIBS=$ac_check_lib_save_LIBS
13946 fi
13947 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
13948 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
13949 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
13950   have_xf86miscsetgrabkeysstate=yes
13951 else
13952   true
13953 fi
13954
13955   CPPFLAGS="$ac_save_CPPFLAGS"
13956   LDFLAGS="$ac_save_LDFLAGS"
13957 #  LIBS="$ac_save_LIBS"
13958
13959   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
13960     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
13961     cat >>confdefs.h <<\_ACEOF
13962 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
13963 _ACEOF
13964
13965   fi
13966 fi
13967
13968
13969 ###############################################################################
13970 #
13971 #       Check for HP XHPDisableReset and XHPEnableReset.
13972 #
13973 ###############################################################################
13974
13975 { echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
13976 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6; }
13977
13978   ac_save_CPPFLAGS="$CPPFLAGS"
13979   if test \! -z "$includedir" ; then
13980     CPPFLAGS="$CPPFLAGS -I$includedir"
13981   fi
13982   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13983   cat >conftest.$ac_ext <<_ACEOF
13984 /* confdefs.h.  */
13985 _ACEOF
13986 cat confdefs.h >>conftest.$ac_ext
13987 cat >>conftest.$ac_ext <<_ACEOF
13988 /* end confdefs.h.  */
13989 #include <X11/XHPlib.h>
13990
13991 _ACEOF
13992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13993   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
13994   cat >>confdefs.h <<\_ACEOF
13995 #define HAVE_XHPDISABLERESET 1
13996 _ACEOF
13997
13998                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
13999                    { echo "$as_me:$LINENO: result: yes" >&5
14000 echo "${ECHO_T}yes" >&6; }
14001 else
14002   { echo "$as_me:$LINENO: result: no" >&5
14003 echo "${ECHO_T}no" >&6; }
14004 fi
14005 rm -f conftest*
14006
14007   CPPFLAGS="$ac_save_CPPFLAGS"
14008
14009
14010 ###############################################################################
14011 #
14012 #       Check for /proc/interrupts.
14013 #
14014 ###############################################################################
14015
14016 have_proc_interrupts=no
14017 with_proc_interrupts_req=unspecified
14018
14019 # Check whether --with-proc-interrupts was given.
14020 if test "${with_proc_interrupts+set}" = set; then
14021   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
14022 else
14023   with_proc_interrupts=yes
14024 fi
14025
14026
14027 if test "$with_proc_interrupts" = yes; then
14028
14029   # Note that we may be building in an environment (e.g. Debian buildd chroot)
14030   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
14031   # check that it has the bits we need, but otherwise we'll just go on faith.
14032   #
14033   have_proc_interrupts=yes
14034
14035   if test -f /proc/interrupts; then
14036    { echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
14037 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6; }
14038 if test "${ac_cv_have_proc_interrupts+set}" = set; then
14039   echo $ECHO_N "(cached) $ECHO_C" >&6
14040 else
14041   ac_cv_have_proc_interrupts=no
14042      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
14043        ac_cv_have_proc_interrupts=yes
14044      fi
14045
14046 fi
14047 { echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
14048 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6; }
14049    have_proc_interrupts=$ac_cv_have_proc_interrupts
14050   fi
14051
14052   if test "$have_proc_interrupts" = yes; then
14053     cat >>confdefs.h <<\_ACEOF
14054 #define HAVE_PROC_INTERRUPTS 1
14055 _ACEOF
14056
14057   fi
14058
14059 elif test "$with_proc_interrupts" != no; then
14060   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
14061   exit 1
14062 fi
14063
14064
14065 ###############################################################################
14066 #
14067 #       The --enable-locking option
14068 #
14069 ###############################################################################
14070
14071 # Check whether --enable-locking was given.
14072 if test "${enable_locking+set}" = set; then
14073   enableval=$enable_locking; enable_locking="$enableval"
14074 else
14075   enable_locking=yes
14076 fi
14077
14078 if test "$enable_locking" = yes; then
14079   true
14080 elif test "$enable_locking" = no; then
14081   cat >>confdefs.h <<\_ACEOF
14082 #define NO_LOCKING 1
14083 _ACEOF
14084
14085 else
14086   echo "error: must be yes or no: --enable-locking=$enable_locking"
14087   exit 1
14088 fi
14089
14090 # We can't lock on MacOS X, so don't even bother compiling in support for it.
14091 #
14092 if test "$ac_macosx" = yes; then
14093   if test "$enable_locking" = yes; then
14094     { echo "$as_me:$LINENO: result: locking disabled: it doesn't work on MacOS X" >&5
14095 echo "${ECHO_T}locking disabled: it doesn't work on MacOS X" >&6; }
14096     enable_locking=no
14097     cat >>confdefs.h <<\_ACEOF
14098 #define NO_LOCKING 1
14099 _ACEOF
14100
14101   fi
14102 fi
14103
14104
14105 ###############################################################################
14106 #
14107 #       Whether to allow root password to unblank.
14108 #
14109 ###############################################################################
14110 # Check whether --enable-root-passwd was given.
14111 if test "${enable_root_passwd+set}" = set; then
14112   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
14113 else
14114   enable_root_passwd=yes
14115 fi
14116
14117 if test "$enable_root_passwd" = yes; then
14118   cat >>confdefs.h <<\_ACEOF
14119 #define ALLOW_ROOT_PASSWD 1
14120 _ACEOF
14121
14122   true
14123 elif test "$enable_root_passwd" != no; then
14124   echo "error: something wrong with root-passwd option. Check configure.in ."
14125   exit 1
14126 fi
14127
14128 ###############################################################################
14129 #
14130 #       Check for PAM.
14131 #
14132 ###############################################################################
14133
14134 case "$host" in
14135   *-solaris*)
14136    # Solaris systems tend to come with PAM misconfigured.
14137    #  Don't build it by default, even if the headers exist.
14138    with_pam_default=no
14139    ;;
14140   *)
14141    # Default to building PAM support on all other systems, if it exists.
14142    with_pam_default=yes
14143   ;;
14144 esac
14145
14146 have_pam=no
14147 with_pam_req=unspecified
14148
14149
14150 # Check whether --with-pam was given.
14151 if test "${with_pam+set}" = set; then
14152   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
14153 else
14154   with_pam=$with_pam_default
14155 fi
14156
14157
14158
14159 # Check whether --with-pam_service_name was given.
14160 if test "${with_pam_service_name+set}" = set; then
14161   withval=$with_pam_service_name; pam_service_name="$withval"
14162 else
14163   pam_service_name="xscreensaver"
14164 fi
14165
14166
14167
14168    case "$with_pam" in
14169     yes) ;;
14170     no)  ;;
14171
14172     /*)
14173      { echo "$as_me:$LINENO: checking for PAM headers" >&5
14174 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6; }
14175      d=$with_pam/include
14176      if test -d $d; then
14177        X_CFLAGS="-I$d $X_CFLAGS"
14178        { echo "$as_me:$LINENO: result: $d" >&5
14179 echo "${ECHO_T}$d" >&6; }
14180      else
14181        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14182 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14183      fi
14184
14185      { echo "$as_me:$LINENO: checking for PAM libs" >&5
14186 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6; }
14187      d=$with_pam/lib
14188      if test -d $d; then
14189        X_LIBS="-L$d $X_LIBS"
14190        { echo "$as_me:$LINENO: result: $d" >&5
14191 echo "${ECHO_T}$d" >&6; }
14192      else
14193        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14194 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14195      fi
14196
14197      # replace the directory string with "yes".
14198      with_pam_req="yes"
14199      with_pam=$with_pam_req
14200      ;;
14201
14202     *)
14203      echo ""
14204      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
14205      echo "       If it is a directory, then \`DIR/include' will be added to"
14206      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14207      exit 1
14208      ;;
14209    esac
14210
14211
14212 if test "$enable_locking" = yes -a "$with_pam" = yes; then
14213   { echo "$as_me:$LINENO: checking for PAM" >&5
14214 echo $ECHO_N "checking for PAM... $ECHO_C" >&6; }
14215 if test "${ac_cv_pam+set}" = set; then
14216   echo $ECHO_N "(cached) $ECHO_C" >&6
14217 else
14218
14219   ac_save_CPPFLAGS="$CPPFLAGS"
14220   if test \! -z "$includedir" ; then
14221     CPPFLAGS="$CPPFLAGS -I$includedir"
14222   fi
14223   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14224   cat >conftest.$ac_ext <<_ACEOF
14225 /* confdefs.h.  */
14226 _ACEOF
14227 cat confdefs.h >>conftest.$ac_ext
14228 cat >>conftest.$ac_ext <<_ACEOF
14229 /* end confdefs.h.  */
14230 #include <security/pam_appl.h>
14231 int
14232 main ()
14233 {
14234
14235   ;
14236   return 0;
14237 }
14238 _ACEOF
14239 rm -f conftest.$ac_objext
14240 if { (ac_try="$ac_compile"
14241 case "(($ac_try" in
14242   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14243   *) ac_try_echo=$ac_try;;
14244 esac
14245 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14246   (eval "$ac_compile") 2>conftest.er1
14247   ac_status=$?
14248   grep -v '^ *+' conftest.er1 >conftest.err
14249   rm -f conftest.er1
14250   cat conftest.err >&5
14251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14252   (exit $ac_status); } &&
14253          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14254   { (case "(($ac_try" in
14255   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14256   *) ac_try_echo=$ac_try;;
14257 esac
14258 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14259   (eval "$ac_try") 2>&5
14260   ac_status=$?
14261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14262   (exit $ac_status); }; } &&
14263          { ac_try='test -s conftest.$ac_objext'
14264   { (case "(($ac_try" in
14265   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14266   *) ac_try_echo=$ac_try;;
14267 esac
14268 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14269   (eval "$ac_try") 2>&5
14270   ac_status=$?
14271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14272   (exit $ac_status); }; }; then
14273   ac_cv_pam=yes
14274 else
14275   echo "$as_me: failed program was:" >&5
14276 sed 's/^/| /' conftest.$ac_ext >&5
14277
14278         ac_cv_pam=no
14279 fi
14280
14281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14282   CPPFLAGS="$ac_save_CPPFLAGS"
14283 fi
14284 { echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
14285 echo "${ECHO_T}$ac_cv_pam" >&6; }
14286   if test "$ac_cv_pam" = yes ; then
14287     have_pam=yes
14288     cat >>confdefs.h <<\_ACEOF
14289 #define HAVE_PAM 1
14290 _ACEOF
14291
14292     cat >>confdefs.h <<_ACEOF
14293 #define PAM_SERVICE_NAME "$pam_service_name"
14294 _ACEOF
14295
14296
14297     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
14298
14299     # libpam typically requires dlopen and dlsym.  On FreeBSD,
14300     # those are in libc.  On Linux and Solaris, they're in libdl.
14301     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14302 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
14303 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
14304   echo $ECHO_N "(cached) $ECHO_C" >&6
14305 else
14306   ac_check_lib_save_LIBS=$LIBS
14307 LIBS="-ldl  $LIBS"
14308 cat >conftest.$ac_ext <<_ACEOF
14309 /* confdefs.h.  */
14310 _ACEOF
14311 cat confdefs.h >>conftest.$ac_ext
14312 cat >>conftest.$ac_ext <<_ACEOF
14313 /* end confdefs.h.  */
14314
14315 /* Override any GCC internal prototype to avoid an error.
14316    Use char because int might match the return type of a GCC
14317    builtin and then its argument prototype would still apply.  */
14318 #ifdef __cplusplus
14319 extern "C"
14320 #endif
14321 char dlopen ();
14322 int
14323 main ()
14324 {
14325 return dlopen ();
14326   ;
14327   return 0;
14328 }
14329 _ACEOF
14330 rm -f conftest.$ac_objext conftest$ac_exeext
14331 if { (ac_try="$ac_link"
14332 case "(($ac_try" in
14333   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14334   *) ac_try_echo=$ac_try;;
14335 esac
14336 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14337   (eval "$ac_link") 2>conftest.er1
14338   ac_status=$?
14339   grep -v '^ *+' conftest.er1 >conftest.err
14340   rm -f conftest.er1
14341   cat conftest.err >&5
14342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14343   (exit $ac_status); } &&
14344          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14345   { (case "(($ac_try" in
14346   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14347   *) ac_try_echo=$ac_try;;
14348 esac
14349 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14350   (eval "$ac_try") 2>&5
14351   ac_status=$?
14352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14353   (exit $ac_status); }; } &&
14354          { ac_try='test -s conftest$ac_exeext'
14355   { (case "(($ac_try" in
14356   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14357   *) ac_try_echo=$ac_try;;
14358 esac
14359 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14360   (eval "$ac_try") 2>&5
14361   ac_status=$?
14362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14363   (exit $ac_status); }; }; then
14364   ac_cv_lib_dl_dlopen=yes
14365 else
14366   echo "$as_me: failed program was:" >&5
14367 sed 's/^/| /' conftest.$ac_ext >&5
14368
14369         ac_cv_lib_dl_dlopen=no
14370 fi
14371
14372 rm -f core conftest.err conftest.$ac_objext \
14373       conftest$ac_exeext conftest.$ac_ext
14374 LIBS=$ac_check_lib_save_LIBS
14375 fi
14376 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14377 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14378 if test $ac_cv_lib_dl_dlopen = yes; then
14379   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
14380 fi
14381
14382
14383     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
14384     have_timedwait=no
14385     { echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
14386 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6; }
14387 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
14388   echo $ECHO_N "(cached) $ECHO_C" >&6
14389 else
14390   ac_check_lib_save_LIBS=$LIBS
14391 LIBS="-lc  $LIBS"
14392 cat >conftest.$ac_ext <<_ACEOF
14393 /* confdefs.h.  */
14394 _ACEOF
14395 cat confdefs.h >>conftest.$ac_ext
14396 cat >>conftest.$ac_ext <<_ACEOF
14397 /* end confdefs.h.  */
14398
14399 /* Override any GCC internal prototype to avoid an error.
14400    Use char because int might match the return type of a GCC
14401    builtin and then its argument prototype would still apply.  */
14402 #ifdef __cplusplus
14403 extern "C"
14404 #endif
14405 char sigtimedwait ();
14406 int
14407 main ()
14408 {
14409 return sigtimedwait ();
14410   ;
14411   return 0;
14412 }
14413 _ACEOF
14414 rm -f conftest.$ac_objext conftest$ac_exeext
14415 if { (ac_try="$ac_link"
14416 case "(($ac_try" in
14417   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14418   *) ac_try_echo=$ac_try;;
14419 esac
14420 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14421   (eval "$ac_link") 2>conftest.er1
14422   ac_status=$?
14423   grep -v '^ *+' conftest.er1 >conftest.err
14424   rm -f conftest.er1
14425   cat conftest.err >&5
14426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14427   (exit $ac_status); } &&
14428          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14429   { (case "(($ac_try" in
14430   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14431   *) ac_try_echo=$ac_try;;
14432 esac
14433 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14434   (eval "$ac_try") 2>&5
14435   ac_status=$?
14436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14437   (exit $ac_status); }; } &&
14438          { ac_try='test -s conftest$ac_exeext'
14439   { (case "(($ac_try" in
14440   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14441   *) ac_try_echo=$ac_try;;
14442 esac
14443 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14444   (eval "$ac_try") 2>&5
14445   ac_status=$?
14446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14447   (exit $ac_status); }; }; then
14448   ac_cv_lib_c_sigtimedwait=yes
14449 else
14450   echo "$as_me: failed program was:" >&5
14451 sed 's/^/| /' conftest.$ac_ext >&5
14452
14453         ac_cv_lib_c_sigtimedwait=no
14454 fi
14455
14456 rm -f core conftest.err conftest.$ac_objext \
14457       conftest$ac_exeext conftest.$ac_ext
14458 LIBS=$ac_check_lib_save_LIBS
14459 fi
14460 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
14461 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6; }
14462 if test $ac_cv_lib_c_sigtimedwait = yes; then
14463   have_timedwait=yes
14464 fi
14465
14466     if test "$have_timedwait" = no ; then
14467       { echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
14468 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6; }
14469 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
14470   echo $ECHO_N "(cached) $ECHO_C" >&6
14471 else
14472   ac_check_lib_save_LIBS=$LIBS
14473 LIBS="-lrt  $LIBS"
14474 cat >conftest.$ac_ext <<_ACEOF
14475 /* confdefs.h.  */
14476 _ACEOF
14477 cat confdefs.h >>conftest.$ac_ext
14478 cat >>conftest.$ac_ext <<_ACEOF
14479 /* end confdefs.h.  */
14480
14481 /* Override any GCC internal prototype to avoid an error.
14482    Use char because int might match the return type of a GCC
14483    builtin and then its argument prototype would still apply.  */
14484 #ifdef __cplusplus
14485 extern "C"
14486 #endif
14487 char sigtimedwait ();
14488 int
14489 main ()
14490 {
14491 return sigtimedwait ();
14492   ;
14493   return 0;
14494 }
14495 _ACEOF
14496 rm -f conftest.$ac_objext conftest$ac_exeext
14497 if { (ac_try="$ac_link"
14498 case "(($ac_try" in
14499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14500   *) ac_try_echo=$ac_try;;
14501 esac
14502 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14503   (eval "$ac_link") 2>conftest.er1
14504   ac_status=$?
14505   grep -v '^ *+' conftest.er1 >conftest.err
14506   rm -f conftest.er1
14507   cat conftest.err >&5
14508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14509   (exit $ac_status); } &&
14510          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14511   { (case "(($ac_try" in
14512   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14513   *) ac_try_echo=$ac_try;;
14514 esac
14515 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14516   (eval "$ac_try") 2>&5
14517   ac_status=$?
14518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14519   (exit $ac_status); }; } &&
14520          { ac_try='test -s conftest$ac_exeext'
14521   { (case "(($ac_try" in
14522   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14523   *) ac_try_echo=$ac_try;;
14524 esac
14525 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14526   (eval "$ac_try") 2>&5
14527   ac_status=$?
14528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14529   (exit $ac_status); }; }; then
14530   ac_cv_lib_rt_sigtimedwait=yes
14531 else
14532   echo "$as_me: failed program was:" >&5
14533 sed 's/^/| /' conftest.$ac_ext >&5
14534
14535         ac_cv_lib_rt_sigtimedwait=no
14536 fi
14537
14538 rm -f core conftest.err conftest.$ac_objext \
14539       conftest$ac_exeext conftest.$ac_ext
14540 LIBS=$ac_check_lib_save_LIBS
14541 fi
14542 { echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
14543 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6; }
14544 if test $ac_cv_lib_rt_sigtimedwait = yes; then
14545   PASSWD_LIBS="${PASSWD_LIBS} -lrt"
14546 fi
14547
14548     fi
14549
14550     { echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
14551 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6; }
14552     if test "${ac_cv_pam_strerror_args+set}" = set; then
14553   echo $ECHO_N "(cached) $ECHO_C" >&6
14554 else
14555   cat >conftest.$ac_ext <<_ACEOF
14556 /* confdefs.h.  */
14557 _ACEOF
14558 cat confdefs.h >>conftest.$ac_ext
14559 cat >>conftest.$ac_ext <<_ACEOF
14560 /* end confdefs.h.  */
14561 #include <stdio.h>
14562                       #include <stdlib.h>
14563                       #include <security/pam_appl.h>
14564 int
14565 main ()
14566 {
14567 pam_handle_t *pamh = 0;
14568                       char *s = pam_strerror(pamh, PAM_SUCCESS);
14569   ;
14570   return 0;
14571 }
14572 _ACEOF
14573 rm -f conftest.$ac_objext
14574 if { (ac_try="$ac_compile"
14575 case "(($ac_try" in
14576   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14577   *) ac_try_echo=$ac_try;;
14578 esac
14579 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14580   (eval "$ac_compile") 2>conftest.er1
14581   ac_status=$?
14582   grep -v '^ *+' conftest.er1 >conftest.err
14583   rm -f conftest.er1
14584   cat conftest.err >&5
14585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14586   (exit $ac_status); } &&
14587          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14588   { (case "(($ac_try" in
14589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14590   *) ac_try_echo=$ac_try;;
14591 esac
14592 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14593   (eval "$ac_try") 2>&5
14594   ac_status=$?
14595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14596   (exit $ac_status); }; } &&
14597          { ac_try='test -s conftest.$ac_objext'
14598   { (case "(($ac_try" in
14599   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14600   *) ac_try_echo=$ac_try;;
14601 esac
14602 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14603   (eval "$ac_try") 2>&5
14604   ac_status=$?
14605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14606   (exit $ac_status); }; }; then
14607   ac_pam_strerror_args=2
14608 else
14609   echo "$as_me: failed program was:" >&5
14610 sed 's/^/| /' conftest.$ac_ext >&5
14611
14612         cat >conftest.$ac_ext <<_ACEOF
14613 /* confdefs.h.  */
14614 _ACEOF
14615 cat confdefs.h >>conftest.$ac_ext
14616 cat >>conftest.$ac_ext <<_ACEOF
14617 /* end confdefs.h.  */
14618 #include <stdio.h>
14619                                       #include <stdlib.h>
14620                                       #include <security/pam_appl.h>
14621 int
14622 main ()
14623 {
14624 char *s =
14625                                        pam_strerror(PAM_SUCCESS);
14626   ;
14627   return 0;
14628 }
14629 _ACEOF
14630 rm -f conftest.$ac_objext
14631 if { (ac_try="$ac_compile"
14632 case "(($ac_try" in
14633   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14634   *) ac_try_echo=$ac_try;;
14635 esac
14636 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14637   (eval "$ac_compile") 2>conftest.er1
14638   ac_status=$?
14639   grep -v '^ *+' conftest.er1 >conftest.err
14640   rm -f conftest.er1
14641   cat conftest.err >&5
14642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14643   (exit $ac_status); } &&
14644          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14645   { (case "(($ac_try" in
14646   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14647   *) ac_try_echo=$ac_try;;
14648 esac
14649 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14650   (eval "$ac_try") 2>&5
14651   ac_status=$?
14652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14653   (exit $ac_status); }; } &&
14654          { ac_try='test -s conftest.$ac_objext'
14655   { (case "(($ac_try" in
14656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14657   *) ac_try_echo=$ac_try;;
14658 esac
14659 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14660   (eval "$ac_try") 2>&5
14661   ac_status=$?
14662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14663   (exit $ac_status); }; }; then
14664   ac_pam_strerror_args=1
14665 else
14666   echo "$as_me: failed program was:" >&5
14667 sed 's/^/| /' conftest.$ac_ext >&5
14668
14669         ac_pam_strerror_args=0
14670 fi
14671
14672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14673 fi
14674
14675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14676       ac_cv_pam_strerror_args=$ac_pam_strerror_args
14677 fi
14678
14679     ac_pam_strerror_args=$ac_cv_pam_strerror_args
14680     if test "$ac_pam_strerror_args" = 1 ; then
14681       { echo "$as_me:$LINENO: result: one argument" >&5
14682 echo "${ECHO_T}one argument" >&6; }
14683     elif test "$ac_pam_strerror_args" = 2 ; then
14684       cat >>confdefs.h <<\_ACEOF
14685 #define PAM_STRERROR_TWO_ARGS 1
14686 _ACEOF
14687
14688       { echo "$as_me:$LINENO: result: two arguments" >&5
14689 echo "${ECHO_T}two arguments" >&6; }
14690     else
14691       { echo "$as_me:$LINENO: result: unknown" >&5
14692 echo "${ECHO_T}unknown" >&6; }
14693     fi
14694
14695 # Check pam_fail_delay
14696     { echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
14697 echo $ECHO_N "checking pam_fail_delay in -lpam... $ECHO_C" >&6; }
14698     if test "${ac_cv_pam_fail_delay+set}" = set; then
14699   echo $ECHO_N "(cached) $ECHO_C" >&6
14700 else
14701   ac_save_LDFLAGS="$LDFLAGS"
14702       LDFLAGS="-lpam"
14703       cat >conftest.$ac_ext <<_ACEOF
14704 /* confdefs.h.  */
14705 _ACEOF
14706 cat confdefs.h >>conftest.$ac_ext
14707 cat >>conftest.$ac_ext <<_ACEOF
14708 /* end confdefs.h.  */
14709 #include <security/pam_appl.h>
14710 int
14711 main ()
14712 {
14713 pam_handle_t *pamh = 0;
14714                    unsigned int usec = 1;
14715                    int status = pam_fail_delay (pamh, usec);
14716   ;
14717   return 0;
14718 }
14719 _ACEOF
14720 rm -f conftest.$ac_objext conftest$ac_exeext
14721 if { (ac_try="$ac_link"
14722 case "(($ac_try" in
14723   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14724   *) ac_try_echo=$ac_try;;
14725 esac
14726 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14727   (eval "$ac_link") 2>conftest.er1
14728   ac_status=$?
14729   grep -v '^ *+' conftest.er1 >conftest.err
14730   rm -f conftest.er1
14731   cat conftest.err >&5
14732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14733   (exit $ac_status); } &&
14734          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14735   { (case "(($ac_try" in
14736   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14737   *) ac_try_echo=$ac_try;;
14738 esac
14739 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14740   (eval "$ac_try") 2>&5
14741   ac_status=$?
14742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14743   (exit $ac_status); }; } &&
14744          { ac_try='test -s conftest$ac_exeext'
14745   { (case "(($ac_try" in
14746   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14747   *) ac_try_echo=$ac_try;;
14748 esac
14749 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14750   (eval "$ac_try") 2>&5
14751   ac_status=$?
14752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14753   (exit $ac_status); }; }; then
14754   ac_pam_fail_delay=yes
14755 else
14756   echo "$as_me: failed program was:" >&5
14757 sed 's/^/| /' conftest.$ac_ext >&5
14758
14759         ac_pam_fail_delay=no
14760 fi
14761
14762 rm -f core conftest.err conftest.$ac_objext \
14763       conftest$ac_exeext conftest.$ac_ext
14764       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
14765       LDFLAGS=$ac_save_LDFLAGS
14766 fi
14767
14768
14769       if test "$ac_pam_fail_delay" = yes ; then
14770         { echo "$as_me:$LINENO: result: yes" >&5
14771 echo "${ECHO_T}yes" >&6; }
14772         cat >>confdefs.h <<\_ACEOF
14773 #define HAVE_PAM_FAIL_DELAY 1
14774 _ACEOF
14775
14776       else
14777         { echo "$as_me:$LINENO: result: no" >&5
14778 echo "${ECHO_T}no" >&6; }
14779       fi
14780
14781   fi
14782 fi
14783
14784
14785 ###############################################################################
14786 #
14787 #       Check for Kerberos.
14788 #
14789 ###############################################################################
14790
14791 have_kerberos=no
14792 have_kerberos5=no
14793 with_kerberos_req=unspecified
14794
14795
14796 # Check whether --with-kerberos was given.
14797 if test "${with_kerberos+set}" = set; then
14798   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
14799 else
14800   with_kerberos=yes
14801 fi
14802
14803
14804
14805    case "$with_kerberos" in
14806     yes) ;;
14807     no)  ;;
14808
14809     /*)
14810      { echo "$as_me:$LINENO: checking for Kerberos headers" >&5
14811 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6; }
14812      d=$with_kerberos/include
14813      if test -d $d; then
14814        X_CFLAGS="-I$d $X_CFLAGS"
14815        { echo "$as_me:$LINENO: result: $d" >&5
14816 echo "${ECHO_T}$d" >&6; }
14817      else
14818        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14819 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14820      fi
14821
14822      { echo "$as_me:$LINENO: checking for Kerberos libs" >&5
14823 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6; }
14824      d=$with_kerberos/lib
14825      if test -d $d; then
14826        X_LIBS="-L$d $X_LIBS"
14827        { echo "$as_me:$LINENO: result: $d" >&5
14828 echo "${ECHO_T}$d" >&6; }
14829      else
14830        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14831 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14832      fi
14833
14834      # replace the directory string with "yes".
14835      with_kerberos_req="yes"
14836      with_kerberos=$with_kerberos_req
14837      ;;
14838
14839     *)
14840      echo ""
14841      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
14842      echo "       If it is a directory, then \`DIR/include' will be added to"
14843      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14844      exit 1
14845      ;;
14846    esac
14847
14848
14849 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
14850   { echo "$as_me:$LINENO: checking for Kerberos 4" >&5
14851 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6; }
14852 if test "${ac_cv_kerberos+set}" = set; then
14853   echo $ECHO_N "(cached) $ECHO_C" >&6
14854 else
14855
14856   ac_save_CPPFLAGS="$CPPFLAGS"
14857   if test \! -z "$includedir" ; then
14858     CPPFLAGS="$CPPFLAGS -I$includedir"
14859   fi
14860   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14861   cat >conftest.$ac_ext <<_ACEOF
14862 /* confdefs.h.  */
14863 _ACEOF
14864 cat confdefs.h >>conftest.$ac_ext
14865 cat >>conftest.$ac_ext <<_ACEOF
14866 /* end confdefs.h.  */
14867 #include <krb.h>
14868 int
14869 main ()
14870 {
14871
14872   ;
14873   return 0;
14874 }
14875 _ACEOF
14876 rm -f conftest.$ac_objext
14877 if { (ac_try="$ac_compile"
14878 case "(($ac_try" in
14879   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14880   *) ac_try_echo=$ac_try;;
14881 esac
14882 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14883   (eval "$ac_compile") 2>conftest.er1
14884   ac_status=$?
14885   grep -v '^ *+' conftest.er1 >conftest.err
14886   rm -f conftest.er1
14887   cat conftest.err >&5
14888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14889   (exit $ac_status); } &&
14890          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14891   { (case "(($ac_try" in
14892   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14893   *) ac_try_echo=$ac_try;;
14894 esac
14895 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14896   (eval "$ac_try") 2>&5
14897   ac_status=$?
14898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14899   (exit $ac_status); }; } &&
14900          { ac_try='test -s conftest.$ac_objext'
14901   { (case "(($ac_try" in
14902   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14903   *) ac_try_echo=$ac_try;;
14904 esac
14905 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14906   (eval "$ac_try") 2>&5
14907   ac_status=$?
14908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14909   (exit $ac_status); }; }; then
14910   ac_cv_kerberos=yes
14911 else
14912   echo "$as_me: failed program was:" >&5
14913 sed 's/^/| /' conftest.$ac_ext >&5
14914
14915         ac_cv_kerberos=no
14916 fi
14917
14918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14919   CPPFLAGS="$ac_save_CPPFLAGS"
14920 fi
14921 { echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
14922 echo "${ECHO_T}$ac_cv_kerberos" >&6; }
14923   { echo "$as_me:$LINENO: checking for Kerberos 5" >&5
14924 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6; }
14925 if test "${ac_cv_kerberos5+set}" = set; then
14926   echo $ECHO_N "(cached) $ECHO_C" >&6
14927 else
14928
14929   ac_save_CPPFLAGS="$CPPFLAGS"
14930   if test \! -z "$includedir" ; then
14931     CPPFLAGS="$CPPFLAGS -I$includedir"
14932   fi
14933   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14934   cat >conftest.$ac_ext <<_ACEOF
14935 /* confdefs.h.  */
14936 _ACEOF
14937 cat confdefs.h >>conftest.$ac_ext
14938 cat >>conftest.$ac_ext <<_ACEOF
14939 /* end confdefs.h.  */
14940 #include <kerberosIV/krb.h>
14941 int
14942 main ()
14943 {
14944
14945   ;
14946   return 0;
14947 }
14948 _ACEOF
14949 rm -f conftest.$ac_objext
14950 if { (ac_try="$ac_compile"
14951 case "(($ac_try" in
14952   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14953   *) ac_try_echo=$ac_try;;
14954 esac
14955 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14956   (eval "$ac_compile") 2>conftest.er1
14957   ac_status=$?
14958   grep -v '^ *+' conftest.er1 >conftest.err
14959   rm -f conftest.er1
14960   cat conftest.err >&5
14961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14962   (exit $ac_status); } &&
14963          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14964   { (case "(($ac_try" in
14965   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14966   *) ac_try_echo=$ac_try;;
14967 esac
14968 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14969   (eval "$ac_try") 2>&5
14970   ac_status=$?
14971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14972   (exit $ac_status); }; } &&
14973          { ac_try='test -s conftest.$ac_objext'
14974   { (case "(($ac_try" in
14975   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14976   *) ac_try_echo=$ac_try;;
14977 esac
14978 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14979   (eval "$ac_try") 2>&5
14980   ac_status=$?
14981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14982   (exit $ac_status); }; }; then
14983   ac_cv_kerberos5=yes
14984 else
14985   echo "$as_me: failed program was:" >&5
14986 sed 's/^/| /' conftest.$ac_ext >&5
14987
14988         ac_cv_kerberos5=no
14989 fi
14990
14991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14992   CPPFLAGS="$ac_save_CPPFLAGS"
14993 fi
14994 { echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
14995 echo "${ECHO_T}$ac_cv_kerberos5" >&6; }
14996
14997   if test "$ac_cv_kerberos" = yes ; then
14998     have_kerberos=yes
14999     cat >>confdefs.h <<\_ACEOF
15000 #define HAVE_KERBEROS 1
15001 _ACEOF
15002
15003   fi
15004
15005   if test "$ac_cv_kerberos5" = yes ; then
15006
15007     # Andrew Snare <ajs@pigpond.com> wrote:
15008     #
15009     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
15010     # (krb4) was also available.  This turns out not to be the case with
15011     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
15012     # is optional.
15013     #
15014     # So, disable kerberosV support if libkrb4 can't be found.
15015     # This is not the best solution, but it makes the compile not fail.
15016     #
15017
15018   ac_save_CPPFLAGS="$CPPFLAGS"
15019   ac_save_LDFLAGS="$LDFLAGS"
15020 #  ac_save_LIBS="$LIBS"
15021
15022   if test \! -z "$includedir" ; then
15023     CPPFLAGS="$CPPFLAGS -I$includedir"
15024   fi
15025   # note: $X_CFLAGS includes $x_includes
15026   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15027
15028   if test \! -z "$libdir" ; then
15029     LDFLAGS="$LDFLAGS -L$libdir"
15030   fi
15031   # note: $X_LIBS includes $x_libraries
15032   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15033
15034   { echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
15035 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6; }
15036 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
15037   echo $ECHO_N "(cached) $ECHO_C" >&6
15038 else
15039   ac_check_lib_save_LIBS=$LIBS
15040 LIBS="-lkrb4  $LIBS"
15041 cat >conftest.$ac_ext <<_ACEOF
15042 /* confdefs.h.  */
15043 _ACEOF
15044 cat confdefs.h >>conftest.$ac_ext
15045 cat >>conftest.$ac_ext <<_ACEOF
15046 /* end confdefs.h.  */
15047
15048 /* Override any GCC internal prototype to avoid an error.
15049    Use char because int might match the return type of a GCC
15050    builtin and then its argument prototype would still apply.  */
15051 #ifdef __cplusplus
15052 extern "C"
15053 #endif
15054 char krb_get_tf_realm ();
15055 int
15056 main ()
15057 {
15058 return krb_get_tf_realm ();
15059   ;
15060   return 0;
15061 }
15062 _ACEOF
15063 rm -f conftest.$ac_objext conftest$ac_exeext
15064 if { (ac_try="$ac_link"
15065 case "(($ac_try" in
15066   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15067   *) ac_try_echo=$ac_try;;
15068 esac
15069 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15070   (eval "$ac_link") 2>conftest.er1
15071   ac_status=$?
15072   grep -v '^ *+' conftest.er1 >conftest.err
15073   rm -f conftest.er1
15074   cat conftest.err >&5
15075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15076   (exit $ac_status); } &&
15077          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15078   { (case "(($ac_try" in
15079   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15080   *) ac_try_echo=$ac_try;;
15081 esac
15082 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15083   (eval "$ac_try") 2>&5
15084   ac_status=$?
15085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15086   (exit $ac_status); }; } &&
15087          { ac_try='test -s conftest$ac_exeext'
15088   { (case "(($ac_try" in
15089   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15090   *) ac_try_echo=$ac_try;;
15091 esac
15092 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15093   (eval "$ac_try") 2>&5
15094   ac_status=$?
15095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15096   (exit $ac_status); }; }; then
15097   ac_cv_lib_krb4_krb_get_tf_realm=yes
15098 else
15099   echo "$as_me: failed program was:" >&5
15100 sed 's/^/| /' conftest.$ac_ext >&5
15101
15102         ac_cv_lib_krb4_krb_get_tf_realm=no
15103 fi
15104
15105 rm -f core conftest.err conftest.$ac_objext \
15106       conftest$ac_exeext conftest.$ac_ext
15107 LIBS=$ac_check_lib_save_LIBS
15108 fi
15109 { echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
15110 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
15111 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
15112   have_kerberos=yes
15113 else
15114   have_kerberos=no
15115 fi
15116
15117   CPPFLAGS="$ac_save_CPPFLAGS"
15118   LDFLAGS="$ac_save_LDFLAGS"
15119 #  LIBS="$ac_save_LIBS"
15120
15121     if test "$have_kerberos" = yes ; then
15122       have_kerberos5=yes
15123       cat >>confdefs.h <<\_ACEOF
15124 #define HAVE_KERBEROS 1
15125 _ACEOF
15126
15127       cat >>confdefs.h <<\_ACEOF
15128 #define HAVE_KERBEROS5 1
15129 _ACEOF
15130
15131     else
15132       have_kerberos5=no
15133       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
15134 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
15135     fi
15136
15137   fi
15138
15139   if test "$have_kerberos5" = yes ; then
15140     # from Matt Knopp <mhat@infocalypse.netlag.com>
15141     # (who got it from amu@mit.edu)
15142
15143     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
15144
15145     # jwz: MacOS X uses -lkrb5, but not -lcrypt
15146
15147   ac_save_CPPFLAGS="$CPPFLAGS"
15148   ac_save_LDFLAGS="$LDFLAGS"
15149 #  ac_save_LIBS="$LIBS"
15150
15151   if test \! -z "$includedir" ; then
15152     CPPFLAGS="$CPPFLAGS -I$includedir"
15153   fi
15154   # note: $X_CFLAGS includes $x_includes
15155   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15156
15157   if test \! -z "$libdir" ; then
15158     LDFLAGS="$LDFLAGS -L$libdir"
15159   fi
15160   # note: $X_LIBS includes $x_libraries
15161   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15162
15163   { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
15164 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
15165 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
15166   echo $ECHO_N "(cached) $ECHO_C" >&6
15167 else
15168   ac_check_lib_save_LIBS=$LIBS
15169 LIBS="-lcrypt  $LIBS"
15170 cat >conftest.$ac_ext <<_ACEOF
15171 /* confdefs.h.  */
15172 _ACEOF
15173 cat confdefs.h >>conftest.$ac_ext
15174 cat >>conftest.$ac_ext <<_ACEOF
15175 /* end confdefs.h.  */
15176
15177 /* Override any GCC internal prototype to avoid an error.
15178    Use char because int might match the return type of a GCC
15179    builtin and then its argument prototype would still apply.  */
15180 #ifdef __cplusplus
15181 extern "C"
15182 #endif
15183 char crypt ();
15184 int
15185 main ()
15186 {
15187 return crypt ();
15188   ;
15189   return 0;
15190 }
15191 _ACEOF
15192 rm -f conftest.$ac_objext conftest$ac_exeext
15193 if { (ac_try="$ac_link"
15194 case "(($ac_try" in
15195   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15196   *) ac_try_echo=$ac_try;;
15197 esac
15198 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15199   (eval "$ac_link") 2>conftest.er1
15200   ac_status=$?
15201   grep -v '^ *+' conftest.er1 >conftest.err
15202   rm -f conftest.er1
15203   cat conftest.err >&5
15204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15205   (exit $ac_status); } &&
15206          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15207   { (case "(($ac_try" in
15208   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15209   *) ac_try_echo=$ac_try;;
15210 esac
15211 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15212   (eval "$ac_try") 2>&5
15213   ac_status=$?
15214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15215   (exit $ac_status); }; } &&
15216          { ac_try='test -s conftest$ac_exeext'
15217   { (case "(($ac_try" in
15218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15219   *) ac_try_echo=$ac_try;;
15220 esac
15221 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15222   (eval "$ac_try") 2>&5
15223   ac_status=$?
15224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15225   (exit $ac_status); }; }; then
15226   ac_cv_lib_crypt_crypt=yes
15227 else
15228   echo "$as_me: failed program was:" >&5
15229 sed 's/^/| /' conftest.$ac_ext >&5
15230
15231         ac_cv_lib_crypt_crypt=no
15232 fi
15233
15234 rm -f core conftest.err conftest.$ac_objext \
15235       conftest$ac_exeext conftest.$ac_ext
15236 LIBS=$ac_check_lib_save_LIBS
15237 fi
15238 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
15239 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
15240 if test $ac_cv_lib_crypt_crypt = yes; then
15241   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
15242 fi
15243
15244   CPPFLAGS="$ac_save_CPPFLAGS"
15245   LDFLAGS="$ac_save_LDFLAGS"
15246 #  LIBS="$ac_save_LIBS"
15247
15248
15249   elif test "$have_kerberos" = yes ; then
15250     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
15251     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
15252   fi
15253
15254   if test "$have_kerberos" = yes ; then
15255     { echo "$as_me:$LINENO: checking for res_search" >&5
15256 echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
15257 if test "${ac_cv_func_res_search+set}" = set; then
15258   echo $ECHO_N "(cached) $ECHO_C" >&6
15259 else
15260   cat >conftest.$ac_ext <<_ACEOF
15261 /* confdefs.h.  */
15262 _ACEOF
15263 cat confdefs.h >>conftest.$ac_ext
15264 cat >>conftest.$ac_ext <<_ACEOF
15265 /* end confdefs.h.  */
15266 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
15267    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15268 #define res_search innocuous_res_search
15269
15270 /* System header to define __stub macros and hopefully few prototypes,
15271     which can conflict with char res_search (); below.
15272     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15273     <limits.h> exists even on freestanding compilers.  */
15274
15275 #ifdef __STDC__
15276 # include <limits.h>
15277 #else
15278 # include <assert.h>
15279 #endif
15280
15281 #undef res_search
15282
15283 /* Override any GCC internal prototype to avoid an error.
15284    Use char because int might match the return type of a GCC
15285    builtin and then its argument prototype would still apply.  */
15286 #ifdef __cplusplus
15287 extern "C"
15288 #endif
15289 char res_search ();
15290 /* The GNU C library defines this for functions which it implements
15291     to always fail with ENOSYS.  Some functions are actually named
15292     something starting with __ and the normal name is an alias.  */
15293 #if defined __stub_res_search || defined __stub___res_search
15294 choke me
15295 #endif
15296
15297 int
15298 main ()
15299 {
15300 return res_search ();
15301   ;
15302   return 0;
15303 }
15304 _ACEOF
15305 rm -f conftest.$ac_objext conftest$ac_exeext
15306 if { (ac_try="$ac_link"
15307 case "(($ac_try" in
15308   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15309   *) ac_try_echo=$ac_try;;
15310 esac
15311 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15312   (eval "$ac_link") 2>conftest.er1
15313   ac_status=$?
15314   grep -v '^ *+' conftest.er1 >conftest.err
15315   rm -f conftest.er1
15316   cat conftest.err >&5
15317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15318   (exit $ac_status); } &&
15319          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15320   { (case "(($ac_try" in
15321   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15322   *) ac_try_echo=$ac_try;;
15323 esac
15324 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15325   (eval "$ac_try") 2>&5
15326   ac_status=$?
15327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328   (exit $ac_status); }; } &&
15329          { ac_try='test -s conftest$ac_exeext'
15330   { (case "(($ac_try" in
15331   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15332   *) ac_try_echo=$ac_try;;
15333 esac
15334 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15335   (eval "$ac_try") 2>&5
15336   ac_status=$?
15337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15338   (exit $ac_status); }; }; then
15339   ac_cv_func_res_search=yes
15340 else
15341   echo "$as_me: failed program was:" >&5
15342 sed 's/^/| /' conftest.$ac_ext >&5
15343
15344         ac_cv_func_res_search=no
15345 fi
15346
15347 rm -f core conftest.err conftest.$ac_objext \
15348       conftest$ac_exeext conftest.$ac_ext
15349 fi
15350 { echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
15351 echo "${ECHO_T}$ac_cv_func_res_search" >&6; }
15352 if test $ac_cv_func_res_search = yes; then
15353   :
15354 else
15355   { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
15356 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
15357 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
15358   echo $ECHO_N "(cached) $ECHO_C" >&6
15359 else
15360   ac_check_lib_save_LIBS=$LIBS
15361 LIBS="-lresolv  $LIBS"
15362 cat >conftest.$ac_ext <<_ACEOF
15363 /* confdefs.h.  */
15364 _ACEOF
15365 cat confdefs.h >>conftest.$ac_ext
15366 cat >>conftest.$ac_ext <<_ACEOF
15367 /* end confdefs.h.  */
15368
15369 /* Override any GCC internal prototype to avoid an error.
15370    Use char because int might match the return type of a GCC
15371    builtin and then its argument prototype would still apply.  */
15372 #ifdef __cplusplus
15373 extern "C"
15374 #endif
15375 char res_search ();
15376 int
15377 main ()
15378 {
15379 return res_search ();
15380   ;
15381   return 0;
15382 }
15383 _ACEOF
15384 rm -f conftest.$ac_objext conftest$ac_exeext
15385 if { (ac_try="$ac_link"
15386 case "(($ac_try" in
15387   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15388   *) ac_try_echo=$ac_try;;
15389 esac
15390 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15391   (eval "$ac_link") 2>conftest.er1
15392   ac_status=$?
15393   grep -v '^ *+' conftest.er1 >conftest.err
15394   rm -f conftest.er1
15395   cat conftest.err >&5
15396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15397   (exit $ac_status); } &&
15398          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15399   { (case "(($ac_try" in
15400   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15401   *) ac_try_echo=$ac_try;;
15402 esac
15403 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15404   (eval "$ac_try") 2>&5
15405   ac_status=$?
15406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15407   (exit $ac_status); }; } &&
15408          { ac_try='test -s conftest$ac_exeext'
15409   { (case "(($ac_try" in
15410   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15411   *) ac_try_echo=$ac_try;;
15412 esac
15413 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15414   (eval "$ac_try") 2>&5
15415   ac_status=$?
15416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15417   (exit $ac_status); }; }; then
15418   ac_cv_lib_resolv_res_search=yes
15419 else
15420   echo "$as_me: failed program was:" >&5
15421 sed 's/^/| /' conftest.$ac_ext >&5
15422
15423         ac_cv_lib_resolv_res_search=no
15424 fi
15425
15426 rm -f core conftest.err conftest.$ac_objext \
15427       conftest$ac_exeext conftest.$ac_ext
15428 LIBS=$ac_check_lib_save_LIBS
15429 fi
15430 { echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
15431 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
15432 if test $ac_cv_lib_resolv_res_search = yes; then
15433   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
15434 else
15435   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
15436 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
15437
15438 fi
15439
15440 fi
15441
15442   fi
15443 fi
15444
15445
15446 ###############################################################################
15447 #
15448 #       Check for the nine billion variants of shadow passwords...
15449 #
15450 ###############################################################################
15451
15452 need_setuid=no
15453
15454 have_shadow=no
15455 with_shadow_req=unspecified
15456
15457
15458 # Check whether --with-shadow was given.
15459 if test "${with_shadow+set}" = set; then
15460   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
15461 else
15462   with_shadow=yes
15463 fi
15464
15465
15466
15467    case "$with_shadow" in
15468     yes) ;;
15469     no)  ;;
15470
15471     /*)
15472      { echo "$as_me:$LINENO: checking for shadow password headers" >&5
15473 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6; }
15474      d=$with_shadow/include
15475      if test -d $d; then
15476        X_CFLAGS="-I$d $X_CFLAGS"
15477        { echo "$as_me:$LINENO: result: $d" >&5
15478 echo "${ECHO_T}$d" >&6; }
15479      else
15480        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15481 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15482      fi
15483
15484      { echo "$as_me:$LINENO: checking for shadow password libs" >&5
15485 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6; }
15486      d=$with_shadow/lib
15487      if test -d $d; then
15488        X_LIBS="-L$d $X_LIBS"
15489        { echo "$as_me:$LINENO: result: $d" >&5
15490 echo "${ECHO_T}$d" >&6; }
15491      else
15492        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15493 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15494      fi
15495
15496      # replace the directory string with "yes".
15497      with_shadow_req="yes"
15498      with_shadow=$with_shadow_req
15499      ;;
15500
15501     *)
15502      echo ""
15503      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
15504      echo "       If it is a directory, then \`DIR/include' will be added to"
15505      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15506      exit 1
15507      ;;
15508    esac
15509
15510
15511 if test "$enable_locking" = no ; then
15512   with_shadow_req=no
15513   with_shadow=no
15514 fi
15515
15516
15517 ###############################################################################
15518 #
15519 #       Check for Sun "adjunct" passwords.
15520 #
15521 ###############################################################################
15522
15523 if test "$with_shadow" = yes ; then
15524   { echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
15525 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6; }
15526 if test "${ac_cv_sun_adjunct+set}" = set; then
15527   echo $ECHO_N "(cached) $ECHO_C" >&6
15528 else
15529
15530   ac_save_CPPFLAGS="$CPPFLAGS"
15531   if test \! -z "$includedir" ; then
15532     CPPFLAGS="$CPPFLAGS -I$includedir"
15533   fi
15534   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15535   cat >conftest.$ac_ext <<_ACEOF
15536 /* confdefs.h.  */
15537 _ACEOF
15538 cat confdefs.h >>conftest.$ac_ext
15539 cat >>conftest.$ac_ext <<_ACEOF
15540 /* end confdefs.h.  */
15541 #include <stdlib.h>
15542                                     #include <unistd.h>
15543                                     #include <sys/types.h>
15544                                     #include <sys/label.h>
15545                                     #include <sys/audit.h>
15546                                     #include <pwdadj.h>
15547 int
15548 main ()
15549 {
15550 struct passwd_adjunct *p = getpwanam("nobody");
15551                        const char *pw = p->pwa_passwd;
15552   ;
15553   return 0;
15554 }
15555 _ACEOF
15556 rm -f conftest.$ac_objext
15557 if { (ac_try="$ac_compile"
15558 case "(($ac_try" in
15559   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15560   *) ac_try_echo=$ac_try;;
15561 esac
15562 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15563   (eval "$ac_compile") 2>conftest.er1
15564   ac_status=$?
15565   grep -v '^ *+' conftest.er1 >conftest.err
15566   rm -f conftest.er1
15567   cat conftest.err >&5
15568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15569   (exit $ac_status); } &&
15570          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15571   { (case "(($ac_try" in
15572   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15573   *) ac_try_echo=$ac_try;;
15574 esac
15575 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15576   (eval "$ac_try") 2>&5
15577   ac_status=$?
15578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15579   (exit $ac_status); }; } &&
15580          { ac_try='test -s conftest.$ac_objext'
15581   { (case "(($ac_try" in
15582   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15583   *) ac_try_echo=$ac_try;;
15584 esac
15585 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15586   (eval "$ac_try") 2>&5
15587   ac_status=$?
15588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15589   (exit $ac_status); }; }; then
15590   ac_cv_sun_adjunct=yes
15591 else
15592   echo "$as_me: failed program was:" >&5
15593 sed 's/^/| /' conftest.$ac_ext >&5
15594
15595         ac_cv_sun_adjunct=no
15596 fi
15597
15598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15599   CPPFLAGS="$ac_save_CPPFLAGS"
15600 fi
15601 { echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
15602 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6; }
15603   if test "$ac_cv_sun_adjunct" = yes; then
15604     have_shadow_adjunct=yes
15605     have_shadow=yes
15606     need_setuid=yes
15607   fi
15608 fi
15609
15610
15611 ###############################################################################
15612 #
15613 #       Check for DEC and SCO so-called "enhanced" security.
15614 #
15615 ###############################################################################
15616
15617 if test "$with_shadow" = yes ; then
15618   { echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
15619 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6; }
15620 if test "${ac_cv_enhanced_passwd+set}" = set; then
15621   echo $ECHO_N "(cached) $ECHO_C" >&6
15622 else
15623
15624   ac_save_CPPFLAGS="$CPPFLAGS"
15625   if test \! -z "$includedir" ; then
15626     CPPFLAGS="$CPPFLAGS -I$includedir"
15627   fi
15628   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15629   cat >conftest.$ac_ext <<_ACEOF
15630 /* confdefs.h.  */
15631 _ACEOF
15632 cat confdefs.h >>conftest.$ac_ext
15633 cat >>conftest.$ac_ext <<_ACEOF
15634 /* end confdefs.h.  */
15635 #include <stdlib.h>
15636                                     #include <unistd.h>
15637                                     #include <sys/types.h>
15638                                     #include <pwd.h>
15639                                     #include <sys/security.h>
15640                                     #include <prot.h>
15641 int
15642 main ()
15643 {
15644 struct pr_passwd *p;
15645                        const char *pw;
15646                        set_auth_parameters(0, 0);
15647                        check_auth_parameters();
15648                        p = getprpwnam("nobody");
15649                        pw = p->ufld.fd_encrypt;
15650   ;
15651   return 0;
15652 }
15653 _ACEOF
15654 rm -f conftest.$ac_objext
15655 if { (ac_try="$ac_compile"
15656 case "(($ac_try" in
15657   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15658   *) ac_try_echo=$ac_try;;
15659 esac
15660 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15661   (eval "$ac_compile") 2>conftest.er1
15662   ac_status=$?
15663   grep -v '^ *+' conftest.er1 >conftest.err
15664   rm -f conftest.er1
15665   cat conftest.err >&5
15666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15667   (exit $ac_status); } &&
15668          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15669   { (case "(($ac_try" in
15670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15671   *) ac_try_echo=$ac_try;;
15672 esac
15673 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15674   (eval "$ac_try") 2>&5
15675   ac_status=$?
15676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15677   (exit $ac_status); }; } &&
15678          { ac_try='test -s conftest.$ac_objext'
15679   { (case "(($ac_try" in
15680   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15681   *) ac_try_echo=$ac_try;;
15682 esac
15683 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15684   (eval "$ac_try") 2>&5
15685   ac_status=$?
15686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15687   (exit $ac_status); }; }; then
15688   ac_cv_enhanced_passwd=yes
15689 else
15690   echo "$as_me: failed program was:" >&5
15691 sed 's/^/| /' conftest.$ac_ext >&5
15692
15693         ac_cv_enhanced_passwd=no
15694 fi
15695
15696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15697   CPPFLAGS="$ac_save_CPPFLAGS"
15698 fi
15699 { echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
15700 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6; }
15701   if test $ac_cv_enhanced_passwd = yes; then
15702     have_shadow_enhanced=yes
15703     have_shadow=yes
15704     need_setuid=yes
15705
15706     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
15707     # (I'm told it needs -lcurses too, but I don't understand why.)
15708     # But on DEC, it's in -lsecurity.
15709     #
15710     { echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
15711 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6; }
15712 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
15713   echo $ECHO_N "(cached) $ECHO_C" >&6
15714 else
15715   ac_check_lib_save_LIBS=$LIBS
15716 LIBS="-lprot -lx $LIBS"
15717 cat >conftest.$ac_ext <<_ACEOF
15718 /* confdefs.h.  */
15719 _ACEOF
15720 cat confdefs.h >>conftest.$ac_ext
15721 cat >>conftest.$ac_ext <<_ACEOF
15722 /* end confdefs.h.  */
15723
15724 /* Override any GCC internal prototype to avoid an error.
15725    Use char because int might match the return type of a GCC
15726    builtin and then its argument prototype would still apply.  */
15727 #ifdef __cplusplus
15728 extern "C"
15729 #endif
15730 char getprpwnam ();
15731 int
15732 main ()
15733 {
15734 return getprpwnam ();
15735   ;
15736   return 0;
15737 }
15738 _ACEOF
15739 rm -f conftest.$ac_objext conftest$ac_exeext
15740 if { (ac_try="$ac_link"
15741 case "(($ac_try" in
15742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15743   *) ac_try_echo=$ac_try;;
15744 esac
15745 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15746   (eval "$ac_link") 2>conftest.er1
15747   ac_status=$?
15748   grep -v '^ *+' conftest.er1 >conftest.err
15749   rm -f conftest.er1
15750   cat conftest.err >&5
15751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15752   (exit $ac_status); } &&
15753          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15754   { (case "(($ac_try" in
15755   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15756   *) ac_try_echo=$ac_try;;
15757 esac
15758 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15759   (eval "$ac_try") 2>&5
15760   ac_status=$?
15761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15762   (exit $ac_status); }; } &&
15763          { ac_try='test -s conftest$ac_exeext'
15764   { (case "(($ac_try" in
15765   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15766   *) ac_try_echo=$ac_try;;
15767 esac
15768 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15769   (eval "$ac_try") 2>&5
15770   ac_status=$?
15771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15772   (exit $ac_status); }; }; then
15773   ac_cv_lib_prot_getprpwnam=yes
15774 else
15775   echo "$as_me: failed program was:" >&5
15776 sed 's/^/| /' conftest.$ac_ext >&5
15777
15778         ac_cv_lib_prot_getprpwnam=no
15779 fi
15780
15781 rm -f core conftest.err conftest.$ac_objext \
15782       conftest$ac_exeext conftest.$ac_ext
15783 LIBS=$ac_check_lib_save_LIBS
15784 fi
15785 { echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
15786 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6; }
15787 if test $ac_cv_lib_prot_getprpwnam = yes; then
15788   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
15789 else
15790   { echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
15791 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6; }
15792 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
15793   echo $ECHO_N "(cached) $ECHO_C" >&6
15794 else
15795   ac_check_lib_save_LIBS=$LIBS
15796 LIBS="-lsecurity  $LIBS"
15797 cat >conftest.$ac_ext <<_ACEOF
15798 /* confdefs.h.  */
15799 _ACEOF
15800 cat confdefs.h >>conftest.$ac_ext
15801 cat >>conftest.$ac_ext <<_ACEOF
15802 /* end confdefs.h.  */
15803
15804 /* Override any GCC internal prototype to avoid an error.
15805    Use char because int might match the return type of a GCC
15806    builtin and then its argument prototype would still apply.  */
15807 #ifdef __cplusplus
15808 extern "C"
15809 #endif
15810 char getprpwnam ();
15811 int
15812 main ()
15813 {
15814 return getprpwnam ();
15815   ;
15816   return 0;
15817 }
15818 _ACEOF
15819 rm -f conftest.$ac_objext conftest$ac_exeext
15820 if { (ac_try="$ac_link"
15821 case "(($ac_try" in
15822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15823   *) ac_try_echo=$ac_try;;
15824 esac
15825 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15826   (eval "$ac_link") 2>conftest.er1
15827   ac_status=$?
15828   grep -v '^ *+' conftest.er1 >conftest.err
15829   rm -f conftest.er1
15830   cat conftest.err >&5
15831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15832   (exit $ac_status); } &&
15833          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15834   { (case "(($ac_try" in
15835   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15836   *) ac_try_echo=$ac_try;;
15837 esac
15838 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15839   (eval "$ac_try") 2>&5
15840   ac_status=$?
15841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15842   (exit $ac_status); }; } &&
15843          { ac_try='test -s conftest$ac_exeext'
15844   { (case "(($ac_try" in
15845   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15846   *) ac_try_echo=$ac_try;;
15847 esac
15848 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15849   (eval "$ac_try") 2>&5
15850   ac_status=$?
15851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15852   (exit $ac_status); }; }; then
15853   ac_cv_lib_security_getprpwnam=yes
15854 else
15855   echo "$as_me: failed program was:" >&5
15856 sed 's/^/| /' conftest.$ac_ext >&5
15857
15858         ac_cv_lib_security_getprpwnam=no
15859 fi
15860
15861 rm -f core conftest.err conftest.$ac_objext \
15862       conftest$ac_exeext conftest.$ac_ext
15863 LIBS=$ac_check_lib_save_LIBS
15864 fi
15865 { echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
15866 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6; }
15867 if test $ac_cv_lib_security_getprpwnam = yes; then
15868   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
15869 fi
15870
15871 fi
15872
15873   fi
15874 fi
15875
15876 ###############################################################################
15877 #
15878 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
15879 #
15880 ###############################################################################
15881
15882 if test "$with_shadow" = yes ; then
15883   { echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
15884 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6; }
15885 if test "${ac_cv_hpux_passwd+set}" = set; then
15886   echo $ECHO_N "(cached) $ECHO_C" >&6
15887 else
15888
15889   ac_save_CPPFLAGS="$CPPFLAGS"
15890   if test \! -z "$includedir" ; then
15891     CPPFLAGS="$CPPFLAGS -I$includedir"
15892   fi
15893   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15894   cat >conftest.$ac_ext <<_ACEOF
15895 /* confdefs.h.  */
15896 _ACEOF
15897 cat confdefs.h >>conftest.$ac_ext
15898 cat >>conftest.$ac_ext <<_ACEOF
15899 /* end confdefs.h.  */
15900 #include <stdlib.h>
15901                                     #include <unistd.h>
15902                                     #include <sys/types.h>
15903                                     #include <pwd.h>
15904                                     #include <hpsecurity.h>
15905                                     #include <prot.h>
15906 int
15907 main ()
15908 {
15909 struct s_passwd *p = getspwnam("nobody");
15910                        const char *pw = p->pw_passwd;
15911   ;
15912   return 0;
15913 }
15914 _ACEOF
15915 rm -f conftest.$ac_objext
15916 if { (ac_try="$ac_compile"
15917 case "(($ac_try" in
15918   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15919   *) ac_try_echo=$ac_try;;
15920 esac
15921 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15922   (eval "$ac_compile") 2>conftest.er1
15923   ac_status=$?
15924   grep -v '^ *+' conftest.er1 >conftest.err
15925   rm -f conftest.er1
15926   cat conftest.err >&5
15927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15928   (exit $ac_status); } &&
15929          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15930   { (case "(($ac_try" in
15931   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15932   *) ac_try_echo=$ac_try;;
15933 esac
15934 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15935   (eval "$ac_try") 2>&5
15936   ac_status=$?
15937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15938   (exit $ac_status); }; } &&
15939          { ac_try='test -s conftest.$ac_objext'
15940   { (case "(($ac_try" in
15941   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15942   *) ac_try_echo=$ac_try;;
15943 esac
15944 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15945   (eval "$ac_try") 2>&5
15946   ac_status=$?
15947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15948   (exit $ac_status); }; }; then
15949   ac_cv_hpux_passwd=yes
15950 else
15951   echo "$as_me: failed program was:" >&5
15952 sed 's/^/| /' conftest.$ac_ext >&5
15953
15954         ac_cv_hpux_passwd=no
15955 fi
15956
15957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15958   CPPFLAGS="$ac_save_CPPFLAGS"
15959 fi
15960 { echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
15961 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6; }
15962   if test "$ac_cv_hpux_passwd" = yes; then
15963     have_shadow_hpux=yes
15964     have_shadow=yes
15965     need_setuid=yes
15966
15967     # on HPUX, bigcrypt is in -lsec
15968     { echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
15969 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6; }
15970 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
15971   echo $ECHO_N "(cached) $ECHO_C" >&6
15972 else
15973   ac_check_lib_save_LIBS=$LIBS
15974 LIBS="-lsec  $LIBS"
15975 cat >conftest.$ac_ext <<_ACEOF
15976 /* confdefs.h.  */
15977 _ACEOF
15978 cat confdefs.h >>conftest.$ac_ext
15979 cat >>conftest.$ac_ext <<_ACEOF
15980 /* end confdefs.h.  */
15981
15982 /* Override any GCC internal prototype to avoid an error.
15983    Use char because int might match the return type of a GCC
15984    builtin and then its argument prototype would still apply.  */
15985 #ifdef __cplusplus
15986 extern "C"
15987 #endif
15988 char bigcrypt ();
15989 int
15990 main ()
15991 {
15992 return bigcrypt ();
15993   ;
15994   return 0;
15995 }
15996 _ACEOF
15997 rm -f conftest.$ac_objext conftest$ac_exeext
15998 if { (ac_try="$ac_link"
15999 case "(($ac_try" in
16000   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16001   *) ac_try_echo=$ac_try;;
16002 esac
16003 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16004   (eval "$ac_link") 2>conftest.er1
16005   ac_status=$?
16006   grep -v '^ *+' conftest.er1 >conftest.err
16007   rm -f conftest.er1
16008   cat conftest.err >&5
16009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16010   (exit $ac_status); } &&
16011          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16012   { (case "(($ac_try" in
16013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16014   *) ac_try_echo=$ac_try;;
16015 esac
16016 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16017   (eval "$ac_try") 2>&5
16018   ac_status=$?
16019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16020   (exit $ac_status); }; } &&
16021          { ac_try='test -s conftest$ac_exeext'
16022   { (case "(($ac_try" in
16023   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16024   *) ac_try_echo=$ac_try;;
16025 esac
16026 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16027   (eval "$ac_try") 2>&5
16028   ac_status=$?
16029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16030   (exit $ac_status); }; }; then
16031   ac_cv_lib_sec_bigcrypt=yes
16032 else
16033   echo "$as_me: failed program was:" >&5
16034 sed 's/^/| /' conftest.$ac_ext >&5
16035
16036         ac_cv_lib_sec_bigcrypt=no
16037 fi
16038
16039 rm -f core conftest.err conftest.$ac_objext \
16040       conftest$ac_exeext conftest.$ac_ext
16041 LIBS=$ac_check_lib_save_LIBS
16042 fi
16043 { echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
16044 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6; }
16045 if test $ac_cv_lib_sec_bigcrypt = yes; then
16046   PASSWD_LIBS="$PASSWD_LIBS -lsec"
16047 fi
16048
16049   fi
16050 fi
16051
16052
16053 ###############################################################################
16054 #
16055 #       Check for FreeBSD-style shadow passwords.
16056 #
16057 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
16058 #       password systems -- except you only get stuff in the pw_passwd field
16059 #       if the running program is setuid.  So, guess that we've got this
16060 #       lossage to contend with if /etc/master.passwd exists, and default to
16061 #       a setuid installation.
16062 #
16063 ###############################################################################
16064
16065 if test "$with_shadow" = yes ; then
16066   { echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
16067 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6; }
16068 if test "${ac_cv_master_passwd+set}" = set; then
16069   echo $ECHO_N "(cached) $ECHO_C" >&6
16070 else
16071   if test -f /etc/master.passwd ; then
16072                     ac_cv_master_passwd=yes
16073                   else
16074                     ac_cv_master_passwd=no
16075                   fi
16076 fi
16077 { echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
16078 echo "${ECHO_T}$ac_cv_master_passwd" >&6; }
16079   if test "$ac_cv_master_passwd" = yes; then
16080     need_setuid=yes
16081   fi
16082 fi
16083
16084
16085 ###############################################################################
16086 #
16087 #       Check for traditional (ha!) shadow passwords.
16088 #
16089 ###############################################################################
16090
16091 if test "$with_shadow" = yes ; then
16092   { echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
16093 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6; }
16094 if test "${ac_cv_shadow+set}" = set; then
16095   echo $ECHO_N "(cached) $ECHO_C" >&6
16096 else
16097
16098   ac_save_CPPFLAGS="$CPPFLAGS"
16099   if test \! -z "$includedir" ; then
16100     CPPFLAGS="$CPPFLAGS -I$includedir"
16101   fi
16102   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16103   cat >conftest.$ac_ext <<_ACEOF
16104 /* confdefs.h.  */
16105 _ACEOF
16106 cat confdefs.h >>conftest.$ac_ext
16107 cat >>conftest.$ac_ext <<_ACEOF
16108 /* end confdefs.h.  */
16109 #include <stdlib.h>
16110                                     #include <unistd.h>
16111                                     #include <sys/types.h>
16112                                     #include <pwd.h>
16113                                     #include <shadow.h>
16114 int
16115 main ()
16116 {
16117 struct spwd *p = getspnam("nobody");
16118                        const char *pw = p->sp_pwdp;
16119   ;
16120   return 0;
16121 }
16122 _ACEOF
16123 rm -f conftest.$ac_objext
16124 if { (ac_try="$ac_compile"
16125 case "(($ac_try" in
16126   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16127   *) ac_try_echo=$ac_try;;
16128 esac
16129 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16130   (eval "$ac_compile") 2>conftest.er1
16131   ac_status=$?
16132   grep -v '^ *+' conftest.er1 >conftest.err
16133   rm -f conftest.er1
16134   cat conftest.err >&5
16135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16136   (exit $ac_status); } &&
16137          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16138   { (case "(($ac_try" in
16139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16140   *) ac_try_echo=$ac_try;;
16141 esac
16142 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16143   (eval "$ac_try") 2>&5
16144   ac_status=$?
16145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16146   (exit $ac_status); }; } &&
16147          { ac_try='test -s conftest.$ac_objext'
16148   { (case "(($ac_try" in
16149   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16150   *) ac_try_echo=$ac_try;;
16151 esac
16152 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16153   (eval "$ac_try") 2>&5
16154   ac_status=$?
16155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16156   (exit $ac_status); }; }; then
16157   ac_cv_shadow=yes
16158 else
16159   echo "$as_me: failed program was:" >&5
16160 sed 's/^/| /' conftest.$ac_ext >&5
16161
16162         ac_cv_shadow=no
16163 fi
16164
16165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16166   CPPFLAGS="$ac_save_CPPFLAGS"
16167 fi
16168 { echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
16169 echo "${ECHO_T}$ac_cv_shadow" >&6; }
16170   if test "$ac_cv_shadow" = yes; then
16171     have_shadow=yes
16172     need_setuid=yes
16173
16174     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
16175     have_getspnam=no
16176     { echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
16177 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6; }
16178 if test "${ac_cv_lib_c_getspnam+set}" = set; then
16179   echo $ECHO_N "(cached) $ECHO_C" >&6
16180 else
16181   ac_check_lib_save_LIBS=$LIBS
16182 LIBS="-lc  $LIBS"
16183 cat >conftest.$ac_ext <<_ACEOF
16184 /* confdefs.h.  */
16185 _ACEOF
16186 cat confdefs.h >>conftest.$ac_ext
16187 cat >>conftest.$ac_ext <<_ACEOF
16188 /* end confdefs.h.  */
16189
16190 /* Override any GCC internal prototype to avoid an error.
16191    Use char because int might match the return type of a GCC
16192    builtin and then its argument prototype would still apply.  */
16193 #ifdef __cplusplus
16194 extern "C"
16195 #endif
16196 char getspnam ();
16197 int
16198 main ()
16199 {
16200 return getspnam ();
16201   ;
16202   return 0;
16203 }
16204 _ACEOF
16205 rm -f conftest.$ac_objext conftest$ac_exeext
16206 if { (ac_try="$ac_link"
16207 case "(($ac_try" in
16208   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16209   *) ac_try_echo=$ac_try;;
16210 esac
16211 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16212   (eval "$ac_link") 2>conftest.er1
16213   ac_status=$?
16214   grep -v '^ *+' conftest.er1 >conftest.err
16215   rm -f conftest.er1
16216   cat conftest.err >&5
16217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16218   (exit $ac_status); } &&
16219          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16220   { (case "(($ac_try" in
16221   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16222   *) ac_try_echo=$ac_try;;
16223 esac
16224 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16225   (eval "$ac_try") 2>&5
16226   ac_status=$?
16227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16228   (exit $ac_status); }; } &&
16229          { ac_try='test -s conftest$ac_exeext'
16230   { (case "(($ac_try" in
16231   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16232   *) ac_try_echo=$ac_try;;
16233 esac
16234 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16235   (eval "$ac_try") 2>&5
16236   ac_status=$?
16237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16238   (exit $ac_status); }; }; then
16239   ac_cv_lib_c_getspnam=yes
16240 else
16241   echo "$as_me: failed program was:" >&5
16242 sed 's/^/| /' conftest.$ac_ext >&5
16243
16244         ac_cv_lib_c_getspnam=no
16245 fi
16246
16247 rm -f core conftest.err conftest.$ac_objext \
16248       conftest$ac_exeext conftest.$ac_ext
16249 LIBS=$ac_check_lib_save_LIBS
16250 fi
16251 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
16252 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6; }
16253 if test $ac_cv_lib_c_getspnam = yes; then
16254   have_getspnam=yes
16255 fi
16256
16257     if test "$have_getspnam" = no ; then
16258       { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
16259 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
16260 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
16261   echo $ECHO_N "(cached) $ECHO_C" >&6
16262 else
16263   ac_check_lib_save_LIBS=$LIBS
16264 LIBS="-lgen  $LIBS"
16265 cat >conftest.$ac_ext <<_ACEOF
16266 /* confdefs.h.  */
16267 _ACEOF
16268 cat confdefs.h >>conftest.$ac_ext
16269 cat >>conftest.$ac_ext <<_ACEOF
16270 /* end confdefs.h.  */
16271
16272 /* Override any GCC internal prototype to avoid an error.
16273    Use char because int might match the return type of a GCC
16274    builtin and then its argument prototype would still apply.  */
16275 #ifdef __cplusplus
16276 extern "C"
16277 #endif
16278 char getspnam ();
16279 int
16280 main ()
16281 {
16282 return getspnam ();
16283   ;
16284   return 0;
16285 }
16286 _ACEOF
16287 rm -f conftest.$ac_objext conftest$ac_exeext
16288 if { (ac_try="$ac_link"
16289 case "(($ac_try" in
16290   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16291   *) ac_try_echo=$ac_try;;
16292 esac
16293 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16294   (eval "$ac_link") 2>conftest.er1
16295   ac_status=$?
16296   grep -v '^ *+' conftest.er1 >conftest.err
16297   rm -f conftest.er1
16298   cat conftest.err >&5
16299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16300   (exit $ac_status); } &&
16301          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16302   { (case "(($ac_try" in
16303   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16304   *) ac_try_echo=$ac_try;;
16305 esac
16306 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16307   (eval "$ac_try") 2>&5
16308   ac_status=$?
16309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16310   (exit $ac_status); }; } &&
16311          { ac_try='test -s conftest$ac_exeext'
16312   { (case "(($ac_try" in
16313   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16314   *) ac_try_echo=$ac_try;;
16315 esac
16316 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16317   (eval "$ac_try") 2>&5
16318   ac_status=$?
16319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16320   (exit $ac_status); }; }; then
16321   ac_cv_lib_gen_getspnam=yes
16322 else
16323   echo "$as_me: failed program was:" >&5
16324 sed 's/^/| /' conftest.$ac_ext >&5
16325
16326         ac_cv_lib_gen_getspnam=no
16327 fi
16328
16329 rm -f core conftest.err conftest.$ac_objext \
16330       conftest$ac_exeext conftest.$ac_ext
16331 LIBS=$ac_check_lib_save_LIBS
16332 fi
16333 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
16334 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
16335 if test $ac_cv_lib_gen_getspnam = yes; then
16336   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
16337 fi
16338
16339     fi
16340   fi
16341 fi
16342
16343
16344 ###############################################################################
16345 #
16346 #       Check for other libraries needed for non-shadow passwords.
16347 #
16348 ###############################################################################
16349
16350 if test "$enable_locking" = yes ; then
16351
16352   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
16353   have_crypt=no
16354   { echo "$as_me:$LINENO: checking for crypt in -lc" >&5
16355 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6; }
16356 if test "${ac_cv_lib_c_crypt+set}" = set; then
16357   echo $ECHO_N "(cached) $ECHO_C" >&6
16358 else
16359   ac_check_lib_save_LIBS=$LIBS
16360 LIBS="-lc  $LIBS"
16361 cat >conftest.$ac_ext <<_ACEOF
16362 /* confdefs.h.  */
16363 _ACEOF
16364 cat confdefs.h >>conftest.$ac_ext
16365 cat >>conftest.$ac_ext <<_ACEOF
16366 /* end confdefs.h.  */
16367
16368 /* Override any GCC internal prototype to avoid an error.
16369    Use char because int might match the return type of a GCC
16370    builtin and then its argument prototype would still apply.  */
16371 #ifdef __cplusplus
16372 extern "C"
16373 #endif
16374 char crypt ();
16375 int
16376 main ()
16377 {
16378 return crypt ();
16379   ;
16380   return 0;
16381 }
16382 _ACEOF
16383 rm -f conftest.$ac_objext conftest$ac_exeext
16384 if { (ac_try="$ac_link"
16385 case "(($ac_try" in
16386   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16387   *) ac_try_echo=$ac_try;;
16388 esac
16389 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16390   (eval "$ac_link") 2>conftest.er1
16391   ac_status=$?
16392   grep -v '^ *+' conftest.er1 >conftest.err
16393   rm -f conftest.er1
16394   cat conftest.err >&5
16395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16396   (exit $ac_status); } &&
16397          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16398   { (case "(($ac_try" in
16399   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16400   *) ac_try_echo=$ac_try;;
16401 esac
16402 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16403   (eval "$ac_try") 2>&5
16404   ac_status=$?
16405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16406   (exit $ac_status); }; } &&
16407          { ac_try='test -s conftest$ac_exeext'
16408   { (case "(($ac_try" in
16409   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16410   *) ac_try_echo=$ac_try;;
16411 esac
16412 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16413   (eval "$ac_try") 2>&5
16414   ac_status=$?
16415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16416   (exit $ac_status); }; }; then
16417   ac_cv_lib_c_crypt=yes
16418 else
16419   echo "$as_me: failed program was:" >&5
16420 sed 's/^/| /' conftest.$ac_ext >&5
16421
16422         ac_cv_lib_c_crypt=no
16423 fi
16424
16425 rm -f core conftest.err conftest.$ac_objext \
16426       conftest$ac_exeext conftest.$ac_ext
16427 LIBS=$ac_check_lib_save_LIBS
16428 fi
16429 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
16430 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6; }
16431 if test $ac_cv_lib_c_crypt = yes; then
16432   have_crypt=yes
16433 fi
16434
16435   if test "$have_crypt" = no ; then
16436     { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
16437 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
16438 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
16439   echo $ECHO_N "(cached) $ECHO_C" >&6
16440 else
16441   ac_check_lib_save_LIBS=$LIBS
16442 LIBS="-lcrypt  $LIBS"
16443 cat >conftest.$ac_ext <<_ACEOF
16444 /* confdefs.h.  */
16445 _ACEOF
16446 cat confdefs.h >>conftest.$ac_ext
16447 cat >>conftest.$ac_ext <<_ACEOF
16448 /* end confdefs.h.  */
16449
16450 /* Override any GCC internal prototype to avoid an error.
16451    Use char because int might match the return type of a GCC
16452    builtin and then its argument prototype would still apply.  */
16453 #ifdef __cplusplus
16454 extern "C"
16455 #endif
16456 char crypt ();
16457 int
16458 main ()
16459 {
16460 return crypt ();
16461   ;
16462   return 0;
16463 }
16464 _ACEOF
16465 rm -f conftest.$ac_objext conftest$ac_exeext
16466 if { (ac_try="$ac_link"
16467 case "(($ac_try" in
16468   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16469   *) ac_try_echo=$ac_try;;
16470 esac
16471 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16472   (eval "$ac_link") 2>conftest.er1
16473   ac_status=$?
16474   grep -v '^ *+' conftest.er1 >conftest.err
16475   rm -f conftest.er1
16476   cat conftest.err >&5
16477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16478   (exit $ac_status); } &&
16479          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16480   { (case "(($ac_try" in
16481   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16482   *) ac_try_echo=$ac_try;;
16483 esac
16484 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16485   (eval "$ac_try") 2>&5
16486   ac_status=$?
16487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16488   (exit $ac_status); }; } &&
16489          { ac_try='test -s conftest$ac_exeext'
16490   { (case "(($ac_try" in
16491   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16492   *) ac_try_echo=$ac_try;;
16493 esac
16494 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16495   (eval "$ac_try") 2>&5
16496   ac_status=$?
16497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16498   (exit $ac_status); }; }; then
16499   ac_cv_lib_crypt_crypt=yes
16500 else
16501   echo "$as_me: failed program was:" >&5
16502 sed 's/^/| /' conftest.$ac_ext >&5
16503
16504         ac_cv_lib_crypt_crypt=no
16505 fi
16506
16507 rm -f core conftest.err conftest.$ac_objext \
16508       conftest$ac_exeext conftest.$ac_ext
16509 LIBS=$ac_check_lib_save_LIBS
16510 fi
16511 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
16512 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
16513 if test $ac_cv_lib_crypt_crypt = yes; then
16514   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
16515 fi
16516
16517   fi
16518 fi
16519
16520
16521 # Most of the above shadow mechanisms will have set need_setuid to yes,
16522 # if they were found.  But, on some systems, we need setuid even when
16523 # using plain old vanilla passwords.
16524 #
16525 if test "$enable_locking" = yes ; then
16526   case "$host" in
16527     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
16528       need_setuid=yes
16529     ;;
16530   esac
16531 fi
16532
16533
16534 if test "$have_shadow_adjunct" = yes ; then
16535   cat >>confdefs.h <<\_ACEOF
16536 #define HAVE_ADJUNCT_PASSWD 1
16537 _ACEOF
16538
16539 elif test "$have_shadow_enhanced" = yes ; then
16540   cat >>confdefs.h <<\_ACEOF
16541 #define HAVE_ENHANCED_PASSWD 1
16542 _ACEOF
16543
16544 elif test "$have_shadow_hpux" = yes ; then
16545   cat >>confdefs.h <<\_ACEOF
16546 #define HAVE_HPUX_PASSWD 1
16547 _ACEOF
16548
16549 elif test "$have_shadow" = yes ; then
16550   cat >>confdefs.h <<\_ACEOF
16551 #define HAVE_SHADOW_PASSWD 1
16552 _ACEOF
16553
16554 fi
16555
16556
16557 ###############################################################################
16558 #
16559 #       Check for external password helper
16560 #       On SuSE, instead of having xscreensaver be a setuid program, they
16561 #       fork an external program that takes the password on stdin, and
16562 #       returns true if that password is a valid one.  Then only that
16563 #       smaller program needs to be setuid.
16564 #
16565 #       (Note that this external program is not a GUI: the GUI is still
16566 #       all in xscreensaver itself; the external program just does auth.)
16567 #
16568 ###############################################################################
16569
16570 have_passwd_helper=no
16571 with_passwd_helper_req=unspecified
16572
16573
16574 # Check whether --with-passwd-helper was given.
16575 if test "${with_passwd_helper+set}" = set; then
16576   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
16577 else
16578   with_passwd_helper=no
16579 fi
16580
16581 # no HANDLE_X_PATH_ARG for this one
16582
16583 if test "$enable_locking" = no ; then
16584   with_passwd_helper_req=no
16585   with_passwd_helper=no
16586 fi
16587
16588 case "$with_passwd_helper" in
16589   ""|no) : ;;
16590   /*)
16591     cat >>confdefs.h <<_ACEOF
16592 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
16593 _ACEOF
16594
16595     have_passwd_helper=yes;;
16596   *)
16597     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
16598     exit 1
16599 esac
16600
16601
16602 ###############################################################################
16603 #
16604 #       Check for a login manager for a "New Login" button on the lock dialog.
16605 #       Usually this will be "/usr/bin/gdmflexiserver".
16606 #
16607 ###############################################################################
16608
16609 have_login_manager=no
16610 with_login_manager_req=unspecified
16611 default_login_manager='gdmflexiserver -l'
16612
16613
16614 # Check whether --with-login-manager was given.
16615 if test "${with_login_manager+set}" = set; then
16616   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
16617 else
16618   with_login_manager=no
16619 fi
16620
16621 # no HANDLE_X_PATH_ARG for this one
16622
16623 if test "$enable_locking" = no ; then
16624   with_login_manager_req=no
16625   with_login_manager=no
16626 fi
16627
16628 if test -n "$with_login_manager_req" ; then
16629   ac_cv_login_manager_program=""
16630
16631  if test "$with_login_manager_req" = "yes" ; then
16632    with_login_manager_req=$default_login_manager
16633  fi
16634
16635   case "$with_login_manager_req" in
16636     /*)
16637       # absolute path
16638       set dummy $with_login_manager_req ; login_manager_tmp=$2
16639       { echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
16640 echo $ECHO_N "checking for $login_manager_tmp... $ECHO_C" >&6; }
16641       if test -x "$login_manager_tmp" ; then
16642         { echo "$as_me:$LINENO: result: yes" >&5
16643 echo "${ECHO_T}yes" >&6; }
16644       else
16645         { echo "$as_me:$LINENO: result: no" >&5
16646 echo "${ECHO_T}no" >&6; }
16647         with_login_manager=""
16648       fi
16649     ;;
16650     *)
16651       # relative path
16652       set dummy $with_login_manager_req ; login_manager_tmp=$2
16653       # don't cache
16654       unset ac_cv_path_login_manager_tmp
16655       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
16656 set dummy $login_manager_tmp; ac_word=$2
16657 { echo "$as_me:$LINENO: checking for $ac_word" >&5
16658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16659 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
16660   echo $ECHO_N "(cached) $ECHO_C" >&6
16661 else
16662   case $login_manager_tmp in
16663   [\\/]* | ?:[\\/]*)
16664   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
16665   ;;
16666   *)
16667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16668 for as_dir in $PATH
16669 do
16670   IFS=$as_save_IFS
16671   test -z "$as_dir" && as_dir=.
16672   for ac_exec_ext in '' $ac_executable_extensions; do
16673   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
16674     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
16675     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16676     break 2
16677   fi
16678 done
16679 done
16680 IFS=$as_save_IFS
16681
16682   ;;
16683 esac
16684 fi
16685 login_manager_tmp=$ac_cv_path_login_manager_tmp
16686 if test -n "$login_manager_tmp"; then
16687   { echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
16688 echo "${ECHO_T}$login_manager_tmp" >&6; }
16689 else
16690   { echo "$as_me:$LINENO: result: no" >&5
16691 echo "${ECHO_T}no" >&6; }
16692 fi
16693
16694
16695       if test -z "$login_manager_tmp" ; then
16696         with_login_manager=""
16697       else
16698         with_login_manager="$login_manager_tmp"
16699       fi
16700     ;;
16701   esac
16702   ac_cv_login_manager_program="$with_login_manager"
16703
16704 elif test -n "$ac_cv_login_manager_program"; then
16705   { echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
16706 echo "${ECHO_T}checking for login_manager... (cached) $ac_cv_login_manager_program" >&6; }
16707 fi
16708
16709 NEW_LOGIN_COMMAND_P=''
16710 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
16711
16712 if test -z "$NEW_LOGIN_COMMAND" ; then
16713   NEW_LOGIN_COMMAND="$default_login_manager"
16714   NEW_LOGIN_COMMAND_P='! '
16715 fi
16716
16717
16718
16719 ###############################################################################
16720 #
16721 #       Check for -lgtk (and Gnome stuff)
16722 #
16723 ###############################################################################
16724
16725 have_gtk=no
16726 with_gtk_req=unspecified
16727
16728 # Check whether --with-gtk was given.
16729 if test "${with_gtk+set}" = set; then
16730   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
16731 else
16732   with_gtk=yes
16733 fi
16734
16735
16736 # if --with-gtk=/directory/ was specified, remember that directory so that
16737 # we can also look for the `gtk-config' program in that directory.
16738 case "$with_gtk" in
16739   /*)
16740     gtk_dir="$with_gtk"
16741     ;;
16742   *)
16743     gtk_dir=""
16744     ;;
16745 esac
16746
16747
16748    case "$with_gtk" in
16749     yes) ;;
16750     no)  ;;
16751
16752     /*)
16753      { echo "$as_me:$LINENO: checking for Gtk headers" >&5
16754 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6; }
16755      d=$with_gtk/include
16756      if test -d $d; then
16757        X_CFLAGS="-I$d $X_CFLAGS"
16758        { echo "$as_me:$LINENO: result: $d" >&5
16759 echo "${ECHO_T}$d" >&6; }
16760      else
16761        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16762 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16763      fi
16764
16765      { echo "$as_me:$LINENO: checking for Gtk libs" >&5
16766 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
16767      d=$with_gtk/lib
16768      if test -d $d; then
16769        X_LIBS="-L$d $X_LIBS"
16770        { echo "$as_me:$LINENO: result: $d" >&5
16771 echo "${ECHO_T}$d" >&6; }
16772      else
16773        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16774 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16775      fi
16776
16777      # replace the directory string with "yes".
16778      with_gtk_req="yes"
16779      with_gtk=$with_gtk_req
16780      ;;
16781
16782     *)
16783      echo ""
16784      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
16785      echo "       If it is a directory, then \`DIR/include' will be added to"
16786      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16787      exit 1
16788      ;;
16789    esac
16790
16791
16792 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
16793   echo "error: must be yes or no: --with-gtk=$with_gtk"
16794   exit 1
16795 fi
16796
16797
16798 parse_gtk_version_string() {
16799   # M4 sucks!!
16800
16801   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
16802   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
16803
16804   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
16805   if test -z "$ac_gtk_version"; then
16806     ac_gtk_version=unknown
16807     ac_gtk_version_string=unknown
16808   fi
16809 }
16810
16811 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
16812 # if the user specified --with-gtk=/foo/ then look there.
16813 #
16814 gtk_path="$PATH"
16815 if test ! -z "$gtk_dir"; then
16816   # canonicalize slashes.
16817   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
16818   gtk_path="$foo:$gtk_path"
16819 fi
16820
16821 for ac_prog in pkg-config
16822 do
16823   # Extract the first word of "$ac_prog", so it can be a program name with args.
16824 set dummy $ac_prog; ac_word=$2
16825 { echo "$as_me:$LINENO: checking for $ac_word" >&5
16826 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16827 if test "${ac_cv_path_pkg_config+set}" = set; then
16828   echo $ECHO_N "(cached) $ECHO_C" >&6
16829 else
16830   case $pkg_config in
16831   [\\/]* | ?:[\\/]*)
16832   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
16833   ;;
16834   *)
16835   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16836 for as_dir in $gtk_path
16837 do
16838   IFS=$as_save_IFS
16839   test -z "$as_dir" && as_dir=.
16840   for ac_exec_ext in '' $ac_executable_extensions; do
16841   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
16842     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
16843     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16844     break 2
16845   fi
16846 done
16847 done
16848 IFS=$as_save_IFS
16849
16850   ;;
16851 esac
16852 fi
16853 pkg_config=$ac_cv_path_pkg_config
16854 if test -n "$pkg_config"; then
16855   { echo "$as_me:$LINENO: result: $pkg_config" >&5
16856 echo "${ECHO_T}$pkg_config" >&6; }
16857 else
16858   { echo "$as_me:$LINENO: result: no" >&5
16859 echo "${ECHO_T}no" >&6; }
16860 fi
16861
16862
16863   test -n "$pkg_config" && break
16864 done
16865
16866
16867 if test -z "$pkg_config" ; then
16868   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
16869 echo "$as_me: WARNING: pkg-config not found!" >&2;}
16870   pkg_config="false"
16871 fi
16872
16873
16874 # Utility function for running pkg-config-based tests...
16875 #
16876 pkgs=''
16877 pkg_check_version() {
16878   if test "$ok" = yes ; then
16879     req="$1"
16880     min="$2"
16881     { echo "$as_me:$LINENO: checking for $req" >&5
16882 echo $ECHO_N "checking for $req... $ECHO_C" >&6; }
16883     if $pkg_config --exists "$req" ; then
16884       vers=`$pkg_config --modversion "$req"`
16885       if $pkg_config --exists "$req >= $min" ; then
16886         { echo "$as_me:$LINENO: result: $vers" >&5
16887 echo "${ECHO_T}$vers" >&6; }
16888         pkgs="$pkgs $req"
16889         return 1
16890       else
16891         { echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
16892 echo "${ECHO_T}$vers (wanted >= $min)" >&6; }
16893         ok=no
16894         return 0
16895       fi
16896     else
16897       { echo "$as_me:$LINENO: result: no" >&5
16898 echo "${ECHO_T}no" >&6; }
16899       ok=no
16900       return 0
16901     fi
16902   fi
16903 }
16904
16905
16906 jurassic_gtk=no
16907 gtk_halfassed=no
16908
16909 if test "$with_gtk" = yes; then
16910   have_gtk=no
16911
16912   ok="yes"
16913   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
16914   pkg_check_version         gmodule-2.0  2.0.0
16915   pkg_check_version          libxml-2.0  2.4.6
16916   pkg_check_version        libglade-2.0  1.99.0
16917   pkg_check_version      gdk-pixbuf-2.0  2.0.0
16918   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
16919   have_gtk="$ok"
16920
16921   if test "$have_gtk" = no; then
16922     if test -n "$ac_gtk_version_string" ; then
16923       gtk_halfassed="$ac_gtk_version_string"
16924       gtk_halfassed_lib="$req"
16925     fi
16926   fi
16927
16928   if test "$have_gtk" = yes; then
16929     parse_gtk_version_string
16930     jurassic_gtk=no
16931   fi
16932
16933   if test "$have_gtk" = yes; then
16934     { echo "$as_me:$LINENO: checking for Gtk includes" >&5
16935 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6; }
16936 if test "${ac_cv_gtk_config_cflags+set}" = set; then
16937   echo $ECHO_N "(cached) $ECHO_C" >&6
16938 else
16939   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
16940 fi
16941 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
16942 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6; }
16943     { echo "$as_me:$LINENO: checking for Gtk libs" >&5
16944 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
16945 if test "${ac_cv_gtk_config_libs+set}" = set; then
16946   echo $ECHO_N "(cached) $ECHO_C" >&6
16947 else
16948   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
16949 fi
16950 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
16951 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6; }
16952   fi
16953
16954   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
16955   ac_gtk_config_libs=$ac_cv_gtk_config_libs
16956
16957   GTK_EXTRA_OBJS=""
16958   GTK_DATADIR=""
16959   if test "$have_gtk" = yes; then
16960     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
16961     GTK_DATADIR="$GTK_DATADIR/share"
16962   fi
16963
16964   if test "$have_gtk" = yes; then
16965     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
16966     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
16967     cat >>confdefs.h <<\_ACEOF
16968 #define HAVE_GTK 1
16969 _ACEOF
16970
16971     cat >>confdefs.h <<\_ACEOF
16972 #define HAVE_GTK2 1
16973 _ACEOF
16974
16975     cat >>confdefs.h <<\_ACEOF
16976 #define HAVE_XML 1
16977 _ACEOF
16978
16979   fi
16980
16981 fi
16982
16983
16984 # Check for the various Gnome help and URL loading programs.
16985 #
16986 WITH_BROWSER=gnome-open
16987 if test "$have_gtk" = yes; then
16988   for ac_prog in gnome-open
16989 do
16990   # Extract the first word of "$ac_prog", so it can be a program name with args.
16991 set dummy $ac_prog; ac_word=$2
16992 { echo "$as_me:$LINENO: checking for $ac_word" >&5
16993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16994 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
16995   echo $ECHO_N "(cached) $ECHO_C" >&6
16996 else
16997   if test -n "$gnome_open_program"; then
16998   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
16999 else
17000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17001 for as_dir in $PATH
17002 do
17003   IFS=$as_save_IFS
17004   test -z "$as_dir" && as_dir=.
17005   for ac_exec_ext in '' $ac_executable_extensions; do
17006   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
17007     ac_cv_prog_gnome_open_program="$ac_prog"
17008     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17009     break 2
17010   fi
17011 done
17012 done
17013 IFS=$as_save_IFS
17014
17015 fi
17016 fi
17017 gnome_open_program=$ac_cv_prog_gnome_open_program
17018 if test -n "$gnome_open_program"; then
17019   { echo "$as_me:$LINENO: result: $gnome_open_program" >&5
17020 echo "${ECHO_T}$gnome_open_program" >&6; }
17021 else
17022   { echo "$as_me:$LINENO: result: no" >&5
17023 echo "${ECHO_T}no" >&6; }
17024 fi
17025
17026
17027   test -n "$gnome_open_program" && break
17028 done
17029
17030   for ac_prog in gnome-url-show
17031 do
17032   # Extract the first word of "$ac_prog", so it can be a program name with args.
17033 set dummy $ac_prog; ac_word=$2
17034 { echo "$as_me:$LINENO: checking for $ac_word" >&5
17035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
17036 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
17037   echo $ECHO_N "(cached) $ECHO_C" >&6
17038 else
17039   if test -n "$gnome_url_show_program"; then
17040   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
17041 else
17042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17043 for as_dir in $PATH
17044 do
17045   IFS=$as_save_IFS
17046   test -z "$as_dir" && as_dir=.
17047   for ac_exec_ext in '' $ac_executable_extensions; do
17048   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
17049     ac_cv_prog_gnome_url_show_program="$ac_prog"
17050     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17051     break 2
17052   fi
17053 done
17054 done
17055 IFS=$as_save_IFS
17056
17057 fi
17058 fi
17059 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
17060 if test -n "$gnome_url_show_program"; then
17061   { echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
17062 echo "${ECHO_T}$gnome_url_show_program" >&6; }
17063 else
17064   { echo "$as_me:$LINENO: result: no" >&5
17065 echo "${ECHO_T}no" >&6; }
17066 fi
17067
17068
17069   test -n "$gnome_url_show_program" && break
17070 done
17071
17072 fi
17073
17074
17075 ###############################################################################
17076 #
17077 #       Check for -lXm.
17078 #
17079 ###############################################################################
17080
17081 have_motif=no
17082 with_motif_req=unspecified
17083
17084 # Check whether --with-motif was given.
17085 if test "${with_motif+set}" = set; then
17086   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
17087 else
17088   with_motif=no
17089 fi
17090
17091
17092
17093    case "$with_motif" in
17094     yes) ;;
17095     no)  ;;
17096
17097     /*)
17098      { echo "$as_me:$LINENO: checking for Motif headers" >&5
17099 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6; }
17100      d=$with_motif/include
17101      if test -d $d; then
17102        X_CFLAGS="-I$d $X_CFLAGS"
17103        { echo "$as_me:$LINENO: result: $d" >&5
17104 echo "${ECHO_T}$d" >&6; }
17105      else
17106        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17107 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17108      fi
17109
17110      { echo "$as_me:$LINENO: checking for Motif libs" >&5
17111 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6; }
17112      d=$with_motif/lib
17113      if test -d $d; then
17114        X_LIBS="-L$d $X_LIBS"
17115        { echo "$as_me:$LINENO: result: $d" >&5
17116 echo "${ECHO_T}$d" >&6; }
17117      else
17118        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17119 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17120      fi
17121
17122      # replace the directory string with "yes".
17123      with_motif_req="yes"
17124      with_motif=$with_motif_req
17125      ;;
17126
17127     *)
17128      echo ""
17129      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
17130      echo "       If it is a directory, then \`DIR/include' will be added to"
17131      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17132      exit 1
17133      ;;
17134    esac
17135
17136
17137 if test "$with_motif" != yes -a "$with_motif" != no ; then
17138   echo "error: must be yes or no: --with-motif=$with_motif"
17139   exit 1
17140 fi
17141
17142 if test "$with_motif" = yes; then
17143   have_motif=no
17144
17145   ac_save_CPPFLAGS="$CPPFLAGS"
17146   if test \! -z "$includedir" ; then
17147     CPPFLAGS="$CPPFLAGS -I$includedir"
17148   fi
17149   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17150   { echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
17151 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6; }
17152 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
17153   echo $ECHO_N "(cached) $ECHO_C" >&6
17154 else
17155   cat >conftest.$ac_ext <<_ACEOF
17156 /* confdefs.h.  */
17157 _ACEOF
17158 cat confdefs.h >>conftest.$ac_ext
17159 cat >>conftest.$ac_ext <<_ACEOF
17160 /* end confdefs.h.  */
17161 #include <stdlib.h>
17162                      #include <stdio.h>
17163                      #include <X11/Intrinsic.h>
17164
17165 #include <Xm/Xm.h>
17166 _ACEOF
17167 rm -f conftest.$ac_objext
17168 if { (ac_try="$ac_compile"
17169 case "(($ac_try" in
17170   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17171   *) ac_try_echo=$ac_try;;
17172 esac
17173 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17174   (eval "$ac_compile") 2>conftest.er1
17175   ac_status=$?
17176   grep -v '^ *+' conftest.er1 >conftest.err
17177   rm -f conftest.er1
17178   cat conftest.err >&5
17179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17180   (exit $ac_status); } &&
17181          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17182   { (case "(($ac_try" in
17183   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17184   *) ac_try_echo=$ac_try;;
17185 esac
17186 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17187   (eval "$ac_try") 2>&5
17188   ac_status=$?
17189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17190   (exit $ac_status); }; } &&
17191          { ac_try='test -s conftest.$ac_objext'
17192   { (case "(($ac_try" in
17193   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17194   *) ac_try_echo=$ac_try;;
17195 esac
17196 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17197   (eval "$ac_try") 2>&5
17198   ac_status=$?
17199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17200   (exit $ac_status); }; }; then
17201   ac_cv_header_Xm_Xm_h=yes
17202 else
17203   echo "$as_me: failed program was:" >&5
17204 sed 's/^/| /' conftest.$ac_ext >&5
17205
17206         ac_cv_header_Xm_Xm_h=no
17207 fi
17208
17209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17210 fi
17211 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
17212 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6; }
17213 if test $ac_cv_header_Xm_Xm_h = yes; then
17214   have_motif=yes
17215                      cat >>confdefs.h <<\_ACEOF
17216 #define HAVE_MOTIF 1
17217 _ACEOF
17218
17219                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
17220 fi
17221
17222
17223   CPPFLAGS="$ac_save_CPPFLAGS"
17224 fi
17225
17226
17227 if test "$have_motif" = yes; then
17228
17229   ac_save_CPPFLAGS="$CPPFLAGS"
17230   if test \! -z "$includedir" ; then
17231     CPPFLAGS="$CPPFLAGS -I$includedir"
17232   fi
17233   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17234   { echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
17235 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6; }
17236 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
17237   echo $ECHO_N "(cached) $ECHO_C" >&6
17238 else
17239   cat >conftest.$ac_ext <<_ACEOF
17240 /* confdefs.h.  */
17241 _ACEOF
17242 cat confdefs.h >>conftest.$ac_ext
17243 cat >>conftest.$ac_ext <<_ACEOF
17244 /* end confdefs.h.  */
17245 #include <stdlib.h>
17246                      #include <stdio.h>
17247                      #include <X11/Intrinsic.h>
17248
17249 #include <Xm/ComboBox.h>
17250 _ACEOF
17251 rm -f conftest.$ac_objext
17252 if { (ac_try="$ac_compile"
17253 case "(($ac_try" in
17254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17255   *) ac_try_echo=$ac_try;;
17256 esac
17257 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17258   (eval "$ac_compile") 2>conftest.er1
17259   ac_status=$?
17260   grep -v '^ *+' conftest.er1 >conftest.err
17261   rm -f conftest.er1
17262   cat conftest.err >&5
17263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17264   (exit $ac_status); } &&
17265          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17266   { (case "(($ac_try" in
17267   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17268   *) ac_try_echo=$ac_try;;
17269 esac
17270 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17271   (eval "$ac_try") 2>&5
17272   ac_status=$?
17273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17274   (exit $ac_status); }; } &&
17275          { ac_try='test -s conftest.$ac_objext'
17276   { (case "(($ac_try" in
17277   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17278   *) ac_try_echo=$ac_try;;
17279 esac
17280 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17281   (eval "$ac_try") 2>&5
17282   ac_status=$?
17283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17284   (exit $ac_status); }; }; then
17285   ac_cv_header_Xm_ComboBox_h=yes
17286 else
17287   echo "$as_me: failed program was:" >&5
17288 sed 's/^/| /' conftest.$ac_ext >&5
17289
17290         ac_cv_header_Xm_ComboBox_h=no
17291 fi
17292
17293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17294 fi
17295 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
17296 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6; }
17297 if test $ac_cv_header_Xm_ComboBox_h = yes; then
17298   cat >>confdefs.h <<\_ACEOF
17299 #define HAVE_XMCOMBOBOX 1
17300 _ACEOF
17301
17302 fi
17303
17304
17305   CPPFLAGS="$ac_save_CPPFLAGS"
17306 fi
17307
17308
17309 ###############################################################################
17310 #
17311 #       Checking whether Motif is really Lesstif.
17312 #
17313 ###############################################################################
17314
17315 have_lesstif=no
17316 if test "$have_motif" = yes ; then
17317   { echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
17318 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6; }
17319 if test "${ac_cv_have_lesstif+set}" = set; then
17320   echo $ECHO_N "(cached) $ECHO_C" >&6
17321 else
17322
17323   ac_save_CPPFLAGS="$CPPFLAGS"
17324   if test \! -z "$includedir" ; then
17325     CPPFLAGS="$CPPFLAGS -I$includedir"
17326   fi
17327   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17328   cat >conftest.$ac_ext <<_ACEOF
17329 /* confdefs.h.  */
17330 _ACEOF
17331 cat confdefs.h >>conftest.$ac_ext
17332 cat >>conftest.$ac_ext <<_ACEOF
17333 /* end confdefs.h.  */
17334 #include <Xm/Xm.h>
17335 int
17336 main ()
17337 {
17338 long vers = LesstifVersion;
17339   ;
17340   return 0;
17341 }
17342 _ACEOF
17343 rm -f conftest.$ac_objext
17344 if { (ac_try="$ac_compile"
17345 case "(($ac_try" in
17346   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17347   *) ac_try_echo=$ac_try;;
17348 esac
17349 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17350   (eval "$ac_compile") 2>conftest.er1
17351   ac_status=$?
17352   grep -v '^ *+' conftest.er1 >conftest.err
17353   rm -f conftest.er1
17354   cat conftest.err >&5
17355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17356   (exit $ac_status); } &&
17357          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17358   { (case "(($ac_try" in
17359   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17360   *) ac_try_echo=$ac_try;;
17361 esac
17362 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17363   (eval "$ac_try") 2>&5
17364   ac_status=$?
17365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17366   (exit $ac_status); }; } &&
17367          { ac_try='test -s conftest.$ac_objext'
17368   { (case "(($ac_try" in
17369   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17370   *) ac_try_echo=$ac_try;;
17371 esac
17372 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17373   (eval "$ac_try") 2>&5
17374   ac_status=$?
17375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17376   (exit $ac_status); }; }; then
17377   ac_cv_have_lesstif=yes
17378 else
17379   echo "$as_me: failed program was:" >&5
17380 sed 's/^/| /' conftest.$ac_ext >&5
17381
17382         ac_cv_have_lesstif=no
17383 fi
17384
17385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17386   CPPFLAGS="$ac_save_CPPFLAGS"
17387 fi
17388 { echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
17389 echo "${ECHO_T}$ac_cv_have_lesstif" >&6; }
17390   have_lesstif=$ac_cv_have_lesstif
17391 fi
17392
17393
17394 lesstif_version=unknown
17395 lesstif_version_string=unknown
17396
17397 if test "$have_lesstif" = yes ; then
17398   ltv=unknown
17399   echo unknown > conftest-lt
17400   { echo "$as_me:$LINENO: checking LessTif version number" >&5
17401 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6; }
17402 if test "${ac_cv_lesstif_version_string+set}" = set; then
17403   echo $ECHO_N "(cached) $ECHO_C" >&6
17404 else
17405
17406   ac_save_CPPFLAGS="$CPPFLAGS"
17407   if test \! -z "$includedir" ; then
17408     CPPFLAGS="$CPPFLAGS -I$includedir"
17409   fi
17410   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17411   if test "$cross_compiling" = yes; then
17412   ac_cv_lesstif_version=unknown
17413                      ac_cv_lesstif_version_string=unknown
17414 else
17415   cat >conftest.$ac_ext <<_ACEOF
17416 /* confdefs.h.  */
17417 _ACEOF
17418 cat confdefs.h >>conftest.$ac_ext
17419 cat >>conftest.$ac_ext <<_ACEOF
17420 /* end confdefs.h.  */
17421 #include <stdio.h>
17422                      #include <Xm/Xm.h>
17423                      int main() {
17424                        FILE *f = fopen("conftest-lt", "w");
17425                        if (!f) exit(1);
17426                        fprintf(f, "%d %d.%d\n", LesstifVersion,
17427                           LESSTIF_VERSION, LESSTIF_REVISION);
17428                        fclose(f);
17429                        exit(0);
17430                      }
17431 _ACEOF
17432 rm -f conftest$ac_exeext
17433 if { (ac_try="$ac_link"
17434 case "(($ac_try" in
17435   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17436   *) ac_try_echo=$ac_try;;
17437 esac
17438 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17439   (eval "$ac_link") 2>&5
17440   ac_status=$?
17441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17442   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17443   { (case "(($ac_try" in
17444   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17445   *) ac_try_echo=$ac_try;;
17446 esac
17447 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17448   (eval "$ac_try") 2>&5
17449   ac_status=$?
17450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17451   (exit $ac_status); }; }; then
17452   ltv=`cat conftest-lt`
17453                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
17454                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
17455 else
17456   echo "$as_me: program exited with status $ac_status" >&5
17457 echo "$as_me: failed program was:" >&5
17458 sed 's/^/| /' conftest.$ac_ext >&5
17459
17460 ( exit $ac_status )
17461 ac_cv_lesstif_version=unknown
17462                      ac_cv_lesstif_version_string=unknown
17463 fi
17464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17465 fi
17466
17467
17468   CPPFLAGS="$ac_save_CPPFLAGS"
17469 fi
17470 { echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
17471 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6; }
17472   rm -f conftest-lt
17473   lesstif_version=$ac_cv_lesstif_version
17474   lesstif_version_string=$ac_cv_lesstif_version_string
17475
17476 fi
17477
17478
17479 if test "$have_motif" = yes ; then
17480   mtv=unknown
17481   echo unknown > conftest-mt
17482   { echo "$as_me:$LINENO: checking Motif version number" >&5
17483 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6; }
17484 if test "${ac_cv_motif_version_string+set}" = set; then
17485   echo $ECHO_N "(cached) $ECHO_C" >&6
17486 else
17487
17488   ac_save_CPPFLAGS="$CPPFLAGS"
17489   if test \! -z "$includedir" ; then
17490     CPPFLAGS="$CPPFLAGS -I$includedir"
17491   fi
17492   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17493   if test "$cross_compiling" = yes; then
17494   ac_cv_motif_version=unknown
17495                      ac_cv_motif_version_string=unknown
17496 else
17497   cat >conftest.$ac_ext <<_ACEOF
17498 /* confdefs.h.  */
17499 _ACEOF
17500 cat confdefs.h >>conftest.$ac_ext
17501 cat >>conftest.$ac_ext <<_ACEOF
17502 /* end confdefs.h.  */
17503 #include <stdio.h>
17504                      #include <Xm/Xm.h>
17505                      int main() {
17506                        FILE *f = fopen("conftest-mt", "w");
17507                        if (!f) exit(1);
17508                        fprintf(f, "%d %d.%d\n", XmVersion,
17509                           XmVERSION, XmREVISION);
17510                        fclose(f);
17511                        exit(0);
17512                      }
17513 _ACEOF
17514 rm -f conftest$ac_exeext
17515 if { (ac_try="$ac_link"
17516 case "(($ac_try" in
17517   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17518   *) ac_try_echo=$ac_try;;
17519 esac
17520 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17521   (eval "$ac_link") 2>&5
17522   ac_status=$?
17523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17524   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17525   { (case "(($ac_try" in
17526   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17527   *) ac_try_echo=$ac_try;;
17528 esac
17529 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17530   (eval "$ac_try") 2>&5
17531   ac_status=$?
17532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17533   (exit $ac_status); }; }; then
17534   mtv=`cat conftest-mt`
17535                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
17536                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
17537 else
17538   echo "$as_me: program exited with status $ac_status" >&5
17539 echo "$as_me: failed program was:" >&5
17540 sed 's/^/| /' conftest.$ac_ext >&5
17541
17542 ( exit $ac_status )
17543 ac_cv_motif_version=unknown
17544                      ac_cv_motif_version_string=unknown
17545 fi
17546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17547 fi
17548
17549
17550   CPPFLAGS="$ac_save_CPPFLAGS"
17551 fi
17552 { echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
17553 echo "${ECHO_T}$ac_cv_motif_version_string" >&6; }
17554   rm -f conftest-mt
17555   motif_version=$ac_cv_motif_version
17556   motif_version_string=$ac_cv_motif_version_string
17557
17558 fi
17559
17560
17561 ###############################################################################
17562 #
17563 #       Checking whether Motif requires -lXpm.
17564 #
17565 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
17566 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
17567 #       of the library whether to build the XPM code into libXm, or whether
17568 #       to rely on an external libXm.  So the only way to tell whether XPM is
17569 #       a link-time requirement is to examine libXm.a, which is very
17570 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
17571 #       always link against XPM if the XPM lib exists (and this will be a
17572 #       no-op if libXm happens to already have the XPM code in it.)
17573 #
17574 ###############################################################################
17575
17576 motif_requires_xpm=no
17577 if test "$have_motif" = yes ; then
17578    { echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
17579 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6; }
17580    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
17581    then
17582      motif_requires_xpm=yes
17583      { echo "$as_me:$LINENO: result: maybe" >&5
17584 echo "${ECHO_T}maybe" >&6; }
17585    else
17586      { echo "$as_me:$LINENO: result: no" >&5
17587 echo "${ECHO_T}no" >&6; }
17588    fi
17589 fi
17590
17591
17592 ###############################################################################
17593 #
17594 #       Checking whether Motif requires -lXp.
17595 #
17596 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
17597 #       Extension".   Why this extension isn't in -lXext with all the others,
17598 #       I have no idea.
17599 #
17600 ###############################################################################
17601
17602 have_xp_ext=no
17603 if test "$have_motif" = yes ; then
17604    have_xp_ext=no
17605
17606   ac_save_CPPFLAGS="$CPPFLAGS"
17607   ac_save_LDFLAGS="$LDFLAGS"
17608 #  ac_save_LIBS="$LIBS"
17609
17610   if test \! -z "$includedir" ; then
17611     CPPFLAGS="$CPPFLAGS -I$includedir"
17612   fi
17613   # note: $X_CFLAGS includes $x_includes
17614   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17615
17616   if test \! -z "$libdir" ; then
17617     LDFLAGS="$LDFLAGS -L$libdir"
17618   fi
17619   # note: $X_LIBS includes $x_libraries
17620   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17621
17622   { echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
17623 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6; }
17624 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
17625   echo $ECHO_N "(cached) $ECHO_C" >&6
17626 else
17627   ac_check_lib_save_LIBS=$LIBS
17628 LIBS="-lXp -lX11 -lXext -lm $LIBS"
17629 cat >conftest.$ac_ext <<_ACEOF
17630 /* confdefs.h.  */
17631 _ACEOF
17632 cat confdefs.h >>conftest.$ac_ext
17633 cat >>conftest.$ac_ext <<_ACEOF
17634 /* end confdefs.h.  */
17635
17636 /* Override any GCC internal prototype to avoid an error.
17637    Use char because int might match the return type of a GCC
17638    builtin and then its argument prototype would still apply.  */
17639 #ifdef __cplusplus
17640 extern "C"
17641 #endif
17642 char XpQueryExtension ();
17643 int
17644 main ()
17645 {
17646 return XpQueryExtension ();
17647   ;
17648   return 0;
17649 }
17650 _ACEOF
17651 rm -f conftest.$ac_objext conftest$ac_exeext
17652 if { (ac_try="$ac_link"
17653 case "(($ac_try" in
17654   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17655   *) ac_try_echo=$ac_try;;
17656 esac
17657 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17658   (eval "$ac_link") 2>conftest.er1
17659   ac_status=$?
17660   grep -v '^ *+' conftest.er1 >conftest.err
17661   rm -f conftest.er1
17662   cat conftest.err >&5
17663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17664   (exit $ac_status); } &&
17665          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17666   { (case "(($ac_try" in
17667   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17668   *) ac_try_echo=$ac_try;;
17669 esac
17670 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17671   (eval "$ac_try") 2>&5
17672   ac_status=$?
17673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17674   (exit $ac_status); }; } &&
17675          { ac_try='test -s conftest$ac_exeext'
17676   { (case "(($ac_try" in
17677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17678   *) ac_try_echo=$ac_try;;
17679 esac
17680 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17681   (eval "$ac_try") 2>&5
17682   ac_status=$?
17683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17684   (exit $ac_status); }; }; then
17685   ac_cv_lib_Xp_XpQueryExtension=yes
17686 else
17687   echo "$as_me: failed program was:" >&5
17688 sed 's/^/| /' conftest.$ac_ext >&5
17689
17690         ac_cv_lib_Xp_XpQueryExtension=no
17691 fi
17692
17693 rm -f core conftest.err conftest.$ac_objext \
17694       conftest$ac_exeext conftest.$ac_ext
17695 LIBS=$ac_check_lib_save_LIBS
17696 fi
17697 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
17698 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6; }
17699 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
17700   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
17701 else
17702   true
17703 fi
17704
17705   CPPFLAGS="$ac_save_CPPFLAGS"
17706   LDFLAGS="$ac_save_LDFLAGS"
17707 #  LIBS="$ac_save_LIBS"
17708
17709 fi
17710
17711
17712 ###############################################################################
17713 #
17714 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
17715 #
17716 ###############################################################################
17717
17718 have_xintl=no
17719 if test "$have_motif" = yes ; then
17720
17721   ac_save_CPPFLAGS="$CPPFLAGS"
17722   ac_save_LDFLAGS="$LDFLAGS"
17723 #  ac_save_LIBS="$LIBS"
17724
17725   if test \! -z "$includedir" ; then
17726     CPPFLAGS="$CPPFLAGS -I$includedir"
17727   fi
17728   # note: $X_CFLAGS includes $x_includes
17729   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17730
17731   if test \! -z "$libdir" ; then
17732     LDFLAGS="$LDFLAGS -L$libdir"
17733   fi
17734   # note: $X_LIBS includes $x_libraries
17735   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17736
17737   { echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
17738 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6; }
17739 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
17740   echo $ECHO_N "(cached) $ECHO_C" >&6
17741 else
17742   ac_check_lib_save_LIBS=$LIBS
17743 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
17744 cat >conftest.$ac_ext <<_ACEOF
17745 /* confdefs.h.  */
17746 _ACEOF
17747 cat confdefs.h >>conftest.$ac_ext
17748 cat >>conftest.$ac_ext <<_ACEOF
17749 /* end confdefs.h.  */
17750
17751 /* Override any GCC internal prototype to avoid an error.
17752    Use char because int might match the return type of a GCC
17753    builtin and then its argument prototype would still apply.  */
17754 #ifdef __cplusplus
17755 extern "C"
17756 #endif
17757 char _Xsetlocale ();
17758 int
17759 main ()
17760 {
17761 return _Xsetlocale ();
17762   ;
17763   return 0;
17764 }
17765 _ACEOF
17766 rm -f conftest.$ac_objext conftest$ac_exeext
17767 if { (ac_try="$ac_link"
17768 case "(($ac_try" in
17769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17770   *) ac_try_echo=$ac_try;;
17771 esac
17772 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17773   (eval "$ac_link") 2>conftest.er1
17774   ac_status=$?
17775   grep -v '^ *+' conftest.er1 >conftest.err
17776   rm -f conftest.er1
17777   cat conftest.err >&5
17778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17779   (exit $ac_status); } &&
17780          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17781   { (case "(($ac_try" in
17782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17783   *) ac_try_echo=$ac_try;;
17784 esac
17785 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17786   (eval "$ac_try") 2>&5
17787   ac_status=$?
17788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17789   (exit $ac_status); }; } &&
17790          { ac_try='test -s conftest$ac_exeext'
17791   { (case "(($ac_try" in
17792   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17793   *) ac_try_echo=$ac_try;;
17794 esac
17795 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17796   (eval "$ac_try") 2>&5
17797   ac_status=$?
17798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17799   (exit $ac_status); }; }; then
17800   ac_cv_lib_Xintl__Xsetlocale=yes
17801 else
17802   echo "$as_me: failed program was:" >&5
17803 sed 's/^/| /' conftest.$ac_ext >&5
17804
17805         ac_cv_lib_Xintl__Xsetlocale=no
17806 fi
17807
17808 rm -f core conftest.err conftest.$ac_objext \
17809       conftest$ac_exeext conftest.$ac_ext
17810 LIBS=$ac_check_lib_save_LIBS
17811 fi
17812 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
17813 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6; }
17814 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
17815   have_xintl=yes
17816 else
17817   have_xintl=no
17818 fi
17819
17820   CPPFLAGS="$ac_save_CPPFLAGS"
17821   LDFLAGS="$ac_save_LDFLAGS"
17822 #  LIBS="$ac_save_LIBS"
17823
17824   if test "$have_xintl" = yes; then
17825     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
17826   fi
17827 fi
17828
17829
17830 ###############################################################################
17831 #
17832 #       Check for -lGL or -lMesaGL.
17833 #
17834 ###############################################################################
17835
17836 have_gl=no
17837 ac_have_mesa_gl=no
17838 with_gl_req=unspecified
17839 gl_halfassed=no
17840
17841 # Check whether --with-gl was given.
17842 if test "${with_gl+set}" = set; then
17843   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
17844 else
17845   with_gl=yes
17846 fi
17847
17848
17849
17850    case "$with_gl" in
17851     yes) ;;
17852     no)  ;;
17853
17854     /*)
17855      { echo "$as_me:$LINENO: checking for GL headers" >&5
17856 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6; }
17857      d=$with_gl/include
17858      if test -d $d; then
17859        X_CFLAGS="-I$d $X_CFLAGS"
17860        { echo "$as_me:$LINENO: result: $d" >&5
17861 echo "${ECHO_T}$d" >&6; }
17862      else
17863        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17864 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17865      fi
17866
17867      { echo "$as_me:$LINENO: checking for GL libs" >&5
17868 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6; }
17869      d=$with_gl/lib
17870      if test -d $d; then
17871        X_LIBS="-L$d $X_LIBS"
17872        { echo "$as_me:$LINENO: result: $d" >&5
17873 echo "${ECHO_T}$d" >&6; }
17874      else
17875        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17876 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17877      fi
17878
17879      # replace the directory string with "yes".
17880      with_gl_req="yes"
17881      with_gl=$with_gl_req
17882      ;;
17883
17884     *)
17885      echo ""
17886      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
17887      echo "       If it is a directory, then \`DIR/include' will be added to"
17888      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17889      exit 1
17890      ;;
17891    esac
17892
17893
17894 ac_mesagl_version=unknown
17895 ac_mesagl_version_string=unknown
17896
17897 if test "$with_gl" = yes; then
17898
17899   ac_save_CPPFLAGS="$CPPFLAGS"
17900   if test \! -z "$includedir" ; then
17901     CPPFLAGS="$CPPFLAGS -I$includedir"
17902   fi
17903   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17904   if test "${ac_cv_header_GL_gl_h+set}" = set; then
17905   { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
17906 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
17907 if test "${ac_cv_header_GL_gl_h+set}" = set; then
17908   echo $ECHO_N "(cached) $ECHO_C" >&6
17909 fi
17910 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
17911 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
17912 else
17913   # Is the header compilable?
17914 { echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
17915 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6; }
17916 cat >conftest.$ac_ext <<_ACEOF
17917 /* confdefs.h.  */
17918 _ACEOF
17919 cat confdefs.h >>conftest.$ac_ext
17920 cat >>conftest.$ac_ext <<_ACEOF
17921 /* end confdefs.h.  */
17922 $ac_includes_default
17923 #include <GL/gl.h>
17924 _ACEOF
17925 rm -f conftest.$ac_objext
17926 if { (ac_try="$ac_compile"
17927 case "(($ac_try" in
17928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17929   *) ac_try_echo=$ac_try;;
17930 esac
17931 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17932   (eval "$ac_compile") 2>conftest.er1
17933   ac_status=$?
17934   grep -v '^ *+' conftest.er1 >conftest.err
17935   rm -f conftest.er1
17936   cat conftest.err >&5
17937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17938   (exit $ac_status); } &&
17939          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17940   { (case "(($ac_try" in
17941   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17942   *) ac_try_echo=$ac_try;;
17943 esac
17944 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17945   (eval "$ac_try") 2>&5
17946   ac_status=$?
17947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17948   (exit $ac_status); }; } &&
17949          { ac_try='test -s conftest.$ac_objext'
17950   { (case "(($ac_try" in
17951   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17952   *) ac_try_echo=$ac_try;;
17953 esac
17954 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17955   (eval "$ac_try") 2>&5
17956   ac_status=$?
17957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17958   (exit $ac_status); }; }; then
17959   ac_header_compiler=yes
17960 else
17961   echo "$as_me: failed program was:" >&5
17962 sed 's/^/| /' conftest.$ac_ext >&5
17963
17964         ac_header_compiler=no
17965 fi
17966
17967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17968 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17969 echo "${ECHO_T}$ac_header_compiler" >&6; }
17970
17971 # Is the header present?
17972 { echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
17973 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6; }
17974 cat >conftest.$ac_ext <<_ACEOF
17975 /* confdefs.h.  */
17976 _ACEOF
17977 cat confdefs.h >>conftest.$ac_ext
17978 cat >>conftest.$ac_ext <<_ACEOF
17979 /* end confdefs.h.  */
17980 #include <GL/gl.h>
17981 _ACEOF
17982 if { (ac_try="$ac_cpp conftest.$ac_ext"
17983 case "(($ac_try" in
17984   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17985   *) ac_try_echo=$ac_try;;
17986 esac
17987 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17988   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17989   ac_status=$?
17990   grep -v '^ *+' conftest.er1 >conftest.err
17991   rm -f conftest.er1
17992   cat conftest.err >&5
17993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17994   (exit $ac_status); } >/dev/null; then
17995   if test -s conftest.err; then
17996     ac_cpp_err=$ac_c_preproc_warn_flag
17997     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17998   else
17999     ac_cpp_err=
18000   fi
18001 else
18002   ac_cpp_err=yes
18003 fi
18004 if test -z "$ac_cpp_err"; then
18005   ac_header_preproc=yes
18006 else
18007   echo "$as_me: failed program was:" >&5
18008 sed 's/^/| /' conftest.$ac_ext >&5
18009
18010   ac_header_preproc=no
18011 fi
18012
18013 rm -f conftest.err conftest.$ac_ext
18014 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18015 echo "${ECHO_T}$ac_header_preproc" >&6; }
18016
18017 # So?  What about this header?
18018 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18019   yes:no: )
18020     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
18021 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18022     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
18023 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
18024     ac_header_preproc=yes
18025     ;;
18026   no:yes:* )
18027     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
18028 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
18029     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
18030 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
18031     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
18032 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
18033     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
18034 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18035     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
18036 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
18037     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
18038 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
18039
18040     ;;
18041 esac
18042 { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
18043 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
18044 if test "${ac_cv_header_GL_gl_h+set}" = set; then
18045   echo $ECHO_N "(cached) $ECHO_C" >&6
18046 else
18047   ac_cv_header_GL_gl_h=$ac_header_preproc
18048 fi
18049 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
18050 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
18051
18052 fi
18053 if test $ac_cv_header_GL_gl_h = yes; then
18054   have_gl=yes
18055 else
18056   have_gl=no
18057 fi
18058
18059
18060   CPPFLAGS="$ac_save_CPPFLAGS"
18061   if test "$have_gl" = yes ; then
18062
18063   ac_save_CPPFLAGS="$CPPFLAGS"
18064   if test \! -z "$includedir" ; then
18065     CPPFLAGS="$CPPFLAGS -I$includedir"
18066   fi
18067   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18068   { echo "$as_me:$LINENO: checking for GL/glx.h" >&5
18069 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6; }
18070 if test "${ac_cv_header_GL_glx_h+set}" = set; then
18071   echo $ECHO_N "(cached) $ECHO_C" >&6
18072 else
18073   cat >conftest.$ac_ext <<_ACEOF
18074 /* confdefs.h.  */
18075 _ACEOF
18076 cat confdefs.h >>conftest.$ac_ext
18077 cat >>conftest.$ac_ext <<_ACEOF
18078 /* end confdefs.h.  */
18079 #include <GL/gl.h>
18080
18081 #include <GL/glx.h>
18082 _ACEOF
18083 rm -f conftest.$ac_objext
18084 if { (ac_try="$ac_compile"
18085 case "(($ac_try" in
18086   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18087   *) ac_try_echo=$ac_try;;
18088 esac
18089 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18090   (eval "$ac_compile") 2>conftest.er1
18091   ac_status=$?
18092   grep -v '^ *+' conftest.er1 >conftest.err
18093   rm -f conftest.er1
18094   cat conftest.err >&5
18095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18096   (exit $ac_status); } &&
18097          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18098   { (case "(($ac_try" in
18099   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18100   *) ac_try_echo=$ac_try;;
18101 esac
18102 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18103   (eval "$ac_try") 2>&5
18104   ac_status=$?
18105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18106   (exit $ac_status); }; } &&
18107          { ac_try='test -s conftest.$ac_objext'
18108   { (case "(($ac_try" in
18109   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18110   *) ac_try_echo=$ac_try;;
18111 esac
18112 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18113   (eval "$ac_try") 2>&5
18114   ac_status=$?
18115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18116   (exit $ac_status); }; }; then
18117   ac_cv_header_GL_glx_h=yes
18118 else
18119   echo "$as_me: failed program was:" >&5
18120 sed 's/^/| /' conftest.$ac_ext >&5
18121
18122         ac_cv_header_GL_glx_h=no
18123 fi
18124
18125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18126 fi
18127 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
18128 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6; }
18129 if test $ac_cv_header_GL_glx_h = yes; then
18130   have_gl=yes
18131 else
18132   have_gl=no
18133 fi
18134
18135
18136   CPPFLAGS="$ac_save_CPPFLAGS"
18137   fi
18138
18139   # If we have the headers, try and figure out which vendor it's from.
18140   #
18141   if test "$have_gl" = yes ; then
18142
18143     # We need to know whether it's MesaGL so that we know which libraries
18144     # to link against.
18145     #
18146     { echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
18147 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6; }
18148 if test "${ac_cv_have_mesa_gl+set}" = set; then
18149   echo $ECHO_N "(cached) $ECHO_C" >&6
18150 else
18151   ac_cv_have_mesa_gl=no
18152
18153   ac_save_CPPFLAGS="$CPPFLAGS"
18154   if test \! -z "$includedir" ; then
18155     CPPFLAGS="$CPPFLAGS -I$includedir"
18156   fi
18157   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18158   cat >conftest.$ac_ext <<_ACEOF
18159 /* confdefs.h.  */
18160 _ACEOF
18161 cat confdefs.h >>conftest.$ac_ext
18162 cat >>conftest.$ac_ext <<_ACEOF
18163 /* end confdefs.h.  */
18164 #include <GL/glx.h>
18165
18166 _ACEOF
18167 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18168   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
18169   ac_cv_have_mesa_gl=yes
18170 fi
18171 rm -f conftest*
18172
18173   CPPFLAGS="$ac_save_CPPFLAGS"
18174
18175 fi
18176 { echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
18177 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6; }
18178     ac_have_mesa_gl=$ac_cv_have_mesa_gl
18179
18180
18181     gl_lib_1=""
18182     GL_LIBS=""
18183
18184
18185     # Some versions of MesaGL are compiled to require -lpthread.
18186     # So if the Mesa headers exist, and -lpthread exists, then always
18187     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
18188     #
18189     if test "$ac_have_mesa_gl" = yes; then
18190       { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
18191 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
18192 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
18193   echo $ECHO_N "(cached) $ECHO_C" >&6
18194 else
18195   ac_check_lib_save_LIBS=$LIBS
18196 LIBS="-lpthread  $LIBS"
18197 cat >conftest.$ac_ext <<_ACEOF
18198 /* confdefs.h.  */
18199 _ACEOF
18200 cat confdefs.h >>conftest.$ac_ext
18201 cat >>conftest.$ac_ext <<_ACEOF
18202 /* end confdefs.h.  */
18203
18204 /* Override any GCC internal prototype to avoid an error.
18205    Use char because int might match the return type of a GCC
18206    builtin and then its argument prototype would still apply.  */
18207 #ifdef __cplusplus
18208 extern "C"
18209 #endif
18210 char pthread_create ();
18211 int
18212 main ()
18213 {
18214 return pthread_create ();
18215   ;
18216   return 0;
18217 }
18218 _ACEOF
18219 rm -f conftest.$ac_objext conftest$ac_exeext
18220 if { (ac_try="$ac_link"
18221 case "(($ac_try" in
18222   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18223   *) ac_try_echo=$ac_try;;
18224 esac
18225 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18226   (eval "$ac_link") 2>conftest.er1
18227   ac_status=$?
18228   grep -v '^ *+' conftest.er1 >conftest.err
18229   rm -f conftest.er1
18230   cat conftest.err >&5
18231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18232   (exit $ac_status); } &&
18233          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18234   { (case "(($ac_try" in
18235   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18236   *) ac_try_echo=$ac_try;;
18237 esac
18238 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18239   (eval "$ac_try") 2>&5
18240   ac_status=$?
18241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18242   (exit $ac_status); }; } &&
18243          { ac_try='test -s conftest$ac_exeext'
18244   { (case "(($ac_try" in
18245   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18246   *) ac_try_echo=$ac_try;;
18247 esac
18248 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18249   (eval "$ac_try") 2>&5
18250   ac_status=$?
18251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18252   (exit $ac_status); }; }; then
18253   ac_cv_lib_pthread_pthread_create=yes
18254 else
18255   echo "$as_me: failed program was:" >&5
18256 sed 's/^/| /' conftest.$ac_ext >&5
18257
18258         ac_cv_lib_pthread_pthread_create=no
18259 fi
18260
18261 rm -f core conftest.err conftest.$ac_objext \
18262       conftest$ac_exeext conftest.$ac_ext
18263 LIBS=$ac_check_lib_save_LIBS
18264 fi
18265 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
18266 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
18267 if test $ac_cv_lib_pthread_pthread_create = yes; then
18268   GL_LIBS="-lpthread"
18269 fi
18270
18271     fi
18272
18273
18274     # If we have Mesa headers, check to see if we can link against -lMesaGL.
18275     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
18276     # Else, warn that GL is busted.  (We have the headers, but no libs.)
18277     #
18278
18279     if test "$ac_have_mesa_gl" = yes ; then
18280
18281   ac_save_CPPFLAGS="$CPPFLAGS"
18282   ac_save_LDFLAGS="$LDFLAGS"
18283 #  ac_save_LIBS="$LIBS"
18284
18285   if test \! -z "$includedir" ; then
18286     CPPFLAGS="$CPPFLAGS -I$includedir"
18287   fi
18288   # note: $X_CFLAGS includes $x_includes
18289   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18290
18291   if test \! -z "$libdir" ; then
18292     LDFLAGS="$LDFLAGS -L$libdir"
18293   fi
18294   # note: $X_LIBS includes $x_libraries
18295   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18296
18297   { echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
18298 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6; }
18299 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
18300   echo $ECHO_N "(cached) $ECHO_C" >&6
18301 else
18302   ac_check_lib_save_LIBS=$LIBS
18303 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
18304 cat >conftest.$ac_ext <<_ACEOF
18305 /* confdefs.h.  */
18306 _ACEOF
18307 cat confdefs.h >>conftest.$ac_ext
18308 cat >>conftest.$ac_ext <<_ACEOF
18309 /* end confdefs.h.  */
18310
18311 /* Override any GCC internal prototype to avoid an error.
18312    Use char because int might match the return type of a GCC
18313    builtin and then its argument prototype would still apply.  */
18314 #ifdef __cplusplus
18315 extern "C"
18316 #endif
18317 char glXCreateContext ();
18318 int
18319 main ()
18320 {
18321 return glXCreateContext ();
18322   ;
18323   return 0;
18324 }
18325 _ACEOF
18326 rm -f conftest.$ac_objext conftest$ac_exeext
18327 if { (ac_try="$ac_link"
18328 case "(($ac_try" in
18329   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18330   *) ac_try_echo=$ac_try;;
18331 esac
18332 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18333   (eval "$ac_link") 2>conftest.er1
18334   ac_status=$?
18335   grep -v '^ *+' conftest.er1 >conftest.err
18336   rm -f conftest.er1
18337   cat conftest.err >&5
18338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18339   (exit $ac_status); } &&
18340          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18341   { (case "(($ac_try" in
18342   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18343   *) ac_try_echo=$ac_try;;
18344 esac
18345 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18346   (eval "$ac_try") 2>&5
18347   ac_status=$?
18348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18349   (exit $ac_status); }; } &&
18350          { ac_try='test -s conftest$ac_exeext'
18351   { (case "(($ac_try" in
18352   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18353   *) ac_try_echo=$ac_try;;
18354 esac
18355 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18356   (eval "$ac_try") 2>&5
18357   ac_status=$?
18358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18359   (exit $ac_status); }; }; then
18360   ac_cv_lib_MesaGL_glXCreateContext=yes
18361 else
18362   echo "$as_me: failed program was:" >&5
18363 sed 's/^/| /' conftest.$ac_ext >&5
18364
18365         ac_cv_lib_MesaGL_glXCreateContext=no
18366 fi
18367
18368 rm -f core conftest.err conftest.$ac_objext \
18369       conftest$ac_exeext conftest.$ac_ext
18370 LIBS=$ac_check_lib_save_LIBS
18371 fi
18372 { echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
18373 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
18374 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
18375   gl_lib_1="MesaGL"
18376                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
18377 fi
18378
18379   CPPFLAGS="$ac_save_CPPFLAGS"
18380   LDFLAGS="$ac_save_LDFLAGS"
18381 #  LIBS="$ac_save_LIBS"
18382
18383     fi
18384
18385     if test "$gl_lib_1" = "" ; then
18386
18387   ac_save_CPPFLAGS="$CPPFLAGS"
18388   ac_save_LDFLAGS="$LDFLAGS"
18389 #  ac_save_LIBS="$LIBS"
18390
18391   if test \! -z "$includedir" ; then
18392     CPPFLAGS="$CPPFLAGS -I$includedir"
18393   fi
18394   # note: $X_CFLAGS includes $x_includes
18395   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18396
18397   if test \! -z "$libdir" ; then
18398     LDFLAGS="$LDFLAGS -L$libdir"
18399   fi
18400   # note: $X_LIBS includes $x_libraries
18401   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18402
18403   { echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
18404 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6; }
18405 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
18406   echo $ECHO_N "(cached) $ECHO_C" >&6
18407 else
18408   ac_check_lib_save_LIBS=$LIBS
18409 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
18410 cat >conftest.$ac_ext <<_ACEOF
18411 /* confdefs.h.  */
18412 _ACEOF
18413 cat confdefs.h >>conftest.$ac_ext
18414 cat >>conftest.$ac_ext <<_ACEOF
18415 /* end confdefs.h.  */
18416
18417 /* Override any GCC internal prototype to avoid an error.
18418    Use char because int might match the return type of a GCC
18419    builtin and then its argument prototype would still apply.  */
18420 #ifdef __cplusplus
18421 extern "C"
18422 #endif
18423 char glXCreateContext ();
18424 int
18425 main ()
18426 {
18427 return glXCreateContext ();
18428   ;
18429   return 0;
18430 }
18431 _ACEOF
18432 rm -f conftest.$ac_objext conftest$ac_exeext
18433 if { (ac_try="$ac_link"
18434 case "(($ac_try" in
18435   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18436   *) ac_try_echo=$ac_try;;
18437 esac
18438 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18439   (eval "$ac_link") 2>conftest.er1
18440   ac_status=$?
18441   grep -v '^ *+' conftest.er1 >conftest.err
18442   rm -f conftest.er1
18443   cat conftest.err >&5
18444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18445   (exit $ac_status); } &&
18446          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18447   { (case "(($ac_try" in
18448   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18449   *) ac_try_echo=$ac_try;;
18450 esac
18451 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18452   (eval "$ac_try") 2>&5
18453   ac_status=$?
18454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18455   (exit $ac_status); }; } &&
18456          { ac_try='test -s conftest$ac_exeext'
18457   { (case "(($ac_try" in
18458   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18459   *) ac_try_echo=$ac_try;;
18460 esac
18461 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18462   (eval "$ac_try") 2>&5
18463   ac_status=$?
18464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18465   (exit $ac_status); }; }; then
18466   ac_cv_lib_GL_glXCreateContext=yes
18467 else
18468   echo "$as_me: failed program was:" >&5
18469 sed 's/^/| /' conftest.$ac_ext >&5
18470
18471         ac_cv_lib_GL_glXCreateContext=no
18472 fi
18473
18474 rm -f core conftest.err conftest.$ac_objext \
18475       conftest$ac_exeext conftest.$ac_ext
18476 LIBS=$ac_check_lib_save_LIBS
18477 fi
18478 { echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
18479 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6; }
18480 if test $ac_cv_lib_GL_glXCreateContext = yes; then
18481   gl_lib_1="GL"
18482                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
18483 fi
18484
18485   CPPFLAGS="$ac_save_CPPFLAGS"
18486   LDFLAGS="$ac_save_LDFLAGS"
18487 #  LIBS="$ac_save_LIBS"
18488
18489     fi
18490
18491     if test "$gl_lib_1" = "" ; then
18492       # we have headers, but no libs -- bail.
18493       have_gl=no
18494       ac_have_mesa_gl=no
18495       gl_halfassed=yes
18496     else
18497       # linking works -- we can build the GL hacks.
18498       cat >>confdefs.h <<\_ACEOF
18499 #define HAVE_GL 1
18500 _ACEOF
18501
18502       if test "$ac_have_mesa_gl" = yes ; then
18503         cat >>confdefs.h <<\_ACEOF
18504 #define HAVE_MESA_GL 1
18505 _ACEOF
18506
18507       fi
18508     fi
18509   fi
18510
18511
18512   # Now that we know we have GL headers and libs, do some more GL testing.
18513   #
18514
18515   if test "$have_gl" = yes ; then
18516     # If it's MesaGL, we'd like to issue a warning if the version number
18517     # is less than or equal to 2.6, because that version had a security bug.
18518     #
18519     if test "$ac_have_mesa_gl" = yes; then
18520
18521       { echo "$as_me:$LINENO: checking MesaGL version number" >&5
18522 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6; }
18523 if test "${ac_cv_mesagl_version_string+set}" = set; then
18524   echo $ECHO_N "(cached) $ECHO_C" >&6
18525 else
18526   cat > conftest.$ac_ext <<EOF
18527 #line 18531 "configure"
18528 #include "confdefs.h"
18529 #include <GL/gl.h>
18530 #ifndef MESA_MAJOR_VERSION
18531 # include <GL/xmesa.h>
18532 # ifdef XMESA_MAJOR_VERSION
18533    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
18534       we have to check the XMesa version number (the number of the X protocol
18535       support, which seems to be the same as the Mesa version number.)
18536     */
18537 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
18538 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
18539 # else
18540    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
18541       so we have no way of telling what version of Mesa this is at all.
18542       So, we'll guess that the osmesa version (the "offscreen protocol")
18543       is less than or equal to the real mesa version number.  Except that
18544       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
18545       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
18546     */
18547 # include <GL/osmesa.h>
18548 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
18549 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
18550 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
18551 #   undef MESA_MINOR_VERSION
18552 #   define MESA_MINOR_VERSION 4 or newer, probably?
18553 #  endif
18554 # endif
18555 #endif
18556 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
18557 EOF
18558
18559          ac_save_CPPFLAGS="$CPPFLAGS"
18560          if test \! -z "$includedir" ; then
18561            CPPFLAGS="$CPPFLAGS -I$includedir"
18562          fi
18563          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18564
18565          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
18566
18567          # M4 sucks!!
18568
18569           mglv=`echo "$mglv" | sed -n \
18570              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
18571
18572
18573          rm -f conftest.$ac_ext
18574
18575          CPPFLAGS="$ac_save_CPPFLAGS"
18576
18577          if test "$mglv" = ""; then
18578            ac_mesagl_version=unknown
18579            ac_mesagl_version_string=unknown
18580          else
18581            ac_mesagl_version_string="$mglv"
18582            # M4 sucks!!
18583
18584            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
18585            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
18586
18587            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
18588            if test -z "$ac_mesagl_version"; then
18589              ac_mesagl_version=unknown
18590              ac_mesagl_version_string=unknown
18591            fi
18592          fi
18593          ac_cv_mesagl_version=$ac_mesagl_version
18594          ac_cv_mesagl_version_string=$ac_mesagl_version_string
18595
18596 fi
18597 { echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
18598 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6; }
18599       ac_mesagl_version=$ac_cv_mesagl_version
18600       ac_mesagl_version_string=$ac_cv_mesagl_version_string
18601     fi
18602
18603
18604     # Check for OpenGL 1.1 features.
18605     #
18606
18607   ac_save_CPPFLAGS="$CPPFLAGS"
18608   ac_save_LDFLAGS="$LDFLAGS"
18609 #  ac_save_LIBS="$LIBS"
18610
18611   if test \! -z "$includedir" ; then
18612     CPPFLAGS="$CPPFLAGS -I$includedir"
18613   fi
18614   # note: $X_CFLAGS includes $x_includes
18615   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18616
18617   if test \! -z "$libdir" ; then
18618     LDFLAGS="$LDFLAGS -L$libdir"
18619   fi
18620   # note: $X_LIBS includes $x_libraries
18621   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18622
18623   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
18624 { echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
18625 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6; }
18626 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
18627   echo $ECHO_N "(cached) $ECHO_C" >&6
18628 else
18629   ac_check_lib_save_LIBS=$LIBS
18630 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
18631 cat >conftest.$ac_ext <<_ACEOF
18632 /* confdefs.h.  */
18633 _ACEOF
18634 cat confdefs.h >>conftest.$ac_ext
18635 cat >>conftest.$ac_ext <<_ACEOF
18636 /* end confdefs.h.  */
18637
18638 /* Override any GCC internal prototype to avoid an error.
18639    Use char because int might match the return type of a GCC
18640    builtin and then its argument prototype would still apply.  */
18641 #ifdef __cplusplus
18642 extern "C"
18643 #endif
18644 char glBindTexture ();
18645 int
18646 main ()
18647 {
18648 return glBindTexture ();
18649   ;
18650   return 0;
18651 }
18652 _ACEOF
18653 rm -f conftest.$ac_objext conftest$ac_exeext
18654 if { (ac_try="$ac_link"
18655 case "(($ac_try" in
18656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18657   *) ac_try_echo=$ac_try;;
18658 esac
18659 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18660   (eval "$ac_link") 2>conftest.er1
18661   ac_status=$?
18662   grep -v '^ *+' conftest.er1 >conftest.err
18663   rm -f conftest.er1
18664   cat conftest.err >&5
18665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18666   (exit $ac_status); } &&
18667          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18668   { (case "(($ac_try" in
18669   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18670   *) ac_try_echo=$ac_try;;
18671 esac
18672 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18673   (eval "$ac_try") 2>&5
18674   ac_status=$?
18675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18676   (exit $ac_status); }; } &&
18677          { ac_try='test -s conftest$ac_exeext'
18678   { (case "(($ac_try" in
18679   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18680   *) ac_try_echo=$ac_try;;
18681 esac
18682 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18683   (eval "$ac_try") 2>&5
18684   ac_status=$?
18685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18686   (exit $ac_status); }; }; then
18687   eval "$as_ac_Lib=yes"
18688 else
18689   echo "$as_me: failed program was:" >&5
18690 sed 's/^/| /' conftest.$ac_ext >&5
18691
18692         eval "$as_ac_Lib=no"
18693 fi
18694
18695 rm -f core conftest.err conftest.$ac_objext \
18696       conftest$ac_exeext conftest.$ac_ext
18697 LIBS=$ac_check_lib_save_LIBS
18698 fi
18699 ac_res=`eval echo '${'$as_ac_Lib'}'`
18700                { echo "$as_me:$LINENO: result: $ac_res" >&5
18701 echo "${ECHO_T}$ac_res" >&6; }
18702 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
18703   cat >>confdefs.h <<\_ACEOF
18704 #define HAVE_GLBINDTEXTURE 1
18705 _ACEOF
18706
18707 else
18708   true
18709 fi
18710
18711   CPPFLAGS="$ac_save_CPPFLAGS"
18712   LDFLAGS="$ac_save_LDFLAGS"
18713 #  LIBS="$ac_save_LIBS"
18714
18715   fi
18716
18717 elif test "$with_gl" != no; then
18718   echo "error: must be yes or no: --with-gl=$with_gl"
18719   exit 1
18720 fi
18721
18722
18723 ###############################################################################
18724 #
18725 #       Check for -lgle.
18726 #
18727 ###############################################################################
18728
18729 have_gle=no
18730 with_gle_req=unspecified
18731 gle_halfassed=no
18732
18733 # Check whether --with-gle was given.
18734 if test "${with_gle+set}" = set; then
18735   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
18736 else
18737   with_gle=yes
18738 fi
18739
18740
18741
18742    case "$with_gle" in
18743     yes) ;;
18744     no)  ;;
18745
18746     /*)
18747      { echo "$as_me:$LINENO: checking for GLE headers" >&5
18748 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6; }
18749      d=$with_gle/include
18750      if test -d $d; then
18751        X_CFLAGS="-I$d $X_CFLAGS"
18752        { echo "$as_me:$LINENO: result: $d" >&5
18753 echo "${ECHO_T}$d" >&6; }
18754      else
18755        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18756 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18757      fi
18758
18759      { echo "$as_me:$LINENO: checking for GLE libs" >&5
18760 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6; }
18761      d=$with_gle/lib
18762      if test -d $d; then
18763        X_LIBS="-L$d $X_LIBS"
18764        { echo "$as_me:$LINENO: result: $d" >&5
18765 echo "${ECHO_T}$d" >&6; }
18766      else
18767        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18768 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18769      fi
18770
18771      # replace the directory string with "yes".
18772      with_gle_req="yes"
18773      with_gle=$with_gle_req
18774      ;;
18775
18776     *)
18777      echo ""
18778      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
18779      echo "       If it is a directory, then \`DIR/include' will be added to"
18780      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18781      exit 1
18782      ;;
18783    esac
18784
18785
18786 GLE_LIBS=""
18787
18788 if test "$have_gl" = no ; then
18789  true
18790 elif test "$with_gle" = yes; then
18791
18792
18793   ac_save_CPPFLAGS="$CPPFLAGS"
18794   if test \! -z "$includedir" ; then
18795     CPPFLAGS="$CPPFLAGS -I$includedir"
18796   fi
18797   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18798   { echo "$as_me:$LINENO: checking for GL/gle.h" >&5
18799 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6; }
18800 if test "${ac_cv_header_GL_gle_h+set}" = set; then
18801   echo $ECHO_N "(cached) $ECHO_C" >&6
18802 else
18803   cat >conftest.$ac_ext <<_ACEOF
18804 /* confdefs.h.  */
18805 _ACEOF
18806 cat confdefs.h >>conftest.$ac_ext
18807 cat >>conftest.$ac_ext <<_ACEOF
18808 /* end confdefs.h.  */
18809 #include <GL/gl.h>
18810
18811 #include <GL/gle.h>
18812 _ACEOF
18813 rm -f conftest.$ac_objext
18814 if { (ac_try="$ac_compile"
18815 case "(($ac_try" in
18816   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18817   *) ac_try_echo=$ac_try;;
18818 esac
18819 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18820   (eval "$ac_compile") 2>conftest.er1
18821   ac_status=$?
18822   grep -v '^ *+' conftest.er1 >conftest.err
18823   rm -f conftest.er1
18824   cat conftest.err >&5
18825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18826   (exit $ac_status); } &&
18827          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18828   { (case "(($ac_try" in
18829   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18830   *) ac_try_echo=$ac_try;;
18831 esac
18832 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18833   (eval "$ac_try") 2>&5
18834   ac_status=$?
18835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18836   (exit $ac_status); }; } &&
18837          { ac_try='test -s conftest.$ac_objext'
18838   { (case "(($ac_try" in
18839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18840   *) ac_try_echo=$ac_try;;
18841 esac
18842 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18843   (eval "$ac_try") 2>&5
18844   ac_status=$?
18845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18846   (exit $ac_status); }; }; then
18847   ac_cv_header_GL_gle_h=yes
18848 else
18849   echo "$as_me: failed program was:" >&5
18850 sed 's/^/| /' conftest.$ac_ext >&5
18851
18852         ac_cv_header_GL_gle_h=no
18853 fi
18854
18855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18856 fi
18857 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
18858 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6; }
18859 if test $ac_cv_header_GL_gle_h = yes; then
18860   have_gle3=yes
18861 else
18862   have_gle3=no
18863 fi
18864
18865
18866   CPPFLAGS="$ac_save_CPPFLAGS"
18867   if test "$have_gle3" = yes ; then
18868     have_gle=yes;
18869   else
18870
18871   ac_save_CPPFLAGS="$CPPFLAGS"
18872   if test \! -z "$includedir" ; then
18873     CPPFLAGS="$CPPFLAGS -I$includedir"
18874   fi
18875   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18876   { echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
18877 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6; }
18878 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
18879   echo $ECHO_N "(cached) $ECHO_C" >&6
18880 else
18881   cat >conftest.$ac_ext <<_ACEOF
18882 /* confdefs.h.  */
18883 _ACEOF
18884 cat confdefs.h >>conftest.$ac_ext
18885 cat >>conftest.$ac_ext <<_ACEOF
18886 /* end confdefs.h.  */
18887 #include <GL/gl.h>
18888
18889 #include <GL/gutil.h>
18890 _ACEOF
18891 rm -f conftest.$ac_objext
18892 if { (ac_try="$ac_compile"
18893 case "(($ac_try" in
18894   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18895   *) ac_try_echo=$ac_try;;
18896 esac
18897 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18898   (eval "$ac_compile") 2>conftest.er1
18899   ac_status=$?
18900   grep -v '^ *+' conftest.er1 >conftest.err
18901   rm -f conftest.er1
18902   cat conftest.err >&5
18903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18904   (exit $ac_status); } &&
18905          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18906   { (case "(($ac_try" in
18907   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18908   *) ac_try_echo=$ac_try;;
18909 esac
18910 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18911   (eval "$ac_try") 2>&5
18912   ac_status=$?
18913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18914   (exit $ac_status); }; } &&
18915          { ac_try='test -s conftest.$ac_objext'
18916   { (case "(($ac_try" in
18917   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18918   *) ac_try_echo=$ac_try;;
18919 esac
18920 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18921   (eval "$ac_try") 2>&5
18922   ac_status=$?
18923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18924   (exit $ac_status); }; }; then
18925   ac_cv_header_GL_gutil_h=yes
18926 else
18927   echo "$as_me: failed program was:" >&5
18928 sed 's/^/| /' conftest.$ac_ext >&5
18929
18930         ac_cv_header_GL_gutil_h=no
18931 fi
18932
18933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18934 fi
18935 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
18936 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6; }
18937 if test $ac_cv_header_GL_gutil_h = yes; then
18938   have_gle=yes
18939 else
18940   have_gle=no
18941 fi
18942
18943
18944   CPPFLAGS="$ac_save_CPPFLAGS"
18945     if test "$have_gle" = yes ; then
18946
18947   ac_save_CPPFLAGS="$CPPFLAGS"
18948   if test \! -z "$includedir" ; then
18949     CPPFLAGS="$CPPFLAGS -I$includedir"
18950   fi
18951   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18952   { echo "$as_me:$LINENO: checking for GL/tube.h" >&5
18953 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6; }
18954 if test "${ac_cv_header_GL_tube_h+set}" = set; then
18955   echo $ECHO_N "(cached) $ECHO_C" >&6
18956 else
18957   cat >conftest.$ac_ext <<_ACEOF
18958 /* confdefs.h.  */
18959 _ACEOF
18960 cat confdefs.h >>conftest.$ac_ext
18961 cat >>conftest.$ac_ext <<_ACEOF
18962 /* end confdefs.h.  */
18963 #include <GL/gl.h>
18964
18965 #include <GL/tube.h>
18966 _ACEOF
18967 rm -f conftest.$ac_objext
18968 if { (ac_try="$ac_compile"
18969 case "(($ac_try" in
18970   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18971   *) ac_try_echo=$ac_try;;
18972 esac
18973 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18974   (eval "$ac_compile") 2>conftest.er1
18975   ac_status=$?
18976   grep -v '^ *+' conftest.er1 >conftest.err
18977   rm -f conftest.er1
18978   cat conftest.err >&5
18979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18980   (exit $ac_status); } &&
18981          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18982   { (case "(($ac_try" in
18983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18984   *) ac_try_echo=$ac_try;;
18985 esac
18986 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18987   (eval "$ac_try") 2>&5
18988   ac_status=$?
18989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18990   (exit $ac_status); }; } &&
18991          { ac_try='test -s conftest.$ac_objext'
18992   { (case "(($ac_try" in
18993   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18994   *) ac_try_echo=$ac_try;;
18995 esac
18996 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18997   (eval "$ac_try") 2>&5
18998   ac_status=$?
18999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19000   (exit $ac_status); }; }; then
19001   ac_cv_header_GL_tube_h=yes
19002 else
19003   echo "$as_me: failed program was:" >&5
19004 sed 's/^/| /' conftest.$ac_ext >&5
19005
19006         ac_cv_header_GL_tube_h=no
19007 fi
19008
19009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19010 fi
19011 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
19012 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6; }
19013 if test $ac_cv_header_GL_tube_h = yes; then
19014   have_gle=yes
19015 else
19016   have_gle=no
19017 fi
19018
19019
19020   CPPFLAGS="$ac_save_CPPFLAGS"
19021     fi
19022   fi
19023
19024   if test "$have_gle" = yes ; then
19025     have_gle=no
19026     gle_halfassed=yes
19027
19028   ac_save_CPPFLAGS="$CPPFLAGS"
19029   ac_save_LDFLAGS="$LDFLAGS"
19030 #  ac_save_LIBS="$LIBS"
19031
19032   if test \! -z "$includedir" ; then
19033     CPPFLAGS="$CPPFLAGS -I$includedir"
19034   fi
19035   # note: $X_CFLAGS includes $x_includes
19036   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19037
19038   if test \! -z "$libdir" ; then
19039     LDFLAGS="$LDFLAGS -L$libdir"
19040   fi
19041   # note: $X_LIBS includes $x_libraries
19042   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19043
19044   { echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
19045 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6; }
19046 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
19047   echo $ECHO_N "(cached) $ECHO_C" >&6
19048 else
19049   ac_check_lib_save_LIBS=$LIBS
19050 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
19051 cat >conftest.$ac_ext <<_ACEOF
19052 /* confdefs.h.  */
19053 _ACEOF
19054 cat confdefs.h >>conftest.$ac_ext
19055 cat >>conftest.$ac_ext <<_ACEOF
19056 /* end confdefs.h.  */
19057
19058 /* Override any GCC internal prototype to avoid an error.
19059    Use char because int might match the return type of a GCC
19060    builtin and then its argument prototype would still apply.  */
19061 #ifdef __cplusplus
19062 extern "C"
19063 #endif
19064 char gleCreateGC ();
19065 int
19066 main ()
19067 {
19068 return gleCreateGC ();
19069   ;
19070   return 0;
19071 }
19072 _ACEOF
19073 rm -f conftest.$ac_objext conftest$ac_exeext
19074 if { (ac_try="$ac_link"
19075 case "(($ac_try" in
19076   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19077   *) ac_try_echo=$ac_try;;
19078 esac
19079 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19080   (eval "$ac_link") 2>conftest.er1
19081   ac_status=$?
19082   grep -v '^ *+' conftest.er1 >conftest.err
19083   rm -f conftest.er1
19084   cat conftest.err >&5
19085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19086   (exit $ac_status); } &&
19087          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19088   { (case "(($ac_try" in
19089   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19090   *) ac_try_echo=$ac_try;;
19091 esac
19092 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19093   (eval "$ac_try") 2>&5
19094   ac_status=$?
19095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19096   (exit $ac_status); }; } &&
19097          { ac_try='test -s conftest$ac_exeext'
19098   { (case "(($ac_try" in
19099   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19100   *) ac_try_echo=$ac_try;;
19101 esac
19102 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19103   (eval "$ac_try") 2>&5
19104   ac_status=$?
19105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19106   (exit $ac_status); }; }; then
19107   ac_cv_lib_gle_gleCreateGC=yes
19108 else
19109   echo "$as_me: failed program was:" >&5
19110 sed 's/^/| /' conftest.$ac_ext >&5
19111
19112         ac_cv_lib_gle_gleCreateGC=no
19113 fi
19114
19115 rm -f core conftest.err conftest.$ac_objext \
19116       conftest$ac_exeext conftest.$ac_ext
19117 LIBS=$ac_check_lib_save_LIBS
19118 fi
19119 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
19120 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6; }
19121 if test $ac_cv_lib_gle_gleCreateGC = yes; then
19122   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
19123 fi
19124
19125   CPPFLAGS="$ac_save_CPPFLAGS"
19126   LDFLAGS="$ac_save_LDFLAGS"
19127 #  LIBS="$ac_save_LIBS"
19128
19129   fi
19130   if test "$have_gle" = yes ; then
19131     have_gle=no
19132     gle_halfassed=yes
19133
19134     # sometimes the libmatrix stuff is included in libgle.  look there first.
19135 #
19136 # I don't get it.  For some reason, this test passes on SGI, as if
19137 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
19138 # Yet the link is succeeding.  Why???
19139 #
19140 #    AC_CHECK_X_LIB(gle, uview_direction_d,
19141 #                   [have_gle=yes; gle_halfassed=no],
19142 #                   [], $GL_LIBS -lX11 -lXext -lm)
19143
19144     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
19145     # *sigh*
19146     if test "$have_gle3" = yes ; then
19147
19148   ac_save_CPPFLAGS="$CPPFLAGS"
19149   ac_save_LDFLAGS="$LDFLAGS"
19150 #  ac_save_LIBS="$LIBS"
19151
19152   if test \! -z "$includedir" ; then
19153     CPPFLAGS="$CPPFLAGS -I$includedir"
19154   fi
19155   # note: $X_CFLAGS includes $x_includes
19156   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19157
19158   if test \! -z "$libdir" ; then
19159     LDFLAGS="$LDFLAGS -L$libdir"
19160   fi
19161   # note: $X_LIBS includes $x_libraries
19162   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19163
19164   { echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
19165 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6; }
19166 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
19167   echo $ECHO_N "(cached) $ECHO_C" >&6
19168 else
19169   ac_check_lib_save_LIBS=$LIBS
19170 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
19171 cat >conftest.$ac_ext <<_ACEOF
19172 /* confdefs.h.  */
19173 _ACEOF
19174 cat confdefs.h >>conftest.$ac_ext
19175 cat >>conftest.$ac_ext <<_ACEOF
19176 /* end confdefs.h.  */
19177
19178 /* Override any GCC internal prototype to avoid an error.
19179    Use char because int might match the return type of a GCC
19180    builtin and then its argument prototype would still apply.  */
19181 #ifdef __cplusplus
19182 extern "C"
19183 #endif
19184 char uview_direction ();
19185 int
19186 main ()
19187 {
19188 return uview_direction ();
19189   ;
19190   return 0;
19191 }
19192 _ACEOF
19193 rm -f conftest.$ac_objext conftest$ac_exeext
19194 if { (ac_try="$ac_link"
19195 case "(($ac_try" in
19196   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19197   *) ac_try_echo=$ac_try;;
19198 esac
19199 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19200   (eval "$ac_link") 2>conftest.er1
19201   ac_status=$?
19202   grep -v '^ *+' conftest.er1 >conftest.err
19203   rm -f conftest.er1
19204   cat conftest.err >&5
19205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19206   (exit $ac_status); } &&
19207          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19208   { (case "(($ac_try" in
19209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19210   *) ac_try_echo=$ac_try;;
19211 esac
19212 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19213   (eval "$ac_try") 2>&5
19214   ac_status=$?
19215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19216   (exit $ac_status); }; } &&
19217          { ac_try='test -s conftest$ac_exeext'
19218   { (case "(($ac_try" in
19219   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19220   *) ac_try_echo=$ac_try;;
19221 esac
19222 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19223   (eval "$ac_try") 2>&5
19224   ac_status=$?
19225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19226   (exit $ac_status); }; }; then
19227   ac_cv_lib_gle_uview_direction=yes
19228 else
19229   echo "$as_me: failed program was:" >&5
19230 sed 's/^/| /' conftest.$ac_ext >&5
19231
19232         ac_cv_lib_gle_uview_direction=no
19233 fi
19234
19235 rm -f core conftest.err conftest.$ac_objext \
19236       conftest$ac_exeext conftest.$ac_ext
19237 LIBS=$ac_check_lib_save_LIBS
19238 fi
19239 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
19240 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6; }
19241 if test $ac_cv_lib_gle_uview_direction = yes; then
19242   have_gle=yes; gle_halfassed=no
19243 fi
19244
19245   CPPFLAGS="$ac_save_CPPFLAGS"
19246   LDFLAGS="$ac_save_LDFLAGS"
19247 #  LIBS="$ac_save_LIBS"
19248
19249     fi
19250     # if it wasn't in libgle, then look in libmatrix.
19251     if test "$have_gle" = no ; then
19252
19253   ac_save_CPPFLAGS="$CPPFLAGS"
19254   ac_save_LDFLAGS="$LDFLAGS"
19255 #  ac_save_LIBS="$LIBS"
19256
19257   if test \! -z "$includedir" ; then
19258     CPPFLAGS="$CPPFLAGS -I$includedir"
19259   fi
19260   # note: $X_CFLAGS includes $x_includes
19261   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19262
19263   if test \! -z "$libdir" ; then
19264     LDFLAGS="$LDFLAGS -L$libdir"
19265   fi
19266   # note: $X_LIBS includes $x_libraries
19267   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19268
19269   { echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
19270 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6; }
19271 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
19272   echo $ECHO_N "(cached) $ECHO_C" >&6
19273 else
19274   ac_check_lib_save_LIBS=$LIBS
19275 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
19276 cat >conftest.$ac_ext <<_ACEOF
19277 /* confdefs.h.  */
19278 _ACEOF
19279 cat confdefs.h >>conftest.$ac_ext
19280 cat >>conftest.$ac_ext <<_ACEOF
19281 /* end confdefs.h.  */
19282
19283 /* Override any GCC internal prototype to avoid an error.
19284    Use char because int might match the return type of a GCC
19285    builtin and then its argument prototype would still apply.  */
19286 #ifdef __cplusplus
19287 extern "C"
19288 #endif
19289 char uview_direction_d ();
19290 int
19291 main ()
19292 {
19293 return uview_direction_d ();
19294   ;
19295   return 0;
19296 }
19297 _ACEOF
19298 rm -f conftest.$ac_objext conftest$ac_exeext
19299 if { (ac_try="$ac_link"
19300 case "(($ac_try" in
19301   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19302   *) ac_try_echo=$ac_try;;
19303 esac
19304 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19305   (eval "$ac_link") 2>conftest.er1
19306   ac_status=$?
19307   grep -v '^ *+' conftest.er1 >conftest.err
19308   rm -f conftest.er1
19309   cat conftest.err >&5
19310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19311   (exit $ac_status); } &&
19312          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19313   { (case "(($ac_try" in
19314   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19315   *) ac_try_echo=$ac_try;;
19316 esac
19317 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19318   (eval "$ac_try") 2>&5
19319   ac_status=$?
19320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19321   (exit $ac_status); }; } &&
19322          { ac_try='test -s conftest$ac_exeext'
19323   { (case "(($ac_try" in
19324   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19325   *) ac_try_echo=$ac_try;;
19326 esac
19327 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19328   (eval "$ac_try") 2>&5
19329   ac_status=$?
19330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19331   (exit $ac_status); }; }; then
19332   ac_cv_lib_matrix_uview_direction_d=yes
19333 else
19334   echo "$as_me: failed program was:" >&5
19335 sed 's/^/| /' conftest.$ac_ext >&5
19336
19337         ac_cv_lib_matrix_uview_direction_d=no
19338 fi
19339
19340 rm -f core conftest.err conftest.$ac_objext \
19341       conftest$ac_exeext conftest.$ac_ext
19342 LIBS=$ac_check_lib_save_LIBS
19343 fi
19344 { echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
19345 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6; }
19346 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
19347   have_gle=yes; gle_halfassed=no;
19348                       GLE_LIBS="$GLE_LIBS -lmatrix"
19349 fi
19350
19351   CPPFLAGS="$ac_save_CPPFLAGS"
19352   LDFLAGS="$ac_save_LDFLAGS"
19353 #  LIBS="$ac_save_LIBS"
19354
19355     fi
19356   fi
19357
19358   if test "$have_gle" = yes ; then
19359     cat >>confdefs.h <<\_ACEOF
19360 #define HAVE_GLE 1
19361 _ACEOF
19362
19363     if test "$have_gle3" = yes ; then
19364       cat >>confdefs.h <<\_ACEOF
19365 #define HAVE_GLE3 1
19366 _ACEOF
19367
19368     fi
19369   fi
19370
19371 elif test "$with_gle" != no; then
19372   echo "error: must be yes or no: --with-gle=$with_gle"
19373   exit 1
19374
19375 fi
19376
19377
19378 ###############################################################################
19379 #
19380 #       Check for -lgdk_pixbuf.
19381 #       These tests are for gdk_pixbuf usage of the hacks,
19382 #       not xscreensaver-demo (thus we have to test again to get
19383 #       the libraries right: don't want to pull in all of GTK
19384 #       for the hacks.)
19385 #
19386 ###############################################################################
19387
19388 have_gdk_pixbuf=no
19389 with_gdk_pixbuf_req=unspecified
19390
19391 # Check whether --with-pixbuf was given.
19392 if test "${with_pixbuf+set}" = set; then
19393   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
19394 else
19395   with_gdk_pixbuf=yes
19396 fi
19397
19398
19399 # if --with-pixbuf=/directory/ was specified, remember that directory so that
19400 # we can also look for the `gdk-pixbuf-config' program in that directory.
19401 case "$with_gdk_pixbuf" in
19402   /*)
19403     gdk_pixbuf_dir="$with_gdk_pixbuf"
19404     ;;
19405   *)
19406     gdk_pixbuf_dir=""
19407     ;;
19408 esac
19409
19410
19411    case "$with_gdk_pixbuf" in
19412     yes) ;;
19413     no)  ;;
19414
19415     /*)
19416      { echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
19417 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6; }
19418      d=$with_gdk_pixbuf/include
19419      if test -d $d; then
19420        X_CFLAGS="-I$d $X_CFLAGS"
19421        { echo "$as_me:$LINENO: result: $d" >&5
19422 echo "${ECHO_T}$d" >&6; }
19423      else
19424        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19425 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19426      fi
19427
19428      { echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
19429 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6; }
19430      d=$with_gdk_pixbuf/lib
19431      if test -d $d; then
19432        X_LIBS="-L$d $X_LIBS"
19433        { echo "$as_me:$LINENO: result: $d" >&5
19434 echo "${ECHO_T}$d" >&6; }
19435      else
19436        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19437 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19438      fi
19439
19440      # replace the directory string with "yes".
19441      with_gdk_pixbuf_req="yes"
19442      with_gdk_pixbuf=$with_gdk_pixbuf_req
19443      ;;
19444
19445     *)
19446      echo ""
19447      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
19448      echo "       If it is a directory, then \`DIR/include' will be added to"
19449      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19450      exit 1
19451      ;;
19452    esac
19453
19454
19455 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
19456   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
19457   exit 1
19458 fi
19459
19460 if test "$with_gdk_pixbuf" = yes; then
19461   have_gdk_pixbuf=no
19462
19463   pkgs=''
19464   ok="yes"
19465
19466   pkg_check_version gdk-pixbuf-2.0      2.0.0
19467   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
19468   have_gdk_pixbuf="$ok"
19469
19470   if test "$have_gdk_pixbuf" = yes; then
19471     { echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
19472 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6; }
19473 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
19474   echo $ECHO_N "(cached) $ECHO_C" >&6
19475 else
19476   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
19477 fi
19478 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
19479 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6; }
19480     { echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
19481 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6; }
19482 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
19483   echo $ECHO_N "(cached) $ECHO_C" >&6
19484 else
19485   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
19486 fi
19487 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
19488 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6; }
19489   fi
19490
19491   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
19492   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
19493
19494
19495   if test "$have_gdk_pixbuf" = yes; then
19496     #
19497     # we appear to have pixbuf; check for headers/libs to be sure.
19498     #
19499     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
19500     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
19501
19502     have_gdk_pixbuf=no
19503
19504     # check for header A...
19505
19506   ac_save_CPPFLAGS="$CPPFLAGS"
19507   if test \! -z "$includedir" ; then
19508     CPPFLAGS="$CPPFLAGS -I$includedir"
19509   fi
19510   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19511   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
19512   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
19513 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
19514 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
19515   echo $ECHO_N "(cached) $ECHO_C" >&6
19516 fi
19517 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
19518 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
19519 else
19520   # Is the header compilable?
19521 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
19522 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6; }
19523 cat >conftest.$ac_ext <<_ACEOF
19524 /* confdefs.h.  */
19525 _ACEOF
19526 cat confdefs.h >>conftest.$ac_ext
19527 cat >>conftest.$ac_ext <<_ACEOF
19528 /* end confdefs.h.  */
19529 $ac_includes_default
19530 #include <gdk-pixbuf/gdk-pixbuf.h>
19531 _ACEOF
19532 rm -f conftest.$ac_objext
19533 if { (ac_try="$ac_compile"
19534 case "(($ac_try" in
19535   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19536   *) ac_try_echo=$ac_try;;
19537 esac
19538 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19539   (eval "$ac_compile") 2>conftest.er1
19540   ac_status=$?
19541   grep -v '^ *+' conftest.er1 >conftest.err
19542   rm -f conftest.er1
19543   cat conftest.err >&5
19544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19545   (exit $ac_status); } &&
19546          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19547   { (case "(($ac_try" in
19548   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19549   *) ac_try_echo=$ac_try;;
19550 esac
19551 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19552   (eval "$ac_try") 2>&5
19553   ac_status=$?
19554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19555   (exit $ac_status); }; } &&
19556          { ac_try='test -s conftest.$ac_objext'
19557   { (case "(($ac_try" in
19558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19559   *) ac_try_echo=$ac_try;;
19560 esac
19561 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19562   (eval "$ac_try") 2>&5
19563   ac_status=$?
19564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19565   (exit $ac_status); }; }; then
19566   ac_header_compiler=yes
19567 else
19568   echo "$as_me: failed program was:" >&5
19569 sed 's/^/| /' conftest.$ac_ext >&5
19570
19571         ac_header_compiler=no
19572 fi
19573
19574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19575 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19576 echo "${ECHO_T}$ac_header_compiler" >&6; }
19577
19578 # Is the header present?
19579 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
19580 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6; }
19581 cat >conftest.$ac_ext <<_ACEOF
19582 /* confdefs.h.  */
19583 _ACEOF
19584 cat confdefs.h >>conftest.$ac_ext
19585 cat >>conftest.$ac_ext <<_ACEOF
19586 /* end confdefs.h.  */
19587 #include <gdk-pixbuf/gdk-pixbuf.h>
19588 _ACEOF
19589 if { (ac_try="$ac_cpp conftest.$ac_ext"
19590 case "(($ac_try" in
19591   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19592   *) ac_try_echo=$ac_try;;
19593 esac
19594 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19595   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19596   ac_status=$?
19597   grep -v '^ *+' conftest.er1 >conftest.err
19598   rm -f conftest.er1
19599   cat conftest.err >&5
19600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19601   (exit $ac_status); } >/dev/null; then
19602   if test -s conftest.err; then
19603     ac_cpp_err=$ac_c_preproc_warn_flag
19604     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19605   else
19606     ac_cpp_err=
19607   fi
19608 else
19609   ac_cpp_err=yes
19610 fi
19611 if test -z "$ac_cpp_err"; then
19612   ac_header_preproc=yes
19613 else
19614   echo "$as_me: failed program was:" >&5
19615 sed 's/^/| /' conftest.$ac_ext >&5
19616
19617   ac_header_preproc=no
19618 fi
19619
19620 rm -f conftest.err conftest.$ac_ext
19621 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19622 echo "${ECHO_T}$ac_header_preproc" >&6; }
19623
19624 # So?  What about this header?
19625 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19626   yes:no: )
19627     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
19628 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19629     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
19630 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
19631     ac_header_preproc=yes
19632     ;;
19633   no:yes:* )
19634     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
19635 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
19636     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
19637 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
19638     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
19639 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
19640     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
19641 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19642     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
19643 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
19644     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
19645 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
19646
19647     ;;
19648 esac
19649 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
19650 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
19651 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
19652   echo $ECHO_N "(cached) $ECHO_C" >&6
19653 else
19654   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
19655 fi
19656 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
19657 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
19658
19659 fi
19660 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
19661   have_gdk_pixbuf=yes
19662 fi
19663
19664
19665   CPPFLAGS="$ac_save_CPPFLAGS"
19666
19667     # if that worked, check for header B...
19668     if test "$have_gdk_pixbuf" = yes; then
19669       have_gdk_pixbuf=no
19670       gdk_pixbuf_halfassed=yes
19671
19672   ac_save_CPPFLAGS="$CPPFLAGS"
19673   if test \! -z "$includedir" ; then
19674     CPPFLAGS="$CPPFLAGS -I$includedir"
19675   fi
19676   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19677   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
19678   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
19679 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
19680 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
19681   echo $ECHO_N "(cached) $ECHO_C" >&6
19682 fi
19683 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
19684 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
19685 else
19686   # Is the header compilable?
19687 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
19688 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
19689 cat >conftest.$ac_ext <<_ACEOF
19690 /* confdefs.h.  */
19691 _ACEOF
19692 cat confdefs.h >>conftest.$ac_ext
19693 cat >>conftest.$ac_ext <<_ACEOF
19694 /* end confdefs.h.  */
19695 $ac_includes_default
19696 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
19697 _ACEOF
19698 rm -f conftest.$ac_objext
19699 if { (ac_try="$ac_compile"
19700 case "(($ac_try" in
19701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19702   *) ac_try_echo=$ac_try;;
19703 esac
19704 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19705   (eval "$ac_compile") 2>conftest.er1
19706   ac_status=$?
19707   grep -v '^ *+' conftest.er1 >conftest.err
19708   rm -f conftest.er1
19709   cat conftest.err >&5
19710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19711   (exit $ac_status); } &&
19712          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19713   { (case "(($ac_try" in
19714   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19715   *) ac_try_echo=$ac_try;;
19716 esac
19717 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19718   (eval "$ac_try") 2>&5
19719   ac_status=$?
19720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19721   (exit $ac_status); }; } &&
19722          { ac_try='test -s conftest.$ac_objext'
19723   { (case "(($ac_try" in
19724   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19725   *) ac_try_echo=$ac_try;;
19726 esac
19727 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19728   (eval "$ac_try") 2>&5
19729   ac_status=$?
19730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19731   (exit $ac_status); }; }; then
19732   ac_header_compiler=yes
19733 else
19734   echo "$as_me: failed program was:" >&5
19735 sed 's/^/| /' conftest.$ac_ext >&5
19736
19737         ac_header_compiler=no
19738 fi
19739
19740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19741 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19742 echo "${ECHO_T}$ac_header_compiler" >&6; }
19743
19744 # Is the header present?
19745 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
19746 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
19747 cat >conftest.$ac_ext <<_ACEOF
19748 /* confdefs.h.  */
19749 _ACEOF
19750 cat confdefs.h >>conftest.$ac_ext
19751 cat >>conftest.$ac_ext <<_ACEOF
19752 /* end confdefs.h.  */
19753 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
19754 _ACEOF
19755 if { (ac_try="$ac_cpp conftest.$ac_ext"
19756 case "(($ac_try" in
19757   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19758   *) ac_try_echo=$ac_try;;
19759 esac
19760 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19761   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19762   ac_status=$?
19763   grep -v '^ *+' conftest.er1 >conftest.err
19764   rm -f conftest.er1
19765   cat conftest.err >&5
19766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19767   (exit $ac_status); } >/dev/null; then
19768   if test -s conftest.err; then
19769     ac_cpp_err=$ac_c_preproc_warn_flag
19770     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19771   else
19772     ac_cpp_err=
19773   fi
19774 else
19775   ac_cpp_err=yes
19776 fi
19777 if test -z "$ac_cpp_err"; then
19778   ac_header_preproc=yes
19779 else
19780   echo "$as_me: failed program was:" >&5
19781 sed 's/^/| /' conftest.$ac_ext >&5
19782
19783   ac_header_preproc=no
19784 fi
19785
19786 rm -f conftest.err conftest.$ac_ext
19787 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19788 echo "${ECHO_T}$ac_header_preproc" >&6; }
19789
19790 # So?  What about this header?
19791 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19792   yes:no: )
19793     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
19794 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19795     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
19796 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
19797     ac_header_preproc=yes
19798     ;;
19799   no:yes:* )
19800     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
19801 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
19802     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
19803 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
19804     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
19805 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
19806     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
19807 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19808     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
19809 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
19810     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
19811 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
19812
19813     ;;
19814 esac
19815 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
19816 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
19817 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
19818   echo $ECHO_N "(cached) $ECHO_C" >&6
19819 else
19820   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
19821 fi
19822 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
19823 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
19824
19825 fi
19826 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
19827   have_gdk_pixbuf=yes
19828                          gdk_pixbuf_halfassed=no
19829 fi
19830
19831
19832   CPPFLAGS="$ac_save_CPPFLAGS"
19833
19834       # yay, it has a new name in Gtk 2.x...
19835       if test "$have_gdk_pixbuf" = no; then
19836         have_gdk_pixbuf=no
19837         gdk_pixbuf_halfassed=yes
19838
19839   ac_save_CPPFLAGS="$CPPFLAGS"
19840   if test \! -z "$includedir" ; then
19841     CPPFLAGS="$CPPFLAGS -I$includedir"
19842   fi
19843   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19844   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
19845   { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
19846 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
19847 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
19848   echo $ECHO_N "(cached) $ECHO_C" >&6
19849 fi
19850 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
19851 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
19852 else
19853   # Is the header compilable?
19854 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
19855 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
19856 cat >conftest.$ac_ext <<_ACEOF
19857 /* confdefs.h.  */
19858 _ACEOF
19859 cat confdefs.h >>conftest.$ac_ext
19860 cat >>conftest.$ac_ext <<_ACEOF
19861 /* end confdefs.h.  */
19862 $ac_includes_default
19863 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
19864 _ACEOF
19865 rm -f conftest.$ac_objext
19866 if { (ac_try="$ac_compile"
19867 case "(($ac_try" in
19868   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19869   *) ac_try_echo=$ac_try;;
19870 esac
19871 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19872   (eval "$ac_compile") 2>conftest.er1
19873   ac_status=$?
19874   grep -v '^ *+' conftest.er1 >conftest.err
19875   rm -f conftest.er1
19876   cat conftest.err >&5
19877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19878   (exit $ac_status); } &&
19879          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19880   { (case "(($ac_try" in
19881   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19882   *) ac_try_echo=$ac_try;;
19883 esac
19884 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19885   (eval "$ac_try") 2>&5
19886   ac_status=$?
19887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19888   (exit $ac_status); }; } &&
19889          { ac_try='test -s conftest.$ac_objext'
19890   { (case "(($ac_try" in
19891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19892   *) ac_try_echo=$ac_try;;
19893 esac
19894 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19895   (eval "$ac_try") 2>&5
19896   ac_status=$?
19897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19898   (exit $ac_status); }; }; then
19899   ac_header_compiler=yes
19900 else
19901   echo "$as_me: failed program was:" >&5
19902 sed 's/^/| /' conftest.$ac_ext >&5
19903
19904         ac_header_compiler=no
19905 fi
19906
19907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19908 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19909 echo "${ECHO_T}$ac_header_compiler" >&6; }
19910
19911 # Is the header present?
19912 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
19913 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
19914 cat >conftest.$ac_ext <<_ACEOF
19915 /* confdefs.h.  */
19916 _ACEOF
19917 cat confdefs.h >>conftest.$ac_ext
19918 cat >>conftest.$ac_ext <<_ACEOF
19919 /* end confdefs.h.  */
19920 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
19921 _ACEOF
19922 if { (ac_try="$ac_cpp conftest.$ac_ext"
19923 case "(($ac_try" in
19924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19925   *) ac_try_echo=$ac_try;;
19926 esac
19927 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19928   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19929   ac_status=$?
19930   grep -v '^ *+' conftest.er1 >conftest.err
19931   rm -f conftest.er1
19932   cat conftest.err >&5
19933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19934   (exit $ac_status); } >/dev/null; then
19935   if test -s conftest.err; then
19936     ac_cpp_err=$ac_c_preproc_warn_flag
19937     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19938   else
19939     ac_cpp_err=
19940   fi
19941 else
19942   ac_cpp_err=yes
19943 fi
19944 if test -z "$ac_cpp_err"; then
19945   ac_header_preproc=yes
19946 else
19947   echo "$as_me: failed program was:" >&5
19948 sed 's/^/| /' conftest.$ac_ext >&5
19949
19950   ac_header_preproc=no
19951 fi
19952
19953 rm -f conftest.err conftest.$ac_ext
19954 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19955 echo "${ECHO_T}$ac_header_preproc" >&6; }
19956
19957 # So?  What about this header?
19958 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19959   yes:no: )
19960     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
19961 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19962     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
19963 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
19964     ac_header_preproc=yes
19965     ;;
19966   no:yes:* )
19967     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
19968 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
19969     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
19970 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
19971     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
19972 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
19973     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
19974 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19975     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
19976 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
19977     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
19978 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
19979
19980     ;;
19981 esac
19982 { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
19983 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
19984 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
19985   echo $ECHO_N "(cached) $ECHO_C" >&6
19986 else
19987   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
19988 fi
19989 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
19990 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
19991
19992 fi
19993 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
19994   have_gdk_pixbuf=yes
19995                            gdk_pixbuf_halfassed=no
19996 fi
19997
19998
19999   CPPFLAGS="$ac_save_CPPFLAGS"
20000       fi
20001     fi
20002     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
20003   fi
20004
20005   if test "$have_gdk_pixbuf" = yes; then
20006     # we have the headers, now check for the libraries
20007     have_gdk_pixbuf=no
20008     gdk_pixbuf_halfassed=yes
20009
20010     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
20011 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6; }
20012
20013     # library A...
20014
20015   ac_save_CPPFLAGS="$CPPFLAGS"
20016   ac_save_LDFLAGS="$LDFLAGS"
20017 #  ac_save_LIBS="$LIBS"
20018
20019   if test \! -z "$includedir" ; then
20020     CPPFLAGS="$CPPFLAGS -I$includedir"
20021   fi
20022   # note: $X_CFLAGS includes $x_includes
20023   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20024
20025   if test \! -z "$libdir" ; then
20026     LDFLAGS="$LDFLAGS -L$libdir"
20027   fi
20028   # note: $X_LIBS includes $x_libraries
20029   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20030
20031   { echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
20032 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6; }
20033 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
20034   echo $ECHO_N "(cached) $ECHO_C" >&6
20035 else
20036   ac_check_lib_save_LIBS=$LIBS
20037 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
20038 cat >conftest.$ac_ext <<_ACEOF
20039 /* confdefs.h.  */
20040 _ACEOF
20041 cat confdefs.h >>conftest.$ac_ext
20042 cat >>conftest.$ac_ext <<_ACEOF
20043 /* end confdefs.h.  */
20044
20045 /* Override any GCC internal prototype to avoid an error.
20046    Use char because int might match the return type of a GCC
20047    builtin and then its argument prototype would still apply.  */
20048 #ifdef __cplusplus
20049 extern "C"
20050 #endif
20051 char gdk_pixbuf_new_from_file ();
20052 int
20053 main ()
20054 {
20055 return gdk_pixbuf_new_from_file ();
20056   ;
20057   return 0;
20058 }
20059 _ACEOF
20060 rm -f conftest.$ac_objext conftest$ac_exeext
20061 if { (ac_try="$ac_link"
20062 case "(($ac_try" in
20063   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20064   *) ac_try_echo=$ac_try;;
20065 esac
20066 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20067   (eval "$ac_link") 2>conftest.er1
20068   ac_status=$?
20069   grep -v '^ *+' conftest.er1 >conftest.err
20070   rm -f conftest.er1
20071   cat conftest.err >&5
20072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20073   (exit $ac_status); } &&
20074          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20075   { (case "(($ac_try" in
20076   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20077   *) ac_try_echo=$ac_try;;
20078 esac
20079 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20080   (eval "$ac_try") 2>&5
20081   ac_status=$?
20082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20083   (exit $ac_status); }; } &&
20084          { ac_try='test -s conftest$ac_exeext'
20085   { (case "(($ac_try" in
20086   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20087   *) ac_try_echo=$ac_try;;
20088 esac
20089 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20090   (eval "$ac_try") 2>&5
20091   ac_status=$?
20092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20093   (exit $ac_status); }; }; then
20094   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
20095 else
20096   echo "$as_me: failed program was:" >&5
20097 sed 's/^/| /' conftest.$ac_ext >&5
20098
20099         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
20100 fi
20101
20102 rm -f core conftest.err conftest.$ac_objext \
20103       conftest$ac_exeext conftest.$ac_ext
20104 LIBS=$ac_check_lib_save_LIBS
20105 fi
20106 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
20107 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
20108 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
20109   have_gdk_pixbuf=yes
20110 fi
20111
20112   CPPFLAGS="$ac_save_CPPFLAGS"
20113   LDFLAGS="$ac_save_LDFLAGS"
20114 #  LIBS="$ac_save_LIBS"
20115
20116     # library B...
20117     if test "$have_gdk_pixbuf" = yes; then
20118       have_gdk_pixbuf=no
20119
20120   ac_save_CPPFLAGS="$CPPFLAGS"
20121   ac_save_LDFLAGS="$LDFLAGS"
20122 #  ac_save_LIBS="$LIBS"
20123
20124   if test \! -z "$includedir" ; then
20125     CPPFLAGS="$CPPFLAGS -I$includedir"
20126   fi
20127   # note: $X_CFLAGS includes $x_includes
20128   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20129
20130   if test \! -z "$libdir" ; then
20131     LDFLAGS="$LDFLAGS -L$libdir"
20132   fi
20133   # note: $X_LIBS includes $x_libraries
20134   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20135
20136   { echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
20137 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6; }
20138 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
20139   echo $ECHO_N "(cached) $ECHO_C" >&6
20140 else
20141   ac_check_lib_save_LIBS=$LIBS
20142 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
20143 cat >conftest.$ac_ext <<_ACEOF
20144 /* confdefs.h.  */
20145 _ACEOF
20146 cat confdefs.h >>conftest.$ac_ext
20147 cat >>conftest.$ac_ext <<_ACEOF
20148 /* end confdefs.h.  */
20149
20150 /* Override any GCC internal prototype to avoid an error.
20151    Use char because int might match the return type of a GCC
20152    builtin and then its argument prototype would still apply.  */
20153 #ifdef __cplusplus
20154 extern "C"
20155 #endif
20156 char gdk_pixbuf_xlib_init ();
20157 int
20158 main ()
20159 {
20160 return gdk_pixbuf_xlib_init ();
20161   ;
20162   return 0;
20163 }
20164 _ACEOF
20165 rm -f conftest.$ac_objext conftest$ac_exeext
20166 if { (ac_try="$ac_link"
20167 case "(($ac_try" in
20168   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20169   *) ac_try_echo=$ac_try;;
20170 esac
20171 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20172   (eval "$ac_link") 2>conftest.er1
20173   ac_status=$?
20174   grep -v '^ *+' conftest.er1 >conftest.err
20175   rm -f conftest.er1
20176   cat conftest.err >&5
20177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20178   (exit $ac_status); } &&
20179          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20180   { (case "(($ac_try" in
20181   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20182   *) ac_try_echo=$ac_try;;
20183 esac
20184 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20185   (eval "$ac_try") 2>&5
20186   ac_status=$?
20187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20188   (exit $ac_status); }; } &&
20189          { ac_try='test -s conftest$ac_exeext'
20190   { (case "(($ac_try" in
20191   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20192   *) ac_try_echo=$ac_try;;
20193 esac
20194 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20195   (eval "$ac_try") 2>&5
20196   ac_status=$?
20197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20198   (exit $ac_status); }; }; then
20199   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
20200 else
20201   echo "$as_me: failed program was:" >&5
20202 sed 's/^/| /' conftest.$ac_ext >&5
20203
20204         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
20205 fi
20206
20207 rm -f core conftest.err conftest.$ac_objext \
20208       conftest$ac_exeext conftest.$ac_ext
20209 LIBS=$ac_check_lib_save_LIBS
20210 fi
20211 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
20212 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
20213 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
20214   have_gdk_pixbuf=yes
20215                       gdk_pixbuf_halfassed=no
20216 fi
20217
20218   CPPFLAGS="$ac_save_CPPFLAGS"
20219   LDFLAGS="$ac_save_LDFLAGS"
20220 #  LIBS="$ac_save_LIBS"
20221
20222     fi
20223   fi
20224
20225   if test "$have_gdk_pixbuf" = yes; then
20226     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
20227     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
20228     cat >>confdefs.h <<\_ACEOF
20229 #define HAVE_GDK_PIXBUF 1
20230 _ACEOF
20231
20232   else
20233     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
20234 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6; }
20235   fi
20236 fi
20237
20238
20239 ###############################################################################
20240 #
20241 #       Check for -lXpm.
20242 #
20243 ###############################################################################
20244
20245 have_xpm=no
20246 with_xpm_req=unspecified
20247
20248 # Check whether --with-xpm was given.
20249 if test "${with_xpm+set}" = set; then
20250   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
20251 else
20252   with_xpm=yes
20253 fi
20254
20255
20256
20257    case "$with_xpm" in
20258     yes) ;;
20259     no)  ;;
20260
20261     /*)
20262      { echo "$as_me:$LINENO: checking for XPM headers" >&5
20263 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6; }
20264      d=$with_xpm/include
20265      if test -d $d; then
20266        X_CFLAGS="-I$d $X_CFLAGS"
20267        { echo "$as_me:$LINENO: result: $d" >&5
20268 echo "${ECHO_T}$d" >&6; }
20269      else
20270        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20271 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20272      fi
20273
20274      { echo "$as_me:$LINENO: checking for XPM libs" >&5
20275 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6; }
20276      d=$with_xpm/lib
20277      if test -d $d; then
20278        X_LIBS="-L$d $X_LIBS"
20279        { echo "$as_me:$LINENO: result: $d" >&5
20280 echo "${ECHO_T}$d" >&6; }
20281      else
20282        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20283 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20284      fi
20285
20286      # replace the directory string with "yes".
20287      with_xpm_req="yes"
20288      with_xpm=$with_xpm_req
20289      ;;
20290
20291     *)
20292      echo ""
20293      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
20294      echo "       If it is a directory, then \`DIR/include' will be added to"
20295      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20296      exit 1
20297      ;;
20298    esac
20299
20300
20301 if test "$with_xpm" = yes; then
20302
20303   ac_save_CPPFLAGS="$CPPFLAGS"
20304   if test \! -z "$includedir" ; then
20305     CPPFLAGS="$CPPFLAGS -I$includedir"
20306   fi
20307   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20308   { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
20309 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
20310 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
20311   echo $ECHO_N "(cached) $ECHO_C" >&6
20312 else
20313   cat >conftest.$ac_ext <<_ACEOF
20314 /* confdefs.h.  */
20315 _ACEOF
20316 cat confdefs.h >>conftest.$ac_ext
20317 cat >>conftest.$ac_ext <<_ACEOF
20318 /* end confdefs.h.  */
20319 #include <X11/Xlib.h>
20320
20321 #include <X11/xpm.h>
20322 _ACEOF
20323 rm -f conftest.$ac_objext
20324 if { (ac_try="$ac_compile"
20325 case "(($ac_try" in
20326   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20327   *) ac_try_echo=$ac_try;;
20328 esac
20329 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20330   (eval "$ac_compile") 2>conftest.er1
20331   ac_status=$?
20332   grep -v '^ *+' conftest.er1 >conftest.err
20333   rm -f conftest.er1
20334   cat conftest.err >&5
20335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20336   (exit $ac_status); } &&
20337          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20338   { (case "(($ac_try" in
20339   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20340   *) ac_try_echo=$ac_try;;
20341 esac
20342 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20343   (eval "$ac_try") 2>&5
20344   ac_status=$?
20345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20346   (exit $ac_status); }; } &&
20347          { ac_try='test -s conftest.$ac_objext'
20348   { (case "(($ac_try" in
20349   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20350   *) ac_try_echo=$ac_try;;
20351 esac
20352 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20353   (eval "$ac_try") 2>&5
20354   ac_status=$?
20355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20356   (exit $ac_status); }; }; then
20357   ac_cv_header_X11_xpm_h=yes
20358 else
20359   echo "$as_me: failed program was:" >&5
20360 sed 's/^/| /' conftest.$ac_ext >&5
20361
20362         ac_cv_header_X11_xpm_h=no
20363 fi
20364
20365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20366 fi
20367 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
20368 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
20369 if test $ac_cv_header_X11_xpm_h = yes; then
20370   have_xpm=yes
20371                     cat >>confdefs.h <<\_ACEOF
20372 #define HAVE_XPM 1
20373 _ACEOF
20374
20375                     XPM_LIBS="-lXpm $XPM_LIBS"
20376 fi
20377
20378
20379   CPPFLAGS="$ac_save_CPPFLAGS"
20380 elif test "$with_xpm" != no; then
20381   echo "error: must be yes or no: --with-xpm=$with_xpm"
20382   exit 1
20383 fi
20384
20385 # See comment near $motif_requires_xpm, above.
20386 # Need to do this here, after both Motif and XPM have been checked for.
20387 #
20388 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
20389   if test "$motif_requires_xpm" = yes ; then
20390     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
20391   fi
20392 fi
20393
20394 if test "$XPM_LIBS" = "" ; then
20395   XPM_LIBS=$(MINIXPM)
20396 fi
20397
20398
20399 ###############################################################################
20400 #
20401 #       Check for -ljpeg
20402 #
20403 ###############################################################################
20404
20405 have_jpeg=no
20406 with_jpeg_req=unspecified
20407 jpeg_halfassed=no
20408
20409 # Check whether --with-jpeg was given.
20410 if test "${with_jpeg+set}" = set; then
20411   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
20412 else
20413   with_jpeg=yes
20414 fi
20415
20416
20417
20418    case "$with_jpeg" in
20419     yes) ;;
20420     no)  ;;
20421
20422     /*)
20423      { echo "$as_me:$LINENO: checking for JPEG headers" >&5
20424 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6; }
20425      d=$with_jpeg/include
20426      if test -d $d; then
20427        X_CFLAGS="-I$d $X_CFLAGS"
20428        { echo "$as_me:$LINENO: result: $d" >&5
20429 echo "${ECHO_T}$d" >&6; }
20430      else
20431        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20432 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20433      fi
20434
20435      { echo "$as_me:$LINENO: checking for JPEG libs" >&5
20436 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6; }
20437      d=$with_jpeg/lib
20438      if test -d $d; then
20439        X_LIBS="-L$d $X_LIBS"
20440        { echo "$as_me:$LINENO: result: $d" >&5
20441 echo "${ECHO_T}$d" >&6; }
20442      else
20443        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20444 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20445      fi
20446
20447      # replace the directory string with "yes".
20448      with_jpeg_req="yes"
20449      with_jpeg=$with_jpeg_req
20450      ;;
20451
20452     *)
20453      echo ""
20454      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
20455      echo "       If it is a directory, then \`DIR/include' will be added to"
20456      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20457      exit 1
20458      ;;
20459    esac
20460
20461
20462 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
20463   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
20464   exit 1
20465 fi
20466
20467 if test "$with_jpeg" = yes; then
20468
20469   have_jpeg=no
20470
20471   ac_save_CPPFLAGS="$CPPFLAGS"
20472   if test \! -z "$includedir" ; then
20473     CPPFLAGS="$CPPFLAGS -I$includedir"
20474   fi
20475   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20476   if test "${ac_cv_header_jpeglib_h+set}" = set; then
20477   { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
20478 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
20479 if test "${ac_cv_header_jpeglib_h+set}" = set; then
20480   echo $ECHO_N "(cached) $ECHO_C" >&6
20481 fi
20482 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
20483 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
20484 else
20485   # Is the header compilable?
20486 { echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
20487 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; }
20488 cat >conftest.$ac_ext <<_ACEOF
20489 /* confdefs.h.  */
20490 _ACEOF
20491 cat confdefs.h >>conftest.$ac_ext
20492 cat >>conftest.$ac_ext <<_ACEOF
20493 /* end confdefs.h.  */
20494 $ac_includes_default
20495 #include <jpeglib.h>
20496 _ACEOF
20497 rm -f conftest.$ac_objext
20498 if { (ac_try="$ac_compile"
20499 case "(($ac_try" in
20500   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20501   *) ac_try_echo=$ac_try;;
20502 esac
20503 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20504   (eval "$ac_compile") 2>conftest.er1
20505   ac_status=$?
20506   grep -v '^ *+' conftest.er1 >conftest.err
20507   rm -f conftest.er1
20508   cat conftest.err >&5
20509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20510   (exit $ac_status); } &&
20511          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20512   { (case "(($ac_try" in
20513   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20514   *) ac_try_echo=$ac_try;;
20515 esac
20516 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20517   (eval "$ac_try") 2>&5
20518   ac_status=$?
20519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20520   (exit $ac_status); }; } &&
20521          { ac_try='test -s conftest.$ac_objext'
20522   { (case "(($ac_try" in
20523   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20524   *) ac_try_echo=$ac_try;;
20525 esac
20526 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20527   (eval "$ac_try") 2>&5
20528   ac_status=$?
20529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20530   (exit $ac_status); }; }; then
20531   ac_header_compiler=yes
20532 else
20533   echo "$as_me: failed program was:" >&5
20534 sed 's/^/| /' conftest.$ac_ext >&5
20535
20536         ac_header_compiler=no
20537 fi
20538
20539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20540 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20541 echo "${ECHO_T}$ac_header_compiler" >&6; }
20542
20543 # Is the header present?
20544 { echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
20545 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; }
20546 cat >conftest.$ac_ext <<_ACEOF
20547 /* confdefs.h.  */
20548 _ACEOF
20549 cat confdefs.h >>conftest.$ac_ext
20550 cat >>conftest.$ac_ext <<_ACEOF
20551 /* end confdefs.h.  */
20552 #include <jpeglib.h>
20553 _ACEOF
20554 if { (ac_try="$ac_cpp conftest.$ac_ext"
20555 case "(($ac_try" in
20556   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20557   *) ac_try_echo=$ac_try;;
20558 esac
20559 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20560   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20561   ac_status=$?
20562   grep -v '^ *+' conftest.er1 >conftest.err
20563   rm -f conftest.er1
20564   cat conftest.err >&5
20565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20566   (exit $ac_status); } >/dev/null; then
20567   if test -s conftest.err; then
20568     ac_cpp_err=$ac_c_preproc_warn_flag
20569     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20570   else
20571     ac_cpp_err=
20572   fi
20573 else
20574   ac_cpp_err=yes
20575 fi
20576 if test -z "$ac_cpp_err"; then
20577   ac_header_preproc=yes
20578 else
20579   echo "$as_me: failed program was:" >&5
20580 sed 's/^/| /' conftest.$ac_ext >&5
20581
20582   ac_header_preproc=no
20583 fi
20584
20585 rm -f conftest.err conftest.$ac_ext
20586 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20587 echo "${ECHO_T}$ac_header_preproc" >&6; }
20588
20589 # So?  What about this header?
20590 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20591   yes:no: )
20592     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
20593 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20594     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
20595 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
20596     ac_header_preproc=yes
20597     ;;
20598   no:yes:* )
20599     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
20600 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
20601     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
20602 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
20603     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
20604 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
20605     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
20606 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20607     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
20608 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
20609     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
20610 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
20611
20612     ;;
20613 esac
20614 { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
20615 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
20616 if test "${ac_cv_header_jpeglib_h+set}" = set; then
20617   echo $ECHO_N "(cached) $ECHO_C" >&6
20618 else
20619   ac_cv_header_jpeglib_h=$ac_header_preproc
20620 fi
20621 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
20622 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
20623
20624 fi
20625 if test $ac_cv_header_jpeglib_h = yes; then
20626   have_jpeg=yes
20627 fi
20628
20629
20630   CPPFLAGS="$ac_save_CPPFLAGS"
20631
20632   if test "$have_jpeg" = yes; then
20633     # we have the header, now check for the library
20634     have_jpeg=no
20635     jpeg_halfassed=yes
20636
20637   ac_save_CPPFLAGS="$CPPFLAGS"
20638   ac_save_LDFLAGS="$LDFLAGS"
20639 #  ac_save_LIBS="$LIBS"
20640
20641   if test \! -z "$includedir" ; then
20642     CPPFLAGS="$CPPFLAGS -I$includedir"
20643   fi
20644   # note: $X_CFLAGS includes $x_includes
20645   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20646
20647   if test \! -z "$libdir" ; then
20648     LDFLAGS="$LDFLAGS -L$libdir"
20649   fi
20650   # note: $X_LIBS includes $x_libraries
20651   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20652
20653   { echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
20654 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6; }
20655 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
20656   echo $ECHO_N "(cached) $ECHO_C" >&6
20657 else
20658   ac_check_lib_save_LIBS=$LIBS
20659 LIBS="-ljpeg  $LIBS"
20660 cat >conftest.$ac_ext <<_ACEOF
20661 /* confdefs.h.  */
20662 _ACEOF
20663 cat confdefs.h >>conftest.$ac_ext
20664 cat >>conftest.$ac_ext <<_ACEOF
20665 /* end confdefs.h.  */
20666
20667 /* Override any GCC internal prototype to avoid an error.
20668    Use char because int might match the return type of a GCC
20669    builtin and then its argument prototype would still apply.  */
20670 #ifdef __cplusplus
20671 extern "C"
20672 #endif
20673 char jpeg_start_compress ();
20674 int
20675 main ()
20676 {
20677 return jpeg_start_compress ();
20678   ;
20679   return 0;
20680 }
20681 _ACEOF
20682 rm -f conftest.$ac_objext conftest$ac_exeext
20683 if { (ac_try="$ac_link"
20684 case "(($ac_try" in
20685   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20686   *) ac_try_echo=$ac_try;;
20687 esac
20688 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20689   (eval "$ac_link") 2>conftest.er1
20690   ac_status=$?
20691   grep -v '^ *+' conftest.er1 >conftest.err
20692   rm -f conftest.er1
20693   cat conftest.err >&5
20694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20695   (exit $ac_status); } &&
20696          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20697   { (case "(($ac_try" in
20698   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20699   *) ac_try_echo=$ac_try;;
20700 esac
20701 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20702   (eval "$ac_try") 2>&5
20703   ac_status=$?
20704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20705   (exit $ac_status); }; } &&
20706          { ac_try='test -s conftest$ac_exeext'
20707   { (case "(($ac_try" in
20708   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20709   *) ac_try_echo=$ac_try;;
20710 esac
20711 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20712   (eval "$ac_try") 2>&5
20713   ac_status=$?
20714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20715   (exit $ac_status); }; }; then
20716   ac_cv_lib_jpeg_jpeg_start_compress=yes
20717 else
20718   echo "$as_me: failed program was:" >&5
20719 sed 's/^/| /' conftest.$ac_ext >&5
20720
20721         ac_cv_lib_jpeg_jpeg_start_compress=no
20722 fi
20723
20724 rm -f core conftest.err conftest.$ac_objext \
20725       conftest$ac_exeext conftest.$ac_ext
20726 LIBS=$ac_check_lib_save_LIBS
20727 fi
20728 { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
20729 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
20730 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
20731   have_jpeg=yes
20732                     jpeg_halfassed=no
20733                     JPEG_LIBS="-ljpeg"
20734                     cat >>confdefs.h <<\_ACEOF
20735 #define HAVE_JPEGLIB 1
20736 _ACEOF
20737
20738 fi
20739
20740   CPPFLAGS="$ac_save_CPPFLAGS"
20741   LDFLAGS="$ac_save_LDFLAGS"
20742 #  LIBS="$ac_save_LIBS"
20743
20744   fi
20745 fi
20746
20747
20748 ###############################################################################
20749 #
20750 #       Check for pty support: this allows 'phosphor' and 'apple2'
20751 #       to run curses-based programs, or be used as terminal windows.
20752 #
20753 ###############################################################################
20754
20755 PTY_LIBS=
20756
20757
20758 for ac_header in pty.h util.h
20759 do
20760 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20761 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20762   { echo "$as_me:$LINENO: checking for $ac_header" >&5
20763 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20764 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20765   echo $ECHO_N "(cached) $ECHO_C" >&6
20766 fi
20767 ac_res=`eval echo '${'$as_ac_Header'}'`
20768                { echo "$as_me:$LINENO: result: $ac_res" >&5
20769 echo "${ECHO_T}$ac_res" >&6; }
20770 else
20771   # Is the header compilable?
20772 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
20773 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
20774 cat >conftest.$ac_ext <<_ACEOF
20775 /* confdefs.h.  */
20776 _ACEOF
20777 cat confdefs.h >>conftest.$ac_ext
20778 cat >>conftest.$ac_ext <<_ACEOF
20779 /* end confdefs.h.  */
20780 $ac_includes_default
20781 #include <$ac_header>
20782 _ACEOF
20783 rm -f conftest.$ac_objext
20784 if { (ac_try="$ac_compile"
20785 case "(($ac_try" in
20786   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20787   *) ac_try_echo=$ac_try;;
20788 esac
20789 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20790   (eval "$ac_compile") 2>conftest.er1
20791   ac_status=$?
20792   grep -v '^ *+' conftest.er1 >conftest.err
20793   rm -f conftest.er1
20794   cat conftest.err >&5
20795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20796   (exit $ac_status); } &&
20797          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20798   { (case "(($ac_try" in
20799   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20800   *) ac_try_echo=$ac_try;;
20801 esac
20802 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20803   (eval "$ac_try") 2>&5
20804   ac_status=$?
20805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20806   (exit $ac_status); }; } &&
20807          { ac_try='test -s conftest.$ac_objext'
20808   { (case "(($ac_try" in
20809   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20810   *) ac_try_echo=$ac_try;;
20811 esac
20812 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20813   (eval "$ac_try") 2>&5
20814   ac_status=$?
20815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20816   (exit $ac_status); }; }; then
20817   ac_header_compiler=yes
20818 else
20819   echo "$as_me: failed program was:" >&5
20820 sed 's/^/| /' conftest.$ac_ext >&5
20821
20822         ac_header_compiler=no
20823 fi
20824
20825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20826 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20827 echo "${ECHO_T}$ac_header_compiler" >&6; }
20828
20829 # Is the header present?
20830 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
20831 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
20832 cat >conftest.$ac_ext <<_ACEOF
20833 /* confdefs.h.  */
20834 _ACEOF
20835 cat confdefs.h >>conftest.$ac_ext
20836 cat >>conftest.$ac_ext <<_ACEOF
20837 /* end confdefs.h.  */
20838 #include <$ac_header>
20839 _ACEOF
20840 if { (ac_try="$ac_cpp conftest.$ac_ext"
20841 case "(($ac_try" in
20842   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20843   *) ac_try_echo=$ac_try;;
20844 esac
20845 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20846   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20847   ac_status=$?
20848   grep -v '^ *+' conftest.er1 >conftest.err
20849   rm -f conftest.er1
20850   cat conftest.err >&5
20851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20852   (exit $ac_status); } >/dev/null; then
20853   if test -s conftest.err; then
20854     ac_cpp_err=$ac_c_preproc_warn_flag
20855     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20856   else
20857     ac_cpp_err=
20858   fi
20859 else
20860   ac_cpp_err=yes
20861 fi
20862 if test -z "$ac_cpp_err"; then
20863   ac_header_preproc=yes
20864 else
20865   echo "$as_me: failed program was:" >&5
20866 sed 's/^/| /' conftest.$ac_ext >&5
20867
20868   ac_header_preproc=no
20869 fi
20870
20871 rm -f conftest.err conftest.$ac_ext
20872 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20873 echo "${ECHO_T}$ac_header_preproc" >&6; }
20874
20875 # So?  What about this header?
20876 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20877   yes:no: )
20878     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20879 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20880     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20881 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20882     ac_header_preproc=yes
20883     ;;
20884   no:yes:* )
20885     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20886 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20887     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
20888 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
20889     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20890 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20891     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
20892 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
20893     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20894 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20895     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20896 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20897
20898     ;;
20899 esac
20900 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20901 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20902 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20903   echo $ECHO_N "(cached) $ECHO_C" >&6
20904 else
20905   eval "$as_ac_Header=\$ac_header_preproc"
20906 fi
20907 ac_res=`eval echo '${'$as_ac_Header'}'`
20908                { echo "$as_me:$LINENO: result: $ac_res" >&5
20909 echo "${ECHO_T}$ac_res" >&6; }
20910
20911 fi
20912 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20913   cat >>confdefs.h <<_ACEOF
20914 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20915 _ACEOF
20916
20917 fi
20918
20919 done
20920
20921
20922   ac_save_CPPFLAGS="$CPPFLAGS"
20923   ac_save_LDFLAGS="$LDFLAGS"
20924 #  ac_save_LIBS="$LIBS"
20925
20926   if test \! -z "$includedir" ; then
20927     CPPFLAGS="$CPPFLAGS -I$includedir"
20928   fi
20929   # note: $X_CFLAGS includes $x_includes
20930   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20931
20932   if test \! -z "$libdir" ; then
20933     LDFLAGS="$LDFLAGS -L$libdir"
20934   fi
20935   # note: $X_LIBS includes $x_libraries
20936   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20937
20938   { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20939 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
20940 if test "${ac_cv_lib_util_forkpty+set}" = set; then
20941   echo $ECHO_N "(cached) $ECHO_C" >&6
20942 else
20943   ac_check_lib_save_LIBS=$LIBS
20944 LIBS="-lutil  $LIBS"
20945 cat >conftest.$ac_ext <<_ACEOF
20946 /* confdefs.h.  */
20947 _ACEOF
20948 cat confdefs.h >>conftest.$ac_ext
20949 cat >>conftest.$ac_ext <<_ACEOF
20950 /* end confdefs.h.  */
20951
20952 /* Override any GCC internal prototype to avoid an error.
20953    Use char because int might match the return type of a GCC
20954    builtin and then its argument prototype would still apply.  */
20955 #ifdef __cplusplus
20956 extern "C"
20957 #endif
20958 char forkpty ();
20959 int
20960 main ()
20961 {
20962 return forkpty ();
20963   ;
20964   return 0;
20965 }
20966 _ACEOF
20967 rm -f conftest.$ac_objext conftest$ac_exeext
20968 if { (ac_try="$ac_link"
20969 case "(($ac_try" in
20970   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20971   *) ac_try_echo=$ac_try;;
20972 esac
20973 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20974   (eval "$ac_link") 2>conftest.er1
20975   ac_status=$?
20976   grep -v '^ *+' conftest.er1 >conftest.err
20977   rm -f conftest.er1
20978   cat conftest.err >&5
20979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20980   (exit $ac_status); } &&
20981          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20982   { (case "(($ac_try" in
20983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20984   *) ac_try_echo=$ac_try;;
20985 esac
20986 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20987   (eval "$ac_try") 2>&5
20988   ac_status=$?
20989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20990   (exit $ac_status); }; } &&
20991          { ac_try='test -s conftest$ac_exeext'
20992   { (case "(($ac_try" in
20993   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20994   *) ac_try_echo=$ac_try;;
20995 esac
20996 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20997   (eval "$ac_try") 2>&5
20998   ac_status=$?
20999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21000   (exit $ac_status); }; }; then
21001   ac_cv_lib_util_forkpty=yes
21002 else
21003   echo "$as_me: failed program was:" >&5
21004 sed 's/^/| /' conftest.$ac_ext >&5
21005
21006         ac_cv_lib_util_forkpty=no
21007 fi
21008
21009 rm -f core conftest.err conftest.$ac_objext \
21010       conftest$ac_exeext conftest.$ac_ext
21011 LIBS=$ac_check_lib_save_LIBS
21012 fi
21013 { echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
21014 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
21015 if test $ac_cv_lib_util_forkpty = yes; then
21016   PTY_LIBS="-lutil"
21017                 ac_have_forkpty=yes
21018                 cat >>confdefs.h <<\_ACEOF
21019 #define HAVE_FORKPTY 1
21020 _ACEOF
21021
21022 fi
21023
21024   CPPFLAGS="$ac_save_CPPFLAGS"
21025   LDFLAGS="$ac_save_LDFLAGS"
21026 #  LIBS="$ac_save_LIBS"
21027
21028
21029 if test "$ac_have_forkpty" != yes ; then
21030   # we don't need (or have) -lutil on MacOS 10.4.2...
21031
21032   ac_save_CPPFLAGS="$CPPFLAGS"
21033   ac_save_LDFLAGS="$LDFLAGS"
21034 #  ac_save_LIBS="$LIBS"
21035
21036   if test \! -z "$includedir" ; then
21037     CPPFLAGS="$CPPFLAGS -I$includedir"
21038   fi
21039   # note: $X_CFLAGS includes $x_includes
21040   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
21041
21042   if test \! -z "$libdir" ; then
21043     LDFLAGS="$LDFLAGS -L$libdir"
21044   fi
21045   # note: $X_LIBS includes $x_libraries
21046   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
21047
21048   { echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
21049 echo $ECHO_N "checking for forkpty in -lc... $ECHO_C" >&6; }
21050 if test "${ac_cv_lib_c_forkpty+set}" = set; then
21051   echo $ECHO_N "(cached) $ECHO_C" >&6
21052 else
21053   ac_check_lib_save_LIBS=$LIBS
21054 LIBS="-lc  $LIBS"
21055 cat >conftest.$ac_ext <<_ACEOF
21056 /* confdefs.h.  */
21057 _ACEOF
21058 cat confdefs.h >>conftest.$ac_ext
21059 cat >>conftest.$ac_ext <<_ACEOF
21060 /* end confdefs.h.  */
21061
21062 /* Override any GCC internal prototype to avoid an error.
21063    Use char because int might match the return type of a GCC
21064    builtin and then its argument prototype would still apply.  */
21065 #ifdef __cplusplus
21066 extern "C"
21067 #endif
21068 char forkpty ();
21069 int
21070 main ()
21071 {
21072 return forkpty ();
21073   ;
21074   return 0;
21075 }
21076 _ACEOF
21077 rm -f conftest.$ac_objext conftest$ac_exeext
21078 if { (ac_try="$ac_link"
21079 case "(($ac_try" in
21080   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21081   *) ac_try_echo=$ac_try;;
21082 esac
21083 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21084   (eval "$ac_link") 2>conftest.er1
21085   ac_status=$?
21086   grep -v '^ *+' conftest.er1 >conftest.err
21087   rm -f conftest.er1
21088   cat conftest.err >&5
21089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21090   (exit $ac_status); } &&
21091          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21092   { (case "(($ac_try" in
21093   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21094   *) ac_try_echo=$ac_try;;
21095 esac
21096 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21097   (eval "$ac_try") 2>&5
21098   ac_status=$?
21099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21100   (exit $ac_status); }; } &&
21101          { ac_try='test -s conftest$ac_exeext'
21102   { (case "(($ac_try" in
21103   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21104   *) ac_try_echo=$ac_try;;
21105 esac
21106 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21107   (eval "$ac_try") 2>&5
21108   ac_status=$?
21109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21110   (exit $ac_status); }; }; then
21111   ac_cv_lib_c_forkpty=yes
21112 else
21113   echo "$as_me: failed program was:" >&5
21114 sed 's/^/| /' conftest.$ac_ext >&5
21115
21116         ac_cv_lib_c_forkpty=no
21117 fi
21118
21119 rm -f core conftest.err conftest.$ac_objext \
21120       conftest$ac_exeext conftest.$ac_ext
21121 LIBS=$ac_check_lib_save_LIBS
21122 fi
21123 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
21124 echo "${ECHO_T}$ac_cv_lib_c_forkpty" >&6; }
21125 if test $ac_cv_lib_c_forkpty = yes; then
21126   PTY_LIBS=""
21127                   cat >>confdefs.h <<\_ACEOF
21128 #define HAVE_FORKPTY 1
21129 _ACEOF
21130
21131 fi
21132
21133   CPPFLAGS="$ac_save_CPPFLAGS"
21134   LDFLAGS="$ac_save_LDFLAGS"
21135 #  LIBS="$ac_save_LIBS"
21136
21137 fi
21138
21139 ###############################################################################
21140 #
21141 #       Check for the XSHM server extension.
21142 #
21143 ###############################################################################
21144
21145 have_xshm=no
21146 with_xshm_req=unspecified
21147
21148 # Check whether --with-xshm-ext was given.
21149 if test "${with_xshm_ext+set}" = set; then
21150   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
21151 else
21152   with_xshm=yes
21153 fi
21154
21155
21156
21157    case "$with_xshm" in
21158     yes) ;;
21159     no)  ;;
21160
21161     /*)
21162      { echo "$as_me:$LINENO: checking for XSHM headers" >&5
21163 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6; }
21164      d=$with_xshm/include
21165      if test -d $d; then
21166        X_CFLAGS="-I$d $X_CFLAGS"
21167        { echo "$as_me:$LINENO: result: $d" >&5
21168 echo "${ECHO_T}$d" >&6; }
21169      else
21170        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21171 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
21172      fi
21173
21174      { echo "$as_me:$LINENO: checking for XSHM libs" >&5
21175 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6; }
21176      d=$with_xshm/lib
21177      if test -d $d; then
21178        X_LIBS="-L$d $X_LIBS"
21179        { echo "$as_me:$LINENO: result: $d" >&5
21180 echo "${ECHO_T}$d" >&6; }
21181      else
21182        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21183 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
21184      fi
21185
21186      # replace the directory string with "yes".
21187      with_xshm_req="yes"
21188      with_xshm=$with_xshm_req
21189      ;;
21190
21191     *)
21192      echo ""
21193      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
21194      echo "       If it is a directory, then \`DIR/include' will be added to"
21195      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
21196      exit 1
21197      ;;
21198    esac
21199
21200
21201 if test "$with_xshm" = yes; then
21202
21203   # first check for Xshm.h.
21204
21205   ac_save_CPPFLAGS="$CPPFLAGS"
21206   if test \! -z "$includedir" ; then
21207     CPPFLAGS="$CPPFLAGS -I$includedir"
21208   fi
21209   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
21210   { echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
21211 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6; }
21212 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
21213   echo $ECHO_N "(cached) $ECHO_C" >&6
21214 else
21215   cat >conftest.$ac_ext <<_ACEOF
21216 /* confdefs.h.  */
21217 _ACEOF
21218 cat confdefs.h >>conftest.$ac_ext
21219 cat >>conftest.$ac_ext <<_ACEOF
21220 /* end confdefs.h.  */
21221 #include <X11/Xlib.h>
21222
21223 #include <X11/extensions/XShm.h>
21224 _ACEOF
21225 rm -f conftest.$ac_objext
21226 if { (ac_try="$ac_compile"
21227 case "(($ac_try" in
21228   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21229   *) ac_try_echo=$ac_try;;
21230 esac
21231 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21232   (eval "$ac_compile") 2>conftest.er1
21233   ac_status=$?
21234   grep -v '^ *+' conftest.er1 >conftest.err
21235   rm -f conftest.er1
21236   cat conftest.err >&5
21237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21238   (exit $ac_status); } &&
21239          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21240   { (case "(($ac_try" in
21241   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21242   *) ac_try_echo=$ac_try;;
21243 esac
21244 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21245   (eval "$ac_try") 2>&5
21246   ac_status=$?
21247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21248   (exit $ac_status); }; } &&
21249          { ac_try='test -s conftest.$ac_objext'
21250   { (case "(($ac_try" in
21251   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21252   *) ac_try_echo=$ac_try;;
21253 esac
21254 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21255   (eval "$ac_try") 2>&5
21256   ac_status=$?
21257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21258   (exit $ac_status); }; }; then
21259   ac_cv_header_X11_extensions_XShm_h=yes
21260 else
21261   echo "$as_me: failed program was:" >&5
21262 sed 's/^/| /' conftest.$ac_ext >&5
21263
21264         ac_cv_header_X11_extensions_XShm_h=no
21265 fi
21266
21267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21268 fi
21269 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
21270 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6; }
21271 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
21272   have_xshm=yes
21273 fi
21274
21275
21276   CPPFLAGS="$ac_save_CPPFLAGS"
21277
21278   # if that succeeded, then check for sys/ipc.h.
21279   if test "$have_xshm" = yes; then
21280     have_xshm=no
21281
21282   ac_save_CPPFLAGS="$CPPFLAGS"
21283   if test \! -z "$includedir" ; then
21284     CPPFLAGS="$CPPFLAGS -I$includedir"
21285   fi
21286   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
21287   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
21288   { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
21289 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
21290 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
21291   echo $ECHO_N "(cached) $ECHO_C" >&6
21292 fi
21293 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
21294 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
21295 else
21296   # Is the header compilable?
21297 { echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
21298 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6; }
21299 cat >conftest.$ac_ext <<_ACEOF
21300 /* confdefs.h.  */
21301 _ACEOF
21302 cat confdefs.h >>conftest.$ac_ext
21303 cat >>conftest.$ac_ext <<_ACEOF
21304 /* end confdefs.h.  */
21305 $ac_includes_default
21306 #include <sys/ipc.h>
21307 _ACEOF
21308 rm -f conftest.$ac_objext
21309 if { (ac_try="$ac_compile"
21310 case "(($ac_try" in
21311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21312   *) ac_try_echo=$ac_try;;
21313 esac
21314 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21315   (eval "$ac_compile") 2>conftest.er1
21316   ac_status=$?
21317   grep -v '^ *+' conftest.er1 >conftest.err
21318   rm -f conftest.er1
21319   cat conftest.err >&5
21320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21321   (exit $ac_status); } &&
21322          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21323   { (case "(($ac_try" in
21324   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21325   *) ac_try_echo=$ac_try;;
21326 esac
21327 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21328   (eval "$ac_try") 2>&5
21329   ac_status=$?
21330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21331   (exit $ac_status); }; } &&
21332          { ac_try='test -s conftest.$ac_objext'
21333   { (case "(($ac_try" in
21334   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21335   *) ac_try_echo=$ac_try;;
21336 esac
21337 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21338   (eval "$ac_try") 2>&5
21339   ac_status=$?
21340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21341   (exit $ac_status); }; }; then
21342   ac_header_compiler=yes
21343 else
21344   echo "$as_me: failed program was:" >&5
21345 sed 's/^/| /' conftest.$ac_ext >&5
21346
21347         ac_header_compiler=no
21348 fi
21349
21350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21351 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21352 echo "${ECHO_T}$ac_header_compiler" >&6; }
21353
21354 # Is the header present?
21355 { echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
21356 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6; }
21357 cat >conftest.$ac_ext <<_ACEOF
21358 /* confdefs.h.  */
21359 _ACEOF
21360 cat confdefs.h >>conftest.$ac_ext
21361 cat >>conftest.$ac_ext <<_ACEOF
21362 /* end confdefs.h.  */
21363 #include <sys/ipc.h>
21364 _ACEOF
21365 if { (ac_try="$ac_cpp conftest.$ac_ext"
21366 case "(($ac_try" in
21367   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21368   *) ac_try_echo=$ac_try;;
21369 esac
21370 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21371   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
21372   ac_status=$?
21373   grep -v '^ *+' conftest.er1 >conftest.err
21374   rm -f conftest.er1
21375   cat conftest.err >&5
21376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21377   (exit $ac_status); } >/dev/null; then
21378   if test -s conftest.err; then
21379     ac_cpp_err=$ac_c_preproc_warn_flag
21380     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21381   else
21382     ac_cpp_err=
21383   fi
21384 else
21385   ac_cpp_err=yes
21386 fi
21387 if test -z "$ac_cpp_err"; then
21388   ac_header_preproc=yes
21389 else
21390   echo "$as_me: failed program was:" >&5
21391 sed 's/^/| /' conftest.$ac_ext >&5
21392
21393   ac_header_preproc=no
21394 fi
21395
21396 rm -f conftest.err conftest.$ac_ext
21397 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21398 echo "${ECHO_T}$ac_header_preproc" >&6; }
21399
21400 # So?  What about this header?
21401 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21402   yes:no: )
21403     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
21404 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21405     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
21406 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
21407     ac_header_preproc=yes
21408     ;;
21409   no:yes:* )
21410     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
21411 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
21412     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
21413 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
21414     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
21415 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
21416     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
21417 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21418     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
21419 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
21420     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
21421 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
21422
21423     ;;
21424 esac
21425 { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
21426 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
21427 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
21428   echo $ECHO_N "(cached) $ECHO_C" >&6
21429 else
21430   ac_cv_header_sys_ipc_h=$ac_header_preproc
21431 fi
21432 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
21433 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
21434
21435 fi
21436 if test $ac_cv_header_sys_ipc_h = yes; then
21437   have_xshm=yes
21438 fi
21439
21440
21441   CPPFLAGS="$ac_save_CPPFLAGS"
21442   fi
21443
21444   # if that succeeded, then check for sys/shm.h.
21445   if test "$have_xshm" = yes; then
21446     have_xshm=no
21447
21448   ac_save_CPPFLAGS="$CPPFLAGS"
21449   if test \! -z "$includedir" ; then
21450     CPPFLAGS="$CPPFLAGS -I$includedir"
21451   fi
21452   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
21453   if test "${ac_cv_header_sys_shm_h+set}" = set; then
21454   { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
21455 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
21456 if test "${ac_cv_header_sys_shm_h+set}" = set; then
21457   echo $ECHO_N "(cached) $ECHO_C" >&6
21458 fi
21459 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
21460 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
21461 else
21462   # Is the header compilable?
21463 { echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
21464 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6; }
21465 cat >conftest.$ac_ext <<_ACEOF
21466 /* confdefs.h.  */
21467 _ACEOF
21468 cat confdefs.h >>conftest.$ac_ext
21469 cat >>conftest.$ac_ext <<_ACEOF
21470 /* end confdefs.h.  */
21471 $ac_includes_default
21472 #include <sys/shm.h>
21473 _ACEOF
21474 rm -f conftest.$ac_objext
21475 if { (ac_try="$ac_compile"
21476 case "(($ac_try" in
21477   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21478   *) ac_try_echo=$ac_try;;
21479 esac
21480 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21481   (eval "$ac_compile") 2>conftest.er1
21482   ac_status=$?
21483   grep -v '^ *+' conftest.er1 >conftest.err
21484   rm -f conftest.er1
21485   cat conftest.err >&5
21486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21487   (exit $ac_status); } &&
21488          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21489   { (case "(($ac_try" in
21490   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21491   *) ac_try_echo=$ac_try;;
21492 esac
21493 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21494   (eval "$ac_try") 2>&5
21495   ac_status=$?
21496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21497   (exit $ac_status); }; } &&
21498          { ac_try='test -s conftest.$ac_objext'
21499   { (case "(($ac_try" in
21500   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21501   *) ac_try_echo=$ac_try;;
21502 esac
21503 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21504   (eval "$ac_try") 2>&5
21505   ac_status=$?
21506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21507   (exit $ac_status); }; }; then
21508   ac_header_compiler=yes
21509 else
21510   echo "$as_me: failed program was:" >&5
21511 sed 's/^/| /' conftest.$ac_ext >&5
21512
21513         ac_header_compiler=no
21514 fi
21515
21516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21517 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21518 echo "${ECHO_T}$ac_header_compiler" >&6; }
21519
21520 # Is the header present?
21521 { echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
21522 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6; }
21523 cat >conftest.$ac_ext <<_ACEOF
21524 /* confdefs.h.  */
21525 _ACEOF
21526 cat confdefs.h >>conftest.$ac_ext
21527 cat >>conftest.$ac_ext <<_ACEOF
21528 /* end confdefs.h.  */
21529 #include <sys/shm.h>
21530 _ACEOF
21531 if { (ac_try="$ac_cpp conftest.$ac_ext"
21532 case "(($ac_try" in
21533   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21534   *) ac_try_echo=$ac_try;;
21535 esac
21536 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21537   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
21538   ac_status=$?
21539   grep -v '^ *+' conftest.er1 >conftest.err
21540   rm -f conftest.er1
21541   cat conftest.err >&5
21542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21543   (exit $ac_status); } >/dev/null; then
21544   if test -s conftest.err; then
21545     ac_cpp_err=$ac_c_preproc_warn_flag
21546     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21547   else
21548     ac_cpp_err=
21549   fi
21550 else
21551   ac_cpp_err=yes
21552 fi
21553 if test -z "$ac_cpp_err"; then
21554   ac_header_preproc=yes
21555 else
21556   echo "$as_me: failed program was:" >&5
21557 sed 's/^/| /' conftest.$ac_ext >&5
21558
21559   ac_header_preproc=no
21560 fi
21561
21562 rm -f conftest.err conftest.$ac_ext
21563 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21564 echo "${ECHO_T}$ac_header_preproc" >&6; }
21565
21566 # So?  What about this header?
21567 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21568   yes:no: )
21569     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
21570 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21571     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
21572 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
21573     ac_header_preproc=yes
21574     ;;
21575   no:yes:* )
21576     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
21577 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
21578     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
21579 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
21580     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
21581 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
21582     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
21583 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21584     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
21585 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
21586     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
21587 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
21588
21589     ;;
21590 esac
21591 { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
21592 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
21593 if test "${ac_cv_header_sys_shm_h+set}" = set; then
21594   echo $ECHO_N "(cached) $ECHO_C" >&6
21595 else
21596   ac_cv_header_sys_shm_h=$ac_header_preproc
21597 fi
21598 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
21599 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
21600
21601 fi
21602 if test $ac_cv_header_sys_shm_h = yes; then
21603   have_xshm=yes
21604 fi
21605
21606
21607   CPPFLAGS="$ac_save_CPPFLAGS"
21608   fi
21609
21610   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
21611   # to exist, but the library code to not exist.  And even better, the library
21612   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
21613   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
21614   # that's not quite right, but close enough.)
21615   #
21616   case "$host" in
21617     *-aix*)
21618       if  `uname -v` -eq 3 ; then
21619         have_xshm=no
21620
21621   ac_save_CPPFLAGS="$CPPFLAGS"
21622   ac_save_LDFLAGS="$LDFLAGS"
21623 #  ac_save_LIBS="$LIBS"
21624
21625   if test \! -z "$includedir" ; then
21626     CPPFLAGS="$CPPFLAGS -I$includedir"
21627   fi
21628   # note: $X_CFLAGS includes $x_includes
21629   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
21630
21631   if test \! -z "$libdir" ; then
21632     LDFLAGS="$LDFLAGS -L$libdir"
21633   fi
21634   # note: $X_LIBS includes $x_libraries
21635   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
21636
21637   { echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
21638 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6; }
21639 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
21640   echo $ECHO_N "(cached) $ECHO_C" >&6
21641 else
21642   ac_check_lib_save_LIBS=$LIBS
21643 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
21644 cat >conftest.$ac_ext <<_ACEOF
21645 /* confdefs.h.  */
21646 _ACEOF
21647 cat confdefs.h >>conftest.$ac_ext
21648 cat >>conftest.$ac_ext <<_ACEOF
21649 /* end confdefs.h.  */
21650
21651 /* Override any GCC internal prototype to avoid an error.
21652    Use char because int might match the return type of a GCC
21653    builtin and then its argument prototype would still apply.  */
21654 #ifdef __cplusplus
21655 extern "C"
21656 #endif
21657 char XShmQueryExtension ();
21658 int
21659 main ()
21660 {
21661 return XShmQueryExtension ();
21662   ;
21663   return 0;
21664 }
21665 _ACEOF
21666 rm -f conftest.$ac_objext conftest$ac_exeext
21667 if { (ac_try="$ac_link"
21668 case "(($ac_try" in
21669   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21670   *) ac_try_echo=$ac_try;;
21671 esac
21672 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21673   (eval "$ac_link") 2>conftest.er1
21674   ac_status=$?
21675   grep -v '^ *+' conftest.er1 >conftest.err
21676   rm -f conftest.er1
21677   cat conftest.err >&5
21678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21679   (exit $ac_status); } &&
21680          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21681   { (case "(($ac_try" in
21682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21683   *) ac_try_echo=$ac_try;;
21684 esac
21685 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21686   (eval "$ac_try") 2>&5
21687   ac_status=$?
21688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21689   (exit $ac_status); }; } &&
21690          { ac_try='test -s conftest$ac_exeext'
21691   { (case "(($ac_try" in
21692   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21693   *) ac_try_echo=$ac_try;;
21694 esac
21695 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21696   (eval "$ac_try") 2>&5
21697   ac_status=$?
21698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21699   (exit $ac_status); }; }; then
21700   ac_cv_lib_XextSam_XShmQueryExtension=yes
21701 else
21702   echo "$as_me: failed program was:" >&5
21703 sed 's/^/| /' conftest.$ac_ext >&5
21704
21705         ac_cv_lib_XextSam_XShmQueryExtension=no
21706 fi
21707
21708 rm -f core conftest.err conftest.$ac_objext \
21709       conftest$ac_exeext conftest.$ac_ext
21710 LIBS=$ac_check_lib_save_LIBS
21711 fi
21712 { echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
21713 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
21714 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
21715   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
21716 else
21717   true
21718 fi
21719
21720   CPPFLAGS="$ac_save_CPPFLAGS"
21721   LDFLAGS="$ac_save_LDFLAGS"
21722 #  LIBS="$ac_save_LIBS"
21723
21724       fi
21725     ;;
21726   esac
21727
21728   # if that succeeded, then we've really got it.
21729   if test "$have_xshm" = yes; then
21730     cat >>confdefs.h <<\_ACEOF
21731 #define HAVE_XSHM_EXTENSION 1
21732 _ACEOF
21733
21734   fi
21735
21736 elif test "$with_xshm" != no; then
21737   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
21738   exit 1
21739 fi
21740
21741
21742 ###############################################################################
21743 #
21744 #       Check for the DOUBLE-BUFFER server extension.
21745 #
21746 ###############################################################################
21747
21748 have_xdbe=no
21749 with_xdbe_req=unspecified
21750
21751 # Check whether --with-xdbe-ext was given.
21752 if test "${with_xdbe_ext+set}" = set; then
21753   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
21754 else
21755   with_xdbe=yes
21756 fi
21757
21758
21759
21760    case "$with_xdbe" in
21761     yes) ;;
21762     no)  ;;
21763
21764     /*)
21765      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
21766 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6; }
21767      d=$with_xdbe/include
21768      if test -d $d; then
21769        X_CFLAGS="-I$d $X_CFLAGS"
21770        { echo "$as_me:$LINENO: result: $d" >&5
21771 echo "${ECHO_T}$d" >&6; }
21772      else
21773        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21774 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
21775      fi
21776
21777      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
21778 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6; }
21779      d=$with_xdbe/lib
21780      if test -d $d; then
21781        X_LIBS="-L$d $X_LIBS"
21782        { echo "$as_me:$LINENO: result: $d" >&5
21783 echo "${ECHO_T}$d" >&6; }
21784      else
21785        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21786 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
21787      fi
21788
21789      # replace the directory string with "yes".
21790      with_xdbe_req="yes"
21791      with_xdbe=$with_xdbe_req
21792      ;;
21793
21794     *)
21795      echo ""
21796      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
21797      echo "       If it is a directory, then \`DIR/include' will be added to"
21798      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
21799      exit 1
21800      ;;
21801    esac
21802
21803
21804 if test "$with_xdbe" = yes; then
21805
21806
21807   ac_save_CPPFLAGS="$CPPFLAGS"
21808   if test \! -z "$includedir" ; then
21809     CPPFLAGS="$CPPFLAGS -I$includedir"
21810   fi
21811   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
21812   { echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
21813 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6; }
21814 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
21815   echo $ECHO_N "(cached) $ECHO_C" >&6
21816 else
21817   cat >conftest.$ac_ext <<_ACEOF
21818 /* confdefs.h.  */
21819 _ACEOF
21820 cat confdefs.h >>conftest.$ac_ext
21821 cat >>conftest.$ac_ext <<_ACEOF
21822 /* end confdefs.h.  */
21823 #include <X11/Xlib.h>
21824
21825 #include <X11/extensions/Xdbe.h>
21826 _ACEOF
21827 rm -f conftest.$ac_objext
21828 if { (ac_try="$ac_compile"
21829 case "(($ac_try" in
21830   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21831   *) ac_try_echo=$ac_try;;
21832 esac
21833 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21834   (eval "$ac_compile") 2>conftest.er1
21835   ac_status=$?
21836   grep -v '^ *+' conftest.er1 >conftest.err
21837   rm -f conftest.er1
21838   cat conftest.err >&5
21839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21840   (exit $ac_status); } &&
21841          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21842   { (case "(($ac_try" in
21843   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21844   *) ac_try_echo=$ac_try;;
21845 esac
21846 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21847   (eval "$ac_try") 2>&5
21848   ac_status=$?
21849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21850   (exit $ac_status); }; } &&
21851          { ac_try='test -s conftest.$ac_objext'
21852   { (case "(($ac_try" in
21853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21854   *) ac_try_echo=$ac_try;;
21855 esac
21856 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21857   (eval "$ac_try") 2>&5
21858   ac_status=$?
21859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21860   (exit $ac_status); }; }; then
21861   ac_cv_header_X11_extensions_Xdbe_h=yes
21862 else
21863   echo "$as_me: failed program was:" >&5
21864 sed 's/^/| /' conftest.$ac_ext >&5
21865
21866         ac_cv_header_X11_extensions_Xdbe_h=no
21867 fi
21868
21869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21870 fi
21871 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
21872 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
21873 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
21874   have_xdbe=yes
21875 fi
21876
21877
21878   CPPFLAGS="$ac_save_CPPFLAGS"
21879   if test "$have_xdbe" = yes; then
21880     cat >>confdefs.h <<\_ACEOF
21881 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
21882 _ACEOF
21883
21884   fi
21885
21886 elif test "$with_xdbe" != no; then
21887   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
21888   exit 1
21889 fi
21890
21891
21892 ###############################################################################
21893 #
21894 #       Check for the SGI XReadDisplay server extension.
21895 #
21896 #       Note: this has to be down here, rather than up with the other server
21897 #       extension tests, so that the output of `configure --help' is in the
21898 #       right order.  Arrgh!
21899 #
21900 ###############################################################################
21901
21902 have_readdisplay=no
21903 with_readdisplay_req=unspecified
21904
21905 # Check whether --with-readdisplay was given.
21906 if test "${with_readdisplay+set}" = set; then
21907   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
21908 else
21909   with_readdisplay=yes
21910 fi
21911
21912
21913
21914    case "$with_readdisplay" in
21915     yes) ;;
21916     no)  ;;
21917
21918     /*)
21919      { echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
21920 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6; }
21921      d=$with_readdisplay/include
21922      if test -d $d; then
21923        X_CFLAGS="-I$d $X_CFLAGS"
21924        { echo "$as_me:$LINENO: result: $d" >&5
21925 echo "${ECHO_T}$d" >&6; }
21926      else
21927        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21928 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
21929      fi
21930
21931      { echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
21932 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6; }
21933      d=$with_readdisplay/lib
21934      if test -d $d; then
21935        X_LIBS="-L$d $X_LIBS"
21936        { echo "$as_me:$LINENO: result: $d" >&5
21937 echo "${ECHO_T}$d" >&6; }
21938      else
21939        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
21940 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
21941      fi
21942
21943      # replace the directory string with "yes".
21944      with_readdisplay_req="yes"
21945      with_readdisplay=$with_readdisplay_req
21946      ;;
21947
21948     *)
21949      echo ""
21950      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
21951      echo "       If it is a directory, then \`DIR/include' will be added to"
21952      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
21953      exit 1
21954      ;;
21955    esac
21956
21957
21958 if test "$with_readdisplay" = yes; then
21959
21960   ac_save_CPPFLAGS="$CPPFLAGS"
21961   if test \! -z "$includedir" ; then
21962     CPPFLAGS="$CPPFLAGS -I$includedir"
21963   fi
21964   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
21965   { echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
21966 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6; }
21967 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
21968   echo $ECHO_N "(cached) $ECHO_C" >&6
21969 else
21970   cat >conftest.$ac_ext <<_ACEOF
21971 /* confdefs.h.  */
21972 _ACEOF
21973 cat confdefs.h >>conftest.$ac_ext
21974 cat >>conftest.$ac_ext <<_ACEOF
21975 /* end confdefs.h.  */
21976 #include <X11/Xlib.h>
21977
21978 #include <X11/extensions/readdisplay.h>
21979 _ACEOF
21980 rm -f conftest.$ac_objext
21981 if { (ac_try="$ac_compile"
21982 case "(($ac_try" in
21983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21984   *) ac_try_echo=$ac_try;;
21985 esac
21986 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21987   (eval "$ac_compile") 2>conftest.er1
21988   ac_status=$?
21989   grep -v '^ *+' conftest.er1 >conftest.err
21990   rm -f conftest.er1
21991   cat conftest.err >&5
21992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21993   (exit $ac_status); } &&
21994          { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21995   { (case "(($ac_try" in
21996   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21997   *) ac_try_echo=$ac_try;;
21998 esac
21999 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22000   (eval "$ac_try") 2>&5
22001   ac_status=$?
22002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22003   (exit $ac_status); }; } &&
22004          { ac_try='test -s conftest.$ac_objext'
22005   { (case "(($ac_try" in
22006   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22007   *) ac_try_echo=$ac_try;;
22008 esac
22009 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22010   (eval "$ac_try") 2>&5
22011   ac_status=$?
22012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22013   (exit $ac_status); }; }; then
22014   ac_cv_header_X11_extensions_readdisplay_h=yes
22015 else
22016   echo "$as_me: failed program was:" >&5
22017 sed 's/^/| /' conftest.$ac_ext >&5
22018
22019         ac_cv_header_X11_extensions_readdisplay_h=no
22020 fi
22021
22022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22023 fi
22024 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
22025 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
22026 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
22027   cat >>confdefs.h <<\_ACEOF
22028 #define HAVE_READ_DISPLAY_EXTENSION 1
22029 _ACEOF
22030
22031 fi
22032
22033
22034   CPPFLAGS="$ac_save_CPPFLAGS"
22035 elif test "$with_readdisplay" != no; then
22036   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
22037   exit 1
22038 fi
22039
22040
22041 ###############################################################################
22042 #
22043 #       Check for a directory full of images to use as the default value
22044 #       of the "imageDirectory" preference.
22045 #
22046 ###############################################################################
22047
22048 have_imagedir=no
22049 with_imagedir_req=unspecified
22050
22051
22052 # Check whether --with-image-directory was given.
22053 if test "${with_image_directory+set}" = set; then
22054   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
22055 else
22056   with_imagedir=yes
22057 fi
22058
22059 # no HANDLE_X_PATH_ARG for this one
22060
22061 case "$with_imagedir" in
22062   /*)
22063     # absolute path
22064     { echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
22065 echo $ECHO_N "checking for image directory $with_imagedir... $ECHO_C" >&6; }
22066     if test -d "$with_imagedir" ; then
22067       { echo "$as_me:$LINENO: result: yes" >&5
22068 echo "${ECHO_T}yes" >&6; }
22069     else
22070       { echo "$as_me:$LINENO: result: no" >&5
22071 echo "${ECHO_T}no" >&6; }
22072       with_imagedir=""
22073     fi
22074   ;;
22075   yes)
22076     with_imagedir=""
22077
22078     #### Could use some more defaults here...
22079     for dd in \
22080       "/usr/share/backgrounds/images/"          \
22081       "/usr/share/wallpapers/"                  \
22082       "/Library/Desktop Pictures/"              \
22083     ; do
22084       if test -z "$with_imagedir"; then
22085         { echo "$as_me:$LINENO: checking for image directory $dd" >&5
22086 echo $ECHO_N "checking for image directory $dd... $ECHO_C" >&6; }
22087         if test -d "$dd" ; then
22088           { echo "$as_me:$LINENO: result: yes" >&5
22089 echo "${ECHO_T}yes" >&6; }
22090           with_imagedir="$dd"
22091         else
22092           { echo "$as_me:$LINENO: result: no" >&5
22093 echo "${ECHO_T}no" >&6; }
22094         fi
22095       fi
22096     done
22097
22098   ;;
22099   no)
22100     with_imagedir=""
22101   ;;
22102
22103   *)
22104     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
22105     exit 1
22106   ;;
22107 esac
22108 ac_cv_imagedir="$with_imagedir"
22109
22110 DEFAULT_IMAGES_P='True'
22111 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
22112
22113 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
22114   DEFAULT_IMAGES_P='False'
22115 fi
22116
22117
22118 ###############################################################################
22119 #
22120 #       Pick a text file to use as the default of the "textFile" preference.
22121 #       Any old file will do, but preferably one that will make interesting
22122 #       shapes when displayed by "starwars" and "fontglide".
22123 #
22124 ###############################################################################
22125
22126 have_textfile=no
22127 with_textfile_req=unspecified
22128
22129
22130 # Check whether --with-text-file was given.
22131 if test "${with_text_file+set}" = set; then
22132   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
22133 else
22134   with_textfile=yes
22135 fi
22136
22137 # no HANDLE_X_PATH_ARG for this one
22138
22139 case "$with_textfile" in
22140   /*)
22141     # absolute path
22142     { echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
22143 echo $ECHO_N "checking for text file $with_textfile... $ECHO_C" >&6; }
22144     if test -f "$with_textfile" ; then
22145       { echo "$as_me:$LINENO: result: yes" >&5
22146 echo "${ECHO_T}yes" >&6; }
22147     else
22148       { echo "$as_me:$LINENO: result: no" >&5
22149 echo "${ECHO_T}no" >&6; }
22150       with_textfile=""
22151     fi
22152   ;;
22153   yes)
22154     with_textfile=""
22155
22156     #### Could use some more defaults here...
22157     for f in \
22158       "/usr/X11R6/lib/X11/doc/README"           \
22159       "/usr/share/doc/xserver-common/copyright" \
22160       "/usr/X11R6/README"                       \
22161     ; do
22162       if test -z "$with_textfile"; then
22163         { echo "$as_me:$LINENO: checking for text file $f" >&5
22164 echo $ECHO_N "checking for text file $f... $ECHO_C" >&6; }
22165         if test -f "$f" ; then
22166           { echo "$as_me:$LINENO: result: yes" >&5
22167 echo "${ECHO_T}yes" >&6; }
22168           with_textfile="$f"
22169         else
22170           { echo "$as_me:$LINENO: result: no" >&5
22171 echo "${ECHO_T}no" >&6; }
22172         fi
22173       fi
22174     done
22175
22176   ;;
22177   no)
22178     with_textfile=""
22179   ;;
22180
22181   *)
22182     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
22183     exit 1
22184   ;;
22185 esac
22186 ac_cv_textfile="$with_textfile"
22187
22188 DEFAULT_TEXT_FILE="$ac_cv_textfile"
22189
22190
22191 ###############################################################################
22192 #
22193 #       Check the browser to see help URL
22194 #
22195 ###############################################################################
22196
22197 have_browser=no
22198 with_browser_req=unspecified
22199
22200
22201 # Check whether --with-browser was given.
22202 if test "${with_browser+set}" = set; then
22203   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
22204 else
22205   with_browser=no
22206 fi
22207
22208 # no HANDLE_X_PATH_ARG for this one
22209
22210 case "$with_browser" in
22211   no )
22212   ;;
22213   * )
22214     WITH_BROWSER=$with_browser
22215     gnome_open_program=$with_browser
22216     { echo "$as_me:$LINENO: checking for browser $with_browser" >&5
22217 echo $ECHO_N "checking for browser $with_browser... $ECHO_C" >&6; }
22218     with_browser_fullpath=`which $with_browser 2>/dev/null`
22219     case $with_browser_fullpath in
22220          /* )
22221                 { echo "$as_me:$LINENO: result: yes" >&5
22222 echo "${ECHO_T}yes" >&6; }
22223                  have_browser=yes
22224                  ;;
22225         * )
22226                { echo "$as_me:$LINENO: result: no" >&5
22227 echo "${ECHO_T}no" >&6; }
22228 # Only warning: we don't want to install all packages for the
22229 # dependency of the browser in building stage...
22230                echo "WARNING: browser not found: --with-browser=$with_browser"
22231                ;;
22232     esac
22233   ;;
22234 esac
22235 ac_cv_browser="$with_browser"
22236
22237 ###############################################################################
22238 #
22239 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
22240 #       This should be safe, but let's give people the option.
22241 #
22242 ###############################################################################
22243
22244 setuid_hacks_default=no
22245 setuid_hacks="$setuid_hacks_default"
22246
22247 # Check whether --with-setuid-hacks was given.
22248 if test "${with_setuid_hacks+set}" = set; then
22249   withval=$with_setuid_hacks; setuid_hacks="$withval"
22250 else
22251   setuid_hacks="$setuid_hacks_default"
22252 fi
22253
22254
22255
22256    case "$setuid_hacks" in
22257     yes) ;;
22258     no)  ;;
22259
22260     /*)
22261      { echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
22262 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6; }
22263      d=$setuid_hacks/include
22264      if test -d $d; then
22265        X_CFLAGS="-I$d $X_CFLAGS"
22266        { echo "$as_me:$LINENO: result: $d" >&5
22267 echo "${ECHO_T}$d" >&6; }
22268      else
22269        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
22270 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
22271      fi
22272
22273      { echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
22274 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6; }
22275      d=$setuid_hacks/lib
22276      if test -d $d; then
22277        X_LIBS="-L$d $X_LIBS"
22278        { echo "$as_me:$LINENO: result: $d" >&5
22279 echo "${ECHO_T}$d" >&6; }
22280      else
22281        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
22282 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
22283      fi
22284
22285      # replace the directory string with "yes".
22286      setuid_hacks_req="yes"
22287      setuid_hacks=$setuid_hacks_req
22288      ;;
22289
22290     *)
22291      echo ""
22292      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
22293      echo "       If it is a directory, then \`DIR/include' will be added to"
22294      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
22295      exit 1
22296      ;;
22297    esac
22298
22299
22300 if test "$setuid_hacks" = yes; then
22301   true
22302 elif test "$setuid_hacks" != no; then
22303   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
22304   exit 1
22305 fi
22306
22307
22308 ###############################################################################
22309 #
22310 #       Done testing.  Now, set up the various -I and -L variables,
22311 #       and decide which GUI program to build by default.
22312 #
22313 ###############################################################################
22314
22315 DEPEND=makedepend
22316 DEPEND_FLAGS=
22317 DEPEND_DEFINES=
22318
22319
22320 if test \! -z "$includedir" ; then
22321   INCLUDES="$INCLUDES -I$includedir"
22322 fi
22323
22324 if test \! -z "$libdir" ; then
22325   LDFLAGS="$LDFLAGS -L$libdir"
22326 fi
22327
22328
22329 PREFERRED_DEMO_PROGRAM=''
22330 ALL_DEMO_PROGRAMS=
22331 if test "$have_motif" = yes; then
22332   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
22333   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
22334 fi
22335 if test "$have_gtk" = yes; then
22336   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
22337   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
22338 fi
22339
22340
22341 if test "$have_kerberos" = yes; then
22342   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
22343   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
22344 fi
22345 if test "$have_pam" = yes; then
22346   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
22347   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
22348   INSTALL_PAM="install-pam"
22349 fi
22350 if test "$have_passwd_helper" = yes; then
22351   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
22352   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
22353 fi
22354   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
22355   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
22356
22357
22358 if test "$enable_locking" = yes; then
22359   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
22360   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
22361 else
22362   LOCK_SRCS='$(NOLOCK_SRCS_1)'
22363   LOCK_OBJS='$(NOLOCK_OBJS_1)'
22364 fi
22365
22366 if test "$ac_macosx" = yes; then
22367   EXES_OSX='$(EXES_OSX)'
22368   SCRIPTS_OSX='$(SCRIPTS_OSX)'
22369   MEN_OSX='$(MEN_OSX)'
22370 else
22371   EXES_OSX=
22372   SCRIPTS_OSX=
22373   MEN_OSX=
22374 fi
22375
22376
22377 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
22378
22379 if test "$need_setuid" = yes; then
22380   NEED_SETUID=yes
22381 else
22382   NEED_SETUID=no
22383 fi
22384
22385 if test "$setuid_hacks" = yes; then
22386   SETUID_HACKS=yes
22387 else
22388   SETUID_HACKS=no
22389 fi
22390
22391 tab='   '
22392 if test "$have_gl" = yes; then
22393   GL_EXES='$(GL_EXES)'
22394   GL_UTIL_EXES='$(GL_UTIL_EXES)'
22395   GL_MEN='$(GL_MEN)'
22396   GL_KLUDGE="${tab}  "
22397 else
22398   GL_KLUDGE="-${tab}  "
22399 fi
22400
22401 if test "$have_gle" = yes; then
22402   GLE_EXES='$(GLE_EXES)'
22403   GLE_KLUDGE="${tab}   "
22404 else
22405   GLE_KLUDGE="-${tab}   "
22406 fi
22407
22408 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
22409  JPEG_EXES='$(JPEG_EXES)'
22410 fi
22411
22412
22413 # Another substitution in the XScreenSaver.ad.in file:
22414 #
22415 if test "$gnome_open_program" != ''; then
22416   GNOME24=''
22417   GNOME22='!    '
22418   NOGNOME='!    '
22419 elif test "$gnome_url_show_program" != ''; then
22420   GNOME24='!    '
22421   GNOME22=''
22422   NOGNOME='!    '
22423 else
22424   GNOME24='!    '
22425   GNOME22='!    '
22426   NOGNOME=''
22427 fi
22428
22429
22430 # Set PO_DATADIR to something sensible.
22431 #
22432 { echo "$as_me:$LINENO: checking for locale directory" >&5
22433 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6; }
22434 if test -n "$GTK_DATADIR" ; then
22435   PO_DATADIR="$GTK_DATADIR"
22436 elif test "$have_gtk" = yes; then
22437   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
22438   PO_DATADIR="$PO_DATADIR/share"
22439 fi
22440
22441 if test -z "$PO_DATADIR" ; then
22442   #
22443   # #### Total fucking kludge --
22444   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
22445   # but of course we need to expand all the nested variables to do that...
22446   #
22447   dd=$datadir
22448   eval dd=${dd}
22449   eval dd=${dd}
22450   eval dd=${dd}
22451   eval dd=${dd}
22452   eval dd=${dd}
22453   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
22454 fi
22455
22456 { echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
22457 echo "${ECHO_T}$PO_DATADIR/locale" >&6; }
22458
22459
22460 # canonicalize slashes.
22461 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
22462
22463 # gcc 3.0 likes to issue this warning for every file:
22464 #
22465 # cc1: warning: changing search order for system directory "/usr/local/include"
22466 # cc1: warning:   as it has already been specified as a non-system directory
22467 #
22468 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
22469 # Which *should* be totally redundant, and thus an ok thing to delete?
22470 #
22471 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
22472
22473
22474 ###############################################################################
22475 #
22476 #       Perform substitutions and write Makefiles.
22477 #
22478 ###############################################################################
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542 APPDEFAULTS=$ac_x_app_defaults
22543
22544
22545
22546
22547
22548
22549
22550 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
22551
22552 cat >confcache <<\_ACEOF
22553 # This file is a shell script that caches the results of configure
22554 # tests run on this system so they can be shared between configure
22555 # scripts and configure runs, see configure's option --config-cache.
22556 # It is not useful on other systems.  If it contains results you don't
22557 # want to keep, you may remove or edit it.
22558 #
22559 # config.status only pays attention to the cache file if you give it
22560 # the --recheck option to rerun configure.
22561 #
22562 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22563 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22564 # following values.
22565
22566 _ACEOF
22567
22568 # The following way of writing the cache mishandles newlines in values,
22569 # but we know of no workaround that is simple, portable, and efficient.
22570 # So, we kill variables containing newlines.
22571 # Ultrix sh set writes to stderr and can't be redirected directly,
22572 # and sets the high bit in the cache file unless we assign to the vars.
22573 (
22574   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
22575     eval ac_val=\$$ac_var
22576     case $ac_val in #(
22577     *${as_nl}*)
22578       case $ac_var in #(
22579       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
22580 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
22581       esac
22582       case $ac_var in #(
22583       _ | IFS | as_nl) ;; #(
22584       *) $as_unset $ac_var ;;
22585       esac ;;
22586     esac
22587   done
22588
22589   (set) 2>&1 |
22590     case $as_nl`(ac_space=' '; set) 2>&1` in #(
22591     *${as_nl}ac_space=\ *)
22592       # `set' does not quote correctly, so add quotes (double-quote
22593       # substitution turns \\\\ into \\, and sed turns \\ into \).
22594       sed -n \
22595         "s/'/'\\\\''/g;
22596           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22597       ;; #(
22598     *)
22599       # `set' quotes correctly as required by POSIX, so do not add quotes.
22600       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
22601       ;;
22602     esac |
22603     sort
22604 ) |
22605   sed '
22606      /^ac_cv_env_/b end
22607      t clear
22608      :clear
22609      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22610      t end
22611      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22612      :end' >>confcache
22613 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
22614   if test -w "$cache_file"; then
22615     test "x$cache_file" != "x/dev/null" &&
22616       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
22617 echo "$as_me: updating cache $cache_file" >&6;}
22618     cat confcache >$cache_file
22619   else
22620     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
22621 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
22622   fi
22623 fi
22624 rm -f confcache
22625
22626 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22627 # Let make expand exec_prefix.
22628 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22629
22630 DEFS=-DHAVE_CONFIG_H
22631
22632 ac_libobjs=
22633 ac_ltlibobjs=
22634 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22635   # 1. Remove the extension, and $U if already installed.
22636   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
22637   ac_i=`echo "$ac_i" | sed "$ac_script"`
22638   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
22639   #    will be set to the directory where LIBOBJS objects are built.
22640   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
22641   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
22642 done
22643 LIBOBJS=$ac_libobjs
22644
22645 LTLIBOBJS=$ac_ltlibobjs
22646
22647
22648
22649
22650         mv -f po/POTFILES po/POTFILES.tmp
22651         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
22652         rm -f po/POTFILES.tmp
22653
22654
22655
22656 : ${CONFIG_STATUS=./config.status}
22657 ac_clean_files_save=$ac_clean_files
22658 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22659 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22660 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22661 cat >$CONFIG_STATUS <<_ACEOF
22662 #! $SHELL
22663 # Generated by $as_me.
22664 # Run this file to recreate the current configuration.
22665 # Compiler output produced by configure, useful for debugging
22666 # configure, is in config.log if it exists.
22667
22668 debug=false
22669 ac_cs_recheck=false
22670 ac_cs_silent=false
22671 SHELL=\${CONFIG_SHELL-$SHELL}
22672 _ACEOF
22673
22674 cat >>$CONFIG_STATUS <<\_ACEOF
22675 ## --------------------- ##
22676 ## M4sh Initialization.  ##
22677 ## --------------------- ##
22678
22679 # Be Bourne compatible
22680 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22681   emulate sh
22682   NULLCMD=:
22683   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22684   # is contrary to our usage.  Disable this feature.
22685   alias -g '${1+"$@"}'='"$@"'
22686   setopt NO_GLOB_SUBST
22687 else
22688   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
22689 fi
22690 BIN_SH=xpg4; export BIN_SH # for Tru64
22691 DUALCASE=1; export DUALCASE # for MKS sh
22692
22693
22694 # PATH needs CR
22695 # Avoid depending upon Character Ranges.
22696 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22697 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22698 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22699 as_cr_digits='0123456789'
22700 as_cr_alnum=$as_cr_Letters$as_cr_digits
22701
22702 # The user is always right.
22703 if test "${PATH_SEPARATOR+set}" != set; then
22704   echo "#! /bin/sh" >conf$$.sh
22705   echo  "exit 0"   >>conf$$.sh
22706   chmod +x conf$$.sh
22707   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22708     PATH_SEPARATOR=';'
22709   else
22710     PATH_SEPARATOR=:
22711   fi
22712   rm -f conf$$.sh
22713 fi
22714
22715 # Support unset when possible.
22716 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22717   as_unset=unset
22718 else
22719   as_unset=false
22720 fi
22721
22722
22723 # IFS
22724 # We need space, tab and new line, in precisely that order.  Quoting is
22725 # there to prevent editors from complaining about space-tab.
22726 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
22727 # splitting by setting IFS to empty value.)
22728 as_nl='
22729 '
22730 IFS=" ""        $as_nl"
22731
22732 # Find who we are.  Look in the path if we contain no directory separator.
22733 case $0 in
22734   *[\\/]* ) as_myself=$0 ;;
22735   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22736 for as_dir in $PATH
22737 do
22738   IFS=$as_save_IFS
22739   test -z "$as_dir" && as_dir=.
22740   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22741 done
22742 IFS=$as_save_IFS
22743
22744      ;;
22745 esac
22746 # We did not find ourselves, most probably we were run as `sh COMMAND'
22747 # in which case we are not to be found in the path.
22748 if test "x$as_myself" = x; then
22749   as_myself=$0
22750 fi
22751 if test ! -f "$as_myself"; then
22752   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
22753   { (exit 1); exit 1; }
22754 fi
22755
22756 # Work around bugs in pre-3.0 UWIN ksh.
22757 for as_var in ENV MAIL MAILPATH
22758 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
22759 done
22760 PS1='$ '
22761 PS2='> '
22762 PS4='+ '
22763
22764 # NLS nuisances.
22765 for as_var in \
22766   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22767   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22768   LC_TELEPHONE LC_TIME
22769 do
22770   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22771     eval $as_var=C; export $as_var
22772   else
22773     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
22774   fi
22775 done
22776
22777 # Required to use basename.
22778 if expr a : '\(a\)' >/dev/null 2>&1 &&
22779    test "X`expr 00001 : '.*\(...\)'`" = X001; then
22780   as_expr=expr
22781 else
22782   as_expr=false
22783 fi
22784
22785 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
22786   as_basename=basename
22787 else
22788   as_basename=false
22789 fi
22790
22791
22792 # Name of the executable.
22793 as_me=`$as_basename -- "$0" ||
22794 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22795          X"$0" : 'X\(//\)$' \| \
22796          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
22797 echo X/"$0" |
22798     sed '/^.*\/\([^/][^/]*\)\/*$/{
22799             s//\1/
22800             q
22801           }
22802           /^X\/\(\/\/\)$/{
22803             s//\1/
22804             q
22805           }
22806           /^X\/\(\/\).*/{
22807             s//\1/
22808             q
22809           }
22810           s/.*/./; q'`
22811
22812 # CDPATH.
22813 $as_unset CDPATH
22814
22815
22816
22817   as_lineno_1=$LINENO
22818   as_lineno_2=$LINENO
22819   test "x$as_lineno_1" != "x$as_lineno_2" &&
22820   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
22821
22822   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22823   # uniformly replaced by the line number.  The first 'sed' inserts a
22824   # line-number line after each line using $LINENO; the second 'sed'
22825   # does the real work.  The second script uses 'N' to pair each
22826   # line-number line with the line containing $LINENO, and appends
22827   # trailing '-' during substitution so that $LINENO is not a special
22828   # case at line end.
22829   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22830   # scripts with optimization help from Paolo Bonzini.  Blame Lee
22831   # E. McMahon (1931-1989) for sed's syntax.  :-)
22832   sed -n '
22833     p
22834     /[$]LINENO/=
22835   ' <$as_myself |
22836     sed '
22837       s/[$]LINENO.*/&-/
22838       t lineno
22839       b
22840       :lineno
22841       N
22842       :loop
22843       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
22844       t loop
22845       s/-\n.*//
22846     ' >$as_me.lineno &&
22847   chmod +x "$as_me.lineno" ||
22848     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
22849    { (exit 1); exit 1; }; }
22850
22851   # Don't try to exec as it changes $[0], causing all sort of problems
22852   # (the dirname of $[0] is not the place where we might find the
22853   # original and so on.  Autoconf is especially sensitive to this).
22854   . "./$as_me.lineno"
22855   # Exit status is that of the last command.
22856   exit
22857 }
22858
22859
22860 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
22861   as_dirname=dirname
22862 else
22863   as_dirname=false
22864 fi
22865
22866 ECHO_C= ECHO_N= ECHO_T=
22867 case `echo -n x` in
22868 -n*)
22869   case `echo 'x\c'` in
22870   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
22871   *)   ECHO_C='\c';;
22872   esac;;
22873 *)
22874   ECHO_N='-n';;
22875 esac
22876
22877 if expr a : '\(a\)' >/dev/null 2>&1 &&
22878    test "X`expr 00001 : '.*\(...\)'`" = X001; then
22879   as_expr=expr
22880 else
22881   as_expr=false
22882 fi
22883
22884 rm -f conf$$ conf$$.exe conf$$.file
22885 if test -d conf$$.dir; then
22886   rm -f conf$$.dir/conf$$.file
22887 else
22888   rm -f conf$$.dir
22889   mkdir conf$$.dir
22890 fi
22891 echo >conf$$.file
22892 if ln -s conf$$.file conf$$ 2>/dev/null; then
22893   as_ln_s='ln -s'
22894   # ... but there are two gotchas:
22895   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
22896   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
22897   # In both cases, we have to default to `cp -p'.
22898   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
22899     as_ln_s='cp -p'
22900 elif ln conf$$.file conf$$ 2>/dev/null; then
22901   as_ln_s=ln
22902 else
22903   as_ln_s='cp -p'
22904 fi
22905 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
22906 rmdir conf$$.dir 2>/dev/null
22907
22908 if mkdir -p . 2>/dev/null; then
22909   as_mkdir_p=:
22910 else
22911   test -d ./-p && rmdir ./-p
22912   as_mkdir_p=false
22913 fi
22914
22915 # Find out whether ``test -x'' works.  Don't use a zero-byte file, as
22916 # systems may use methods other than mode bits to determine executability.
22917 cat >conf$$.file <<_ASEOF
22918 #! /bin/sh
22919 exit 0
22920 _ASEOF
22921 chmod +x conf$$.file
22922 if test -x conf$$.file >/dev/null 2>&1; then
22923   as_executable_p="test -x"
22924 else
22925   as_executable_p=:
22926 fi
22927 rm -f conf$$.file
22928
22929 # Sed expression to map a string onto a valid CPP name.
22930 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22931
22932 # Sed expression to map a string onto a valid variable name.
22933 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22934
22935
22936 exec 6>&1
22937
22938 # Save the log message, to keep $[0] and so on meaningful, and to
22939 # report actual input values of CONFIG_FILES etc. instead of their
22940 # values after options handling.
22941 ac_log="
22942 This file was extended by $as_me, which was
22943 generated by GNU Autoconf 2.60.  Invocation command line was
22944
22945   CONFIG_FILES    = $CONFIG_FILES
22946   CONFIG_HEADERS  = $CONFIG_HEADERS
22947   CONFIG_LINKS    = $CONFIG_LINKS
22948   CONFIG_COMMANDS = $CONFIG_COMMANDS
22949   $ $0 $@
22950
22951 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22952 "
22953
22954 _ACEOF
22955
22956 cat >>$CONFIG_STATUS <<_ACEOF
22957 # Files that config.status was made for.
22958 config_files="$ac_config_files"
22959 config_headers="$ac_config_headers"
22960 config_commands="$ac_config_commands"
22961
22962 _ACEOF
22963
22964 cat >>$CONFIG_STATUS <<\_ACEOF
22965 ac_cs_usage="\
22966 \`$as_me' instantiates files from templates according to the
22967 current configuration.
22968
22969 Usage: $0 [OPTIONS] [FILE]...
22970
22971   -h, --help       print this help, then exit
22972   -V, --version    print version number, then exit
22973   -q, --quiet      do not print progress messages
22974   -d, --debug      don't remove temporary files
22975       --recheck    update $as_me by reconfiguring in the same conditions
22976   --file=FILE[:TEMPLATE]
22977                    instantiate the configuration file FILE
22978   --header=FILE[:TEMPLATE]
22979                    instantiate the configuration header FILE
22980
22981 Configuration files:
22982 $config_files
22983
22984 Configuration headers:
22985 $config_headers
22986
22987 Configuration commands:
22988 $config_commands
22989
22990 Report bugs to <bug-autoconf@gnu.org>."
22991
22992 _ACEOF
22993 cat >>$CONFIG_STATUS <<_ACEOF
22994 ac_cs_version="\\
22995 config.status
22996 configured by $0, generated by GNU Autoconf 2.60,
22997   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
22998
22999 Copyright (C) 2006 Free Software Foundation, Inc.
23000 This config.status script is free software; the Free Software Foundation
23001 gives unlimited permission to copy, distribute and modify it."
23002
23003 ac_pwd='$ac_pwd'
23004 srcdir='$srcdir'
23005 INSTALL='$INSTALL'
23006 _ACEOF
23007
23008 cat >>$CONFIG_STATUS <<\_ACEOF
23009 # If no file are specified by the user, then we need to provide default
23010 # value.  By we need to know if files were specified by the user.
23011 ac_need_defaults=:
23012 while test $# != 0
23013 do
23014   case $1 in
23015   --*=*)
23016     ac_option=`expr "X$1" : 'X\([^=]*\)='`
23017     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
23018     ac_shift=:
23019     ;;
23020   *)
23021     ac_option=$1
23022     ac_optarg=$2
23023     ac_shift=shift
23024     ;;
23025   esac
23026
23027   case $ac_option in
23028   # Handling of the options.
23029   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23030     ac_cs_recheck=: ;;
23031   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
23032     echo "$ac_cs_version"; exit ;;
23033   --debug | --debu | --deb | --de | --d | -d )
23034     debug=: ;;
23035   --file | --fil | --fi | --f )
23036     $ac_shift
23037     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23038     ac_need_defaults=false;;
23039   --header | --heade | --head | --hea )
23040     $ac_shift
23041     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23042     ac_need_defaults=false;;
23043   --he | --h)
23044     # Conflict between --help and --header
23045     { echo "$as_me: error: ambiguous option: $1
23046 Try \`$0 --help' for more information." >&2
23047    { (exit 1); exit 1; }; };;
23048   --help | --hel | -h )
23049     echo "$ac_cs_usage"; exit ;;
23050   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23051   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23052     ac_cs_silent=: ;;
23053
23054   # This is an error.
23055   -*) { echo "$as_me: error: unrecognized option: $1
23056 Try \`$0 --help' for more information." >&2
23057    { (exit 1); exit 1; }; } ;;
23058
23059   *) ac_config_targets="$ac_config_targets $1"
23060      ac_need_defaults=false ;;
23061
23062   esac
23063   shift
23064 done
23065
23066 ac_configure_extra_args=
23067
23068 if $ac_cs_silent; then
23069   exec 6>/dev/null
23070   ac_configure_extra_args="$ac_configure_extra_args --silent"
23071 fi
23072
23073 _ACEOF
23074 cat >>$CONFIG_STATUS <<_ACEOF
23075 if \$ac_cs_recheck; then
23076   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23077   CONFIG_SHELL=$SHELL
23078   export CONFIG_SHELL
23079   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23080 fi
23081
23082 _ACEOF
23083 cat >>$CONFIG_STATUS <<\_ACEOF
23084 exec 5>>config.log
23085 {
23086   echo
23087   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23088 ## Running $as_me. ##
23089 _ASBOX
23090   echo "$ac_log"
23091 } >&5
23092
23093 _ACEOF
23094 cat >>$CONFIG_STATUS <<_ACEOF
23095 #
23096 # INIT-COMMANDS
23097 #
23098 INTLTOOL_PERL=${INTLTOOL_PERL}
23099
23100
23101 _ACEOF
23102
23103 cat >>$CONFIG_STATUS <<\_ACEOF
23104
23105 # Handling of arguments.
23106 for ac_config_target in $ac_config_targets
23107 do
23108   case $ac_config_target in
23109     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
23110     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
23111     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
23112     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23113     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
23114     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
23115     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
23116     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
23117     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
23118     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
23119
23120   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23121 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23122    { (exit 1); exit 1; }; };;
23123   esac
23124 done
23125
23126
23127 # If the user did not use the arguments to specify the items to instantiate,
23128 # then the envvar interface is used.  Set only those that are not.
23129 # We use the long form for the default assignment because of an extremely
23130 # bizarre bug on SunOS 4.1.3.
23131 if $ac_need_defaults; then
23132   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23133   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23134   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23135 fi
23136
23137 # Have a temporary directory for convenience.  Make it in the build tree
23138 # simply because there is no reason against having it here, and in addition,
23139 # creating and moving files from /tmp can sometimes cause problems.
23140 # Hook for its removal unless debugging.
23141 # Note that there is a small window in which the directory will not be cleaned:
23142 # after its creation but before its name has been assigned to `$tmp'.
23143 $debug ||
23144 {
23145   tmp=
23146   trap 'exit_status=$?
23147   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
23148 ' 0
23149   trap '{ (exit 1); exit 1; }' 1 2 13 15
23150 }
23151 # Create a (secure) tmp directory for tmp files.
23152
23153 {
23154   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
23155   test -n "$tmp" && test -d "$tmp"
23156 }  ||
23157 {
23158   tmp=./conf$$-$RANDOM
23159   (umask 077 && mkdir "$tmp")
23160 } ||
23161 {
23162    echo "$me: cannot create a temporary directory in ." >&2
23163    { (exit 1); exit 1; }
23164 }
23165
23166 #
23167 # Set up the sed scripts for CONFIG_FILES section.
23168 #
23169
23170 # No need to generate the scripts if there are no CONFIG_FILES.
23171 # This happens for instance when ./config.status config.h
23172 if test -n "$CONFIG_FILES"; then
23173
23174 _ACEOF
23175
23176
23177
23178 ac_delim='%!_!# '
23179 for ac_last_try in false false false false false :; do
23180   cat >conf$$subs.sed <<_ACEOF
23181 SHELL!$SHELL$ac_delim
23182 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
23183 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
23184 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
23185 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
23186 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
23187 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
23188 exec_prefix!$exec_prefix$ac_delim
23189 prefix!$prefix$ac_delim
23190 program_transform_name!$program_transform_name$ac_delim
23191 bindir!$bindir$ac_delim
23192 sbindir!$sbindir$ac_delim
23193 libexecdir!$libexecdir$ac_delim
23194 datarootdir!$datarootdir$ac_delim
23195 datadir!$datadir$ac_delim
23196 sysconfdir!$sysconfdir$ac_delim
23197 sharedstatedir!$sharedstatedir$ac_delim
23198 localstatedir!$localstatedir$ac_delim
23199 includedir!$includedir$ac_delim
23200 oldincludedir!$oldincludedir$ac_delim
23201 docdir!$docdir$ac_delim
23202 infodir!$infodir$ac_delim
23203 htmldir!$htmldir$ac_delim
23204 dvidir!$dvidir$ac_delim
23205 pdfdir!$pdfdir$ac_delim
23206 psdir!$psdir$ac_delim
23207 libdir!$libdir$ac_delim
23208 localedir!$localedir$ac_delim
23209 mandir!$mandir$ac_delim
23210 DEFS!$DEFS$ac_delim
23211 ECHO_C!$ECHO_C$ac_delim
23212 ECHO_N!$ECHO_N$ac_delim
23213 ECHO_T!$ECHO_T$ac_delim
23214 LIBS!$LIBS$ac_delim
23215 build_alias!$build_alias$ac_delim
23216 host_alias!$host_alias$ac_delim
23217 target_alias!$target_alias$ac_delim
23218 build!$build$ac_delim
23219 build_cpu!$build_cpu$ac_delim
23220 build_vendor!$build_vendor$ac_delim
23221 build_os!$build_os$ac_delim
23222 host!$host$ac_delim
23223 host_cpu!$host_cpu$ac_delim
23224 host_vendor!$host_vendor$ac_delim
23225 host_os!$host_os$ac_delim
23226 CC!$CC$ac_delim
23227 CFLAGS!$CFLAGS$ac_delim
23228 LDFLAGS!$LDFLAGS$ac_delim
23229 CPPFLAGS!$CPPFLAGS$ac_delim
23230 ac_ct_CC!$ac_ct_CC$ac_delim
23231 EXEEXT!$EXEEXT$ac_delim
23232 OBJEXT!$OBJEXT$ac_delim
23233 CPP!$CPP$ac_delim
23234 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
23235 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
23236 INSTALL_DATA!$INSTALL_DATA$ac_delim
23237 SET_MAKE!$SET_MAKE$ac_delim
23238 GREP!$GREP$ac_delim
23239 EGREP!$EGREP$ac_delim
23240 PERL!$PERL$ac_delim
23241 XMKMF!$XMKMF$ac_delim
23242 X_CFLAGS!$X_CFLAGS$ac_delim
23243 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
23244 X_LIBS!$X_LIBS$ac_delim
23245 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
23246 INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
23247 INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
23248 INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
23249 INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
23250 INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
23251 INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
23252 INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
23253 INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
23254 INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
23255 INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
23256 INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
23257 INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
23258 INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
23259 INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
23260 INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
23261 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
23262 RANLIB!$RANLIB$ac_delim
23263 ALLOCA!$ALLOCA$ac_delim
23264 USE_NLS!$USE_NLS$ac_delim
23265 MSGFMT!$MSGFMT$ac_delim
23266 GMSGFMT!$GMSGFMT$ac_delim
23267 XGETTEXT!$XGETTEXT$ac_delim
23268 CATALOGS!$CATALOGS$ac_delim
23269 CATOBJEXT!$CATOBJEXT$ac_delim
23270 DATADIRNAME!$DATADIRNAME$ac_delim
23271 GMOFILES!$GMOFILES$ac_delim
23272 INSTOBJEXT!$INSTOBJEXT$ac_delim
23273 INTLDEPS!$INTLDEPS$ac_delim
23274 INTLLIBS!$INTLLIBS$ac_delim
23275 INTLOBJS!$INTLOBJS$ac_delim
23276 POFILES!$POFILES$ac_delim
23277 POSUB!$POSUB$ac_delim
23278 _ACEOF
23279
23280   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
23281     break
23282   elif $ac_last_try; then
23283     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
23284 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
23285    { (exit 1); exit 1; }; }
23286   else
23287     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23288   fi
23289 done
23290
23291 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
23292 if test -n "$ac_eof"; then
23293   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
23294   ac_eof=`expr $ac_eof + 1`
23295 fi
23296
23297 cat >>$CONFIG_STATUS <<_ACEOF
23298 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
23299 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23300 _ACEOF
23301 sed '
23302 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
23303 s/^/s,@/; s/!/@,|#_!!_#|/
23304 :n
23305 t n
23306 s/'"$ac_delim"'$/,g/; t
23307 s/$/\\/; p
23308 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
23309 ' >>$CONFIG_STATUS <conf$$subs.sed
23310 rm -f conf$$subs.sed
23311 cat >>$CONFIG_STATUS <<_ACEOF
23312 CEOF$ac_eof
23313 _ACEOF
23314
23315
23316 ac_delim='%!_!# '
23317 for ac_last_try in false false false false false :; do
23318   cat >conf$$subs.sed <<_ACEOF
23319 MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
23320 login_manager_tmp!$login_manager_tmp$ac_delim
23321 pkg_config!$pkg_config$ac_delim
23322 gnome_open_program!$gnome_open_program$ac_delim
23323 gnome_url_show_program!$gnome_url_show_program$ac_delim
23324 INCLUDES!$INCLUDES$ac_delim
23325 PREFERRED_DEMO_PROGRAM!$PREFERRED_DEMO_PROGRAM$ac_delim
23326 ALL_DEMO_PROGRAMS!$ALL_DEMO_PROGRAMS$ac_delim
23327 SAVER_LIBS!$SAVER_LIBS$ac_delim
23328 MOTIF_LIBS!$MOTIF_LIBS$ac_delim
23329 GTK_LIBS!$GTK_LIBS$ac_delim
23330 XML_LIBS!$XML_LIBS$ac_delim
23331 JPEG_LIBS!$JPEG_LIBS$ac_delim
23332 HACK_LIBS!$HACK_LIBS$ac_delim
23333 XPM_LIBS!$XPM_LIBS$ac_delim
23334 PTY_LIBS!$PTY_LIBS$ac_delim
23335 GL_LIBS!$GL_LIBS$ac_delim
23336 GLE_LIBS!$GLE_LIBS$ac_delim
23337 XDPMS_LIBS!$XDPMS_LIBS$ac_delim
23338 XINERAMA_LIBS!$XINERAMA_LIBS$ac_delim
23339 PASSWD_LIBS!$PASSWD_LIBS$ac_delim
23340 INSTALL_SETUID!$INSTALL_SETUID$ac_delim
23341 SETUID_HACKS!$SETUID_HACKS$ac_delim
23342 INSTALL_DIRS!$INSTALL_DIRS$ac_delim
23343 NEED_SETUID!$NEED_SETUID$ac_delim
23344 INSTALL_PAM!$INSTALL_PAM$ac_delim
23345 HAVE_PAM_FAIL_DELAY!$HAVE_PAM_FAIL_DELAY$ac_delim
23346 NEW_LOGIN_COMMAND!$NEW_LOGIN_COMMAND$ac_delim
23347 NEW_LOGIN_COMMAND_P!$NEW_LOGIN_COMMAND_P$ac_delim
23348 DEFAULT_IMAGES_P!$DEFAULT_IMAGES_P$ac_delim
23349 DEFAULT_IMAGE_DIRECTORY!$DEFAULT_IMAGE_DIRECTORY$ac_delim
23350 DEFAULT_TEXT_FILE!$DEFAULT_TEXT_FILE$ac_delim
23351 WITH_BROWSER!$WITH_BROWSER$ac_delim
23352 OBJCC!$OBJCC$ac_delim
23353 EXES_OSX!$EXES_OSX$ac_delim
23354 SCRIPTS_OSX!$SCRIPTS_OSX$ac_delim
23355 MEN_OSX!$MEN_OSX$ac_delim
23356 PASSWD_SRCS!$PASSWD_SRCS$ac_delim
23357 PASSWD_OBJS!$PASSWD_OBJS$ac_delim
23358 XMU_SRCS!$XMU_SRCS$ac_delim
23359 XMU_OBJS!$XMU_OBJS$ac_delim
23360 XMU_LIBS!$XMU_LIBS$ac_delim
23361 SAVER_GL_SRCS!$SAVER_GL_SRCS$ac_delim
23362 SAVER_GL_OBJS!$SAVER_GL_OBJS$ac_delim
23363 SAVER_GL_LIBS!$SAVER_GL_LIBS$ac_delim
23364 LOCK_SRCS!$LOCK_SRCS$ac_delim
23365 LOCK_OBJS!$LOCK_OBJS$ac_delim
23366 JPEG_EXES!$JPEG_EXES$ac_delim
23367 GL_EXES!$GL_EXES$ac_delim
23368 GL_UTIL_EXES!$GL_UTIL_EXES$ac_delim
23369 GL_MEN!$GL_MEN$ac_delim
23370 GL_KLUDGE!$GL_KLUDGE$ac_delim
23371 GLE_EXES!$GLE_EXES$ac_delim
23372 GLE_KLUDGE!$GLE_KLUDGE$ac_delim
23373 GNOME24!$GNOME24$ac_delim
23374 GNOME22!$GNOME22$ac_delim
23375 NOGNOME!$NOGNOME$ac_delim
23376 HACKDIR!$HACKDIR$ac_delim
23377 HACKDIR_FULL!$HACKDIR_FULL$ac_delim
23378 GTK_DATADIR!$GTK_DATADIR$ac_delim
23379 PO_DATADIR!$PO_DATADIR$ac_delim
23380 HACK_CONF_DIR!$HACK_CONF_DIR$ac_delim
23381 GTK_EXTRA_OBJS!$GTK_EXTRA_OBJS$ac_delim
23382 APPDEFAULTS!$APPDEFAULTS$ac_delim
23383 DEPEND!$DEPEND$ac_delim
23384 DEPEND_FLAGS!$DEPEND_FLAGS$ac_delim
23385 DEPEND_DEFINES!$DEPEND_DEFINES$ac_delim
23386 LIBOBJS!$LIBOBJS$ac_delim
23387 LTLIBOBJS!$LTLIBOBJS$ac_delim
23388 _ACEOF
23389
23390   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 69; then
23391     break
23392   elif $ac_last_try; then
23393     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
23394 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
23395    { (exit 1); exit 1; }; }
23396   else
23397     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23398   fi
23399 done
23400
23401 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
23402 if test -n "$ac_eof"; then
23403   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
23404   ac_eof=`expr $ac_eof + 1`
23405 fi
23406
23407 cat >>$CONFIG_STATUS <<_ACEOF
23408 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
23409 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
23410 _ACEOF
23411 sed '
23412 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
23413 s/^/s,@/; s/!/@,|#_!!_#|/
23414 :n
23415 t n
23416 s/'"$ac_delim"'$/,g/; t
23417 s/$/\\/; p
23418 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
23419 ' >>$CONFIG_STATUS <conf$$subs.sed
23420 rm -f conf$$subs.sed
23421 cat >>$CONFIG_STATUS <<_ACEOF
23422 :end
23423 s/|#_!!_#|//g
23424 CEOF$ac_eof
23425 _ACEOF
23426
23427
23428 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23429 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23430 # trailing colons and then remove the whole line if VPATH becomes empty
23431 # (actually we leave an empty line to preserve line numbers).
23432 if test "x$srcdir" = x.; then
23433   ac_vpsub='/^[  ]*VPATH[        ]*=/{
23434 s/:*\$(srcdir):*/:/
23435 s/:*\${srcdir}:*/:/
23436 s/:*@srcdir@:*/:/
23437 s/^\([^=]*=[     ]*\):*/\1/
23438 s/:*$//
23439 s/^[^=]*=[       ]*$//
23440 }'
23441 fi
23442
23443 cat >>$CONFIG_STATUS <<\_ACEOF
23444 fi # test -n "$CONFIG_FILES"
23445
23446
23447 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
23448 do
23449   case $ac_tag in
23450   :[FHLC]) ac_mode=$ac_tag; continue;;
23451   esac
23452   case $ac_mode$ac_tag in
23453   :[FHL]*:*);;
23454   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
23455 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
23456    { (exit 1); exit 1; }; };;
23457   :[FH]-) ac_tag=-:-;;
23458   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
23459   esac
23460   ac_save_IFS=$IFS
23461   IFS=:
23462   set x $ac_tag
23463   IFS=$ac_save_IFS
23464   shift
23465   ac_file=$1
23466   shift
23467
23468   case $ac_mode in
23469   :L) ac_source=$1;;
23470   :[FH])
23471     ac_file_inputs=
23472     for ac_f
23473     do
23474       case $ac_f in
23475       -) ac_f="$tmp/stdin";;
23476       *) # Look for the file first in the build tree, then in the source tree
23477          # (if the path is not absolute).  The absolute path cannot be DOS-style,
23478          # because $ac_f cannot contain `:'.
23479          test -f "$ac_f" ||
23480            case $ac_f in
23481            [\\/$]*) false;;
23482            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
23483            esac ||
23484            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
23485 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
23486    { (exit 1); exit 1; }; };;
23487       esac
23488       ac_file_inputs="$ac_file_inputs $ac_f"
23489     done
23490
23491     # Let's still pretend it is `configure' which instantiates (i.e., don't
23492     # use $as_me), people would be surprised to read:
23493     #    /* config.h.  Generated by config.status.  */
23494     configure_input="Generated from "`IFS=:
23495           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
23496     if test x"$ac_file" != x-; then
23497       configure_input="$ac_file.  $configure_input"
23498       { echo "$as_me:$LINENO: creating $ac_file" >&5
23499 echo "$as_me: creating $ac_file" >&6;}
23500     fi
23501
23502     case $ac_tag in
23503     *:-:* | *:-) cat >"$tmp/stdin";;
23504     esac
23505     ;;
23506   esac
23507
23508   ac_dir=`$as_dirname -- "$ac_file" ||
23509 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23510          X"$ac_file" : 'X\(//\)[^/]' \| \
23511          X"$ac_file" : 'X\(//\)$' \| \
23512          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
23513 echo X"$ac_file" |
23514     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23515             s//\1/
23516             q
23517           }
23518           /^X\(\/\/\)[^/].*/{
23519             s//\1/
23520             q
23521           }
23522           /^X\(\/\/\)$/{
23523             s//\1/
23524             q
23525           }
23526           /^X\(\/\).*/{
23527             s//\1/
23528             q
23529           }
23530           s/.*/./; q'`
23531   { as_dir="$ac_dir"
23532   case $as_dir in #(
23533   -*) as_dir=./$as_dir;;
23534   esac
23535   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
23536     as_dirs=
23537     while :; do
23538       case $as_dir in #(
23539       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
23540       *) as_qdir=$as_dir;;
23541       esac
23542       as_dirs="'$as_qdir' $as_dirs"
23543       as_dir=`$as_dirname -- "$as_dir" ||
23544 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23545          X"$as_dir" : 'X\(//\)[^/]' \| \
23546          X"$as_dir" : 'X\(//\)$' \| \
23547          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
23548 echo X"$as_dir" |
23549     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23550             s//\1/
23551             q
23552           }
23553           /^X\(\/\/\)[^/].*/{
23554             s//\1/
23555             q
23556           }
23557           /^X\(\/\/\)$/{
23558             s//\1/
23559             q
23560           }
23561           /^X\(\/\).*/{
23562             s//\1/
23563             q
23564           }
23565           s/.*/./; q'`
23566       test -d "$as_dir" && break
23567     done
23568     test -z "$as_dirs" || eval "mkdir $as_dirs"
23569   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
23570 echo "$as_me: error: cannot create directory $as_dir" >&2;}
23571    { (exit 1); exit 1; }; }; }
23572   ac_builddir=.
23573
23574 case "$ac_dir" in
23575 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23576 *)
23577   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23578   # A ".." for each directory in $ac_dir_suffix.
23579   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
23580   case $ac_top_builddir_sub in
23581   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23582   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23583   esac ;;
23584 esac
23585 ac_abs_top_builddir=$ac_pwd
23586 ac_abs_builddir=$ac_pwd$ac_dir_suffix
23587 # for backward compatibility:
23588 ac_top_builddir=$ac_top_build_prefix
23589
23590 case $srcdir in
23591   .)  # We are building in place.
23592     ac_srcdir=.
23593     ac_top_srcdir=$ac_top_builddir_sub
23594     ac_abs_top_srcdir=$ac_pwd ;;
23595   [\\/]* | ?:[\\/]* )  # Absolute name.
23596     ac_srcdir=$srcdir$ac_dir_suffix;
23597     ac_top_srcdir=$srcdir
23598     ac_abs_top_srcdir=$srcdir ;;
23599   *) # Relative name.
23600     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23601     ac_top_srcdir=$ac_top_build_prefix$srcdir
23602     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
23603 esac
23604 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
23605
23606
23607   case $ac_mode in
23608   :F)
23609   #
23610   # CONFIG_FILE
23611   #
23612
23613   case $INSTALL in
23614   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23615   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
23616   esac
23617 _ACEOF
23618
23619 cat >>$CONFIG_STATUS <<\_ACEOF
23620 # If the template does not know about datarootdir, expand it.
23621 # FIXME: This hack should be removed a few years after 2.60.
23622 ac_datarootdir_hack=; ac_datarootdir_seen=
23623
23624 case `sed -n '/datarootdir/ {
23625   p
23626   q
23627 }
23628 /@datadir@/p
23629 /@docdir@/p
23630 /@infodir@/p
23631 /@localedir@/p
23632 /@mandir@/p
23633 ' $ac_file_inputs` in
23634 *datarootdir*) ac_datarootdir_seen=yes;;
23635 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
23636   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23637 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
23638 _ACEOF
23639 cat >>$CONFIG_STATUS <<_ACEOF
23640   ac_datarootdir_hack='
23641   s&@datadir@&$datadir&g
23642   s&@docdir@&$docdir&g
23643   s&@infodir@&$infodir&g
23644   s&@localedir@&$localedir&g
23645   s&@mandir@&$mandir&g
23646     s&\\\${datarootdir}&$datarootdir&g' ;;
23647 esac
23648 _ACEOF
23649
23650 # Neutralize VPATH when `$srcdir' = `.'.
23651 # Shell code in configure.ac might set extrasub.
23652 # FIXME: do we really want to maintain this feature?
23653 cat >>$CONFIG_STATUS <<_ACEOF
23654   sed "$ac_vpsub
23655 $extrasub
23656 _ACEOF
23657 cat >>$CONFIG_STATUS <<\_ACEOF
23658 :t
23659 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23660 s&@configure_input@&$configure_input&;t t
23661 s&@top_builddir@&$ac_top_builddir_sub&;t t
23662 s&@srcdir@&$ac_srcdir&;t t
23663 s&@abs_srcdir@&$ac_abs_srcdir&;t t
23664 s&@top_srcdir@&$ac_top_srcdir&;t t
23665 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
23666 s&@builddir@&$ac_builddir&;t t
23667 s&@abs_builddir@&$ac_abs_builddir&;t t
23668 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
23669 s&@INSTALL@&$ac_INSTALL&;t t
23670 $ac_datarootdir_hack
23671 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
23672
23673 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
23674   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
23675   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
23676   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23677 which seems to be undefined.  Please make sure it is defined." >&5
23678 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23679 which seems to be undefined.  Please make sure it is defined." >&2;}
23680
23681   rm -f "$tmp/stdin"
23682   case $ac_file in
23683   -) cat "$tmp/out"; rm -f "$tmp/out";;
23684   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
23685   esac
23686  ;;
23687   :H)
23688   #
23689   # CONFIG_HEADER
23690   #
23691 _ACEOF
23692
23693 # Transform confdefs.h into a sed script `conftest.defines', that
23694 # substitutes the proper values into config.h.in to produce config.h.
23695 rm -f conftest.defines conftest.tail
23696 # First, append a space to every undef/define line, to ease matching.
23697 echo 's/$/ /' >conftest.defines
23698 # Then, protect against being on the right side of a sed subst, or in
23699 # an unquoted here document, in config.status.  If some macros were
23700 # called several times there might be several #defines for the same
23701 # symbol, which is useless.  But do not sort them, since the last
23702 # AC_DEFINE must be honored.
23703 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
23704 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
23705 # NAME is the cpp macro being defined, VALUE is the value it is being given.
23706 # PARAMS is the parameter list in the macro definition--in most cases, it's
23707 # just an empty string.
23708 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
23709 ac_dB='\\)[      (].*,\\1define\\2'
23710 ac_dC=' '
23711 ac_dD=' ,'
23712
23713 uniq confdefs.h |
23714   sed -n '
23715         t rset
23716         :rset
23717         s/^[     ]*#[    ]*define[       ][      ]*//
23718         t ok
23719         d
23720         :ok
23721         s/[\\&,]/\\&/g
23722         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
23723         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
23724   ' >>conftest.defines
23725
23726 # Remove the space that was appended to ease matching.
23727 # Then replace #undef with comments.  This is necessary, for
23728 # example, in the case of _POSIX_SOURCE, which is predefined and required
23729 # on some systems where configure will not decide to define it.
23730 # (The regexp can be short, since the line contains either #define or #undef.)
23731 echo 's/ $//
23732 s,^[     #]*u.*,/* & */,' >>conftest.defines
23733
23734 # Break up conftest.defines:
23735 ac_max_sed_lines=50
23736
23737 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
23738 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
23739 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
23740 # et cetera.
23741 ac_in='$ac_file_inputs'
23742 ac_out='"$tmp/out1"'
23743 ac_nxt='"$tmp/out2"'
23744
23745 while :
23746 do
23747   # Write a here document:
23748     cat >>$CONFIG_STATUS <<_ACEOF
23749     # First, check the format of the line:
23750     cat >"\$tmp/defines.sed" <<\\CEOF
23751 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
23752 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
23753 b
23754 :def
23755 _ACEOF
23756   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
23757   echo 'CEOF
23758     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
23759   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
23760   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
23761   grep . conftest.tail >/dev/null || break
23762   rm -f conftest.defines
23763   mv conftest.tail conftest.defines
23764 done
23765 rm -f conftest.defines conftest.tail
23766
23767 echo "ac_result=$ac_in" >>$CONFIG_STATUS
23768 cat >>$CONFIG_STATUS <<\_ACEOF
23769   if test x"$ac_file" != x-; then
23770     echo "/* $configure_input  */" >"$tmp/config.h"
23771     cat "$ac_result" >>"$tmp/config.h"
23772     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
23773       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23774 echo "$as_me: $ac_file is unchanged" >&6;}
23775     else
23776       rm -f $ac_file
23777       mv "$tmp/config.h" $ac_file
23778     fi
23779   else
23780     echo "/* $configure_input  */"
23781     cat "$ac_result"
23782   fi
23783   rm -f "$tmp/out12"
23784  ;;
23785
23786   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
23787 echo "$as_me: executing $ac_file commands" >&6;}
23788  ;;
23789   esac
23790
23791
23792   case $ac_file$ac_mode in
23793     "default-1":C)
23794
23795 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
23796 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
23797   rm -f intltool-extract.out
23798 else
23799   mv -f intltool-extract.out intltool-extract
23800 fi
23801 chmod ugo+x intltool-extract
23802 chmod u+w intltool-extract
23803
23804 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
23805 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
23806   rm -f intltool-merge.out
23807 else
23808   mv -f intltool-merge.out intltool-merge
23809 fi
23810 chmod ugo+x intltool-merge
23811 chmod u+w intltool-merge
23812
23813 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
23814 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
23815   rm -f intltool-update.out
23816 else
23817   mv -f intltool-update.out intltool-update
23818 fi
23819 chmod ugo+x intltool-update
23820 chmod u+w intltool-update
23821
23822  ;;
23823     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
23824         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
23825       esac ;;
23826
23827   esac
23828 done # for ac_tag
23829
23830
23831 { (exit 0); exit 0; }
23832 _ACEOF
23833 chmod +x $CONFIG_STATUS
23834 ac_clean_files=$ac_clean_files_save
23835
23836
23837 # configure is writing to config.log, and then calls config.status.
23838 # config.status does its own redirection, appending to config.log.
23839 # Unfortunately, on DOS this fails, as config.log is still kept open
23840 # by configure, so config.status won't be able to write to it; its
23841 # output is simply discarded.  So we exec the FD to /dev/null,
23842 # effectively closing config.log, so it can be properly (re)opened and
23843 # appended to by config.status.  When coming back to configure, we
23844 # need to make the FD available again.
23845 if test "$no_create" != yes; then
23846   ac_cs_success=:
23847   ac_config_status_args=
23848   test "$silent" = yes &&
23849     ac_config_status_args="$ac_config_status_args --quiet"
23850   exec 5>/dev/null
23851   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23852   exec 5>>config.log
23853   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23854   # would make configure fail if this is the last instruction.
23855   $ac_cs_success || { (exit 1); exit 1; }
23856 fi
23857
23858
23859 ###############################################################################
23860 #
23861 #       Print some warnings at the end.
23862 #
23863 ###############################################################################
23864
23865 warn_prefix_1="    Warning:"
23866 warn_prefix_2="       Note:"
23867 warn_prefix="$warn_prefix_1"
23868
23869 warning=no
23870 warnsep='    #################################################################'
23871
23872 warnpre() {
23873   if test "$warning" = no ; then
23874     echo '' ; echo "$warnsep" ; echo ''
23875     warning=yes
23876   fi
23877 }
23878
23879 warn() {
23880   warnpre
23881   if test "$warning" = long ; then echo '' ; fi
23882   warning=yes
23883   rest="$@"
23884   echo "$warn_prefix $rest"
23885 }
23886
23887 warnL() {
23888   was=$warning
23889   warnpre
23890   warning=yes
23891   if test "$was" != no ; then echo '' ; fi
23892   rest="$@"
23893   echo "$warn_prefix $rest"
23894 }
23895
23896 warn2() {
23897   rest="$@"
23898   echo "             $rest"
23899   warning=long
23900 }
23901
23902 note() {
23903   warn_prefix="$warn_prefix_2"
23904   warn $@
23905   warn_prefix="$warn_prefix_1"
23906 }
23907
23908 noteL() {
23909   warn_prefix="$warn_prefix_2"
23910   warnL $@
23911   warn_prefix="$warn_prefix_1"
23912 }
23913
23914
23915 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
23916   warn 'The SGI saver extension was requested, but was not found.'
23917 fi
23918
23919 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
23920   warn 'The XIdle extension was requested, but was not found.'
23921 fi
23922
23923 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
23924   warn 'The XSHM extension was requested, but was not found.'
23925 fi
23926
23927 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
23928   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
23929 fi
23930
23931 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
23932   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
23933 fi
23934
23935 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
23936   warn 'The DPMS extension was requested, but was not found.'
23937 fi
23938
23939 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
23940   warn 'The Xinerama extension was requested, but was not found.'
23941 fi
23942
23943 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
23944   warn 'The XF86VMODE extension was requested, but was not found.'
23945 fi
23946
23947 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
23948   warn 'The RANDR extension was requested, but was not found.'
23949 fi
23950
23951 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
23952   warn "Checking of /proc/interrupts was requested, but it's bogus."
23953 fi
23954
23955 if test "$pkg_config" = false ; then
23956   warnL 'The "pkg-config" program was not found.  Without that,'
23957   warn2 "detection of the various GTK libraries won't work."
23958 else
23959   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
23960   if test "x$pkgerr" != "x" ; then
23961     warnL 'The "pkg-config" program produces errors.  This often causes'
23962     warn2 "detection of the various GTK libraries to malfunction."
23963     warn2 "The errors are:"
23964     echo ''
23965     echo "$pkgerr" | sed 's/^/             > /g'
23966   fi
23967 fi
23968
23969 if test "$gtk_halfassed" != no ; then
23970   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
23971   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
23972   warn2 "Perhaps some of the development packages are not installed?"
23973   if test "$have_gtk" = yes ; then
23974     v="$ac_gtk_version_string"
23975     warn2 "GTK $v is also installed, so it will be used instead."
23976     warn2 "Please read the above output and the \`config.log' file"
23977     warn2 "for more details."
23978   fi
23979 fi
23980
23981 motif_warn2() {
23982   warn2 'Though the Motif front-end to xscreensaver is still'
23983   warn2 'maintained, it is no longer being updated with new'
23984   warn2 'features: all new development on the xscreensaver-demo'
23985   warn2 'program is happening in the GTK version, and not in the'
23986   warn2 'Motif version.  It is recommended that you build against'
23987   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
23988 }
23989
23990 if test "$have_motif" = no -a "$have_gtk" = no; then
23991
23992   if test "$with_motif" = yes; then
23993     warnL "Neither the GTK nor Motif libraries were found; the"
23994     warn2 "\`xscreensaver-demo' program requires one of these."
23995     echo ''
23996     motif_warn2
23997   else
23998     warnL "The GTK libraries do not seem to be available; the"
23999     warn2 "\`xscreensaver-demo' program requires them."
24000 #   echo ''
24001 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
24002 #   warn2 "\`--with-motif' option) but that is NOT recommended."
24003 #   motif_warn2
24004   fi
24005
24006 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
24007   warnL "Use of Motif was requested, but it wasn't found;"
24008   warn2 "Gtk will be used instead."
24009
24010 elif test "$jurassic_gtk" = yes ; then
24011
24012   pref_gtk=2.0
24013
24014   v="$ac_gtk_version_string"
24015   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
24016     warnL "Use of Gtk was requested, but its version number is unknown;"
24017   elif test "$with_gtk_req" = yes ; then
24018     warnL "Use of Gtk was requested, but it is version $v;"
24019   else
24020     warnL "Gtk was found on this system, but it is version $v;"
24021   fi
24022
24023   warn2 "Gtk $pref_gtk or newer is required."
24024
24025 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
24026   warnL "Use of Gtk was requested, but it wasn't found."
24027 fi
24028
24029
24030 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
24031   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
24032   warn2 "headers were not found.  That can't be good.  Please"
24033   warn2 "install the GDK-Pixbuf development kit and re-configure."
24034 fi
24035
24036 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
24037
24038   preferred_lesstif=0.92
24039
24040   if test "$lesstif_version" = unknown; then
24041     warnL "Unable to determine the LessTif version number!"
24042     warn2 "Make sure you are using version $preferred_lesstif or newer."
24043     warn2 "See <http://www.lesstif.org/>."
24044
24045   elif test \! $lesstif_version -gt 82; then
24046     warnL "LessTif version $lesstif_version_string is being used."
24047     warn2 "LessTif versions 0.82 and earlier are too buggy to"
24048     warn2 "use with XScreenSaver; it is strongly recommended"
24049     warn2 "that you upgrade to at least version $preferred_lesstif!"
24050     warn2 "See <http://www.lesstif.org/>."
24051   fi
24052 fi
24053
24054
24055 if test "$have_motif" = yes -a "$have_gtk" = no ; then
24056   warn  'Motif is being used, and GTK is not.'
24057   echo  ''
24058   motif_warn2
24059 fi
24060
24061
24062 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
24063   warnL 'Use of XPM was requested, but it was not found.'
24064 fi
24065
24066 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
24067   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
24068 fi
24069
24070 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
24071    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
24072
24073   if test "$with_gdk_pixbuf_req" = yes ; then
24074     true
24075   elif test "$with_gdk_pixbuf_req" = no ; then
24076     warnL 'The GDK-Pixbuf library is not being used.'
24077   else
24078     warnL 'The GDK-Pixbuf library was not found.'
24079   fi
24080
24081   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
24082     true
24083   elif test "$with_xpm_req" = no ; then
24084     warnL 'The XPM library is not being used.'
24085   else
24086     warnL 'The XPM library was not found.'
24087   fi
24088
24089   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
24090     warn2 'The XPM library is being used instead.'
24091   fi
24092
24093   if test "$gdk_pixbuf_halfassed" = yes ; then
24094     echo ''
24095     warn2 'More specifically, we found the headers, but not the'
24096     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
24097     warn2 "system, or something else went wrong.  The \`config.log'"
24098     warn2 'file might contain some clues.'
24099   fi
24100
24101   echo ''
24102   warn2 'Some of the demos will not use images as much as they could.'
24103   warn2 'You should consider installing GDK-Pixbuf and re-running'
24104   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
24105   warn2 'provides support for more image formats.)'
24106 fi
24107
24108
24109 if test "$have_jpeg" = no ; then
24110   if test "$with_jpeg_req" = yes ; then
24111     warnL 'Use of libjpeg was requested, but it was not found.'
24112   elif test "$with_jpeg_req" = no ; then
24113     noteL 'The JPEG library is not being used.'
24114   else
24115     noteL 'The JPEG library was not found.'
24116   fi
24117
24118   if test "$jpeg_halfassed" = yes ; then
24119     echo ''
24120     warn2 'More specifically, we found the headers, but not the'
24121     warn2 'library; so either JPEG is half-installed on this'
24122     warn2 "system, or something else went wrong.  The \`config.log'"
24123     warn2 'file might contain some clues.'
24124     echo ''
24125   fi
24126
24127   if test "$have_gdk_pixbuf" = no ; then
24128     warn2 "This means that it won't be possible for the image-manipulating"
24129     warn2 "display modes to load files from disk; and it also means that"
24130     warn2 "the \`webcollage' program will be much slower."
24131   else
24132     warn2 "This means the \`webcollage' program will be much slower."
24133   fi
24134 fi
24135
24136
24137 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
24138   preferred_mesagl=3.4
24139   mgv="$ac_mesagl_version_string"
24140   pgl="$preferred_mesagl"
24141
24142   if test "$ac_mesagl_version" = unknown; then
24143     warnL "Unable to determine the MesaGL version number!"
24144     warn2 "Make sure you are using version $preferred_mesagl or newer."
24145
24146   elif test \! "$ac_mesagl_version" -gt 2006; then
24147     warnL "MesaGL version number is $mgv --"
24148     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
24149     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
24150
24151   elif test \! "$ac_mesagl_version" -gt 3003; then
24152     warnL "MesaGL version number is $mgv --"
24153     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
24154     warn2 "that you upgrade to $pgl or newer."
24155   fi
24156 fi
24157
24158 if test "$have_gl" = no ; then
24159   if test "$with_gl_req" = yes ; then
24160     warnL 'Use of GL was requested, but it was not found.'
24161   elif test "$with_gl_req" = no ; then
24162     noteL 'The OpenGL 3D library is not being used.'
24163   else
24164     noteL 'The OpenGL 3D library was not found.'
24165   fi
24166
24167   if test "$gl_halfassed" = yes ; then
24168     echo ''
24169     warn2 'More specifically, we found the headers, but not the'
24170     warn2 'libraries; so either GL is half-installed on this'
24171     warn2 "system, or something else went wrong.  The \`config.log'"
24172     warn2 'file might contain some clues.'
24173   fi
24174
24175   echo ''
24176   warn2 'Those demos which use 3D will not be built or installed.'
24177   warn2 'You might want to consider installing OpenGL and'
24178   warn2 "re-running configure.  If your vendor doesn't ship"
24179   warn2 'their own implementation of OpenGL, you can get a free'
24180   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
24181   warn2 'info, see <http://www.opengl.org/>.'
24182
24183 fi
24184
24185
24186 if test "$have_gl" = yes -a "$have_gle" = no ; then
24187
24188  # nobody cares about this; don't print the warning unless it was
24189  # requested and not found, or halfway-found.
24190  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
24191
24192   if test "$with_gle_req" = yes ; then
24193     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
24194     warn2 'it was not found (though the OpenGL library was found, and'
24195     warn2 'is being used.)'
24196   elif test "$with_gle_req" = no ; then
24197     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
24198     warn2 'library is not.'
24199   else
24200     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
24201     warn2 'was not.'
24202   fi
24203
24204   if test "$gle_halfassed" = yes ; then
24205     echo ''
24206     warn2 'More specifically, we found the headers, but not the'
24207     warn2 'libraries; so either GLE is half-installed on this'
24208     warn2 "system, or something else went wrong.  The \`config.log'"
24209     warn2 'file might contain some clues.'
24210   fi
24211
24212   echo ''
24213   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
24214   warn2 'will not be built or installed.  You might want to consider'
24215   warn2 'installing GLE and re-running configure.  You can find the'
24216   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
24217   warn2 'OpenGL info, see <http://www.opengl.org/>.'
24218
24219  fi
24220 fi
24221
24222
24223 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
24224   warn 'Use of XReadDisplay was requested, but it was not found.'
24225 fi
24226
24227 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
24228   warn 'Use of Kerberos was requested, but it was not found.'
24229 fi
24230
24231 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
24232   warn 'Use of PAM was requested, but it was not found.'
24233 fi
24234
24235 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
24236   warn 'Use of shadow passwords was requested, but they were not found.'
24237 fi
24238
24239
24240 # You are in a twisty maze of namespaces and syntaxes, all alike.
24241 # Fuck the skull of Unix.
24242 #
24243 eval bindir=${bindir}
24244 eval bindir=${bindir}
24245 eval bindir=${bindir}
24246 eval bindir=${bindir}
24247 eval bindir=${bindir}
24248 eval bindir=${bindir}
24249 eval HACKDIR=${HACKDIR}
24250 eval HACKDIR=${HACKDIR}
24251 eval HACKDIR=${HACKDIR}
24252 eval HACKDIR=${HACKDIR}
24253 eval HACKDIR=${HACKDIR}
24254 eval HACKDIR=${HACKDIR}
24255 eval HACK_CONF_DIR=${HACK_CONF_DIR}
24256 eval HACK_CONF_DIR=${HACK_CONF_DIR}
24257 eval HACK_CONF_DIR=${HACK_CONF_DIR}
24258 eval HACK_CONF_DIR=${HACK_CONF_DIR}
24259 eval HACK_CONF_DIR=${HACK_CONF_DIR}
24260 eval HACK_CONF_DIR=${HACK_CONF_DIR}
24261
24262 # canonicalize slashes.
24263 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
24264 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
24265 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
24266
24267
24268 # Sanity check the hackdir
24269 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
24270   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
24271     echo ""
24272     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
24273                    There will be an executable installed with that name, so
24274                    that can't be the name of a directory as well.  Please
24275                    re-configure with a different directory name." >&5
24276 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
24277                    There will be an executable installed with that name, so
24278                    that can't be the name of a directory as well.  Please
24279                    re-configure with a different directory name." >&2;}
24280    { (exit 1); exit 1; }; }
24281   fi
24282 done
24283
24284
24285 do_dir_warning=no
24286
24287 # Now let's warn if there's a previous RPM version already installed.
24288 # But don't bother with this test if we are currently *building* an RPM.
24289
24290 if test -z "$RPM_PACKAGE_VERSION" ; then
24291
24292   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
24293
24294   # M4 sucks!!
24295
24296   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
24297         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
24298         head -1`
24299
24300
24301   if test \! -z "$rpmv" ; then
24302     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
24303     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/attraction$@\1@p'`
24304
24305     warning=no
24306     warnL "There is already an installed RPM of xscreensaver $rpmv"
24307     warn2 'on this system.  You might want to remove it ("rpm -ve")'
24308     warn2 'before running "make install" in this directory.'
24309     echo ""
24310     warn2 "Alternately, you could build this version of xscreensaver"
24311     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
24312     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
24313     warn2 "See the RPM documentation for more info."
24314     echo ""
24315
24316     if test "$rpmbdir" = "$rpmhdir" ; then
24317       warn2 "The RPM version was installed in $rpmbdir/."
24318       do_dir_warning=yes
24319     else
24320       warn2 "The RPM version was installed in $rpmbdir/,"
24321       warn2 "with demos in $rpmhdir/."
24322     fi
24323   fi
24324 fi
24325
24326 if test "${bindir}" = "${HACKDIR}" ; then
24327   do_dir_warning=yes
24328 fi
24329
24330 if test "$do_dir_warning" = yes; then
24331   echo ""
24332   echo "$warnsep"
24333   echo ""
24334   echo '      When you run "make install", the "xscreensaver",'
24335   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
24336   echo "      will be installed in ${bindir}/."
24337   echo ""
24338   echo "      The various graphics demos (190+ different executables) will"
24339   echo "      be installed in ${HACKDIR}/."
24340   echo ""
24341   echo "      If you would prefer the demos to be installed elsewhere,"
24342   echo "      you should re-run configure with the --with-hackdir=DIR"
24343   echo "      option.  For more information, run \`./configure --help'."
24344   warning=yes
24345 fi
24346
24347 if test "$warning" != no; then
24348   echo '' ; echo "$warnsep" ; echo ''
24349 fi
24350
24351 if test "$do_dir_warning" = no; then
24352   if test "$warning" = no; then
24353     echo ''
24354   fi
24355   echo "User programs will be installed in ${bindir}/"
24356   echo "Screen savers will be installed in ${HACKDIR}/"
24357   echo "Hack configurations will be installed in ${HACK_CONF_DIR}/"
24358   echo "Saver configuration will be installed in ${APPDEFAULTS}/"
24359   echo ''
24360 fi