6260432c7b793fac80c99d8d168378e94208d3f9
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.61.
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 more Bourne compatible
14 DUALCASE=1; export DUALCASE # for MKS sh
15 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16   emulate sh
17   NULLCMD=:
18   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19   # is contrary to our usage.  Disable this feature.
20   alias -g '${1+"$@"}'='"$@"'
21   setopt NO_GLOB_SUBST
22 else
23   case `(set -o) 2>/dev/null` in
24   *posix*) set -o posix ;;
25 esac
26
27 fi
28
29
30
31
32 # PATH needs CR
33 # Avoid depending upon Character Ranges.
34 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37 as_cr_digits='0123456789'
38 as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40 # The user is always right.
41 if test "${PATH_SEPARATOR+set}" != set; then
42   echo "#! /bin/sh" >conf$$.sh
43   echo  "exit 0"   >>conf$$.sh
44   chmod +x conf$$.sh
45   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46     PATH_SEPARATOR=';'
47   else
48     PATH_SEPARATOR=:
49   fi
50   rm -f conf$$.sh
51 fi
52
53 # Support unset when possible.
54 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
55   as_unset=unset
56 else
57   as_unset=false
58 fi
59
60
61 # IFS
62 # We need space, tab and new line, in precisely that order.  Quoting is
63 # there to prevent editors from complaining about space-tab.
64 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
65 # splitting by setting IFS to empty value.)
66 as_nl='
67 '
68 IFS=" ""        $as_nl"
69
70 # Find who we are.  Look in the path if we contain no directory separator.
71 case $0 in
72   *[\\/]* ) as_myself=$0 ;;
73   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74 for as_dir in $PATH
75 do
76   IFS=$as_save_IFS
77   test -z "$as_dir" && as_dir=.
78   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79 done
80 IFS=$as_save_IFS
81
82      ;;
83 esac
84 # We did not find ourselves, most probably we were run as `sh COMMAND'
85 # in which case we are not to be found in the path.
86 if test "x$as_myself" = x; then
87   as_myself=$0
88 fi
89 if test ! -f "$as_myself"; then
90   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91   { (exit 1); exit 1; }
92 fi
93
94 # Work around bugs in pre-3.0 UWIN ksh.
95 for as_var in ENV MAIL MAILPATH
96 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97 done
98 PS1='$ '
99 PS2='> '
100 PS4='+ '
101
102 # NLS nuisances.
103 for as_var in \
104   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106   LC_TELEPHONE LC_TIME
107 do
108   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
109     eval $as_var=C; export $as_var
110   else
111     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
112   fi
113 done
114
115 # Required to use basename.
116 if expr a : '\(a\)' >/dev/null 2>&1 &&
117    test "X`expr 00001 : '.*\(...\)'`" = X001; then
118   as_expr=expr
119 else
120   as_expr=false
121 fi
122
123 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
124   as_basename=basename
125 else
126   as_basename=false
127 fi
128
129
130 # Name of the executable.
131 as_me=`$as_basename -- "$0" ||
132 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133          X"$0" : 'X\(//\)$' \| \
134          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
135 echo X/"$0" |
136     sed '/^.*\/\([^/][^/]*\)\/*$/{
137             s//\1/
138             q
139           }
140           /^X\/\(\/\/\)$/{
141             s//\1/
142             q
143           }
144           /^X\/\(\/\).*/{
145             s//\1/
146             q
147           }
148           s/.*/./; q'`
149
150 # CDPATH.
151 $as_unset CDPATH
152
153
154 if test "x$CONFIG_SHELL" = x; then
155   if (eval ":") 2>/dev/null; then
156   as_have_required=yes
157 else
158   as_have_required=no
159 fi
160
161   if test $as_have_required = yes &&     (eval ":
162 (as_func_return () {
163   (exit \$1)
164 }
165 as_func_success () {
166   as_func_return 0
167 }
168 as_func_failure () {
169   as_func_return 1
170 }
171 as_func_ret_success () {
172   return 0
173 }
174 as_func_ret_failure () {
175   return 1
176 }
177
178 exitcode=0
179 if as_func_success; then
180   :
181 else
182   exitcode=1
183   echo as_func_success failed.
184 fi
185
186 if as_func_failure; then
187   exitcode=1
188   echo as_func_failure succeeded.
189 fi
190
191 if as_func_ret_success; then
192   :
193 else
194   exitcode=1
195   echo as_func_ret_success failed.
196 fi
197
198 if as_func_ret_failure; then
199   exitcode=1
200   echo as_func_ret_failure succeeded.
201 fi
202
203 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204   :
205 else
206   exitcode=1
207   echo positional parameters were not saved.
208 fi
209
210 test \$exitcode = 0) || { (exit 1); exit 1; }
211
212 (
213   as_lineno_1=\$LINENO
214   as_lineno_2=\$LINENO
215   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217 ") 2> /dev/null; then
218   :
219 else
220   as_candidate_shells=
221     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223 do
224   IFS=$as_save_IFS
225   test -z "$as_dir" && as_dir=.
226   case $as_dir in
227          /*)
228            for as_base in sh bash ksh sh5; do
229              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230            done;;
231        esac
232 done
233 IFS=$as_save_IFS
234
235
236       for as_shell in $as_candidate_shells $SHELL; do
237          # Try only shells that exist, to save several forks.
238          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239                 { ("$as_shell") 2> /dev/null <<\_ASEOF
240 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241   emulate sh
242   NULLCMD=:
243   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244   # is contrary to our usage.  Disable this feature.
245   alias -g '${1+"$@"}'='"$@"'
246   setopt NO_GLOB_SUBST
247 else
248   case `(set -o) 2>/dev/null` in
249   *posix*) set -o posix ;;
250 esac
251
252 fi
253
254
255 :
256 _ASEOF
257 }; then
258   CONFIG_SHELL=$as_shell
259                as_have_required=yes
260                if { "$as_shell" 2> /dev/null <<\_ASEOF
261 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262   emulate sh
263   NULLCMD=:
264   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265   # is contrary to our usage.  Disable this feature.
266   alias -g '${1+"$@"}'='"$@"'
267   setopt NO_GLOB_SUBST
268 else
269   case `(set -o) 2>/dev/null` in
270   *posix*) set -o posix ;;
271 esac
272
273 fi
274
275
276 :
277 (as_func_return () {
278   (exit $1)
279 }
280 as_func_success () {
281   as_func_return 0
282 }
283 as_func_failure () {
284   as_func_return 1
285 }
286 as_func_ret_success () {
287   return 0
288 }
289 as_func_ret_failure () {
290   return 1
291 }
292
293 exitcode=0
294 if as_func_success; then
295   :
296 else
297   exitcode=1
298   echo as_func_success failed.
299 fi
300
301 if as_func_failure; then
302   exitcode=1
303   echo as_func_failure succeeded.
304 fi
305
306 if as_func_ret_success; then
307   :
308 else
309   exitcode=1
310   echo as_func_ret_success failed.
311 fi
312
313 if as_func_ret_failure; then
314   exitcode=1
315   echo as_func_ret_failure succeeded.
316 fi
317
318 if ( set x; as_func_ret_success y && test x = "$1" ); then
319   :
320 else
321   exitcode=1
322   echo positional parameters were not saved.
323 fi
324
325 test $exitcode = 0) || { (exit 1); exit 1; }
326
327 (
328   as_lineno_1=$LINENO
329   as_lineno_2=$LINENO
330   test "x$as_lineno_1" != "x$as_lineno_2" &&
331   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333 _ASEOF
334 }; then
335   break
336 fi
337
338 fi
339
340       done
341
342       if test "x$CONFIG_SHELL" != x; then
343   for as_var in BASH_ENV ENV
344         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345         done
346         export CONFIG_SHELL
347         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348 fi
349
350
351     if test $as_have_required = no; then
352   echo This script requires a shell more modern than all the
353       echo shells that I found on your system.  Please install a
354       echo modern shell, or manually run the script under such a
355       echo shell if you do have one.
356       { (exit 1); exit 1; }
357 fi
358
359
360 fi
361
362 fi
363
364
365
366 (eval "as_func_return () {
367   (exit \$1)
368 }
369 as_func_success () {
370   as_func_return 0
371 }
372 as_func_failure () {
373   as_func_return 1
374 }
375 as_func_ret_success () {
376   return 0
377 }
378 as_func_ret_failure () {
379   return 1
380 }
381
382 exitcode=0
383 if as_func_success; then
384   :
385 else
386   exitcode=1
387   echo as_func_success failed.
388 fi
389
390 if as_func_failure; then
391   exitcode=1
392   echo as_func_failure succeeded.
393 fi
394
395 if as_func_ret_success; then
396   :
397 else
398   exitcode=1
399   echo as_func_ret_success failed.
400 fi
401
402 if as_func_ret_failure; then
403   exitcode=1
404   echo as_func_ret_failure succeeded.
405 fi
406
407 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408   :
409 else
410   exitcode=1
411   echo positional parameters were not saved.
412 fi
413
414 test \$exitcode = 0") || {
415   echo No shell found that supports shell functions.
416   echo Please tell autoconf@gnu.org about your system,
417   echo including any error possibly output before this
418   echo message
419 }
420
421
422
423   as_lineno_1=$LINENO
424   as_lineno_2=$LINENO
425   test "x$as_lineno_1" != "x$as_lineno_2" &&
426   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
427
428   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429   # uniformly replaced by the line number.  The first 'sed' inserts a
430   # line-number line after each line using $LINENO; the second 'sed'
431   # does the real work.  The second script uses 'N' to pair each
432   # line-number line with the line containing $LINENO, and appends
433   # trailing '-' during substitution so that $LINENO is not a special
434   # case at line end.
435   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
436   # scripts with optimization help from Paolo Bonzini.  Blame Lee
437   # E. McMahon (1931-1989) for sed's syntax.  :-)
438   sed -n '
439     p
440     /[$]LINENO/=
441   ' <$as_myself |
442     sed '
443       s/[$]LINENO.*/&-/
444       t lineno
445       b
446       :lineno
447       N
448       :loop
449       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
450       t loop
451       s/-\n.*//
452     ' >$as_me.lineno &&
453   chmod +x "$as_me.lineno" ||
454     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455    { (exit 1); exit 1; }; }
456
457   # Don't try to exec as it changes $[0], causing all sort of problems
458   # (the dirname of $[0] is not the place where we might find the
459   # original and so on.  Autoconf is especially sensitive to this).
460   . "./$as_me.lineno"
461   # Exit status is that of the last command.
462   exit
463 }
464
465
466 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467   as_dirname=dirname
468 else
469   as_dirname=false
470 fi
471
472 ECHO_C= ECHO_N= ECHO_T=
473 case `echo -n x` in
474 -n*)
475   case `echo 'x\c'` in
476   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
477   *)   ECHO_C='\c';;
478   esac;;
479 *)
480   ECHO_N='-n';;
481 esac
482
483 if expr a : '\(a\)' >/dev/null 2>&1 &&
484    test "X`expr 00001 : '.*\(...\)'`" = X001; then
485   as_expr=expr
486 else
487   as_expr=false
488 fi
489
490 rm -f conf$$ conf$$.exe conf$$.file
491 if test -d conf$$.dir; then
492   rm -f conf$$.dir/conf$$.file
493 else
494   rm -f conf$$.dir
495   mkdir conf$$.dir
496 fi
497 echo >conf$$.file
498 if ln -s conf$$.file conf$$ 2>/dev/null; then
499   as_ln_s='ln -s'
500   # ... but there are two gotchas:
501   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503   # In both cases, we have to default to `cp -p'.
504   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
505     as_ln_s='cp -p'
506 elif ln conf$$.file conf$$ 2>/dev/null; then
507   as_ln_s=ln
508 else
509   as_ln_s='cp -p'
510 fi
511 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512 rmdir conf$$.dir 2>/dev/null
513
514 if mkdir -p . 2>/dev/null; then
515   as_mkdir_p=:
516 else
517   test -d ./-p && rmdir ./-p
518   as_mkdir_p=false
519 fi
520
521 if test -x / >/dev/null 2>&1; then
522   as_test_x='test -x'
523 else
524   if ls -dL / >/dev/null 2>&1; then
525     as_ls_L_option=L
526   else
527     as_ls_L_option=
528   fi
529   as_test_x='
530     eval sh -c '\''
531       if test -d "$1"; then
532         test -d "$1/.";
533       else
534         case $1 in
535         -*)set "./$1";;
536         esac;
537         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538         ???[sx]*):;;*)false;;esac;fi
539     '\'' sh
540   '
541 fi
542 as_executable_p=$as_test_x
543
544 # Sed expression to map a string onto a valid CPP name.
545 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
546
547 # Sed expression to map a string onto a valid variable name.
548 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
549
550
551
552 exec 7<&0 </dev/null 6>&1
553
554 # Name of the host.
555 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556 # so uname gets run too.
557 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
559 #
560 # Initializations.
561 #
562 ac_default_prefix=/usr/local
563 ac_clean_files=
564 ac_config_libobj_dir=.
565 LIBOBJS=
566 cross_compiling=no
567 subdirs=
568 MFLAGS=
569 MAKEFLAGS=
570 SHELL=${CONFIG_SHELL-/bin/sh}
571
572 # Identity of this package.
573 PACKAGE_NAME=
574 PACKAGE_TARNAME=
575 PACKAGE_VERSION=
576 PACKAGE_STRING=
577 PACKAGE_BUGREPORT=
578
579 ac_unique_file="driver/subprocs.c"
580 # Factoring default headers for most tests.
581 ac_includes_default="\
582 #include <stdio.h>
583 #ifdef HAVE_SYS_TYPES_H
584 # include <sys/types.h>
585 #endif
586 #ifdef HAVE_SYS_STAT_H
587 # include <sys/stat.h>
588 #endif
589 #ifdef STDC_HEADERS
590 # include <stdlib.h>
591 # include <stddef.h>
592 #else
593 # ifdef HAVE_STDLIB_H
594 #  include <stdlib.h>
595 # endif
596 #endif
597 #ifdef HAVE_STRING_H
598 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
599 #  include <memory.h>
600 # endif
601 # include <string.h>
602 #endif
603 #ifdef HAVE_STRINGS_H
604 # include <strings.h>
605 #endif
606 #ifdef HAVE_INTTYPES_H
607 # include <inttypes.h>
608 #endif
609 #ifdef HAVE_STDINT_H
610 # include <stdint.h>
611 #endif
612 #ifdef HAVE_UNISTD_H
613 # include <unistd.h>
614 #endif"
615
616 ac_subst_vars='SHELL
617 PATH_SEPARATOR
618 PACKAGE_NAME
619 PACKAGE_TARNAME
620 PACKAGE_VERSION
621 PACKAGE_STRING
622 PACKAGE_BUGREPORT
623 exec_prefix
624 prefix
625 program_transform_name
626 bindir
627 sbindir
628 libexecdir
629 datarootdir
630 datadir
631 sysconfdir
632 sharedstatedir
633 localstatedir
634 includedir
635 oldincludedir
636 docdir
637 infodir
638 htmldir
639 dvidir
640 pdfdir
641 psdir
642 libdir
643 localedir
644 mandir
645 DEFS
646 ECHO_C
647 ECHO_N
648 ECHO_T
649 LIBS
650 build_alias
651 host_alias
652 target_alias
653 build
654 build_cpu
655 build_vendor
656 build_os
657 host
658 host_cpu
659 host_vendor
660 host_os
661 CC
662 CFLAGS
663 LDFLAGS
664 CPPFLAGS
665 ac_ct_CC
666 EXEEXT
667 OBJEXT
668 CPP
669 INSTALL_PROGRAM
670 INSTALL_SCRIPT
671 INSTALL_DATA
672 SET_MAKE
673 GREP
674 EGREP
675 PERL
676 XMKMF
677 X_CFLAGS
678 X_PRE_LIBS
679 X_LIBS
680 X_EXTRA_LIBS
681 INTLTOOL_DESKTOP_RULE
682 INTLTOOL_DIRECTORY_RULE
683 INTLTOOL_KEYS_RULE
684 INTLTOOL_OAF_RULE
685 INTLTOOL_PONG_RULE
686 INTLTOOL_SERVER_RULE
687 INTLTOOL_SHEET_RULE
688 INTLTOOL_SOUNDLIST_RULE
689 INTLTOOL_UI_RULE
690 INTLTOOL_XML_RULE
691 INTLTOOL_CAVES_RULE
692 INTLTOOL_EXTRACT
693 INTLTOOL_MERGE
694 INTLTOOL_UPDATE
695 INTLTOOL_PERL
696 GETTEXT_PACKAGE
697 RANLIB
698 ALLOCA
699 USE_NLS
700 MSGFMT
701 GMSGFMT
702 XGETTEXT
703 CATALOGS
704 CATOBJEXT
705 DATADIRNAME
706 GMOFILES
707 INSTOBJEXT
708 INTLDEPS
709 INTLLIBS
710 INTLOBJS
711 POFILES
712 POSUB
713 MKINSTALLDIRS
714 login_manager_tmp
715 pkg_config
716 gnome_open_program
717 gnome_url_show_program
718 INCLUDES
719 PREFERRED_DEMO_PROGRAM
720 ALL_DEMO_PROGRAMS
721 SAVER_LIBS
722 MOTIF_LIBS
723 GTK_LIBS
724 XML_LIBS
725 JPEG_LIBS
726 HACK_LIBS
727 XPM_LIBS
728 PTY_LIBS
729 GL_LIBS
730 GLE_LIBS
731 XDPMS_LIBS
732 XINERAMA_LIBS
733 PASSWD_LIBS
734 INSTALL_SETUID
735 SETUID_HACKS
736 INSTALL_DIRS
737 NEED_SETUID
738 INSTALL_PAM
739 HAVE_PAM_FAIL_DELAY
740 NEW_LOGIN_COMMAND
741 NEW_LOGIN_COMMAND_P
742 DEFAULT_IMAGES_P
743 DEFAULT_IMAGE_DIRECTORY
744 DEFAULT_TEXT_FILE
745 WITH_BROWSER
746 OBJCC
747 EXES_OSX
748 SCRIPTS_OSX
749 MEN_OSX
750 PASSWD_SRCS
751 PASSWD_OBJS
752 XMU_SRCS
753 XMU_OBJS
754 XMU_LIBS
755 SAVER_GL_SRCS
756 SAVER_GL_OBJS
757 SAVER_GL_LIBS
758 LOCK_SRCS
759 LOCK_OBJS
760 JPEG_EXES
761 GL_EXES
762 GL_UTIL_EXES
763 GL_MEN
764 GL_KLUDGE
765 GLE_EXES
766 GLE_KLUDGE
767 GNOME24
768 GNOME22
769 NOGNOME
770 HACKDIR
771 HACKDIR_FULL
772 GTK_DATADIR
773 PO_DATADIR
774 HACK_CONF_DIR
775 GTK_EXTRA_OBJS
776 APPDEFAULTS
777 DEPEND
778 DEPEND_FLAGS
779 DEPEND_DEFINES
780 LIBOBJS
781 LTLIBOBJS'
782 ac_subst_files=''
783       ac_precious_vars='build_alias
784 host_alias
785 target_alias
786 CC
787 CFLAGS
788 LDFLAGS
789 LIBS
790 CPPFLAGS
791 CPP
792 XMKMF'
793
794
795 # Initialize some variables set by options.
796 ac_init_help=
797 ac_init_version=false
798 # The variables have the same names as the options, with
799 # dashes changed to underlines.
800 cache_file=/dev/null
801 exec_prefix=NONE
802 no_create=
803 no_recursion=
804 prefix=NONE
805 program_prefix=NONE
806 program_suffix=NONE
807 program_transform_name=s,x,x,
808 silent=
809 site=
810 srcdir=
811 verbose=
812 x_includes=NONE
813 x_libraries=NONE
814
815 # Installation directory options.
816 # These are left unexpanded so users can "make install exec_prefix=/foo"
817 # and all the variables that are supposed to be based on exec_prefix
818 # by default will actually change.
819 # Use braces instead of parens because sh, perl, etc. also accept them.
820 # (The list follows the same order as the GNU Coding Standards.)
821 bindir='${exec_prefix}/bin'
822 sbindir='${exec_prefix}/sbin'
823 libexecdir='${exec_prefix}/libexec'
824 datarootdir='${prefix}/share'
825 datadir='${datarootdir}'
826 sysconfdir='${prefix}/etc'
827 sharedstatedir='${prefix}/com'
828 localstatedir='${prefix}/var'
829 includedir='${prefix}/include'
830 oldincludedir='/usr/include'
831 docdir='${datarootdir}/doc/${PACKAGE}'
832 infodir='${datarootdir}/info'
833 htmldir='${docdir}'
834 dvidir='${docdir}'
835 pdfdir='${docdir}'
836 psdir='${docdir}'
837 libdir='${exec_prefix}/lib'
838 localedir='${datarootdir}/locale'
839 mandir='${datarootdir}/man'
840
841 ac_prev=
842 ac_dashdash=
843 for ac_option
844 do
845   # If the previous option needs an argument, assign it.
846   if test -n "$ac_prev"; then
847     eval $ac_prev=\$ac_option
848     ac_prev=
849     continue
850   fi
851
852   case $ac_option in
853   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
854   *)    ac_optarg=yes ;;
855   esac
856
857   # Accept the important Cygnus configure options, so we can diagnose typos.
858
859   case $ac_dashdash$ac_option in
860   --)
861     ac_dashdash=yes ;;
862
863   -bindir | --bindir | --bindi | --bind | --bin | --bi)
864     ac_prev=bindir ;;
865   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
866     bindir=$ac_optarg ;;
867
868   -build | --build | --buil | --bui | --bu)
869     ac_prev=build_alias ;;
870   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
871     build_alias=$ac_optarg ;;
872
873   -cache-file | --cache-file | --cache-fil | --cache-fi \
874   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
875     ac_prev=cache_file ;;
876   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
877   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
878     cache_file=$ac_optarg ;;
879
880   --config-cache | -C)
881     cache_file=config.cache ;;
882
883   -datadir | --datadir | --datadi | --datad)
884     ac_prev=datadir ;;
885   -datadir=* | --datadir=* | --datadi=* | --datad=*)
886     datadir=$ac_optarg ;;
887
888   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
889   | --dataroo | --dataro | --datar)
890     ac_prev=datarootdir ;;
891   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
892   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
893     datarootdir=$ac_optarg ;;
894
895   -disable-* | --disable-*)
896     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
897     # Reject names that are not valid shell variable names.
898     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
899       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
900    { (exit 1); exit 1; }; }
901     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
902     eval enable_$ac_feature=no ;;
903
904   -docdir | --docdir | --docdi | --doc | --do)
905     ac_prev=docdir ;;
906   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
907     docdir=$ac_optarg ;;
908
909   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
910     ac_prev=dvidir ;;
911   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
912     dvidir=$ac_optarg ;;
913
914   -enable-* | --enable-*)
915     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
916     # Reject names that are not valid shell variable names.
917     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
918       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
919    { (exit 1); exit 1; }; }
920     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
921     eval enable_$ac_feature=\$ac_optarg ;;
922
923   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
924   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
925   | --exec | --exe | --ex)
926     ac_prev=exec_prefix ;;
927   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
928   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
929   | --exec=* | --exe=* | --ex=*)
930     exec_prefix=$ac_optarg ;;
931
932   -gas | --gas | --ga | --g)
933     # Obsolete; use --with-gas.
934     with_gas=yes ;;
935
936   -help | --help | --hel | --he | -h)
937     ac_init_help=long ;;
938   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
939     ac_init_help=recursive ;;
940   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
941     ac_init_help=short ;;
942
943   -host | --host | --hos | --ho)
944     ac_prev=host_alias ;;
945   -host=* | --host=* | --hos=* | --ho=*)
946     host_alias=$ac_optarg ;;
947
948   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
949     ac_prev=htmldir ;;
950   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
951   | --ht=*)
952     htmldir=$ac_optarg ;;
953
954   -includedir | --includedir | --includedi | --included | --include \
955   | --includ | --inclu | --incl | --inc)
956     ac_prev=includedir ;;
957   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
958   | --includ=* | --inclu=* | --incl=* | --inc=*)
959     includedir=$ac_optarg ;;
960
961   -infodir | --infodir | --infodi | --infod | --info | --inf)
962     ac_prev=infodir ;;
963   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
964     infodir=$ac_optarg ;;
965
966   -libdir | --libdir | --libdi | --libd)
967     ac_prev=libdir ;;
968   -libdir=* | --libdir=* | --libdi=* | --libd=*)
969     libdir=$ac_optarg ;;
970
971   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
972   | --libexe | --libex | --libe)
973     ac_prev=libexecdir ;;
974   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
975   | --libexe=* | --libex=* | --libe=*)
976     libexecdir=$ac_optarg ;;
977
978   -localedir | --localedir | --localedi | --localed | --locale)
979     ac_prev=localedir ;;
980   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
981     localedir=$ac_optarg ;;
982
983   -localstatedir | --localstatedir | --localstatedi | --localstated \
984   | --localstate | --localstat | --localsta | --localst | --locals)
985     ac_prev=localstatedir ;;
986   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
987   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
988     localstatedir=$ac_optarg ;;
989
990   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
991     ac_prev=mandir ;;
992   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
993     mandir=$ac_optarg ;;
994
995   -nfp | --nfp | --nf)
996     # Obsolete; use --without-fp.
997     with_fp=no ;;
998
999   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1000   | --no-cr | --no-c | -n)
1001     no_create=yes ;;
1002
1003   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1004   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1005     no_recursion=yes ;;
1006
1007   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1008   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1009   | --oldin | --oldi | --old | --ol | --o)
1010     ac_prev=oldincludedir ;;
1011   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1012   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1013   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1014     oldincludedir=$ac_optarg ;;
1015
1016   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1017     ac_prev=prefix ;;
1018   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1019     prefix=$ac_optarg ;;
1020
1021   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1022   | --program-pre | --program-pr | --program-p)
1023     ac_prev=program_prefix ;;
1024   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1025   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1026     program_prefix=$ac_optarg ;;
1027
1028   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1029   | --program-suf | --program-su | --program-s)
1030     ac_prev=program_suffix ;;
1031   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1032   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1033     program_suffix=$ac_optarg ;;
1034
1035   -program-transform-name | --program-transform-name \
1036   | --program-transform-nam | --program-transform-na \
1037   | --program-transform-n | --program-transform- \
1038   | --program-transform | --program-transfor \
1039   | --program-transfo | --program-transf \
1040   | --program-trans | --program-tran \
1041   | --progr-tra | --program-tr | --program-t)
1042     ac_prev=program_transform_name ;;
1043   -program-transform-name=* | --program-transform-name=* \
1044   | --program-transform-nam=* | --program-transform-na=* \
1045   | --program-transform-n=* | --program-transform-=* \
1046   | --program-transform=* | --program-transfor=* \
1047   | --program-transfo=* | --program-transf=* \
1048   | --program-trans=* | --program-tran=* \
1049   | --progr-tra=* | --program-tr=* | --program-t=*)
1050     program_transform_name=$ac_optarg ;;
1051
1052   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1053     ac_prev=pdfdir ;;
1054   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1055     pdfdir=$ac_optarg ;;
1056
1057   -psdir | --psdir | --psdi | --psd | --ps)
1058     ac_prev=psdir ;;
1059   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1060     psdir=$ac_optarg ;;
1061
1062   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1063   | -silent | --silent | --silen | --sile | --sil)
1064     silent=yes ;;
1065
1066   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1067     ac_prev=sbindir ;;
1068   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1069   | --sbi=* | --sb=*)
1070     sbindir=$ac_optarg ;;
1071
1072   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1073   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1074   | --sharedst | --shareds | --shared | --share | --shar \
1075   | --sha | --sh)
1076     ac_prev=sharedstatedir ;;
1077   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1078   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1079   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1080   | --sha=* | --sh=*)
1081     sharedstatedir=$ac_optarg ;;
1082
1083   -site | --site | --sit)
1084     ac_prev=site ;;
1085   -site=* | --site=* | --sit=*)
1086     site=$ac_optarg ;;
1087
1088   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1089     ac_prev=srcdir ;;
1090   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1091     srcdir=$ac_optarg ;;
1092
1093   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1094   | --syscon | --sysco | --sysc | --sys | --sy)
1095     ac_prev=sysconfdir ;;
1096   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1097   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1098     sysconfdir=$ac_optarg ;;
1099
1100   -target | --target | --targe | --targ | --tar | --ta | --t)
1101     ac_prev=target_alias ;;
1102   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1103     target_alias=$ac_optarg ;;
1104
1105   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1106     verbose=yes ;;
1107
1108   -version | --version | --versio | --versi | --vers | -V)
1109     ac_init_version=: ;;
1110
1111   -with-* | --with-*)
1112     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1113     # Reject names that are not valid shell variable names.
1114     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1115       { echo "$as_me: error: invalid package name: $ac_package" >&2
1116    { (exit 1); exit 1; }; }
1117     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1118     eval with_$ac_package=\$ac_optarg ;;
1119
1120   -without-* | --without-*)
1121     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1122     # Reject names that are not valid shell variable names.
1123     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1124       { echo "$as_me: error: invalid package name: $ac_package" >&2
1125    { (exit 1); exit 1; }; }
1126     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1127     eval with_$ac_package=no ;;
1128
1129   --x)
1130     # Obsolete; use --with-x.
1131     with_x=yes ;;
1132
1133   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1134   | --x-incl | --x-inc | --x-in | --x-i)
1135     ac_prev=x_includes ;;
1136   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1137   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1138     x_includes=$ac_optarg ;;
1139
1140   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1141   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1142     ac_prev=x_libraries ;;
1143   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1144   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1145     x_libraries=$ac_optarg ;;
1146
1147   -*) { echo "$as_me: error: unrecognized option: $ac_option
1148 Try \`$0 --help' for more information." >&2
1149    { (exit 1); exit 1; }; }
1150     ;;
1151
1152   *=*)
1153     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1154     # Reject names that are not valid shell variable names.
1155     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1156       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1157    { (exit 1); exit 1; }; }
1158     eval $ac_envvar=\$ac_optarg
1159     export $ac_envvar ;;
1160
1161   *)
1162     # FIXME: should be removed in autoconf 3.0.
1163     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1164     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1165       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1166     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1167     ;;
1168
1169   esac
1170 done
1171
1172 if test -n "$ac_prev"; then
1173   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1174   { echo "$as_me: error: missing argument to $ac_option" >&2
1175    { (exit 1); exit 1; }; }
1176 fi
1177
1178 # Be sure to have absolute directory names.
1179 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1180                 datadir sysconfdir sharedstatedir localstatedir includedir \
1181                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1182                 libdir localedir mandir
1183 do
1184   eval ac_val=\$$ac_var
1185   case $ac_val in
1186     [\\/$]* | ?:[\\/]* )  continue;;
1187     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1188   esac
1189   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1190    { (exit 1); exit 1; }; }
1191 done
1192
1193 # There might be people who depend on the old broken behavior: `$host'
1194 # used to hold the argument of --host etc.
1195 # FIXME: To remove some day.
1196 build=$build_alias
1197 host=$host_alias
1198 target=$target_alias
1199
1200 # FIXME: To remove some day.
1201 if test "x$host_alias" != x; then
1202   if test "x$build_alias" = x; then
1203     cross_compiling=maybe
1204     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1205     If a cross compiler is detected then cross compile mode will be used." >&2
1206   elif test "x$build_alias" != "x$host_alias"; then
1207     cross_compiling=yes
1208   fi
1209 fi
1210
1211 ac_tool_prefix=
1212 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1213
1214 test "$silent" = yes && exec 6>/dev/null
1215
1216
1217 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1218 ac_ls_di=`ls -di .` &&
1219 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1220   { echo "$as_me: error: Working directory cannot be determined" >&2
1221    { (exit 1); exit 1; }; }
1222 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1223   { echo "$as_me: error: pwd does not report name of working directory" >&2
1224    { (exit 1); exit 1; }; }
1225
1226
1227 # Find the source files, if location was not specified.
1228 if test -z "$srcdir"; then
1229   ac_srcdir_defaulted=yes
1230   # Try the directory containing this script, then the parent directory.
1231   ac_confdir=`$as_dirname -- "$0" ||
1232 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1233          X"$0" : 'X\(//\)[^/]' \| \
1234          X"$0" : 'X\(//\)$' \| \
1235          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1236 echo X"$0" |
1237     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1238             s//\1/
1239             q
1240           }
1241           /^X\(\/\/\)[^/].*/{
1242             s//\1/
1243             q
1244           }
1245           /^X\(\/\/\)$/{
1246             s//\1/
1247             q
1248           }
1249           /^X\(\/\).*/{
1250             s//\1/
1251             q
1252           }
1253           s/.*/./; q'`
1254   srcdir=$ac_confdir
1255   if test ! -r "$srcdir/$ac_unique_file"; then
1256     srcdir=..
1257   fi
1258 else
1259   ac_srcdir_defaulted=no
1260 fi
1261 if test ! -r "$srcdir/$ac_unique_file"; then
1262   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1263   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1264    { (exit 1); exit 1; }; }
1265 fi
1266 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1267 ac_abs_confdir=`(
1268         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1269    { (exit 1); exit 1; }; }
1270         pwd)`
1271 # When building in place, set srcdir=.
1272 if test "$ac_abs_confdir" = "$ac_pwd"; then
1273   srcdir=.
1274 fi
1275 # Remove unnecessary trailing slashes from srcdir.
1276 # Double slashes in file names in object file debugging info
1277 # mess up M-x gdb in Emacs.
1278 case $srcdir in
1279 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1280 esac
1281 for ac_var in $ac_precious_vars; do
1282   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1283   eval ac_env_${ac_var}_value=\$${ac_var}
1284   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1285   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1286 done
1287
1288 #
1289 # Report the --help message.
1290 #
1291 if test "$ac_init_help" = "long"; then
1292   # Omit some internal or obsolete options to make the list less imposing.
1293   # This message is too long to be a string in the A/UX 3.1 sh.
1294   cat <<_ACEOF
1295 \`configure' configures this package to adapt to many kinds of systems.
1296
1297 Usage: $0 [OPTION]... [VAR=VALUE]...
1298
1299 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1300 VAR=VALUE.  See below for descriptions of some of the useful variables.
1301
1302 Defaults for the options are specified in brackets.
1303
1304
1305 Configuration:
1306
1307   -h, --help              display this help and exit
1308       --help=short        display options specific to this package
1309       --help=recursive    display the short help of all the included packages
1310   -V, --version           display version information and exit
1311   -q, --quiet, --silent   do not print \`checking...' messages
1312       --cache-file=FILE   cache test results in FILE [disabled]
1313   -C, --config-cache      alias for \`--cache-file=config.cache'
1314   -n, --no-create         do not create output files
1315       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1316
1317 Installation directories:
1318   --prefix=PREFIX         install architecture-independent files in PREFIX
1319                           [$ac_default_prefix]
1320   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1321                           [PREFIX]
1322
1323 By default, \`make install' will install all the files in
1324 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1325 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1326 for instance \`--prefix=\$HOME'.
1327
1328 For better control, use the options below.
1329
1330 Fine tuning of the installation directories:
1331   --bindir=DIR           user executables [EPREFIX/bin]
1332   --libexecdir=DIR       program executables [EPREFIX/libexec]
1333   --libdir=DIR           object code libraries [EPREFIX/lib]
1334   --includedir=DIR       C header files [PREFIX/include]
1335   --x-includes=DIR        X include files are in DIR
1336   --x-libraries=DIR       X library files are in DIR
1337   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1338   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1339   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1340   --mandir=DIR           man documentation [DATAROOTDIR/man]
1341   --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
1342   --htmldir=DIR          html documentation [DOCDIR]
1343   --dvidir=DIR           dvi documentation [DOCDIR]
1344   --pdfdir=DIR           pdf documentation [DOCDIR]
1345   --psdir=DIR            ps documentation [DOCDIR]
1346 _ACEOF
1347
1348   cat <<\_ACEOF
1349
1350 X features:
1351   --x-includes=DIR    X include files are in DIR
1352   --x-libraries=DIR   X library files are in DIR
1353
1354 System types:
1355   --build=BUILD     configure for building on BUILD [guessed]
1356   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1357 _ACEOF
1358 fi
1359
1360 if test -n "$ac_init_help"; then
1361
1362   cat <<\_ACEOF
1363
1364 Optional Features:
1365   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1366   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1367
1368 Screen locking options:
1369   --enable-locking        Compile in support for locking the display.
1370   --disable-locking       Do not allow locking at all.
1371
1372   --enable-root-passwd        Allow root passwd to unlock screen.
1373   --disable-root-passwd       Do not allow that.
1374
1375 Optional Packages:
1376   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1377   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1378
1379
1380 Installation options:
1381   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1382                           Default: `PREFIX/libexec/xscreensaver/'
1383   --with-configdir=DIR    Where to install the data files that describe each
1384                           of the display modes to the GUI.
1385                           Default: `PREFIX/share/xscreensaver/config/'
1386   --with-x-app-defaults=DIR
1387                            Where to install xscreensaver configuration file.
1388
1389 Except where noted, all of the --with options below can also take a
1390 directory argument: for example, `--with-motif=/opt/Motif'.  That would
1391 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
1392 to be added to the -L list, assuming those directories exist.
1393
1394 By default, support for each of these options will be built in, if the
1395 relevant library routines exist.  At run time, they will then be used
1396 only if the X server being used supports them.  Each --with option has
1397 a corresponding --without option, to override building support for them
1398 at all.
1399
1400 Screen blanking and idle-detection options:
1401
1402   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
1403   --with-xidle-ext        Include support for the XIDLE extension.
1404   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
1405   --with-dpms-ext         Include support for the DPMS extension.
1406   --with-xinerama-ext     Include support for the XINERAMA extension.
1407   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1408   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1409   --with-randr-ext        Include support for the X Resize+Rotate extension.
1410   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1411                           file to notice keyboard activity.
1412   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1413   --with-pam-service-name=NAME
1414                           NAME is the name of the PAM service that
1415                           xscreensaver will authenticate as.
1416   --with-kerberos         Include support for Kerberos authentication.
1417   --with-shadow           Include support for shadow password authentication.
1418   --with-passwd-helper    Include support for an external password
1419                           verification helper program.
1420   --with-login-manager    Put a "New Login" button on the unlock dialog that
1421                           runs a login manager such as gdmflexiserver.
1422
1423 User interface options:
1424
1425   --with-gtk              Use the Gtk toolkit for the user interface.
1426   --with-motif            Use the Motif toolkit for the user interface
1427                           (not recommended.)
1428
1429 Graphics options:
1430
1431   --with-gl               Build those demos which depend on OpenGL.
1432   --with-gle              Build those demos which depend on GLE
1433                           (the OpenGL "extrusion" library.)
1434   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1435                           demos, which will make it possible for them to read
1436                           GIF, JPEG, and PNG files as well.
1437   --with-xpm              Include support for XPM files in some demos.
1438                           (Not needed if Pixbuf is used.)
1439   --with-jpeg             Include support for the JPEG library.
1440   --with-xshm-ext         Include support for the Shared Memory extension.
1441   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1442   --with-readdisplay      Include support for the XReadDisplay extension.
1443   --with-image-directory=DIR  By default, some demos may display random images
1444                           from this directory.
1445   --with-text-file=FILE   By default, some demos may display this file.
1446   --with-browser=BROWSER   Specify the browser to show help URL.
1447   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1448                           (which is needed in order to ping other hosts.)
1449
1450
1451 Some influential environment variables:
1452   CC          C compiler command
1453   CFLAGS      C compiler flags
1454   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1455               nonstandard directory <lib dir>
1456   LIBS        libraries to pass to the linker, e.g. -l<library>
1457   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1458               you have headers in a nonstandard directory <include dir>
1459   CPP         C preprocessor
1460   XMKMF       Path to xmkmf, Makefile generator for X Window System
1461
1462 Use these variables to override the choices made by `configure' or to help
1463 it to find libraries and programs with nonstandard names/locations.
1464
1465 _ACEOF
1466 ac_status=$?
1467 fi
1468
1469 if test "$ac_init_help" = "recursive"; then
1470   # If there are subdirs, report their specific --help.
1471   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1472     test -d "$ac_dir" || continue
1473     ac_builddir=.
1474
1475 case "$ac_dir" in
1476 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1477 *)
1478   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1479   # A ".." for each directory in $ac_dir_suffix.
1480   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1481   case $ac_top_builddir_sub in
1482   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1483   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1484   esac ;;
1485 esac
1486 ac_abs_top_builddir=$ac_pwd
1487 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1488 # for backward compatibility:
1489 ac_top_builddir=$ac_top_build_prefix
1490
1491 case $srcdir in
1492   .)  # We are building in place.
1493     ac_srcdir=.
1494     ac_top_srcdir=$ac_top_builddir_sub
1495     ac_abs_top_srcdir=$ac_pwd ;;
1496   [\\/]* | ?:[\\/]* )  # Absolute name.
1497     ac_srcdir=$srcdir$ac_dir_suffix;
1498     ac_top_srcdir=$srcdir
1499     ac_abs_top_srcdir=$srcdir ;;
1500   *) # Relative name.
1501     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1502     ac_top_srcdir=$ac_top_build_prefix$srcdir
1503     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1504 esac
1505 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1506
1507     cd "$ac_dir" || { ac_status=$?; continue; }
1508     # Check for guested configure.
1509     if test -f "$ac_srcdir/configure.gnu"; then
1510       echo &&
1511       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1512     elif test -f "$ac_srcdir/configure"; then
1513       echo &&
1514       $SHELL "$ac_srcdir/configure" --help=recursive
1515     else
1516       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1517     fi || ac_status=$?
1518     cd "$ac_pwd" || { ac_status=$?; break; }
1519   done
1520 fi
1521
1522 test -n "$ac_init_help" && exit $ac_status
1523 if $ac_init_version; then
1524   cat <<\_ACEOF
1525 configure
1526 generated by GNU Autoconf 2.61
1527
1528 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1529 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1530 This configure script is free software; the Free Software Foundation
1531 gives unlimited permission to copy, distribute and modify it.
1532 _ACEOF
1533   exit
1534 fi
1535 cat >config.log <<_ACEOF
1536 This file contains any messages produced by compilers while
1537 running configure, to aid debugging if configure makes a mistake.
1538
1539 It was created by $as_me, which was
1540 generated by GNU Autoconf 2.61.  Invocation command line was
1541
1542   $ $0 $@
1543
1544 _ACEOF
1545 exec 5>>config.log
1546 {
1547 cat <<_ASUNAME
1548 ## --------- ##
1549 ## Platform. ##
1550 ## --------- ##
1551
1552 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1553 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1554 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1555 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1556 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1557
1558 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1559 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1560
1561 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1562 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1563 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1564 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1565 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1566 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1567 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1568
1569 _ASUNAME
1570
1571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1572 for as_dir in $PATH
1573 do
1574   IFS=$as_save_IFS
1575   test -z "$as_dir" && as_dir=.
1576   echo "PATH: $as_dir"
1577 done
1578 IFS=$as_save_IFS
1579
1580 } >&5
1581
1582 cat >&5 <<_ACEOF
1583
1584
1585 ## ----------- ##
1586 ## Core tests. ##
1587 ## ----------- ##
1588
1589 _ACEOF
1590
1591
1592 # Keep a trace of the command line.
1593 # Strip out --no-create and --no-recursion so they do not pile up.
1594 # Strip out --silent because we don't want to record it for future runs.
1595 # Also quote any args containing shell meta-characters.
1596 # Make two passes to allow for proper duplicate-argument suppression.
1597 ac_configure_args=
1598 ac_configure_args0=
1599 ac_configure_args1=
1600 ac_must_keep_next=false
1601 for ac_pass in 1 2
1602 do
1603   for ac_arg
1604   do
1605     case $ac_arg in
1606     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1607     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1608     | -silent | --silent | --silen | --sile | --sil)
1609       continue ;;
1610     *\'*)
1611       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1612     esac
1613     case $ac_pass in
1614     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1615     2)
1616       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1617       if test $ac_must_keep_next = true; then
1618         ac_must_keep_next=false # Got value, back to normal.
1619       else
1620         case $ac_arg in
1621           *=* | --config-cache | -C | -disable-* | --disable-* \
1622           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1623           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1624           | -with-* | --with-* | -without-* | --without-* | --x)
1625             case "$ac_configure_args0 " in
1626               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1627             esac
1628             ;;
1629           -* ) ac_must_keep_next=true ;;
1630         esac
1631       fi
1632       ac_configure_args="$ac_configure_args '$ac_arg'"
1633       ;;
1634     esac
1635   done
1636 done
1637 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1638 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1639
1640 # When interrupted or exit'd, cleanup temporary files, and complete
1641 # config.log.  We remove comments because anyway the quotes in there
1642 # would cause problems or look ugly.
1643 # WARNING: Use '\'' to represent an apostrophe within the trap.
1644 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1645 trap 'exit_status=$?
1646   # Save into config.log some information that might help in debugging.
1647   {
1648     echo
1649
1650     cat <<\_ASBOX
1651 ## ---------------- ##
1652 ## Cache variables. ##
1653 ## ---------------- ##
1654 _ASBOX
1655     echo
1656     # The following way of writing the cache mishandles newlines in values,
1657 (
1658   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1659     eval ac_val=\$$ac_var
1660     case $ac_val in #(
1661     *${as_nl}*)
1662       case $ac_var in #(
1663       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1664 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1665       esac
1666       case $ac_var in #(
1667       _ | IFS | as_nl) ;; #(
1668       *) $as_unset $ac_var ;;
1669       esac ;;
1670     esac
1671   done
1672   (set) 2>&1 |
1673     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1674     *${as_nl}ac_space=\ *)
1675       sed -n \
1676         "s/'\''/'\''\\\\'\'''\''/g;
1677           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1678       ;; #(
1679     *)
1680       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1681       ;;
1682     esac |
1683     sort
1684 )
1685     echo
1686
1687     cat <<\_ASBOX
1688 ## ----------------- ##
1689 ## Output variables. ##
1690 ## ----------------- ##
1691 _ASBOX
1692     echo
1693     for ac_var in $ac_subst_vars
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
1703     if test -n "$ac_subst_files"; then
1704       cat <<\_ASBOX
1705 ## ------------------- ##
1706 ## File substitutions. ##
1707 ## ------------------- ##
1708 _ASBOX
1709       echo
1710       for ac_var in $ac_subst_files
1711       do
1712         eval ac_val=\$$ac_var
1713         case $ac_val in
1714         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1715         esac
1716         echo "$ac_var='\''$ac_val'\''"
1717       done | sort
1718       echo
1719     fi
1720
1721     if test -s confdefs.h; then
1722       cat <<\_ASBOX
1723 ## ----------- ##
1724 ## confdefs.h. ##
1725 ## ----------- ##
1726 _ASBOX
1727       echo
1728       cat confdefs.h
1729       echo
1730     fi
1731     test "$ac_signal" != 0 &&
1732       echo "$as_me: caught signal $ac_signal"
1733     echo "$as_me: exit $exit_status"
1734   } >&5
1735   rm -f core *.core core.conftest.* &&
1736     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1737     exit $exit_status
1738 ' 0
1739 for ac_signal in 1 2 13 15; do
1740   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1741 done
1742 ac_signal=0
1743
1744 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1745 rm -f -r conftest* confdefs.h
1746
1747 # Predefined preprocessor variables.
1748
1749 cat >>confdefs.h <<_ACEOF
1750 #define PACKAGE_NAME "$PACKAGE_NAME"
1751 _ACEOF
1752
1753
1754 cat >>confdefs.h <<_ACEOF
1755 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1756 _ACEOF
1757
1758
1759 cat >>confdefs.h <<_ACEOF
1760 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1761 _ACEOF
1762
1763
1764 cat >>confdefs.h <<_ACEOF
1765 #define PACKAGE_STRING "$PACKAGE_STRING"
1766 _ACEOF
1767
1768
1769 cat >>confdefs.h <<_ACEOF
1770 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1771 _ACEOF
1772
1773
1774 # Let the site file select an alternate cache file if it wants to.
1775 # Prefer explicitly selected file to automatically selected ones.
1776 if test -n "$CONFIG_SITE"; then
1777   set x "$CONFIG_SITE"
1778 elif test "x$prefix" != xNONE; then
1779   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1780 else
1781   set x "$ac_default_prefix/share/config.site" \
1782         "$ac_default_prefix/etc/config.site"
1783 fi
1784 shift
1785 for ac_site_file
1786 do
1787   if test -r "$ac_site_file"; then
1788     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1789 echo "$as_me: loading site script $ac_site_file" >&6;}
1790     sed 's/^/| /' "$ac_site_file" >&5
1791     . "$ac_site_file"
1792   fi
1793 done
1794
1795 if test -r "$cache_file"; then
1796   # Some versions of bash will fail to source /dev/null (special
1797   # files actually), so we avoid doing that.
1798   if test -f "$cache_file"; then
1799     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1800 echo "$as_me: loading cache $cache_file" >&6;}
1801     case $cache_file in
1802       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1803       *)                      . "./$cache_file";;
1804     esac
1805   fi
1806 else
1807   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1808 echo "$as_me: creating cache $cache_file" >&6;}
1809   >$cache_file
1810 fi
1811
1812 # Check that the precious variables saved in the cache have kept the same
1813 # value.
1814 ac_cache_corrupted=false
1815 for ac_var in $ac_precious_vars; do
1816   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1817   eval ac_new_set=\$ac_env_${ac_var}_set
1818   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1819   eval ac_new_val=\$ac_env_${ac_var}_value
1820   case $ac_old_set,$ac_new_set in
1821     set,)
1822       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1823 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1824       ac_cache_corrupted=: ;;
1825     ,set)
1826       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1827 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1828       ac_cache_corrupted=: ;;
1829     ,);;
1830     *)
1831       if test "x$ac_old_val" != "x$ac_new_val"; then
1832         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1833 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1834         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1835 echo "$as_me:   former value:  $ac_old_val" >&2;}
1836         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1837 echo "$as_me:   current value: $ac_new_val" >&2;}
1838         ac_cache_corrupted=:
1839       fi;;
1840   esac
1841   # Pass precious variables to config.status.
1842   if test "$ac_new_set" = set; then
1843     case $ac_new_val in
1844     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1845     *) ac_arg=$ac_var=$ac_new_val ;;
1846     esac
1847     case " $ac_configure_args " in
1848       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1849       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1850     esac
1851   fi
1852 done
1853 if $ac_cache_corrupted; then
1854   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1855 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1856   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1857 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1858    { (exit 1); exit 1; }; }
1859 fi
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877 ac_ext=c
1878 ac_cpp='$CPP $CPPFLAGS'
1879 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1880 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1882
1883
1884 ac_config_headers="$ac_config_headers config.h"
1885
1886
1887 echo "current directory: `pwd`"
1888 echo "command line was: $0 $@"
1889
1890 ###############################################################################
1891 #
1892 #       Autoheader stuff
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
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060 # After checking to see that --srcdir is correct (which AC_INIT does)
2061 # check for some random other files that come later in the tar file,
2062 # to make sure everything is here.
2063 #
2064 for d in driver utils hacks hacks/glx ; do
2065   f=$srcdir/$d/Makefile.in
2066   if test \! -r $f ; then
2067     echo ""
2068     echo "ERROR: The package is incomplete: $f does not exist."
2069     echo "       This probably means that your download was truncated."
2070     echo ""
2071     exit 1
2072   fi
2073 done
2074
2075 ###############################################################################
2076 #
2077 #       Function to figure out how to run the compiler.
2078 #
2079 ###############################################################################
2080
2081
2082
2083
2084 ###############################################################################
2085 #
2086 #       Functions to figure out how to disable // comments in ANSI C code.
2087 #
2088 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2089 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2090 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2091 #       so much for compatibility!)
2092 #
2093 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2094 #       declarations preceed statements, without resorting to "-pedantic".
2095 #       This means that there is no way to get gcc3 to issue warnings that
2096 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2097 #       also drowning in totally useless warnings.  Thank you master may I
2098 #       have another.
2099 #
2100 #       So, I give up, let's just use -pedantic.
2101 #
2102 ###############################################################################
2103
2104
2105
2106
2107
2108
2109 ###############################################################################
2110 #
2111 #       Function to figure out how to turn off Objective C on MacOS X.
2112 #       (We have to do this to work around an Apple-specific gcc bug.)
2113 #
2114 ###############################################################################
2115
2116
2117
2118
2119
2120
2121 ###############################################################################
2122 #
2123 #       Function to figure out how to create directory trees.
2124 #
2125 ###############################################################################
2126
2127
2128
2129
2130 ###############################################################################
2131 #
2132 #       Function to check whether gettimeofday() exists, and how to call it.
2133 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2134 #
2135 ###############################################################################
2136
2137
2138
2139
2140 ###############################################################################
2141 #
2142 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2143 #
2144 ###############################################################################
2145
2146 # M4 sucks!!  perl sucks too!!
2147
2148 perl_version_cmd='print $]'
2149
2150
2151
2152
2153
2154 ###############################################################################
2155 #
2156 #       Function to demand "bc".  Losers.
2157 #
2158 ###############################################################################
2159
2160
2161
2162 ###############################################################################
2163 #
2164 #       Functions to check how to do ICMP PING requests.
2165 #
2166 ###############################################################################
2167
2168
2169
2170
2171
2172
2173 ###############################################################################
2174 #
2175 #       Functions to check for various X11 crap.
2176 #
2177 ###############################################################################
2178
2179 # Try and find the app-defaults directory.
2180 # It sucks that autoconf doesn't do this already...
2181 #
2182
2183
2184 ###############################################################################
2185 #
2186 #       Handle the --with-x-app-defaults option HERE
2187 #
2188 ###############################################################################
2189
2190
2191 # Check whether --with-x-app-defaults was given.
2192 if test "${with_x_app_defaults+set}" = set; then
2193   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2194 else
2195   eval ac_x_app_defaults="$withval"
2196 fi
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208 # Random special-cases for X on certain pathological OSes.
2209 # You know who you are.
2210 #
2211
2212
2213
2214
2215 ###############################################################################
2216 #
2217 #       Some utility functions to make checking for X things easier.
2218 #
2219 ###############################################################################
2220
2221 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2222 #
2223
2224
2225 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2226 #
2227
2228
2229 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2230 #
2231
2232
2233
2234 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2235 # Use this sparingly; it probably doesn't work very well on X programs.
2236 #
2237
2238
2239 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2240 # (But not the -L directories!)
2241 #
2242
2243
2244
2245
2246 # Usage: HANDLE_X_PATH_ARG([variable_name],
2247 #                          [--command-line-option],
2248 #                          [descriptive string])
2249 #
2250 # All of the --with options take three forms:
2251 #
2252 #   --with-foo (or --with-foo=yes)
2253 #   --without-foo (or --with-foo=no)
2254 #   --with-foo=/DIR
2255 #
2256 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2257 # a directory (string beginning with a slash) it checks to see whether
2258 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2259 # as appropriate.
2260 #
2261
2262
2263
2264
2265 ###############################################################################
2266 ###############################################################################
2267 #
2268 #       End of function definitions.  Now start actually executing stuff.
2269 #
2270 ###############################################################################
2271 ###############################################################################
2272
2273 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2274 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2275 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2276
2277
2278 # random compiler setup
2279 ac_aux_dir=
2280 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2281   if test -f "$ac_dir/install-sh"; then
2282     ac_aux_dir=$ac_dir
2283     ac_install_sh="$ac_aux_dir/install-sh -c"
2284     break
2285   elif test -f "$ac_dir/install.sh"; then
2286     ac_aux_dir=$ac_dir
2287     ac_install_sh="$ac_aux_dir/install.sh -c"
2288     break
2289   elif test -f "$ac_dir/shtool"; then
2290     ac_aux_dir=$ac_dir
2291     ac_install_sh="$ac_aux_dir/shtool install -c"
2292     break
2293   fi
2294 done
2295 if test -z "$ac_aux_dir"; then
2296   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2297 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2298    { (exit 1); exit 1; }; }
2299 fi
2300
2301 # These three variables are undocumented and unsupported,
2302 # and are intended to be withdrawn in a future Autoconf release.
2303 # They can cause serious problems if a builder's source tree is in a directory
2304 # whose full name contains unusual characters.
2305 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2306 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2307 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2308
2309
2310 # Make sure we can run config.sub.
2311 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2312   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2313 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2314    { (exit 1); exit 1; }; }
2315
2316 { echo "$as_me:$LINENO: checking build system type" >&5
2317 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
2318 if test "${ac_cv_build+set}" = set; then
2319   echo $ECHO_N "(cached) $ECHO_C" >&6
2320 else
2321   ac_build_alias=$build_alias
2322 test "x$ac_build_alias" = x &&
2323   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2324 test "x$ac_build_alias" = x &&
2325   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2326 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2327    { (exit 1); exit 1; }; }
2328 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2329   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2330 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2331    { (exit 1); exit 1; }; }
2332
2333 fi
2334 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2335 echo "${ECHO_T}$ac_cv_build" >&6; }
2336 case $ac_cv_build in
2337 *-*-*) ;;
2338 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2339 echo "$as_me: error: invalid value of canonical build" >&2;}
2340    { (exit 1); exit 1; }; };;
2341 esac
2342 build=$ac_cv_build
2343 ac_save_IFS=$IFS; IFS='-'
2344 set x $ac_cv_build
2345 shift
2346 build_cpu=$1
2347 build_vendor=$2
2348 shift; shift
2349 # Remember, the first character of IFS is used to create $*,
2350 # except with old shells:
2351 build_os=$*
2352 IFS=$ac_save_IFS
2353 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2354
2355
2356 { echo "$as_me:$LINENO: checking host system type" >&5
2357 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
2358 if test "${ac_cv_host+set}" = set; then
2359   echo $ECHO_N "(cached) $ECHO_C" >&6
2360 else
2361   if test "x$host_alias" = x; then
2362   ac_cv_host=$ac_cv_build
2363 else
2364   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2365     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2366 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2367    { (exit 1); exit 1; }; }
2368 fi
2369
2370 fi
2371 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2372 echo "${ECHO_T}$ac_cv_host" >&6; }
2373 case $ac_cv_host in
2374 *-*-*) ;;
2375 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2376 echo "$as_me: error: invalid value of canonical host" >&2;}
2377    { (exit 1); exit 1; }; };;
2378 esac
2379 host=$ac_cv_host
2380 ac_save_IFS=$IFS; IFS='-'
2381 set x $ac_cv_host
2382 shift
2383 host_cpu=$1
2384 host_vendor=$2
2385 shift; shift
2386 # Remember, the first character of IFS is used to create $*,
2387 # except with old shells:
2388 host_os=$*
2389 IFS=$ac_save_IFS
2390 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2391
2392
2393
2394 ac_ext=c
2395 ac_cpp='$CPP $CPPFLAGS'
2396 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2397 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2398 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2399 if test -n "$ac_tool_prefix"; then
2400   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2401 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2402 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2404 if test "${ac_cv_prog_CC+set}" = set; then
2405   echo $ECHO_N "(cached) $ECHO_C" >&6
2406 else
2407   if test -n "$CC"; then
2408   ac_cv_prog_CC="$CC" # Let the user override the test.
2409 else
2410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2411 for as_dir in $PATH
2412 do
2413   IFS=$as_save_IFS
2414   test -z "$as_dir" && as_dir=.
2415   for ac_exec_ext in '' $ac_executable_extensions; do
2416   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2417     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2418     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2419     break 2
2420   fi
2421 done
2422 done
2423 IFS=$as_save_IFS
2424
2425 fi
2426 fi
2427 CC=$ac_cv_prog_CC
2428 if test -n "$CC"; then
2429   { echo "$as_me:$LINENO: result: $CC" >&5
2430 echo "${ECHO_T}$CC" >&6; }
2431 else
2432   { echo "$as_me:$LINENO: result: no" >&5
2433 echo "${ECHO_T}no" >&6; }
2434 fi
2435
2436
2437 fi
2438 if test -z "$ac_cv_prog_CC"; then
2439   ac_ct_CC=$CC
2440   # Extract the first word of "gcc", so it can be a program name with args.
2441 set dummy gcc; ac_word=$2
2442 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2443 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2444 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2445   echo $ECHO_N "(cached) $ECHO_C" >&6
2446 else
2447   if test -n "$ac_ct_CC"; then
2448   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2449 else
2450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2451 for as_dir in $PATH
2452 do
2453   IFS=$as_save_IFS
2454   test -z "$as_dir" && as_dir=.
2455   for ac_exec_ext in '' $ac_executable_extensions; do
2456   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2457     ac_cv_prog_ac_ct_CC="gcc"
2458     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2459     break 2
2460   fi
2461 done
2462 done
2463 IFS=$as_save_IFS
2464
2465 fi
2466 fi
2467 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2468 if test -n "$ac_ct_CC"; then
2469   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2470 echo "${ECHO_T}$ac_ct_CC" >&6; }
2471 else
2472   { echo "$as_me:$LINENO: result: no" >&5
2473 echo "${ECHO_T}no" >&6; }
2474 fi
2475
2476   if test "x$ac_ct_CC" = x; then
2477     CC=""
2478   else
2479     case $cross_compiling:$ac_tool_warned in
2480 yes:)
2481 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2482 whose name does not start with the host triplet.  If you think this
2483 configuration is useful to you, please write to autoconf@gnu.org." >&5
2484 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2485 whose name does not start with the host triplet.  If you think this
2486 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2487 ac_tool_warned=yes ;;
2488 esac
2489     CC=$ac_ct_CC
2490   fi
2491 else
2492   CC="$ac_cv_prog_CC"
2493 fi
2494
2495 if test -z "$CC"; then
2496           if test -n "$ac_tool_prefix"; then
2497     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2498 set dummy ${ac_tool_prefix}cc; ac_word=$2
2499 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2501 if test "${ac_cv_prog_CC+set}" = set; then
2502   echo $ECHO_N "(cached) $ECHO_C" >&6
2503 else
2504   if test -n "$CC"; then
2505   ac_cv_prog_CC="$CC" # Let the user override the test.
2506 else
2507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2508 for as_dir in $PATH
2509 do
2510   IFS=$as_save_IFS
2511   test -z "$as_dir" && as_dir=.
2512   for ac_exec_ext in '' $ac_executable_extensions; do
2513   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2514     ac_cv_prog_CC="${ac_tool_prefix}cc"
2515     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2516     break 2
2517   fi
2518 done
2519 done
2520 IFS=$as_save_IFS
2521
2522 fi
2523 fi
2524 CC=$ac_cv_prog_CC
2525 if test -n "$CC"; then
2526   { echo "$as_me:$LINENO: result: $CC" >&5
2527 echo "${ECHO_T}$CC" >&6; }
2528 else
2529   { echo "$as_me:$LINENO: result: no" >&5
2530 echo "${ECHO_T}no" >&6; }
2531 fi
2532
2533
2534   fi
2535 fi
2536 if test -z "$CC"; then
2537   # Extract the first word of "cc", so it can be a program name with args.
2538 set dummy cc; ac_word=$2
2539 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2540 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2541 if test "${ac_cv_prog_CC+set}" = set; then
2542   echo $ECHO_N "(cached) $ECHO_C" >&6
2543 else
2544   if test -n "$CC"; then
2545   ac_cv_prog_CC="$CC" # Let the user override the test.
2546 else
2547   ac_prog_rejected=no
2548 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2549 for as_dir in $PATH
2550 do
2551   IFS=$as_save_IFS
2552   test -z "$as_dir" && as_dir=.
2553   for ac_exec_ext in '' $ac_executable_extensions; do
2554   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2555     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2556        ac_prog_rejected=yes
2557        continue
2558      fi
2559     ac_cv_prog_CC="cc"
2560     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2561     break 2
2562   fi
2563 done
2564 done
2565 IFS=$as_save_IFS
2566
2567 if test $ac_prog_rejected = yes; then
2568   # We found a bogon in the path, so make sure we never use it.
2569   set dummy $ac_cv_prog_CC
2570   shift
2571   if test $# != 0; then
2572     # We chose a different compiler from the bogus one.
2573     # However, it has the same basename, so the bogon will be chosen
2574     # first if we set CC to just the basename; use the full file name.
2575     shift
2576     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2577   fi
2578 fi
2579 fi
2580 fi
2581 CC=$ac_cv_prog_CC
2582 if test -n "$CC"; then
2583   { echo "$as_me:$LINENO: result: $CC" >&5
2584 echo "${ECHO_T}$CC" >&6; }
2585 else
2586   { echo "$as_me:$LINENO: result: no" >&5
2587 echo "${ECHO_T}no" >&6; }
2588 fi
2589
2590
2591 fi
2592 if test -z "$CC"; then
2593   if test -n "$ac_tool_prefix"; then
2594   for ac_prog in cl.exe
2595   do
2596     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2597 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2598 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2599 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2600 if test "${ac_cv_prog_CC+set}" = set; then
2601   echo $ECHO_N "(cached) $ECHO_C" >&6
2602 else
2603   if test -n "$CC"; then
2604   ac_cv_prog_CC="$CC" # Let the user override the test.
2605 else
2606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2607 for as_dir in $PATH
2608 do
2609   IFS=$as_save_IFS
2610   test -z "$as_dir" && as_dir=.
2611   for ac_exec_ext in '' $ac_executable_extensions; do
2612   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2613     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2614     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2615     break 2
2616   fi
2617 done
2618 done
2619 IFS=$as_save_IFS
2620
2621 fi
2622 fi
2623 CC=$ac_cv_prog_CC
2624 if test -n "$CC"; then
2625   { echo "$as_me:$LINENO: result: $CC" >&5
2626 echo "${ECHO_T}$CC" >&6; }
2627 else
2628   { echo "$as_me:$LINENO: result: no" >&5
2629 echo "${ECHO_T}no" >&6; }
2630 fi
2631
2632
2633     test -n "$CC" && break
2634   done
2635 fi
2636 if test -z "$CC"; then
2637   ac_ct_CC=$CC
2638   for ac_prog in cl.exe
2639 do
2640   # Extract the first word of "$ac_prog", so it can be a program name with args.
2641 set dummy $ac_prog; ac_word=$2
2642 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2644 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2645   echo $ECHO_N "(cached) $ECHO_C" >&6
2646 else
2647   if test -n "$ac_ct_CC"; then
2648   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2649 else
2650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2651 for as_dir in $PATH
2652 do
2653   IFS=$as_save_IFS
2654   test -z "$as_dir" && as_dir=.
2655   for ac_exec_ext in '' $ac_executable_extensions; do
2656   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2657     ac_cv_prog_ac_ct_CC="$ac_prog"
2658     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2659     break 2
2660   fi
2661 done
2662 done
2663 IFS=$as_save_IFS
2664
2665 fi
2666 fi
2667 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2668 if test -n "$ac_ct_CC"; then
2669   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2670 echo "${ECHO_T}$ac_ct_CC" >&6; }
2671 else
2672   { echo "$as_me:$LINENO: result: no" >&5
2673 echo "${ECHO_T}no" >&6; }
2674 fi
2675
2676
2677   test -n "$ac_ct_CC" && break
2678 done
2679
2680   if test "x$ac_ct_CC" = x; then
2681     CC=""
2682   else
2683     case $cross_compiling:$ac_tool_warned in
2684 yes:)
2685 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2686 whose name does not start with the host triplet.  If you think this
2687 configuration is useful to you, please write to autoconf@gnu.org." >&5
2688 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2689 whose name does not start with the host triplet.  If you think this
2690 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2691 ac_tool_warned=yes ;;
2692 esac
2693     CC=$ac_ct_CC
2694   fi
2695 fi
2696
2697 fi
2698
2699
2700 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2701 See \`config.log' for more details." >&5
2702 echo "$as_me: error: no acceptable C compiler found in \$PATH
2703 See \`config.log' for more details." >&2;}
2704    { (exit 1); exit 1; }; }
2705
2706 # Provide some information about the compiler.
2707 echo "$as_me:$LINENO: checking for C compiler version" >&5
2708 ac_compiler=`set X $ac_compile; echo $2`
2709 { (ac_try="$ac_compiler --version >&5"
2710 case "(($ac_try" in
2711   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2712   *) ac_try_echo=$ac_try;;
2713 esac
2714 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2715   (eval "$ac_compiler --version >&5") 2>&5
2716   ac_status=$?
2717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2718   (exit $ac_status); }
2719 { (ac_try="$ac_compiler -v >&5"
2720 case "(($ac_try" in
2721   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2722   *) ac_try_echo=$ac_try;;
2723 esac
2724 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2725   (eval "$ac_compiler -v >&5") 2>&5
2726   ac_status=$?
2727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2728   (exit $ac_status); }
2729 { (ac_try="$ac_compiler -V >&5"
2730 case "(($ac_try" in
2731   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2732   *) ac_try_echo=$ac_try;;
2733 esac
2734 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2735   (eval "$ac_compiler -V >&5") 2>&5
2736   ac_status=$?
2737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2738   (exit $ac_status); }
2739
2740 cat >conftest.$ac_ext <<_ACEOF
2741 /* confdefs.h.  */
2742 _ACEOF
2743 cat confdefs.h >>conftest.$ac_ext
2744 cat >>conftest.$ac_ext <<_ACEOF
2745 /* end confdefs.h.  */
2746
2747 int
2748 main ()
2749 {
2750
2751   ;
2752   return 0;
2753 }
2754 _ACEOF
2755 ac_clean_files_save=$ac_clean_files
2756 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2757 # Try to create an executable without -o first, disregard a.out.
2758 # It will help us diagnose broken compilers, and finding out an intuition
2759 # of exeext.
2760 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2761 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2762 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2763 #
2764 # List of possible output files, starting from the most likely.
2765 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2766 # only as a last resort.  b.out is created by i960 compilers.
2767 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2768 #
2769 # The IRIX 6 linker writes into existing files which may not be
2770 # executable, retaining their permissions.  Remove them first so a
2771 # subsequent execution test works.
2772 ac_rmfiles=
2773 for ac_file in $ac_files
2774 do
2775   case $ac_file in
2776     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2777     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2778   esac
2779 done
2780 rm -f $ac_rmfiles
2781
2782 if { (ac_try="$ac_link_default"
2783 case "(($ac_try" in
2784   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2785   *) ac_try_echo=$ac_try;;
2786 esac
2787 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2788   (eval "$ac_link_default") 2>&5
2789   ac_status=$?
2790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2791   (exit $ac_status); }; then
2792   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2793 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2794 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2795 # so that the user can short-circuit this test for compilers unknown to
2796 # Autoconf.
2797 for ac_file in $ac_files ''
2798 do
2799   test -f "$ac_file" || continue
2800   case $ac_file in
2801     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2802         ;;
2803     [ab].out )
2804         # We found the default executable, but exeext='' is most
2805         # certainly right.
2806         break;;
2807     *.* )
2808         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2809         then :; else
2810            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2811         fi
2812         # We set ac_cv_exeext here because the later test for it is not
2813         # safe: cross compilers may not add the suffix if given an `-o'
2814         # argument, so we may need to know it at that point already.
2815         # Even if this section looks crufty: it has the advantage of
2816         # actually working.
2817         break;;
2818     * )
2819         break;;
2820   esac
2821 done
2822 test "$ac_cv_exeext" = no && ac_cv_exeext=
2823
2824 else
2825   ac_file=''
2826 fi
2827
2828 { echo "$as_me:$LINENO: result: $ac_file" >&5
2829 echo "${ECHO_T}$ac_file" >&6; }
2830 if test -z "$ac_file"; then
2831   echo "$as_me: failed program was:" >&5
2832 sed 's/^/| /' conftest.$ac_ext >&5
2833
2834 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2835 See \`config.log' for more details." >&5
2836 echo "$as_me: error: C compiler cannot create executables
2837 See \`config.log' for more details." >&2;}
2838    { (exit 77); exit 77; }; }
2839 fi
2840
2841 ac_exeext=$ac_cv_exeext
2842
2843 # Check that the compiler produces executables we can run.  If not, either
2844 # the compiler is broken, or we cross compile.
2845 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2846 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2847 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2848 # If not cross compiling, check that we can run a simple program.
2849 if test "$cross_compiling" != yes; then
2850   if { ac_try='./$ac_file'
2851   { (case "(($ac_try" in
2852   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2853   *) ac_try_echo=$ac_try;;
2854 esac
2855 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2856   (eval "$ac_try") 2>&5
2857   ac_status=$?
2858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2859   (exit $ac_status); }; }; then
2860     cross_compiling=no
2861   else
2862     if test "$cross_compiling" = maybe; then
2863         cross_compiling=yes
2864     else
2865         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2866 If you meant to cross compile, use \`--host'.
2867 See \`config.log' for more details." >&5
2868 echo "$as_me: error: cannot run C compiled programs.
2869 If you meant to cross compile, use \`--host'.
2870 See \`config.log' for more details." >&2;}
2871    { (exit 1); exit 1; }; }
2872     fi
2873   fi
2874 fi
2875 { echo "$as_me:$LINENO: result: yes" >&5
2876 echo "${ECHO_T}yes" >&6; }
2877
2878 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2879 ac_clean_files=$ac_clean_files_save
2880 # Check that the compiler produces executables we can run.  If not, either
2881 # the compiler is broken, or we cross compile.
2882 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2883 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2884 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2885 echo "${ECHO_T}$cross_compiling" >&6; }
2886
2887 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2888 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2889 if { (ac_try="$ac_link"
2890 case "(($ac_try" in
2891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2892   *) ac_try_echo=$ac_try;;
2893 esac
2894 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2895   (eval "$ac_link") 2>&5
2896   ac_status=$?
2897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898   (exit $ac_status); }; then
2899   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2900 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2901 # work properly (i.e., refer to `conftest.exe'), while it won't with
2902 # `rm'.
2903 for ac_file in conftest.exe conftest conftest.*; do
2904   test -f "$ac_file" || continue
2905   case $ac_file in
2906     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2907     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2908           break;;
2909     * ) break;;
2910   esac
2911 done
2912 else
2913   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2914 See \`config.log' for more details." >&5
2915 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2916 See \`config.log' for more details." >&2;}
2917    { (exit 1); exit 1; }; }
2918 fi
2919
2920 rm -f conftest$ac_cv_exeext
2921 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2922 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2923
2924 rm -f conftest.$ac_ext
2925 EXEEXT=$ac_cv_exeext
2926 ac_exeext=$EXEEXT
2927 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2928 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2929 if test "${ac_cv_objext+set}" = set; then
2930   echo $ECHO_N "(cached) $ECHO_C" >&6
2931 else
2932   cat >conftest.$ac_ext <<_ACEOF
2933 /* confdefs.h.  */
2934 _ACEOF
2935 cat confdefs.h >>conftest.$ac_ext
2936 cat >>conftest.$ac_ext <<_ACEOF
2937 /* end confdefs.h.  */
2938
2939 int
2940 main ()
2941 {
2942
2943   ;
2944   return 0;
2945 }
2946 _ACEOF
2947 rm -f conftest.o conftest.obj
2948 if { (ac_try="$ac_compile"
2949 case "(($ac_try" in
2950   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2951   *) ac_try_echo=$ac_try;;
2952 esac
2953 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2954   (eval "$ac_compile") 2>&5
2955   ac_status=$?
2956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2957   (exit $ac_status); }; then
2958   for ac_file in conftest.o conftest.obj conftest.*; do
2959   test -f "$ac_file" || continue;
2960   case $ac_file in
2961     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2962     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2963        break;;
2964   esac
2965 done
2966 else
2967   echo "$as_me: failed program was:" >&5
2968 sed 's/^/| /' conftest.$ac_ext >&5
2969
2970 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2971 See \`config.log' for more details." >&5
2972 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2973 See \`config.log' for more details." >&2;}
2974    { (exit 1); exit 1; }; }
2975 fi
2976
2977 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2978 fi
2979 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2980 echo "${ECHO_T}$ac_cv_objext" >&6; }
2981 OBJEXT=$ac_cv_objext
2982 ac_objext=$OBJEXT
2983 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2984 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2985 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2986   echo $ECHO_N "(cached) $ECHO_C" >&6
2987 else
2988   cat >conftest.$ac_ext <<_ACEOF
2989 /* confdefs.h.  */
2990 _ACEOF
2991 cat confdefs.h >>conftest.$ac_ext
2992 cat >>conftest.$ac_ext <<_ACEOF
2993 /* end confdefs.h.  */
2994
2995 int
2996 main ()
2997 {
2998 #ifndef __GNUC__
2999        choke me
3000 #endif
3001
3002   ;
3003   return 0;
3004 }
3005 _ACEOF
3006 rm -f conftest.$ac_objext
3007 if { (ac_try="$ac_compile"
3008 case "(($ac_try" in
3009   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3010   *) ac_try_echo=$ac_try;;
3011 esac
3012 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3013   (eval "$ac_compile") 2>conftest.er1
3014   ac_status=$?
3015   grep -v '^ *+' conftest.er1 >conftest.err
3016   rm -f conftest.er1
3017   cat conftest.err >&5
3018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3019   (exit $ac_status); } && {
3020          test -z "$ac_c_werror_flag" ||
3021          test ! -s conftest.err
3022        } && test -s conftest.$ac_objext; then
3023   ac_compiler_gnu=yes
3024 else
3025   echo "$as_me: failed program was:" >&5
3026 sed 's/^/| /' conftest.$ac_ext >&5
3027
3028         ac_compiler_gnu=no
3029 fi
3030
3031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3032 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3033
3034 fi
3035 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3036 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3037 GCC=`test $ac_compiler_gnu = yes && echo yes`
3038 ac_test_CFLAGS=${CFLAGS+set}
3039 ac_save_CFLAGS=$CFLAGS
3040 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3041 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3042 if test "${ac_cv_prog_cc_g+set}" = set; then
3043   echo $ECHO_N "(cached) $ECHO_C" >&6
3044 else
3045   ac_save_c_werror_flag=$ac_c_werror_flag
3046    ac_c_werror_flag=yes
3047    ac_cv_prog_cc_g=no
3048    CFLAGS="-g"
3049    cat >conftest.$ac_ext <<_ACEOF
3050 /* confdefs.h.  */
3051 _ACEOF
3052 cat confdefs.h >>conftest.$ac_ext
3053 cat >>conftest.$ac_ext <<_ACEOF
3054 /* end confdefs.h.  */
3055
3056 int
3057 main ()
3058 {
3059
3060   ;
3061   return 0;
3062 }
3063 _ACEOF
3064 rm -f conftest.$ac_objext
3065 if { (ac_try="$ac_compile"
3066 case "(($ac_try" in
3067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3068   *) ac_try_echo=$ac_try;;
3069 esac
3070 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3071   (eval "$ac_compile") 2>conftest.er1
3072   ac_status=$?
3073   grep -v '^ *+' conftest.er1 >conftest.err
3074   rm -f conftest.er1
3075   cat conftest.err >&5
3076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3077   (exit $ac_status); } && {
3078          test -z "$ac_c_werror_flag" ||
3079          test ! -s conftest.err
3080        } && test -s conftest.$ac_objext; then
3081   ac_cv_prog_cc_g=yes
3082 else
3083   echo "$as_me: failed program was:" >&5
3084 sed 's/^/| /' conftest.$ac_ext >&5
3085
3086         CFLAGS=""
3087       cat >conftest.$ac_ext <<_ACEOF
3088 /* confdefs.h.  */
3089 _ACEOF
3090 cat confdefs.h >>conftest.$ac_ext
3091 cat >>conftest.$ac_ext <<_ACEOF
3092 /* end confdefs.h.  */
3093
3094 int
3095 main ()
3096 {
3097
3098   ;
3099   return 0;
3100 }
3101 _ACEOF
3102 rm -f conftest.$ac_objext
3103 if { (ac_try="$ac_compile"
3104 case "(($ac_try" in
3105   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3106   *) ac_try_echo=$ac_try;;
3107 esac
3108 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3109   (eval "$ac_compile") 2>conftest.er1
3110   ac_status=$?
3111   grep -v '^ *+' conftest.er1 >conftest.err
3112   rm -f conftest.er1
3113   cat conftest.err >&5
3114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3115   (exit $ac_status); } && {
3116          test -z "$ac_c_werror_flag" ||
3117          test ! -s conftest.err
3118        } && test -s conftest.$ac_objext; then
3119   :
3120 else
3121   echo "$as_me: failed program was:" >&5
3122 sed 's/^/| /' conftest.$ac_ext >&5
3123
3124         ac_c_werror_flag=$ac_save_c_werror_flag
3125          CFLAGS="-g"
3126          cat >conftest.$ac_ext <<_ACEOF
3127 /* confdefs.h.  */
3128 _ACEOF
3129 cat confdefs.h >>conftest.$ac_ext
3130 cat >>conftest.$ac_ext <<_ACEOF
3131 /* end confdefs.h.  */
3132
3133 int
3134 main ()
3135 {
3136
3137   ;
3138   return 0;
3139 }
3140 _ACEOF
3141 rm -f conftest.$ac_objext
3142 if { (ac_try="$ac_compile"
3143 case "(($ac_try" in
3144   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3145   *) ac_try_echo=$ac_try;;
3146 esac
3147 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3148   (eval "$ac_compile") 2>conftest.er1
3149   ac_status=$?
3150   grep -v '^ *+' conftest.er1 >conftest.err
3151   rm -f conftest.er1
3152   cat conftest.err >&5
3153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3154   (exit $ac_status); } && {
3155          test -z "$ac_c_werror_flag" ||
3156          test ! -s conftest.err
3157        } && test -s conftest.$ac_objext; then
3158   ac_cv_prog_cc_g=yes
3159 else
3160   echo "$as_me: failed program was:" >&5
3161 sed 's/^/| /' conftest.$ac_ext >&5
3162
3163
3164 fi
3165
3166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3167 fi
3168
3169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3170 fi
3171
3172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3173    ac_c_werror_flag=$ac_save_c_werror_flag
3174 fi
3175 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3176 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3177 if test "$ac_test_CFLAGS" = set; then
3178   CFLAGS=$ac_save_CFLAGS
3179 elif test $ac_cv_prog_cc_g = yes; then
3180   if test "$GCC" = yes; then
3181     CFLAGS="-g -O2"
3182   else
3183     CFLAGS="-g"
3184   fi
3185 else
3186   if test "$GCC" = yes; then
3187     CFLAGS="-O2"
3188   else
3189     CFLAGS=
3190   fi
3191 fi
3192 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3193 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3194 if test "${ac_cv_prog_cc_c89+set}" = set; then
3195   echo $ECHO_N "(cached) $ECHO_C" >&6
3196 else
3197   ac_cv_prog_cc_c89=no
3198 ac_save_CC=$CC
3199 cat >conftest.$ac_ext <<_ACEOF
3200 /* confdefs.h.  */
3201 _ACEOF
3202 cat confdefs.h >>conftest.$ac_ext
3203 cat >>conftest.$ac_ext <<_ACEOF
3204 /* end confdefs.h.  */
3205 #include <stdarg.h>
3206 #include <stdio.h>
3207 #include <sys/types.h>
3208 #include <sys/stat.h>
3209 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3210 struct buf { int x; };
3211 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3212 static char *e (p, i)
3213      char **p;
3214      int i;
3215 {
3216   return p[i];
3217 }
3218 static char *f (char * (*g) (char **, int), char **p, ...)
3219 {
3220   char *s;
3221   va_list v;
3222   va_start (v,p);
3223   s = g (p, va_arg (v,int));
3224   va_end (v);
3225   return s;
3226 }
3227
3228 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3229    function prototypes and stuff, but not '\xHH' hex character constants.
3230    These don't provoke an error unfortunately, instead are silently treated
3231    as 'x'.  The following induces an error, until -std is added to get
3232    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3233    array size at least.  It's necessary to write '\x00'==0 to get something
3234    that's true only with -std.  */
3235 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3236
3237 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3238    inside strings and character constants.  */
3239 #define FOO(x) 'x'
3240 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3241
3242 int test (int i, double x);
3243 struct s1 {int (*f) (int a);};
3244 struct s2 {int (*f) (double a);};
3245 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3246 int argc;
3247 char **argv;
3248 int
3249 main ()
3250 {
3251 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3252   ;
3253   return 0;
3254 }
3255 _ACEOF
3256 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3257         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3258 do
3259   CC="$ac_save_CC $ac_arg"
3260   rm -f conftest.$ac_objext
3261 if { (ac_try="$ac_compile"
3262 case "(($ac_try" in
3263   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3264   *) ac_try_echo=$ac_try;;
3265 esac
3266 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3267   (eval "$ac_compile") 2>conftest.er1
3268   ac_status=$?
3269   grep -v '^ *+' conftest.er1 >conftest.err
3270   rm -f conftest.er1
3271   cat conftest.err >&5
3272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3273   (exit $ac_status); } && {
3274          test -z "$ac_c_werror_flag" ||
3275          test ! -s conftest.err
3276        } && test -s conftest.$ac_objext; then
3277   ac_cv_prog_cc_c89=$ac_arg
3278 else
3279   echo "$as_me: failed program was:" >&5
3280 sed 's/^/| /' conftest.$ac_ext >&5
3281
3282
3283 fi
3284
3285 rm -f core conftest.err conftest.$ac_objext
3286   test "x$ac_cv_prog_cc_c89" != "xno" && break
3287 done
3288 rm -f conftest.$ac_ext
3289 CC=$ac_save_CC
3290
3291 fi
3292 # AC_CACHE_VAL
3293 case "x$ac_cv_prog_cc_c89" in
3294   x)
3295     { echo "$as_me:$LINENO: result: none needed" >&5
3296 echo "${ECHO_T}none needed" >&6; } ;;
3297   xno)
3298     { echo "$as_me:$LINENO: result: unsupported" >&5
3299 echo "${ECHO_T}unsupported" >&6; } ;;
3300   *)
3301     CC="$CC $ac_cv_prog_cc_c89"
3302     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3303 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3304 esac
3305
3306
3307 ac_ext=c
3308 ac_cpp='$CPP $CPPFLAGS'
3309 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3310 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3311 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3312
3313
3314   if test -z "$GCC"; then
3315     # not using GCC
3316     { echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3317 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6; }
3318     case "$host" in
3319       *-hpux* )
3320         { echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3321 echo "${ECHO_T}HPUX: adding -Ae" >&6; }
3322         CC="$CC -Ae"
3323       ;;
3324       *-aix* )
3325         { echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3326 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3327         CC="$CC -qlanglvl=ansi -qhalt=e"
3328       ;;
3329       *-dec-* )
3330         { echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3331 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6; }
3332         CC="$CC -std1"
3333       ;;
3334       *)
3335         { echo "$as_me:$LINENO: result: no idea" >&5
3336 echo "${ECHO_T}no idea" >&6; }
3337       ;;
3338     esac
3339   else
3340     # using GCC
3341     case "$host" in
3342       *-solaris*)
3343         { echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3344 echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6; }
3345         CC="$CC -D__EXTENSIONS__"
3346       ;;
3347     esac
3348   fi
3349
3350   OBJCC="$CC"
3351
3352   { echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3353 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6; }
3354   if test "$cross_compiling" = yes; then
3355   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3356 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3357    { (exit 1); exit 1; }; }
3358 else
3359   cat >conftest.$ac_ext <<_ACEOF
3360 /* confdefs.h.  */
3361 _ACEOF
3362 cat confdefs.h >>conftest.$ac_ext
3363 cat >>conftest.$ac_ext <<_ACEOF
3364 /* end confdefs.h.  */
3365  main(int ac, char **av) { return 0; }
3366 _ACEOF
3367 rm -f conftest$ac_exeext
3368 if { (ac_try="$ac_link"
3369 case "(($ac_try" in
3370   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3371   *) ac_try_echo=$ac_try;;
3372 esac
3373 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3374   (eval "$ac_link") 2>&5
3375   ac_status=$?
3376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3377   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3378   { (case "(($ac_try" in
3379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3380   *) ac_try_echo=$ac_try;;
3381 esac
3382 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3383   (eval "$ac_try") 2>&5
3384   ac_status=$?
3385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3386   (exit $ac_status); }; }; then
3387   { echo "$as_me:$LINENO: result: yes" >&5
3388 echo "${ECHO_T}yes" >&6; }
3389 else
3390   echo "$as_me: program exited with status $ac_status" >&5
3391 echo "$as_me: failed program was:" >&5
3392 sed 's/^/| /' conftest.$ac_ext >&5
3393
3394 ( exit $ac_status )
3395 { echo "$as_me:$LINENO: result: no" >&5
3396 echo "${ECHO_T}no" >&6; }
3397      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3398 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3399    { (exit 1); exit 1; }; }
3400 fi
3401 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3402 fi
3403
3404
3405
3406   if test -n "$GCC"; then
3407     { echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3408 echo "${ECHO_T}Turning on gcc compiler warnings." >&6; }
3409     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3410     OBJCC="$OBJCC -Wall"
3411     # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
3412     # and then perhaps we can do without -pedantic?
3413   else
3414     case "$host" in
3415       *-irix5* |*-irix6.0-3* )
3416         { echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3417 echo "${ECHO_T}Turning on SGI compiler warnings." >&6; }
3418         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3419       ;;
3420 #     *-dec-osf* )
3421 #       if test -z "$GCC"; then
3422 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3423 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3424 #       fi
3425 #     ;;
3426     esac
3427   fi
3428
3429 if test -n "$GCC"; then
3430    if test -n "$GCC"; then
3431    { echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
3432 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6; }
3433 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3434   echo $ECHO_N "(cached) $ECHO_C" >&6
3435 else
3436   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
3437           grep unrecognized >/dev/null ); then
3438        ac_cv_gcc_accepts_std=no
3439      else
3440        ac_cv_gcc_accepts_std=yes
3441      fi
3442 fi
3443 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3444 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6; }
3445    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3446   fi
3447
3448    { echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3449 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6; }
3450    #
3451    # The reason that // comments are banned from xscreensaver is that gcc is
3452    # basically the only compiler in the world that supports them in C code.
3453    # All other vendors support them only in their C++ compilers, not in their
3454    # ANSI C compilers.  This means that it's a portability problem: every time
3455    # these comments have snuck into the xscreensaver source code, I've gotten
3456    # complaints about it the next day.  So we turn off support for them in gcc
3457    # as well to prevent them from accidentially slipping in.
3458    #
3459    if test "$ac_gcc_accepts_std" = yes ; then
3460      #
3461      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3462      # (That appears to be the only additional preprocessor symbol
3463      # it defines, in addition to the syntax changes it makes.)
3464      #
3465      # -std=gnu89 is no good, because // comments were a GNU extension
3466      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3467      # with -std=gnu89 but not with -std=c89.)
3468      #
3469      CC="$CC -std=c89 -U__STRICT_ANSI__"
3470    else
3471      # The old way:
3472      CC="$CC -Wp,-lang-c89"
3473    fi
3474   fi
3475
3476 if test -n "$GCC"; then
3477    if test -n "$GCC"; then
3478    { echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3479 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6; }
3480 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3481   echo $ECHO_N "(cached) $ECHO_C" >&6
3482 else
3483   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
3484           grep unrecognized >/dev/null ); then
3485        ac_cv_gcc_accepts_no_cpp_precomp=no
3486      else
3487        ac_cv_gcc_accepts_no_cpp_precomp=yes
3488      fi
3489 fi
3490 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3491 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3492    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3493   fi
3494
3495    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
3496      { echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
3497 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6; }
3498      CC="$CC -no-cpp-precomp"
3499    fi
3500   fi
3501
3502 ac_ext=c
3503 ac_cpp='$CPP $CPPFLAGS'
3504 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3505 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3506 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3507 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3508 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3509 # On Suns, sometimes $CPP names a directory.
3510 if test -n "$CPP" && test -d "$CPP"; then
3511   CPP=
3512 fi
3513 if test -z "$CPP"; then
3514   if test "${ac_cv_prog_CPP+set}" = set; then
3515   echo $ECHO_N "(cached) $ECHO_C" >&6
3516 else
3517       # Double quotes because CPP needs to be expanded
3518     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3519     do
3520       ac_preproc_ok=false
3521 for ac_c_preproc_warn_flag in '' yes
3522 do
3523   # Use a header file that comes with gcc, so configuring glibc
3524   # with a fresh cross-compiler works.
3525   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3526   # <limits.h> exists even on freestanding compilers.
3527   # On the NeXT, cc -E runs the code through the compiler's parser,
3528   # not just through cpp. "Syntax error" is here to catch this case.
3529   cat >conftest.$ac_ext <<_ACEOF
3530 /* confdefs.h.  */
3531 _ACEOF
3532 cat confdefs.h >>conftest.$ac_ext
3533 cat >>conftest.$ac_ext <<_ACEOF
3534 /* end confdefs.h.  */
3535 #ifdef __STDC__
3536 # include <limits.h>
3537 #else
3538 # include <assert.h>
3539 #endif
3540                      Syntax error
3541 _ACEOF
3542 if { (ac_try="$ac_cpp conftest.$ac_ext"
3543 case "(($ac_try" in
3544   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3545   *) ac_try_echo=$ac_try;;
3546 esac
3547 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3548   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3549   ac_status=$?
3550   grep -v '^ *+' conftest.er1 >conftest.err
3551   rm -f conftest.er1
3552   cat conftest.err >&5
3553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3554   (exit $ac_status); } >/dev/null && {
3555          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3556          test ! -s conftest.err
3557        }; then
3558   :
3559 else
3560   echo "$as_me: failed program was:" >&5
3561 sed 's/^/| /' conftest.$ac_ext >&5
3562
3563   # Broken: fails on valid input.
3564 continue
3565 fi
3566
3567 rm -f conftest.err conftest.$ac_ext
3568
3569   # OK, works on sane cases.  Now check whether nonexistent headers
3570   # can be detected and how.
3571   cat >conftest.$ac_ext <<_ACEOF
3572 /* confdefs.h.  */
3573 _ACEOF
3574 cat confdefs.h >>conftest.$ac_ext
3575 cat >>conftest.$ac_ext <<_ACEOF
3576 /* end confdefs.h.  */
3577 #include <ac_nonexistent.h>
3578 _ACEOF
3579 if { (ac_try="$ac_cpp conftest.$ac_ext"
3580 case "(($ac_try" in
3581   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3582   *) ac_try_echo=$ac_try;;
3583 esac
3584 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3585   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3586   ac_status=$?
3587   grep -v '^ *+' conftest.er1 >conftest.err
3588   rm -f conftest.er1
3589   cat conftest.err >&5
3590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3591   (exit $ac_status); } >/dev/null && {
3592          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3593          test ! -s conftest.err
3594        }; then
3595   # Broken: success on invalid input.
3596 continue
3597 else
3598   echo "$as_me: failed program was:" >&5
3599 sed 's/^/| /' conftest.$ac_ext >&5
3600
3601   # Passes both tests.
3602 ac_preproc_ok=:
3603 break
3604 fi
3605
3606 rm -f conftest.err conftest.$ac_ext
3607
3608 done
3609 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3610 rm -f conftest.err conftest.$ac_ext
3611 if $ac_preproc_ok; then
3612   break
3613 fi
3614
3615     done
3616     ac_cv_prog_CPP=$CPP
3617
3618 fi
3619   CPP=$ac_cv_prog_CPP
3620 else
3621   ac_cv_prog_CPP=$CPP
3622 fi
3623 { echo "$as_me:$LINENO: result: $CPP" >&5
3624 echo "${ECHO_T}$CPP" >&6; }
3625 ac_preproc_ok=false
3626 for ac_c_preproc_warn_flag in '' yes
3627 do
3628   # Use a header file that comes with gcc, so configuring glibc
3629   # with a fresh cross-compiler works.
3630   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3631   # <limits.h> exists even on freestanding compilers.
3632   # On the NeXT, cc -E runs the code through the compiler's parser,
3633   # not just through cpp. "Syntax error" is here to catch this case.
3634   cat >conftest.$ac_ext <<_ACEOF
3635 /* confdefs.h.  */
3636 _ACEOF
3637 cat confdefs.h >>conftest.$ac_ext
3638 cat >>conftest.$ac_ext <<_ACEOF
3639 /* end confdefs.h.  */
3640 #ifdef __STDC__
3641 # include <limits.h>
3642 #else
3643 # include <assert.h>
3644 #endif
3645                      Syntax error
3646 _ACEOF
3647 if { (ac_try="$ac_cpp conftest.$ac_ext"
3648 case "(($ac_try" in
3649   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3650   *) ac_try_echo=$ac_try;;
3651 esac
3652 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3653   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3654   ac_status=$?
3655   grep -v '^ *+' conftest.er1 >conftest.err
3656   rm -f conftest.er1
3657   cat conftest.err >&5
3658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3659   (exit $ac_status); } >/dev/null && {
3660          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3661          test ! -s conftest.err
3662        }; then
3663   :
3664 else
3665   echo "$as_me: failed program was:" >&5
3666 sed 's/^/| /' conftest.$ac_ext >&5
3667
3668   # Broken: fails on valid input.
3669 continue
3670 fi
3671
3672 rm -f conftest.err conftest.$ac_ext
3673
3674   # OK, works on sane cases.  Now check whether nonexistent headers
3675   # can be detected and how.
3676   cat >conftest.$ac_ext <<_ACEOF
3677 /* confdefs.h.  */
3678 _ACEOF
3679 cat confdefs.h >>conftest.$ac_ext
3680 cat >>conftest.$ac_ext <<_ACEOF
3681 /* end confdefs.h.  */
3682 #include <ac_nonexistent.h>
3683 _ACEOF
3684 if { (ac_try="$ac_cpp conftest.$ac_ext"
3685 case "(($ac_try" in
3686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3687   *) ac_try_echo=$ac_try;;
3688 esac
3689 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3690   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3691   ac_status=$?
3692   grep -v '^ *+' conftest.er1 >conftest.err
3693   rm -f conftest.er1
3694   cat conftest.err >&5
3695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3696   (exit $ac_status); } >/dev/null && {
3697          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3698          test ! -s conftest.err
3699        }; then
3700   # Broken: success on invalid input.
3701 continue
3702 else
3703   echo "$as_me: failed program was:" >&5
3704 sed 's/^/| /' conftest.$ac_ext >&5
3705
3706   # Passes both tests.
3707 ac_preproc_ok=:
3708 break
3709 fi
3710
3711 rm -f conftest.err conftest.$ac_ext
3712
3713 done
3714 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3715 rm -f conftest.err conftest.$ac_ext
3716 if $ac_preproc_ok; then
3717   :
3718 else
3719   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3720 See \`config.log' for more details." >&5
3721 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3722 See \`config.log' for more details." >&2;}
3723    { (exit 1); exit 1; }; }
3724 fi
3725
3726 ac_ext=c
3727 ac_cpp='$CPP $CPPFLAGS'
3728 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3729 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3730 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3731
3732 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3733 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
3734 if test "${ac_cv_c_const+set}" = set; then
3735   echo $ECHO_N "(cached) $ECHO_C" >&6
3736 else
3737   cat >conftest.$ac_ext <<_ACEOF
3738 /* confdefs.h.  */
3739 _ACEOF
3740 cat confdefs.h >>conftest.$ac_ext
3741 cat >>conftest.$ac_ext <<_ACEOF
3742 /* end confdefs.h.  */
3743
3744 int
3745 main ()
3746 {
3747 /* FIXME: Include the comments suggested by Paul. */
3748 #ifndef __cplusplus
3749   /* Ultrix mips cc rejects this.  */
3750   typedef int charset[2];
3751   const charset cs;
3752   /* SunOS 4.1.1 cc rejects this.  */
3753   char const *const *pcpcc;
3754   char **ppc;
3755   /* NEC SVR4.0.2 mips cc rejects this.  */
3756   struct point {int x, y;};
3757   static struct point const zero = {0,0};
3758   /* AIX XL C 1.02.0.0 rejects this.
3759      It does not let you subtract one const X* pointer from another in
3760      an arm of an if-expression whose if-part is not a constant
3761      expression */
3762   const char *g = "string";
3763   pcpcc = &g + (g ? g-g : 0);
3764   /* HPUX 7.0 cc rejects these. */
3765   ++pcpcc;
3766   ppc = (char**) pcpcc;
3767   pcpcc = (char const *const *) ppc;
3768   { /* SCO 3.2v4 cc rejects this.  */
3769     char *t;
3770     char const *s = 0 ? (char *) 0 : (char const *) 0;
3771
3772     *t++ = 0;
3773     if (s) return 0;
3774   }
3775   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3776     int x[] = {25, 17};
3777     const int *foo = &x[0];
3778     ++foo;
3779   }
3780   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3781     typedef const int *iptr;
3782     iptr p = 0;
3783     ++p;
3784   }
3785   { /* AIX XL C 1.02.0.0 rejects this saying
3786        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3787     struct s { int j; const int *ap[3]; };
3788     struct s *b; b->j = 5;
3789   }
3790   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3791     const int foo = 10;
3792     if (!foo) return 0;
3793   }
3794   return !cs[0] && !zero.x;
3795 #endif
3796
3797   ;
3798   return 0;
3799 }
3800 _ACEOF
3801 rm -f conftest.$ac_objext
3802 if { (ac_try="$ac_compile"
3803 case "(($ac_try" in
3804   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3805   *) ac_try_echo=$ac_try;;
3806 esac
3807 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3808   (eval "$ac_compile") 2>conftest.er1
3809   ac_status=$?
3810   grep -v '^ *+' conftest.er1 >conftest.err
3811   rm -f conftest.er1
3812   cat conftest.err >&5
3813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3814   (exit $ac_status); } && {
3815          test -z "$ac_c_werror_flag" ||
3816          test ! -s conftest.err
3817        } && test -s conftest.$ac_objext; then
3818   ac_cv_c_const=yes
3819 else
3820   echo "$as_me: failed program was:" >&5
3821 sed 's/^/| /' conftest.$ac_ext >&5
3822
3823         ac_cv_c_const=no
3824 fi
3825
3826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3827 fi
3828 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3829 echo "${ECHO_T}$ac_cv_c_const" >&6; }
3830 if test $ac_cv_c_const = no; then
3831
3832 cat >>confdefs.h <<\_ACEOF
3833 #define const
3834 _ACEOF
3835
3836 fi
3837
3838 { echo "$as_me:$LINENO: checking for inline" >&5
3839 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
3840 if test "${ac_cv_c_inline+set}" = set; then
3841   echo $ECHO_N "(cached) $ECHO_C" >&6
3842 else
3843   ac_cv_c_inline=no
3844 for ac_kw in inline __inline__ __inline; do
3845   cat >conftest.$ac_ext <<_ACEOF
3846 /* confdefs.h.  */
3847 _ACEOF
3848 cat confdefs.h >>conftest.$ac_ext
3849 cat >>conftest.$ac_ext <<_ACEOF
3850 /* end confdefs.h.  */
3851 #ifndef __cplusplus
3852 typedef int foo_t;
3853 static $ac_kw foo_t static_foo () {return 0; }
3854 $ac_kw foo_t foo () {return 0; }
3855 #endif
3856
3857 _ACEOF
3858 rm -f conftest.$ac_objext
3859 if { (ac_try="$ac_compile"
3860 case "(($ac_try" in
3861   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3862   *) ac_try_echo=$ac_try;;
3863 esac
3864 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3865   (eval "$ac_compile") 2>conftest.er1
3866   ac_status=$?
3867   grep -v '^ *+' conftest.er1 >conftest.err
3868   rm -f conftest.er1
3869   cat conftest.err >&5
3870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3871   (exit $ac_status); } && {
3872          test -z "$ac_c_werror_flag" ||
3873          test ! -s conftest.err
3874        } && test -s conftest.$ac_objext; then
3875   ac_cv_c_inline=$ac_kw
3876 else
3877   echo "$as_me: failed program was:" >&5
3878 sed 's/^/| /' conftest.$ac_ext >&5
3879
3880
3881 fi
3882
3883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3884   test "$ac_cv_c_inline" != no && break
3885 done
3886
3887 fi
3888 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3889 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
3890
3891
3892 case $ac_cv_c_inline in
3893   inline | yes) ;;
3894   *)
3895     case $ac_cv_c_inline in
3896       no) ac_val=;;
3897       *) ac_val=$ac_cv_c_inline;;
3898     esac
3899     cat >>confdefs.h <<_ACEOF
3900 #ifndef __cplusplus
3901 #define inline $ac_val
3902 #endif
3903 _ACEOF
3904     ;;
3905 esac
3906
3907
3908 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3909   { echo "$as_me:$LINENO: checking for bc" >&5
3910 echo $ECHO_N "checking for bc... $ECHO_C" >&6; }
3911   if test "$ac_bc_result" = "15" ; then
3912     { echo "$as_me:$LINENO: result: yes" >&5
3913 echo "${ECHO_T}yes" >&6; }
3914   else
3915     { echo "$as_me:$LINENO: result: no" >&5
3916 echo "${ECHO_T}no" >&6; }
3917     echo ''
3918     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3919                   part of Unix since the 1970s.  Come back when your vendor
3920                   has grown a clue." >&5
3921 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3922                   part of Unix since the 1970s.  Come back when your vendor
3923                   has grown a clue." >&2;}
3924    { (exit 1); exit 1; }; }
3925   fi
3926
3927
3928 # stuff for Makefiles
3929 # Find a good install program.  We prefer a C program (faster),
3930 # so one script is as good as another.  But avoid the broken or
3931 # incompatible versions:
3932 # SysV /etc/install, /usr/sbin/install
3933 # SunOS /usr/etc/install
3934 # IRIX /sbin/install
3935 # AIX /bin/install
3936 # AmigaOS /C/install, which installs bootblocks on floppy discs
3937 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3938 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3939 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3940 # OS/2's system install, which has a completely different semantic
3941 # ./install, which can be erroneously created by make from ./install.sh.
3942 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3943 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3944 if test -z "$INSTALL"; then
3945 if test "${ac_cv_path_install+set}" = set; then
3946   echo $ECHO_N "(cached) $ECHO_C" >&6
3947 else
3948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3949 for as_dir in $PATH
3950 do
3951   IFS=$as_save_IFS
3952   test -z "$as_dir" && as_dir=.
3953   # Account for people who put trailing slashes in PATH elements.
3954 case $as_dir/ in
3955   ./ | .// | /cC/* | \
3956   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3957   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3958   /usr/ucb/* ) ;;
3959   *)
3960     # OSF1 and SCO ODT 3.0 have their own names for install.
3961     # Don't use installbsd from OSF since it installs stuff as root
3962     # by default.
3963     for ac_prog in ginstall scoinst install; do
3964       for ac_exec_ext in '' $ac_executable_extensions; do
3965         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3966           if test $ac_prog = install &&
3967             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3968             # AIX install.  It has an incompatible calling convention.
3969             :
3970           elif test $ac_prog = install &&
3971             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3972             # program-specific install script used by HP pwplus--don't use.
3973             :
3974           else
3975             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3976             break 3
3977           fi
3978         fi
3979       done
3980     done
3981     ;;
3982 esac
3983 done
3984 IFS=$as_save_IFS
3985
3986
3987 fi
3988   if test "${ac_cv_path_install+set}" = set; then
3989     INSTALL=$ac_cv_path_install
3990   else
3991     # As a last resort, use the slow shell script.  Don't cache a
3992     # value for INSTALL within a source directory, because that will
3993     # break other packages using the cache if that directory is
3994     # removed, or if the value is a relative name.
3995     INSTALL=$ac_install_sh
3996   fi
3997 fi
3998 { echo "$as_me:$LINENO: result: $INSTALL" >&5
3999 echo "${ECHO_T}$INSTALL" >&6; }
4000
4001 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4002 # It thinks the first close brace ends the variable substitution.
4003 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4004
4005 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4006
4007 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4008
4009 { echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4010 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6; }
4011 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4012   echo $ECHO_N "(cached) $ECHO_C" >&6
4013 else
4014   ac_cv_install_d_creates_dirs=no
4015      rm -rf conftestdir
4016      if mkdir conftestdir; then
4017        cd conftestdir 2>/dev/null
4018        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4019        if test -d dir1/dir2/. ; then
4020          ac_cv_install_d_creates_dirs=yes
4021        fi
4022        cd .. 2>/dev/null
4023        rm -rf conftestdir
4024      fi
4025
4026 fi
4027 { echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4028 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6; }
4029
4030   if test "$ac_cv_install_d_creates_dirs" = no ; then
4031     { echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4032 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6; }
4033 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4034   echo $ECHO_N "(cached) $ECHO_C" >&6
4035 else
4036   ac_cv_mkdir_p_creates_dirs=no
4037        rm -rf conftestdir
4038        if mkdir conftestdir; then
4039          cd conftestdir 2>/dev/null
4040          mkdir -p dir1/dir2 >/dev/null 2>&1
4041          if test -d dir1/dir2/. ; then
4042            ac_cv_mkdir_p_creates_dirs=yes
4043          fi
4044          cd .. 2>/dev/null
4045          rm -rf conftestdir
4046        fi
4047
4048 fi
4049 { echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4050 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6; }
4051   fi
4052
4053   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4054     INSTALL_DIRS='${INSTALL} -d'
4055   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4056     INSTALL_DIRS='mkdir -p'
4057   else
4058     # any other ideas?
4059     INSTALL_DIRS='${INSTALL} -d'
4060   fi
4061
4062 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4063 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
4064 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4065 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4066   echo $ECHO_N "(cached) $ECHO_C" >&6
4067 else
4068   cat >conftest.make <<\_ACEOF
4069 SHELL = /bin/sh
4070 all:
4071         @echo '@@@%%%=$(MAKE)=@@@%%%'
4072 _ACEOF
4073 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4074 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4075   *@@@%%%=?*=@@@%%%*)
4076     eval ac_cv_prog_make_${ac_make}_set=yes;;
4077   *)
4078     eval ac_cv_prog_make_${ac_make}_set=no;;
4079 esac
4080 rm -f conftest.make
4081 fi
4082 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4083   { echo "$as_me:$LINENO: result: yes" >&5
4084 echo "${ECHO_T}yes" >&6; }
4085   SET_MAKE=
4086 else
4087   { echo "$as_me:$LINENO: result: no" >&5
4088 echo "${ECHO_T}no" >&6; }
4089   SET_MAKE="MAKE=${MAKE-make}"
4090 fi
4091
4092
4093 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4094 # That's wrong: it should be set to '${INSTALL}', so that one can
4095 # implement the "install-strip" target properly (strip executables,
4096 # but do not try to strip scripts.)
4097 #
4098 INSTALL_SCRIPT='${INSTALL}'
4099
4100 # random libc stuff
4101
4102 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4103 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4104 if test "${ac_cv_path_GREP+set}" = set; then
4105   echo $ECHO_N "(cached) $ECHO_C" >&6
4106 else
4107   # Extract the first word of "grep ggrep" to use in msg output
4108 if test -z "$GREP"; then
4109 set dummy grep ggrep; ac_prog_name=$2
4110 if test "${ac_cv_path_GREP+set}" = set; then
4111   echo $ECHO_N "(cached) $ECHO_C" >&6
4112 else
4113   ac_path_GREP_found=false
4114 # Loop through the user's path and test for each of PROGNAME-LIST
4115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4116 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4117 do
4118   IFS=$as_save_IFS
4119   test -z "$as_dir" && as_dir=.
4120   for ac_prog in grep ggrep; do
4121   for ac_exec_ext in '' $ac_executable_extensions; do
4122     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4123     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4124     # Check for GNU ac_path_GREP and select it if it is found.
4125   # Check for GNU $ac_path_GREP
4126 case `"$ac_path_GREP" --version 2>&1` in
4127 *GNU*)
4128   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4129 *)
4130   ac_count=0
4131   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4132   while :
4133   do
4134     cat "conftest.in" "conftest.in" >"conftest.tmp"
4135     mv "conftest.tmp" "conftest.in"
4136     cp "conftest.in" "conftest.nl"
4137     echo 'GREP' >> "conftest.nl"
4138     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4139     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4140     ac_count=`expr $ac_count + 1`
4141     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4142       # Best one so far, save it but keep looking for a better one
4143       ac_cv_path_GREP="$ac_path_GREP"
4144       ac_path_GREP_max=$ac_count
4145     fi
4146     # 10*(2^10) chars as input seems more than enough
4147     test $ac_count -gt 10 && break
4148   done
4149   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4150 esac
4151
4152
4153     $ac_path_GREP_found && break 3
4154   done
4155 done
4156
4157 done
4158 IFS=$as_save_IFS
4159
4160
4161 fi
4162
4163 GREP="$ac_cv_path_GREP"
4164 if test -z "$GREP"; then
4165   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4166 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4167    { (exit 1); exit 1; }; }
4168 fi
4169
4170 else
4171   ac_cv_path_GREP=$GREP
4172 fi
4173
4174
4175 fi
4176 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4177 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4178  GREP="$ac_cv_path_GREP"
4179
4180
4181 { echo "$as_me:$LINENO: checking for egrep" >&5
4182 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4183 if test "${ac_cv_path_EGREP+set}" = set; then
4184   echo $ECHO_N "(cached) $ECHO_C" >&6
4185 else
4186   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4187    then ac_cv_path_EGREP="$GREP -E"
4188    else
4189      # Extract the first word of "egrep" to use in msg output
4190 if test -z "$EGREP"; then
4191 set dummy egrep; ac_prog_name=$2
4192 if test "${ac_cv_path_EGREP+set}" = set; then
4193   echo $ECHO_N "(cached) $ECHO_C" >&6
4194 else
4195   ac_path_EGREP_found=false
4196 # Loop through the user's path and test for each of PROGNAME-LIST
4197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4198 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4199 do
4200   IFS=$as_save_IFS
4201   test -z "$as_dir" && as_dir=.
4202   for ac_prog in egrep; do
4203   for ac_exec_ext in '' $ac_executable_extensions; do
4204     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4205     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4206     # Check for GNU ac_path_EGREP and select it if it is found.
4207   # Check for GNU $ac_path_EGREP
4208 case `"$ac_path_EGREP" --version 2>&1` in
4209 *GNU*)
4210   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4211 *)
4212   ac_count=0
4213   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4214   while :
4215   do
4216     cat "conftest.in" "conftest.in" >"conftest.tmp"
4217     mv "conftest.tmp" "conftest.in"
4218     cp "conftest.in" "conftest.nl"
4219     echo 'EGREP' >> "conftest.nl"
4220     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4221     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4222     ac_count=`expr $ac_count + 1`
4223     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4224       # Best one so far, save it but keep looking for a better one
4225       ac_cv_path_EGREP="$ac_path_EGREP"
4226       ac_path_EGREP_max=$ac_count
4227     fi
4228     # 10*(2^10) chars as input seems more than enough
4229     test $ac_count -gt 10 && break
4230   done
4231   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4232 esac
4233
4234
4235     $ac_path_EGREP_found && break 3
4236   done
4237 done
4238
4239 done
4240 IFS=$as_save_IFS
4241
4242
4243 fi
4244
4245 EGREP="$ac_cv_path_EGREP"
4246 if test -z "$EGREP"; then
4247   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4248 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4249    { (exit 1); exit 1; }; }
4250 fi
4251
4252 else
4253   ac_cv_path_EGREP=$EGREP
4254 fi
4255
4256
4257    fi
4258 fi
4259 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4260 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4261  EGREP="$ac_cv_path_EGREP"
4262
4263
4264 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4265 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4266 if test "${ac_cv_header_stdc+set}" = set; then
4267   echo $ECHO_N "(cached) $ECHO_C" >&6
4268 else
4269   cat >conftest.$ac_ext <<_ACEOF
4270 /* confdefs.h.  */
4271 _ACEOF
4272 cat confdefs.h >>conftest.$ac_ext
4273 cat >>conftest.$ac_ext <<_ACEOF
4274 /* end confdefs.h.  */
4275 #include <stdlib.h>
4276 #include <stdarg.h>
4277 #include <string.h>
4278 #include <float.h>
4279
4280 int
4281 main ()
4282 {
4283
4284   ;
4285   return 0;
4286 }
4287 _ACEOF
4288 rm -f conftest.$ac_objext
4289 if { (ac_try="$ac_compile"
4290 case "(($ac_try" in
4291   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4292   *) ac_try_echo=$ac_try;;
4293 esac
4294 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4295   (eval "$ac_compile") 2>conftest.er1
4296   ac_status=$?
4297   grep -v '^ *+' conftest.er1 >conftest.err
4298   rm -f conftest.er1
4299   cat conftest.err >&5
4300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4301   (exit $ac_status); } && {
4302          test -z "$ac_c_werror_flag" ||
4303          test ! -s conftest.err
4304        } && test -s conftest.$ac_objext; then
4305   ac_cv_header_stdc=yes
4306 else
4307   echo "$as_me: failed program was:" >&5
4308 sed 's/^/| /' conftest.$ac_ext >&5
4309
4310         ac_cv_header_stdc=no
4311 fi
4312
4313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4314
4315 if test $ac_cv_header_stdc = yes; then
4316   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4317   cat >conftest.$ac_ext <<_ACEOF
4318 /* confdefs.h.  */
4319 _ACEOF
4320 cat confdefs.h >>conftest.$ac_ext
4321 cat >>conftest.$ac_ext <<_ACEOF
4322 /* end confdefs.h.  */
4323 #include <string.h>
4324
4325 _ACEOF
4326 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4327   $EGREP "memchr" >/dev/null 2>&1; then
4328   :
4329 else
4330   ac_cv_header_stdc=no
4331 fi
4332 rm -f conftest*
4333
4334 fi
4335
4336 if test $ac_cv_header_stdc = yes; then
4337   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4338   cat >conftest.$ac_ext <<_ACEOF
4339 /* confdefs.h.  */
4340 _ACEOF
4341 cat confdefs.h >>conftest.$ac_ext
4342 cat >>conftest.$ac_ext <<_ACEOF
4343 /* end confdefs.h.  */
4344 #include <stdlib.h>
4345
4346 _ACEOF
4347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4348   $EGREP "free" >/dev/null 2>&1; then
4349   :
4350 else
4351   ac_cv_header_stdc=no
4352 fi
4353 rm -f conftest*
4354
4355 fi
4356
4357 if test $ac_cv_header_stdc = yes; then
4358   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4359   if test "$cross_compiling" = yes; then
4360   :
4361 else
4362   cat >conftest.$ac_ext <<_ACEOF
4363 /* confdefs.h.  */
4364 _ACEOF
4365 cat confdefs.h >>conftest.$ac_ext
4366 cat >>conftest.$ac_ext <<_ACEOF
4367 /* end confdefs.h.  */
4368 #include <ctype.h>
4369 #include <stdlib.h>
4370 #if ((' ' & 0x0FF) == 0x020)
4371 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4372 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4373 #else
4374 # define ISLOWER(c) \
4375                    (('a' <= (c) && (c) <= 'i') \
4376                      || ('j' <= (c) && (c) <= 'r') \
4377                      || ('s' <= (c) && (c) <= 'z'))
4378 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4379 #endif
4380
4381 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4382 int
4383 main ()
4384 {
4385   int i;
4386   for (i = 0; i < 256; i++)
4387     if (XOR (islower (i), ISLOWER (i))
4388         || toupper (i) != TOUPPER (i))
4389       return 2;
4390   return 0;
4391 }
4392 _ACEOF
4393 rm -f conftest$ac_exeext
4394 if { (ac_try="$ac_link"
4395 case "(($ac_try" in
4396   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4397   *) ac_try_echo=$ac_try;;
4398 esac
4399 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4400   (eval "$ac_link") 2>&5
4401   ac_status=$?
4402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4403   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4404   { (case "(($ac_try" in
4405   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4406   *) ac_try_echo=$ac_try;;
4407 esac
4408 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4409   (eval "$ac_try") 2>&5
4410   ac_status=$?
4411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4412   (exit $ac_status); }; }; then
4413   :
4414 else
4415   echo "$as_me: program exited with status $ac_status" >&5
4416 echo "$as_me: failed program was:" >&5
4417 sed 's/^/| /' conftest.$ac_ext >&5
4418
4419 ( exit $ac_status )
4420 ac_cv_header_stdc=no
4421 fi
4422 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4423 fi
4424
4425
4426 fi
4427 fi
4428 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4429 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4430 if test $ac_cv_header_stdc = yes; then
4431
4432 cat >>confdefs.h <<\_ACEOF
4433 #define STDC_HEADERS 1
4434 _ACEOF
4435
4436 fi
4437
4438 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4449                   inttypes.h stdint.h unistd.h
4450 do
4451 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4452 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4453 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4454 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4455   echo $ECHO_N "(cached) $ECHO_C" >&6
4456 else
4457   cat >conftest.$ac_ext <<_ACEOF
4458 /* confdefs.h.  */
4459 _ACEOF
4460 cat confdefs.h >>conftest.$ac_ext
4461 cat >>conftest.$ac_ext <<_ACEOF
4462 /* end confdefs.h.  */
4463 $ac_includes_default
4464
4465 #include <$ac_header>
4466 _ACEOF
4467 rm -f conftest.$ac_objext
4468 if { (ac_try="$ac_compile"
4469 case "(($ac_try" in
4470   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4471   *) ac_try_echo=$ac_try;;
4472 esac
4473 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4474   (eval "$ac_compile") 2>conftest.er1
4475   ac_status=$?
4476   grep -v '^ *+' conftest.er1 >conftest.err
4477   rm -f conftest.er1
4478   cat conftest.err >&5
4479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4480   (exit $ac_status); } && {
4481          test -z "$ac_c_werror_flag" ||
4482          test ! -s conftest.err
4483        } && test -s conftest.$ac_objext; then
4484   eval "$as_ac_Header=yes"
4485 else
4486   echo "$as_me: failed program was:" >&5
4487 sed 's/^/| /' conftest.$ac_ext >&5
4488
4489         eval "$as_ac_Header=no"
4490 fi
4491
4492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4493 fi
4494 ac_res=`eval echo '${'$as_ac_Header'}'`
4495                { echo "$as_me:$LINENO: result: $ac_res" >&5
4496 echo "${ECHO_T}$ac_res" >&6; }
4497 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4498   cat >>confdefs.h <<_ACEOF
4499 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4500 _ACEOF
4501
4502 fi
4503
4504 done
4505
4506
4507
4508 for ac_header in unistd.h
4509 do
4510 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4511 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4512   { echo "$as_me:$LINENO: checking for $ac_header" >&5
4513 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4514 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4515   echo $ECHO_N "(cached) $ECHO_C" >&6
4516 fi
4517 ac_res=`eval echo '${'$as_ac_Header'}'`
4518                { echo "$as_me:$LINENO: result: $ac_res" >&5
4519 echo "${ECHO_T}$ac_res" >&6; }
4520 else
4521   # Is the header compilable?
4522 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
4523 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
4524 cat >conftest.$ac_ext <<_ACEOF
4525 /* confdefs.h.  */
4526 _ACEOF
4527 cat confdefs.h >>conftest.$ac_ext
4528 cat >>conftest.$ac_ext <<_ACEOF
4529 /* end confdefs.h.  */
4530 $ac_includes_default
4531 #include <$ac_header>
4532 _ACEOF
4533 rm -f conftest.$ac_objext
4534 if { (ac_try="$ac_compile"
4535 case "(($ac_try" in
4536   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4537   *) ac_try_echo=$ac_try;;
4538 esac
4539 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4540   (eval "$ac_compile") 2>conftest.er1
4541   ac_status=$?
4542   grep -v '^ *+' conftest.er1 >conftest.err
4543   rm -f conftest.er1
4544   cat conftest.err >&5
4545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546   (exit $ac_status); } && {
4547          test -z "$ac_c_werror_flag" ||
4548          test ! -s conftest.err
4549        } && test -s conftest.$ac_objext; then
4550   ac_header_compiler=yes
4551 else
4552   echo "$as_me: failed program was:" >&5
4553 sed 's/^/| /' conftest.$ac_ext >&5
4554
4555         ac_header_compiler=no
4556 fi
4557
4558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4559 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4560 echo "${ECHO_T}$ac_header_compiler" >&6; }
4561
4562 # Is the header present?
4563 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
4564 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
4565 cat >conftest.$ac_ext <<_ACEOF
4566 /* confdefs.h.  */
4567 _ACEOF
4568 cat confdefs.h >>conftest.$ac_ext
4569 cat >>conftest.$ac_ext <<_ACEOF
4570 /* end confdefs.h.  */
4571 #include <$ac_header>
4572 _ACEOF
4573 if { (ac_try="$ac_cpp conftest.$ac_ext"
4574 case "(($ac_try" in
4575   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4576   *) ac_try_echo=$ac_try;;
4577 esac
4578 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4579   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4580   ac_status=$?
4581   grep -v '^ *+' conftest.er1 >conftest.err
4582   rm -f conftest.er1
4583   cat conftest.err >&5
4584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4585   (exit $ac_status); } >/dev/null && {
4586          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4587          test ! -s conftest.err
4588        }; then
4589   ac_header_preproc=yes
4590 else
4591   echo "$as_me: failed program was:" >&5
4592 sed 's/^/| /' conftest.$ac_ext >&5
4593
4594   ac_header_preproc=no
4595 fi
4596
4597 rm -f conftest.err conftest.$ac_ext
4598 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4599 echo "${ECHO_T}$ac_header_preproc" >&6; }
4600
4601 # So?  What about this header?
4602 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4603   yes:no: )
4604     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4605 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4606     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4607 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4608     ac_header_preproc=yes
4609     ;;
4610   no:yes:* )
4611     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4612 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4613     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4614 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4615     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4616 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4617     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4618 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4619     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4620 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4621     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4622 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4623
4624     ;;
4625 esac
4626 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4627 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4628 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4629   echo $ECHO_N "(cached) $ECHO_C" >&6
4630 else
4631   eval "$as_ac_Header=\$ac_header_preproc"
4632 fi
4633 ac_res=`eval echo '${'$as_ac_Header'}'`
4634                { echo "$as_me:$LINENO: result: $ac_res" >&5
4635 echo "${ECHO_T}$ac_res" >&6; }
4636
4637 fi
4638 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4639   cat >>confdefs.h <<_ACEOF
4640 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4641 _ACEOF
4642
4643 fi
4644
4645 done
4646
4647 { echo "$as_me:$LINENO: checking for mode_t" >&5
4648 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
4649 if test "${ac_cv_type_mode_t+set}" = set; then
4650   echo $ECHO_N "(cached) $ECHO_C" >&6
4651 else
4652   cat >conftest.$ac_ext <<_ACEOF
4653 /* confdefs.h.  */
4654 _ACEOF
4655 cat confdefs.h >>conftest.$ac_ext
4656 cat >>conftest.$ac_ext <<_ACEOF
4657 /* end confdefs.h.  */
4658 $ac_includes_default
4659 typedef mode_t ac__type_new_;
4660 int
4661 main ()
4662 {
4663 if ((ac__type_new_ *) 0)
4664   return 0;
4665 if (sizeof (ac__type_new_))
4666   return 0;
4667   ;
4668   return 0;
4669 }
4670 _ACEOF
4671 rm -f conftest.$ac_objext
4672 if { (ac_try="$ac_compile"
4673 case "(($ac_try" in
4674   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4675   *) ac_try_echo=$ac_try;;
4676 esac
4677 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4678   (eval "$ac_compile") 2>conftest.er1
4679   ac_status=$?
4680   grep -v '^ *+' conftest.er1 >conftest.err
4681   rm -f conftest.er1
4682   cat conftest.err >&5
4683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4684   (exit $ac_status); } && {
4685          test -z "$ac_c_werror_flag" ||
4686          test ! -s conftest.err
4687        } && test -s conftest.$ac_objext; then
4688   ac_cv_type_mode_t=yes
4689 else
4690   echo "$as_me: failed program was:" >&5
4691 sed 's/^/| /' conftest.$ac_ext >&5
4692
4693         ac_cv_type_mode_t=no
4694 fi
4695
4696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4697 fi
4698 { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4699 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
4700 if test $ac_cv_type_mode_t = yes; then
4701   :
4702 else
4703
4704 cat >>confdefs.h <<_ACEOF
4705 #define mode_t int
4706 _ACEOF
4707
4708 fi
4709
4710 { echo "$as_me:$LINENO: checking for pid_t" >&5
4711 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
4712 if test "${ac_cv_type_pid_t+set}" = set; then
4713   echo $ECHO_N "(cached) $ECHO_C" >&6
4714 else
4715   cat >conftest.$ac_ext <<_ACEOF
4716 /* confdefs.h.  */
4717 _ACEOF
4718 cat confdefs.h >>conftest.$ac_ext
4719 cat >>conftest.$ac_ext <<_ACEOF
4720 /* end confdefs.h.  */
4721 $ac_includes_default
4722 typedef pid_t ac__type_new_;
4723 int
4724 main ()
4725 {
4726 if ((ac__type_new_ *) 0)
4727   return 0;
4728 if (sizeof (ac__type_new_))
4729   return 0;
4730   ;
4731   return 0;
4732 }
4733 _ACEOF
4734 rm -f conftest.$ac_objext
4735 if { (ac_try="$ac_compile"
4736 case "(($ac_try" in
4737   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4738   *) ac_try_echo=$ac_try;;
4739 esac
4740 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4741   (eval "$ac_compile") 2>conftest.er1
4742   ac_status=$?
4743   grep -v '^ *+' conftest.er1 >conftest.err
4744   rm -f conftest.er1
4745   cat conftest.err >&5
4746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4747   (exit $ac_status); } && {
4748          test -z "$ac_c_werror_flag" ||
4749          test ! -s conftest.err
4750        } && test -s conftest.$ac_objext; then
4751   ac_cv_type_pid_t=yes
4752 else
4753   echo "$as_me: failed program was:" >&5
4754 sed 's/^/| /' conftest.$ac_ext >&5
4755
4756         ac_cv_type_pid_t=no
4757 fi
4758
4759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4760 fi
4761 { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4762 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
4763 if test $ac_cv_type_pid_t = yes; then
4764   :
4765 else
4766
4767 cat >>confdefs.h <<_ACEOF
4768 #define pid_t int
4769 _ACEOF
4770
4771 fi
4772
4773 { echo "$as_me:$LINENO: checking for size_t" >&5
4774 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
4775 if test "${ac_cv_type_size_t+set}" = set; then
4776   echo $ECHO_N "(cached) $ECHO_C" >&6
4777 else
4778   cat >conftest.$ac_ext <<_ACEOF
4779 /* confdefs.h.  */
4780 _ACEOF
4781 cat confdefs.h >>conftest.$ac_ext
4782 cat >>conftest.$ac_ext <<_ACEOF
4783 /* end confdefs.h.  */
4784 $ac_includes_default
4785 typedef size_t ac__type_new_;
4786 int
4787 main ()
4788 {
4789 if ((ac__type_new_ *) 0)
4790   return 0;
4791 if (sizeof (ac__type_new_))
4792   return 0;
4793   ;
4794   return 0;
4795 }
4796 _ACEOF
4797 rm -f conftest.$ac_objext
4798 if { (ac_try="$ac_compile"
4799 case "(($ac_try" in
4800   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4801   *) ac_try_echo=$ac_try;;
4802 esac
4803 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4804   (eval "$ac_compile") 2>conftest.er1
4805   ac_status=$?
4806   grep -v '^ *+' conftest.er1 >conftest.err
4807   rm -f conftest.er1
4808   cat conftest.err >&5
4809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4810   (exit $ac_status); } && {
4811          test -z "$ac_c_werror_flag" ||
4812          test ! -s conftest.err
4813        } && test -s conftest.$ac_objext; then
4814   ac_cv_type_size_t=yes
4815 else
4816   echo "$as_me: failed program was:" >&5
4817 sed 's/^/| /' conftest.$ac_ext >&5
4818
4819         ac_cv_type_size_t=no
4820 fi
4821
4822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4823 fi
4824 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4825 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
4826 if test $ac_cv_type_size_t = yes; then
4827   :
4828 else
4829
4830 cat >>confdefs.h <<_ACEOF
4831 #define size_t unsigned int
4832 _ACEOF
4833
4834 fi
4835
4836 { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4837 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
4838 if test "${ac_cv_type_signal+set}" = set; then
4839   echo $ECHO_N "(cached) $ECHO_C" >&6
4840 else
4841   cat >conftest.$ac_ext <<_ACEOF
4842 /* confdefs.h.  */
4843 _ACEOF
4844 cat confdefs.h >>conftest.$ac_ext
4845 cat >>conftest.$ac_ext <<_ACEOF
4846 /* end confdefs.h.  */
4847 #include <sys/types.h>
4848 #include <signal.h>
4849
4850 int
4851 main ()
4852 {
4853 return *(signal (0, 0)) (0) == 1;
4854   ;
4855   return 0;
4856 }
4857 _ACEOF
4858 rm -f conftest.$ac_objext
4859 if { (ac_try="$ac_compile"
4860 case "(($ac_try" in
4861   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4862   *) ac_try_echo=$ac_try;;
4863 esac
4864 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4865   (eval "$ac_compile") 2>conftest.er1
4866   ac_status=$?
4867   grep -v '^ *+' conftest.er1 >conftest.err
4868   rm -f conftest.er1
4869   cat conftest.err >&5
4870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4871   (exit $ac_status); } && {
4872          test -z "$ac_c_werror_flag" ||
4873          test ! -s conftest.err
4874        } && test -s conftest.$ac_objext; then
4875   ac_cv_type_signal=int
4876 else
4877   echo "$as_me: failed program was:" >&5
4878 sed 's/^/| /' conftest.$ac_ext >&5
4879
4880         ac_cv_type_signal=void
4881 fi
4882
4883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4884 fi
4885 { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4886 echo "${ECHO_T}$ac_cv_type_signal" >&6; }
4887
4888 cat >>confdefs.h <<_ACEOF
4889 #define RETSIGTYPE $ac_cv_type_signal
4890 _ACEOF
4891
4892
4893 { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4894 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
4895 if test "${ac_cv_header_time+set}" = set; then
4896   echo $ECHO_N "(cached) $ECHO_C" >&6
4897 else
4898   cat >conftest.$ac_ext <<_ACEOF
4899 /* confdefs.h.  */
4900 _ACEOF
4901 cat confdefs.h >>conftest.$ac_ext
4902 cat >>conftest.$ac_ext <<_ACEOF
4903 /* end confdefs.h.  */
4904 #include <sys/types.h>
4905 #include <sys/time.h>
4906 #include <time.h>
4907
4908 int
4909 main ()
4910 {
4911 if ((struct tm *) 0)
4912 return 0;
4913   ;
4914   return 0;
4915 }
4916 _ACEOF
4917 rm -f conftest.$ac_objext
4918 if { (ac_try="$ac_compile"
4919 case "(($ac_try" in
4920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4921   *) ac_try_echo=$ac_try;;
4922 esac
4923 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4924   (eval "$ac_compile") 2>conftest.er1
4925   ac_status=$?
4926   grep -v '^ *+' conftest.er1 >conftest.err
4927   rm -f conftest.er1
4928   cat conftest.err >&5
4929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4930   (exit $ac_status); } && {
4931          test -z "$ac_c_werror_flag" ||
4932          test ! -s conftest.err
4933        } && test -s conftest.$ac_objext; then
4934   ac_cv_header_time=yes
4935 else
4936   echo "$as_me: failed program was:" >&5
4937 sed 's/^/| /' conftest.$ac_ext >&5
4938
4939         ac_cv_header_time=no
4940 fi
4941
4942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4943 fi
4944 { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
4945 echo "${ECHO_T}$ac_cv_header_time" >&6; }
4946 if test $ac_cv_header_time = yes; then
4947
4948 cat >>confdefs.h <<\_ACEOF
4949 #define TIME_WITH_SYS_TIME 1
4950 _ACEOF
4951
4952 fi
4953
4954 { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
4955 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
4956 if test "${ac_cv_header_sys_wait_h+set}" = set; then
4957   echo $ECHO_N "(cached) $ECHO_C" >&6
4958 else
4959   cat >conftest.$ac_ext <<_ACEOF
4960 /* confdefs.h.  */
4961 _ACEOF
4962 cat confdefs.h >>conftest.$ac_ext
4963 cat >>conftest.$ac_ext <<_ACEOF
4964 /* end confdefs.h.  */
4965 #include <sys/types.h>
4966 #include <sys/wait.h>
4967 #ifndef WEXITSTATUS
4968 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4969 #endif
4970 #ifndef WIFEXITED
4971 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4972 #endif
4973
4974 int
4975 main ()
4976 {
4977   int s;
4978   wait (&s);
4979   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4980   ;
4981   return 0;
4982 }
4983 _ACEOF
4984 rm -f conftest.$ac_objext
4985 if { (ac_try="$ac_compile"
4986 case "(($ac_try" in
4987   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4988   *) ac_try_echo=$ac_try;;
4989 esac
4990 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4991   (eval "$ac_compile") 2>conftest.er1
4992   ac_status=$?
4993   grep -v '^ *+' conftest.er1 >conftest.err
4994   rm -f conftest.er1
4995   cat conftest.err >&5
4996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997   (exit $ac_status); } && {
4998          test -z "$ac_c_werror_flag" ||
4999          test ! -s conftest.err
5000        } && test -s conftest.$ac_objext; then
5001   ac_cv_header_sys_wait_h=yes
5002 else
5003   echo "$as_me: failed program was:" >&5
5004 sed 's/^/| /' conftest.$ac_ext >&5
5005
5006         ac_cv_header_sys_wait_h=no
5007 fi
5008
5009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5010 fi
5011 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5012 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
5013 if test $ac_cv_header_sys_wait_h = yes; then
5014
5015 cat >>confdefs.h <<\_ACEOF
5016 #define HAVE_SYS_WAIT_H 1
5017 _ACEOF
5018
5019 fi
5020
5021
5022
5023
5024
5025
5026 ac_header_dirent=no
5027 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5028   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5029 { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5030 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5031 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5032   echo $ECHO_N "(cached) $ECHO_C" >&6
5033 else
5034   cat >conftest.$ac_ext <<_ACEOF
5035 /* confdefs.h.  */
5036 _ACEOF
5037 cat confdefs.h >>conftest.$ac_ext
5038 cat >>conftest.$ac_ext <<_ACEOF
5039 /* end confdefs.h.  */
5040 #include <sys/types.h>
5041 #include <$ac_hdr>
5042
5043 int
5044 main ()
5045 {
5046 if ((DIR *) 0)
5047 return 0;
5048   ;
5049   return 0;
5050 }
5051 _ACEOF
5052 rm -f conftest.$ac_objext
5053 if { (ac_try="$ac_compile"
5054 case "(($ac_try" in
5055   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5056   *) ac_try_echo=$ac_try;;
5057 esac
5058 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5059   (eval "$ac_compile") 2>conftest.er1
5060   ac_status=$?
5061   grep -v '^ *+' conftest.er1 >conftest.err
5062   rm -f conftest.er1
5063   cat conftest.err >&5
5064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065   (exit $ac_status); } && {
5066          test -z "$ac_c_werror_flag" ||
5067          test ! -s conftest.err
5068        } && test -s conftest.$ac_objext; then
5069   eval "$as_ac_Header=yes"
5070 else
5071   echo "$as_me: failed program was:" >&5
5072 sed 's/^/| /' conftest.$ac_ext >&5
5073
5074         eval "$as_ac_Header=no"
5075 fi
5076
5077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5078 fi
5079 ac_res=`eval echo '${'$as_ac_Header'}'`
5080                { echo "$as_me:$LINENO: result: $ac_res" >&5
5081 echo "${ECHO_T}$ac_res" >&6; }
5082 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5083   cat >>confdefs.h <<_ACEOF
5084 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5085 _ACEOF
5086
5087 ac_header_dirent=$ac_hdr; break
5088 fi
5089
5090 done
5091 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5092 if test $ac_header_dirent = dirent.h; then
5093   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5094 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5095 if test "${ac_cv_search_opendir+set}" = set; then
5096   echo $ECHO_N "(cached) $ECHO_C" >&6
5097 else
5098   ac_func_search_save_LIBS=$LIBS
5099 cat >conftest.$ac_ext <<_ACEOF
5100 /* confdefs.h.  */
5101 _ACEOF
5102 cat confdefs.h >>conftest.$ac_ext
5103 cat >>conftest.$ac_ext <<_ACEOF
5104 /* end confdefs.h.  */
5105
5106 /* Override any GCC internal prototype to avoid an error.
5107    Use char because int might match the return type of a GCC
5108    builtin and then its argument prototype would still apply.  */
5109 #ifdef __cplusplus
5110 extern "C"
5111 #endif
5112 char opendir ();
5113 int
5114 main ()
5115 {
5116 return opendir ();
5117   ;
5118   return 0;
5119 }
5120 _ACEOF
5121 for ac_lib in '' dir; do
5122   if test -z "$ac_lib"; then
5123     ac_res="none required"
5124   else
5125     ac_res=-l$ac_lib
5126     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5127   fi
5128   rm -f conftest.$ac_objext conftest$ac_exeext
5129 if { (ac_try="$ac_link"
5130 case "(($ac_try" in
5131   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5132   *) ac_try_echo=$ac_try;;
5133 esac
5134 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5135   (eval "$ac_link") 2>conftest.er1
5136   ac_status=$?
5137   grep -v '^ *+' conftest.er1 >conftest.err
5138   rm -f conftest.er1
5139   cat conftest.err >&5
5140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141   (exit $ac_status); } && {
5142          test -z "$ac_c_werror_flag" ||
5143          test ! -s conftest.err
5144        } && test -s conftest$ac_exeext &&
5145        $as_test_x conftest$ac_exeext; then
5146   ac_cv_search_opendir=$ac_res
5147 else
5148   echo "$as_me: failed program was:" >&5
5149 sed 's/^/| /' conftest.$ac_ext >&5
5150
5151
5152 fi
5153
5154 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5155       conftest$ac_exeext
5156   if test "${ac_cv_search_opendir+set}" = set; then
5157   break
5158 fi
5159 done
5160 if test "${ac_cv_search_opendir+set}" = set; then
5161   :
5162 else
5163   ac_cv_search_opendir=no
5164 fi
5165 rm conftest.$ac_ext
5166 LIBS=$ac_func_search_save_LIBS
5167 fi
5168 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5169 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5170 ac_res=$ac_cv_search_opendir
5171 if test "$ac_res" != no; then
5172   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5173
5174 fi
5175
5176 else
5177   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5178 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5179 if test "${ac_cv_search_opendir+set}" = set; then
5180   echo $ECHO_N "(cached) $ECHO_C" >&6
5181 else
5182   ac_func_search_save_LIBS=$LIBS
5183 cat >conftest.$ac_ext <<_ACEOF
5184 /* confdefs.h.  */
5185 _ACEOF
5186 cat confdefs.h >>conftest.$ac_ext
5187 cat >>conftest.$ac_ext <<_ACEOF
5188 /* end confdefs.h.  */
5189
5190 /* Override any GCC internal prototype to avoid an error.
5191    Use char because int might match the return type of a GCC
5192    builtin and then its argument prototype would still apply.  */
5193 #ifdef __cplusplus
5194 extern "C"
5195 #endif
5196 char opendir ();
5197 int
5198 main ()
5199 {
5200 return opendir ();
5201   ;
5202   return 0;
5203 }
5204 _ACEOF
5205 for ac_lib in '' x; do
5206   if test -z "$ac_lib"; then
5207     ac_res="none required"
5208   else
5209     ac_res=-l$ac_lib
5210     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5211   fi
5212   rm -f conftest.$ac_objext conftest$ac_exeext
5213 if { (ac_try="$ac_link"
5214 case "(($ac_try" in
5215   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5216   *) ac_try_echo=$ac_try;;
5217 esac
5218 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5219   (eval "$ac_link") 2>conftest.er1
5220   ac_status=$?
5221   grep -v '^ *+' conftest.er1 >conftest.err
5222   rm -f conftest.er1
5223   cat conftest.err >&5
5224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5225   (exit $ac_status); } && {
5226          test -z "$ac_c_werror_flag" ||
5227          test ! -s conftest.err
5228        } && test -s conftest$ac_exeext &&
5229        $as_test_x conftest$ac_exeext; then
5230   ac_cv_search_opendir=$ac_res
5231 else
5232   echo "$as_me: failed program was:" >&5
5233 sed 's/^/| /' conftest.$ac_ext >&5
5234
5235
5236 fi
5237
5238 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5239       conftest$ac_exeext
5240   if test "${ac_cv_search_opendir+set}" = set; then
5241   break
5242 fi
5243 done
5244 if test "${ac_cv_search_opendir+set}" = set; then
5245   :
5246 else
5247   ac_cv_search_opendir=no
5248 fi
5249 rm conftest.$ac_ext
5250 LIBS=$ac_func_search_save_LIBS
5251 fi
5252 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5253 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5254 ac_res=$ac_cv_search_opendir
5255 if test "$ac_res" != no; then
5256   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5257
5258 fi
5259
5260 fi
5261
5262 { echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5263 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6; }
5264   if test "${ac_cv_gettimeofday_args+set}" = set; then
5265   echo $ECHO_N "(cached) $ECHO_C" >&6
5266 else
5267   cat >conftest.$ac_ext <<_ACEOF
5268 /* confdefs.h.  */
5269 _ACEOF
5270 cat confdefs.h >>conftest.$ac_ext
5271 cat >>conftest.$ac_ext <<_ACEOF
5272 /* end confdefs.h.  */
5273 #include <stdlib.h>
5274                     #include <sys/time.h>
5275 int
5276 main ()
5277 {
5278 struct timeval tv; struct timezone tzp;
5279                     gettimeofday(&tv, &tzp);
5280   ;
5281   return 0;
5282 }
5283 _ACEOF
5284 rm -f conftest.$ac_objext
5285 if { (ac_try="$ac_compile"
5286 case "(($ac_try" in
5287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5288   *) ac_try_echo=$ac_try;;
5289 esac
5290 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5291   (eval "$ac_compile") 2>conftest.er1
5292   ac_status=$?
5293   grep -v '^ *+' conftest.er1 >conftest.err
5294   rm -f conftest.er1
5295   cat conftest.err >&5
5296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5297   (exit $ac_status); } && {
5298          test -z "$ac_c_werror_flag" ||
5299          test ! -s conftest.err
5300        } && test -s conftest.$ac_objext; then
5301   ac_gettimeofday_args=2
5302 else
5303   echo "$as_me: failed program was:" >&5
5304 sed 's/^/| /' conftest.$ac_ext >&5
5305
5306         cat >conftest.$ac_ext <<_ACEOF
5307 /* confdefs.h.  */
5308 _ACEOF
5309 cat confdefs.h >>conftest.$ac_ext
5310 cat >>conftest.$ac_ext <<_ACEOF
5311 /* end confdefs.h.  */
5312 #include <stdlib.h>
5313                                     #include <sys/time.h>
5314 int
5315 main ()
5316 {
5317 struct timeval tv; gettimeofday(&tv);
5318   ;
5319   return 0;
5320 }
5321 _ACEOF
5322 rm -f conftest.$ac_objext
5323 if { (ac_try="$ac_compile"
5324 case "(($ac_try" in
5325   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5326   *) ac_try_echo=$ac_try;;
5327 esac
5328 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5329   (eval "$ac_compile") 2>conftest.er1
5330   ac_status=$?
5331   grep -v '^ *+' conftest.er1 >conftest.err
5332   rm -f conftest.er1
5333   cat conftest.err >&5
5334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5335   (exit $ac_status); } && {
5336          test -z "$ac_c_werror_flag" ||
5337          test ! -s conftest.err
5338        } && test -s conftest.$ac_objext; then
5339   ac_gettimeofday_args=1
5340 else
5341   echo "$as_me: failed program was:" >&5
5342 sed 's/^/| /' conftest.$ac_ext >&5
5343
5344         ac_gettimeofday_args=0
5345 fi
5346
5347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5348 fi
5349
5350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5351     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5352 fi
5353
5354   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5355   if test "$ac_gettimeofday_args" = 1 ; then
5356     cat >>confdefs.h <<\_ACEOF
5357 #define HAVE_GETTIMEOFDAY 1
5358 _ACEOF
5359
5360     { echo "$as_me:$LINENO: result: one argument" >&5
5361 echo "${ECHO_T}one argument" >&6; }
5362   elif test "$ac_gettimeofday_args" = 2 ; then
5363     cat >>confdefs.h <<\_ACEOF
5364 #define HAVE_GETTIMEOFDAY 1
5365 _ACEOF
5366
5367     cat >>confdefs.h <<\_ACEOF
5368 #define GETTIMEOFDAY_TWO_ARGS 1
5369 _ACEOF
5370
5371     { echo "$as_me:$LINENO: result: two arguments" >&5
5372 echo "${ECHO_T}two arguments" >&6; }
5373   else
5374     { echo "$as_me:$LINENO: result: unknown" >&5
5375 echo "${ECHO_T}unknown" >&6; }
5376   fi
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5388 do
5389 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5390 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5391 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5392 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5393   echo $ECHO_N "(cached) $ECHO_C" >&6
5394 else
5395   cat >conftest.$ac_ext <<_ACEOF
5396 /* confdefs.h.  */
5397 _ACEOF
5398 cat confdefs.h >>conftest.$ac_ext
5399 cat >>conftest.$ac_ext <<_ACEOF
5400 /* end confdefs.h.  */
5401 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5402    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5403 #define $ac_func innocuous_$ac_func
5404
5405 /* System header to define __stub macros and hopefully few prototypes,
5406     which can conflict with char $ac_func (); below.
5407     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5408     <limits.h> exists even on freestanding compilers.  */
5409
5410 #ifdef __STDC__
5411 # include <limits.h>
5412 #else
5413 # include <assert.h>
5414 #endif
5415
5416 #undef $ac_func
5417
5418 /* Override any GCC internal prototype to avoid an error.
5419    Use char because int might match the return type of a GCC
5420    builtin and then its argument prototype would still apply.  */
5421 #ifdef __cplusplus
5422 extern "C"
5423 #endif
5424 char $ac_func ();
5425 /* The GNU C library defines this for functions which it implements
5426     to always fail with ENOSYS.  Some functions are actually named
5427     something starting with __ and the normal name is an alias.  */
5428 #if defined __stub_$ac_func || defined __stub___$ac_func
5429 choke me
5430 #endif
5431
5432 int
5433 main ()
5434 {
5435 return $ac_func ();
5436   ;
5437   return 0;
5438 }
5439 _ACEOF
5440 rm -f conftest.$ac_objext conftest$ac_exeext
5441 if { (ac_try="$ac_link"
5442 case "(($ac_try" in
5443   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5444   *) ac_try_echo=$ac_try;;
5445 esac
5446 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5447   (eval "$ac_link") 2>conftest.er1
5448   ac_status=$?
5449   grep -v '^ *+' conftest.er1 >conftest.err
5450   rm -f conftest.er1
5451   cat conftest.err >&5
5452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5453   (exit $ac_status); } && {
5454          test -z "$ac_c_werror_flag" ||
5455          test ! -s conftest.err
5456        } && test -s conftest$ac_exeext &&
5457        $as_test_x conftest$ac_exeext; then
5458   eval "$as_ac_var=yes"
5459 else
5460   echo "$as_me: failed program was:" >&5
5461 sed 's/^/| /' conftest.$ac_ext >&5
5462
5463         eval "$as_ac_var=no"
5464 fi
5465
5466 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5467       conftest$ac_exeext conftest.$ac_ext
5468 fi
5469 ac_res=`eval echo '${'$as_ac_var'}'`
5470                { echo "$as_me:$LINENO: result: $ac_res" >&5
5471 echo "${ECHO_T}$ac_res" >&6; }
5472 if test `eval echo '${'$as_ac_var'}'` = yes; then
5473   cat >>confdefs.h <<_ACEOF
5474 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5475 _ACEOF
5476
5477 fi
5478 done
5479
5480
5481
5482
5483
5484 for ac_func in sigaction syslog realpath setrlimit
5485 do
5486 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5487 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5488 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5489 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5490   echo $ECHO_N "(cached) $ECHO_C" >&6
5491 else
5492   cat >conftest.$ac_ext <<_ACEOF
5493 /* confdefs.h.  */
5494 _ACEOF
5495 cat confdefs.h >>conftest.$ac_ext
5496 cat >>conftest.$ac_ext <<_ACEOF
5497 /* end confdefs.h.  */
5498 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5499    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5500 #define $ac_func innocuous_$ac_func
5501
5502 /* System header to define __stub macros and hopefully few prototypes,
5503     which can conflict with char $ac_func (); below.
5504     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5505     <limits.h> exists even on freestanding compilers.  */
5506
5507 #ifdef __STDC__
5508 # include <limits.h>
5509 #else
5510 # include <assert.h>
5511 #endif
5512
5513 #undef $ac_func
5514
5515 /* Override any GCC internal prototype to avoid an error.
5516    Use char because int might match the return type of a GCC
5517    builtin and then its argument prototype would still apply.  */
5518 #ifdef __cplusplus
5519 extern "C"
5520 #endif
5521 char $ac_func ();
5522 /* The GNU C library defines this for functions which it implements
5523     to always fail with ENOSYS.  Some functions are actually named
5524     something starting with __ and the normal name is an alias.  */
5525 #if defined __stub_$ac_func || defined __stub___$ac_func
5526 choke me
5527 #endif
5528
5529 int
5530 main ()
5531 {
5532 return $ac_func ();
5533   ;
5534   return 0;
5535 }
5536 _ACEOF
5537 rm -f conftest.$ac_objext conftest$ac_exeext
5538 if { (ac_try="$ac_link"
5539 case "(($ac_try" in
5540   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5541   *) ac_try_echo=$ac_try;;
5542 esac
5543 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5544   (eval "$ac_link") 2>conftest.er1
5545   ac_status=$?
5546   grep -v '^ *+' conftest.er1 >conftest.err
5547   rm -f conftest.er1
5548   cat conftest.err >&5
5549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5550   (exit $ac_status); } && {
5551          test -z "$ac_c_werror_flag" ||
5552          test ! -s conftest.err
5553        } && test -s conftest$ac_exeext &&
5554        $as_test_x conftest$ac_exeext; then
5555   eval "$as_ac_var=yes"
5556 else
5557   echo "$as_me: failed program was:" >&5
5558 sed 's/^/| /' conftest.$ac_ext >&5
5559
5560         eval "$as_ac_var=no"
5561 fi
5562
5563 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5564       conftest$ac_exeext conftest.$ac_ext
5565 fi
5566 ac_res=`eval echo '${'$as_ac_var'}'`
5567                { echo "$as_me:$LINENO: result: $ac_res" >&5
5568 echo "${ECHO_T}$ac_res" >&6; }
5569 if test `eval echo '${'$as_ac_var'}'` = yes; then
5570   cat >>confdefs.h <<_ACEOF
5571 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5572 _ACEOF
5573
5574 fi
5575 done
5576
5577
5578 for ac_func in setlocale
5579 do
5580 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5581 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5582 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5583 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5584   echo $ECHO_N "(cached) $ECHO_C" >&6
5585 else
5586   cat >conftest.$ac_ext <<_ACEOF
5587 /* confdefs.h.  */
5588 _ACEOF
5589 cat confdefs.h >>conftest.$ac_ext
5590 cat >>conftest.$ac_ext <<_ACEOF
5591 /* end confdefs.h.  */
5592 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5593    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5594 #define $ac_func innocuous_$ac_func
5595
5596 /* System header to define __stub macros and hopefully few prototypes,
5597     which can conflict with char $ac_func (); below.
5598     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5599     <limits.h> exists even on freestanding compilers.  */
5600
5601 #ifdef __STDC__
5602 # include <limits.h>
5603 #else
5604 # include <assert.h>
5605 #endif
5606
5607 #undef $ac_func
5608
5609 /* Override any GCC internal prototype to avoid an error.
5610    Use char because int might match the return type of a GCC
5611    builtin and then its argument prototype would still apply.  */
5612 #ifdef __cplusplus
5613 extern "C"
5614 #endif
5615 char $ac_func ();
5616 /* The GNU C library defines this for functions which it implements
5617     to always fail with ENOSYS.  Some functions are actually named
5618     something starting with __ and the normal name is an alias.  */
5619 #if defined __stub_$ac_func || defined __stub___$ac_func
5620 choke me
5621 #endif
5622
5623 int
5624 main ()
5625 {
5626 return $ac_func ();
5627   ;
5628   return 0;
5629 }
5630 _ACEOF
5631 rm -f conftest.$ac_objext conftest$ac_exeext
5632 if { (ac_try="$ac_link"
5633 case "(($ac_try" in
5634   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5635   *) ac_try_echo=$ac_try;;
5636 esac
5637 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5638   (eval "$ac_link") 2>conftest.er1
5639   ac_status=$?
5640   grep -v '^ *+' conftest.er1 >conftest.err
5641   rm -f conftest.er1
5642   cat conftest.err >&5
5643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5644   (exit $ac_status); } && {
5645          test -z "$ac_c_werror_flag" ||
5646          test ! -s conftest.err
5647        } && test -s conftest$ac_exeext &&
5648        $as_test_x conftest$ac_exeext; then
5649   eval "$as_ac_var=yes"
5650 else
5651   echo "$as_me: failed program was:" >&5
5652 sed 's/^/| /' conftest.$ac_ext >&5
5653
5654         eval "$as_ac_var=no"
5655 fi
5656
5657 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5658       conftest$ac_exeext conftest.$ac_ext
5659 fi
5660 ac_res=`eval echo '${'$as_ac_var'}'`
5661                { echo "$as_me:$LINENO: result: $ac_res" >&5
5662 echo "${ECHO_T}$ac_res" >&6; }
5663 if test `eval echo '${'$as_ac_var'}'` = yes; then
5664   cat >>confdefs.h <<_ACEOF
5665 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5666 _ACEOF
5667
5668 fi
5669 done
5670
5671 { echo "$as_me:$LINENO: checking for struct icmp" >&5
5672 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6; }
5673 if test "${ac_cv_have_icmp+set}" = set; then
5674   echo $ECHO_N "(cached) $ECHO_C" >&6
5675 else
5676   cat >conftest.$ac_ext <<_ACEOF
5677 /* confdefs.h.  */
5678 _ACEOF
5679 cat confdefs.h >>conftest.$ac_ext
5680 cat >>conftest.$ac_ext <<_ACEOF
5681 /* end confdefs.h.  */
5682 #include <stdlib.h>
5683                    #include <stdio.h>
5684                    #include <math.h>
5685                    #include <unistd.h>
5686                    #include <limits.h>
5687                    #include <signal.h>
5688                    #include <fcntl.h>
5689                    #include <sys/types.h>
5690                    #include <sys/time.h>
5691                    #include <sys/ipc.h>
5692                    #include <sys/shm.h>
5693                    #include <sys/socket.h>
5694                    #include <netinet/in_systm.h>
5695                    #include <netinet/in.h>
5696                    #include <netinet/ip.h>
5697                    #include <netinet/ip_icmp.h>
5698                    #include <netinet/udp.h>
5699                    #include <arpa/inet.h>
5700                    #include <netdb.h>
5701 int
5702 main ()
5703 {
5704 struct icmp i;
5705                    struct sockaddr s;
5706                    struct sockaddr_in si;
5707                    struct ip ip;
5708                    i.icmp_type = ICMP_ECHO;
5709                    i.icmp_code = 0;
5710                    i.icmp_cksum = 0;
5711                    i.icmp_id = 0;
5712                    i.icmp_seq = 0;
5713                    si.sin_family = AF_INET;
5714                    #if defined(__DECC) || defined(_IP_VHL)
5715                    ip.ip_vhl = 0;
5716                    #else
5717                    ip.ip_hl = 0;
5718                    #endif
5719
5720   ;
5721   return 0;
5722 }
5723 _ACEOF
5724 rm -f conftest.$ac_objext
5725 if { (ac_try="$ac_compile"
5726 case "(($ac_try" in
5727   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5728   *) ac_try_echo=$ac_try;;
5729 esac
5730 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5731   (eval "$ac_compile") 2>conftest.er1
5732   ac_status=$?
5733   grep -v '^ *+' conftest.er1 >conftest.err
5734   rm -f conftest.er1
5735   cat conftest.err >&5
5736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5737   (exit $ac_status); } && {
5738          test -z "$ac_c_werror_flag" ||
5739          test ! -s conftest.err
5740        } && test -s conftest.$ac_objext; then
5741   ac_cv_have_icmp=yes
5742 else
5743   echo "$as_me: failed program was:" >&5
5744 sed 's/^/| /' conftest.$ac_ext >&5
5745
5746         ac_cv_have_icmp=no
5747 fi
5748
5749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5750 fi
5751 { echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
5752 echo "${ECHO_T}$ac_cv_have_icmp" >&6; }
5753  if test "$ac_cv_have_icmp" = yes ; then
5754    cat >>confdefs.h <<\_ACEOF
5755 #define HAVE_ICMP 1
5756 _ACEOF
5757
5758  fi
5759 { echo "$as_me:$LINENO: checking for struct icmphdr" >&5
5760 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6; }
5761 if test "${ac_cv_have_icmphdr+set}" = set; then
5762   echo $ECHO_N "(cached) $ECHO_C" >&6
5763 else
5764   cat >conftest.$ac_ext <<_ACEOF
5765 /* confdefs.h.  */
5766 _ACEOF
5767 cat confdefs.h >>conftest.$ac_ext
5768 cat >>conftest.$ac_ext <<_ACEOF
5769 /* end confdefs.h.  */
5770 #include <stdlib.h>
5771                    #include <stdio.h>
5772                    #include <math.h>
5773                    #include <unistd.h>
5774                    #include <limits.h>
5775                    #include <signal.h>
5776                    #include <fcntl.h>
5777                    #include <sys/types.h>
5778                    #include <sys/time.h>
5779                    #include <sys/ipc.h>
5780                    #include <sys/shm.h>
5781                    #include <sys/socket.h>
5782                    #include <netinet/in_systm.h>
5783                    #include <netinet/in.h>
5784                    #include <netinet/ip.h>
5785                    #include <netinet/ip_icmp.h>
5786                    #include <netinet/udp.h>
5787                    #include <arpa/inet.h>
5788                    #include <netdb.h>
5789 int
5790 main ()
5791 {
5792 struct icmphdr i;
5793                    struct sockaddr s;
5794                    struct sockaddr_in si;
5795                    struct ip ip;
5796                    i.type = ICMP_ECHO;
5797                    i.code = 0;
5798                    i.checksum = 0;
5799                    i.un.echo.id = 0;
5800                    i.un.echo.sequence = 0;
5801                    si.sin_family = AF_INET;
5802                    ip.ip_hl = 0;
5803   ;
5804   return 0;
5805 }
5806 _ACEOF
5807 rm -f conftest.$ac_objext
5808 if { (ac_try="$ac_compile"
5809 case "(($ac_try" in
5810   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5811   *) ac_try_echo=$ac_try;;
5812 esac
5813 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5814   (eval "$ac_compile") 2>conftest.er1
5815   ac_status=$?
5816   grep -v '^ *+' conftest.er1 >conftest.err
5817   rm -f conftest.er1
5818   cat conftest.err >&5
5819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820   (exit $ac_status); } && {
5821          test -z "$ac_c_werror_flag" ||
5822          test ! -s conftest.err
5823        } && test -s conftest.$ac_objext; then
5824   ac_cv_have_icmphdr=yes
5825 else
5826   echo "$as_me: failed program was:" >&5
5827 sed 's/^/| /' conftest.$ac_ext >&5
5828
5829         ac_cv_have_icmphdr=no
5830 fi
5831
5832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5833 fi
5834 { echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
5835 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6; }
5836  if test "$ac_cv_have_icmphdr" = yes ; then
5837    cat >>confdefs.h <<\_ACEOF
5838 #define HAVE_ICMPHDR 1
5839 _ACEOF
5840
5841  fi
5842
5843
5844 for ac_header in crypt.h sys/select.h
5845 do
5846 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5847 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5848   { echo "$as_me:$LINENO: checking for $ac_header" >&5
5849 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5850 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5851   echo $ECHO_N "(cached) $ECHO_C" >&6
5852 fi
5853 ac_res=`eval echo '${'$as_ac_Header'}'`
5854                { echo "$as_me:$LINENO: result: $ac_res" >&5
5855 echo "${ECHO_T}$ac_res" >&6; }
5856 else
5857   # Is the header compilable?
5858 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
5859 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5860 cat >conftest.$ac_ext <<_ACEOF
5861 /* confdefs.h.  */
5862 _ACEOF
5863 cat confdefs.h >>conftest.$ac_ext
5864 cat >>conftest.$ac_ext <<_ACEOF
5865 /* end confdefs.h.  */
5866 $ac_includes_default
5867 #include <$ac_header>
5868 _ACEOF
5869 rm -f conftest.$ac_objext
5870 if { (ac_try="$ac_compile"
5871 case "(($ac_try" in
5872   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5873   *) ac_try_echo=$ac_try;;
5874 esac
5875 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5876   (eval "$ac_compile") 2>conftest.er1
5877   ac_status=$?
5878   grep -v '^ *+' conftest.er1 >conftest.err
5879   rm -f conftest.er1
5880   cat conftest.err >&5
5881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5882   (exit $ac_status); } && {
5883          test -z "$ac_c_werror_flag" ||
5884          test ! -s conftest.err
5885        } && test -s conftest.$ac_objext; then
5886   ac_header_compiler=yes
5887 else
5888   echo "$as_me: failed program was:" >&5
5889 sed 's/^/| /' conftest.$ac_ext >&5
5890
5891         ac_header_compiler=no
5892 fi
5893
5894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5895 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5896 echo "${ECHO_T}$ac_header_compiler" >&6; }
5897
5898 # Is the header present?
5899 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
5900 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5901 cat >conftest.$ac_ext <<_ACEOF
5902 /* confdefs.h.  */
5903 _ACEOF
5904 cat confdefs.h >>conftest.$ac_ext
5905 cat >>conftest.$ac_ext <<_ACEOF
5906 /* end confdefs.h.  */
5907 #include <$ac_header>
5908 _ACEOF
5909 if { (ac_try="$ac_cpp conftest.$ac_ext"
5910 case "(($ac_try" in
5911   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5912   *) ac_try_echo=$ac_try;;
5913 esac
5914 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5915   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5916   ac_status=$?
5917   grep -v '^ *+' conftest.er1 >conftest.err
5918   rm -f conftest.er1
5919   cat conftest.err >&5
5920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5921   (exit $ac_status); } >/dev/null && {
5922          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5923          test ! -s conftest.err
5924        }; then
5925   ac_header_preproc=yes
5926 else
5927   echo "$as_me: failed program was:" >&5
5928 sed 's/^/| /' conftest.$ac_ext >&5
5929
5930   ac_header_preproc=no
5931 fi
5932
5933 rm -f conftest.err conftest.$ac_ext
5934 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5935 echo "${ECHO_T}$ac_header_preproc" >&6; }
5936
5937 # So?  What about this header?
5938 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5939   yes:no: )
5940     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5941 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5942     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5943 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5944     ac_header_preproc=yes
5945     ;;
5946   no:yes:* )
5947     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5948 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5949     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
5950 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
5951     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5952 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5953     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
5954 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
5955     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5956 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5957     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5958 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5959
5960     ;;
5961 esac
5962 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5963 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5964 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5965   echo $ECHO_N "(cached) $ECHO_C" >&6
5966 else
5967   eval "$as_ac_Header=\$ac_header_preproc"
5968 fi
5969 ac_res=`eval echo '${'$as_ac_Header'}'`
5970                { echo "$as_me:$LINENO: result: $ac_res" >&5
5971 echo "${ECHO_T}$ac_res" >&6; }
5972
5973 fi
5974 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5975   cat >>confdefs.h <<_ACEOF
5976 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5977 _ACEOF
5978
5979 fi
5980
5981 done
5982
5983 for ac_prog in perl5 perl
5984 do
5985   # Extract the first word of "$ac_prog", so it can be a program name with args.
5986 set dummy $ac_prog; ac_word=$2
5987 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5989 if test "${ac_cv_path_PERL+set}" = set; then
5990   echo $ECHO_N "(cached) $ECHO_C" >&6
5991 else
5992   case $PERL in
5993   [\\/]* | ?:[\\/]*)
5994   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5995   ;;
5996   *)
5997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5998 for as_dir in $PATH
5999 do
6000   IFS=$as_save_IFS
6001   test -z "$as_dir" && as_dir=.
6002   for ac_exec_ext in '' $ac_executable_extensions; do
6003   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6004     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6005     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6006     break 2
6007   fi
6008 done
6009 done
6010 IFS=$as_save_IFS
6011
6012   ;;
6013 esac
6014 fi
6015 PERL=$ac_cv_path_PERL
6016 if test -n "$PERL"; then
6017   { echo "$as_me:$LINENO: result: $PERL" >&5
6018 echo "${ECHO_T}$PERL" >&6; }
6019 else
6020   { echo "$as_me:$LINENO: result: no" >&5
6021 echo "${ECHO_T}no" >&6; }
6022 fi
6023
6024
6025   test -n "$PERL" && break
6026 done
6027
6028   if test -z "$PERL" ; then
6029     PERL_VERSION=0
6030   else
6031     { echo "$as_me:$LINENO: checking perl version" >&5
6032 echo $ECHO_N "checking perl version... $ECHO_C" >&6; }
6033 if test "${ac_cv_perl_version+set}" = set; then
6034   echo $ECHO_N "(cached) $ECHO_C" >&6
6035 else
6036   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6037 fi
6038 { echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6039 echo "${ECHO_T}$ac_cv_perl_version" >&6; }
6040     PERL_VERSION=$ac_cv_perl_version
6041   fi
6042
6043
6044 if test -z "$PERL" ; then
6045   # don't let it be blank...
6046   PERL=/usr/bin/perl
6047 fi
6048
6049 { echo "$as_me:$LINENO: checking for X" >&5
6050 echo $ECHO_N "checking for X... $ECHO_C" >&6; }
6051
6052
6053 # Check whether --with-x was given.
6054 if test "${with_x+set}" = set; then
6055   withval=$with_x;
6056 fi
6057
6058 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6059 if test "x$with_x" = xno; then
6060   # The user explicitly disabled X.
6061   have_x=disabled
6062 else
6063   case $x_includes,$x_libraries in #(
6064     *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
6065 echo "$as_me: error: Cannot use X directory names containing '" >&2;}
6066    { (exit 1); exit 1; }; };; #(
6067     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6068   echo $ECHO_N "(cached) $ECHO_C" >&6
6069 else
6070   # One or both of the vars are not set, and there is no cached value.
6071 ac_x_includes=no ac_x_libraries=no
6072 rm -f -r conftest.dir
6073 if mkdir conftest.dir; then
6074   cd conftest.dir
6075   cat >Imakefile <<'_ACEOF'
6076 incroot:
6077         @echo incroot='${INCROOT}'
6078 usrlibdir:
6079         @echo usrlibdir='${USRLIBDIR}'
6080 libdir:
6081         @echo libdir='${LIBDIR}'
6082 _ACEOF
6083   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6084     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6085     for ac_var in incroot usrlibdir libdir; do
6086       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6087     done
6088     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6089     for ac_extension in a so sl; do
6090       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6091          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6092         ac_im_usrlibdir=$ac_im_libdir; break
6093       fi
6094     done
6095     # Screen out bogus values from the imake configuration.  They are
6096     # bogus both because they are the default anyway, and because
6097     # using them would break gcc on systems where it needs fixed includes.
6098     case $ac_im_incroot in
6099         /usr/include) ac_x_includes= ;;
6100         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6101     esac
6102     case $ac_im_usrlibdir in
6103         /usr/lib | /lib) ;;
6104         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6105     esac
6106   fi
6107   cd ..
6108   rm -f -r conftest.dir
6109 fi
6110
6111 # Standard set of common directories for X headers.
6112 # Check X11 before X11Rn because it is often a symlink to the current release.
6113 ac_x_header_dirs='
6114 /usr/X11/include
6115 /usr/X11R6/include
6116 /usr/X11R5/include
6117 /usr/X11R4/include
6118
6119 /usr/include/X11
6120 /usr/include/X11R6
6121 /usr/include/X11R5
6122 /usr/include/X11R4
6123
6124 /usr/local/X11/include
6125 /usr/local/X11R6/include
6126 /usr/local/X11R5/include
6127 /usr/local/X11R4/include
6128
6129 /usr/local/include/X11
6130 /usr/local/include/X11R6
6131 /usr/local/include/X11R5
6132 /usr/local/include/X11R4
6133
6134 /usr/X386/include
6135 /usr/x386/include
6136 /usr/XFree86/include/X11
6137
6138 /usr/include
6139 /usr/local/include
6140 /usr/unsupported/include
6141 /usr/athena/include
6142 /usr/local/x11r5/include
6143 /usr/lpp/Xamples/include
6144
6145 /usr/openwin/include
6146 /usr/openwin/share/include'
6147
6148 if test "$ac_x_includes" = no; then
6149   # Guess where to find include files, by looking for Xlib.h.
6150   # First, try using that file with no special directory specified.
6151   cat >conftest.$ac_ext <<_ACEOF
6152 /* confdefs.h.  */
6153 _ACEOF
6154 cat confdefs.h >>conftest.$ac_ext
6155 cat >>conftest.$ac_ext <<_ACEOF
6156 /* end confdefs.h.  */
6157 #include <X11/Xlib.h>
6158 _ACEOF
6159 if { (ac_try="$ac_cpp conftest.$ac_ext"
6160 case "(($ac_try" in
6161   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6162   *) ac_try_echo=$ac_try;;
6163 esac
6164 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6165   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6166   ac_status=$?
6167   grep -v '^ *+' conftest.er1 >conftest.err
6168   rm -f conftest.er1
6169   cat conftest.err >&5
6170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6171   (exit $ac_status); } >/dev/null && {
6172          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6173          test ! -s conftest.err
6174        }; then
6175   # We can compile using X headers with no special include directory.
6176 ac_x_includes=
6177 else
6178   echo "$as_me: failed program was:" >&5
6179 sed 's/^/| /' conftest.$ac_ext >&5
6180
6181   for ac_dir in $ac_x_header_dirs; do
6182   if test -r "$ac_dir/X11/Xlib.h"; then
6183     ac_x_includes=$ac_dir
6184     break
6185   fi
6186 done
6187 fi
6188
6189 rm -f conftest.err conftest.$ac_ext
6190 fi # $ac_x_includes = no
6191
6192 if test "$ac_x_libraries" = no; then
6193   # Check for the libraries.
6194   # See if we find them without any special options.
6195   # Don't add to $LIBS permanently.
6196   ac_save_LIBS=$LIBS
6197   LIBS="-lX11 $LIBS"
6198   cat >conftest.$ac_ext <<_ACEOF
6199 /* confdefs.h.  */
6200 _ACEOF
6201 cat confdefs.h >>conftest.$ac_ext
6202 cat >>conftest.$ac_ext <<_ACEOF
6203 /* end confdefs.h.  */
6204 #include <X11/Xlib.h>
6205 int
6206 main ()
6207 {
6208 XrmInitialize ()
6209   ;
6210   return 0;
6211 }
6212 _ACEOF
6213 rm -f conftest.$ac_objext conftest$ac_exeext
6214 if { (ac_try="$ac_link"
6215 case "(($ac_try" in
6216   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6217   *) ac_try_echo=$ac_try;;
6218 esac
6219 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6220   (eval "$ac_link") 2>conftest.er1
6221   ac_status=$?
6222   grep -v '^ *+' conftest.er1 >conftest.err
6223   rm -f conftest.er1
6224   cat conftest.err >&5
6225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6226   (exit $ac_status); } && {
6227          test -z "$ac_c_werror_flag" ||
6228          test ! -s conftest.err
6229        } && test -s conftest$ac_exeext &&
6230        $as_test_x conftest$ac_exeext; then
6231   LIBS=$ac_save_LIBS
6232 # We can link X programs with no special library path.
6233 ac_x_libraries=
6234 else
6235   echo "$as_me: failed program was:" >&5
6236 sed 's/^/| /' conftest.$ac_ext >&5
6237
6238         LIBS=$ac_save_LIBS
6239 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6240 do
6241   # Don't even attempt the hair of trying to link an X program!
6242   for ac_extension in a so sl; do
6243     if test -r "$ac_dir/libX11.$ac_extension"; then
6244       ac_x_libraries=$ac_dir
6245       break 2
6246     fi
6247   done
6248 done
6249 fi
6250
6251 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6252       conftest$ac_exeext conftest.$ac_ext
6253 fi # $ac_x_libraries = no
6254
6255 case $ac_x_includes,$ac_x_libraries in #(
6256   no,* | *,no | *\'*)
6257     # Didn't find X, or a directory has "'" in its name.
6258     ac_cv_have_x="have_x=no";; #(
6259   *)
6260     # Record where we found X for the cache.
6261     ac_cv_have_x="have_x=yes\
6262         ac_x_includes='$ac_x_includes'\
6263         ac_x_libraries='$ac_x_libraries'"
6264 esac
6265 fi
6266 ;; #(
6267     *) have_x=yes;;
6268   esac
6269   eval "$ac_cv_have_x"
6270 fi # $with_x != no
6271
6272 if test "$have_x" != yes; then
6273   { echo "$as_me:$LINENO: result: $have_x" >&5
6274 echo "${ECHO_T}$have_x" >&6; }
6275   no_x=yes
6276 else
6277   # If each of the values was on the command line, it overrides each guess.
6278   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6279   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6280   # Update the cache value to reflect the command line values.
6281   ac_cv_have_x="have_x=yes\
6282         ac_x_includes='$x_includes'\
6283         ac_x_libraries='$x_libraries'"
6284   { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6285 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
6286 fi
6287
6288 if test "$no_x" = yes; then
6289   # Not all programs may use this symbol, but it does not hurt to define it.
6290
6291 cat >>confdefs.h <<\_ACEOF
6292 #define X_DISPLAY_MISSING 1
6293 _ACEOF
6294
6295   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6296 else
6297   if test -n "$x_includes"; then
6298     X_CFLAGS="$X_CFLAGS -I$x_includes"
6299   fi
6300
6301   # It would also be nice to do this for all -L options, not just this one.
6302   if test -n "$x_libraries"; then
6303     X_LIBS="$X_LIBS -L$x_libraries"
6304     # For Solaris; some versions of Sun CC require a space after -R and
6305     # others require no space.  Words are not sufficient . . . .
6306     { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6307 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
6308     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6309     ac_xsave_c_werror_flag=$ac_c_werror_flag
6310     ac_c_werror_flag=yes
6311     cat >conftest.$ac_ext <<_ACEOF
6312 /* confdefs.h.  */
6313 _ACEOF
6314 cat confdefs.h >>conftest.$ac_ext
6315 cat >>conftest.$ac_ext <<_ACEOF
6316 /* end confdefs.h.  */
6317
6318 int
6319 main ()
6320 {
6321
6322   ;
6323   return 0;
6324 }
6325 _ACEOF
6326 rm -f conftest.$ac_objext conftest$ac_exeext
6327 if { (ac_try="$ac_link"
6328 case "(($ac_try" in
6329   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6330   *) ac_try_echo=$ac_try;;
6331 esac
6332 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6333   (eval "$ac_link") 2>conftest.er1
6334   ac_status=$?
6335   grep -v '^ *+' conftest.er1 >conftest.err
6336   rm -f conftest.er1
6337   cat conftest.err >&5
6338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6339   (exit $ac_status); } && {
6340          test -z "$ac_c_werror_flag" ||
6341          test ! -s conftest.err
6342        } && test -s conftest$ac_exeext &&
6343        $as_test_x conftest$ac_exeext; then
6344   { echo "$as_me:$LINENO: result: no" >&5
6345 echo "${ECHO_T}no" >&6; }
6346        X_LIBS="$X_LIBS -R$x_libraries"
6347 else
6348   echo "$as_me: failed program was:" >&5
6349 sed 's/^/| /' conftest.$ac_ext >&5
6350
6351         LIBS="$ac_xsave_LIBS -R $x_libraries"
6352        cat >conftest.$ac_ext <<_ACEOF
6353 /* confdefs.h.  */
6354 _ACEOF
6355 cat confdefs.h >>conftest.$ac_ext
6356 cat >>conftest.$ac_ext <<_ACEOF
6357 /* end confdefs.h.  */
6358
6359 int
6360 main ()
6361 {
6362
6363   ;
6364   return 0;
6365 }
6366 _ACEOF
6367 rm -f conftest.$ac_objext conftest$ac_exeext
6368 if { (ac_try="$ac_link"
6369 case "(($ac_try" in
6370   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6371   *) ac_try_echo=$ac_try;;
6372 esac
6373 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6374   (eval "$ac_link") 2>conftest.er1
6375   ac_status=$?
6376   grep -v '^ *+' conftest.er1 >conftest.err
6377   rm -f conftest.er1
6378   cat conftest.err >&5
6379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6380   (exit $ac_status); } && {
6381          test -z "$ac_c_werror_flag" ||
6382          test ! -s conftest.err
6383        } && test -s conftest$ac_exeext &&
6384        $as_test_x conftest$ac_exeext; then
6385   { echo "$as_me:$LINENO: result: yes" >&5
6386 echo "${ECHO_T}yes" >&6; }
6387           X_LIBS="$X_LIBS -R $x_libraries"
6388 else
6389   echo "$as_me: failed program was:" >&5
6390 sed 's/^/| /' conftest.$ac_ext >&5
6391
6392         { echo "$as_me:$LINENO: result: neither works" >&5
6393 echo "${ECHO_T}neither works" >&6; }
6394 fi
6395
6396 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6397       conftest$ac_exeext conftest.$ac_ext
6398 fi
6399
6400 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6401       conftest$ac_exeext conftest.$ac_ext
6402     ac_c_werror_flag=$ac_xsave_c_werror_flag
6403     LIBS=$ac_xsave_LIBS
6404   fi
6405
6406   # Check for system-dependent libraries X programs must link with.
6407   # Do this before checking for the system-independent R6 libraries
6408   # (-lICE), since we may need -lsocket or whatever for X linking.
6409
6410   if test "$ISC" = yes; then
6411     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6412   else
6413     # Martyn Johnson says this is needed for Ultrix, if the X
6414     # libraries were built with DECnet support.  And Karl Berry says
6415     # the Alpha needs dnet_stub (dnet does not exist).
6416     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6417     cat >conftest.$ac_ext <<_ACEOF
6418 /* confdefs.h.  */
6419 _ACEOF
6420 cat confdefs.h >>conftest.$ac_ext
6421 cat >>conftest.$ac_ext <<_ACEOF
6422 /* end confdefs.h.  */
6423
6424 /* Override any GCC internal prototype to avoid an error.
6425    Use char because int might match the return type of a GCC
6426    builtin and then its argument prototype would still apply.  */
6427 #ifdef __cplusplus
6428 extern "C"
6429 #endif
6430 char XOpenDisplay ();
6431 int
6432 main ()
6433 {
6434 return XOpenDisplay ();
6435   ;
6436   return 0;
6437 }
6438 _ACEOF
6439 rm -f conftest.$ac_objext conftest$ac_exeext
6440 if { (ac_try="$ac_link"
6441 case "(($ac_try" in
6442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6443   *) ac_try_echo=$ac_try;;
6444 esac
6445 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6446   (eval "$ac_link") 2>conftest.er1
6447   ac_status=$?
6448   grep -v '^ *+' conftest.er1 >conftest.err
6449   rm -f conftest.er1
6450   cat conftest.err >&5
6451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6452   (exit $ac_status); } && {
6453          test -z "$ac_c_werror_flag" ||
6454          test ! -s conftest.err
6455        } && test -s conftest$ac_exeext &&
6456        $as_test_x conftest$ac_exeext; then
6457   :
6458 else
6459   echo "$as_me: failed program was:" >&5
6460 sed 's/^/| /' conftest.$ac_ext >&5
6461
6462         { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6463 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
6464 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6465   echo $ECHO_N "(cached) $ECHO_C" >&6
6466 else
6467   ac_check_lib_save_LIBS=$LIBS
6468 LIBS="-ldnet  $LIBS"
6469 cat >conftest.$ac_ext <<_ACEOF
6470 /* confdefs.h.  */
6471 _ACEOF
6472 cat confdefs.h >>conftest.$ac_ext
6473 cat >>conftest.$ac_ext <<_ACEOF
6474 /* end confdefs.h.  */
6475
6476 /* Override any GCC internal prototype to avoid an error.
6477    Use char because int might match the return type of a GCC
6478    builtin and then its argument prototype would still apply.  */
6479 #ifdef __cplusplus
6480 extern "C"
6481 #endif
6482 char dnet_ntoa ();
6483 int
6484 main ()
6485 {
6486 return dnet_ntoa ();
6487   ;
6488   return 0;
6489 }
6490 _ACEOF
6491 rm -f conftest.$ac_objext conftest$ac_exeext
6492 if { (ac_try="$ac_link"
6493 case "(($ac_try" in
6494   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6495   *) ac_try_echo=$ac_try;;
6496 esac
6497 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6498   (eval "$ac_link") 2>conftest.er1
6499   ac_status=$?
6500   grep -v '^ *+' conftest.er1 >conftest.err
6501   rm -f conftest.er1
6502   cat conftest.err >&5
6503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6504   (exit $ac_status); } && {
6505          test -z "$ac_c_werror_flag" ||
6506          test ! -s conftest.err
6507        } && test -s conftest$ac_exeext &&
6508        $as_test_x conftest$ac_exeext; then
6509   ac_cv_lib_dnet_dnet_ntoa=yes
6510 else
6511   echo "$as_me: failed program was:" >&5
6512 sed 's/^/| /' conftest.$ac_ext >&5
6513
6514         ac_cv_lib_dnet_dnet_ntoa=no
6515 fi
6516
6517 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6518       conftest$ac_exeext conftest.$ac_ext
6519 LIBS=$ac_check_lib_save_LIBS
6520 fi
6521 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6522 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6523 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6524   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6525 fi
6526
6527     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6528       { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6529 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
6530 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6531   echo $ECHO_N "(cached) $ECHO_C" >&6
6532 else
6533   ac_check_lib_save_LIBS=$LIBS
6534 LIBS="-ldnet_stub  $LIBS"
6535 cat >conftest.$ac_ext <<_ACEOF
6536 /* confdefs.h.  */
6537 _ACEOF
6538 cat confdefs.h >>conftest.$ac_ext
6539 cat >>conftest.$ac_ext <<_ACEOF
6540 /* end confdefs.h.  */
6541
6542 /* Override any GCC internal prototype to avoid an error.
6543    Use char because int might match the return type of a GCC
6544    builtin and then its argument prototype would still apply.  */
6545 #ifdef __cplusplus
6546 extern "C"
6547 #endif
6548 char dnet_ntoa ();
6549 int
6550 main ()
6551 {
6552 return dnet_ntoa ();
6553   ;
6554   return 0;
6555 }
6556 _ACEOF
6557 rm -f conftest.$ac_objext conftest$ac_exeext
6558 if { (ac_try="$ac_link"
6559 case "(($ac_try" in
6560   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6561   *) ac_try_echo=$ac_try;;
6562 esac
6563 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6564   (eval "$ac_link") 2>conftest.er1
6565   ac_status=$?
6566   grep -v '^ *+' conftest.er1 >conftest.err
6567   rm -f conftest.er1
6568   cat conftest.err >&5
6569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6570   (exit $ac_status); } && {
6571          test -z "$ac_c_werror_flag" ||
6572          test ! -s conftest.err
6573        } && test -s conftest$ac_exeext &&
6574        $as_test_x conftest$ac_exeext; then
6575   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6576 else
6577   echo "$as_me: failed program was:" >&5
6578 sed 's/^/| /' conftest.$ac_ext >&5
6579
6580         ac_cv_lib_dnet_stub_dnet_ntoa=no
6581 fi
6582
6583 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6584       conftest$ac_exeext conftest.$ac_ext
6585 LIBS=$ac_check_lib_save_LIBS
6586 fi
6587 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6588 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6589 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
6590   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6591 fi
6592
6593     fi
6594 fi
6595
6596 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6597       conftest$ac_exeext conftest.$ac_ext
6598     LIBS="$ac_xsave_LIBS"
6599
6600     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6601     # to get the SysV transport functions.
6602     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6603     # needs -lnsl.
6604     # The nsl library prevents programs from opening the X display
6605     # on Irix 5.2, according to T.E. Dickey.
6606     # The functions gethostbyname, getservbyname, and inet_addr are
6607     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6608     { echo "$as_me:$LINENO: checking for gethostbyname" >&5
6609 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
6610 if test "${ac_cv_func_gethostbyname+set}" = set; then
6611   echo $ECHO_N "(cached) $ECHO_C" >&6
6612 else
6613   cat >conftest.$ac_ext <<_ACEOF
6614 /* confdefs.h.  */
6615 _ACEOF
6616 cat confdefs.h >>conftest.$ac_ext
6617 cat >>conftest.$ac_ext <<_ACEOF
6618 /* end confdefs.h.  */
6619 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6620    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6621 #define gethostbyname innocuous_gethostbyname
6622
6623 /* System header to define __stub macros and hopefully few prototypes,
6624     which can conflict with char gethostbyname (); below.
6625     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6626     <limits.h> exists even on freestanding compilers.  */
6627
6628 #ifdef __STDC__
6629 # include <limits.h>
6630 #else
6631 # include <assert.h>
6632 #endif
6633
6634 #undef gethostbyname
6635
6636 /* Override any GCC internal prototype to avoid an error.
6637    Use char because int might match the return type of a GCC
6638    builtin and then its argument prototype would still apply.  */
6639 #ifdef __cplusplus
6640 extern "C"
6641 #endif
6642 char gethostbyname ();
6643 /* The GNU C library defines this for functions which it implements
6644     to always fail with ENOSYS.  Some functions are actually named
6645     something starting with __ and the normal name is an alias.  */
6646 #if defined __stub_gethostbyname || defined __stub___gethostbyname
6647 choke me
6648 #endif
6649
6650 int
6651 main ()
6652 {
6653 return gethostbyname ();
6654   ;
6655   return 0;
6656 }
6657 _ACEOF
6658 rm -f conftest.$ac_objext conftest$ac_exeext
6659 if { (ac_try="$ac_link"
6660 case "(($ac_try" in
6661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6662   *) ac_try_echo=$ac_try;;
6663 esac
6664 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6665   (eval "$ac_link") 2>conftest.er1
6666   ac_status=$?
6667   grep -v '^ *+' conftest.er1 >conftest.err
6668   rm -f conftest.er1
6669   cat conftest.err >&5
6670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6671   (exit $ac_status); } && {
6672          test -z "$ac_c_werror_flag" ||
6673          test ! -s conftest.err
6674        } && test -s conftest$ac_exeext &&
6675        $as_test_x conftest$ac_exeext; then
6676   ac_cv_func_gethostbyname=yes
6677 else
6678   echo "$as_me: failed program was:" >&5
6679 sed 's/^/| /' conftest.$ac_ext >&5
6680
6681         ac_cv_func_gethostbyname=no
6682 fi
6683
6684 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6685       conftest$ac_exeext conftest.$ac_ext
6686 fi
6687 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6688 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
6689
6690     if test $ac_cv_func_gethostbyname = no; then
6691       { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6692 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
6693 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6694   echo $ECHO_N "(cached) $ECHO_C" >&6
6695 else
6696   ac_check_lib_save_LIBS=$LIBS
6697 LIBS="-lnsl  $LIBS"
6698 cat >conftest.$ac_ext <<_ACEOF
6699 /* confdefs.h.  */
6700 _ACEOF
6701 cat confdefs.h >>conftest.$ac_ext
6702 cat >>conftest.$ac_ext <<_ACEOF
6703 /* end confdefs.h.  */
6704
6705 /* Override any GCC internal prototype to avoid an error.
6706    Use char because int might match the return type of a GCC
6707    builtin and then its argument prototype would still apply.  */
6708 #ifdef __cplusplus
6709 extern "C"
6710 #endif
6711 char gethostbyname ();
6712 int
6713 main ()
6714 {
6715 return gethostbyname ();
6716   ;
6717   return 0;
6718 }
6719 _ACEOF
6720 rm -f conftest.$ac_objext conftest$ac_exeext
6721 if { (ac_try="$ac_link"
6722 case "(($ac_try" in
6723   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6724   *) ac_try_echo=$ac_try;;
6725 esac
6726 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6727   (eval "$ac_link") 2>conftest.er1
6728   ac_status=$?
6729   grep -v '^ *+' conftest.er1 >conftest.err
6730   rm -f conftest.er1
6731   cat conftest.err >&5
6732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6733   (exit $ac_status); } && {
6734          test -z "$ac_c_werror_flag" ||
6735          test ! -s conftest.err
6736        } && test -s conftest$ac_exeext &&
6737        $as_test_x conftest$ac_exeext; then
6738   ac_cv_lib_nsl_gethostbyname=yes
6739 else
6740   echo "$as_me: failed program was:" >&5
6741 sed 's/^/| /' conftest.$ac_ext >&5
6742
6743         ac_cv_lib_nsl_gethostbyname=no
6744 fi
6745
6746 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6747       conftest$ac_exeext conftest.$ac_ext
6748 LIBS=$ac_check_lib_save_LIBS
6749 fi
6750 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6751 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
6752 if test $ac_cv_lib_nsl_gethostbyname = yes; then
6753   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6754 fi
6755
6756       if test $ac_cv_lib_nsl_gethostbyname = no; then
6757         { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
6758 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
6759 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6760   echo $ECHO_N "(cached) $ECHO_C" >&6
6761 else
6762   ac_check_lib_save_LIBS=$LIBS
6763 LIBS="-lbsd  $LIBS"
6764 cat >conftest.$ac_ext <<_ACEOF
6765 /* confdefs.h.  */
6766 _ACEOF
6767 cat confdefs.h >>conftest.$ac_ext
6768 cat >>conftest.$ac_ext <<_ACEOF
6769 /* end confdefs.h.  */
6770
6771 /* Override any GCC internal prototype to avoid an error.
6772    Use char because int might match the return type of a GCC
6773    builtin and then its argument prototype would still apply.  */
6774 #ifdef __cplusplus
6775 extern "C"
6776 #endif
6777 char gethostbyname ();
6778 int
6779 main ()
6780 {
6781 return gethostbyname ();
6782   ;
6783   return 0;
6784 }
6785 _ACEOF
6786 rm -f conftest.$ac_objext conftest$ac_exeext
6787 if { (ac_try="$ac_link"
6788 case "(($ac_try" in
6789   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6790   *) ac_try_echo=$ac_try;;
6791 esac
6792 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6793   (eval "$ac_link") 2>conftest.er1
6794   ac_status=$?
6795   grep -v '^ *+' conftest.er1 >conftest.err
6796   rm -f conftest.er1
6797   cat conftest.err >&5
6798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6799   (exit $ac_status); } && {
6800          test -z "$ac_c_werror_flag" ||
6801          test ! -s conftest.err
6802        } && test -s conftest$ac_exeext &&
6803        $as_test_x conftest$ac_exeext; then
6804   ac_cv_lib_bsd_gethostbyname=yes
6805 else
6806   echo "$as_me: failed program was:" >&5
6807 sed 's/^/| /' conftest.$ac_ext >&5
6808
6809         ac_cv_lib_bsd_gethostbyname=no
6810 fi
6811
6812 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6813       conftest$ac_exeext conftest.$ac_ext
6814 LIBS=$ac_check_lib_save_LIBS
6815 fi
6816 { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6817 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
6818 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6819   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6820 fi
6821
6822       fi
6823     fi
6824
6825     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6826     # socket/setsockopt and other routines are undefined under SCO ODT
6827     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6828     # on later versions), says Simon Leinen: it contains gethostby*
6829     # variants that don't use the name server (or something).  -lsocket
6830     # must be given before -lnsl if both are needed.  We assume that
6831     # if connect needs -lnsl, so does gethostbyname.
6832     { echo "$as_me:$LINENO: checking for connect" >&5
6833 echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
6834 if test "${ac_cv_func_connect+set}" = set; then
6835   echo $ECHO_N "(cached) $ECHO_C" >&6
6836 else
6837   cat >conftest.$ac_ext <<_ACEOF
6838 /* confdefs.h.  */
6839 _ACEOF
6840 cat confdefs.h >>conftest.$ac_ext
6841 cat >>conftest.$ac_ext <<_ACEOF
6842 /* end confdefs.h.  */
6843 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6844    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6845 #define connect innocuous_connect
6846
6847 /* System header to define __stub macros and hopefully few prototypes,
6848     which can conflict with char connect (); below.
6849     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6850     <limits.h> exists even on freestanding compilers.  */
6851
6852 #ifdef __STDC__
6853 # include <limits.h>
6854 #else
6855 # include <assert.h>
6856 #endif
6857
6858 #undef connect
6859
6860 /* Override any GCC internal prototype to avoid an error.
6861    Use char because int might match the return type of a GCC
6862    builtin and then its argument prototype would still apply.  */
6863 #ifdef __cplusplus
6864 extern "C"
6865 #endif
6866 char connect ();
6867 /* The GNU C library defines this for functions which it implements
6868     to always fail with ENOSYS.  Some functions are actually named
6869     something starting with __ and the normal name is an alias.  */
6870 #if defined __stub_connect || defined __stub___connect
6871 choke me
6872 #endif
6873
6874 int
6875 main ()
6876 {
6877 return connect ();
6878   ;
6879   return 0;
6880 }
6881 _ACEOF
6882 rm -f conftest.$ac_objext conftest$ac_exeext
6883 if { (ac_try="$ac_link"
6884 case "(($ac_try" in
6885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6886   *) ac_try_echo=$ac_try;;
6887 esac
6888 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6889   (eval "$ac_link") 2>conftest.er1
6890   ac_status=$?
6891   grep -v '^ *+' conftest.er1 >conftest.err
6892   rm -f conftest.er1
6893   cat conftest.err >&5
6894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6895   (exit $ac_status); } && {
6896          test -z "$ac_c_werror_flag" ||
6897          test ! -s conftest.err
6898        } && test -s conftest$ac_exeext &&
6899        $as_test_x conftest$ac_exeext; then
6900   ac_cv_func_connect=yes
6901 else
6902   echo "$as_me: failed program was:" >&5
6903 sed 's/^/| /' conftest.$ac_ext >&5
6904
6905         ac_cv_func_connect=no
6906 fi
6907
6908 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6909       conftest$ac_exeext conftest.$ac_ext
6910 fi
6911 { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6912 echo "${ECHO_T}$ac_cv_func_connect" >&6; }
6913
6914     if test $ac_cv_func_connect = no; then
6915       { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6916 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
6917 if test "${ac_cv_lib_socket_connect+set}" = set; then
6918   echo $ECHO_N "(cached) $ECHO_C" >&6
6919 else
6920   ac_check_lib_save_LIBS=$LIBS
6921 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6922 cat >conftest.$ac_ext <<_ACEOF
6923 /* confdefs.h.  */
6924 _ACEOF
6925 cat confdefs.h >>conftest.$ac_ext
6926 cat >>conftest.$ac_ext <<_ACEOF
6927 /* end confdefs.h.  */
6928
6929 /* Override any GCC internal prototype to avoid an error.
6930    Use char because int might match the return type of a GCC
6931    builtin and then its argument prototype would still apply.  */
6932 #ifdef __cplusplus
6933 extern "C"
6934 #endif
6935 char connect ();
6936 int
6937 main ()
6938 {
6939 return connect ();
6940   ;
6941   return 0;
6942 }
6943 _ACEOF
6944 rm -f conftest.$ac_objext conftest$ac_exeext
6945 if { (ac_try="$ac_link"
6946 case "(($ac_try" in
6947   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6948   *) ac_try_echo=$ac_try;;
6949 esac
6950 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6951   (eval "$ac_link") 2>conftest.er1
6952   ac_status=$?
6953   grep -v '^ *+' conftest.er1 >conftest.err
6954   rm -f conftest.er1
6955   cat conftest.err >&5
6956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6957   (exit $ac_status); } && {
6958          test -z "$ac_c_werror_flag" ||
6959          test ! -s conftest.err
6960        } && test -s conftest$ac_exeext &&
6961        $as_test_x conftest$ac_exeext; then
6962   ac_cv_lib_socket_connect=yes
6963 else
6964   echo "$as_me: failed program was:" >&5
6965 sed 's/^/| /' conftest.$ac_ext >&5
6966
6967         ac_cv_lib_socket_connect=no
6968 fi
6969
6970 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6971       conftest$ac_exeext conftest.$ac_ext
6972 LIBS=$ac_check_lib_save_LIBS
6973 fi
6974 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
6975 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
6976 if test $ac_cv_lib_socket_connect = yes; then
6977   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6978 fi
6979
6980     fi
6981
6982     # Guillermo Gomez says -lposix is necessary on A/UX.
6983     { echo "$as_me:$LINENO: checking for remove" >&5
6984 echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
6985 if test "${ac_cv_func_remove+set}" = set; then
6986   echo $ECHO_N "(cached) $ECHO_C" >&6
6987 else
6988   cat >conftest.$ac_ext <<_ACEOF
6989 /* confdefs.h.  */
6990 _ACEOF
6991 cat confdefs.h >>conftest.$ac_ext
6992 cat >>conftest.$ac_ext <<_ACEOF
6993 /* end confdefs.h.  */
6994 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
6995    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6996 #define remove innocuous_remove
6997
6998 /* System header to define __stub macros and hopefully few prototypes,
6999     which can conflict with char remove (); below.
7000     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7001     <limits.h> exists even on freestanding compilers.  */
7002
7003 #ifdef __STDC__
7004 # include <limits.h>
7005 #else
7006 # include <assert.h>
7007 #endif
7008
7009 #undef remove
7010
7011 /* Override any GCC internal prototype to avoid an error.
7012    Use char because int might match the return type of a GCC
7013    builtin and then its argument prototype would still apply.  */
7014 #ifdef __cplusplus
7015 extern "C"
7016 #endif
7017 char remove ();
7018 /* The GNU C library defines this for functions which it implements
7019     to always fail with ENOSYS.  Some functions are actually named
7020     something starting with __ and the normal name is an alias.  */
7021 #if defined __stub_remove || defined __stub___remove
7022 choke me
7023 #endif
7024
7025 int
7026 main ()
7027 {
7028 return remove ();
7029   ;
7030   return 0;
7031 }
7032 _ACEOF
7033 rm -f conftest.$ac_objext conftest$ac_exeext
7034 if { (ac_try="$ac_link"
7035 case "(($ac_try" in
7036   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7037   *) ac_try_echo=$ac_try;;
7038 esac
7039 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7040   (eval "$ac_link") 2>conftest.er1
7041   ac_status=$?
7042   grep -v '^ *+' conftest.er1 >conftest.err
7043   rm -f conftest.er1
7044   cat conftest.err >&5
7045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7046   (exit $ac_status); } && {
7047          test -z "$ac_c_werror_flag" ||
7048          test ! -s conftest.err
7049        } && test -s conftest$ac_exeext &&
7050        $as_test_x conftest$ac_exeext; then
7051   ac_cv_func_remove=yes
7052 else
7053   echo "$as_me: failed program was:" >&5
7054 sed 's/^/| /' conftest.$ac_ext >&5
7055
7056         ac_cv_func_remove=no
7057 fi
7058
7059 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7060       conftest$ac_exeext conftest.$ac_ext
7061 fi
7062 { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7063 echo "${ECHO_T}$ac_cv_func_remove" >&6; }
7064
7065     if test $ac_cv_func_remove = no; then
7066       { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7067 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
7068 if test "${ac_cv_lib_posix_remove+set}" = set; then
7069   echo $ECHO_N "(cached) $ECHO_C" >&6
7070 else
7071   ac_check_lib_save_LIBS=$LIBS
7072 LIBS="-lposix  $LIBS"
7073 cat >conftest.$ac_ext <<_ACEOF
7074 /* confdefs.h.  */
7075 _ACEOF
7076 cat confdefs.h >>conftest.$ac_ext
7077 cat >>conftest.$ac_ext <<_ACEOF
7078 /* end confdefs.h.  */
7079
7080 /* Override any GCC internal prototype to avoid an error.
7081    Use char because int might match the return type of a GCC
7082    builtin and then its argument prototype would still apply.  */
7083 #ifdef __cplusplus
7084 extern "C"
7085 #endif
7086 char remove ();
7087 int
7088 main ()
7089 {
7090 return remove ();
7091   ;
7092   return 0;
7093 }
7094 _ACEOF
7095 rm -f conftest.$ac_objext conftest$ac_exeext
7096 if { (ac_try="$ac_link"
7097 case "(($ac_try" in
7098   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7099   *) ac_try_echo=$ac_try;;
7100 esac
7101 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7102   (eval "$ac_link") 2>conftest.er1
7103   ac_status=$?
7104   grep -v '^ *+' conftest.er1 >conftest.err
7105   rm -f conftest.er1
7106   cat conftest.err >&5
7107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7108   (exit $ac_status); } && {
7109          test -z "$ac_c_werror_flag" ||
7110          test ! -s conftest.err
7111        } && test -s conftest$ac_exeext &&
7112        $as_test_x conftest$ac_exeext; then
7113   ac_cv_lib_posix_remove=yes
7114 else
7115   echo "$as_me: failed program was:" >&5
7116 sed 's/^/| /' conftest.$ac_ext >&5
7117
7118         ac_cv_lib_posix_remove=no
7119 fi
7120
7121 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7122       conftest$ac_exeext conftest.$ac_ext
7123 LIBS=$ac_check_lib_save_LIBS
7124 fi
7125 { echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7126 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
7127 if test $ac_cv_lib_posix_remove = yes; then
7128   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7129 fi
7130
7131     fi
7132
7133     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7134     { echo "$as_me:$LINENO: checking for shmat" >&5
7135 echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
7136 if test "${ac_cv_func_shmat+set}" = set; then
7137   echo $ECHO_N "(cached) $ECHO_C" >&6
7138 else
7139   cat >conftest.$ac_ext <<_ACEOF
7140 /* confdefs.h.  */
7141 _ACEOF
7142 cat confdefs.h >>conftest.$ac_ext
7143 cat >>conftest.$ac_ext <<_ACEOF
7144 /* end confdefs.h.  */
7145 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7146    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7147 #define shmat innocuous_shmat
7148
7149 /* System header to define __stub macros and hopefully few prototypes,
7150     which can conflict with char shmat (); below.
7151     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7152     <limits.h> exists even on freestanding compilers.  */
7153
7154 #ifdef __STDC__
7155 # include <limits.h>
7156 #else
7157 # include <assert.h>
7158 #endif
7159
7160 #undef shmat
7161
7162 /* Override any GCC internal prototype to avoid an error.
7163    Use char because int might match the return type of a GCC
7164    builtin and then its argument prototype would still apply.  */
7165 #ifdef __cplusplus
7166 extern "C"
7167 #endif
7168 char shmat ();
7169 /* The GNU C library defines this for functions which it implements
7170     to always fail with ENOSYS.  Some functions are actually named
7171     something starting with __ and the normal name is an alias.  */
7172 #if defined __stub_shmat || defined __stub___shmat
7173 choke me
7174 #endif
7175
7176 int
7177 main ()
7178 {
7179 return shmat ();
7180   ;
7181   return 0;
7182 }
7183 _ACEOF
7184 rm -f conftest.$ac_objext conftest$ac_exeext
7185 if { (ac_try="$ac_link"
7186 case "(($ac_try" in
7187   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7188   *) ac_try_echo=$ac_try;;
7189 esac
7190 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7191   (eval "$ac_link") 2>conftest.er1
7192   ac_status=$?
7193   grep -v '^ *+' conftest.er1 >conftest.err
7194   rm -f conftest.er1
7195   cat conftest.err >&5
7196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7197   (exit $ac_status); } && {
7198          test -z "$ac_c_werror_flag" ||
7199          test ! -s conftest.err
7200        } && test -s conftest$ac_exeext &&
7201        $as_test_x conftest$ac_exeext; then
7202   ac_cv_func_shmat=yes
7203 else
7204   echo "$as_me: failed program was:" >&5
7205 sed 's/^/| /' conftest.$ac_ext >&5
7206
7207         ac_cv_func_shmat=no
7208 fi
7209
7210 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7211       conftest$ac_exeext conftest.$ac_ext
7212 fi
7213 { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7214 echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
7215
7216     if test $ac_cv_func_shmat = no; then
7217       { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7218 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
7219 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7220   echo $ECHO_N "(cached) $ECHO_C" >&6
7221 else
7222   ac_check_lib_save_LIBS=$LIBS
7223 LIBS="-lipc  $LIBS"
7224 cat >conftest.$ac_ext <<_ACEOF
7225 /* confdefs.h.  */
7226 _ACEOF
7227 cat confdefs.h >>conftest.$ac_ext
7228 cat >>conftest.$ac_ext <<_ACEOF
7229 /* end confdefs.h.  */
7230
7231 /* Override any GCC internal prototype to avoid an error.
7232    Use char because int might match the return type of a GCC
7233    builtin and then its argument prototype would still apply.  */
7234 #ifdef __cplusplus
7235 extern "C"
7236 #endif
7237 char shmat ();
7238 int
7239 main ()
7240 {
7241 return shmat ();
7242   ;
7243   return 0;
7244 }
7245 _ACEOF
7246 rm -f conftest.$ac_objext conftest$ac_exeext
7247 if { (ac_try="$ac_link"
7248 case "(($ac_try" in
7249   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7250   *) ac_try_echo=$ac_try;;
7251 esac
7252 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7253   (eval "$ac_link") 2>conftest.er1
7254   ac_status=$?
7255   grep -v '^ *+' conftest.er1 >conftest.err
7256   rm -f conftest.er1
7257   cat conftest.err >&5
7258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7259   (exit $ac_status); } && {
7260          test -z "$ac_c_werror_flag" ||
7261          test ! -s conftest.err
7262        } && test -s conftest$ac_exeext &&
7263        $as_test_x conftest$ac_exeext; then
7264   ac_cv_lib_ipc_shmat=yes
7265 else
7266   echo "$as_me: failed program was:" >&5
7267 sed 's/^/| /' conftest.$ac_ext >&5
7268
7269         ac_cv_lib_ipc_shmat=no
7270 fi
7271
7272 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7273       conftest$ac_exeext conftest.$ac_ext
7274 LIBS=$ac_check_lib_save_LIBS
7275 fi
7276 { echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7277 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
7278 if test $ac_cv_lib_ipc_shmat = yes; then
7279   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7280 fi
7281
7282     fi
7283   fi
7284
7285   # Check for libraries that X11R6 Xt/Xaw programs need.
7286   ac_save_LDFLAGS=$LDFLAGS
7287   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7288   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7289   # check for ICE first), but we must link in the order -lSM -lICE or
7290   # we get undefined symbols.  So assume we have SM if we have ICE.
7291   # These have to be linked with before -lX11, unlike the other
7292   # libraries we check for below, so use a different variable.
7293   # John Interrante, Karl Berry
7294   { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7295 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
7296 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7297   echo $ECHO_N "(cached) $ECHO_C" >&6
7298 else
7299   ac_check_lib_save_LIBS=$LIBS
7300 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7301 cat >conftest.$ac_ext <<_ACEOF
7302 /* confdefs.h.  */
7303 _ACEOF
7304 cat confdefs.h >>conftest.$ac_ext
7305 cat >>conftest.$ac_ext <<_ACEOF
7306 /* end confdefs.h.  */
7307
7308 /* Override any GCC internal prototype to avoid an error.
7309    Use char because int might match the return type of a GCC
7310    builtin and then its argument prototype would still apply.  */
7311 #ifdef __cplusplus
7312 extern "C"
7313 #endif
7314 char IceConnectionNumber ();
7315 int
7316 main ()
7317 {
7318 return IceConnectionNumber ();
7319   ;
7320   return 0;
7321 }
7322 _ACEOF
7323 rm -f conftest.$ac_objext conftest$ac_exeext
7324 if { (ac_try="$ac_link"
7325 case "(($ac_try" in
7326   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7327   *) ac_try_echo=$ac_try;;
7328 esac
7329 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7330   (eval "$ac_link") 2>conftest.er1
7331   ac_status=$?
7332   grep -v '^ *+' conftest.er1 >conftest.err
7333   rm -f conftest.er1
7334   cat conftest.err >&5
7335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7336   (exit $ac_status); } && {
7337          test -z "$ac_c_werror_flag" ||
7338          test ! -s conftest.err
7339        } && test -s conftest$ac_exeext &&
7340        $as_test_x conftest$ac_exeext; then
7341   ac_cv_lib_ICE_IceConnectionNumber=yes
7342 else
7343   echo "$as_me: failed program was:" >&5
7344 sed 's/^/| /' conftest.$ac_ext >&5
7345
7346         ac_cv_lib_ICE_IceConnectionNumber=no
7347 fi
7348
7349 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7350       conftest$ac_exeext conftest.$ac_ext
7351 LIBS=$ac_check_lib_save_LIBS
7352 fi
7353 { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7354 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7355 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
7356   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7357 fi
7358
7359   LDFLAGS=$ac_save_LDFLAGS
7360
7361 fi
7362
7363
7364 if test "$have_x" != yes; then
7365   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
7366 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
7367    { (exit 1); exit 1; }; }
7368 fi
7369
7370
7371     { echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
7372 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6; }
7373 if test "${ac_cv_x_app_defaults+set}" = set; then
7374   echo $ECHO_N "(cached) $ECHO_C" >&6
7375 else
7376
7377   rm -fr conftestdir
7378   if mkdir conftestdir; then
7379     cd conftestdir 2>/dev/null
7380     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7381     cat > Imakefile <<'EOF'
7382 acfindx:
7383         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
7384 EOF
7385     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
7386       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
7387       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7388     fi
7389     cd .. 2>/dev/null
7390     rm -fr conftestdir
7391   fi
7392       if test x"$ac_x_app_defaults" = x; then
7393
7394   # Look for the directory under a standard set of common directories.
7395   # Check X11 before X11Rn because it's often a symlink to the current release.
7396   for ac_dir in                                 \
7397     /usr/X11/lib/app-defaults                   \
7398     /usr/X11R6/lib/app-defaults                 \
7399     /usr/X11R6/lib/X11/app-defaults             \
7400     /usr/X11R5/lib/app-defaults                 \
7401     /usr/X11R5/lib/X11/app-defaults             \
7402     /usr/X11R4/lib/app-defaults                 \
7403     /usr/X11R4/lib/X11/app-defaults             \
7404                                                 \
7405     /usr/lib/X11/app-defaults                   \
7406     /usr/lib/X11R6/app-defaults                 \
7407     /usr/lib/X11R5/app-defaults                 \
7408     /usr/lib/X11R4/app-defaults                 \
7409                                                 \
7410     /usr/local/X11/lib/app-defaults             \
7411     /usr/local/X11R6/lib/app-defaults           \
7412     /usr/local/X11R5/lib/app-defaults           \
7413     /usr/local/X11R4/lib/app-defaults           \
7414                                                 \
7415     /usr/local/lib/X11/app-defaults             \
7416     /usr/local/lib/X11R6/app-defaults           \
7417     /usr/local/lib/X11R6/X11/app-defaults       \
7418     /usr/local/lib/X11R5/app-defaults           \
7419     /usr/local/lib/X11R5/X11/app-defaults       \
7420     /usr/local/lib/X11R4/app-defaults           \
7421     /usr/local/lib/X11R4/X11/app-defaults       \
7422                                                 \
7423     /usr/X386/lib/X11/app-defaults              \
7424     /usr/x386/lib/X11/app-defaults              \
7425     /usr/XFree86/lib/X11/app-defaults           \
7426                                                 \
7427     /usr/lib/X11/app-defaults                   \
7428     /usr/local/lib/X11/app-defaults             \
7429     /usr/unsupported/lib/X11/app-defaults       \
7430     /usr/athena/lib/X11/app-defaults            \
7431     /usr/local/x11r5/lib/X11/app-defaults       \
7432     /usr/lpp/Xamples/lib/X11/app-defaults       \
7433     /lib/usr/lib/X11/app-defaults               \
7434                                                 \
7435     /usr/openwin/lib/app-defaults               \
7436     /usr/openwin/lib/X11/app-defaults           \
7437     /usr/openwin/share/lib/app-defaults         \
7438     /usr/openwin/share/lib/X11/app-defaults     \
7439                                                 \
7440     /X11R6/lib/app-defaults                     \
7441     /X11R5/lib/app-defaults                     \
7442     /X11R4/lib/app-defaults                     \
7443     ; \
7444   do
7445     if test -d "$ac_dir"; then
7446       ac_x_app_defaults=$ac_dir
7447       break
7448     fi
7449   done
7450
7451       fi
7452       if test x"$ac_x_app_defaults" = x; then
7453         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7454       else
7455         # Record where we found app-defaults for the cache.
7456         ac_cv_x_app_defaults="$ac_x_app_defaults"
7457       fi
7458 fi
7459 { echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7460 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6; }
7461     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7462 case "$host" in
7463     *-hpux*)
7464
7465       # The following arcana was gleaned from conversations with
7466       # Eric Schwartz <erics@col.hp.com>:
7467       #
7468       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7469       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7470       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7471       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7472       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7473       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7474       # you don't need any -I or -L arguments.
7475       #
7476       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7477       # are the same division as 10.x.  However, there are no symlinks to
7478       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7479       # arguments are always necessary.
7480       #
7481       # However, X11R6 was available on HPUX 9.x as a patch: if that
7482       # patch was installed, then all of X11R6 went in to
7483       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7484       #
7485       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7486       # whether R5 was available as a patch; R6 undoubtedly was not.)
7487       #
7488       # So.  We try and use the highest numbered pair of
7489       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7490       # that are available.  We do not mix and match different versions
7491       # of X.
7492       #
7493       # Question I still don't know the answer to: (do you?)
7494       #
7495       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7496       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7497       #     that contrib directory?  Did it contain so-called "standard"
7498       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7499       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7500       #     be a situation where one had to reach into the R5 headers and
7501       #     libs to find Xmu?  That is, must both R6 and R5 directories
7502       #     be on the -I and -L lists in that case?
7503       #
7504       for version in X11R6 X11R5 X11R4 ; do
7505         # if either pair of directories exists...
7506         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7507         then
7508            # if contrib exists, use it...
7509            if test -d /usr/contrib/$version/include ; then
7510              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7511              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7512            fi
7513            # if the "standard" one exists, use it.
7514            if test -d /usr/include/$version ; then
7515              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7516              X_LIBS="$X_LIBS -L/usr/lib/$version"
7517            fi
7518            # since at least one of the pair exists, go no farther.
7519            break
7520         fi
7521       done
7522
7523       # Now find Motif.  Thanks for not making xmkmf find this by
7524       # default, you losers.
7525       #
7526       if test -d /usr/include/Motif2.1 ; then
7527         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7528         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7529       elif test -d /usr/include/Motif1.2 ; then
7530         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7531         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7532       elif test -d /usr/include/Motif1.1 ; then
7533         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7534         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7535       fi
7536
7537       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7538       #
7539       if test -d /opt/graphics/OpenGL/include ; then
7540         # HP-UX 10.20 puts it here
7541         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7542         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7543       elif test -d /opt/Mesa/lib ; then
7544         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
7545         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
7546       fi
7547
7548
7549       if test -d /opt/xpm/lib/X11 ; then
7550         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
7551         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
7552       fi
7553
7554       # On HPUX, default to installing in /opt/xscreensaver/ instead of
7555       # in /usr/local/, unless there is already an xscreensaver in
7556       # /usr/local/bin/.  This can be overridden with the --prefix arg
7557       # to configure.  I'm not sure this is the right thing to do, but
7558       # Richard Lloyd says so...
7559       #
7560       if test \! -x /usr/local/bin/xscreensaver ; then
7561         ac_default_prefix=/opt/xscreensaver
7562       fi
7563
7564     ;;
7565     *-solaris*)
7566
7567       # Thanks for not making xmkmf find this by default, pinheads.
7568       # And thanks for moving things around again, too.  Is this
7569       # really the standard location now?  What happened to the
7570       # joke that this kind of thing went in /opt?
7571       # cthomp says "answer: CDE (Common Disorganized Environment)"
7572       #
7573       if test -f /usr/dt/include/Xm/Xm.h ; then
7574         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7575         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7576
7577         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7578         { echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
7579 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6; }
7580 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
7581   echo $ECHO_N "(cached) $ECHO_C" >&6
7582 else
7583   ac_check_lib_save_LIBS=$LIBS
7584 LIBS="-lgen  $LIBS"
7585 cat >conftest.$ac_ext <<_ACEOF
7586 /* confdefs.h.  */
7587 _ACEOF
7588 cat confdefs.h >>conftest.$ac_ext
7589 cat >>conftest.$ac_ext <<_ACEOF
7590 /* end confdefs.h.  */
7591
7592 /* Override any GCC internal prototype to avoid an error.
7593    Use char because int might match the return type of a GCC
7594    builtin and then its argument prototype would still apply.  */
7595 #ifdef __cplusplus
7596 extern "C"
7597 #endif
7598 char regcmp ();
7599 int
7600 main ()
7601 {
7602 return regcmp ();
7603   ;
7604   return 0;
7605 }
7606 _ACEOF
7607 rm -f conftest.$ac_objext conftest$ac_exeext
7608 if { (ac_try="$ac_link"
7609 case "(($ac_try" in
7610   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7611   *) ac_try_echo=$ac_try;;
7612 esac
7613 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7614   (eval "$ac_link") 2>conftest.er1
7615   ac_status=$?
7616   grep -v '^ *+' conftest.er1 >conftest.err
7617   rm -f conftest.er1
7618   cat conftest.err >&5
7619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7620   (exit $ac_status); } && {
7621          test -z "$ac_c_werror_flag" ||
7622          test ! -s conftest.err
7623        } && test -s conftest$ac_exeext &&
7624        $as_test_x conftest$ac_exeext; then
7625   ac_cv_lib_gen_regcmp=yes
7626 else
7627   echo "$as_me: failed program was:" >&5
7628 sed 's/^/| /' conftest.$ac_ext >&5
7629
7630         ac_cv_lib_gen_regcmp=no
7631 fi
7632
7633 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
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_gen_regcmp" >&5
7638 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6; }
7639 if test $ac_cv_lib_gen_regcmp = yes; then
7640   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7641 fi
7642
7643       fi
7644
7645     ;;
7646     *-darwin*)
7647
7648       # On MacOS X (10.x with "fink"), many things are under /sw/.
7649       #
7650       if test -d /sw/include ; then
7651         X_CFLAGS="-I/sw/include $X_CFLAGS"
7652         X_LIBS="-L/sw/lib $X_LIBS"
7653       fi
7654     ;;
7655   esac
7656 { echo "$as_me:$LINENO: checking for XPointer" >&5
7657 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6; }
7658 if test "${ac_cv_xpointer+set}" = set; then
7659   echo $ECHO_N "(cached) $ECHO_C" >&6
7660 else
7661
7662   ac_save_CPPFLAGS="$CPPFLAGS"
7663   if test \! -z "$includedir" ; then
7664     CPPFLAGS="$CPPFLAGS -I$includedir"
7665   fi
7666   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7667   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7668   cat >conftest.$ac_ext <<_ACEOF
7669 /* confdefs.h.  */
7670 _ACEOF
7671 cat confdefs.h >>conftest.$ac_ext
7672 cat >>conftest.$ac_ext <<_ACEOF
7673 /* end confdefs.h.  */
7674 #include <X11/Xlib.h>
7675 int
7676 main ()
7677 {
7678 XPointer foo = (XPointer) 0;
7679   ;
7680   return 0;
7681 }
7682 _ACEOF
7683 rm -f conftest.$ac_objext
7684 if { (ac_try="$ac_compile"
7685 case "(($ac_try" in
7686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7687   *) ac_try_echo=$ac_try;;
7688 esac
7689 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7690   (eval "$ac_compile") 2>conftest.er1
7691   ac_status=$?
7692   grep -v '^ *+' conftest.er1 >conftest.err
7693   rm -f conftest.er1
7694   cat conftest.err >&5
7695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7696   (exit $ac_status); } && {
7697          test -z "$ac_c_werror_flag" ||
7698          test ! -s conftest.err
7699        } && test -s conftest.$ac_objext; then
7700   ac_cv_xpointer=yes
7701 else
7702   echo "$as_me: failed program was:" >&5
7703 sed 's/^/| /' conftest.$ac_ext >&5
7704
7705         ac_cv_xpointer=no
7706 fi
7707
7708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7709   CPPFLAGS="$ac_save_CPPFLAGS"
7710 fi
7711 { echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
7712 echo "${ECHO_T}$ac_cv_xpointer" >&6; }
7713   if test "$ac_cv_xpointer" != yes; then
7714    cat >>confdefs.h <<\_ACEOF
7715 #define XPointer char*
7716 _ACEOF
7717
7718   fi
7719
7720 { echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
7721 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6; }
7722   ac_macosx=no
7723   case "$host" in
7724     *-apple-darwin* )
7725       ac_macosx=yes
7726     ;;
7727   esac
7728 { echo "$as_me:$LINENO: result: $ac_macosx" >&5
7729 echo "${ECHO_T}$ac_macosx" >&6; }
7730
7731
7732 ###############################################################################
7733 #
7734 #       Gettext support
7735 #
7736 ###############################################################################
7737
7738
7739
7740 if test -n ""; then
7741     { echo "$as_me:$LINENO: checking for intltool >= " >&5
7742 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6; }
7743
7744     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7745     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7746
7747     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7748
7749
7750     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7751         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7752 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
7753     else
7754         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7755 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
7756         exit 1
7757     fi
7758 fi
7759
7760   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'
7761 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'
7762      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'
7763       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7764      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'
7765    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'
7766     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'
7767 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'
7768        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'
7769       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'
7770     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'
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784 # Use the tools built into the package, not the ones that are installed.
7785
7786 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7787 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7788 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7789
7790
7791
7792
7793
7794 # Extract the first word of "perl", so it can be a program name with args.
7795 set dummy perl; ac_word=$2
7796 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7797 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7798 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7799   echo $ECHO_N "(cached) $ECHO_C" >&6
7800 else
7801   case $INTLTOOL_PERL in
7802   [\\/]* | ?:[\\/]*)
7803   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7804   ;;
7805   *)
7806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7807 for as_dir in $PATH
7808 do
7809   IFS=$as_save_IFS
7810   test -z "$as_dir" && as_dir=.
7811   for ac_exec_ext in '' $ac_executable_extensions; do
7812   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7813     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7814     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7815     break 2
7816   fi
7817 done
7818 done
7819 IFS=$as_save_IFS
7820
7821   ;;
7822 esac
7823 fi
7824 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7825 if test -n "$INTLTOOL_PERL"; then
7826   { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7827 echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
7828 else
7829   { echo "$as_me:$LINENO: result: no" >&5
7830 echo "${ECHO_T}no" >&6; }
7831 fi
7832
7833
7834 if test -z "$INTLTOOL_PERL"; then
7835    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7836 echo "$as_me: error: perl not found; required for intltool" >&2;}
7837    { (exit 1); exit 1; }; }
7838 fi
7839 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7840    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7841 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7842    { (exit 1); exit 1; }; }
7843 fi
7844
7845 # Remove file type tags (using []) from po/POTFILES.
7846
7847
7848
7849
7850
7851
7852
7853 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7854
7855 ac_config_commands="$ac_config_commands default-1"
7856
7857
7858
7859 GETTEXT_PACKAGE=xscreensaver
7860
7861 cat >>confdefs.h <<_ACEOF
7862 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7863 _ACEOF
7864
7865
7866 cat >>confdefs.h <<_ACEOF
7867 #define PACKAGE "$GETTEXT_PACKAGE"
7868 _ACEOF
7869
7870
7871
7872 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"
7873 if test -n "$ac_tool_prefix"; then
7874   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7875 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7876 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7878 if test "${ac_cv_prog_RANLIB+set}" = set; then
7879   echo $ECHO_N "(cached) $ECHO_C" >&6
7880 else
7881   if test -n "$RANLIB"; then
7882   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7883 else
7884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7885 for as_dir in $PATH
7886 do
7887   IFS=$as_save_IFS
7888   test -z "$as_dir" && as_dir=.
7889   for ac_exec_ext in '' $ac_executable_extensions; do
7890   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7891     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7892     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7893     break 2
7894   fi
7895 done
7896 done
7897 IFS=$as_save_IFS
7898
7899 fi
7900 fi
7901 RANLIB=$ac_cv_prog_RANLIB
7902 if test -n "$RANLIB"; then
7903   { echo "$as_me:$LINENO: result: $RANLIB" >&5
7904 echo "${ECHO_T}$RANLIB" >&6; }
7905 else
7906   { echo "$as_me:$LINENO: result: no" >&5
7907 echo "${ECHO_T}no" >&6; }
7908 fi
7909
7910
7911 fi
7912 if test -z "$ac_cv_prog_RANLIB"; then
7913   ac_ct_RANLIB=$RANLIB
7914   # Extract the first word of "ranlib", so it can be a program name with args.
7915 set dummy ranlib; ac_word=$2
7916 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7917 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7918 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7919   echo $ECHO_N "(cached) $ECHO_C" >&6
7920 else
7921   if test -n "$ac_ct_RANLIB"; then
7922   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7923 else
7924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7925 for as_dir in $PATH
7926 do
7927   IFS=$as_save_IFS
7928   test -z "$as_dir" && as_dir=.
7929   for ac_exec_ext in '' $ac_executable_extensions; do
7930   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7931     ac_cv_prog_ac_ct_RANLIB="ranlib"
7932     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7933     break 2
7934   fi
7935 done
7936 done
7937 IFS=$as_save_IFS
7938
7939 fi
7940 fi
7941 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7942 if test -n "$ac_ct_RANLIB"; then
7943   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7944 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
7945 else
7946   { echo "$as_me:$LINENO: result: no" >&5
7947 echo "${ECHO_T}no" >&6; }
7948 fi
7949
7950   if test "x$ac_ct_RANLIB" = x; then
7951     RANLIB=":"
7952   else
7953     case $cross_compiling:$ac_tool_warned in
7954 yes:)
7955 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
7956 whose name does not start with the host triplet.  If you think this
7957 configuration is useful to you, please write to autoconf@gnu.org." >&5
7958 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
7959 whose name does not start with the host triplet.  If you think this
7960 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
7961 ac_tool_warned=yes ;;
7962 esac
7963     RANLIB=$ac_ct_RANLIB
7964   fi
7965 else
7966   RANLIB="$ac_cv_prog_RANLIB"
7967 fi
7968
7969 { echo "$as_me:$LINENO: checking for off_t" >&5
7970 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
7971 if test "${ac_cv_type_off_t+set}" = set; then
7972   echo $ECHO_N "(cached) $ECHO_C" >&6
7973 else
7974   cat >conftest.$ac_ext <<_ACEOF
7975 /* confdefs.h.  */
7976 _ACEOF
7977 cat confdefs.h >>conftest.$ac_ext
7978 cat >>conftest.$ac_ext <<_ACEOF
7979 /* end confdefs.h.  */
7980 $ac_includes_default
7981 typedef off_t ac__type_new_;
7982 int
7983 main ()
7984 {
7985 if ((ac__type_new_ *) 0)
7986   return 0;
7987 if (sizeof (ac__type_new_))
7988   return 0;
7989   ;
7990   return 0;
7991 }
7992 _ACEOF
7993 rm -f conftest.$ac_objext
7994 if { (ac_try="$ac_compile"
7995 case "(($ac_try" in
7996   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7997   *) ac_try_echo=$ac_try;;
7998 esac
7999 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8000   (eval "$ac_compile") 2>conftest.er1
8001   ac_status=$?
8002   grep -v '^ *+' conftest.er1 >conftest.err
8003   rm -f conftest.er1
8004   cat conftest.err >&5
8005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8006   (exit $ac_status); } && {
8007          test -z "$ac_c_werror_flag" ||
8008          test ! -s conftest.err
8009        } && test -s conftest.$ac_objext; then
8010   ac_cv_type_off_t=yes
8011 else
8012   echo "$as_me: failed program was:" >&5
8013 sed 's/^/| /' conftest.$ac_ext >&5
8014
8015         ac_cv_type_off_t=no
8016 fi
8017
8018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8019 fi
8020 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8021 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
8022 if test $ac_cv_type_off_t = yes; then
8023   :
8024 else
8025
8026 cat >>confdefs.h <<_ACEOF
8027 #define off_t long int
8028 _ACEOF
8029
8030 fi
8031
8032 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8033 # for constant arguments.  Useless!
8034 { echo "$as_me:$LINENO: checking for working alloca.h" >&5
8035 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
8036 if test "${ac_cv_working_alloca_h+set}" = set; then
8037   echo $ECHO_N "(cached) $ECHO_C" >&6
8038 else
8039   cat >conftest.$ac_ext <<_ACEOF
8040 /* confdefs.h.  */
8041 _ACEOF
8042 cat confdefs.h >>conftest.$ac_ext
8043 cat >>conftest.$ac_ext <<_ACEOF
8044 /* end confdefs.h.  */
8045 #include <alloca.h>
8046 int
8047 main ()
8048 {
8049 char *p = (char *) alloca (2 * sizeof (int));
8050                           if (p) return 0;
8051   ;
8052   return 0;
8053 }
8054 _ACEOF
8055 rm -f conftest.$ac_objext conftest$ac_exeext
8056 if { (ac_try="$ac_link"
8057 case "(($ac_try" in
8058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8059   *) ac_try_echo=$ac_try;;
8060 esac
8061 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8062   (eval "$ac_link") 2>conftest.er1
8063   ac_status=$?
8064   grep -v '^ *+' conftest.er1 >conftest.err
8065   rm -f conftest.er1
8066   cat conftest.err >&5
8067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8068   (exit $ac_status); } && {
8069          test -z "$ac_c_werror_flag" ||
8070          test ! -s conftest.err
8071        } && test -s conftest$ac_exeext &&
8072        $as_test_x conftest$ac_exeext; then
8073   ac_cv_working_alloca_h=yes
8074 else
8075   echo "$as_me: failed program was:" >&5
8076 sed 's/^/| /' conftest.$ac_ext >&5
8077
8078         ac_cv_working_alloca_h=no
8079 fi
8080
8081 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8082       conftest$ac_exeext conftest.$ac_ext
8083 fi
8084 { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8085 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
8086 if test $ac_cv_working_alloca_h = yes; then
8087
8088 cat >>confdefs.h <<\_ACEOF
8089 #define HAVE_ALLOCA_H 1
8090 _ACEOF
8091
8092 fi
8093
8094 { echo "$as_me:$LINENO: checking for alloca" >&5
8095 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
8096 if test "${ac_cv_func_alloca_works+set}" = set; then
8097   echo $ECHO_N "(cached) $ECHO_C" >&6
8098 else
8099   cat >conftest.$ac_ext <<_ACEOF
8100 /* confdefs.h.  */
8101 _ACEOF
8102 cat confdefs.h >>conftest.$ac_ext
8103 cat >>conftest.$ac_ext <<_ACEOF
8104 /* end confdefs.h.  */
8105 #ifdef __GNUC__
8106 # define alloca __builtin_alloca
8107 #else
8108 # ifdef _MSC_VER
8109 #  include <malloc.h>
8110 #  define alloca _alloca
8111 # else
8112 #  ifdef HAVE_ALLOCA_H
8113 #   include <alloca.h>
8114 #  else
8115 #   ifdef _AIX
8116  #pragma alloca
8117 #   else
8118 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8119 char *alloca ();
8120 #    endif
8121 #   endif
8122 #  endif
8123 # endif
8124 #endif
8125
8126 int
8127 main ()
8128 {
8129 char *p = (char *) alloca (1);
8130                                     if (p) return 0;
8131   ;
8132   return 0;
8133 }
8134 _ACEOF
8135 rm -f conftest.$ac_objext conftest$ac_exeext
8136 if { (ac_try="$ac_link"
8137 case "(($ac_try" in
8138   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8139   *) ac_try_echo=$ac_try;;
8140 esac
8141 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8142   (eval "$ac_link") 2>conftest.er1
8143   ac_status=$?
8144   grep -v '^ *+' conftest.er1 >conftest.err
8145   rm -f conftest.er1
8146   cat conftest.err >&5
8147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148   (exit $ac_status); } && {
8149          test -z "$ac_c_werror_flag" ||
8150          test ! -s conftest.err
8151        } && test -s conftest$ac_exeext &&
8152        $as_test_x conftest$ac_exeext; then
8153   ac_cv_func_alloca_works=yes
8154 else
8155   echo "$as_me: failed program was:" >&5
8156 sed 's/^/| /' conftest.$ac_ext >&5
8157
8158         ac_cv_func_alloca_works=no
8159 fi
8160
8161 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8162       conftest$ac_exeext conftest.$ac_ext
8163 fi
8164 { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8165 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
8166
8167 if test $ac_cv_func_alloca_works = yes; then
8168
8169 cat >>confdefs.h <<\_ACEOF
8170 #define HAVE_ALLOCA 1
8171 _ACEOF
8172
8173 else
8174   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8175 # that cause trouble.  Some versions do not even contain alloca or
8176 # contain a buggy version.  If you still want to use their alloca,
8177 # use ar to extract alloca.o from them instead of compiling alloca.c.
8178
8179 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8180
8181 cat >>confdefs.h <<\_ACEOF
8182 #define C_ALLOCA 1
8183 _ACEOF
8184
8185
8186 { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8187 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
8188 if test "${ac_cv_os_cray+set}" = set; then
8189   echo $ECHO_N "(cached) $ECHO_C" >&6
8190 else
8191   cat >conftest.$ac_ext <<_ACEOF
8192 /* confdefs.h.  */
8193 _ACEOF
8194 cat confdefs.h >>conftest.$ac_ext
8195 cat >>conftest.$ac_ext <<_ACEOF
8196 /* end confdefs.h.  */
8197 #if defined CRAY && ! defined CRAY2
8198 webecray
8199 #else
8200 wenotbecray
8201 #endif
8202
8203 _ACEOF
8204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8205   $EGREP "webecray" >/dev/null 2>&1; then
8206   ac_cv_os_cray=yes
8207 else
8208   ac_cv_os_cray=no
8209 fi
8210 rm -f conftest*
8211
8212 fi
8213 { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8214 echo "${ECHO_T}$ac_cv_os_cray" >&6; }
8215 if test $ac_cv_os_cray = yes; then
8216   for ac_func in _getb67 GETB67 getb67; do
8217     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8218 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8219 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8220 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8221   echo $ECHO_N "(cached) $ECHO_C" >&6
8222 else
8223   cat >conftest.$ac_ext <<_ACEOF
8224 /* confdefs.h.  */
8225 _ACEOF
8226 cat confdefs.h >>conftest.$ac_ext
8227 cat >>conftest.$ac_ext <<_ACEOF
8228 /* end confdefs.h.  */
8229 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8230    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8231 #define $ac_func innocuous_$ac_func
8232
8233 /* System header to define __stub macros and hopefully few prototypes,
8234     which can conflict with char $ac_func (); below.
8235     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8236     <limits.h> exists even on freestanding compilers.  */
8237
8238 #ifdef __STDC__
8239 # include <limits.h>
8240 #else
8241 # include <assert.h>
8242 #endif
8243
8244 #undef $ac_func
8245
8246 /* Override any GCC internal prototype to avoid an error.
8247    Use char because int might match the return type of a GCC
8248    builtin and then its argument prototype would still apply.  */
8249 #ifdef __cplusplus
8250 extern "C"
8251 #endif
8252 char $ac_func ();
8253 /* The GNU C library defines this for functions which it implements
8254     to always fail with ENOSYS.  Some functions are actually named
8255     something starting with __ and the normal name is an alias.  */
8256 #if defined __stub_$ac_func || defined __stub___$ac_func
8257 choke me
8258 #endif
8259
8260 int
8261 main ()
8262 {
8263 return $ac_func ();
8264   ;
8265   return 0;
8266 }
8267 _ACEOF
8268 rm -f conftest.$ac_objext conftest$ac_exeext
8269 if { (ac_try="$ac_link"
8270 case "(($ac_try" in
8271   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8272   *) ac_try_echo=$ac_try;;
8273 esac
8274 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8275   (eval "$ac_link") 2>conftest.er1
8276   ac_status=$?
8277   grep -v '^ *+' conftest.er1 >conftest.err
8278   rm -f conftest.er1
8279   cat conftest.err >&5
8280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8281   (exit $ac_status); } && {
8282          test -z "$ac_c_werror_flag" ||
8283          test ! -s conftest.err
8284        } && test -s conftest$ac_exeext &&
8285        $as_test_x conftest$ac_exeext; then
8286   eval "$as_ac_var=yes"
8287 else
8288   echo "$as_me: failed program was:" >&5
8289 sed 's/^/| /' conftest.$ac_ext >&5
8290
8291         eval "$as_ac_var=no"
8292 fi
8293
8294 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8295       conftest$ac_exeext conftest.$ac_ext
8296 fi
8297 ac_res=`eval echo '${'$as_ac_var'}'`
8298                { echo "$as_me:$LINENO: result: $ac_res" >&5
8299 echo "${ECHO_T}$ac_res" >&6; }
8300 if test `eval echo '${'$as_ac_var'}'` = yes; then
8301
8302 cat >>confdefs.h <<_ACEOF
8303 #define CRAY_STACKSEG_END $ac_func
8304 _ACEOF
8305
8306     break
8307 fi
8308
8309   done
8310 fi
8311
8312 { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8313 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
8314 if test "${ac_cv_c_stack_direction+set}" = set; then
8315   echo $ECHO_N "(cached) $ECHO_C" >&6
8316 else
8317   if test "$cross_compiling" = yes; then
8318   ac_cv_c_stack_direction=0
8319 else
8320   cat >conftest.$ac_ext <<_ACEOF
8321 /* confdefs.h.  */
8322 _ACEOF
8323 cat confdefs.h >>conftest.$ac_ext
8324 cat >>conftest.$ac_ext <<_ACEOF
8325 /* end confdefs.h.  */
8326 $ac_includes_default
8327 int
8328 find_stack_direction ()
8329 {
8330   static char *addr = 0;
8331   auto char dummy;
8332   if (addr == 0)
8333     {
8334       addr = &dummy;
8335       return find_stack_direction ();
8336     }
8337   else
8338     return (&dummy > addr) ? 1 : -1;
8339 }
8340
8341 int
8342 main ()
8343 {
8344   return find_stack_direction () < 0;
8345 }
8346 _ACEOF
8347 rm -f conftest$ac_exeext
8348 if { (ac_try="$ac_link"
8349 case "(($ac_try" in
8350   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8351   *) ac_try_echo=$ac_try;;
8352 esac
8353 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8354   (eval "$ac_link") 2>&5
8355   ac_status=$?
8356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8357   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8358   { (case "(($ac_try" in
8359   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8360   *) ac_try_echo=$ac_try;;
8361 esac
8362 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8363   (eval "$ac_try") 2>&5
8364   ac_status=$?
8365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8366   (exit $ac_status); }; }; then
8367   ac_cv_c_stack_direction=1
8368 else
8369   echo "$as_me: program exited with status $ac_status" >&5
8370 echo "$as_me: failed program was:" >&5
8371 sed 's/^/| /' conftest.$ac_ext >&5
8372
8373 ( exit $ac_status )
8374 ac_cv_c_stack_direction=-1
8375 fi
8376 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8377 fi
8378
8379
8380 fi
8381 { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8382 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
8383
8384 cat >>confdefs.h <<_ACEOF
8385 #define STACK_DIRECTION $ac_cv_c_stack_direction
8386 _ACEOF
8387
8388
8389 fi
8390
8391
8392
8393 for ac_header in stdlib.h unistd.h
8394 do
8395 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8396 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8397   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8398 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8399 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8400   echo $ECHO_N "(cached) $ECHO_C" >&6
8401 fi
8402 ac_res=`eval echo '${'$as_ac_Header'}'`
8403                { echo "$as_me:$LINENO: result: $ac_res" >&5
8404 echo "${ECHO_T}$ac_res" >&6; }
8405 else
8406   # Is the header compilable?
8407 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8408 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8409 cat >conftest.$ac_ext <<_ACEOF
8410 /* confdefs.h.  */
8411 _ACEOF
8412 cat confdefs.h >>conftest.$ac_ext
8413 cat >>conftest.$ac_ext <<_ACEOF
8414 /* end confdefs.h.  */
8415 $ac_includes_default
8416 #include <$ac_header>
8417 _ACEOF
8418 rm -f conftest.$ac_objext
8419 if { (ac_try="$ac_compile"
8420 case "(($ac_try" in
8421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8422   *) ac_try_echo=$ac_try;;
8423 esac
8424 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8425   (eval "$ac_compile") 2>conftest.er1
8426   ac_status=$?
8427   grep -v '^ *+' conftest.er1 >conftest.err
8428   rm -f conftest.er1
8429   cat conftest.err >&5
8430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8431   (exit $ac_status); } && {
8432          test -z "$ac_c_werror_flag" ||
8433          test ! -s conftest.err
8434        } && test -s conftest.$ac_objext; then
8435   ac_header_compiler=yes
8436 else
8437   echo "$as_me: failed program was:" >&5
8438 sed 's/^/| /' conftest.$ac_ext >&5
8439
8440         ac_header_compiler=no
8441 fi
8442
8443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8444 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8445 echo "${ECHO_T}$ac_header_compiler" >&6; }
8446
8447 # Is the header present?
8448 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8449 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8450 cat >conftest.$ac_ext <<_ACEOF
8451 /* confdefs.h.  */
8452 _ACEOF
8453 cat confdefs.h >>conftest.$ac_ext
8454 cat >>conftest.$ac_ext <<_ACEOF
8455 /* end confdefs.h.  */
8456 #include <$ac_header>
8457 _ACEOF
8458 if { (ac_try="$ac_cpp conftest.$ac_ext"
8459 case "(($ac_try" in
8460   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8461   *) ac_try_echo=$ac_try;;
8462 esac
8463 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8464   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8465   ac_status=$?
8466   grep -v '^ *+' conftest.er1 >conftest.err
8467   rm -f conftest.er1
8468   cat conftest.err >&5
8469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8470   (exit $ac_status); } >/dev/null && {
8471          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8472          test ! -s conftest.err
8473        }; then
8474   ac_header_preproc=yes
8475 else
8476   echo "$as_me: failed program was:" >&5
8477 sed 's/^/| /' conftest.$ac_ext >&5
8478
8479   ac_header_preproc=no
8480 fi
8481
8482 rm -f conftest.err conftest.$ac_ext
8483 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8484 echo "${ECHO_T}$ac_header_preproc" >&6; }
8485
8486 # So?  What about this header?
8487 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8488   yes:no: )
8489     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8490 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8491     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8492 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8493     ac_header_preproc=yes
8494     ;;
8495   no:yes:* )
8496     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8497 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8498     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8499 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8500     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8501 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8502     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8503 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8504     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8505 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8506     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8507 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8508
8509     ;;
8510 esac
8511 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8512 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8513 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8514   echo $ECHO_N "(cached) $ECHO_C" >&6
8515 else
8516   eval "$as_ac_Header=\$ac_header_preproc"
8517 fi
8518 ac_res=`eval echo '${'$as_ac_Header'}'`
8519                { echo "$as_me:$LINENO: result: $ac_res" >&5
8520 echo "${ECHO_T}$ac_res" >&6; }
8521
8522 fi
8523 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8524   cat >>confdefs.h <<_ACEOF
8525 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8526 _ACEOF
8527
8528 fi
8529
8530 done
8531
8532
8533 for ac_func in getpagesize
8534 do
8535 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8536 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8537 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8538 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8539   echo $ECHO_N "(cached) $ECHO_C" >&6
8540 else
8541   cat >conftest.$ac_ext <<_ACEOF
8542 /* confdefs.h.  */
8543 _ACEOF
8544 cat confdefs.h >>conftest.$ac_ext
8545 cat >>conftest.$ac_ext <<_ACEOF
8546 /* end confdefs.h.  */
8547 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8548    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8549 #define $ac_func innocuous_$ac_func
8550
8551 /* System header to define __stub macros and hopefully few prototypes,
8552     which can conflict with char $ac_func (); below.
8553     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8554     <limits.h> exists even on freestanding compilers.  */
8555
8556 #ifdef __STDC__
8557 # include <limits.h>
8558 #else
8559 # include <assert.h>
8560 #endif
8561
8562 #undef $ac_func
8563
8564 /* Override any GCC internal prototype to avoid an error.
8565    Use char because int might match the return type of a GCC
8566    builtin and then its argument prototype would still apply.  */
8567 #ifdef __cplusplus
8568 extern "C"
8569 #endif
8570 char $ac_func ();
8571 /* The GNU C library defines this for functions which it implements
8572     to always fail with ENOSYS.  Some functions are actually named
8573     something starting with __ and the normal name is an alias.  */
8574 #if defined __stub_$ac_func || defined __stub___$ac_func
8575 choke me
8576 #endif
8577
8578 int
8579 main ()
8580 {
8581 return $ac_func ();
8582   ;
8583   return 0;
8584 }
8585 _ACEOF
8586 rm -f conftest.$ac_objext conftest$ac_exeext
8587 if { (ac_try="$ac_link"
8588 case "(($ac_try" in
8589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8590   *) ac_try_echo=$ac_try;;
8591 esac
8592 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8593   (eval "$ac_link") 2>conftest.er1
8594   ac_status=$?
8595   grep -v '^ *+' conftest.er1 >conftest.err
8596   rm -f conftest.er1
8597   cat conftest.err >&5
8598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8599   (exit $ac_status); } && {
8600          test -z "$ac_c_werror_flag" ||
8601          test ! -s conftest.err
8602        } && test -s conftest$ac_exeext &&
8603        $as_test_x conftest$ac_exeext; then
8604   eval "$as_ac_var=yes"
8605 else
8606   echo "$as_me: failed program was:" >&5
8607 sed 's/^/| /' conftest.$ac_ext >&5
8608
8609         eval "$as_ac_var=no"
8610 fi
8611
8612 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8613       conftest$ac_exeext conftest.$ac_ext
8614 fi
8615 ac_res=`eval echo '${'$as_ac_var'}'`
8616                { echo "$as_me:$LINENO: result: $ac_res" >&5
8617 echo "${ECHO_T}$ac_res" >&6; }
8618 if test `eval echo '${'$as_ac_var'}'` = yes; then
8619   cat >>confdefs.h <<_ACEOF
8620 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8621 _ACEOF
8622
8623 fi
8624 done
8625
8626 { echo "$as_me:$LINENO: checking for working mmap" >&5
8627 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
8628 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8629   echo $ECHO_N "(cached) $ECHO_C" >&6
8630 else
8631   if test "$cross_compiling" = yes; then
8632   ac_cv_func_mmap_fixed_mapped=no
8633 else
8634   cat >conftest.$ac_ext <<_ACEOF
8635 /* confdefs.h.  */
8636 _ACEOF
8637 cat confdefs.h >>conftest.$ac_ext
8638 cat >>conftest.$ac_ext <<_ACEOF
8639 /* end confdefs.h.  */
8640 $ac_includes_default
8641 /* malloc might have been renamed as rpl_malloc. */
8642 #undef malloc
8643
8644 /* Thanks to Mike Haertel and Jim Avera for this test.
8645    Here is a matrix of mmap possibilities:
8646         mmap private not fixed
8647         mmap private fixed at somewhere currently unmapped
8648         mmap private fixed at somewhere already mapped
8649         mmap shared not fixed
8650         mmap shared fixed at somewhere currently unmapped
8651         mmap shared fixed at somewhere already mapped
8652    For private mappings, we should verify that changes cannot be read()
8653    back from the file, nor mmap's back from the file at a different
8654    address.  (There have been systems where private was not correctly
8655    implemented like the infamous i386 svr4.0, and systems where the
8656    VM page cache was not coherent with the file system buffer cache
8657    like early versions of FreeBSD and possibly contemporary NetBSD.)
8658    For shared mappings, we should conversely verify that changes get
8659    propagated back to all the places they're supposed to be.
8660
8661    Grep wants private fixed already mapped.
8662    The main things grep needs to know about mmap are:
8663    * does it exist and is it safe to write into the mmap'd area
8664    * how to use it (BSD variants)  */
8665
8666 #include <fcntl.h>
8667 #include <sys/mman.h>
8668
8669 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8670 char *malloc ();
8671 #endif
8672
8673 /* This mess was copied from the GNU getpagesize.h.  */
8674 #ifndef HAVE_GETPAGESIZE
8675 /* Assume that all systems that can run configure have sys/param.h.  */
8676 # ifndef HAVE_SYS_PARAM_H
8677 #  define HAVE_SYS_PARAM_H 1
8678 # endif
8679
8680 # ifdef _SC_PAGESIZE
8681 #  define getpagesize() sysconf(_SC_PAGESIZE)
8682 # else /* no _SC_PAGESIZE */
8683 #  ifdef HAVE_SYS_PARAM_H
8684 #   include <sys/param.h>
8685 #   ifdef EXEC_PAGESIZE
8686 #    define getpagesize() EXEC_PAGESIZE
8687 #   else /* no EXEC_PAGESIZE */
8688 #    ifdef NBPG
8689 #     define getpagesize() NBPG * CLSIZE
8690 #     ifndef CLSIZE
8691 #      define CLSIZE 1
8692 #     endif /* no CLSIZE */
8693 #    else /* no NBPG */
8694 #     ifdef NBPC
8695 #      define getpagesize() NBPC
8696 #     else /* no NBPC */
8697 #      ifdef PAGESIZE
8698 #       define getpagesize() PAGESIZE
8699 #      endif /* PAGESIZE */
8700 #     endif /* no NBPC */
8701 #    endif /* no NBPG */
8702 #   endif /* no EXEC_PAGESIZE */
8703 #  else /* no HAVE_SYS_PARAM_H */
8704 #   define getpagesize() 8192   /* punt totally */
8705 #  endif /* no HAVE_SYS_PARAM_H */
8706 # endif /* no _SC_PAGESIZE */
8707
8708 #endif /* no HAVE_GETPAGESIZE */
8709
8710 int
8711 main ()
8712 {
8713   char *data, *data2, *data3;
8714   int i, pagesize;
8715   int fd;
8716
8717   pagesize = getpagesize ();
8718
8719   /* First, make a file with some known garbage in it. */
8720   data = (char *) malloc (pagesize);
8721   if (!data)
8722     return 1;
8723   for (i = 0; i < pagesize; ++i)
8724     *(data + i) = rand ();
8725   umask (0);
8726   fd = creat ("conftest.mmap", 0600);
8727   if (fd < 0)
8728     return 1;
8729   if (write (fd, data, pagesize) != pagesize)
8730     return 1;
8731   close (fd);
8732
8733   /* Next, try to mmap the file at a fixed address which already has
8734      something else allocated at it.  If we can, also make sure that
8735      we see the same garbage.  */
8736   fd = open ("conftest.mmap", O_RDWR);
8737   if (fd < 0)
8738     return 1;
8739   data2 = (char *) malloc (2 * pagesize);
8740   if (!data2)
8741     return 1;
8742   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
8743   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8744                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8745     return 1;
8746   for (i = 0; i < pagesize; ++i)
8747     if (*(data + i) != *(data2 + i))
8748       return 1;
8749
8750   /* Finally, make sure that changes to the mapped area do not
8751      percolate back to the file as seen by read().  (This is a bug on
8752      some variants of i386 svr4.0.)  */
8753   for (i = 0; i < pagesize; ++i)
8754     *(data2 + i) = *(data2 + i) + 1;
8755   data3 = (char *) malloc (pagesize);
8756   if (!data3)
8757     return 1;
8758   if (read (fd, data3, pagesize) != pagesize)
8759     return 1;
8760   for (i = 0; i < pagesize; ++i)
8761     if (*(data + i) != *(data3 + i))
8762       return 1;
8763   close (fd);
8764   return 0;
8765 }
8766 _ACEOF
8767 rm -f conftest$ac_exeext
8768 if { (ac_try="$ac_link"
8769 case "(($ac_try" in
8770   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8771   *) ac_try_echo=$ac_try;;
8772 esac
8773 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8774   (eval "$ac_link") 2>&5
8775   ac_status=$?
8776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8777   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8778   { (case "(($ac_try" in
8779   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8780   *) ac_try_echo=$ac_try;;
8781 esac
8782 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8783   (eval "$ac_try") 2>&5
8784   ac_status=$?
8785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8786   (exit $ac_status); }; }; then
8787   ac_cv_func_mmap_fixed_mapped=yes
8788 else
8789   echo "$as_me: program exited with status $ac_status" >&5
8790 echo "$as_me: failed program was:" >&5
8791 sed 's/^/| /' conftest.$ac_ext >&5
8792
8793 ( exit $ac_status )
8794 ac_cv_func_mmap_fixed_mapped=no
8795 fi
8796 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8797 fi
8798
8799
8800 fi
8801 { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8802 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
8803 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8804
8805 cat >>confdefs.h <<\_ACEOF
8806 #define HAVE_MMAP 1
8807 _ACEOF
8808
8809 fi
8810 rm -f conftest.mmap
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8822 unistd.h sys/param.h
8823 do
8824 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8825 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8826   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8827 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8828 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8829   echo $ECHO_N "(cached) $ECHO_C" >&6
8830 fi
8831 ac_res=`eval echo '${'$as_ac_Header'}'`
8832                { echo "$as_me:$LINENO: result: $ac_res" >&5
8833 echo "${ECHO_T}$ac_res" >&6; }
8834 else
8835   # Is the header compilable?
8836 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8837 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8838 cat >conftest.$ac_ext <<_ACEOF
8839 /* confdefs.h.  */
8840 _ACEOF
8841 cat confdefs.h >>conftest.$ac_ext
8842 cat >>conftest.$ac_ext <<_ACEOF
8843 /* end confdefs.h.  */
8844 $ac_includes_default
8845 #include <$ac_header>
8846 _ACEOF
8847 rm -f conftest.$ac_objext
8848 if { (ac_try="$ac_compile"
8849 case "(($ac_try" in
8850   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8851   *) ac_try_echo=$ac_try;;
8852 esac
8853 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8854   (eval "$ac_compile") 2>conftest.er1
8855   ac_status=$?
8856   grep -v '^ *+' conftest.er1 >conftest.err
8857   rm -f conftest.er1
8858   cat conftest.err >&5
8859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8860   (exit $ac_status); } && {
8861          test -z "$ac_c_werror_flag" ||
8862          test ! -s conftest.err
8863        } && test -s conftest.$ac_objext; then
8864   ac_header_compiler=yes
8865 else
8866   echo "$as_me: failed program was:" >&5
8867 sed 's/^/| /' conftest.$ac_ext >&5
8868
8869         ac_header_compiler=no
8870 fi
8871
8872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8873 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8874 echo "${ECHO_T}$ac_header_compiler" >&6; }
8875
8876 # Is the header present?
8877 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8878 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8879 cat >conftest.$ac_ext <<_ACEOF
8880 /* confdefs.h.  */
8881 _ACEOF
8882 cat confdefs.h >>conftest.$ac_ext
8883 cat >>conftest.$ac_ext <<_ACEOF
8884 /* end confdefs.h.  */
8885 #include <$ac_header>
8886 _ACEOF
8887 if { (ac_try="$ac_cpp conftest.$ac_ext"
8888 case "(($ac_try" in
8889   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8890   *) ac_try_echo=$ac_try;;
8891 esac
8892 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8893   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8894   ac_status=$?
8895   grep -v '^ *+' conftest.er1 >conftest.err
8896   rm -f conftest.er1
8897   cat conftest.err >&5
8898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8899   (exit $ac_status); } >/dev/null && {
8900          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8901          test ! -s conftest.err
8902        }; then
8903   ac_header_preproc=yes
8904 else
8905   echo "$as_me: failed program was:" >&5
8906 sed 's/^/| /' conftest.$ac_ext >&5
8907
8908   ac_header_preproc=no
8909 fi
8910
8911 rm -f conftest.err conftest.$ac_ext
8912 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8913 echo "${ECHO_T}$ac_header_preproc" >&6; }
8914
8915 # So?  What about this header?
8916 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8917   yes:no: )
8918     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8919 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8920     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8921 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8922     ac_header_preproc=yes
8923     ;;
8924   no:yes:* )
8925     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8926 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8927     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8928 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8929     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8930 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8931     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8932 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8933     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8934 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8935     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8936 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8937
8938     ;;
8939 esac
8940 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8941 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8942 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8943   echo $ECHO_N "(cached) $ECHO_C" >&6
8944 else
8945   eval "$as_ac_Header=\$ac_header_preproc"
8946 fi
8947 ac_res=`eval echo '${'$as_ac_Header'}'`
8948                { echo "$as_me:$LINENO: result: $ac_res" >&5
8949 echo "${ECHO_T}$ac_res" >&6; }
8950
8951 fi
8952 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8953   cat >>confdefs.h <<_ACEOF
8954 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8955 _ACEOF
8956
8957 fi
8958
8959 done
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
8973 strdup __argz_count __argz_stringify __argz_next
8974 do
8975 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8976 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8977 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8978 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8979   echo $ECHO_N "(cached) $ECHO_C" >&6
8980 else
8981   cat >conftest.$ac_ext <<_ACEOF
8982 /* confdefs.h.  */
8983 _ACEOF
8984 cat confdefs.h >>conftest.$ac_ext
8985 cat >>conftest.$ac_ext <<_ACEOF
8986 /* end confdefs.h.  */
8987 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8988    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8989 #define $ac_func innocuous_$ac_func
8990
8991 /* System header to define __stub macros and hopefully few prototypes,
8992     which can conflict with char $ac_func (); below.
8993     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8994     <limits.h> exists even on freestanding compilers.  */
8995
8996 #ifdef __STDC__
8997 # include <limits.h>
8998 #else
8999 # include <assert.h>
9000 #endif
9001
9002 #undef $ac_func
9003
9004 /* Override any GCC internal prototype to avoid an error.
9005    Use char because int might match the return type of a GCC
9006    builtin and then its argument prototype would still apply.  */
9007 #ifdef __cplusplus
9008 extern "C"
9009 #endif
9010 char $ac_func ();
9011 /* The GNU C library defines this for functions which it implements
9012     to always fail with ENOSYS.  Some functions are actually named
9013     something starting with __ and the normal name is an alias.  */
9014 #if defined __stub_$ac_func || defined __stub___$ac_func
9015 choke me
9016 #endif
9017
9018 int
9019 main ()
9020 {
9021 return $ac_func ();
9022   ;
9023   return 0;
9024 }
9025 _ACEOF
9026 rm -f conftest.$ac_objext conftest$ac_exeext
9027 if { (ac_try="$ac_link"
9028 case "(($ac_try" in
9029   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9030   *) ac_try_echo=$ac_try;;
9031 esac
9032 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9033   (eval "$ac_link") 2>conftest.er1
9034   ac_status=$?
9035   grep -v '^ *+' conftest.er1 >conftest.err
9036   rm -f conftest.er1
9037   cat conftest.err >&5
9038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9039   (exit $ac_status); } && {
9040          test -z "$ac_c_werror_flag" ||
9041          test ! -s conftest.err
9042        } && test -s conftest$ac_exeext &&
9043        $as_test_x conftest$ac_exeext; then
9044   eval "$as_ac_var=yes"
9045 else
9046   echo "$as_me: failed program was:" >&5
9047 sed 's/^/| /' conftest.$ac_ext >&5
9048
9049         eval "$as_ac_var=no"
9050 fi
9051
9052 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9053       conftest$ac_exeext conftest.$ac_ext
9054 fi
9055 ac_res=`eval echo '${'$as_ac_var'}'`
9056                { echo "$as_me:$LINENO: result: $ac_res" >&5
9057 echo "${ECHO_T}$ac_res" >&6; }
9058 if test `eval echo '${'$as_ac_var'}'` = yes; then
9059   cat >>confdefs.h <<_ACEOF
9060 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9061 _ACEOF
9062
9063 fi
9064 done
9065
9066
9067    if test $ac_cv_header_locale_h = yes; then
9068     { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9069 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
9070 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9071   echo $ECHO_N "(cached) $ECHO_C" >&6
9072 else
9073   cat >conftest.$ac_ext <<_ACEOF
9074 /* confdefs.h.  */
9075 _ACEOF
9076 cat confdefs.h >>conftest.$ac_ext
9077 cat >>conftest.$ac_ext <<_ACEOF
9078 /* end confdefs.h.  */
9079 #include <locale.h>
9080 int
9081 main ()
9082 {
9083 return LC_MESSAGES
9084   ;
9085   return 0;
9086 }
9087 _ACEOF
9088 rm -f conftest.$ac_objext conftest$ac_exeext
9089 if { (ac_try="$ac_link"
9090 case "(($ac_try" in
9091   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9092   *) ac_try_echo=$ac_try;;
9093 esac
9094 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9095   (eval "$ac_link") 2>conftest.er1
9096   ac_status=$?
9097   grep -v '^ *+' conftest.er1 >conftest.err
9098   rm -f conftest.er1
9099   cat conftest.err >&5
9100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9101   (exit $ac_status); } && {
9102          test -z "$ac_c_werror_flag" ||
9103          test ! -s conftest.err
9104        } && test -s conftest$ac_exeext &&
9105        $as_test_x conftest$ac_exeext; then
9106   am_cv_val_LC_MESSAGES=yes
9107 else
9108   echo "$as_me: failed program was:" >&5
9109 sed 's/^/| /' conftest.$ac_ext >&5
9110
9111         am_cv_val_LC_MESSAGES=no
9112 fi
9113
9114 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9115       conftest$ac_exeext conftest.$ac_ext
9116 fi
9117 { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
9118 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
9119     if test $am_cv_val_LC_MESSAGES = yes; then
9120
9121 cat >>confdefs.h <<\_ACEOF
9122 #define HAVE_LC_MESSAGES 1
9123 _ACEOF
9124
9125     fi
9126   fi
9127      USE_NLS=yes
9128
9129
9130         nls_cv_force_use_gnu_gettext="no"
9131
9132     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
9133     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
9134                               nls_cv_header_intl=
9135       nls_cv_header_libgt=
9136       CATOBJEXT=NONE
9137
9138       if test "${ac_cv_header_libintl_h+set}" = set; then
9139   { echo "$as_me:$LINENO: checking for libintl.h" >&5
9140 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9141 if test "${ac_cv_header_libintl_h+set}" = set; then
9142   echo $ECHO_N "(cached) $ECHO_C" >&6
9143 fi
9144 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9145 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9146 else
9147   # Is the header compilable?
9148 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
9149 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
9150 cat >conftest.$ac_ext <<_ACEOF
9151 /* confdefs.h.  */
9152 _ACEOF
9153 cat confdefs.h >>conftest.$ac_ext
9154 cat >>conftest.$ac_ext <<_ACEOF
9155 /* end confdefs.h.  */
9156 $ac_includes_default
9157 #include <libintl.h>
9158 _ACEOF
9159 rm -f conftest.$ac_objext
9160 if { (ac_try="$ac_compile"
9161 case "(($ac_try" in
9162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9163   *) ac_try_echo=$ac_try;;
9164 esac
9165 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9166   (eval "$ac_compile") 2>conftest.er1
9167   ac_status=$?
9168   grep -v '^ *+' conftest.er1 >conftest.err
9169   rm -f conftest.er1
9170   cat conftest.err >&5
9171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9172   (exit $ac_status); } && {
9173          test -z "$ac_c_werror_flag" ||
9174          test ! -s conftest.err
9175        } && test -s conftest.$ac_objext; then
9176   ac_header_compiler=yes
9177 else
9178   echo "$as_me: failed program was:" >&5
9179 sed 's/^/| /' conftest.$ac_ext >&5
9180
9181         ac_header_compiler=no
9182 fi
9183
9184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9185 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9186 echo "${ECHO_T}$ac_header_compiler" >&6; }
9187
9188 # Is the header present?
9189 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
9190 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
9191 cat >conftest.$ac_ext <<_ACEOF
9192 /* confdefs.h.  */
9193 _ACEOF
9194 cat confdefs.h >>conftest.$ac_ext
9195 cat >>conftest.$ac_ext <<_ACEOF
9196 /* end confdefs.h.  */
9197 #include <libintl.h>
9198 _ACEOF
9199 if { (ac_try="$ac_cpp conftest.$ac_ext"
9200 case "(($ac_try" in
9201   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9202   *) ac_try_echo=$ac_try;;
9203 esac
9204 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9205   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9206   ac_status=$?
9207   grep -v '^ *+' conftest.er1 >conftest.err
9208   rm -f conftest.er1
9209   cat conftest.err >&5
9210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9211   (exit $ac_status); } >/dev/null && {
9212          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9213          test ! -s conftest.err
9214        }; then
9215   ac_header_preproc=yes
9216 else
9217   echo "$as_me: failed program was:" >&5
9218 sed 's/^/| /' conftest.$ac_ext >&5
9219
9220   ac_header_preproc=no
9221 fi
9222
9223 rm -f conftest.err conftest.$ac_ext
9224 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9225 echo "${ECHO_T}$ac_header_preproc" >&6; }
9226
9227 # So?  What about this header?
9228 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9229   yes:no: )
9230     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9231 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9232     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
9233 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
9234     ac_header_preproc=yes
9235     ;;
9236   no:yes:* )
9237     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
9238 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
9239     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
9240 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
9241     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
9242 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
9243     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
9244 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9245     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
9246 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
9247     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
9248 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
9249
9250     ;;
9251 esac
9252 { echo "$as_me:$LINENO: checking for libintl.h" >&5
9253 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9254 if test "${ac_cv_header_libintl_h+set}" = set; then
9255   echo $ECHO_N "(cached) $ECHO_C" >&6
9256 else
9257   ac_cv_header_libintl_h=$ac_header_preproc
9258 fi
9259 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9260 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9261
9262 fi
9263 if test $ac_cv_header_libintl_h = yes; then
9264   { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
9265 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
9266 if test "${gt_cv_func_dgettext_libc+set}" = set; then
9267   echo $ECHO_N "(cached) $ECHO_C" >&6
9268 else
9269   cat >conftest.$ac_ext <<_ACEOF
9270 /* confdefs.h.  */
9271 _ACEOF
9272 cat confdefs.h >>conftest.$ac_ext
9273 cat >>conftest.$ac_ext <<_ACEOF
9274 /* end confdefs.h.  */
9275 #include <libintl.h>
9276 int
9277 main ()
9278 {
9279 return (int) dgettext ("","")
9280   ;
9281   return 0;
9282 }
9283 _ACEOF
9284 rm -f conftest.$ac_objext conftest$ac_exeext
9285 if { (ac_try="$ac_link"
9286 case "(($ac_try" in
9287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9288   *) ac_try_echo=$ac_try;;
9289 esac
9290 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9291   (eval "$ac_link") 2>conftest.er1
9292   ac_status=$?
9293   grep -v '^ *+' conftest.er1 >conftest.err
9294   rm -f conftest.er1
9295   cat conftest.err >&5
9296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9297   (exit $ac_status); } && {
9298          test -z "$ac_c_werror_flag" ||
9299          test ! -s conftest.err
9300        } && test -s conftest$ac_exeext &&
9301        $as_test_x conftest$ac_exeext; then
9302   gt_cv_func_dgettext_libc=yes
9303 else
9304   echo "$as_me: failed program was:" >&5
9305 sed 's/^/| /' conftest.$ac_ext >&5
9306
9307         gt_cv_func_dgettext_libc=no
9308 fi
9309
9310 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9311       conftest$ac_exeext conftest.$ac_ext
9312 fi
9313 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
9314 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
9315
9316           if test "$gt_cv_func_dgettext_libc" != "yes"; then
9317             { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
9318 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
9319 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
9320   echo $ECHO_N "(cached) $ECHO_C" >&6
9321 else
9322   ac_check_lib_save_LIBS=$LIBS
9323 LIBS="-lintl  $LIBS"
9324 cat >conftest.$ac_ext <<_ACEOF
9325 /* confdefs.h.  */
9326 _ACEOF
9327 cat confdefs.h >>conftest.$ac_ext
9328 cat >>conftest.$ac_ext <<_ACEOF
9329 /* end confdefs.h.  */
9330
9331 /* Override any GCC internal prototype to avoid an error.
9332    Use char because int might match the return type of a GCC
9333    builtin and then its argument prototype would still apply.  */
9334 #ifdef __cplusplus
9335 extern "C"
9336 #endif
9337 char bindtextdomain ();
9338 int
9339 main ()
9340 {
9341 return bindtextdomain ();
9342   ;
9343   return 0;
9344 }
9345 _ACEOF
9346 rm -f conftest.$ac_objext conftest$ac_exeext
9347 if { (ac_try="$ac_link"
9348 case "(($ac_try" in
9349   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9350   *) ac_try_echo=$ac_try;;
9351 esac
9352 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9353   (eval "$ac_link") 2>conftest.er1
9354   ac_status=$?
9355   grep -v '^ *+' conftest.er1 >conftest.err
9356   rm -f conftest.er1
9357   cat conftest.err >&5
9358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9359   (exit $ac_status); } && {
9360          test -z "$ac_c_werror_flag" ||
9361          test ! -s conftest.err
9362        } && test -s conftest$ac_exeext &&
9363        $as_test_x conftest$ac_exeext; then
9364   ac_cv_lib_intl_bindtextdomain=yes
9365 else
9366   echo "$as_me: failed program was:" >&5
9367 sed 's/^/| /' conftest.$ac_ext >&5
9368
9369         ac_cv_lib_intl_bindtextdomain=no
9370 fi
9371
9372 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9373       conftest$ac_exeext conftest.$ac_ext
9374 LIBS=$ac_check_lib_save_LIBS
9375 fi
9376 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
9377 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
9378 if test $ac_cv_lib_intl_bindtextdomain = yes; then
9379   { echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
9380 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6; }
9381 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
9382   echo $ECHO_N "(cached) $ECHO_C" >&6
9383 else
9384   { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
9385 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
9386 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
9387   echo $ECHO_N "(cached) $ECHO_C" >&6
9388 else
9389   ac_check_lib_save_LIBS=$LIBS
9390 LIBS="-lintl  $LIBS"
9391 cat >conftest.$ac_ext <<_ACEOF
9392 /* confdefs.h.  */
9393 _ACEOF
9394 cat confdefs.h >>conftest.$ac_ext
9395 cat >>conftest.$ac_ext <<_ACEOF
9396 /* end confdefs.h.  */
9397
9398 /* Override any GCC internal prototype to avoid an error.
9399    Use char because int might match the return type of a GCC
9400    builtin and then its argument prototype would still apply.  */
9401 #ifdef __cplusplus
9402 extern "C"
9403 #endif
9404 char dgettext ();
9405 int
9406 main ()
9407 {
9408 return dgettext ();
9409   ;
9410   return 0;
9411 }
9412 _ACEOF
9413 rm -f conftest.$ac_objext conftest$ac_exeext
9414 if { (ac_try="$ac_link"
9415 case "(($ac_try" in
9416   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9417   *) ac_try_echo=$ac_try;;
9418 esac
9419 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9420   (eval "$ac_link") 2>conftest.er1
9421   ac_status=$?
9422   grep -v '^ *+' conftest.er1 >conftest.err
9423   rm -f conftest.er1
9424   cat conftest.err >&5
9425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9426   (exit $ac_status); } && {
9427          test -z "$ac_c_werror_flag" ||
9428          test ! -s conftest.err
9429        } && test -s conftest$ac_exeext &&
9430        $as_test_x conftest$ac_exeext; then
9431   ac_cv_lib_intl_dgettext=yes
9432 else
9433   echo "$as_me: failed program was:" >&5
9434 sed 's/^/| /' conftest.$ac_ext >&5
9435
9436         ac_cv_lib_intl_dgettext=no
9437 fi
9438
9439 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9440       conftest$ac_exeext conftest.$ac_ext
9441 LIBS=$ac_check_lib_save_LIBS
9442 fi
9443 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
9444 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
9445 if test $ac_cv_lib_intl_dgettext = yes; then
9446   gt_cv_func_dgettext_libintl=yes
9447 else
9448   gt_cv_func_dgettext_libintl=no
9449 fi
9450
9451 fi
9452 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
9453 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6; }
9454 fi
9455
9456           fi
9457
9458           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
9459             LIBS="$LIBS -lintl";
9460           fi
9461
9462           if test "$gt_cv_func_dgettext_libc" = "yes" \
9463             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
9464
9465 cat >>confdefs.h <<\_ACEOF
9466 #define HAVE_GETTEXT 1
9467 _ACEOF
9468
9469             # Extract the first word of "msgfmt", so it can be a program name with args.
9470 set dummy msgfmt; ac_word=$2
9471 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9473 if test "${ac_cv_path_MSGFMT+set}" = set; then
9474   echo $ECHO_N "(cached) $ECHO_C" >&6
9475 else
9476   case "$MSGFMT" in
9477   /*)
9478   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9479   ;;
9480   *)
9481   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9482   for ac_dir in $PATH; do
9483     test -z "$ac_dir" && ac_dir=.
9484     if test -f $ac_dir/$ac_word; then
9485       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
9486         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
9487         break
9488       fi
9489     fi
9490   done
9491   IFS="$ac_save_ifs"
9492   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
9493   ;;
9494 esac
9495 fi
9496 MSGFMT="$ac_cv_path_MSGFMT"
9497 if test -n "$MSGFMT"; then
9498   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
9499 echo "${ECHO_T}$MSGFMT" >&6; }
9500 else
9501   { echo "$as_me:$LINENO: result: no" >&5
9502 echo "${ECHO_T}no" >&6; }
9503 fi
9504             if test "$MSGFMT" != "no"; then
9505
9506 for ac_func in dcgettext
9507 do
9508 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9509 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9510 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9511 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9512   echo $ECHO_N "(cached) $ECHO_C" >&6
9513 else
9514   cat >conftest.$ac_ext <<_ACEOF
9515 /* confdefs.h.  */
9516 _ACEOF
9517 cat confdefs.h >>conftest.$ac_ext
9518 cat >>conftest.$ac_ext <<_ACEOF
9519 /* end confdefs.h.  */
9520 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9521    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9522 #define $ac_func innocuous_$ac_func
9523
9524 /* System header to define __stub macros and hopefully few prototypes,
9525     which can conflict with char $ac_func (); below.
9526     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9527     <limits.h> exists even on freestanding compilers.  */
9528
9529 #ifdef __STDC__
9530 # include <limits.h>
9531 #else
9532 # include <assert.h>
9533 #endif
9534
9535 #undef $ac_func
9536
9537 /* Override any GCC internal prototype to avoid an error.
9538    Use char because int might match the return type of a GCC
9539    builtin and then its argument prototype would still apply.  */
9540 #ifdef __cplusplus
9541 extern "C"
9542 #endif
9543 char $ac_func ();
9544 /* The GNU C library defines this for functions which it implements
9545     to always fail with ENOSYS.  Some functions are actually named
9546     something starting with __ and the normal name is an alias.  */
9547 #if defined __stub_$ac_func || defined __stub___$ac_func
9548 choke me
9549 #endif
9550
9551 int
9552 main ()
9553 {
9554 return $ac_func ();
9555   ;
9556   return 0;
9557 }
9558 _ACEOF
9559 rm -f conftest.$ac_objext conftest$ac_exeext
9560 if { (ac_try="$ac_link"
9561 case "(($ac_try" in
9562   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9563   *) ac_try_echo=$ac_try;;
9564 esac
9565 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9566   (eval "$ac_link") 2>conftest.er1
9567   ac_status=$?
9568   grep -v '^ *+' conftest.er1 >conftest.err
9569   rm -f conftest.er1
9570   cat conftest.err >&5
9571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9572   (exit $ac_status); } && {
9573          test -z "$ac_c_werror_flag" ||
9574          test ! -s conftest.err
9575        } && test -s conftest$ac_exeext &&
9576        $as_test_x conftest$ac_exeext; then
9577   eval "$as_ac_var=yes"
9578 else
9579   echo "$as_me: failed program was:" >&5
9580 sed 's/^/| /' conftest.$ac_ext >&5
9581
9582         eval "$as_ac_var=no"
9583 fi
9584
9585 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9586       conftest$ac_exeext conftest.$ac_ext
9587 fi
9588 ac_res=`eval echo '${'$as_ac_var'}'`
9589                { echo "$as_me:$LINENO: result: $ac_res" >&5
9590 echo "${ECHO_T}$ac_res" >&6; }
9591 if test `eval echo '${'$as_ac_var'}'` = yes; then
9592   cat >>confdefs.h <<_ACEOF
9593 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9594 _ACEOF
9595
9596 fi
9597 done
9598
9599               # Extract the first word of "gmsgfmt", so it can be a program name with args.
9600 set dummy gmsgfmt; ac_word=$2
9601 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9603 if test "${ac_cv_path_GMSGFMT+set}" = set; then
9604   echo $ECHO_N "(cached) $ECHO_C" >&6
9605 else
9606   case $GMSGFMT in
9607   [\\/]* | ?:[\\/]*)
9608   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9609   ;;
9610   *)
9611   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9612 for as_dir in $PATH
9613 do
9614   IFS=$as_save_IFS
9615   test -z "$as_dir" && as_dir=.
9616   for ac_exec_ext in '' $ac_executable_extensions; do
9617   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9618     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
9619     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9620     break 2
9621   fi
9622 done
9623 done
9624 IFS=$as_save_IFS
9625
9626   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9627   ;;
9628 esac
9629 fi
9630 GMSGFMT=$ac_cv_path_GMSGFMT
9631 if test -n "$GMSGFMT"; then
9632   { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
9633 echo "${ECHO_T}$GMSGFMT" >&6; }
9634 else
9635   { echo "$as_me:$LINENO: result: no" >&5
9636 echo "${ECHO_T}no" >&6; }
9637 fi
9638
9639
9640               # Extract the first word of "xgettext", so it can be a program name with args.
9641 set dummy xgettext; ac_word=$2
9642 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9644 if test "${ac_cv_path_XGETTEXT+set}" = set; then
9645   echo $ECHO_N "(cached) $ECHO_C" >&6
9646 else
9647   case "$XGETTEXT" in
9648   /*)
9649   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9650   ;;
9651   *)
9652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9653   for ac_dir in $PATH; do
9654     test -z "$ac_dir" && ac_dir=.
9655     if test -f $ac_dir/$ac_word; then
9656       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
9657         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
9658         break
9659       fi
9660     fi
9661   done
9662   IFS="$ac_save_ifs"
9663   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9664   ;;
9665 esac
9666 fi
9667 XGETTEXT="$ac_cv_path_XGETTEXT"
9668 if test -n "$XGETTEXT"; then
9669   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
9670 echo "${ECHO_T}$XGETTEXT" >&6; }
9671 else
9672   { echo "$as_me:$LINENO: result: no" >&5
9673 echo "${ECHO_T}no" >&6; }
9674 fi
9675
9676               cat >conftest.$ac_ext <<_ACEOF
9677 /* confdefs.h.  */
9678 _ACEOF
9679 cat confdefs.h >>conftest.$ac_ext
9680 cat >>conftest.$ac_ext <<_ACEOF
9681 /* end confdefs.h.  */
9682
9683 int
9684 main ()
9685 {
9686 extern int _nl_msg_cat_cntr;
9687                              return _nl_msg_cat_cntr
9688   ;
9689   return 0;
9690 }
9691 _ACEOF
9692 rm -f conftest.$ac_objext conftest$ac_exeext
9693 if { (ac_try="$ac_link"
9694 case "(($ac_try" in
9695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9696   *) ac_try_echo=$ac_try;;
9697 esac
9698 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9699   (eval "$ac_link") 2>conftest.er1
9700   ac_status=$?
9701   grep -v '^ *+' conftest.er1 >conftest.err
9702   rm -f conftest.er1
9703   cat conftest.err >&5
9704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9705   (exit $ac_status); } && {
9706          test -z "$ac_c_werror_flag" ||
9707          test ! -s conftest.err
9708        } && test -s conftest$ac_exeext &&
9709        $as_test_x conftest$ac_exeext; then
9710   CATOBJEXT=.gmo
9711                  DATADIRNAME=share
9712 else
9713   echo "$as_me: failed program was:" >&5
9714 sed 's/^/| /' conftest.$ac_ext >&5
9715
9716         CATOBJEXT=.mo
9717                  DATADIRNAME=lib
9718 fi
9719
9720 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9721       conftest$ac_exeext conftest.$ac_ext
9722               INSTOBJEXT=.mo
9723             fi
9724           fi
9725
9726           # Added by Martin Baulig 12/15/98 for libc5 systems
9727           if test "$gt_cv_func_dgettext_libc" != "yes" \
9728             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9729             INTLLIBS=-lintl
9730             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9731           fi
9732
9733 fi
9734
9735
9736
9737       if test "$CATOBJEXT" = "NONE"; then
9738                         nls_cv_use_gnu_gettext=yes
9739       fi
9740     fi
9741
9742     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9743
9744 cat >>confdefs.h <<\_ACEOF
9745 #define ENABLE_NLS 1
9746 _ACEOF
9747
9748     else
9749             CATOBJEXT=
9750     fi
9751
9752         if test "$XGETTEXT" != ":"; then
9753                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9754         : ;
9755       else
9756         { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9757 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
9758         XGETTEXT=":"
9759       fi
9760     fi
9761
9762     # We need to process the po/ directory.
9763     POSUB=po
9764
9765     ac_config_commands="$ac_config_commands default-2"
9766
9767
9768                 for lang in $ALL_LINGUAS; do
9769       GMOFILES="$GMOFILES $lang.gmo"
9770       POFILES="$POFILES $lang.po"
9771     done
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785    if test "x$CATOBJEXT" != "x"; then
9786      if test "x$ALL_LINGUAS" = "x"; then
9787        LINGUAS=
9788      else
9789        { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9790 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
9791        NEW_LINGUAS=
9792        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9793          case "$ALL_LINGUAS" in
9794           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9795          esac
9796        done
9797        LINGUAS=$NEW_LINGUAS
9798        { echo "$as_me:$LINENO: result: $LINGUAS" >&5
9799 echo "${ECHO_T}$LINGUAS" >&6; }
9800      fi
9801
9802           if test -n "$LINGUAS"; then
9803        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9804      fi
9805    fi
9806
9807             test -d po || mkdir po
9808    if test "$CATOBJEXT" = ".cat"; then
9809      if test "${ac_cv_header_linux_version_h+set}" = set; then
9810   { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9811 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9812 if test "${ac_cv_header_linux_version_h+set}" = set; then
9813   echo $ECHO_N "(cached) $ECHO_C" >&6
9814 fi
9815 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9816 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9817 else
9818   # Is the header compilable?
9819 { echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9820 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; }
9821 cat >conftest.$ac_ext <<_ACEOF
9822 /* confdefs.h.  */
9823 _ACEOF
9824 cat confdefs.h >>conftest.$ac_ext
9825 cat >>conftest.$ac_ext <<_ACEOF
9826 /* end confdefs.h.  */
9827 $ac_includes_default
9828 #include <linux/version.h>
9829 _ACEOF
9830 rm -f conftest.$ac_objext
9831 if { (ac_try="$ac_compile"
9832 case "(($ac_try" in
9833   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9834   *) ac_try_echo=$ac_try;;
9835 esac
9836 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9837   (eval "$ac_compile") 2>conftest.er1
9838   ac_status=$?
9839   grep -v '^ *+' conftest.er1 >conftest.err
9840   rm -f conftest.er1
9841   cat conftest.err >&5
9842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9843   (exit $ac_status); } && {
9844          test -z "$ac_c_werror_flag" ||
9845          test ! -s conftest.err
9846        } && test -s conftest.$ac_objext; then
9847   ac_header_compiler=yes
9848 else
9849   echo "$as_me: failed program was:" >&5
9850 sed 's/^/| /' conftest.$ac_ext >&5
9851
9852         ac_header_compiler=no
9853 fi
9854
9855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9856 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9857 echo "${ECHO_T}$ac_header_compiler" >&6; }
9858
9859 # Is the header present?
9860 { echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9861 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; }
9862 cat >conftest.$ac_ext <<_ACEOF
9863 /* confdefs.h.  */
9864 _ACEOF
9865 cat confdefs.h >>conftest.$ac_ext
9866 cat >>conftest.$ac_ext <<_ACEOF
9867 /* end confdefs.h.  */
9868 #include <linux/version.h>
9869 _ACEOF
9870 if { (ac_try="$ac_cpp conftest.$ac_ext"
9871 case "(($ac_try" in
9872   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9873   *) ac_try_echo=$ac_try;;
9874 esac
9875 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9876   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9877   ac_status=$?
9878   grep -v '^ *+' conftest.er1 >conftest.err
9879   rm -f conftest.er1
9880   cat conftest.err >&5
9881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9882   (exit $ac_status); } >/dev/null && {
9883          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9884          test ! -s conftest.err
9885        }; then
9886   ac_header_preproc=yes
9887 else
9888   echo "$as_me: failed program was:" >&5
9889 sed 's/^/| /' conftest.$ac_ext >&5
9890
9891   ac_header_preproc=no
9892 fi
9893
9894 rm -f conftest.err conftest.$ac_ext
9895 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9896 echo "${ECHO_T}$ac_header_preproc" >&6; }
9897
9898 # So?  What about this header?
9899 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9900   yes:no: )
9901     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9902 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9903     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9904 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9905     ac_header_preproc=yes
9906     ;;
9907   no:yes:* )
9908     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9909 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9910     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9911 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9912     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9913 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9914     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9915 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9916     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9917 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9918     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9919 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9920
9921     ;;
9922 esac
9923 { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9924 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9925 if test "${ac_cv_header_linux_version_h+set}" = set; then
9926   echo $ECHO_N "(cached) $ECHO_C" >&6
9927 else
9928   ac_cv_header_linux_version_h=$ac_header_preproc
9929 fi
9930 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9931 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9932
9933 fi
9934 if test $ac_cv_header_linux_version_h = yes; then
9935   msgformat=linux
9936 else
9937   msgformat=xopen
9938 fi
9939
9940
9941
9942                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
9943    fi
9944
9945             MKINSTALLDIRS=
9946 #
9947 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
9948 #
9949 #   if test -n "$ac_aux_dir"; then
9950 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
9951 #   fi
9952    if test -z "$MKINSTALLDIRS"; then
9953      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
9954    fi
9955
9956    # jwz: you know what, screw it.  Let's just use the version that I
9957    # already computed in configure.in, instead of this version that came
9958    # with the i18n crud, ok?
9959    MKINSTALLDIRS="$INSTALL_DIRS"
9960
9961
9962
9963
9964          test -d po || mkdir po
9965    if test "x$srcdir" != "x."; then
9966      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
9967        posrcprefix="$srcdir/"
9968      else
9969        posrcprefix="../$srcdir/"
9970      fi
9971    else
9972      posrcprefix="../"
9973    fi
9974    rm -f po/POTFILES
9975    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
9976         < $srcdir/po/POTFILES.in > po/POTFILES
9977
9978 MKINSTALLDIRS="$INSTALL_DIRS"
9979
9980
9981 ###############################################################################
9982 #
9983 #       Check for -lXmu (some fucked up vendors don't ship it...)
9984 #
9985 ###############################################################################
9986
9987 have_xmu=no
9988
9989   ac_save_CPPFLAGS="$CPPFLAGS"
9990   if test \! -z "$includedir" ; then
9991     CPPFLAGS="$CPPFLAGS -I$includedir"
9992   fi
9993   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9994   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
9995   { echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
9996 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6; }
9997 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
9998   echo $ECHO_N "(cached) $ECHO_C" >&6
9999 else
10000   cat >conftest.$ac_ext <<_ACEOF
10001 /* confdefs.h.  */
10002 _ACEOF
10003 cat confdefs.h >>conftest.$ac_ext
10004 cat >>conftest.$ac_ext <<_ACEOF
10005 /* end confdefs.h.  */
10006 #include <stdlib.h>
10007                    #include <stdio.h>
10008                    #include <X11/Intrinsic.h>
10009
10010 #include <X11/Xmu/Error.h>
10011 _ACEOF
10012 rm -f conftest.$ac_objext
10013 if { (ac_try="$ac_compile"
10014 case "(($ac_try" in
10015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10016   *) ac_try_echo=$ac_try;;
10017 esac
10018 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10019   (eval "$ac_compile") 2>conftest.er1
10020   ac_status=$?
10021   grep -v '^ *+' conftest.er1 >conftest.err
10022   rm -f conftest.er1
10023   cat conftest.err >&5
10024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10025   (exit $ac_status); } && {
10026          test -z "$ac_c_werror_flag" ||
10027          test ! -s conftest.err
10028        } && test -s conftest.$ac_objext; then
10029   ac_cv_header_X11_Xmu_Error_h=yes
10030 else
10031   echo "$as_me: failed program was:" >&5
10032 sed 's/^/| /' conftest.$ac_ext >&5
10033
10034         ac_cv_header_X11_Xmu_Error_h=no
10035 fi
10036
10037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10038 fi
10039 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
10040 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6; }
10041 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
10042   have_xmu=yes
10043 fi
10044
10045
10046   CPPFLAGS="$ac_save_CPPFLAGS"
10047 if test "$have_xmu" = no ; then
10048   XMU_SRCS='$(UTILS_SRC)/xmu.c'
10049   XMU_OBJS='$(UTILS_BIN)/xmu.o'
10050   XMU_LIBS=''
10051 else
10052   XMU_SRCS=''
10053   XMU_OBJS=''
10054   XMU_LIBS='-lXmu'
10055   cat >>confdefs.h <<\_ACEOF
10056 #define HAVE_XMU 1
10057 _ACEOF
10058
10059 fi
10060
10061
10062 ###############################################################################
10063 #
10064 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
10065 #       See comp.windows.x FAQ question 124.  The right fix is to
10066 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
10067 #
10068 ###############################################################################
10069
10070 if test "$have_xmu" = yes ; then
10071   case "$host" in
10072     *-sunos4*)
10073     { echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
10074 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6; }
10075 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
10076   echo $ECHO_N "(cached) $ECHO_C" >&6
10077 else
10078   ac_save_LDFLAGS="$LDFLAGS"
10079                     if test \! -z "$x_libraries" ; then
10080                       LDFLAGS="$LDFLAGS -L$x_libraries"
10081                     fi
10082                     # Note: this trick never works!  (Generally.)
10083                     # We're only getting away with using AC_TRY_LINK
10084                     # with X libraries because we know it's SunOS.
10085                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
10086                     cat >conftest.$ac_ext <<_ACEOF
10087 /* confdefs.h.  */
10088 _ACEOF
10089 cat confdefs.h >>conftest.$ac_ext
10090 cat >>conftest.$ac_ext <<_ACEOF
10091 /* end confdefs.h.  */
10092
10093 int
10094 main ()
10095 {
10096
10097   ;
10098   return 0;
10099 }
10100 _ACEOF
10101 rm -f conftest.$ac_objext conftest$ac_exeext
10102 if { (ac_try="$ac_link"
10103 case "(($ac_try" in
10104   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10105   *) ac_try_echo=$ac_try;;
10106 esac
10107 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10108   (eval "$ac_link") 2>conftest.er1
10109   ac_status=$?
10110   grep -v '^ *+' conftest.er1 >conftest.err
10111   rm -f conftest.er1
10112   cat conftest.err >&5
10113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10114   (exit $ac_status); } && {
10115          test -z "$ac_c_werror_flag" ||
10116          test ! -s conftest.err
10117        } && test -s conftest$ac_exeext &&
10118        $as_test_x conftest$ac_exeext; then
10119   ac_cv_sunos_xmu_bug=no
10120 else
10121   echo "$as_me: failed program was:" >&5
10122 sed 's/^/| /' conftest.$ac_ext >&5
10123
10124         ac_cv_sunos_xmu_bug=yes
10125 fi
10126
10127 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10128       conftest$ac_exeext conftest.$ac_ext
10129                     LDFLAGS="$ac_save_LDFLAGS"
10130 fi
10131 { echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
10132 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6; }
10133     if test "$ac_cv_sunos_xmu_bug" = yes ; then
10134       { echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
10135 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6; }
10136 if test "${ac_cv_ld_static+set}" = set; then
10137   echo $ECHO_N "(cached) $ECHO_C" >&6
10138 else
10139   ac_save_LDFLAGS="$LDFLAGS"
10140                       LDFLAGS="$LDFLAGS -static"
10141                       cat >conftest.$ac_ext <<_ACEOF
10142 /* confdefs.h.  */
10143 _ACEOF
10144 cat confdefs.h >>conftest.$ac_ext
10145 cat >>conftest.$ac_ext <<_ACEOF
10146 /* end confdefs.h.  */
10147
10148 int
10149 main ()
10150 {
10151
10152   ;
10153   return 0;
10154 }
10155 _ACEOF
10156 rm -f conftest.$ac_objext conftest$ac_exeext
10157 if { (ac_try="$ac_link"
10158 case "(($ac_try" in
10159   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10160   *) ac_try_echo=$ac_try;;
10161 esac
10162 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10163   (eval "$ac_link") 2>conftest.er1
10164   ac_status=$?
10165   grep -v '^ *+' conftest.er1 >conftest.err
10166   rm -f conftest.er1
10167   cat conftest.err >&5
10168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10169   (exit $ac_status); } && {
10170          test -z "$ac_c_werror_flag" ||
10171          test ! -s conftest.err
10172        } && test -s conftest$ac_exeext &&
10173        $as_test_x conftest$ac_exeext; then
10174   ac_cv_ld_static=yes
10175 else
10176   echo "$as_me: failed program was:" >&5
10177 sed 's/^/| /' conftest.$ac_ext >&5
10178
10179         ac_cv_ld_static=no
10180 fi
10181
10182 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10183       conftest$ac_exeext conftest.$ac_ext
10184                     LDFLAGS="$ac_save_LDFLAGS"
10185 fi
10186 { echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
10187 echo "${ECHO_T}$ac_cv_ld_static" >&6; }
10188       if test "$ac_cv_ld_static" = yes ; then
10189         LDFLAGS="$LDFLAGS -static"
10190       else
10191         LDFLAGS="$LDFLAGS -Bstatic"
10192       fi
10193     fi
10194     ;;
10195   esac
10196 fi
10197
10198
10199 ###############################################################################
10200 #
10201 #       Handle the --with-hackdir option
10202 #
10203 ###############################################################################
10204
10205 have_hackdir=yes
10206 with_hackdir_req=unspecified
10207
10208 # Check whether --with-hackdir was given.
10209 if test "${with_hackdir+set}" = set; then
10210   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
10211 else
10212   with_hackdir=yes
10213 fi
10214
10215
10216 if test x"$with_hackdir" = xyes; then
10217   HACKDIR='${libexecdir}/xscreensaver'
10218 elif test x"$with_hackdir" = xno; then
10219   HACKDIR='${bindir}'
10220 else
10221   HACKDIR=$with_hackdir
10222 fi
10223
10224 # canonicalize slashes.
10225 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10226
10227 # Expand HACKDIR as HACKDIR_FULL
10228 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
10229
10230 # This option used to be called --enable-subdir; make sure that is no longer
10231 # used, since configure brain-damagedly ignores unknown --enable options.
10232
10233 obsolete_enable=
10234 # Check whether --enable-subdir was given.
10235 if test "${enable_subdir+set}" = set; then
10236   enableval=$enable_subdir; obsolete_enable=yes
10237 fi
10238
10239 if test -n "$obsolete_enable"; then
10240   echo "error: the --enable-subdir option has been replaced with"
10241   echo "       the new --with-hackdir option; see \`configure --help'"
10242   echo "       for more information."
10243   exit 1
10244 fi
10245
10246
10247 ###############################################################################
10248 #
10249 #       Handle the --with-configdir option
10250 #       Help for --with-x-app-defaults option added..
10251 #
10252 ###############################################################################
10253
10254 have_configdir=yes
10255 with_configdir_req=unspecified
10256
10257 # Check whether --with-configdir was given.
10258 if test "${with_configdir+set}" = set; then
10259   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
10260 else
10261   with_configdir=yes
10262 fi
10263
10264
10265 if test x"$with_configdir" = xyes; then
10266   HACK_CONF_DIR='${datadir}/xscreensaver/config'
10267 elif test x"$with_configdir" = xno; then
10268   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
10269   exit 1
10270 else
10271   # there must be a better way than this...
10272   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
10273     # absolute path
10274     HACK_CONF_DIR=$with_configdir
10275   else
10276     # relative path
10277     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
10278   fi
10279 fi
10280
10281
10282
10283
10284 ###############################################################################
10285 #
10286 #       Check for the SGI SCREEN_SAVER server extension.
10287 #
10288 ###############################################################################
10289
10290 have_sgi=no
10291 with_sgi_req=unspecified
10292
10293 # Check whether --with-sgi-ext was given.
10294 if test "${with_sgi_ext+set}" = set; then
10295   withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
10296 else
10297   with_sgi=yes
10298 fi
10299
10300
10301
10302    case "$with_sgi" in
10303     yes) ;;
10304     no)  ;;
10305
10306     /*)
10307      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
10308 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6; }
10309      d=$with_sgi/include
10310      if test -d $d; then
10311        X_CFLAGS="-I$d $X_CFLAGS"
10312        { echo "$as_me:$LINENO: result: $d" >&5
10313 echo "${ECHO_T}$d" >&6; }
10314      else
10315        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10316 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10317      fi
10318
10319      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
10320 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6; }
10321      d=$with_sgi/lib
10322      if test -d $d; then
10323        X_LIBS="-L$d $X_LIBS"
10324        { echo "$as_me:$LINENO: result: $d" >&5
10325 echo "${ECHO_T}$d" >&6; }
10326      else
10327        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10328 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10329      fi
10330
10331      # replace the directory string with "yes".
10332      with_sgi_req="yes"
10333      with_sgi=$with_sgi_req
10334      ;;
10335
10336     *)
10337      echo ""
10338      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
10339      echo "       If it is a directory, then \`DIR/include' will be added to"
10340      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10341      exit 1
10342      ;;
10343    esac
10344
10345
10346 if test "$with_sgi" = yes; then
10347
10348   ac_save_CPPFLAGS="$CPPFLAGS"
10349   if test \! -z "$includedir" ; then
10350     CPPFLAGS="$CPPFLAGS -I$includedir"
10351   fi
10352   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10353   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10354   { echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
10355 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6; }
10356 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
10357   echo $ECHO_N "(cached) $ECHO_C" >&6
10358 else
10359   cat >conftest.$ac_ext <<_ACEOF
10360 /* confdefs.h.  */
10361 _ACEOF
10362 cat confdefs.h >>conftest.$ac_ext
10363 cat >>conftest.$ac_ext <<_ACEOF
10364 /* end confdefs.h.  */
10365 #include <X11/Xlib.h>
10366
10367 #include <X11/extensions/XScreenSaver.h>
10368 _ACEOF
10369 rm -f conftest.$ac_objext
10370 if { (ac_try="$ac_compile"
10371 case "(($ac_try" in
10372   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10373   *) ac_try_echo=$ac_try;;
10374 esac
10375 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10376   (eval "$ac_compile") 2>conftest.er1
10377   ac_status=$?
10378   grep -v '^ *+' conftest.er1 >conftest.err
10379   rm -f conftest.er1
10380   cat conftest.err >&5
10381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10382   (exit $ac_status); } && {
10383          test -z "$ac_c_werror_flag" ||
10384          test ! -s conftest.err
10385        } && test -s conftest.$ac_objext; then
10386   ac_cv_header_X11_extensions_XScreenSaver_h=yes
10387 else
10388   echo "$as_me: failed program was:" >&5
10389 sed 's/^/| /' conftest.$ac_ext >&5
10390
10391         ac_cv_header_X11_extensions_XScreenSaver_h=no
10392 fi
10393
10394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10395 fi
10396 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
10397 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6; }
10398 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
10399   have_sgi=yes
10400                      cat >>confdefs.h <<\_ACEOF
10401 #define HAVE_SGI_SAVER_EXTENSION 1
10402 _ACEOF
10403
10404 fi
10405
10406
10407   CPPFLAGS="$ac_save_CPPFLAGS"
10408
10409 elif test "$with_sgi" != no; then
10410   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10411   exit 1
10412 fi
10413
10414
10415 ###############################################################################
10416 #
10417 #       Check for the XIDLE server extension.
10418 #
10419 ###############################################################################
10420
10421 have_xidle=no
10422 with_xidle_req=unspecified
10423
10424 # Check whether --with-xidle-ext was given.
10425 if test "${with_xidle_ext+set}" = set; then
10426   withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
10427 else
10428   with_xidle=yes
10429 fi
10430
10431
10432
10433    case "$with_xidle" in
10434     yes) ;;
10435     no)  ;;
10436
10437     /*)
10438      { echo "$as_me:$LINENO: checking for XIDLE headers" >&5
10439 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6; }
10440      d=$with_xidle/include
10441      if test -d $d; then
10442        X_CFLAGS="-I$d $X_CFLAGS"
10443        { echo "$as_me:$LINENO: result: $d" >&5
10444 echo "${ECHO_T}$d" >&6; }
10445      else
10446        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10447 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10448      fi
10449
10450      { echo "$as_me:$LINENO: checking for XIDLE libs" >&5
10451 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6; }
10452      d=$with_xidle/lib
10453      if test -d $d; then
10454        X_LIBS="-L$d $X_LIBS"
10455        { echo "$as_me:$LINENO: result: $d" >&5
10456 echo "${ECHO_T}$d" >&6; }
10457      else
10458        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10459 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10460      fi
10461
10462      # replace the directory string with "yes".
10463      with_xidle_req="yes"
10464      with_xidle=$with_xidle_req
10465      ;;
10466
10467     *)
10468      echo ""
10469      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
10470      echo "       If it is a directory, then \`DIR/include' will be added to"
10471      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10472      exit 1
10473      ;;
10474    esac
10475
10476
10477 if test "$with_xidle" = yes; then
10478
10479   ac_save_CPPFLAGS="$CPPFLAGS"
10480   if test \! -z "$includedir" ; then
10481     CPPFLAGS="$CPPFLAGS -I$includedir"
10482   fi
10483   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10484   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10485   { echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
10486 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6; }
10487 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
10488   echo $ECHO_N "(cached) $ECHO_C" >&6
10489 else
10490   cat >conftest.$ac_ext <<_ACEOF
10491 /* confdefs.h.  */
10492 _ACEOF
10493 cat confdefs.h >>conftest.$ac_ext
10494 cat >>conftest.$ac_ext <<_ACEOF
10495 /* end confdefs.h.  */
10496 #include <X11/Xlib.h>
10497
10498 #include <X11/extensions/xidle.h>
10499 _ACEOF
10500 rm -f conftest.$ac_objext
10501 if { (ac_try="$ac_compile"
10502 case "(($ac_try" in
10503   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10504   *) ac_try_echo=$ac_try;;
10505 esac
10506 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10507   (eval "$ac_compile") 2>conftest.er1
10508   ac_status=$?
10509   grep -v '^ *+' conftest.er1 >conftest.err
10510   rm -f conftest.er1
10511   cat conftest.err >&5
10512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10513   (exit $ac_status); } && {
10514          test -z "$ac_c_werror_flag" ||
10515          test ! -s conftest.err
10516        } && test -s conftest.$ac_objext; then
10517   ac_cv_header_X11_extensions_xidle_h=yes
10518 else
10519   echo "$as_me: failed program was:" >&5
10520 sed 's/^/| /' conftest.$ac_ext >&5
10521
10522         ac_cv_header_X11_extensions_xidle_h=no
10523 fi
10524
10525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10526 fi
10527 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
10528 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6; }
10529 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
10530   have_xidle=yes
10531                      cat >>confdefs.h <<\_ACEOF
10532 #define HAVE_XIDLE_EXTENSION 1
10533 _ACEOF
10534
10535 fi
10536
10537
10538   CPPFLAGS="$ac_save_CPPFLAGS"
10539 elif test "$with_xidle" != no; then
10540   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10541   exit 1
10542 fi
10543
10544
10545 ###############################################################################
10546 #
10547 #       Check for the SGI-VIDEO-CONTROL server extension.
10548 #
10549 ###############################################################################
10550
10551 have_sgivc=no
10552 with_sgivc_req=unspecified
10553
10554 # Check whether --with-sgivc-ext was given.
10555 if test "${with_sgivc_ext+set}" = set; then
10556   withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
10557 else
10558   with_sgivc=yes
10559 fi
10560
10561
10562
10563    case "$with_sgivc" in
10564     yes) ;;
10565     no)  ;;
10566
10567     /*)
10568      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
10569 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6; }
10570      d=$with_sgivc/include
10571      if test -d $d; then
10572        X_CFLAGS="-I$d $X_CFLAGS"
10573        { echo "$as_me:$LINENO: result: $d" >&5
10574 echo "${ECHO_T}$d" >&6; }
10575      else
10576        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10577 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10578      fi
10579
10580      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
10581 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6; }
10582      d=$with_sgivc/lib
10583      if test -d $d; then
10584        X_LIBS="-L$d $X_LIBS"
10585        { echo "$as_me:$LINENO: result: $d" >&5
10586 echo "${ECHO_T}$d" >&6; }
10587      else
10588        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10589 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10590      fi
10591
10592      # replace the directory string with "yes".
10593      with_sgivc_req="yes"
10594      with_sgivc=$with_sgivc_req
10595      ;;
10596
10597     *)
10598      echo ""
10599      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10600      echo "       If it is a directory, then \`DIR/include' will be added to"
10601      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10602      exit 1
10603      ;;
10604    esac
10605
10606
10607 if test "$with_sgivc" = yes; then
10608
10609   # first check for XSGIvc.h
10610
10611   ac_save_CPPFLAGS="$CPPFLAGS"
10612   if test \! -z "$includedir" ; then
10613     CPPFLAGS="$CPPFLAGS -I$includedir"
10614   fi
10615   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10616   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10617   { echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
10618 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6; }
10619 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
10620   echo $ECHO_N "(cached) $ECHO_C" >&6
10621 else
10622   cat >conftest.$ac_ext <<_ACEOF
10623 /* confdefs.h.  */
10624 _ACEOF
10625 cat confdefs.h >>conftest.$ac_ext
10626 cat >>conftest.$ac_ext <<_ACEOF
10627 /* end confdefs.h.  */
10628 #include <X11/Xlib.h>
10629
10630 #include <X11/extensions/XSGIvc.h>
10631 _ACEOF
10632 rm -f conftest.$ac_objext
10633 if { (ac_try="$ac_compile"
10634 case "(($ac_try" in
10635   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10636   *) ac_try_echo=$ac_try;;
10637 esac
10638 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10639   (eval "$ac_compile") 2>conftest.er1
10640   ac_status=$?
10641   grep -v '^ *+' conftest.er1 >conftest.err
10642   rm -f conftest.er1
10643   cat conftest.err >&5
10644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10645   (exit $ac_status); } && {
10646          test -z "$ac_c_werror_flag" ||
10647          test ! -s conftest.err
10648        } && test -s conftest.$ac_objext; then
10649   ac_cv_header_X11_extensions_XSGIvc_h=yes
10650 else
10651   echo "$as_me: failed program was:" >&5
10652 sed 's/^/| /' conftest.$ac_ext >&5
10653
10654         ac_cv_header_X11_extensions_XSGIvc_h=no
10655 fi
10656
10657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10658 fi
10659 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
10660 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6; }
10661 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10662   have_sgivc=yes
10663 fi
10664
10665
10666   CPPFLAGS="$ac_save_CPPFLAGS"
10667
10668   # if that succeeded, then check for the -lXsgivc
10669   if test "$have_sgivc" = yes; then
10670     have_sgivc=no
10671
10672   ac_save_CPPFLAGS="$CPPFLAGS"
10673   ac_save_LDFLAGS="$LDFLAGS"
10674 #  ac_save_LIBS="$LIBS"
10675
10676   if test \! -z "$includedir" ; then
10677     CPPFLAGS="$CPPFLAGS -I$includedir"
10678   fi
10679   # note: $X_CFLAGS includes $x_includes
10680   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10681
10682   if test \! -z "$libdir" ; then
10683     LDFLAGS="$LDFLAGS -L$libdir"
10684   fi
10685   # note: $X_LIBS includes $x_libraries
10686   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10687
10688   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10689   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10690   { echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10691 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6; }
10692 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10693   echo $ECHO_N "(cached) $ECHO_C" >&6
10694 else
10695   ac_check_lib_save_LIBS=$LIBS
10696 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10697 cat >conftest.$ac_ext <<_ACEOF
10698 /* confdefs.h.  */
10699 _ACEOF
10700 cat confdefs.h >>conftest.$ac_ext
10701 cat >>conftest.$ac_ext <<_ACEOF
10702 /* end confdefs.h.  */
10703
10704 /* Override any GCC internal prototype to avoid an error.
10705    Use char because int might match the return type of a GCC
10706    builtin and then its argument prototype would still apply.  */
10707 #ifdef __cplusplus
10708 extern "C"
10709 #endif
10710 char XSGIvcQueryGammaMap ();
10711 int
10712 main ()
10713 {
10714 return XSGIvcQueryGammaMap ();
10715   ;
10716   return 0;
10717 }
10718 _ACEOF
10719 rm -f conftest.$ac_objext conftest$ac_exeext
10720 if { (ac_try="$ac_link"
10721 case "(($ac_try" in
10722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10723   *) ac_try_echo=$ac_try;;
10724 esac
10725 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10726   (eval "$ac_link") 2>conftest.er1
10727   ac_status=$?
10728   grep -v '^ *+' conftest.er1 >conftest.err
10729   rm -f conftest.er1
10730   cat conftest.err >&5
10731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10732   (exit $ac_status); } && {
10733          test -z "$ac_c_werror_flag" ||
10734          test ! -s conftest.err
10735        } && test -s conftest$ac_exeext &&
10736        $as_test_x conftest$ac_exeext; then
10737   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10738 else
10739   echo "$as_me: failed program was:" >&5
10740 sed 's/^/| /' conftest.$ac_ext >&5
10741
10742         ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10743 fi
10744
10745 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10746       conftest$ac_exeext conftest.$ac_ext
10747 LIBS=$ac_check_lib_save_LIBS
10748 fi
10749 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10750 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
10751 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10752   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10753 else
10754   true
10755 fi
10756
10757   CPPFLAGS="$ac_save_CPPFLAGS"
10758   LDFLAGS="$ac_save_LDFLAGS"
10759 #  LIBS="$ac_save_LIBS"
10760
10761   fi
10762
10763   # if that succeeded, then we've really got it.
10764   if test "$have_sgivc" = yes; then
10765     cat >>confdefs.h <<\_ACEOF
10766 #define HAVE_SGI_VC_EXTENSION 1
10767 _ACEOF
10768
10769   fi
10770
10771 elif test "$with_sgivc" != no; then
10772   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10773   exit 1
10774 fi
10775
10776
10777 ###############################################################################
10778 #
10779 #       Check for the DPMS server extension.
10780 #
10781 ###############################################################################
10782
10783 have_dpms=no
10784 with_dpms_req=unspecified
10785
10786 # Check whether --with-dpms-ext was given.
10787 if test "${with_dpms_ext+set}" = set; then
10788   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
10789 else
10790   with_dpms=yes
10791 fi
10792
10793
10794
10795    case "$with_dpms" in
10796     yes) ;;
10797     no)  ;;
10798
10799     /*)
10800      { echo "$as_me:$LINENO: checking for DPMS headers" >&5
10801 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6; }
10802      d=$with_dpms/include
10803      if test -d $d; then
10804        X_CFLAGS="-I$d $X_CFLAGS"
10805        { echo "$as_me:$LINENO: result: $d" >&5
10806 echo "${ECHO_T}$d" >&6; }
10807      else
10808        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10809 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10810      fi
10811
10812      { echo "$as_me:$LINENO: checking for DPMS libs" >&5
10813 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6; }
10814      d=$with_dpms/lib
10815      if test -d $d; then
10816        X_LIBS="-L$d $X_LIBS"
10817        { echo "$as_me:$LINENO: result: $d" >&5
10818 echo "${ECHO_T}$d" >&6; }
10819      else
10820        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10821 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10822      fi
10823
10824      # replace the directory string with "yes".
10825      with_dpms_req="yes"
10826      with_dpms=$with_dpms_req
10827      ;;
10828
10829     *)
10830      echo ""
10831      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10832      echo "       If it is a directory, then \`DIR/include' will be added to"
10833      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10834      exit 1
10835      ;;
10836    esac
10837
10838
10839 if test "$with_dpms" = yes; then
10840
10841   # first check for dpms.h
10842
10843   ac_save_CPPFLAGS="$CPPFLAGS"
10844   if test \! -z "$includedir" ; then
10845     CPPFLAGS="$CPPFLAGS -I$includedir"
10846   fi
10847   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10848   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10849   { echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10850 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6; }
10851 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10852   echo $ECHO_N "(cached) $ECHO_C" >&6
10853 else
10854   cat >conftest.$ac_ext <<_ACEOF
10855 /* confdefs.h.  */
10856 _ACEOF
10857 cat confdefs.h >>conftest.$ac_ext
10858 cat >>conftest.$ac_ext <<_ACEOF
10859 /* end confdefs.h.  */
10860 #include <X11/Xlib.h>
10861                      #include <X11/Xmd.h>
10862
10863 #include <X11/extensions/dpms.h>
10864 _ACEOF
10865 rm -f conftest.$ac_objext
10866 if { (ac_try="$ac_compile"
10867 case "(($ac_try" in
10868   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10869   *) ac_try_echo=$ac_try;;
10870 esac
10871 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10872   (eval "$ac_compile") 2>conftest.er1
10873   ac_status=$?
10874   grep -v '^ *+' conftest.er1 >conftest.err
10875   rm -f conftest.er1
10876   cat conftest.err >&5
10877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10878   (exit $ac_status); } && {
10879          test -z "$ac_c_werror_flag" ||
10880          test ! -s conftest.err
10881        } && test -s conftest.$ac_objext; then
10882   ac_cv_header_X11_extensions_dpms_h=yes
10883 else
10884   echo "$as_me: failed program was:" >&5
10885 sed 's/^/| /' conftest.$ac_ext >&5
10886
10887         ac_cv_header_X11_extensions_dpms_h=no
10888 fi
10889
10890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10891 fi
10892 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10893 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6; }
10894 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10895   have_dpms=yes
10896 fi
10897
10898
10899   CPPFLAGS="$ac_save_CPPFLAGS"
10900
10901   # if that succeeded, then check for the DPMS code in the libraries
10902   if test "$have_dpms" = yes; then
10903
10904     # first look in -lXext (this is where it is with XFree86 4.0)
10905     have_dpms=no
10906
10907   ac_save_CPPFLAGS="$CPPFLAGS"
10908   ac_save_LDFLAGS="$LDFLAGS"
10909 #  ac_save_LIBS="$LIBS"
10910
10911   if test \! -z "$includedir" ; then
10912     CPPFLAGS="$CPPFLAGS -I$includedir"
10913   fi
10914   # note: $X_CFLAGS includes $x_includes
10915   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10916
10917   if test \! -z "$libdir" ; then
10918     LDFLAGS="$LDFLAGS -L$libdir"
10919   fi
10920   # note: $X_LIBS includes $x_libraries
10921   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10922
10923   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10924   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10925   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10926 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6; }
10927 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
10928   echo $ECHO_N "(cached) $ECHO_C" >&6
10929 else
10930   ac_check_lib_save_LIBS=$LIBS
10931 LIBS="-lXext -lXext -lX11 $LIBS"
10932 cat >conftest.$ac_ext <<_ACEOF
10933 /* confdefs.h.  */
10934 _ACEOF
10935 cat confdefs.h >>conftest.$ac_ext
10936 cat >>conftest.$ac_ext <<_ACEOF
10937 /* end confdefs.h.  */
10938
10939 /* Override any GCC internal prototype to avoid an error.
10940    Use char because int might match the return type of a GCC
10941    builtin and then its argument prototype would still apply.  */
10942 #ifdef __cplusplus
10943 extern "C"
10944 #endif
10945 char DPMSInfo ();
10946 int
10947 main ()
10948 {
10949 return DPMSInfo ();
10950   ;
10951   return 0;
10952 }
10953 _ACEOF
10954 rm -f conftest.$ac_objext conftest$ac_exeext
10955 if { (ac_try="$ac_link"
10956 case "(($ac_try" in
10957   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10958   *) ac_try_echo=$ac_try;;
10959 esac
10960 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10961   (eval "$ac_link") 2>conftest.er1
10962   ac_status=$?
10963   grep -v '^ *+' conftest.er1 >conftest.err
10964   rm -f conftest.er1
10965   cat conftest.err >&5
10966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10967   (exit $ac_status); } && {
10968          test -z "$ac_c_werror_flag" ||
10969          test ! -s conftest.err
10970        } && test -s conftest$ac_exeext &&
10971        $as_test_x conftest$ac_exeext; then
10972   ac_cv_lib_Xext_DPMSInfo=yes
10973 else
10974   echo "$as_me: failed program was:" >&5
10975 sed 's/^/| /' conftest.$ac_ext >&5
10976
10977         ac_cv_lib_Xext_DPMSInfo=no
10978 fi
10979
10980 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10981       conftest$ac_exeext conftest.$ac_ext
10982 LIBS=$ac_check_lib_save_LIBS
10983 fi
10984 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
10985 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6; }
10986 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
10987   have_dpms=yes
10988 else
10989   true
10990 fi
10991
10992   CPPFLAGS="$ac_save_CPPFLAGS"
10993   LDFLAGS="$ac_save_LDFLAGS"
10994 #  LIBS="$ac_save_LIBS"
10995
10996
10997     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
10998     if test "$have_dpms" = no; then
10999
11000   ac_save_CPPFLAGS="$CPPFLAGS"
11001   ac_save_LDFLAGS="$LDFLAGS"
11002 #  ac_save_LIBS="$LIBS"
11003
11004   if test \! -z "$includedir" ; then
11005     CPPFLAGS="$CPPFLAGS -I$includedir"
11006   fi
11007   # note: $X_CFLAGS includes $x_includes
11008   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11009
11010   if test \! -z "$libdir" ; then
11011     LDFLAGS="$LDFLAGS -L$libdir"
11012   fi
11013   # note: $X_LIBS includes $x_libraries
11014   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11015
11016   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11017   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11018   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11019 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6; }
11020 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11021   echo $ECHO_N "(cached) $ECHO_C" >&6
11022 else
11023   ac_check_lib_save_LIBS=$LIBS
11024 LIBS="-lXdpms -lXext -lX11 $LIBS"
11025 cat >conftest.$ac_ext <<_ACEOF
11026 /* confdefs.h.  */
11027 _ACEOF
11028 cat confdefs.h >>conftest.$ac_ext
11029 cat >>conftest.$ac_ext <<_ACEOF
11030 /* end confdefs.h.  */
11031
11032 /* Override any GCC internal prototype to avoid an error.
11033    Use char because int might match the return type of a GCC
11034    builtin and then its argument prototype would still apply.  */
11035 #ifdef __cplusplus
11036 extern "C"
11037 #endif
11038 char DPMSInfo ();
11039 int
11040 main ()
11041 {
11042 return DPMSInfo ();
11043   ;
11044   return 0;
11045 }
11046 _ACEOF
11047 rm -f conftest.$ac_objext conftest$ac_exeext
11048 if { (ac_try="$ac_link"
11049 case "(($ac_try" in
11050   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11051   *) ac_try_echo=$ac_try;;
11052 esac
11053 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11054   (eval "$ac_link") 2>conftest.er1
11055   ac_status=$?
11056   grep -v '^ *+' conftest.er1 >conftest.err
11057   rm -f conftest.er1
11058   cat conftest.err >&5
11059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11060   (exit $ac_status); } && {
11061          test -z "$ac_c_werror_flag" ||
11062          test ! -s conftest.err
11063        } && test -s conftest$ac_exeext &&
11064        $as_test_x conftest$ac_exeext; then
11065   ac_cv_lib_Xdpms_DPMSInfo=yes
11066 else
11067   echo "$as_me: failed program was:" >&5
11068 sed 's/^/| /' conftest.$ac_ext >&5
11069
11070         ac_cv_lib_Xdpms_DPMSInfo=no
11071 fi
11072
11073 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11074       conftest$ac_exeext conftest.$ac_ext
11075 LIBS=$ac_check_lib_save_LIBS
11076 fi
11077 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11078 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11079 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
11080   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11081 else
11082   true
11083 fi
11084
11085   CPPFLAGS="$ac_save_CPPFLAGS"
11086   LDFLAGS="$ac_save_LDFLAGS"
11087 #  LIBS="$ac_save_LIBS"
11088
11089     fi
11090   fi
11091
11092
11093   # if that succeeded, then we've really got it.
11094   if test "$have_dpms" = yes; then
11095     cat >>confdefs.h <<\_ACEOF
11096 #define HAVE_DPMS_EXTENSION 1
11097 _ACEOF
11098
11099   fi
11100
11101 elif test "$with_dpms" != no; then
11102   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11103   exit 1
11104 fi
11105
11106
11107 ###############################################################################
11108 #
11109 #       Check for the XINERAMA server extension.
11110 #
11111 ###############################################################################
11112
11113 have_xinerama=no
11114 with_xinerama_req=unspecified
11115
11116 # Check whether --with-xinerama-ext was given.
11117 if test "${with_xinerama_ext+set}" = set; then
11118   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11119 else
11120   with_xinerama=yes
11121 fi
11122
11123
11124
11125    case "$with_xinerama" in
11126     yes) ;;
11127     no)  ;;
11128
11129     /*)
11130      { echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11131 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6; }
11132      d=$with_xinerama/include
11133      if test -d $d; then
11134        X_CFLAGS="-I$d $X_CFLAGS"
11135        { echo "$as_me:$LINENO: result: $d" >&5
11136 echo "${ECHO_T}$d" >&6; }
11137      else
11138        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11139 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11140      fi
11141
11142      { echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11143 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6; }
11144      d=$with_xinerama/lib
11145      if test -d $d; then
11146        X_LIBS="-L$d $X_LIBS"
11147        { echo "$as_me:$LINENO: result: $d" >&5
11148 echo "${ECHO_T}$d" >&6; }
11149      else
11150        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11151 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11152      fi
11153
11154      # replace the directory string with "yes".
11155      with_xinerama_req="yes"
11156      with_xinerama=$with_xinerama_req
11157      ;;
11158
11159     *)
11160      echo ""
11161      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11162      echo "       If it is a directory, then \`DIR/include' will be added to"
11163      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11164      exit 1
11165      ;;
11166    esac
11167
11168
11169 if test "$with_xinerama" = yes; then
11170
11171   # first check for Xinerama.h
11172
11173   ac_save_CPPFLAGS="$CPPFLAGS"
11174   if test \! -z "$includedir" ; then
11175     CPPFLAGS="$CPPFLAGS -I$includedir"
11176   fi
11177   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11178   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11179   { echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11180 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
11181 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11182   echo $ECHO_N "(cached) $ECHO_C" >&6
11183 else
11184   cat >conftest.$ac_ext <<_ACEOF
11185 /* confdefs.h.  */
11186 _ACEOF
11187 cat confdefs.h >>conftest.$ac_ext
11188 cat >>conftest.$ac_ext <<_ACEOF
11189 /* end confdefs.h.  */
11190 #include <X11/Xlib.h>
11191
11192 #include <X11/extensions/Xinerama.h>
11193 _ACEOF
11194 rm -f conftest.$ac_objext
11195 if { (ac_try="$ac_compile"
11196 case "(($ac_try" in
11197   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11198   *) ac_try_echo=$ac_try;;
11199 esac
11200 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11201   (eval "$ac_compile") 2>conftest.er1
11202   ac_status=$?
11203   grep -v '^ *+' conftest.er1 >conftest.err
11204   rm -f conftest.er1
11205   cat conftest.err >&5
11206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11207   (exit $ac_status); } && {
11208          test -z "$ac_c_werror_flag" ||
11209          test ! -s conftest.err
11210        } && test -s conftest.$ac_objext; then
11211   ac_cv_header_X11_extensions_Xinerama_h=yes
11212 else
11213   echo "$as_me: failed program was:" >&5
11214 sed 's/^/| /' conftest.$ac_ext >&5
11215
11216         ac_cv_header_X11_extensions_Xinerama_h=no
11217 fi
11218
11219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11220 fi
11221 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11222 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11223 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
11224   have_xinerama=yes
11225 fi
11226
11227
11228   CPPFLAGS="$ac_save_CPPFLAGS"
11229
11230   # if that succeeded, then check for the XINERAMA code in the libraries
11231   if test "$have_xinerama" = yes; then
11232
11233     # first look in -lXext
11234     have_xinerama=no
11235
11236   ac_save_CPPFLAGS="$CPPFLAGS"
11237   ac_save_LDFLAGS="$LDFLAGS"
11238 #  ac_save_LIBS="$LIBS"
11239
11240   if test \! -z "$includedir" ; then
11241     CPPFLAGS="$CPPFLAGS -I$includedir"
11242   fi
11243   # note: $X_CFLAGS includes $x_includes
11244   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11245
11246   if test \! -z "$libdir" ; then
11247     LDFLAGS="$LDFLAGS -L$libdir"
11248   fi
11249   # note: $X_LIBS includes $x_libraries
11250   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11251
11252   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11253   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11254   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11255 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6; }
11256 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11257   echo $ECHO_N "(cached) $ECHO_C" >&6
11258 else
11259   ac_check_lib_save_LIBS=$LIBS
11260 LIBS="-lXext -lXext -lX11 $LIBS"
11261 cat >conftest.$ac_ext <<_ACEOF
11262 /* confdefs.h.  */
11263 _ACEOF
11264 cat confdefs.h >>conftest.$ac_ext
11265 cat >>conftest.$ac_ext <<_ACEOF
11266 /* end confdefs.h.  */
11267
11268 /* Override any GCC internal prototype to avoid an error.
11269    Use char because int might match the return type of a GCC
11270    builtin and then its argument prototype would still apply.  */
11271 #ifdef __cplusplus
11272 extern "C"
11273 #endif
11274 char XineramaQueryScreens ();
11275 int
11276 main ()
11277 {
11278 return XineramaQueryScreens ();
11279   ;
11280   return 0;
11281 }
11282 _ACEOF
11283 rm -f conftest.$ac_objext conftest$ac_exeext
11284 if { (ac_try="$ac_link"
11285 case "(($ac_try" in
11286   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11287   *) ac_try_echo=$ac_try;;
11288 esac
11289 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11290   (eval "$ac_link") 2>conftest.er1
11291   ac_status=$?
11292   grep -v '^ *+' conftest.er1 >conftest.err
11293   rm -f conftest.er1
11294   cat conftest.err >&5
11295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11296   (exit $ac_status); } && {
11297          test -z "$ac_c_werror_flag" ||
11298          test ! -s conftest.err
11299        } && test -s conftest$ac_exeext &&
11300        $as_test_x conftest$ac_exeext; then
11301   ac_cv_lib_Xext_XineramaQueryScreens=yes
11302 else
11303   echo "$as_me: failed program was:" >&5
11304 sed 's/^/| /' conftest.$ac_ext >&5
11305
11306         ac_cv_lib_Xext_XineramaQueryScreens=no
11307 fi
11308
11309 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11310       conftest$ac_exeext conftest.$ac_ext
11311 LIBS=$ac_check_lib_save_LIBS
11312 fi
11313 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11314 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11315 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
11316   have_xinerama=yes
11317 else
11318   true
11319 fi
11320
11321   CPPFLAGS="$ac_save_CPPFLAGS"
11322   LDFLAGS="$ac_save_LDFLAGS"
11323 #  LIBS="$ac_save_LIBS"
11324
11325
11326     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11327     if test "$have_xinerama" = no; then
11328
11329   ac_save_CPPFLAGS="$CPPFLAGS"
11330   ac_save_LDFLAGS="$LDFLAGS"
11331 #  ac_save_LIBS="$LIBS"
11332
11333   if test \! -z "$includedir" ; then
11334     CPPFLAGS="$CPPFLAGS -I$includedir"
11335   fi
11336   # note: $X_CFLAGS includes $x_includes
11337   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11338
11339   if test \! -z "$libdir" ; then
11340     LDFLAGS="$LDFLAGS -L$libdir"
11341   fi
11342   # note: $X_LIBS includes $x_libraries
11343   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11344
11345   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11346   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11347   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11348 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6; }
11349 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11350   echo $ECHO_N "(cached) $ECHO_C" >&6
11351 else
11352   ac_check_lib_save_LIBS=$LIBS
11353 LIBS="-lXinerama -lXext -lX11 $LIBS"
11354 cat >conftest.$ac_ext <<_ACEOF
11355 /* confdefs.h.  */
11356 _ACEOF
11357 cat confdefs.h >>conftest.$ac_ext
11358 cat >>conftest.$ac_ext <<_ACEOF
11359 /* end confdefs.h.  */
11360
11361 /* Override any GCC internal prototype to avoid an error.
11362    Use char because int might match the return type of a GCC
11363    builtin and then its argument prototype would still apply.  */
11364 #ifdef __cplusplus
11365 extern "C"
11366 #endif
11367 char XineramaQueryScreens ();
11368 int
11369 main ()
11370 {
11371 return XineramaQueryScreens ();
11372   ;
11373   return 0;
11374 }
11375 _ACEOF
11376 rm -f conftest.$ac_objext conftest$ac_exeext
11377 if { (ac_try="$ac_link"
11378 case "(($ac_try" in
11379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11380   *) ac_try_echo=$ac_try;;
11381 esac
11382 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11383   (eval "$ac_link") 2>conftest.er1
11384   ac_status=$?
11385   grep -v '^ *+' conftest.er1 >conftest.err
11386   rm -f conftest.er1
11387   cat conftest.err >&5
11388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11389   (exit $ac_status); } && {
11390          test -z "$ac_c_werror_flag" ||
11391          test ! -s conftest.err
11392        } && test -s conftest$ac_exeext &&
11393        $as_test_x conftest$ac_exeext; then
11394   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11395 else
11396   echo "$as_me: failed program was:" >&5
11397 sed 's/^/| /' conftest.$ac_ext >&5
11398
11399         ac_cv_lib_Xinerama_XineramaQueryScreens=no
11400 fi
11401
11402 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11403       conftest$ac_exeext conftest.$ac_ext
11404 LIBS=$ac_check_lib_save_LIBS
11405 fi
11406 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11407 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
11408 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11409   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
11410 else
11411   true
11412 fi
11413
11414   CPPFLAGS="$ac_save_CPPFLAGS"
11415   LDFLAGS="$ac_save_LDFLAGS"
11416 #  LIBS="$ac_save_LIBS"
11417
11418     fi
11419   fi
11420
11421   # if that succeeded, then we've really got it.
11422   if test "$have_xinerama" = yes; then
11423     cat >>confdefs.h <<\_ACEOF
11424 #define HAVE_XINERAMA 1
11425 _ACEOF
11426
11427   fi
11428
11429 elif test "$with_xinerama" != no; then
11430   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11431   exit 1
11432 fi
11433
11434
11435 ###############################################################################
11436 #
11437 #       Check for the XF86VMODE server extension (for virtual screens.)
11438 #
11439 ###############################################################################
11440
11441 have_xf86vmode=no
11442 with_xf86vmode_req=unspecified
11443
11444 # Check whether --with-xf86vmode-ext was given.
11445 if test "${with_xf86vmode_ext+set}" = set; then
11446   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11447 else
11448   with_xf86vmode=yes
11449 fi
11450
11451
11452
11453    case "$with_xf86vmode" in
11454     yes) ;;
11455     no)  ;;
11456
11457     /*)
11458      { echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11459 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6; }
11460      d=$with_xf86vmode/include
11461      if test -d $d; then
11462        X_CFLAGS="-I$d $X_CFLAGS"
11463        { echo "$as_me:$LINENO: result: $d" >&5
11464 echo "${ECHO_T}$d" >&6; }
11465      else
11466        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11467 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11468      fi
11469
11470      { echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11471 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6; }
11472      d=$with_xf86vmode/lib
11473      if test -d $d; then
11474        X_LIBS="-L$d $X_LIBS"
11475        { echo "$as_me:$LINENO: result: $d" >&5
11476 echo "${ECHO_T}$d" >&6; }
11477      else
11478        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11479 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11480      fi
11481
11482      # replace the directory string with "yes".
11483      with_xf86vmode_req="yes"
11484      with_xf86vmode=$with_xf86vmode_req
11485      ;;
11486
11487     *)
11488      echo ""
11489      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11490      echo "       If it is a directory, then \`DIR/include' will be added to"
11491      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11492      exit 1
11493      ;;
11494    esac
11495
11496
11497 VIDMODE_LIBS=""
11498
11499 if test "$with_xf86vmode" = yes; then
11500
11501   # first check for xf86vmode.h
11502
11503   ac_save_CPPFLAGS="$CPPFLAGS"
11504   if test \! -z "$includedir" ; then
11505     CPPFLAGS="$CPPFLAGS -I$includedir"
11506   fi
11507   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11508   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11509   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11510 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11511 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11512   echo $ECHO_N "(cached) $ECHO_C" >&6
11513 else
11514   cat >conftest.$ac_ext <<_ACEOF
11515 /* confdefs.h.  */
11516 _ACEOF
11517 cat confdefs.h >>conftest.$ac_ext
11518 cat >>conftest.$ac_ext <<_ACEOF
11519 /* end confdefs.h.  */
11520 #include <X11/Xlib.h>
11521
11522 #include <X11/extensions/xf86vmode.h>
11523 _ACEOF
11524 rm -f conftest.$ac_objext
11525 if { (ac_try="$ac_compile"
11526 case "(($ac_try" in
11527   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11528   *) ac_try_echo=$ac_try;;
11529 esac
11530 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11531   (eval "$ac_compile") 2>conftest.er1
11532   ac_status=$?
11533   grep -v '^ *+' conftest.er1 >conftest.err
11534   rm -f conftest.er1
11535   cat conftest.err >&5
11536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11537   (exit $ac_status); } && {
11538          test -z "$ac_c_werror_flag" ||
11539          test ! -s conftest.err
11540        } && test -s conftest.$ac_objext; then
11541   ac_cv_header_X11_extensions_xf86vmode_h=yes
11542 else
11543   echo "$as_me: failed program was:" >&5
11544 sed 's/^/| /' conftest.$ac_ext >&5
11545
11546         ac_cv_header_X11_extensions_xf86vmode_h=no
11547 fi
11548
11549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11550 fi
11551 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11552 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11553 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11554   have_xf86vmode=yes
11555 fi
11556
11557
11558   CPPFLAGS="$ac_save_CPPFLAGS"
11559
11560   # if that succeeded, then check for the -lXxf86vm
11561   if test "$have_xf86vmode" = yes; then
11562     have_xf86vmode=no
11563
11564   ac_save_CPPFLAGS="$CPPFLAGS"
11565   ac_save_LDFLAGS="$LDFLAGS"
11566 #  ac_save_LIBS="$LIBS"
11567
11568   if test \! -z "$includedir" ; then
11569     CPPFLAGS="$CPPFLAGS -I$includedir"
11570   fi
11571   # note: $X_CFLAGS includes $x_includes
11572   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11573
11574   if test \! -z "$libdir" ; then
11575     LDFLAGS="$LDFLAGS -L$libdir"
11576   fi
11577   # note: $X_LIBS includes $x_libraries
11578   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11579
11580   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11581   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11582   { echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
11583 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6; }
11584 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
11585   echo $ECHO_N "(cached) $ECHO_C" >&6
11586 else
11587   ac_check_lib_save_LIBS=$LIBS
11588 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11589 cat >conftest.$ac_ext <<_ACEOF
11590 /* confdefs.h.  */
11591 _ACEOF
11592 cat confdefs.h >>conftest.$ac_ext
11593 cat >>conftest.$ac_ext <<_ACEOF
11594 /* end confdefs.h.  */
11595
11596 /* Override any GCC internal prototype to avoid an error.
11597    Use char because int might match the return type of a GCC
11598    builtin and then its argument prototype would still apply.  */
11599 #ifdef __cplusplus
11600 extern "C"
11601 #endif
11602 char XF86VidModeGetViewPort ();
11603 int
11604 main ()
11605 {
11606 return XF86VidModeGetViewPort ();
11607   ;
11608   return 0;
11609 }
11610 _ACEOF
11611 rm -f conftest.$ac_objext conftest$ac_exeext
11612 if { (ac_try="$ac_link"
11613 case "(($ac_try" in
11614   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11615   *) ac_try_echo=$ac_try;;
11616 esac
11617 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11618   (eval "$ac_link") 2>conftest.er1
11619   ac_status=$?
11620   grep -v '^ *+' conftest.er1 >conftest.err
11621   rm -f conftest.er1
11622   cat conftest.err >&5
11623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11624   (exit $ac_status); } && {
11625          test -z "$ac_c_werror_flag" ||
11626          test ! -s conftest.err
11627        } && test -s conftest$ac_exeext &&
11628        $as_test_x conftest$ac_exeext; then
11629   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
11630 else
11631   echo "$as_me: failed program was:" >&5
11632 sed 's/^/| /' conftest.$ac_ext >&5
11633
11634         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
11635 fi
11636
11637 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11638       conftest$ac_exeext conftest.$ac_ext
11639 LIBS=$ac_check_lib_save_LIBS
11640 fi
11641 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
11642 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
11643 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
11644   have_xf86vmode=yes;
11645                    VIDMODE_LIBS="-lXxf86vm";
11646                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11647 else
11648   true
11649 fi
11650
11651   CPPFLAGS="$ac_save_CPPFLAGS"
11652   LDFLAGS="$ac_save_LDFLAGS"
11653 #  LIBS="$ac_save_LIBS"
11654
11655   fi
11656
11657   # if that succeeded, then we've really got it.
11658   if test "$have_xf86vmode" = yes; then
11659     cat >>confdefs.h <<\_ACEOF
11660 #define HAVE_XF86VMODE 1
11661 _ACEOF
11662
11663   fi
11664
11665 elif test "$with_xf86vmode" != no; then
11666   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11667   exit 1
11668 fi
11669
11670
11671 ###############################################################################
11672 #
11673 #       Check for the XF86VMODE server extension (for gamma fading.)
11674 #
11675 ###############################################################################
11676
11677 have_xf86gamma=no
11678 have_xf86gamma_ramp=no
11679 with_xf86gamma_req=unspecified
11680
11681 # Check whether --with-xf86gamma-ext was given.
11682 if test "${with_xf86gamma_ext+set}" = set; then
11683   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11684 else
11685   with_xf86gamma=yes
11686 fi
11687
11688
11689
11690    case "$with_xf86gamma" in
11691     yes) ;;
11692     no)  ;;
11693
11694     /*)
11695      { echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11696 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6; }
11697      d=$with_xf86gamma/include
11698      if test -d $d; then
11699        X_CFLAGS="-I$d $X_CFLAGS"
11700        { echo "$as_me:$LINENO: result: $d" >&5
11701 echo "${ECHO_T}$d" >&6; }
11702      else
11703        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11704 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11705      fi
11706
11707      { echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11708 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6; }
11709      d=$with_xf86gamma/lib
11710      if test -d $d; then
11711        X_LIBS="-L$d $X_LIBS"
11712        { echo "$as_me:$LINENO: result: $d" >&5
11713 echo "${ECHO_T}$d" >&6; }
11714      else
11715        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11716 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11717      fi
11718
11719      # replace the directory string with "yes".
11720      with_xf86gamma_req="yes"
11721      with_xf86gamma=$with_xf86gamma_req
11722      ;;
11723
11724     *)
11725      echo ""
11726      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11727      echo "       If it is a directory, then \`DIR/include' will be added to"
11728      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11729      exit 1
11730      ;;
11731    esac
11732
11733
11734 if test "$with_xf86gamma" = yes; then
11735
11736   # first check for xf86vmode.h, if we haven't already
11737   if test "$have_xf86vmode" = yes; then
11738     have_xf86gamma=yes
11739   else
11740
11741   ac_save_CPPFLAGS="$CPPFLAGS"
11742   if test \! -z "$includedir" ; then
11743     CPPFLAGS="$CPPFLAGS -I$includedir"
11744   fi
11745   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11746   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11747   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11748 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11749 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11750   echo $ECHO_N "(cached) $ECHO_C" >&6
11751 else
11752   cat >conftest.$ac_ext <<_ACEOF
11753 /* confdefs.h.  */
11754 _ACEOF
11755 cat confdefs.h >>conftest.$ac_ext
11756 cat >>conftest.$ac_ext <<_ACEOF
11757 /* end confdefs.h.  */
11758 #include <X11/Xlib.h>
11759
11760 #include <X11/extensions/xf86vmode.h>
11761 _ACEOF
11762 rm -f conftest.$ac_objext
11763 if { (ac_try="$ac_compile"
11764 case "(($ac_try" in
11765   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11766   *) ac_try_echo=$ac_try;;
11767 esac
11768 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11769   (eval "$ac_compile") 2>conftest.er1
11770   ac_status=$?
11771   grep -v '^ *+' conftest.er1 >conftest.err
11772   rm -f conftest.er1
11773   cat conftest.err >&5
11774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11775   (exit $ac_status); } && {
11776          test -z "$ac_c_werror_flag" ||
11777          test ! -s conftest.err
11778        } && test -s conftest.$ac_objext; then
11779   ac_cv_header_X11_extensions_xf86vmode_h=yes
11780 else
11781   echo "$as_me: failed program was:" >&5
11782 sed 's/^/| /' conftest.$ac_ext >&5
11783
11784         ac_cv_header_X11_extensions_xf86vmode_h=no
11785 fi
11786
11787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11788 fi
11789 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11790 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11791 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11792   have_xf86gamma=yes
11793 fi
11794
11795
11796   CPPFLAGS="$ac_save_CPPFLAGS"
11797   fi
11798
11799   # if that succeeded, then check for the -lXxf86vm
11800   if test "$have_xf86gamma" = yes; then
11801     have_xf86gamma=no
11802
11803   ac_save_CPPFLAGS="$CPPFLAGS"
11804   ac_save_LDFLAGS="$LDFLAGS"
11805 #  ac_save_LIBS="$LIBS"
11806
11807   if test \! -z "$includedir" ; then
11808     CPPFLAGS="$CPPFLAGS -I$includedir"
11809   fi
11810   # note: $X_CFLAGS includes $x_includes
11811   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11812
11813   if test \! -z "$libdir" ; then
11814     LDFLAGS="$LDFLAGS -L$libdir"
11815   fi
11816   # note: $X_LIBS includes $x_libraries
11817   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11818
11819   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11820   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11821   { echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11822 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6; }
11823 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11824   echo $ECHO_N "(cached) $ECHO_C" >&6
11825 else
11826   ac_check_lib_save_LIBS=$LIBS
11827 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11828 cat >conftest.$ac_ext <<_ACEOF
11829 /* confdefs.h.  */
11830 _ACEOF
11831 cat confdefs.h >>conftest.$ac_ext
11832 cat >>conftest.$ac_ext <<_ACEOF
11833 /* end confdefs.h.  */
11834
11835 /* Override any GCC internal prototype to avoid an error.
11836    Use char because int might match the return type of a GCC
11837    builtin and then its argument prototype would still apply.  */
11838 #ifdef __cplusplus
11839 extern "C"
11840 #endif
11841 char XF86VidModeSetGamma ();
11842 int
11843 main ()
11844 {
11845 return XF86VidModeSetGamma ();
11846   ;
11847   return 0;
11848 }
11849 _ACEOF
11850 rm -f conftest.$ac_objext conftest$ac_exeext
11851 if { (ac_try="$ac_link"
11852 case "(($ac_try" in
11853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11854   *) ac_try_echo=$ac_try;;
11855 esac
11856 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11857   (eval "$ac_link") 2>conftest.er1
11858   ac_status=$?
11859   grep -v '^ *+' conftest.er1 >conftest.err
11860   rm -f conftest.er1
11861   cat conftest.err >&5
11862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11863   (exit $ac_status); } && {
11864          test -z "$ac_c_werror_flag" ||
11865          test ! -s conftest.err
11866        } && test -s conftest$ac_exeext &&
11867        $as_test_x conftest$ac_exeext; then
11868   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11869 else
11870   echo "$as_me: failed program was:" >&5
11871 sed 's/^/| /' conftest.$ac_ext >&5
11872
11873         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11874 fi
11875
11876 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11877       conftest$ac_exeext conftest.$ac_ext
11878 LIBS=$ac_check_lib_save_LIBS
11879 fi
11880 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11881 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
11882 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11883   have_xf86gamma=yes
11884 else
11885   true
11886 fi
11887
11888   CPPFLAGS="$ac_save_CPPFLAGS"
11889   LDFLAGS="$ac_save_LDFLAGS"
11890 #  LIBS="$ac_save_LIBS"
11891
11892   fi
11893
11894   # check for the Ramp versions of the functions too.
11895   if test "$have_xf86gamma" = yes; then
11896     have_xf86gamma_ramp=no
11897
11898   ac_save_CPPFLAGS="$CPPFLAGS"
11899   ac_save_LDFLAGS="$LDFLAGS"
11900 #  ac_save_LIBS="$LIBS"
11901
11902   if test \! -z "$includedir" ; then
11903     CPPFLAGS="$CPPFLAGS -I$includedir"
11904   fi
11905   # note: $X_CFLAGS includes $x_includes
11906   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11907
11908   if test \! -z "$libdir" ; then
11909     LDFLAGS="$LDFLAGS -L$libdir"
11910   fi
11911   # note: $X_LIBS includes $x_libraries
11912   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11913
11914   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11915   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11916   { echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11917 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6; }
11918 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11919   echo $ECHO_N "(cached) $ECHO_C" >&6
11920 else
11921   ac_check_lib_save_LIBS=$LIBS
11922 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11923 cat >conftest.$ac_ext <<_ACEOF
11924 /* confdefs.h.  */
11925 _ACEOF
11926 cat confdefs.h >>conftest.$ac_ext
11927 cat >>conftest.$ac_ext <<_ACEOF
11928 /* end confdefs.h.  */
11929
11930 /* Override any GCC internal prototype to avoid an error.
11931    Use char because int might match the return type of a GCC
11932    builtin and then its argument prototype would still apply.  */
11933 #ifdef __cplusplus
11934 extern "C"
11935 #endif
11936 char XF86VidModeSetGammaRamp ();
11937 int
11938 main ()
11939 {
11940 return XF86VidModeSetGammaRamp ();
11941   ;
11942   return 0;
11943 }
11944 _ACEOF
11945 rm -f conftest.$ac_objext conftest$ac_exeext
11946 if { (ac_try="$ac_link"
11947 case "(($ac_try" in
11948   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11949   *) ac_try_echo=$ac_try;;
11950 esac
11951 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11952   (eval "$ac_link") 2>conftest.er1
11953   ac_status=$?
11954   grep -v '^ *+' conftest.er1 >conftest.err
11955   rm -f conftest.er1
11956   cat conftest.err >&5
11957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11958   (exit $ac_status); } && {
11959          test -z "$ac_c_werror_flag" ||
11960          test ! -s conftest.err
11961        } && test -s conftest$ac_exeext &&
11962        $as_test_x conftest$ac_exeext; then
11963   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
11964 else
11965   echo "$as_me: failed program was:" >&5
11966 sed 's/^/| /' conftest.$ac_ext >&5
11967
11968         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
11969 fi
11970
11971 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11972       conftest$ac_exeext conftest.$ac_ext
11973 LIBS=$ac_check_lib_save_LIBS
11974 fi
11975 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
11976 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
11977 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
11978   have_xf86gamma_ramp=yes
11979 else
11980   true
11981 fi
11982
11983   CPPFLAGS="$ac_save_CPPFLAGS"
11984   LDFLAGS="$ac_save_LDFLAGS"
11985 #  LIBS="$ac_save_LIBS"
11986
11987   fi
11988
11989   # if those tests succeeded, then we've really got the functions.
11990   if test "$have_xf86gamma" = yes; then
11991     cat >>confdefs.h <<\_ACEOF
11992 #define HAVE_XF86VMODE_GAMMA 1
11993 _ACEOF
11994
11995   fi
11996
11997   if test "$have_xf86gamma_ramp" = yes; then
11998     cat >>confdefs.h <<\_ACEOF
11999 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12000 _ACEOF
12001
12002   fi
12003
12004   # pull in the lib, if we haven't already
12005   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12006     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12007   fi
12008
12009 elif test "$with_xf86gamma" != no; then
12010   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12011   exit 1
12012 fi
12013
12014
12015 ###############################################################################
12016 #
12017 #       Check for the RANDR (Resize and Rotate) server extension.
12018 #
12019 #       We need this to detect when the resolution of the desktop
12020 #       has changed out from under us (this is a newer, different
12021 #       mechanism than the XF86VMODE virtual viewports.)
12022 #
12023 ###############################################################################
12024
12025 have_randr=no
12026 with_randr_req=unspecified
12027
12028 # Check whether --with-randr-ext was given.
12029 if test "${with_randr_ext+set}" = set; then
12030   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12031 else
12032   with_randr=yes
12033 fi
12034
12035
12036
12037    case "$with_randr" in
12038     yes) ;;
12039     no)  ;;
12040
12041     /*)
12042      { echo "$as_me:$LINENO: checking for RANDR headers" >&5
12043 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6; }
12044      d=$with_randr/include
12045      if test -d $d; then
12046        X_CFLAGS="-I$d $X_CFLAGS"
12047        { echo "$as_me:$LINENO: result: $d" >&5
12048 echo "${ECHO_T}$d" >&6; }
12049      else
12050        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12051 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12052      fi
12053
12054      { echo "$as_me:$LINENO: checking for RANDR libs" >&5
12055 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6; }
12056      d=$with_randr/lib
12057      if test -d $d; then
12058        X_LIBS="-L$d $X_LIBS"
12059        { echo "$as_me:$LINENO: result: $d" >&5
12060 echo "${ECHO_T}$d" >&6; }
12061      else
12062        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12063 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12064      fi
12065
12066      # replace the directory string with "yes".
12067      with_randr_req="yes"
12068      with_randr=$with_randr_req
12069      ;;
12070
12071     *)
12072      echo ""
12073      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12074      echo "       If it is a directory, then \`DIR/include' will be added to"
12075      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12076      exit 1
12077      ;;
12078    esac
12079
12080
12081 if test "$with_randr" = yes; then
12082
12083   # first check for Randr.h
12084
12085   ac_save_CPPFLAGS="$CPPFLAGS"
12086   if test \! -z "$includedir" ; then
12087     CPPFLAGS="$CPPFLAGS -I$includedir"
12088   fi
12089   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12090   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12091   { echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12092 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6; }
12093 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
12094   echo $ECHO_N "(cached) $ECHO_C" >&6
12095 else
12096   cat >conftest.$ac_ext <<_ACEOF
12097 /* confdefs.h.  */
12098 _ACEOF
12099 cat confdefs.h >>conftest.$ac_ext
12100 cat >>conftest.$ac_ext <<_ACEOF
12101 /* end confdefs.h.  */
12102 #include <X11/Xlib.h>
12103
12104 #include <X11/extensions/Xrandr.h>
12105 _ACEOF
12106 rm -f conftest.$ac_objext
12107 if { (ac_try="$ac_compile"
12108 case "(($ac_try" in
12109   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12110   *) ac_try_echo=$ac_try;;
12111 esac
12112 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12113   (eval "$ac_compile") 2>conftest.er1
12114   ac_status=$?
12115   grep -v '^ *+' conftest.er1 >conftest.err
12116   rm -f conftest.er1
12117   cat conftest.err >&5
12118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12119   (exit $ac_status); } && {
12120          test -z "$ac_c_werror_flag" ||
12121          test ! -s conftest.err
12122        } && test -s conftest.$ac_objext; then
12123   ac_cv_header_X11_extensions_Xrandr_h=yes
12124 else
12125   echo "$as_me: failed program was:" >&5
12126 sed 's/^/| /' conftest.$ac_ext >&5
12127
12128         ac_cv_header_X11_extensions_Xrandr_h=no
12129 fi
12130
12131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12132 fi
12133 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
12134 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
12135 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
12136   have_randr=yes
12137 fi
12138
12139
12140   CPPFLAGS="$ac_save_CPPFLAGS"
12141
12142   # if that succeeded, then check for the XRR code in the libraries
12143   if test "$have_randr" = yes; then
12144
12145     # RANDR probably needs -lXrender
12146     xrender_libs=
12147
12148   ac_save_CPPFLAGS="$CPPFLAGS"
12149   ac_save_LDFLAGS="$LDFLAGS"
12150 #  ac_save_LIBS="$LIBS"
12151
12152   if test \! -z "$includedir" ; then
12153     CPPFLAGS="$CPPFLAGS -I$includedir"
12154   fi
12155   # note: $X_CFLAGS includes $x_includes
12156   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12157
12158   if test \! -z "$libdir" ; then
12159     LDFLAGS="$LDFLAGS -L$libdir"
12160   fi
12161   # note: $X_LIBS includes $x_libraries
12162   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12163
12164   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12165   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12166   { echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
12167 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6; }
12168 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
12169   echo $ECHO_N "(cached) $ECHO_C" >&6
12170 else
12171   ac_check_lib_save_LIBS=$LIBS
12172 LIBS="-lXrender -lXext -lX11 $LIBS"
12173 cat >conftest.$ac_ext <<_ACEOF
12174 /* confdefs.h.  */
12175 _ACEOF
12176 cat confdefs.h >>conftest.$ac_ext
12177 cat >>conftest.$ac_ext <<_ACEOF
12178 /* end confdefs.h.  */
12179
12180 /* Override any GCC internal prototype to avoid an error.
12181    Use char because int might match the return type of a GCC
12182    builtin and then its argument prototype would still apply.  */
12183 #ifdef __cplusplus
12184 extern "C"
12185 #endif
12186 char XRenderSetSubpixelOrder ();
12187 int
12188 main ()
12189 {
12190 return XRenderSetSubpixelOrder ();
12191   ;
12192   return 0;
12193 }
12194 _ACEOF
12195 rm -f conftest.$ac_objext conftest$ac_exeext
12196 if { (ac_try="$ac_link"
12197 case "(($ac_try" in
12198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12199   *) ac_try_echo=$ac_try;;
12200 esac
12201 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12202   (eval "$ac_link") 2>conftest.er1
12203   ac_status=$?
12204   grep -v '^ *+' conftest.er1 >conftest.err
12205   rm -f conftest.er1
12206   cat conftest.err >&5
12207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12208   (exit $ac_status); } && {
12209          test -z "$ac_c_werror_flag" ||
12210          test ! -s conftest.err
12211        } && test -s conftest$ac_exeext &&
12212        $as_test_x conftest$ac_exeext; then
12213   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12214 else
12215   echo "$as_me: failed program was:" >&5
12216 sed 's/^/| /' conftest.$ac_ext >&5
12217
12218         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12219 fi
12220
12221 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12222       conftest$ac_exeext conftest.$ac_ext
12223 LIBS=$ac_check_lib_save_LIBS
12224 fi
12225 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12226 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
12227 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
12228   xrender_libs="-lXrender"
12229 else
12230   true
12231 fi
12232
12233   CPPFLAGS="$ac_save_CPPFLAGS"
12234   LDFLAGS="$ac_save_LDFLAGS"
12235 #  LIBS="$ac_save_LIBS"
12236
12237
12238     # first look for RANDR in -lXext
12239     have_randr=no
12240
12241   ac_save_CPPFLAGS="$CPPFLAGS"
12242   ac_save_LDFLAGS="$LDFLAGS"
12243 #  ac_save_LIBS="$LIBS"
12244
12245   if test \! -z "$includedir" ; then
12246     CPPFLAGS="$CPPFLAGS -I$includedir"
12247   fi
12248   # note: $X_CFLAGS includes $x_includes
12249   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12250
12251   if test \! -z "$libdir" ; then
12252     LDFLAGS="$LDFLAGS -L$libdir"
12253   fi
12254   # note: $X_LIBS includes $x_libraries
12255   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12256
12257   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12258   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12259   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12260 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6; }
12261 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12262   echo $ECHO_N "(cached) $ECHO_C" >&6
12263 else
12264   ac_check_lib_save_LIBS=$LIBS
12265 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12266 cat >conftest.$ac_ext <<_ACEOF
12267 /* confdefs.h.  */
12268 _ACEOF
12269 cat confdefs.h >>conftest.$ac_ext
12270 cat >>conftest.$ac_ext <<_ACEOF
12271 /* end confdefs.h.  */
12272
12273 /* Override any GCC internal prototype to avoid an error.
12274    Use char because int might match the return type of a GCC
12275    builtin and then its argument prototype would still apply.  */
12276 #ifdef __cplusplus
12277 extern "C"
12278 #endif
12279 char XRRGetScreenInfo ();
12280 int
12281 main ()
12282 {
12283 return XRRGetScreenInfo ();
12284   ;
12285   return 0;
12286 }
12287 _ACEOF
12288 rm -f conftest.$ac_objext conftest$ac_exeext
12289 if { (ac_try="$ac_link"
12290 case "(($ac_try" in
12291   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12292   *) ac_try_echo=$ac_try;;
12293 esac
12294 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12295   (eval "$ac_link") 2>conftest.er1
12296   ac_status=$?
12297   grep -v '^ *+' conftest.er1 >conftest.err
12298   rm -f conftest.er1
12299   cat conftest.err >&5
12300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12301   (exit $ac_status); } && {
12302          test -z "$ac_c_werror_flag" ||
12303          test ! -s conftest.err
12304        } && test -s conftest$ac_exeext &&
12305        $as_test_x conftest$ac_exeext; then
12306   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12307 else
12308   echo "$as_me: failed program was:" >&5
12309 sed 's/^/| /' conftest.$ac_ext >&5
12310
12311         ac_cv_lib_Xext_XRRGetScreenInfo=no
12312 fi
12313
12314 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12315       conftest$ac_exeext conftest.$ac_ext
12316 LIBS=$ac_check_lib_save_LIBS
12317 fi
12318 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12319 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
12320 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
12321   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12322 else
12323   true
12324 fi
12325
12326   CPPFLAGS="$ac_save_CPPFLAGS"
12327   LDFLAGS="$ac_save_LDFLAGS"
12328 #  LIBS="$ac_save_LIBS"
12329
12330
12331     # if that failed, look in -lXrandr
12332     if test "$have_randr" = no; then
12333
12334   ac_save_CPPFLAGS="$CPPFLAGS"
12335   ac_save_LDFLAGS="$LDFLAGS"
12336 #  ac_save_LIBS="$LIBS"
12337
12338   if test \! -z "$includedir" ; then
12339     CPPFLAGS="$CPPFLAGS -I$includedir"
12340   fi
12341   # note: $X_CFLAGS includes $x_includes
12342   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12343
12344   if test \! -z "$libdir" ; then
12345     LDFLAGS="$LDFLAGS -L$libdir"
12346   fi
12347   # note: $X_LIBS includes $x_libraries
12348   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12349
12350   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12351   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12352   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12353 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6; }
12354 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12355   echo $ECHO_N "(cached) $ECHO_C" >&6
12356 else
12357   ac_check_lib_save_LIBS=$LIBS
12358 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12359 cat >conftest.$ac_ext <<_ACEOF
12360 /* confdefs.h.  */
12361 _ACEOF
12362 cat confdefs.h >>conftest.$ac_ext
12363 cat >>conftest.$ac_ext <<_ACEOF
12364 /* end confdefs.h.  */
12365
12366 /* Override any GCC internal prototype to avoid an error.
12367    Use char because int might match the return type of a GCC
12368    builtin and then its argument prototype would still apply.  */
12369 #ifdef __cplusplus
12370 extern "C"
12371 #endif
12372 char XRRGetScreenInfo ();
12373 int
12374 main ()
12375 {
12376 return XRRGetScreenInfo ();
12377   ;
12378   return 0;
12379 }
12380 _ACEOF
12381 rm -f conftest.$ac_objext conftest$ac_exeext
12382 if { (ac_try="$ac_link"
12383 case "(($ac_try" in
12384   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12385   *) ac_try_echo=$ac_try;;
12386 esac
12387 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12388   (eval "$ac_link") 2>conftest.er1
12389   ac_status=$?
12390   grep -v '^ *+' conftest.er1 >conftest.err
12391   rm -f conftest.er1
12392   cat conftest.err >&5
12393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12394   (exit $ac_status); } && {
12395          test -z "$ac_c_werror_flag" ||
12396          test ! -s conftest.err
12397        } && test -s conftest$ac_exeext &&
12398        $as_test_x conftest$ac_exeext; then
12399   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12400 else
12401   echo "$as_me: failed program was:" >&5
12402 sed 's/^/| /' conftest.$ac_ext >&5
12403
12404         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12405 fi
12406
12407 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12408       conftest$ac_exeext conftest.$ac_ext
12409 LIBS=$ac_check_lib_save_LIBS
12410 fi
12411 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12412 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
12413 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
12414   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12415 else
12416   true
12417 fi
12418
12419   CPPFLAGS="$ac_save_CPPFLAGS"
12420   LDFLAGS="$ac_save_LDFLAGS"
12421 #  LIBS="$ac_save_LIBS"
12422
12423     fi
12424   fi
12425
12426   # if that succeeded, then we've really got it.
12427   if test "$have_randr" = yes; then
12428     cat >>confdefs.h <<\_ACEOF
12429 #define HAVE_RANDR 1
12430 _ACEOF
12431
12432   fi
12433
12434 elif test "$with_randr" != no; then
12435   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12436   exit 1
12437 fi
12438
12439
12440 ###############################################################################
12441 #
12442 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12443 #       using other XF86 stuff.)
12444 #
12445 ###############################################################################
12446
12447 have_xf86miscsetgrabkeysstate=no
12448 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
12449
12450   ac_save_CPPFLAGS="$CPPFLAGS"
12451   ac_save_LDFLAGS="$LDFLAGS"
12452 #  ac_save_LIBS="$LIBS"
12453
12454   if test \! -z "$includedir" ; then
12455     CPPFLAGS="$CPPFLAGS -I$includedir"
12456   fi
12457   # note: $X_CFLAGS includes $x_includes
12458   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12459
12460   if test \! -z "$libdir" ; then
12461     LDFLAGS="$LDFLAGS -L$libdir"
12462   fi
12463   # note: $X_LIBS includes $x_libraries
12464   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12465
12466   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12467   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12468   { echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
12469 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6; }
12470 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
12471   echo $ECHO_N "(cached) $ECHO_C" >&6
12472 else
12473   ac_check_lib_save_LIBS=$LIBS
12474 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
12475 cat >conftest.$ac_ext <<_ACEOF
12476 /* confdefs.h.  */
12477 _ACEOF
12478 cat confdefs.h >>conftest.$ac_ext
12479 cat >>conftest.$ac_ext <<_ACEOF
12480 /* end confdefs.h.  */
12481
12482 /* Override any GCC internal prototype to avoid an error.
12483    Use char because int might match the return type of a GCC
12484    builtin and then its argument prototype would still apply.  */
12485 #ifdef __cplusplus
12486 extern "C"
12487 #endif
12488 char XF86MiscSetGrabKeysState ();
12489 int
12490 main ()
12491 {
12492 return XF86MiscSetGrabKeysState ();
12493   ;
12494   return 0;
12495 }
12496 _ACEOF
12497 rm -f conftest.$ac_objext conftest$ac_exeext
12498 if { (ac_try="$ac_link"
12499 case "(($ac_try" in
12500   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12501   *) ac_try_echo=$ac_try;;
12502 esac
12503 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12504   (eval "$ac_link") 2>conftest.er1
12505   ac_status=$?
12506   grep -v '^ *+' conftest.er1 >conftest.err
12507   rm -f conftest.er1
12508   cat conftest.err >&5
12509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12510   (exit $ac_status); } && {
12511          test -z "$ac_c_werror_flag" ||
12512          test ! -s conftest.err
12513        } && test -s conftest$ac_exeext &&
12514        $as_test_x conftest$ac_exeext; then
12515   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
12516 else
12517   echo "$as_me: failed program was:" >&5
12518 sed 's/^/| /' conftest.$ac_ext >&5
12519
12520         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
12521 fi
12522
12523 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12524       conftest$ac_exeext conftest.$ac_ext
12525 LIBS=$ac_check_lib_save_LIBS
12526 fi
12527 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
12528 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
12529 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
12530   have_xf86miscsetgrabkeysstate=yes
12531 else
12532   true
12533 fi
12534
12535   CPPFLAGS="$ac_save_CPPFLAGS"
12536   LDFLAGS="$ac_save_LDFLAGS"
12537 #  LIBS="$ac_save_LIBS"
12538
12539   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
12540     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
12541     cat >>confdefs.h <<\_ACEOF
12542 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
12543 _ACEOF
12544
12545   fi
12546 fi
12547
12548
12549 ###############################################################################
12550 #
12551 #       Check for HP XHPDisableReset and XHPEnableReset.
12552 #
12553 ###############################################################################
12554
12555 { echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
12556 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6; }
12557
12558   ac_save_CPPFLAGS="$CPPFLAGS"
12559   if test \! -z "$includedir" ; then
12560     CPPFLAGS="$CPPFLAGS -I$includedir"
12561   fi
12562   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12563   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12564   cat >conftest.$ac_ext <<_ACEOF
12565 /* confdefs.h.  */
12566 _ACEOF
12567 cat confdefs.h >>conftest.$ac_ext
12568 cat >>conftest.$ac_ext <<_ACEOF
12569 /* end confdefs.h.  */
12570 #include <X11/XHPlib.h>
12571
12572 _ACEOF
12573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12574   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
12575   cat >>confdefs.h <<\_ACEOF
12576 #define HAVE_XHPDISABLERESET 1
12577 _ACEOF
12578
12579                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
12580                    { echo "$as_me:$LINENO: result: yes" >&5
12581 echo "${ECHO_T}yes" >&6; }
12582 else
12583   { echo "$as_me:$LINENO: result: no" >&5
12584 echo "${ECHO_T}no" >&6; }
12585 fi
12586 rm -f conftest*
12587
12588   CPPFLAGS="$ac_save_CPPFLAGS"
12589
12590
12591 ###############################################################################
12592 #
12593 #       Check for /proc/interrupts.
12594 #
12595 ###############################################################################
12596
12597 have_proc_interrupts=no
12598 with_proc_interrupts_req=unspecified
12599
12600 # Check whether --with-proc-interrupts was given.
12601 if test "${with_proc_interrupts+set}" = set; then
12602   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
12603 else
12604   with_proc_interrupts=yes
12605 fi
12606
12607
12608 if test "$with_proc_interrupts" = yes; then
12609
12610   # Note that we may be building in an environment (e.g. Debian buildd chroot)
12611   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
12612   # check that it has the bits we need, but otherwise we'll just go on faith.
12613   #
12614   have_proc_interrupts=yes
12615
12616   if test -f /proc/interrupts; then
12617    { echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
12618 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6; }
12619 if test "${ac_cv_have_proc_interrupts+set}" = set; then
12620   echo $ECHO_N "(cached) $ECHO_C" >&6
12621 else
12622   ac_cv_have_proc_interrupts=no
12623      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
12624        ac_cv_have_proc_interrupts=yes
12625      fi
12626
12627 fi
12628 { echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
12629 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6; }
12630    have_proc_interrupts=$ac_cv_have_proc_interrupts
12631   fi
12632
12633   if test "$have_proc_interrupts" = yes; then
12634     cat >>confdefs.h <<\_ACEOF
12635 #define HAVE_PROC_INTERRUPTS 1
12636 _ACEOF
12637
12638   fi
12639
12640 elif test "$with_proc_interrupts" != no; then
12641   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
12642   exit 1
12643 fi
12644
12645
12646 ###############################################################################
12647 #
12648 #       The --enable-locking option
12649 #
12650 ###############################################################################
12651
12652 # Check whether --enable-locking was given.
12653 if test "${enable_locking+set}" = set; then
12654   enableval=$enable_locking; enable_locking="$enableval"
12655 else
12656   enable_locking=yes
12657 fi
12658
12659 if test "$enable_locking" = yes; then
12660   true
12661 elif test "$enable_locking" = no; then
12662   cat >>confdefs.h <<\_ACEOF
12663 #define NO_LOCKING 1
12664 _ACEOF
12665
12666 else
12667   echo "error: must be yes or no: --enable-locking=$enable_locking"
12668   exit 1
12669 fi
12670
12671 # We can't lock on MacOS X, so don't even bother compiling in support for it.
12672 #
12673 if test "$ac_macosx" = yes; then
12674   if test "$enable_locking" = yes; then
12675     { echo "$as_me:$LINENO: result: locking disabled: it doesn't work on MacOS X" >&5
12676 echo "${ECHO_T}locking disabled: it doesn't work on MacOS X" >&6; }
12677     enable_locking=no
12678     cat >>confdefs.h <<\_ACEOF
12679 #define NO_LOCKING 1
12680 _ACEOF
12681
12682   fi
12683 fi
12684
12685
12686 ###############################################################################
12687 #
12688 #       Whether to allow root password to unblank.
12689 #
12690 ###############################################################################
12691 # Check whether --enable-root-passwd was given.
12692 if test "${enable_root_passwd+set}" = set; then
12693   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
12694 else
12695   enable_root_passwd=yes
12696 fi
12697
12698 if test "$enable_root_passwd" = yes; then
12699   cat >>confdefs.h <<\_ACEOF
12700 #define ALLOW_ROOT_PASSWD 1
12701 _ACEOF
12702
12703   true
12704 elif test "$enable_root_passwd" != no; then
12705   echo "error: something wrong with root-passwd option. Check configure.in ."
12706   exit 1
12707 fi
12708
12709 ###############################################################################
12710 #
12711 #       Check for PAM.
12712 #
12713 ###############################################################################
12714
12715 case "$host" in
12716   *-solaris*)
12717    # Solaris systems tend to come with PAM misconfigured.
12718    #  Don't build it by default, even if the headers exist.
12719    with_pam_default=no
12720    ;;
12721   *)
12722    # Default to building PAM support on all other systems, if it exists.
12723    with_pam_default=yes
12724   ;;
12725 esac
12726
12727 have_pam=no
12728 with_pam_req=unspecified
12729
12730
12731 # Check whether --with-pam was given.
12732 if test "${with_pam+set}" = set; then
12733   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
12734 else
12735   with_pam=$with_pam_default
12736 fi
12737
12738
12739
12740 # Check whether --with-pam_service_name was given.
12741 if test "${with_pam_service_name+set}" = set; then
12742   withval=$with_pam_service_name; pam_service_name="$withval"
12743 else
12744   pam_service_name="xscreensaver"
12745 fi
12746
12747
12748
12749    case "$with_pam" in
12750     yes) ;;
12751     no)  ;;
12752
12753     /*)
12754      { echo "$as_me:$LINENO: checking for PAM headers" >&5
12755 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6; }
12756      d=$with_pam/include
12757      if test -d $d; then
12758        X_CFLAGS="-I$d $X_CFLAGS"
12759        { echo "$as_me:$LINENO: result: $d" >&5
12760 echo "${ECHO_T}$d" >&6; }
12761      else
12762        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12763 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12764      fi
12765
12766      { echo "$as_me:$LINENO: checking for PAM libs" >&5
12767 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6; }
12768      d=$with_pam/lib
12769      if test -d $d; then
12770        X_LIBS="-L$d $X_LIBS"
12771        { echo "$as_me:$LINENO: result: $d" >&5
12772 echo "${ECHO_T}$d" >&6; }
12773      else
12774        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12775 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12776      fi
12777
12778      # replace the directory string with "yes".
12779      with_pam_req="yes"
12780      with_pam=$with_pam_req
12781      ;;
12782
12783     *)
12784      echo ""
12785      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12786      echo "       If it is a directory, then \`DIR/include' will be added to"
12787      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12788      exit 1
12789      ;;
12790    esac
12791
12792
12793 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12794   { echo "$as_me:$LINENO: checking for PAM" >&5
12795 echo $ECHO_N "checking for PAM... $ECHO_C" >&6; }
12796 if test "${ac_cv_pam+set}" = set; then
12797   echo $ECHO_N "(cached) $ECHO_C" >&6
12798 else
12799
12800   ac_save_CPPFLAGS="$CPPFLAGS"
12801   if test \! -z "$includedir" ; then
12802     CPPFLAGS="$CPPFLAGS -I$includedir"
12803   fi
12804   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12805   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12806   cat >conftest.$ac_ext <<_ACEOF
12807 /* confdefs.h.  */
12808 _ACEOF
12809 cat confdefs.h >>conftest.$ac_ext
12810 cat >>conftest.$ac_ext <<_ACEOF
12811 /* end confdefs.h.  */
12812 #include <security/pam_appl.h>
12813 int
12814 main ()
12815 {
12816
12817   ;
12818   return 0;
12819 }
12820 _ACEOF
12821 rm -f conftest.$ac_objext
12822 if { (ac_try="$ac_compile"
12823 case "(($ac_try" in
12824   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12825   *) ac_try_echo=$ac_try;;
12826 esac
12827 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12828   (eval "$ac_compile") 2>conftest.er1
12829   ac_status=$?
12830   grep -v '^ *+' conftest.er1 >conftest.err
12831   rm -f conftest.er1
12832   cat conftest.err >&5
12833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12834   (exit $ac_status); } && {
12835          test -z "$ac_c_werror_flag" ||
12836          test ! -s conftest.err
12837        } && test -s conftest.$ac_objext; then
12838   ac_cv_pam=yes
12839 else
12840   echo "$as_me: failed program was:" >&5
12841 sed 's/^/| /' conftest.$ac_ext >&5
12842
12843         ac_cv_pam=no
12844 fi
12845
12846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12847   CPPFLAGS="$ac_save_CPPFLAGS"
12848 fi
12849 { echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12850 echo "${ECHO_T}$ac_cv_pam" >&6; }
12851   if test "$ac_cv_pam" = yes ; then
12852     have_pam=yes
12853     cat >>confdefs.h <<\_ACEOF
12854 #define HAVE_PAM 1
12855 _ACEOF
12856
12857     cat >>confdefs.h <<_ACEOF
12858 #define PAM_SERVICE_NAME "$pam_service_name"
12859 _ACEOF
12860
12861
12862     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
12863
12864     # libpam typically requires dlopen and dlsym.  On FreeBSD,
12865     # those are in libc.  On Linux and Solaris, they're in libdl.
12866     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12867 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
12868 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12869   echo $ECHO_N "(cached) $ECHO_C" >&6
12870 else
12871   ac_check_lib_save_LIBS=$LIBS
12872 LIBS="-ldl  $LIBS"
12873 cat >conftest.$ac_ext <<_ACEOF
12874 /* confdefs.h.  */
12875 _ACEOF
12876 cat confdefs.h >>conftest.$ac_ext
12877 cat >>conftest.$ac_ext <<_ACEOF
12878 /* end confdefs.h.  */
12879
12880 /* Override any GCC internal prototype to avoid an error.
12881    Use char because int might match the return type of a GCC
12882    builtin and then its argument prototype would still apply.  */
12883 #ifdef __cplusplus
12884 extern "C"
12885 #endif
12886 char dlopen ();
12887 int
12888 main ()
12889 {
12890 return dlopen ();
12891   ;
12892   return 0;
12893 }
12894 _ACEOF
12895 rm -f conftest.$ac_objext conftest$ac_exeext
12896 if { (ac_try="$ac_link"
12897 case "(($ac_try" in
12898   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12899   *) ac_try_echo=$ac_try;;
12900 esac
12901 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12902   (eval "$ac_link") 2>conftest.er1
12903   ac_status=$?
12904   grep -v '^ *+' conftest.er1 >conftest.err
12905   rm -f conftest.er1
12906   cat conftest.err >&5
12907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12908   (exit $ac_status); } && {
12909          test -z "$ac_c_werror_flag" ||
12910          test ! -s conftest.err
12911        } && test -s conftest$ac_exeext &&
12912        $as_test_x conftest$ac_exeext; then
12913   ac_cv_lib_dl_dlopen=yes
12914 else
12915   echo "$as_me: failed program was:" >&5
12916 sed 's/^/| /' conftest.$ac_ext >&5
12917
12918         ac_cv_lib_dl_dlopen=no
12919 fi
12920
12921 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12922       conftest$ac_exeext conftest.$ac_ext
12923 LIBS=$ac_check_lib_save_LIBS
12924 fi
12925 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12926 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
12927 if test $ac_cv_lib_dl_dlopen = yes; then
12928   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
12929 fi
12930
12931
12932     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
12933     have_timedwait=no
12934     { echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
12935 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6; }
12936 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
12937   echo $ECHO_N "(cached) $ECHO_C" >&6
12938 else
12939   ac_check_lib_save_LIBS=$LIBS
12940 LIBS="-lc  $LIBS"
12941 cat >conftest.$ac_ext <<_ACEOF
12942 /* confdefs.h.  */
12943 _ACEOF
12944 cat confdefs.h >>conftest.$ac_ext
12945 cat >>conftest.$ac_ext <<_ACEOF
12946 /* end confdefs.h.  */
12947
12948 /* Override any GCC internal prototype to avoid an error.
12949    Use char because int might match the return type of a GCC
12950    builtin and then its argument prototype would still apply.  */
12951 #ifdef __cplusplus
12952 extern "C"
12953 #endif
12954 char sigtimedwait ();
12955 int
12956 main ()
12957 {
12958 return sigtimedwait ();
12959   ;
12960   return 0;
12961 }
12962 _ACEOF
12963 rm -f conftest.$ac_objext conftest$ac_exeext
12964 if { (ac_try="$ac_link"
12965 case "(($ac_try" in
12966   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12967   *) ac_try_echo=$ac_try;;
12968 esac
12969 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12970   (eval "$ac_link") 2>conftest.er1
12971   ac_status=$?
12972   grep -v '^ *+' conftest.er1 >conftest.err
12973   rm -f conftest.er1
12974   cat conftest.err >&5
12975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12976   (exit $ac_status); } && {
12977          test -z "$ac_c_werror_flag" ||
12978          test ! -s conftest.err
12979        } && test -s conftest$ac_exeext &&
12980        $as_test_x conftest$ac_exeext; then
12981   ac_cv_lib_c_sigtimedwait=yes
12982 else
12983   echo "$as_me: failed program was:" >&5
12984 sed 's/^/| /' conftest.$ac_ext >&5
12985
12986         ac_cv_lib_c_sigtimedwait=no
12987 fi
12988
12989 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12990       conftest$ac_exeext conftest.$ac_ext
12991 LIBS=$ac_check_lib_save_LIBS
12992 fi
12993 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
12994 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6; }
12995 if test $ac_cv_lib_c_sigtimedwait = yes; then
12996   have_timedwait=yes
12997 fi
12998
12999     if test "$have_timedwait" = no ; then
13000       { echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
13001 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6; }
13002 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
13003   echo $ECHO_N "(cached) $ECHO_C" >&6
13004 else
13005   ac_check_lib_save_LIBS=$LIBS
13006 LIBS="-lrt  $LIBS"
13007 cat >conftest.$ac_ext <<_ACEOF
13008 /* confdefs.h.  */
13009 _ACEOF
13010 cat confdefs.h >>conftest.$ac_ext
13011 cat >>conftest.$ac_ext <<_ACEOF
13012 /* end confdefs.h.  */
13013
13014 /* Override any GCC internal prototype to avoid an error.
13015    Use char because int might match the return type of a GCC
13016    builtin and then its argument prototype would still apply.  */
13017 #ifdef __cplusplus
13018 extern "C"
13019 #endif
13020 char sigtimedwait ();
13021 int
13022 main ()
13023 {
13024 return sigtimedwait ();
13025   ;
13026   return 0;
13027 }
13028 _ACEOF
13029 rm -f conftest.$ac_objext conftest$ac_exeext
13030 if { (ac_try="$ac_link"
13031 case "(($ac_try" in
13032   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13033   *) ac_try_echo=$ac_try;;
13034 esac
13035 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13036   (eval "$ac_link") 2>conftest.er1
13037   ac_status=$?
13038   grep -v '^ *+' conftest.er1 >conftest.err
13039   rm -f conftest.er1
13040   cat conftest.err >&5
13041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13042   (exit $ac_status); } && {
13043          test -z "$ac_c_werror_flag" ||
13044          test ! -s conftest.err
13045        } && test -s conftest$ac_exeext &&
13046        $as_test_x conftest$ac_exeext; then
13047   ac_cv_lib_rt_sigtimedwait=yes
13048 else
13049   echo "$as_me: failed program was:" >&5
13050 sed 's/^/| /' conftest.$ac_ext >&5
13051
13052         ac_cv_lib_rt_sigtimedwait=no
13053 fi
13054
13055 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13056       conftest$ac_exeext conftest.$ac_ext
13057 LIBS=$ac_check_lib_save_LIBS
13058 fi
13059 { echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
13060 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6; }
13061 if test $ac_cv_lib_rt_sigtimedwait = yes; then
13062   PASSWD_LIBS="${PASSWD_LIBS} -lrt"
13063 fi
13064
13065     fi
13066
13067     { echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
13068 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6; }
13069     if test "${ac_cv_pam_strerror_args+set}" = set; then
13070   echo $ECHO_N "(cached) $ECHO_C" >&6
13071 else
13072   cat >conftest.$ac_ext <<_ACEOF
13073 /* confdefs.h.  */
13074 _ACEOF
13075 cat confdefs.h >>conftest.$ac_ext
13076 cat >>conftest.$ac_ext <<_ACEOF
13077 /* end confdefs.h.  */
13078 #include <stdio.h>
13079                       #include <stdlib.h>
13080                       #include <security/pam_appl.h>
13081 int
13082 main ()
13083 {
13084 pam_handle_t *pamh = 0;
13085                       char *s = pam_strerror(pamh, PAM_SUCCESS);
13086   ;
13087   return 0;
13088 }
13089 _ACEOF
13090 rm -f conftest.$ac_objext
13091 if { (ac_try="$ac_compile"
13092 case "(($ac_try" in
13093   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13094   *) ac_try_echo=$ac_try;;
13095 esac
13096 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13097   (eval "$ac_compile") 2>conftest.er1
13098   ac_status=$?
13099   grep -v '^ *+' conftest.er1 >conftest.err
13100   rm -f conftest.er1
13101   cat conftest.err >&5
13102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13103   (exit $ac_status); } && {
13104          test -z "$ac_c_werror_flag" ||
13105          test ! -s conftest.err
13106        } && test -s conftest.$ac_objext; then
13107   ac_pam_strerror_args=2
13108 else
13109   echo "$as_me: failed program was:" >&5
13110 sed 's/^/| /' conftest.$ac_ext >&5
13111
13112         cat >conftest.$ac_ext <<_ACEOF
13113 /* confdefs.h.  */
13114 _ACEOF
13115 cat confdefs.h >>conftest.$ac_ext
13116 cat >>conftest.$ac_ext <<_ACEOF
13117 /* end confdefs.h.  */
13118 #include <stdio.h>
13119                                       #include <stdlib.h>
13120                                       #include <security/pam_appl.h>
13121 int
13122 main ()
13123 {
13124 char *s =
13125                                        pam_strerror(PAM_SUCCESS);
13126   ;
13127   return 0;
13128 }
13129 _ACEOF
13130 rm -f conftest.$ac_objext
13131 if { (ac_try="$ac_compile"
13132 case "(($ac_try" in
13133   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13134   *) ac_try_echo=$ac_try;;
13135 esac
13136 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13137   (eval "$ac_compile") 2>conftest.er1
13138   ac_status=$?
13139   grep -v '^ *+' conftest.er1 >conftest.err
13140   rm -f conftest.er1
13141   cat conftest.err >&5
13142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13143   (exit $ac_status); } && {
13144          test -z "$ac_c_werror_flag" ||
13145          test ! -s conftest.err
13146        } && test -s conftest.$ac_objext; then
13147   ac_pam_strerror_args=1
13148 else
13149   echo "$as_me: failed program was:" >&5
13150 sed 's/^/| /' conftest.$ac_ext >&5
13151
13152         ac_pam_strerror_args=0
13153 fi
13154
13155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13156 fi
13157
13158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13159       ac_cv_pam_strerror_args=$ac_pam_strerror_args
13160 fi
13161
13162     ac_pam_strerror_args=$ac_cv_pam_strerror_args
13163     if test "$ac_pam_strerror_args" = 1 ; then
13164       { echo "$as_me:$LINENO: result: one argument" >&5
13165 echo "${ECHO_T}one argument" >&6; }
13166     elif test "$ac_pam_strerror_args" = 2 ; then
13167       cat >>confdefs.h <<\_ACEOF
13168 #define PAM_STRERROR_TWO_ARGS 1
13169 _ACEOF
13170
13171       { echo "$as_me:$LINENO: result: two arguments" >&5
13172 echo "${ECHO_T}two arguments" >&6; }
13173     else
13174       { echo "$as_me:$LINENO: result: unknown" >&5
13175 echo "${ECHO_T}unknown" >&6; }
13176     fi
13177
13178 # Check pam_fail_delay
13179     { echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
13180 echo $ECHO_N "checking pam_fail_delay in -lpam... $ECHO_C" >&6; }
13181     if test "${ac_cv_pam_fail_delay+set}" = set; then
13182   echo $ECHO_N "(cached) $ECHO_C" >&6
13183 else
13184   ac_save_LDFLAGS="$LDFLAGS"
13185       LDFLAGS="-lpam"
13186       cat >conftest.$ac_ext <<_ACEOF
13187 /* confdefs.h.  */
13188 _ACEOF
13189 cat confdefs.h >>conftest.$ac_ext
13190 cat >>conftest.$ac_ext <<_ACEOF
13191 /* end confdefs.h.  */
13192 #include <security/pam_appl.h>
13193 int
13194 main ()
13195 {
13196 pam_handle_t *pamh = 0;
13197                    unsigned int usec = 1;
13198                    int status = pam_fail_delay (pamh, usec);
13199   ;
13200   return 0;
13201 }
13202 _ACEOF
13203 rm -f conftest.$ac_objext conftest$ac_exeext
13204 if { (ac_try="$ac_link"
13205 case "(($ac_try" in
13206   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13207   *) ac_try_echo=$ac_try;;
13208 esac
13209 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13210   (eval "$ac_link") 2>conftest.er1
13211   ac_status=$?
13212   grep -v '^ *+' conftest.er1 >conftest.err
13213   rm -f conftest.er1
13214   cat conftest.err >&5
13215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13216   (exit $ac_status); } && {
13217          test -z "$ac_c_werror_flag" ||
13218          test ! -s conftest.err
13219        } && test -s conftest$ac_exeext &&
13220        $as_test_x conftest$ac_exeext; then
13221   ac_pam_fail_delay=yes
13222 else
13223   echo "$as_me: failed program was:" >&5
13224 sed 's/^/| /' conftest.$ac_ext >&5
13225
13226         ac_pam_fail_delay=no
13227 fi
13228
13229 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13230       conftest$ac_exeext conftest.$ac_ext
13231       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
13232       LDFLAGS=$ac_save_LDFLAGS
13233 fi
13234
13235
13236       if test "$ac_pam_fail_delay" = yes ; then
13237         { echo "$as_me:$LINENO: result: yes" >&5
13238 echo "${ECHO_T}yes" >&6; }
13239         cat >>confdefs.h <<\_ACEOF
13240 #define HAVE_PAM_FAIL_DELAY 1
13241 _ACEOF
13242
13243       else
13244         { echo "$as_me:$LINENO: result: no" >&5
13245 echo "${ECHO_T}no" >&6; }
13246       fi
13247
13248   fi
13249 fi
13250
13251
13252 ###############################################################################
13253 #
13254 #       Check for Kerberos.
13255 #
13256 ###############################################################################
13257
13258 have_kerberos=no
13259 have_kerberos5=no
13260 with_kerberos_req=unspecified
13261
13262
13263 # Check whether --with-kerberos was given.
13264 if test "${with_kerberos+set}" = set; then
13265   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
13266 else
13267   with_kerberos=yes
13268 fi
13269
13270
13271
13272    case "$with_kerberos" in
13273     yes) ;;
13274     no)  ;;
13275
13276     /*)
13277      { echo "$as_me:$LINENO: checking for Kerberos headers" >&5
13278 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6; }
13279      d=$with_kerberos/include
13280      if test -d $d; then
13281        X_CFLAGS="-I$d $X_CFLAGS"
13282        { echo "$as_me:$LINENO: result: $d" >&5
13283 echo "${ECHO_T}$d" >&6; }
13284      else
13285        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13286 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13287      fi
13288
13289      { echo "$as_me:$LINENO: checking for Kerberos libs" >&5
13290 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6; }
13291      d=$with_kerberos/lib
13292      if test -d $d; then
13293        X_LIBS="-L$d $X_LIBS"
13294        { echo "$as_me:$LINENO: result: $d" >&5
13295 echo "${ECHO_T}$d" >&6; }
13296      else
13297        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13298 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13299      fi
13300
13301      # replace the directory string with "yes".
13302      with_kerberos_req="yes"
13303      with_kerberos=$with_kerberos_req
13304      ;;
13305
13306     *)
13307      echo ""
13308      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13309      echo "       If it is a directory, then \`DIR/include' will be added to"
13310      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13311      exit 1
13312      ;;
13313    esac
13314
13315
13316 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13317   { echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13318 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6; }
13319 if test "${ac_cv_kerberos+set}" = set; then
13320   echo $ECHO_N "(cached) $ECHO_C" >&6
13321 else
13322
13323   ac_save_CPPFLAGS="$CPPFLAGS"
13324   if test \! -z "$includedir" ; then
13325     CPPFLAGS="$CPPFLAGS -I$includedir"
13326   fi
13327   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13328   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13329   cat >conftest.$ac_ext <<_ACEOF
13330 /* confdefs.h.  */
13331 _ACEOF
13332 cat confdefs.h >>conftest.$ac_ext
13333 cat >>conftest.$ac_ext <<_ACEOF
13334 /* end confdefs.h.  */
13335 #include <krb.h>
13336 int
13337 main ()
13338 {
13339
13340   ;
13341   return 0;
13342 }
13343 _ACEOF
13344 rm -f conftest.$ac_objext
13345 if { (ac_try="$ac_compile"
13346 case "(($ac_try" in
13347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13348   *) ac_try_echo=$ac_try;;
13349 esac
13350 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13351   (eval "$ac_compile") 2>conftest.er1
13352   ac_status=$?
13353   grep -v '^ *+' conftest.er1 >conftest.err
13354   rm -f conftest.er1
13355   cat conftest.err >&5
13356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13357   (exit $ac_status); } && {
13358          test -z "$ac_c_werror_flag" ||
13359          test ! -s conftest.err
13360        } && test -s conftest.$ac_objext; then
13361   ac_cv_kerberos=yes
13362 else
13363   echo "$as_me: failed program was:" >&5
13364 sed 's/^/| /' conftest.$ac_ext >&5
13365
13366         ac_cv_kerberos=no
13367 fi
13368
13369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13370   CPPFLAGS="$ac_save_CPPFLAGS"
13371 fi
13372 { echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
13373 echo "${ECHO_T}$ac_cv_kerberos" >&6; }
13374   { echo "$as_me:$LINENO: checking for Kerberos 5" >&5
13375 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6; }
13376 if test "${ac_cv_kerberos5+set}" = set; then
13377   echo $ECHO_N "(cached) $ECHO_C" >&6
13378 else
13379
13380   ac_save_CPPFLAGS="$CPPFLAGS"
13381   if test \! -z "$includedir" ; then
13382     CPPFLAGS="$CPPFLAGS -I$includedir"
13383   fi
13384   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13385   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13386   cat >conftest.$ac_ext <<_ACEOF
13387 /* confdefs.h.  */
13388 _ACEOF
13389 cat confdefs.h >>conftest.$ac_ext
13390 cat >>conftest.$ac_ext <<_ACEOF
13391 /* end confdefs.h.  */
13392 #include <kerberosIV/krb.h>
13393 int
13394 main ()
13395 {
13396
13397   ;
13398   return 0;
13399 }
13400 _ACEOF
13401 rm -f conftest.$ac_objext
13402 if { (ac_try="$ac_compile"
13403 case "(($ac_try" in
13404   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13405   *) ac_try_echo=$ac_try;;
13406 esac
13407 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13408   (eval "$ac_compile") 2>conftest.er1
13409   ac_status=$?
13410   grep -v '^ *+' conftest.er1 >conftest.err
13411   rm -f conftest.er1
13412   cat conftest.err >&5
13413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13414   (exit $ac_status); } && {
13415          test -z "$ac_c_werror_flag" ||
13416          test ! -s conftest.err
13417        } && test -s conftest.$ac_objext; then
13418   ac_cv_kerberos5=yes
13419 else
13420   echo "$as_me: failed program was:" >&5
13421 sed 's/^/| /' conftest.$ac_ext >&5
13422
13423         ac_cv_kerberos5=no
13424 fi
13425
13426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13427   CPPFLAGS="$ac_save_CPPFLAGS"
13428 fi
13429 { echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
13430 echo "${ECHO_T}$ac_cv_kerberos5" >&6; }
13431
13432   if test "$ac_cv_kerberos" = yes ; then
13433     have_kerberos=yes
13434     cat >>confdefs.h <<\_ACEOF
13435 #define HAVE_KERBEROS 1
13436 _ACEOF
13437
13438   fi
13439
13440   if test "$ac_cv_kerberos5" = yes ; then
13441
13442     # Andrew Snare <ajs@pigpond.com> wrote:
13443     #
13444     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
13445     # (krb4) was also available.  This turns out not to be the case with
13446     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
13447     # is optional.
13448     #
13449     # So, disable kerberosV support if libkrb4 can't be found.
13450     # This is not the best solution, but it makes the compile not fail.
13451     #
13452
13453   ac_save_CPPFLAGS="$CPPFLAGS"
13454   ac_save_LDFLAGS="$LDFLAGS"
13455 #  ac_save_LIBS="$LIBS"
13456
13457   if test \! -z "$includedir" ; then
13458     CPPFLAGS="$CPPFLAGS -I$includedir"
13459   fi
13460   # note: $X_CFLAGS includes $x_includes
13461   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13462
13463   if test \! -z "$libdir" ; then
13464     LDFLAGS="$LDFLAGS -L$libdir"
13465   fi
13466   # note: $X_LIBS includes $x_libraries
13467   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13468
13469   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13470   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13471   { echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
13472 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6; }
13473 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
13474   echo $ECHO_N "(cached) $ECHO_C" >&6
13475 else
13476   ac_check_lib_save_LIBS=$LIBS
13477 LIBS="-lkrb4  $LIBS"
13478 cat >conftest.$ac_ext <<_ACEOF
13479 /* confdefs.h.  */
13480 _ACEOF
13481 cat confdefs.h >>conftest.$ac_ext
13482 cat >>conftest.$ac_ext <<_ACEOF
13483 /* end confdefs.h.  */
13484
13485 /* Override any GCC internal prototype to avoid an error.
13486    Use char because int might match the return type of a GCC
13487    builtin and then its argument prototype would still apply.  */
13488 #ifdef __cplusplus
13489 extern "C"
13490 #endif
13491 char krb_get_tf_realm ();
13492 int
13493 main ()
13494 {
13495 return krb_get_tf_realm ();
13496   ;
13497   return 0;
13498 }
13499 _ACEOF
13500 rm -f conftest.$ac_objext conftest$ac_exeext
13501 if { (ac_try="$ac_link"
13502 case "(($ac_try" in
13503   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13504   *) ac_try_echo=$ac_try;;
13505 esac
13506 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13507   (eval "$ac_link") 2>conftest.er1
13508   ac_status=$?
13509   grep -v '^ *+' conftest.er1 >conftest.err
13510   rm -f conftest.er1
13511   cat conftest.err >&5
13512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13513   (exit $ac_status); } && {
13514          test -z "$ac_c_werror_flag" ||
13515          test ! -s conftest.err
13516        } && test -s conftest$ac_exeext &&
13517        $as_test_x conftest$ac_exeext; then
13518   ac_cv_lib_krb4_krb_get_tf_realm=yes
13519 else
13520   echo "$as_me: failed program was:" >&5
13521 sed 's/^/| /' conftest.$ac_ext >&5
13522
13523         ac_cv_lib_krb4_krb_get_tf_realm=no
13524 fi
13525
13526 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13527       conftest$ac_exeext conftest.$ac_ext
13528 LIBS=$ac_check_lib_save_LIBS
13529 fi
13530 { echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
13531 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
13532 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
13533   have_kerberos=yes
13534 else
13535   have_kerberos=no
13536 fi
13537
13538   CPPFLAGS="$ac_save_CPPFLAGS"
13539   LDFLAGS="$ac_save_LDFLAGS"
13540 #  LIBS="$ac_save_LIBS"
13541
13542     if test "$have_kerberos" = yes ; then
13543       have_kerberos5=yes
13544       cat >>confdefs.h <<\_ACEOF
13545 #define HAVE_KERBEROS 1
13546 _ACEOF
13547
13548       cat >>confdefs.h <<\_ACEOF
13549 #define HAVE_KERBEROS5 1
13550 _ACEOF
13551
13552     else
13553       have_kerberos5=no
13554       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
13555 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
13556     fi
13557
13558   fi
13559
13560   if test "$have_kerberos5" = yes ; then
13561     # from Matt Knopp <mhat@infocalypse.netlag.com>
13562     # (who got it from amu@mit.edu)
13563
13564     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
13565
13566     # jwz: MacOS X uses -lkrb5, but not -lcrypt
13567
13568   ac_save_CPPFLAGS="$CPPFLAGS"
13569   ac_save_LDFLAGS="$LDFLAGS"
13570 #  ac_save_LIBS="$LIBS"
13571
13572   if test \! -z "$includedir" ; then
13573     CPPFLAGS="$CPPFLAGS -I$includedir"
13574   fi
13575   # note: $X_CFLAGS includes $x_includes
13576   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13577
13578   if test \! -z "$libdir" ; then
13579     LDFLAGS="$LDFLAGS -L$libdir"
13580   fi
13581   # note: $X_LIBS includes $x_libraries
13582   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13583
13584   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13585   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13586   { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13587 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
13588 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13589   echo $ECHO_N "(cached) $ECHO_C" >&6
13590 else
13591   ac_check_lib_save_LIBS=$LIBS
13592 LIBS="-lcrypt  $LIBS"
13593 cat >conftest.$ac_ext <<_ACEOF
13594 /* confdefs.h.  */
13595 _ACEOF
13596 cat confdefs.h >>conftest.$ac_ext
13597 cat >>conftest.$ac_ext <<_ACEOF
13598 /* end confdefs.h.  */
13599
13600 /* Override any GCC internal prototype to avoid an error.
13601    Use char because int might match the return type of a GCC
13602    builtin and then its argument prototype would still apply.  */
13603 #ifdef __cplusplus
13604 extern "C"
13605 #endif
13606 char crypt ();
13607 int
13608 main ()
13609 {
13610 return crypt ();
13611   ;
13612   return 0;
13613 }
13614 _ACEOF
13615 rm -f conftest.$ac_objext conftest$ac_exeext
13616 if { (ac_try="$ac_link"
13617 case "(($ac_try" in
13618   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13619   *) ac_try_echo=$ac_try;;
13620 esac
13621 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13622   (eval "$ac_link") 2>conftest.er1
13623   ac_status=$?
13624   grep -v '^ *+' conftest.er1 >conftest.err
13625   rm -f conftest.er1
13626   cat conftest.err >&5
13627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13628   (exit $ac_status); } && {
13629          test -z "$ac_c_werror_flag" ||
13630          test ! -s conftest.err
13631        } && test -s conftest$ac_exeext &&
13632        $as_test_x conftest$ac_exeext; then
13633   ac_cv_lib_crypt_crypt=yes
13634 else
13635   echo "$as_me: failed program was:" >&5
13636 sed 's/^/| /' conftest.$ac_ext >&5
13637
13638         ac_cv_lib_crypt_crypt=no
13639 fi
13640
13641 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13642       conftest$ac_exeext conftest.$ac_ext
13643 LIBS=$ac_check_lib_save_LIBS
13644 fi
13645 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13646 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
13647 if test $ac_cv_lib_crypt_crypt = yes; then
13648   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13649 fi
13650
13651   CPPFLAGS="$ac_save_CPPFLAGS"
13652   LDFLAGS="$ac_save_LDFLAGS"
13653 #  LIBS="$ac_save_LIBS"
13654
13655
13656   elif test "$have_kerberos" = yes ; then
13657     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
13658     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
13659   fi
13660
13661   if test "$have_kerberos" = yes ; then
13662     { echo "$as_me:$LINENO: checking for res_search" >&5
13663 echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
13664 if test "${ac_cv_func_res_search+set}" = set; then
13665   echo $ECHO_N "(cached) $ECHO_C" >&6
13666 else
13667   cat >conftest.$ac_ext <<_ACEOF
13668 /* confdefs.h.  */
13669 _ACEOF
13670 cat confdefs.h >>conftest.$ac_ext
13671 cat >>conftest.$ac_ext <<_ACEOF
13672 /* end confdefs.h.  */
13673 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
13674    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13675 #define res_search innocuous_res_search
13676
13677 /* System header to define __stub macros and hopefully few prototypes,
13678     which can conflict with char res_search (); below.
13679     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13680     <limits.h> exists even on freestanding compilers.  */
13681
13682 #ifdef __STDC__
13683 # include <limits.h>
13684 #else
13685 # include <assert.h>
13686 #endif
13687
13688 #undef res_search
13689
13690 /* Override any GCC internal prototype to avoid an error.
13691    Use char because int might match the return type of a GCC
13692    builtin and then its argument prototype would still apply.  */
13693 #ifdef __cplusplus
13694 extern "C"
13695 #endif
13696 char res_search ();
13697 /* The GNU C library defines this for functions which it implements
13698     to always fail with ENOSYS.  Some functions are actually named
13699     something starting with __ and the normal name is an alias.  */
13700 #if defined __stub_res_search || defined __stub___res_search
13701 choke me
13702 #endif
13703
13704 int
13705 main ()
13706 {
13707 return res_search ();
13708   ;
13709   return 0;
13710 }
13711 _ACEOF
13712 rm -f conftest.$ac_objext conftest$ac_exeext
13713 if { (ac_try="$ac_link"
13714 case "(($ac_try" in
13715   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13716   *) ac_try_echo=$ac_try;;
13717 esac
13718 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13719   (eval "$ac_link") 2>conftest.er1
13720   ac_status=$?
13721   grep -v '^ *+' conftest.er1 >conftest.err
13722   rm -f conftest.er1
13723   cat conftest.err >&5
13724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13725   (exit $ac_status); } && {
13726          test -z "$ac_c_werror_flag" ||
13727          test ! -s conftest.err
13728        } && test -s conftest$ac_exeext &&
13729        $as_test_x conftest$ac_exeext; then
13730   ac_cv_func_res_search=yes
13731 else
13732   echo "$as_me: failed program was:" >&5
13733 sed 's/^/| /' conftest.$ac_ext >&5
13734
13735         ac_cv_func_res_search=no
13736 fi
13737
13738 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13739       conftest$ac_exeext conftest.$ac_ext
13740 fi
13741 { echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13742 echo "${ECHO_T}$ac_cv_func_res_search" >&6; }
13743 if test $ac_cv_func_res_search = yes; then
13744   :
13745 else
13746   { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13747 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
13748 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13749   echo $ECHO_N "(cached) $ECHO_C" >&6
13750 else
13751   ac_check_lib_save_LIBS=$LIBS
13752 LIBS="-lresolv  $LIBS"
13753 cat >conftest.$ac_ext <<_ACEOF
13754 /* confdefs.h.  */
13755 _ACEOF
13756 cat confdefs.h >>conftest.$ac_ext
13757 cat >>conftest.$ac_ext <<_ACEOF
13758 /* end confdefs.h.  */
13759
13760 /* Override any GCC internal prototype to avoid an error.
13761    Use char because int might match the return type of a GCC
13762    builtin and then its argument prototype would still apply.  */
13763 #ifdef __cplusplus
13764 extern "C"
13765 #endif
13766 char res_search ();
13767 int
13768 main ()
13769 {
13770 return res_search ();
13771   ;
13772   return 0;
13773 }
13774 _ACEOF
13775 rm -f conftest.$ac_objext conftest$ac_exeext
13776 if { (ac_try="$ac_link"
13777 case "(($ac_try" in
13778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13779   *) ac_try_echo=$ac_try;;
13780 esac
13781 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13782   (eval "$ac_link") 2>conftest.er1
13783   ac_status=$?
13784   grep -v '^ *+' conftest.er1 >conftest.err
13785   rm -f conftest.er1
13786   cat conftest.err >&5
13787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13788   (exit $ac_status); } && {
13789          test -z "$ac_c_werror_flag" ||
13790          test ! -s conftest.err
13791        } && test -s conftest$ac_exeext &&
13792        $as_test_x conftest$ac_exeext; then
13793   ac_cv_lib_resolv_res_search=yes
13794 else
13795   echo "$as_me: failed program was:" >&5
13796 sed 's/^/| /' conftest.$ac_ext >&5
13797
13798         ac_cv_lib_resolv_res_search=no
13799 fi
13800
13801 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13802       conftest$ac_exeext conftest.$ac_ext
13803 LIBS=$ac_check_lib_save_LIBS
13804 fi
13805 { echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13806 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
13807 if test $ac_cv_lib_resolv_res_search = yes; then
13808   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13809 else
13810   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13811 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13812
13813 fi
13814
13815 fi
13816
13817   fi
13818 fi
13819
13820
13821 ###############################################################################
13822 #
13823 #       Check for the nine billion variants of shadow passwords...
13824 #
13825 ###############################################################################
13826
13827 need_setuid=no
13828
13829 have_shadow=no
13830 with_shadow_req=unspecified
13831
13832
13833 # Check whether --with-shadow was given.
13834 if test "${with_shadow+set}" = set; then
13835   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
13836 else
13837   with_shadow=yes
13838 fi
13839
13840
13841
13842    case "$with_shadow" in
13843     yes) ;;
13844     no)  ;;
13845
13846     /*)
13847      { echo "$as_me:$LINENO: checking for shadow password headers" >&5
13848 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6; }
13849      d=$with_shadow/include
13850      if test -d $d; then
13851        X_CFLAGS="-I$d $X_CFLAGS"
13852        { echo "$as_me:$LINENO: result: $d" >&5
13853 echo "${ECHO_T}$d" >&6; }
13854      else
13855        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13856 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13857      fi
13858
13859      { echo "$as_me:$LINENO: checking for shadow password libs" >&5
13860 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6; }
13861      d=$with_shadow/lib
13862      if test -d $d; then
13863        X_LIBS="-L$d $X_LIBS"
13864        { echo "$as_me:$LINENO: result: $d" >&5
13865 echo "${ECHO_T}$d" >&6; }
13866      else
13867        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13868 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13869      fi
13870
13871      # replace the directory string with "yes".
13872      with_shadow_req="yes"
13873      with_shadow=$with_shadow_req
13874      ;;
13875
13876     *)
13877      echo ""
13878      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
13879      echo "       If it is a directory, then \`DIR/include' will be added to"
13880      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13881      exit 1
13882      ;;
13883    esac
13884
13885
13886 if test "$enable_locking" = no ; then
13887   with_shadow_req=no
13888   with_shadow=no
13889 fi
13890
13891
13892 ###############################################################################
13893 #
13894 #       Check for Sun "adjunct" passwords.
13895 #
13896 ###############################################################################
13897
13898 if test "$with_shadow" = yes ; then
13899   { echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
13900 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6; }
13901 if test "${ac_cv_sun_adjunct+set}" = set; then
13902   echo $ECHO_N "(cached) $ECHO_C" >&6
13903 else
13904
13905   ac_save_CPPFLAGS="$CPPFLAGS"
13906   if test \! -z "$includedir" ; then
13907     CPPFLAGS="$CPPFLAGS -I$includedir"
13908   fi
13909   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13910   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13911   cat >conftest.$ac_ext <<_ACEOF
13912 /* confdefs.h.  */
13913 _ACEOF
13914 cat confdefs.h >>conftest.$ac_ext
13915 cat >>conftest.$ac_ext <<_ACEOF
13916 /* end confdefs.h.  */
13917 #include <stdlib.h>
13918                                     #include <unistd.h>
13919                                     #include <sys/types.h>
13920                                     #include <sys/label.h>
13921                                     #include <sys/audit.h>
13922                                     #include <pwdadj.h>
13923 int
13924 main ()
13925 {
13926 struct passwd_adjunct *p = getpwanam("nobody");
13927                        const char *pw = p->pwa_passwd;
13928   ;
13929   return 0;
13930 }
13931 _ACEOF
13932 rm -f conftest.$ac_objext
13933 if { (ac_try="$ac_compile"
13934 case "(($ac_try" in
13935   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13936   *) ac_try_echo=$ac_try;;
13937 esac
13938 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13939   (eval "$ac_compile") 2>conftest.er1
13940   ac_status=$?
13941   grep -v '^ *+' conftest.er1 >conftest.err
13942   rm -f conftest.er1
13943   cat conftest.err >&5
13944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13945   (exit $ac_status); } && {
13946          test -z "$ac_c_werror_flag" ||
13947          test ! -s conftest.err
13948        } && test -s conftest.$ac_objext; then
13949   ac_cv_sun_adjunct=yes
13950 else
13951   echo "$as_me: failed program was:" >&5
13952 sed 's/^/| /' conftest.$ac_ext >&5
13953
13954         ac_cv_sun_adjunct=no
13955 fi
13956
13957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13958   CPPFLAGS="$ac_save_CPPFLAGS"
13959 fi
13960 { echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
13961 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6; }
13962   if test "$ac_cv_sun_adjunct" = yes; then
13963     have_shadow_adjunct=yes
13964     have_shadow=yes
13965     need_setuid=yes
13966   fi
13967 fi
13968
13969
13970 ###############################################################################
13971 #
13972 #       Check for DEC and SCO so-called "enhanced" security.
13973 #
13974 ###############################################################################
13975
13976 if test "$with_shadow" = yes ; then
13977   { echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
13978 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6; }
13979 if test "${ac_cv_enhanced_passwd+set}" = set; then
13980   echo $ECHO_N "(cached) $ECHO_C" >&6
13981 else
13982
13983   ac_save_CPPFLAGS="$CPPFLAGS"
13984   if test \! -z "$includedir" ; then
13985     CPPFLAGS="$CPPFLAGS -I$includedir"
13986   fi
13987   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13988   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13989   cat >conftest.$ac_ext <<_ACEOF
13990 /* confdefs.h.  */
13991 _ACEOF
13992 cat confdefs.h >>conftest.$ac_ext
13993 cat >>conftest.$ac_ext <<_ACEOF
13994 /* end confdefs.h.  */
13995 #include <stdlib.h>
13996                                     #include <unistd.h>
13997                                     #include <sys/types.h>
13998                                     #include <pwd.h>
13999                                     #include <sys/security.h>
14000                                     #include <prot.h>
14001 int
14002 main ()
14003 {
14004 struct pr_passwd *p;
14005                        const char *pw;
14006                        set_auth_parameters(0, 0);
14007                        check_auth_parameters();
14008                        p = getprpwnam("nobody");
14009                        pw = p->ufld.fd_encrypt;
14010   ;
14011   return 0;
14012 }
14013 _ACEOF
14014 rm -f conftest.$ac_objext
14015 if { (ac_try="$ac_compile"
14016 case "(($ac_try" in
14017   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14018   *) ac_try_echo=$ac_try;;
14019 esac
14020 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14021   (eval "$ac_compile") 2>conftest.er1
14022   ac_status=$?
14023   grep -v '^ *+' conftest.er1 >conftest.err
14024   rm -f conftest.er1
14025   cat conftest.err >&5
14026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14027   (exit $ac_status); } && {
14028          test -z "$ac_c_werror_flag" ||
14029          test ! -s conftest.err
14030        } && test -s conftest.$ac_objext; then
14031   ac_cv_enhanced_passwd=yes
14032 else
14033   echo "$as_me: failed program was:" >&5
14034 sed 's/^/| /' conftest.$ac_ext >&5
14035
14036         ac_cv_enhanced_passwd=no
14037 fi
14038
14039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14040   CPPFLAGS="$ac_save_CPPFLAGS"
14041 fi
14042 { echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
14043 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6; }
14044   if test $ac_cv_enhanced_passwd = yes; then
14045     have_shadow_enhanced=yes
14046     have_shadow=yes
14047     need_setuid=yes
14048
14049     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
14050     # (I'm told it needs -lcurses too, but I don't understand why.)
14051     # But on DEC, it's in -lsecurity.
14052     #
14053     { echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
14054 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6; }
14055 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
14056   echo $ECHO_N "(cached) $ECHO_C" >&6
14057 else
14058   ac_check_lib_save_LIBS=$LIBS
14059 LIBS="-lprot -lx $LIBS"
14060 cat >conftest.$ac_ext <<_ACEOF
14061 /* confdefs.h.  */
14062 _ACEOF
14063 cat confdefs.h >>conftest.$ac_ext
14064 cat >>conftest.$ac_ext <<_ACEOF
14065 /* end confdefs.h.  */
14066
14067 /* Override any GCC internal prototype to avoid an error.
14068    Use char because int might match the return type of a GCC
14069    builtin and then its argument prototype would still apply.  */
14070 #ifdef __cplusplus
14071 extern "C"
14072 #endif
14073 char getprpwnam ();
14074 int
14075 main ()
14076 {
14077 return getprpwnam ();
14078   ;
14079   return 0;
14080 }
14081 _ACEOF
14082 rm -f conftest.$ac_objext conftest$ac_exeext
14083 if { (ac_try="$ac_link"
14084 case "(($ac_try" in
14085   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14086   *) ac_try_echo=$ac_try;;
14087 esac
14088 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14089   (eval "$ac_link") 2>conftest.er1
14090   ac_status=$?
14091   grep -v '^ *+' conftest.er1 >conftest.err
14092   rm -f conftest.er1
14093   cat conftest.err >&5
14094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14095   (exit $ac_status); } && {
14096          test -z "$ac_c_werror_flag" ||
14097          test ! -s conftest.err
14098        } && test -s conftest$ac_exeext &&
14099        $as_test_x conftest$ac_exeext; then
14100   ac_cv_lib_prot_getprpwnam=yes
14101 else
14102   echo "$as_me: failed program was:" >&5
14103 sed 's/^/| /' conftest.$ac_ext >&5
14104
14105         ac_cv_lib_prot_getprpwnam=no
14106 fi
14107
14108 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14109       conftest$ac_exeext conftest.$ac_ext
14110 LIBS=$ac_check_lib_save_LIBS
14111 fi
14112 { echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
14113 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6; }
14114 if test $ac_cv_lib_prot_getprpwnam = yes; then
14115   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
14116 else
14117   { echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
14118 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6; }
14119 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
14120   echo $ECHO_N "(cached) $ECHO_C" >&6
14121 else
14122   ac_check_lib_save_LIBS=$LIBS
14123 LIBS="-lsecurity  $LIBS"
14124 cat >conftest.$ac_ext <<_ACEOF
14125 /* confdefs.h.  */
14126 _ACEOF
14127 cat confdefs.h >>conftest.$ac_ext
14128 cat >>conftest.$ac_ext <<_ACEOF
14129 /* end confdefs.h.  */
14130
14131 /* Override any GCC internal prototype to avoid an error.
14132    Use char because int might match the return type of a GCC
14133    builtin and then its argument prototype would still apply.  */
14134 #ifdef __cplusplus
14135 extern "C"
14136 #endif
14137 char getprpwnam ();
14138 int
14139 main ()
14140 {
14141 return getprpwnam ();
14142   ;
14143   return 0;
14144 }
14145 _ACEOF
14146 rm -f conftest.$ac_objext conftest$ac_exeext
14147 if { (ac_try="$ac_link"
14148 case "(($ac_try" in
14149   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14150   *) ac_try_echo=$ac_try;;
14151 esac
14152 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14153   (eval "$ac_link") 2>conftest.er1
14154   ac_status=$?
14155   grep -v '^ *+' conftest.er1 >conftest.err
14156   rm -f conftest.er1
14157   cat conftest.err >&5
14158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14159   (exit $ac_status); } && {
14160          test -z "$ac_c_werror_flag" ||
14161          test ! -s conftest.err
14162        } && test -s conftest$ac_exeext &&
14163        $as_test_x conftest$ac_exeext; then
14164   ac_cv_lib_security_getprpwnam=yes
14165 else
14166   echo "$as_me: failed program was:" >&5
14167 sed 's/^/| /' conftest.$ac_ext >&5
14168
14169         ac_cv_lib_security_getprpwnam=no
14170 fi
14171
14172 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14173       conftest$ac_exeext conftest.$ac_ext
14174 LIBS=$ac_check_lib_save_LIBS
14175 fi
14176 { echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
14177 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6; }
14178 if test $ac_cv_lib_security_getprpwnam = yes; then
14179   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
14180 fi
14181
14182 fi
14183
14184   fi
14185 fi
14186
14187 ###############################################################################
14188 #
14189 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
14190 #
14191 ###############################################################################
14192
14193 if test "$with_shadow" = yes ; then
14194   { echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
14195 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6; }
14196 if test "${ac_cv_hpux_passwd+set}" = set; then
14197   echo $ECHO_N "(cached) $ECHO_C" >&6
14198 else
14199
14200   ac_save_CPPFLAGS="$CPPFLAGS"
14201   if test \! -z "$includedir" ; then
14202     CPPFLAGS="$CPPFLAGS -I$includedir"
14203   fi
14204   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14205   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14206   cat >conftest.$ac_ext <<_ACEOF
14207 /* confdefs.h.  */
14208 _ACEOF
14209 cat confdefs.h >>conftest.$ac_ext
14210 cat >>conftest.$ac_ext <<_ACEOF
14211 /* end confdefs.h.  */
14212 #include <stdlib.h>
14213                                     #include <unistd.h>
14214                                     #include <sys/types.h>
14215                                     #include <pwd.h>
14216                                     #include <hpsecurity.h>
14217                                     #include <prot.h>
14218 int
14219 main ()
14220 {
14221 struct s_passwd *p = getspwnam("nobody");
14222                        const char *pw = p->pw_passwd;
14223   ;
14224   return 0;
14225 }
14226 _ACEOF
14227 rm -f conftest.$ac_objext
14228 if { (ac_try="$ac_compile"
14229 case "(($ac_try" in
14230   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14231   *) ac_try_echo=$ac_try;;
14232 esac
14233 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14234   (eval "$ac_compile") 2>conftest.er1
14235   ac_status=$?
14236   grep -v '^ *+' conftest.er1 >conftest.err
14237   rm -f conftest.er1
14238   cat conftest.err >&5
14239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14240   (exit $ac_status); } && {
14241          test -z "$ac_c_werror_flag" ||
14242          test ! -s conftest.err
14243        } && test -s conftest.$ac_objext; then
14244   ac_cv_hpux_passwd=yes
14245 else
14246   echo "$as_me: failed program was:" >&5
14247 sed 's/^/| /' conftest.$ac_ext >&5
14248
14249         ac_cv_hpux_passwd=no
14250 fi
14251
14252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14253   CPPFLAGS="$ac_save_CPPFLAGS"
14254 fi
14255 { echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
14256 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6; }
14257   if test "$ac_cv_hpux_passwd" = yes; then
14258     have_shadow_hpux=yes
14259     have_shadow=yes
14260     need_setuid=yes
14261
14262     # on HPUX, bigcrypt is in -lsec
14263     { echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14264 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6; }
14265 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14266   echo $ECHO_N "(cached) $ECHO_C" >&6
14267 else
14268   ac_check_lib_save_LIBS=$LIBS
14269 LIBS="-lsec  $LIBS"
14270 cat >conftest.$ac_ext <<_ACEOF
14271 /* confdefs.h.  */
14272 _ACEOF
14273 cat confdefs.h >>conftest.$ac_ext
14274 cat >>conftest.$ac_ext <<_ACEOF
14275 /* end confdefs.h.  */
14276
14277 /* Override any GCC internal prototype to avoid an error.
14278    Use char because int might match the return type of a GCC
14279    builtin and then its argument prototype would still apply.  */
14280 #ifdef __cplusplus
14281 extern "C"
14282 #endif
14283 char bigcrypt ();
14284 int
14285 main ()
14286 {
14287 return bigcrypt ();
14288   ;
14289   return 0;
14290 }
14291 _ACEOF
14292 rm -f conftest.$ac_objext conftest$ac_exeext
14293 if { (ac_try="$ac_link"
14294 case "(($ac_try" in
14295   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14296   *) ac_try_echo=$ac_try;;
14297 esac
14298 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14299   (eval "$ac_link") 2>conftest.er1
14300   ac_status=$?
14301   grep -v '^ *+' conftest.er1 >conftest.err
14302   rm -f conftest.er1
14303   cat conftest.err >&5
14304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14305   (exit $ac_status); } && {
14306          test -z "$ac_c_werror_flag" ||
14307          test ! -s conftest.err
14308        } && test -s conftest$ac_exeext &&
14309        $as_test_x conftest$ac_exeext; then
14310   ac_cv_lib_sec_bigcrypt=yes
14311 else
14312   echo "$as_me: failed program was:" >&5
14313 sed 's/^/| /' conftest.$ac_ext >&5
14314
14315         ac_cv_lib_sec_bigcrypt=no
14316 fi
14317
14318 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14319       conftest$ac_exeext conftest.$ac_ext
14320 LIBS=$ac_check_lib_save_LIBS
14321 fi
14322 { echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14323 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6; }
14324 if test $ac_cv_lib_sec_bigcrypt = yes; then
14325   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14326 fi
14327
14328   fi
14329 fi
14330
14331
14332 ###############################################################################
14333 #
14334 #       Check for FreeBSD-style shadow passwords.
14335 #
14336 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14337 #       password systems -- except you only get stuff in the pw_passwd field
14338 #       if the running program is setuid.  So, guess that we've got this
14339 #       lossage to contend with if /etc/master.passwd exists, and default to
14340 #       a setuid installation.
14341 #
14342 ###############################################################################
14343
14344 if test "$with_shadow" = yes ; then
14345   { echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
14346 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6; }
14347 if test "${ac_cv_master_passwd+set}" = set; then
14348   echo $ECHO_N "(cached) $ECHO_C" >&6
14349 else
14350   if test -f /etc/master.passwd ; then
14351                     ac_cv_master_passwd=yes
14352                   else
14353                     ac_cv_master_passwd=no
14354                   fi
14355 fi
14356 { echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
14357 echo "${ECHO_T}$ac_cv_master_passwd" >&6; }
14358   if test "$ac_cv_master_passwd" = yes; then
14359     need_setuid=yes
14360   fi
14361 fi
14362
14363
14364 ###############################################################################
14365 #
14366 #       Check for traditional (ha!) shadow passwords.
14367 #
14368 ###############################################################################
14369
14370 if test "$with_shadow" = yes ; then
14371   { echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14372 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6; }
14373 if test "${ac_cv_shadow+set}" = set; then
14374   echo $ECHO_N "(cached) $ECHO_C" >&6
14375 else
14376
14377   ac_save_CPPFLAGS="$CPPFLAGS"
14378   if test \! -z "$includedir" ; then
14379     CPPFLAGS="$CPPFLAGS -I$includedir"
14380   fi
14381   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14382   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14383   cat >conftest.$ac_ext <<_ACEOF
14384 /* confdefs.h.  */
14385 _ACEOF
14386 cat confdefs.h >>conftest.$ac_ext
14387 cat >>conftest.$ac_ext <<_ACEOF
14388 /* end confdefs.h.  */
14389 #include <stdlib.h>
14390                                     #include <unistd.h>
14391                                     #include <sys/types.h>
14392                                     #include <pwd.h>
14393                                     #include <shadow.h>
14394 int
14395 main ()
14396 {
14397 struct spwd *p = getspnam("nobody");
14398                        const char *pw = p->sp_pwdp;
14399   ;
14400   return 0;
14401 }
14402 _ACEOF
14403 rm -f conftest.$ac_objext
14404 if { (ac_try="$ac_compile"
14405 case "(($ac_try" in
14406   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14407   *) ac_try_echo=$ac_try;;
14408 esac
14409 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14410   (eval "$ac_compile") 2>conftest.er1
14411   ac_status=$?
14412   grep -v '^ *+' conftest.er1 >conftest.err
14413   rm -f conftest.er1
14414   cat conftest.err >&5
14415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14416   (exit $ac_status); } && {
14417          test -z "$ac_c_werror_flag" ||
14418          test ! -s conftest.err
14419        } && test -s conftest.$ac_objext; then
14420   ac_cv_shadow=yes
14421 else
14422   echo "$as_me: failed program was:" >&5
14423 sed 's/^/| /' conftest.$ac_ext >&5
14424
14425         ac_cv_shadow=no
14426 fi
14427
14428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14429   CPPFLAGS="$ac_save_CPPFLAGS"
14430 fi
14431 { echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
14432 echo "${ECHO_T}$ac_cv_shadow" >&6; }
14433   if test "$ac_cv_shadow" = yes; then
14434     have_shadow=yes
14435     need_setuid=yes
14436
14437     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
14438     have_getspnam=no
14439     { echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
14440 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6; }
14441 if test "${ac_cv_lib_c_getspnam+set}" = set; then
14442   echo $ECHO_N "(cached) $ECHO_C" >&6
14443 else
14444   ac_check_lib_save_LIBS=$LIBS
14445 LIBS="-lc  $LIBS"
14446 cat >conftest.$ac_ext <<_ACEOF
14447 /* confdefs.h.  */
14448 _ACEOF
14449 cat confdefs.h >>conftest.$ac_ext
14450 cat >>conftest.$ac_ext <<_ACEOF
14451 /* end confdefs.h.  */
14452
14453 /* Override any GCC internal prototype to avoid an error.
14454    Use char because int might match the return type of a GCC
14455    builtin and then its argument prototype would still apply.  */
14456 #ifdef __cplusplus
14457 extern "C"
14458 #endif
14459 char getspnam ();
14460 int
14461 main ()
14462 {
14463 return getspnam ();
14464   ;
14465   return 0;
14466 }
14467 _ACEOF
14468 rm -f conftest.$ac_objext conftest$ac_exeext
14469 if { (ac_try="$ac_link"
14470 case "(($ac_try" in
14471   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14472   *) ac_try_echo=$ac_try;;
14473 esac
14474 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14475   (eval "$ac_link") 2>conftest.er1
14476   ac_status=$?
14477   grep -v '^ *+' conftest.er1 >conftest.err
14478   rm -f conftest.er1
14479   cat conftest.err >&5
14480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14481   (exit $ac_status); } && {
14482          test -z "$ac_c_werror_flag" ||
14483          test ! -s conftest.err
14484        } && test -s conftest$ac_exeext &&
14485        $as_test_x conftest$ac_exeext; then
14486   ac_cv_lib_c_getspnam=yes
14487 else
14488   echo "$as_me: failed program was:" >&5
14489 sed 's/^/| /' conftest.$ac_ext >&5
14490
14491         ac_cv_lib_c_getspnam=no
14492 fi
14493
14494 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14495       conftest$ac_exeext conftest.$ac_ext
14496 LIBS=$ac_check_lib_save_LIBS
14497 fi
14498 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
14499 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6; }
14500 if test $ac_cv_lib_c_getspnam = yes; then
14501   have_getspnam=yes
14502 fi
14503
14504     if test "$have_getspnam" = no ; then
14505       { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
14506 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
14507 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
14508   echo $ECHO_N "(cached) $ECHO_C" >&6
14509 else
14510   ac_check_lib_save_LIBS=$LIBS
14511 LIBS="-lgen  $LIBS"
14512 cat >conftest.$ac_ext <<_ACEOF
14513 /* confdefs.h.  */
14514 _ACEOF
14515 cat confdefs.h >>conftest.$ac_ext
14516 cat >>conftest.$ac_ext <<_ACEOF
14517 /* end confdefs.h.  */
14518
14519 /* Override any GCC internal prototype to avoid an error.
14520    Use char because int might match the return type of a GCC
14521    builtin and then its argument prototype would still apply.  */
14522 #ifdef __cplusplus
14523 extern "C"
14524 #endif
14525 char getspnam ();
14526 int
14527 main ()
14528 {
14529 return getspnam ();
14530   ;
14531   return 0;
14532 }
14533 _ACEOF
14534 rm -f conftest.$ac_objext conftest$ac_exeext
14535 if { (ac_try="$ac_link"
14536 case "(($ac_try" in
14537   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14538   *) ac_try_echo=$ac_try;;
14539 esac
14540 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14541   (eval "$ac_link") 2>conftest.er1
14542   ac_status=$?
14543   grep -v '^ *+' conftest.er1 >conftest.err
14544   rm -f conftest.er1
14545   cat conftest.err >&5
14546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14547   (exit $ac_status); } && {
14548          test -z "$ac_c_werror_flag" ||
14549          test ! -s conftest.err
14550        } && test -s conftest$ac_exeext &&
14551        $as_test_x conftest$ac_exeext; then
14552   ac_cv_lib_gen_getspnam=yes
14553 else
14554   echo "$as_me: failed program was:" >&5
14555 sed 's/^/| /' conftest.$ac_ext >&5
14556
14557         ac_cv_lib_gen_getspnam=no
14558 fi
14559
14560 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14561       conftest$ac_exeext conftest.$ac_ext
14562 LIBS=$ac_check_lib_save_LIBS
14563 fi
14564 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
14565 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
14566 if test $ac_cv_lib_gen_getspnam = yes; then
14567   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
14568 fi
14569
14570     fi
14571   fi
14572 fi
14573
14574
14575 ###############################################################################
14576 #
14577 #       Check for other libraries needed for non-shadow passwords.
14578 #
14579 ###############################################################################
14580
14581 if test "$enable_locking" = yes ; then
14582
14583   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
14584   have_crypt=no
14585   { echo "$as_me:$LINENO: checking for crypt in -lc" >&5
14586 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6; }
14587 if test "${ac_cv_lib_c_crypt+set}" = set; then
14588   echo $ECHO_N "(cached) $ECHO_C" >&6
14589 else
14590   ac_check_lib_save_LIBS=$LIBS
14591 LIBS="-lc  $LIBS"
14592 cat >conftest.$ac_ext <<_ACEOF
14593 /* confdefs.h.  */
14594 _ACEOF
14595 cat confdefs.h >>conftest.$ac_ext
14596 cat >>conftest.$ac_ext <<_ACEOF
14597 /* end confdefs.h.  */
14598
14599 /* Override any GCC internal prototype to avoid an error.
14600    Use char because int might match the return type of a GCC
14601    builtin and then its argument prototype would still apply.  */
14602 #ifdef __cplusplus
14603 extern "C"
14604 #endif
14605 char crypt ();
14606 int
14607 main ()
14608 {
14609 return crypt ();
14610   ;
14611   return 0;
14612 }
14613 _ACEOF
14614 rm -f conftest.$ac_objext conftest$ac_exeext
14615 if { (ac_try="$ac_link"
14616 case "(($ac_try" in
14617   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14618   *) ac_try_echo=$ac_try;;
14619 esac
14620 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14621   (eval "$ac_link") 2>conftest.er1
14622   ac_status=$?
14623   grep -v '^ *+' conftest.er1 >conftest.err
14624   rm -f conftest.er1
14625   cat conftest.err >&5
14626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14627   (exit $ac_status); } && {
14628          test -z "$ac_c_werror_flag" ||
14629          test ! -s conftest.err
14630        } && test -s conftest$ac_exeext &&
14631        $as_test_x conftest$ac_exeext; then
14632   ac_cv_lib_c_crypt=yes
14633 else
14634   echo "$as_me: failed program was:" >&5
14635 sed 's/^/| /' conftest.$ac_ext >&5
14636
14637         ac_cv_lib_c_crypt=no
14638 fi
14639
14640 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14641       conftest$ac_exeext conftest.$ac_ext
14642 LIBS=$ac_check_lib_save_LIBS
14643 fi
14644 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14645 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6; }
14646 if test $ac_cv_lib_c_crypt = yes; then
14647   have_crypt=yes
14648 fi
14649
14650   if test "$have_crypt" = no ; then
14651     { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14652 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
14653 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14654   echo $ECHO_N "(cached) $ECHO_C" >&6
14655 else
14656   ac_check_lib_save_LIBS=$LIBS
14657 LIBS="-lcrypt  $LIBS"
14658 cat >conftest.$ac_ext <<_ACEOF
14659 /* confdefs.h.  */
14660 _ACEOF
14661 cat confdefs.h >>conftest.$ac_ext
14662 cat >>conftest.$ac_ext <<_ACEOF
14663 /* end confdefs.h.  */
14664
14665 /* Override any GCC internal prototype to avoid an error.
14666    Use char because int might match the return type of a GCC
14667    builtin and then its argument prototype would still apply.  */
14668 #ifdef __cplusplus
14669 extern "C"
14670 #endif
14671 char crypt ();
14672 int
14673 main ()
14674 {
14675 return crypt ();
14676   ;
14677   return 0;
14678 }
14679 _ACEOF
14680 rm -f conftest.$ac_objext conftest$ac_exeext
14681 if { (ac_try="$ac_link"
14682 case "(($ac_try" in
14683   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14684   *) ac_try_echo=$ac_try;;
14685 esac
14686 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14687   (eval "$ac_link") 2>conftest.er1
14688   ac_status=$?
14689   grep -v '^ *+' conftest.er1 >conftest.err
14690   rm -f conftest.er1
14691   cat conftest.err >&5
14692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14693   (exit $ac_status); } && {
14694          test -z "$ac_c_werror_flag" ||
14695          test ! -s conftest.err
14696        } && test -s conftest$ac_exeext &&
14697        $as_test_x conftest$ac_exeext; then
14698   ac_cv_lib_crypt_crypt=yes
14699 else
14700   echo "$as_me: failed program was:" >&5
14701 sed 's/^/| /' conftest.$ac_ext >&5
14702
14703         ac_cv_lib_crypt_crypt=no
14704 fi
14705
14706 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14707       conftest$ac_exeext conftest.$ac_ext
14708 LIBS=$ac_check_lib_save_LIBS
14709 fi
14710 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14711 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
14712 if test $ac_cv_lib_crypt_crypt = yes; then
14713   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14714 fi
14715
14716   fi
14717 fi
14718
14719
14720 # Most of the above shadow mechanisms will have set need_setuid to yes,
14721 # if they were found.  But, on some systems, we need setuid even when
14722 # using plain old vanilla passwords.
14723 #
14724 if test "$enable_locking" = yes ; then
14725   case "$host" in
14726     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14727       need_setuid=yes
14728     ;;
14729   esac
14730 fi
14731
14732
14733 if test "$have_shadow_adjunct" = yes ; then
14734   cat >>confdefs.h <<\_ACEOF
14735 #define HAVE_ADJUNCT_PASSWD 1
14736 _ACEOF
14737
14738 elif test "$have_shadow_enhanced" = yes ; then
14739   cat >>confdefs.h <<\_ACEOF
14740 #define HAVE_ENHANCED_PASSWD 1
14741 _ACEOF
14742
14743 elif test "$have_shadow_hpux" = yes ; then
14744   cat >>confdefs.h <<\_ACEOF
14745 #define HAVE_HPUX_PASSWD 1
14746 _ACEOF
14747
14748 elif test "$have_shadow" = yes ; then
14749   cat >>confdefs.h <<\_ACEOF
14750 #define HAVE_SHADOW_PASSWD 1
14751 _ACEOF
14752
14753 fi
14754
14755
14756 ###############################################################################
14757 #
14758 #       Check for external password helper
14759 #       On SuSE, instead of having xscreensaver be a setuid program, they
14760 #       fork an external program that takes the password on stdin, and
14761 #       returns true if that password is a valid one.  Then only that
14762 #       smaller program needs to be setuid.
14763 #
14764 #       (Note that this external program is not a GUI: the GUI is still
14765 #       all in xscreensaver itself; the external program just does auth.)
14766 #
14767 ###############################################################################
14768
14769 have_passwd_helper=no
14770 with_passwd_helper_req=unspecified
14771
14772
14773 # Check whether --with-passwd-helper was given.
14774 if test "${with_passwd_helper+set}" = set; then
14775   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14776 else
14777   with_passwd_helper=no
14778 fi
14779
14780 # no HANDLE_X_PATH_ARG for this one
14781
14782 if test "$enable_locking" = no ; then
14783   with_passwd_helper_req=no
14784   with_passwd_helper=no
14785 fi
14786
14787 case "$with_passwd_helper" in
14788   ""|no) : ;;
14789   /*)
14790     cat >>confdefs.h <<_ACEOF
14791 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14792 _ACEOF
14793
14794     have_passwd_helper=yes;;
14795   *)
14796     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14797     exit 1
14798 esac
14799
14800
14801 ###############################################################################
14802 #
14803 #       Check for a login manager for a "New Login" button on the lock dialog.
14804 #       Usually this will be "/usr/bin/gdmflexiserver".
14805 #
14806 ###############################################################################
14807
14808 have_login_manager=no
14809 with_login_manager_req=unspecified
14810 default_login_manager='gdmflexiserver -ls'
14811
14812
14813 # Check whether --with-login-manager was given.
14814 if test "${with_login_manager+set}" = set; then
14815   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
14816 else
14817   with_login_manager=no
14818 fi
14819
14820 # no HANDLE_X_PATH_ARG for this one
14821
14822 if test "$enable_locking" = no ; then
14823   with_login_manager_req=no
14824   with_login_manager=no
14825 fi
14826
14827 if test -n "$with_login_manager_req" ; then
14828   ac_cv_login_manager_program=""
14829
14830  if test "$with_login_manager_req" = "yes" ; then
14831    with_login_manager_req=$default_login_manager
14832  fi
14833
14834   case "$with_login_manager_req" in
14835     /*)
14836       # absolute path
14837       set dummy $with_login_manager_req ; login_manager_tmp=$2
14838       { echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
14839 echo $ECHO_N "checking for $login_manager_tmp... $ECHO_C" >&6; }
14840       if test -x "$login_manager_tmp" ; then
14841         { echo "$as_me:$LINENO: result: yes" >&5
14842 echo "${ECHO_T}yes" >&6; }
14843       else
14844         { echo "$as_me:$LINENO: result: no" >&5
14845 echo "${ECHO_T}no" >&6; }
14846         with_login_manager=""
14847       fi
14848     ;;
14849     *)
14850       # relative path
14851       set dummy $with_login_manager_req ; login_manager_tmp=$2
14852       # don't cache
14853       unset ac_cv_path_login_manager_tmp
14854       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
14855 set dummy $login_manager_tmp; ac_word=$2
14856 { echo "$as_me:$LINENO: checking for $ac_word" >&5
14857 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
14858 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
14859   echo $ECHO_N "(cached) $ECHO_C" >&6
14860 else
14861   case $login_manager_tmp in
14862   [\\/]* | ?:[\\/]*)
14863   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
14864   ;;
14865   *)
14866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14867 for as_dir in $PATH
14868 do
14869   IFS=$as_save_IFS
14870   test -z "$as_dir" && as_dir=.
14871   for ac_exec_ext in '' $ac_executable_extensions; do
14872   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14873     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
14874     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14875     break 2
14876   fi
14877 done
14878 done
14879 IFS=$as_save_IFS
14880
14881   ;;
14882 esac
14883 fi
14884 login_manager_tmp=$ac_cv_path_login_manager_tmp
14885 if test -n "$login_manager_tmp"; then
14886   { echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
14887 echo "${ECHO_T}$login_manager_tmp" >&6; }
14888 else
14889   { echo "$as_me:$LINENO: result: no" >&5
14890 echo "${ECHO_T}no" >&6; }
14891 fi
14892
14893
14894       if test -z "$login_manager_tmp" ; then
14895         with_login_manager=""
14896       else
14897         with_login_manager="$login_manager_tmp"
14898       fi
14899     ;;
14900   esac
14901   ac_cv_login_manager_program="$with_login_manager"
14902
14903 elif test -n "$ac_cv_login_manager_program"; then
14904   { echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
14905 echo "${ECHO_T}checking for login_manager... (cached) $ac_cv_login_manager_program" >&6; }
14906 fi
14907
14908 NEW_LOGIN_COMMAND_P=''
14909 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
14910
14911 if test -z "$NEW_LOGIN_COMMAND" ; then
14912   NEW_LOGIN_COMMAND="$default_login_manager"
14913   NEW_LOGIN_COMMAND_P='! '
14914 fi
14915
14916
14917
14918 ###############################################################################
14919 #
14920 #       Check for -lgtk (and Gnome stuff)
14921 #
14922 ###############################################################################
14923
14924 have_gtk=no
14925 with_gtk_req=unspecified
14926
14927 # Check whether --with-gtk was given.
14928 if test "${with_gtk+set}" = set; then
14929   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
14930 else
14931   with_gtk=yes
14932 fi
14933
14934
14935 # if --with-gtk=/directory/ was specified, remember that directory so that
14936 # we can also look for the `gtk-config' program in that directory.
14937 case "$with_gtk" in
14938   /*)
14939     gtk_dir="$with_gtk"
14940     ;;
14941   *)
14942     gtk_dir=""
14943     ;;
14944 esac
14945
14946
14947    case "$with_gtk" in
14948     yes) ;;
14949     no)  ;;
14950
14951     /*)
14952      { echo "$as_me:$LINENO: checking for Gtk headers" >&5
14953 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6; }
14954      d=$with_gtk/include
14955      if test -d $d; then
14956        X_CFLAGS="-I$d $X_CFLAGS"
14957        { echo "$as_me:$LINENO: result: $d" >&5
14958 echo "${ECHO_T}$d" >&6; }
14959      else
14960        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14961 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14962      fi
14963
14964      { echo "$as_me:$LINENO: checking for Gtk libs" >&5
14965 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
14966      d=$with_gtk/lib
14967      if test -d $d; then
14968        X_LIBS="-L$d $X_LIBS"
14969        { echo "$as_me:$LINENO: result: $d" >&5
14970 echo "${ECHO_T}$d" >&6; }
14971      else
14972        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14973 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14974      fi
14975
14976      # replace the directory string with "yes".
14977      with_gtk_req="yes"
14978      with_gtk=$with_gtk_req
14979      ;;
14980
14981     *)
14982      echo ""
14983      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
14984      echo "       If it is a directory, then \`DIR/include' will be added to"
14985      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14986      exit 1
14987      ;;
14988    esac
14989
14990
14991 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
14992   echo "error: must be yes or no: --with-gtk=$with_gtk"
14993   exit 1
14994 fi
14995
14996
14997 parse_gtk_version_string() {
14998   # M4 sucks!!
14999
15000   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
15001   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
15002
15003   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
15004   if test -z "$ac_gtk_version"; then
15005     ac_gtk_version=unknown
15006     ac_gtk_version_string=unknown
15007   fi
15008 }
15009
15010 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
15011 # if the user specified --with-gtk=/foo/ then look there.
15012 #
15013 gtk_path="$PATH"
15014 if test ! -z "$gtk_dir"; then
15015   # canonicalize slashes.
15016   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15017   gtk_path="$foo:$gtk_path"
15018 fi
15019
15020 for ac_prog in pkg-config
15021 do
15022   # Extract the first word of "$ac_prog", so it can be a program name with args.
15023 set dummy $ac_prog; ac_word=$2
15024 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15025 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15026 if test "${ac_cv_path_pkg_config+set}" = set; then
15027   echo $ECHO_N "(cached) $ECHO_C" >&6
15028 else
15029   case $pkg_config in
15030   [\\/]* | ?:[\\/]*)
15031   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
15032   ;;
15033   *)
15034   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15035 for as_dir in $gtk_path
15036 do
15037   IFS=$as_save_IFS
15038   test -z "$as_dir" && as_dir=.
15039   for ac_exec_ext in '' $ac_executable_extensions; do
15040   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15041     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
15042     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15043     break 2
15044   fi
15045 done
15046 done
15047 IFS=$as_save_IFS
15048
15049   ;;
15050 esac
15051 fi
15052 pkg_config=$ac_cv_path_pkg_config
15053 if test -n "$pkg_config"; then
15054   { echo "$as_me:$LINENO: result: $pkg_config" >&5
15055 echo "${ECHO_T}$pkg_config" >&6; }
15056 else
15057   { echo "$as_me:$LINENO: result: no" >&5
15058 echo "${ECHO_T}no" >&6; }
15059 fi
15060
15061
15062   test -n "$pkg_config" && break
15063 done
15064
15065
15066 if test -z "$pkg_config" ; then
15067   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
15068 echo "$as_me: WARNING: pkg-config not found!" >&2;}
15069   pkg_config="false"
15070 fi
15071
15072
15073 # Utility function for running pkg-config-based tests...
15074 #
15075 pkgs=''
15076 pkg_check_version() {
15077   if test "$ok" = yes ; then
15078     req="$1"
15079     min="$2"
15080     { echo "$as_me:$LINENO: checking for $req" >&5
15081 echo $ECHO_N "checking for $req... $ECHO_C" >&6; }
15082     if $pkg_config --exists "$req" ; then
15083       vers=`$pkg_config --modversion "$req"`
15084       if $pkg_config --exists "$req >= $min" ; then
15085         { echo "$as_me:$LINENO: result: $vers" >&5
15086 echo "${ECHO_T}$vers" >&6; }
15087         pkgs="$pkgs $req"
15088         return 1
15089       else
15090         { echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
15091 echo "${ECHO_T}$vers (wanted >= $min)" >&6; }
15092         ok=no
15093         return 0
15094       fi
15095     else
15096       { echo "$as_me:$LINENO: result: no" >&5
15097 echo "${ECHO_T}no" >&6; }
15098       ok=no
15099       return 0
15100     fi
15101   fi
15102 }
15103
15104
15105 jurassic_gtk=no
15106 gtk_halfassed=no
15107
15108 if test "$with_gtk" = yes; then
15109   have_gtk=no
15110
15111   ok="yes"
15112   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
15113   pkg_check_version         gmodule-2.0  2.0.0
15114   pkg_check_version          libxml-2.0  2.4.6
15115   pkg_check_version        libglade-2.0  1.99.0
15116   pkg_check_version      gdk-pixbuf-2.0  2.0.0
15117   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
15118   have_gtk="$ok"
15119
15120   if test "$have_gtk" = no; then
15121     if test -n "$ac_gtk_version_string" ; then
15122       gtk_halfassed="$ac_gtk_version_string"
15123       gtk_halfassed_lib="$req"
15124     fi
15125   fi
15126
15127   if test "$have_gtk" = yes; then
15128     parse_gtk_version_string
15129     jurassic_gtk=no
15130   fi
15131
15132   if test "$have_gtk" = yes; then
15133     { echo "$as_me:$LINENO: checking for Gtk includes" >&5
15134 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6; }
15135 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15136   echo $ECHO_N "(cached) $ECHO_C" >&6
15137 else
15138   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
15139 fi
15140 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15141 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6; }
15142     { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15143 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15144 if test "${ac_cv_gtk_config_libs+set}" = set; then
15145   echo $ECHO_N "(cached) $ECHO_C" >&6
15146 else
15147   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
15148 fi
15149 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15150 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6; }
15151   fi
15152
15153   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15154   ac_gtk_config_libs=$ac_cv_gtk_config_libs
15155
15156   GTK_EXTRA_OBJS=""
15157   GTK_DATADIR=""
15158   if test "$have_gtk" = yes; then
15159     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15160     GTK_DATADIR="$GTK_DATADIR/share"
15161   fi
15162
15163   if test "$have_gtk" = yes; then
15164     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
15165     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
15166     cat >>confdefs.h <<\_ACEOF
15167 #define HAVE_GTK 1
15168 _ACEOF
15169
15170     cat >>confdefs.h <<\_ACEOF
15171 #define HAVE_GTK2 1
15172 _ACEOF
15173
15174     cat >>confdefs.h <<\_ACEOF
15175 #define HAVE_XML 1
15176 _ACEOF
15177
15178   fi
15179
15180 fi
15181
15182
15183 # Check for the various Gnome help and URL loading programs.
15184 #
15185 WITH_BROWSER=gnome-open
15186 if test "$have_gtk" = yes; then
15187   for ac_prog in gnome-open
15188 do
15189   # Extract the first word of "$ac_prog", so it can be a program name with args.
15190 set dummy $ac_prog; ac_word=$2
15191 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15192 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15193 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
15194   echo $ECHO_N "(cached) $ECHO_C" >&6
15195 else
15196   if test -n "$gnome_open_program"; then
15197   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
15198 else
15199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15200 for as_dir in $PATH
15201 do
15202   IFS=$as_save_IFS
15203   test -z "$as_dir" && as_dir=.
15204   for ac_exec_ext in '' $ac_executable_extensions; do
15205   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15206     ac_cv_prog_gnome_open_program="$ac_prog"
15207     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15208     break 2
15209   fi
15210 done
15211 done
15212 IFS=$as_save_IFS
15213
15214 fi
15215 fi
15216 gnome_open_program=$ac_cv_prog_gnome_open_program
15217 if test -n "$gnome_open_program"; then
15218   { echo "$as_me:$LINENO: result: $gnome_open_program" >&5
15219 echo "${ECHO_T}$gnome_open_program" >&6; }
15220 else
15221   { echo "$as_me:$LINENO: result: no" >&5
15222 echo "${ECHO_T}no" >&6; }
15223 fi
15224
15225
15226   test -n "$gnome_open_program" && break
15227 done
15228
15229   for ac_prog in gnome-url-show
15230 do
15231   # Extract the first word of "$ac_prog", so it can be a program name with args.
15232 set dummy $ac_prog; ac_word=$2
15233 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15234 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15235 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
15236   echo $ECHO_N "(cached) $ECHO_C" >&6
15237 else
15238   if test -n "$gnome_url_show_program"; then
15239   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
15240 else
15241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15242 for as_dir in $PATH
15243 do
15244   IFS=$as_save_IFS
15245   test -z "$as_dir" && as_dir=.
15246   for ac_exec_ext in '' $ac_executable_extensions; do
15247   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15248     ac_cv_prog_gnome_url_show_program="$ac_prog"
15249     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15250     break 2
15251   fi
15252 done
15253 done
15254 IFS=$as_save_IFS
15255
15256 fi
15257 fi
15258 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
15259 if test -n "$gnome_url_show_program"; then
15260   { echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
15261 echo "${ECHO_T}$gnome_url_show_program" >&6; }
15262 else
15263   { echo "$as_me:$LINENO: result: no" >&5
15264 echo "${ECHO_T}no" >&6; }
15265 fi
15266
15267
15268   test -n "$gnome_url_show_program" && break
15269 done
15270
15271 fi
15272
15273
15274 ###############################################################################
15275 #
15276 #       Check for -lXm.
15277 #
15278 ###############################################################################
15279
15280 have_motif=no
15281 with_motif_req=unspecified
15282
15283 # Check whether --with-motif was given.
15284 if test "${with_motif+set}" = set; then
15285   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
15286 else
15287   with_motif=no
15288 fi
15289
15290
15291
15292    case "$with_motif" in
15293     yes) ;;
15294     no)  ;;
15295
15296     /*)
15297      { echo "$as_me:$LINENO: checking for Motif headers" >&5
15298 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6; }
15299      d=$with_motif/include
15300      if test -d $d; then
15301        X_CFLAGS="-I$d $X_CFLAGS"
15302        { echo "$as_me:$LINENO: result: $d" >&5
15303 echo "${ECHO_T}$d" >&6; }
15304      else
15305        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15306 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15307      fi
15308
15309      { echo "$as_me:$LINENO: checking for Motif libs" >&5
15310 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6; }
15311      d=$with_motif/lib
15312      if test -d $d; then
15313        X_LIBS="-L$d $X_LIBS"
15314        { echo "$as_me:$LINENO: result: $d" >&5
15315 echo "${ECHO_T}$d" >&6; }
15316      else
15317        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15318 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15319      fi
15320
15321      # replace the directory string with "yes".
15322      with_motif_req="yes"
15323      with_motif=$with_motif_req
15324      ;;
15325
15326     *)
15327      echo ""
15328      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
15329      echo "       If it is a directory, then \`DIR/include' will be added to"
15330      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15331      exit 1
15332      ;;
15333    esac
15334
15335
15336 if test "$with_motif" != yes -a "$with_motif" != no ; then
15337   echo "error: must be yes or no: --with-motif=$with_motif"
15338   exit 1
15339 fi
15340
15341 if test "$with_motif" = yes; then
15342   have_motif=no
15343
15344   ac_save_CPPFLAGS="$CPPFLAGS"
15345   if test \! -z "$includedir" ; then
15346     CPPFLAGS="$CPPFLAGS -I$includedir"
15347   fi
15348   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15349   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15350   { echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
15351 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6; }
15352 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
15353   echo $ECHO_N "(cached) $ECHO_C" >&6
15354 else
15355   cat >conftest.$ac_ext <<_ACEOF
15356 /* confdefs.h.  */
15357 _ACEOF
15358 cat confdefs.h >>conftest.$ac_ext
15359 cat >>conftest.$ac_ext <<_ACEOF
15360 /* end confdefs.h.  */
15361 #include <stdlib.h>
15362                      #include <stdio.h>
15363                      #include <X11/Intrinsic.h>
15364
15365 #include <Xm/Xm.h>
15366 _ACEOF
15367 rm -f conftest.$ac_objext
15368 if { (ac_try="$ac_compile"
15369 case "(($ac_try" in
15370   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15371   *) ac_try_echo=$ac_try;;
15372 esac
15373 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15374   (eval "$ac_compile") 2>conftest.er1
15375   ac_status=$?
15376   grep -v '^ *+' conftest.er1 >conftest.err
15377   rm -f conftest.er1
15378   cat conftest.err >&5
15379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15380   (exit $ac_status); } && {
15381          test -z "$ac_c_werror_flag" ||
15382          test ! -s conftest.err
15383        } && test -s conftest.$ac_objext; then
15384   ac_cv_header_Xm_Xm_h=yes
15385 else
15386   echo "$as_me: failed program was:" >&5
15387 sed 's/^/| /' conftest.$ac_ext >&5
15388
15389         ac_cv_header_Xm_Xm_h=no
15390 fi
15391
15392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15393 fi
15394 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
15395 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6; }
15396 if test $ac_cv_header_Xm_Xm_h = yes; then
15397   have_motif=yes
15398                      cat >>confdefs.h <<\_ACEOF
15399 #define HAVE_MOTIF 1
15400 _ACEOF
15401
15402                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
15403 fi
15404
15405
15406   CPPFLAGS="$ac_save_CPPFLAGS"
15407 fi
15408
15409
15410 if test "$have_motif" = yes; then
15411
15412   ac_save_CPPFLAGS="$CPPFLAGS"
15413   if test \! -z "$includedir" ; then
15414     CPPFLAGS="$CPPFLAGS -I$includedir"
15415   fi
15416   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15417   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15418   { echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
15419 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6; }
15420 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
15421   echo $ECHO_N "(cached) $ECHO_C" >&6
15422 else
15423   cat >conftest.$ac_ext <<_ACEOF
15424 /* confdefs.h.  */
15425 _ACEOF
15426 cat confdefs.h >>conftest.$ac_ext
15427 cat >>conftest.$ac_ext <<_ACEOF
15428 /* end confdefs.h.  */
15429 #include <stdlib.h>
15430                      #include <stdio.h>
15431                      #include <X11/Intrinsic.h>
15432
15433 #include <Xm/ComboBox.h>
15434 _ACEOF
15435 rm -f conftest.$ac_objext
15436 if { (ac_try="$ac_compile"
15437 case "(($ac_try" in
15438   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15439   *) ac_try_echo=$ac_try;;
15440 esac
15441 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15442   (eval "$ac_compile") 2>conftest.er1
15443   ac_status=$?
15444   grep -v '^ *+' conftest.er1 >conftest.err
15445   rm -f conftest.er1
15446   cat conftest.err >&5
15447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15448   (exit $ac_status); } && {
15449          test -z "$ac_c_werror_flag" ||
15450          test ! -s conftest.err
15451        } && test -s conftest.$ac_objext; then
15452   ac_cv_header_Xm_ComboBox_h=yes
15453 else
15454   echo "$as_me: failed program was:" >&5
15455 sed 's/^/| /' conftest.$ac_ext >&5
15456
15457         ac_cv_header_Xm_ComboBox_h=no
15458 fi
15459
15460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15461 fi
15462 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
15463 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6; }
15464 if test $ac_cv_header_Xm_ComboBox_h = yes; then
15465   cat >>confdefs.h <<\_ACEOF
15466 #define HAVE_XMCOMBOBOX 1
15467 _ACEOF
15468
15469 fi
15470
15471
15472   CPPFLAGS="$ac_save_CPPFLAGS"
15473 fi
15474
15475
15476 ###############################################################################
15477 #
15478 #       Checking whether Motif is really Lesstif.
15479 #
15480 ###############################################################################
15481
15482 have_lesstif=no
15483 if test "$have_motif" = yes ; then
15484   { echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
15485 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6; }
15486 if test "${ac_cv_have_lesstif+set}" = set; then
15487   echo $ECHO_N "(cached) $ECHO_C" >&6
15488 else
15489
15490   ac_save_CPPFLAGS="$CPPFLAGS"
15491   if test \! -z "$includedir" ; then
15492     CPPFLAGS="$CPPFLAGS -I$includedir"
15493   fi
15494   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15495   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15496   cat >conftest.$ac_ext <<_ACEOF
15497 /* confdefs.h.  */
15498 _ACEOF
15499 cat confdefs.h >>conftest.$ac_ext
15500 cat >>conftest.$ac_ext <<_ACEOF
15501 /* end confdefs.h.  */
15502 #include <Xm/Xm.h>
15503 int
15504 main ()
15505 {
15506 long vers = LesstifVersion;
15507   ;
15508   return 0;
15509 }
15510 _ACEOF
15511 rm -f conftest.$ac_objext
15512 if { (ac_try="$ac_compile"
15513 case "(($ac_try" in
15514   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15515   *) ac_try_echo=$ac_try;;
15516 esac
15517 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15518   (eval "$ac_compile") 2>conftest.er1
15519   ac_status=$?
15520   grep -v '^ *+' conftest.er1 >conftest.err
15521   rm -f conftest.er1
15522   cat conftest.err >&5
15523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15524   (exit $ac_status); } && {
15525          test -z "$ac_c_werror_flag" ||
15526          test ! -s conftest.err
15527        } && test -s conftest.$ac_objext; then
15528   ac_cv_have_lesstif=yes
15529 else
15530   echo "$as_me: failed program was:" >&5
15531 sed 's/^/| /' conftest.$ac_ext >&5
15532
15533         ac_cv_have_lesstif=no
15534 fi
15535
15536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15537   CPPFLAGS="$ac_save_CPPFLAGS"
15538 fi
15539 { echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
15540 echo "${ECHO_T}$ac_cv_have_lesstif" >&6; }
15541   have_lesstif=$ac_cv_have_lesstif
15542 fi
15543
15544
15545 lesstif_version=unknown
15546 lesstif_version_string=unknown
15547
15548 if test "$have_lesstif" = yes ; then
15549   ltv=unknown
15550   echo unknown > conftest-lt
15551   { echo "$as_me:$LINENO: checking LessTif version number" >&5
15552 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6; }
15553 if test "${ac_cv_lesstif_version_string+set}" = set; then
15554   echo $ECHO_N "(cached) $ECHO_C" >&6
15555 else
15556
15557   ac_save_CPPFLAGS="$CPPFLAGS"
15558   if test \! -z "$includedir" ; then
15559     CPPFLAGS="$CPPFLAGS -I$includedir"
15560   fi
15561   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15562   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15563   if test "$cross_compiling" = yes; then
15564   ac_cv_lesstif_version=unknown
15565                      ac_cv_lesstif_version_string=unknown
15566 else
15567   cat >conftest.$ac_ext <<_ACEOF
15568 /* confdefs.h.  */
15569 _ACEOF
15570 cat confdefs.h >>conftest.$ac_ext
15571 cat >>conftest.$ac_ext <<_ACEOF
15572 /* end confdefs.h.  */
15573 #include <stdio.h>
15574                      #include <Xm/Xm.h>
15575                      int main() {
15576                        FILE *f = fopen("conftest-lt", "w");
15577                        if (!f) exit(1);
15578                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15579                           LESSTIF_VERSION, LESSTIF_REVISION);
15580                        fclose(f);
15581                        exit(0);
15582                      }
15583 _ACEOF
15584 rm -f conftest$ac_exeext
15585 if { (ac_try="$ac_link"
15586 case "(($ac_try" in
15587   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15588   *) ac_try_echo=$ac_try;;
15589 esac
15590 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15591   (eval "$ac_link") 2>&5
15592   ac_status=$?
15593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15594   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15595   { (case "(($ac_try" in
15596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15597   *) ac_try_echo=$ac_try;;
15598 esac
15599 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15600   (eval "$ac_try") 2>&5
15601   ac_status=$?
15602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15603   (exit $ac_status); }; }; then
15604   ltv=`cat conftest-lt`
15605                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15606                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15607 else
15608   echo "$as_me: program exited with status $ac_status" >&5
15609 echo "$as_me: failed program was:" >&5
15610 sed 's/^/| /' conftest.$ac_ext >&5
15611
15612 ( exit $ac_status )
15613 ac_cv_lesstif_version=unknown
15614                      ac_cv_lesstif_version_string=unknown
15615 fi
15616 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15617 fi
15618
15619
15620   CPPFLAGS="$ac_save_CPPFLAGS"
15621 fi
15622 { echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15623 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6; }
15624   rm -f conftest-lt
15625   lesstif_version=$ac_cv_lesstif_version
15626   lesstif_version_string=$ac_cv_lesstif_version_string
15627
15628 fi
15629
15630
15631 if test "$have_motif" = yes ; then
15632   mtv=unknown
15633   echo unknown > conftest-mt
15634   { echo "$as_me:$LINENO: checking Motif version number" >&5
15635 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6; }
15636 if test "${ac_cv_motif_version_string+set}" = set; then
15637   echo $ECHO_N "(cached) $ECHO_C" >&6
15638 else
15639
15640   ac_save_CPPFLAGS="$CPPFLAGS"
15641   if test \! -z "$includedir" ; then
15642     CPPFLAGS="$CPPFLAGS -I$includedir"
15643   fi
15644   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15645   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15646   if test "$cross_compiling" = yes; then
15647   ac_cv_motif_version=unknown
15648                      ac_cv_motif_version_string=unknown
15649 else
15650   cat >conftest.$ac_ext <<_ACEOF
15651 /* confdefs.h.  */
15652 _ACEOF
15653 cat confdefs.h >>conftest.$ac_ext
15654 cat >>conftest.$ac_ext <<_ACEOF
15655 /* end confdefs.h.  */
15656 #include <stdio.h>
15657                      #include <Xm/Xm.h>
15658                      int main() {
15659                        FILE *f = fopen("conftest-mt", "w");
15660                        if (!f) exit(1);
15661                        fprintf(f, "%d %d.%d\n", XmVersion,
15662                           XmVERSION, XmREVISION);
15663                        fclose(f);
15664                        exit(0);
15665                      }
15666 _ACEOF
15667 rm -f conftest$ac_exeext
15668 if { (ac_try="$ac_link"
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_link") 2>&5
15675   ac_status=$?
15676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15677   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15678   { (case "(($ac_try" in
15679   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15680   *) ac_try_echo=$ac_try;;
15681 esac
15682 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15683   (eval "$ac_try") 2>&5
15684   ac_status=$?
15685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15686   (exit $ac_status); }; }; then
15687   mtv=`cat conftest-mt`
15688                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15689                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15690 else
15691   echo "$as_me: program exited with status $ac_status" >&5
15692 echo "$as_me: failed program was:" >&5
15693 sed 's/^/| /' conftest.$ac_ext >&5
15694
15695 ( exit $ac_status )
15696 ac_cv_motif_version=unknown
15697                      ac_cv_motif_version_string=unknown
15698 fi
15699 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15700 fi
15701
15702
15703   CPPFLAGS="$ac_save_CPPFLAGS"
15704 fi
15705 { echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15706 echo "${ECHO_T}$ac_cv_motif_version_string" >&6; }
15707   rm -f conftest-mt
15708   motif_version=$ac_cv_motif_version
15709   motif_version_string=$ac_cv_motif_version_string
15710
15711 fi
15712
15713
15714 ###############################################################################
15715 #
15716 #       Checking whether Motif requires -lXpm.
15717 #
15718 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15719 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15720 #       of the library whether to build the XPM code into libXm, or whether
15721 #       to rely on an external libXm.  So the only way to tell whether XPM is
15722 #       a link-time requirement is to examine libXm.a, which is very
15723 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15724 #       always link against XPM if the XPM lib exists (and this will be a
15725 #       no-op if libXm happens to already have the XPM code in it.)
15726 #
15727 ###############################################################################
15728
15729 motif_requires_xpm=no
15730 if test "$have_motif" = yes ; then
15731    { echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15732 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6; }
15733    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15734    then
15735      motif_requires_xpm=yes
15736      { echo "$as_me:$LINENO: result: maybe" >&5
15737 echo "${ECHO_T}maybe" >&6; }
15738    else
15739      { echo "$as_me:$LINENO: result: no" >&5
15740 echo "${ECHO_T}no" >&6; }
15741    fi
15742 fi
15743
15744
15745 ###############################################################################
15746 #
15747 #       Checking whether Motif requires -lXp.
15748 #
15749 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15750 #       Extension".   Why this extension isn't in -lXext with all the others,
15751 #       I have no idea.
15752 #
15753 ###############################################################################
15754
15755 have_xp_ext=no
15756 if test "$have_motif" = yes ; then
15757    have_xp_ext=no
15758
15759   ac_save_CPPFLAGS="$CPPFLAGS"
15760   ac_save_LDFLAGS="$LDFLAGS"
15761 #  ac_save_LIBS="$LIBS"
15762
15763   if test \! -z "$includedir" ; then
15764     CPPFLAGS="$CPPFLAGS -I$includedir"
15765   fi
15766   # note: $X_CFLAGS includes $x_includes
15767   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15768
15769   if test \! -z "$libdir" ; then
15770     LDFLAGS="$LDFLAGS -L$libdir"
15771   fi
15772   # note: $X_LIBS includes $x_libraries
15773   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15774
15775   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15776   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15777   { echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15778 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6; }
15779 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15780   echo $ECHO_N "(cached) $ECHO_C" >&6
15781 else
15782   ac_check_lib_save_LIBS=$LIBS
15783 LIBS="-lXp -lX11 -lXext -lm $LIBS"
15784 cat >conftest.$ac_ext <<_ACEOF
15785 /* confdefs.h.  */
15786 _ACEOF
15787 cat confdefs.h >>conftest.$ac_ext
15788 cat >>conftest.$ac_ext <<_ACEOF
15789 /* end confdefs.h.  */
15790
15791 /* Override any GCC internal prototype to avoid an error.
15792    Use char because int might match the return type of a GCC
15793    builtin and then its argument prototype would still apply.  */
15794 #ifdef __cplusplus
15795 extern "C"
15796 #endif
15797 char XpQueryExtension ();
15798 int
15799 main ()
15800 {
15801 return XpQueryExtension ();
15802   ;
15803   return 0;
15804 }
15805 _ACEOF
15806 rm -f conftest.$ac_objext conftest$ac_exeext
15807 if { (ac_try="$ac_link"
15808 case "(($ac_try" in
15809   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15810   *) ac_try_echo=$ac_try;;
15811 esac
15812 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15813   (eval "$ac_link") 2>conftest.er1
15814   ac_status=$?
15815   grep -v '^ *+' conftest.er1 >conftest.err
15816   rm -f conftest.er1
15817   cat conftest.err >&5
15818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15819   (exit $ac_status); } && {
15820          test -z "$ac_c_werror_flag" ||
15821          test ! -s conftest.err
15822        } && test -s conftest$ac_exeext &&
15823        $as_test_x conftest$ac_exeext; then
15824   ac_cv_lib_Xp_XpQueryExtension=yes
15825 else
15826   echo "$as_me: failed program was:" >&5
15827 sed 's/^/| /' conftest.$ac_ext >&5
15828
15829         ac_cv_lib_Xp_XpQueryExtension=no
15830 fi
15831
15832 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15833       conftest$ac_exeext conftest.$ac_ext
15834 LIBS=$ac_check_lib_save_LIBS
15835 fi
15836 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
15837 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6; }
15838 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
15839   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
15840 else
15841   true
15842 fi
15843
15844   CPPFLAGS="$ac_save_CPPFLAGS"
15845   LDFLAGS="$ac_save_LDFLAGS"
15846 #  LIBS="$ac_save_LIBS"
15847
15848 fi
15849
15850
15851 ###############################################################################
15852 #
15853 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
15854 #
15855 ###############################################################################
15856
15857 have_xintl=no
15858 if test "$have_motif" = yes ; then
15859
15860   ac_save_CPPFLAGS="$CPPFLAGS"
15861   ac_save_LDFLAGS="$LDFLAGS"
15862 #  ac_save_LIBS="$LIBS"
15863
15864   if test \! -z "$includedir" ; then
15865     CPPFLAGS="$CPPFLAGS -I$includedir"
15866   fi
15867   # note: $X_CFLAGS includes $x_includes
15868   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15869
15870   if test \! -z "$libdir" ; then
15871     LDFLAGS="$LDFLAGS -L$libdir"
15872   fi
15873   # note: $X_LIBS includes $x_libraries
15874   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15875
15876   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15877   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15878   { echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
15879 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6; }
15880 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
15881   echo $ECHO_N "(cached) $ECHO_C" >&6
15882 else
15883   ac_check_lib_save_LIBS=$LIBS
15884 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
15885 cat >conftest.$ac_ext <<_ACEOF
15886 /* confdefs.h.  */
15887 _ACEOF
15888 cat confdefs.h >>conftest.$ac_ext
15889 cat >>conftest.$ac_ext <<_ACEOF
15890 /* end confdefs.h.  */
15891
15892 /* Override any GCC internal prototype to avoid an error.
15893    Use char because int might match the return type of a GCC
15894    builtin and then its argument prototype would still apply.  */
15895 #ifdef __cplusplus
15896 extern "C"
15897 #endif
15898 char _Xsetlocale ();
15899 int
15900 main ()
15901 {
15902 return _Xsetlocale ();
15903   ;
15904   return 0;
15905 }
15906 _ACEOF
15907 rm -f conftest.$ac_objext conftest$ac_exeext
15908 if { (ac_try="$ac_link"
15909 case "(($ac_try" in
15910   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15911   *) ac_try_echo=$ac_try;;
15912 esac
15913 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15914   (eval "$ac_link") 2>conftest.er1
15915   ac_status=$?
15916   grep -v '^ *+' conftest.er1 >conftest.err
15917   rm -f conftest.er1
15918   cat conftest.err >&5
15919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15920   (exit $ac_status); } && {
15921          test -z "$ac_c_werror_flag" ||
15922          test ! -s conftest.err
15923        } && test -s conftest$ac_exeext &&
15924        $as_test_x conftest$ac_exeext; then
15925   ac_cv_lib_Xintl__Xsetlocale=yes
15926 else
15927   echo "$as_me: failed program was:" >&5
15928 sed 's/^/| /' conftest.$ac_ext >&5
15929
15930         ac_cv_lib_Xintl__Xsetlocale=no
15931 fi
15932
15933 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15934       conftest$ac_exeext conftest.$ac_ext
15935 LIBS=$ac_check_lib_save_LIBS
15936 fi
15937 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
15938 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6; }
15939 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
15940   have_xintl=yes
15941 else
15942   have_xintl=no
15943 fi
15944
15945   CPPFLAGS="$ac_save_CPPFLAGS"
15946   LDFLAGS="$ac_save_LDFLAGS"
15947 #  LIBS="$ac_save_LIBS"
15948
15949   if test "$have_xintl" = yes; then
15950     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
15951   fi
15952 fi
15953
15954
15955 ###############################################################################
15956 #
15957 #       Check for -lGL or -lMesaGL.
15958 #
15959 ###############################################################################
15960
15961 have_gl=no
15962 ac_have_mesa_gl=no
15963 with_gl_req=unspecified
15964 gl_halfassed=no
15965
15966 # Check whether --with-gl was given.
15967 if test "${with_gl+set}" = set; then
15968   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
15969 else
15970   with_gl=yes
15971 fi
15972
15973
15974
15975    case "$with_gl" in
15976     yes) ;;
15977     no)  ;;
15978
15979     /*)
15980      { echo "$as_me:$LINENO: checking for GL headers" >&5
15981 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6; }
15982      d=$with_gl/include
15983      if test -d $d; then
15984        X_CFLAGS="-I$d $X_CFLAGS"
15985        { echo "$as_me:$LINENO: result: $d" >&5
15986 echo "${ECHO_T}$d" >&6; }
15987      else
15988        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15989 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15990      fi
15991
15992      { echo "$as_me:$LINENO: checking for GL libs" >&5
15993 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6; }
15994      d=$with_gl/lib
15995      if test -d $d; then
15996        X_LIBS="-L$d $X_LIBS"
15997        { echo "$as_me:$LINENO: result: $d" >&5
15998 echo "${ECHO_T}$d" >&6; }
15999      else
16000        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16001 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16002      fi
16003
16004      # replace the directory string with "yes".
16005      with_gl_req="yes"
16006      with_gl=$with_gl_req
16007      ;;
16008
16009     *)
16010      echo ""
16011      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
16012      echo "       If it is a directory, then \`DIR/include' will be added to"
16013      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16014      exit 1
16015      ;;
16016    esac
16017
16018
16019 ac_mesagl_version=unknown
16020 ac_mesagl_version_string=unknown
16021
16022 if test "$with_gl" = yes; then
16023
16024   ac_save_CPPFLAGS="$CPPFLAGS"
16025   if test \! -z "$includedir" ; then
16026     CPPFLAGS="$CPPFLAGS -I$includedir"
16027   fi
16028   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16029   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16030   if test "${ac_cv_header_GL_gl_h+set}" = set; then
16031   { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16032 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16033 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16034   echo $ECHO_N "(cached) $ECHO_C" >&6
16035 fi
16036 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16037 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16038 else
16039   # Is the header compilable?
16040 { echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
16041 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6; }
16042 cat >conftest.$ac_ext <<_ACEOF
16043 /* confdefs.h.  */
16044 _ACEOF
16045 cat confdefs.h >>conftest.$ac_ext
16046 cat >>conftest.$ac_ext <<_ACEOF
16047 /* end confdefs.h.  */
16048 $ac_includes_default
16049 #include <GL/gl.h>
16050 _ACEOF
16051 rm -f conftest.$ac_objext
16052 if { (ac_try="$ac_compile"
16053 case "(($ac_try" in
16054   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16055   *) ac_try_echo=$ac_try;;
16056 esac
16057 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16058   (eval "$ac_compile") 2>conftest.er1
16059   ac_status=$?
16060   grep -v '^ *+' conftest.er1 >conftest.err
16061   rm -f conftest.er1
16062   cat conftest.err >&5
16063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16064   (exit $ac_status); } && {
16065          test -z "$ac_c_werror_flag" ||
16066          test ! -s conftest.err
16067        } && test -s conftest.$ac_objext; then
16068   ac_header_compiler=yes
16069 else
16070   echo "$as_me: failed program was:" >&5
16071 sed 's/^/| /' conftest.$ac_ext >&5
16072
16073         ac_header_compiler=no
16074 fi
16075
16076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16077 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16078 echo "${ECHO_T}$ac_header_compiler" >&6; }
16079
16080 # Is the header present?
16081 { echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
16082 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6; }
16083 cat >conftest.$ac_ext <<_ACEOF
16084 /* confdefs.h.  */
16085 _ACEOF
16086 cat confdefs.h >>conftest.$ac_ext
16087 cat >>conftest.$ac_ext <<_ACEOF
16088 /* end confdefs.h.  */
16089 #include <GL/gl.h>
16090 _ACEOF
16091 if { (ac_try="$ac_cpp conftest.$ac_ext"
16092 case "(($ac_try" in
16093   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16094   *) ac_try_echo=$ac_try;;
16095 esac
16096 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16097   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16098   ac_status=$?
16099   grep -v '^ *+' conftest.er1 >conftest.err
16100   rm -f conftest.er1
16101   cat conftest.err >&5
16102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16103   (exit $ac_status); } >/dev/null && {
16104          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16105          test ! -s conftest.err
16106        }; then
16107   ac_header_preproc=yes
16108 else
16109   echo "$as_me: failed program was:" >&5
16110 sed 's/^/| /' conftest.$ac_ext >&5
16111
16112   ac_header_preproc=no
16113 fi
16114
16115 rm -f conftest.err conftest.$ac_ext
16116 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16117 echo "${ECHO_T}$ac_header_preproc" >&6; }
16118
16119 # So?  What about this header?
16120 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16121   yes:no: )
16122     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16123 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16124     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
16125 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
16126     ac_header_preproc=yes
16127     ;;
16128   no:yes:* )
16129     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
16130 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
16131     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
16132 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
16133     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
16134 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
16135     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
16136 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16137     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
16138 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
16139     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
16140 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
16141
16142     ;;
16143 esac
16144 { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16145 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16146 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16147   echo $ECHO_N "(cached) $ECHO_C" >&6
16148 else
16149   ac_cv_header_GL_gl_h=$ac_header_preproc
16150 fi
16151 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16152 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16153
16154 fi
16155 if test $ac_cv_header_GL_gl_h = yes; then
16156   have_gl=yes
16157 else
16158   have_gl=no
16159 fi
16160
16161
16162   CPPFLAGS="$ac_save_CPPFLAGS"
16163   if test "$have_gl" = yes ; then
16164
16165   ac_save_CPPFLAGS="$CPPFLAGS"
16166   if test \! -z "$includedir" ; then
16167     CPPFLAGS="$CPPFLAGS -I$includedir"
16168   fi
16169   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16170   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16171   { echo "$as_me:$LINENO: checking for GL/glx.h" >&5
16172 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6; }
16173 if test "${ac_cv_header_GL_glx_h+set}" = set; then
16174   echo $ECHO_N "(cached) $ECHO_C" >&6
16175 else
16176   cat >conftest.$ac_ext <<_ACEOF
16177 /* confdefs.h.  */
16178 _ACEOF
16179 cat confdefs.h >>conftest.$ac_ext
16180 cat >>conftest.$ac_ext <<_ACEOF
16181 /* end confdefs.h.  */
16182 #include <GL/gl.h>
16183
16184 #include <GL/glx.h>
16185 _ACEOF
16186 rm -f conftest.$ac_objext
16187 if { (ac_try="$ac_compile"
16188 case "(($ac_try" in
16189   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16190   *) ac_try_echo=$ac_try;;
16191 esac
16192 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16193   (eval "$ac_compile") 2>conftest.er1
16194   ac_status=$?
16195   grep -v '^ *+' conftest.er1 >conftest.err
16196   rm -f conftest.er1
16197   cat conftest.err >&5
16198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16199   (exit $ac_status); } && {
16200          test -z "$ac_c_werror_flag" ||
16201          test ! -s conftest.err
16202        } && test -s conftest.$ac_objext; then
16203   ac_cv_header_GL_glx_h=yes
16204 else
16205   echo "$as_me: failed program was:" >&5
16206 sed 's/^/| /' conftest.$ac_ext >&5
16207
16208         ac_cv_header_GL_glx_h=no
16209 fi
16210
16211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16212 fi
16213 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
16214 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6; }
16215 if test $ac_cv_header_GL_glx_h = yes; then
16216   have_gl=yes
16217 else
16218   have_gl=no
16219 fi
16220
16221
16222   CPPFLAGS="$ac_save_CPPFLAGS"
16223   fi
16224
16225   # If we have the headers, try and figure out which vendor it's from.
16226   #
16227   if test "$have_gl" = yes ; then
16228
16229     # We need to know whether it's MesaGL so that we know which libraries
16230     # to link against.
16231     #
16232     { echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
16233 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6; }
16234 if test "${ac_cv_have_mesa_gl+set}" = set; then
16235   echo $ECHO_N "(cached) $ECHO_C" >&6
16236 else
16237   ac_cv_have_mesa_gl=no
16238        if test "$ac_macosx" = no; then
16239          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
16240          # It's not really Mesa, is it?
16241
16242   ac_save_CPPFLAGS="$CPPFLAGS"
16243   if test \! -z "$includedir" ; then
16244     CPPFLAGS="$CPPFLAGS -I$includedir"
16245   fi
16246   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16247   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16248   cat >conftest.$ac_ext <<_ACEOF
16249 /* confdefs.h.  */
16250 _ACEOF
16251 cat confdefs.h >>conftest.$ac_ext
16252 cat >>conftest.$ac_ext <<_ACEOF
16253 /* end confdefs.h.  */
16254 #include <GL/glx.h>
16255
16256 _ACEOF
16257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16258   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
16259   ac_cv_have_mesa_gl=yes
16260 fi
16261 rm -f conftest*
16262
16263   CPPFLAGS="$ac_save_CPPFLAGS"
16264        fi
16265 fi
16266 { echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
16267 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6; }
16268     ac_have_mesa_gl=$ac_cv_have_mesa_gl
16269
16270     gl_lib_1=""
16271     GL_LIBS=""
16272
16273     if test "$ac_macosx" = yes; then
16274
16275       # Without these, every link against libGL gets a bunch of useless
16276       # warnings.
16277       #
16278       osx_crud="-bind_at_load -multiply_defined suppress"
16279       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16280 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16281       GL_LIBS="$GL_LIBS $osx_crud"
16282       unset osx_crud
16283
16284       # New lossage in 10.5.0: without this, we get:
16285       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
16286       #
16287       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
16288       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
16289
16290       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16291 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16292       GL_LIBS="$GL_LIBS $osx_crud"
16293       unset osx_crud
16294     fi
16295
16296
16297     # Some versions of MesaGL are compiled to require -lpthread.
16298     # So if the Mesa headers exist, and -lpthread exists, then always
16299     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
16300     #
16301     if test "$ac_have_mesa_gl" = yes; then
16302       { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16303 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
16304 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
16305   echo $ECHO_N "(cached) $ECHO_C" >&6
16306 else
16307   ac_check_lib_save_LIBS=$LIBS
16308 LIBS="-lpthread  $LIBS"
16309 cat >conftest.$ac_ext <<_ACEOF
16310 /* confdefs.h.  */
16311 _ACEOF
16312 cat confdefs.h >>conftest.$ac_ext
16313 cat >>conftest.$ac_ext <<_ACEOF
16314 /* end confdefs.h.  */
16315
16316 /* Override any GCC internal prototype to avoid an error.
16317    Use char because int might match the return type of a GCC
16318    builtin and then its argument prototype would still apply.  */
16319 #ifdef __cplusplus
16320 extern "C"
16321 #endif
16322 char pthread_create ();
16323 int
16324 main ()
16325 {
16326 return pthread_create ();
16327   ;
16328   return 0;
16329 }
16330 _ACEOF
16331 rm -f conftest.$ac_objext conftest$ac_exeext
16332 if { (ac_try="$ac_link"
16333 case "(($ac_try" in
16334   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16335   *) ac_try_echo=$ac_try;;
16336 esac
16337 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16338   (eval "$ac_link") 2>conftest.er1
16339   ac_status=$?
16340   grep -v '^ *+' conftest.er1 >conftest.err
16341   rm -f conftest.er1
16342   cat conftest.err >&5
16343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16344   (exit $ac_status); } && {
16345          test -z "$ac_c_werror_flag" ||
16346          test ! -s conftest.err
16347        } && test -s conftest$ac_exeext &&
16348        $as_test_x conftest$ac_exeext; then
16349   ac_cv_lib_pthread_pthread_create=yes
16350 else
16351   echo "$as_me: failed program was:" >&5
16352 sed 's/^/| /' conftest.$ac_ext >&5
16353
16354         ac_cv_lib_pthread_pthread_create=no
16355 fi
16356
16357 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16358       conftest$ac_exeext conftest.$ac_ext
16359 LIBS=$ac_check_lib_save_LIBS
16360 fi
16361 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
16362 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
16363 if test $ac_cv_lib_pthread_pthread_create = yes; then
16364   GL_LIBS="-lpthread"
16365 fi
16366
16367     fi
16368
16369
16370     # If we have Mesa headers, check to see if we can link against -lMesaGL.
16371     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
16372     # Else, warn that GL is busted.  (We have the headers, but no libs.)
16373     #
16374
16375     if test "$ac_have_mesa_gl" = yes ; then
16376
16377   ac_save_CPPFLAGS="$CPPFLAGS"
16378   ac_save_LDFLAGS="$LDFLAGS"
16379 #  ac_save_LIBS="$LIBS"
16380
16381   if test \! -z "$includedir" ; then
16382     CPPFLAGS="$CPPFLAGS -I$includedir"
16383   fi
16384   # note: $X_CFLAGS includes $x_includes
16385   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16386
16387   if test \! -z "$libdir" ; then
16388     LDFLAGS="$LDFLAGS -L$libdir"
16389   fi
16390   # note: $X_LIBS includes $x_libraries
16391   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16392
16393   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16394   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16395   { echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
16396 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6; }
16397 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
16398   echo $ECHO_N "(cached) $ECHO_C" >&6
16399 else
16400   ac_check_lib_save_LIBS=$LIBS
16401 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16402 cat >conftest.$ac_ext <<_ACEOF
16403 /* confdefs.h.  */
16404 _ACEOF
16405 cat confdefs.h >>conftest.$ac_ext
16406 cat >>conftest.$ac_ext <<_ACEOF
16407 /* end confdefs.h.  */
16408
16409 /* Override any GCC internal prototype to avoid an error.
16410    Use char because int might match the return type of a GCC
16411    builtin and then its argument prototype would still apply.  */
16412 #ifdef __cplusplus
16413 extern "C"
16414 #endif
16415 char glXCreateContext ();
16416 int
16417 main ()
16418 {
16419 return glXCreateContext ();
16420   ;
16421   return 0;
16422 }
16423 _ACEOF
16424 rm -f conftest.$ac_objext conftest$ac_exeext
16425 if { (ac_try="$ac_link"
16426 case "(($ac_try" in
16427   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16428   *) ac_try_echo=$ac_try;;
16429 esac
16430 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16431   (eval "$ac_link") 2>conftest.er1
16432   ac_status=$?
16433   grep -v '^ *+' conftest.er1 >conftest.err
16434   rm -f conftest.er1
16435   cat conftest.err >&5
16436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16437   (exit $ac_status); } && {
16438          test -z "$ac_c_werror_flag" ||
16439          test ! -s conftest.err
16440        } && test -s conftest$ac_exeext &&
16441        $as_test_x conftest$ac_exeext; then
16442   ac_cv_lib_MesaGL_glXCreateContext=yes
16443 else
16444   echo "$as_me: failed program was:" >&5
16445 sed 's/^/| /' conftest.$ac_ext >&5
16446
16447         ac_cv_lib_MesaGL_glXCreateContext=no
16448 fi
16449
16450 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16451       conftest$ac_exeext conftest.$ac_ext
16452 LIBS=$ac_check_lib_save_LIBS
16453 fi
16454 { echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
16455 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
16456 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
16457   gl_lib_1="MesaGL"
16458                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
16459 fi
16460
16461   CPPFLAGS="$ac_save_CPPFLAGS"
16462   LDFLAGS="$ac_save_LDFLAGS"
16463 #  LIBS="$ac_save_LIBS"
16464
16465     fi
16466
16467     if test "$gl_lib_1" = "" ; then
16468
16469   ac_save_CPPFLAGS="$CPPFLAGS"
16470   ac_save_LDFLAGS="$LDFLAGS"
16471 #  ac_save_LIBS="$LIBS"
16472
16473   if test \! -z "$includedir" ; then
16474     CPPFLAGS="$CPPFLAGS -I$includedir"
16475   fi
16476   # note: $X_CFLAGS includes $x_includes
16477   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16478
16479   if test \! -z "$libdir" ; then
16480     LDFLAGS="$LDFLAGS -L$libdir"
16481   fi
16482   # note: $X_LIBS includes $x_libraries
16483   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16484
16485   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16486   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16487   { echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
16488 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6; }
16489 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
16490   echo $ECHO_N "(cached) $ECHO_C" >&6
16491 else
16492   ac_check_lib_save_LIBS=$LIBS
16493 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16494 cat >conftest.$ac_ext <<_ACEOF
16495 /* confdefs.h.  */
16496 _ACEOF
16497 cat confdefs.h >>conftest.$ac_ext
16498 cat >>conftest.$ac_ext <<_ACEOF
16499 /* end confdefs.h.  */
16500
16501 /* Override any GCC internal prototype to avoid an error.
16502    Use char because int might match the return type of a GCC
16503    builtin and then its argument prototype would still apply.  */
16504 #ifdef __cplusplus
16505 extern "C"
16506 #endif
16507 char glXCreateContext ();
16508 int
16509 main ()
16510 {
16511 return glXCreateContext ();
16512   ;
16513   return 0;
16514 }
16515 _ACEOF
16516 rm -f conftest.$ac_objext conftest$ac_exeext
16517 if { (ac_try="$ac_link"
16518 case "(($ac_try" in
16519   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16520   *) ac_try_echo=$ac_try;;
16521 esac
16522 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16523   (eval "$ac_link") 2>conftest.er1
16524   ac_status=$?
16525   grep -v '^ *+' conftest.er1 >conftest.err
16526   rm -f conftest.er1
16527   cat conftest.err >&5
16528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16529   (exit $ac_status); } && {
16530          test -z "$ac_c_werror_flag" ||
16531          test ! -s conftest.err
16532        } && test -s conftest$ac_exeext &&
16533        $as_test_x conftest$ac_exeext; then
16534   ac_cv_lib_GL_glXCreateContext=yes
16535 else
16536   echo "$as_me: failed program was:" >&5
16537 sed 's/^/| /' conftest.$ac_ext >&5
16538
16539         ac_cv_lib_GL_glXCreateContext=no
16540 fi
16541
16542 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16543       conftest$ac_exeext conftest.$ac_ext
16544 LIBS=$ac_check_lib_save_LIBS
16545 fi
16546 { echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
16547 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6; }
16548 if test $ac_cv_lib_GL_glXCreateContext = yes; then
16549   gl_lib_1="GL"
16550                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
16551 fi
16552
16553   CPPFLAGS="$ac_save_CPPFLAGS"
16554   LDFLAGS="$ac_save_LDFLAGS"
16555 #  LIBS="$ac_save_LIBS"
16556
16557     fi
16558
16559     if test "$gl_lib_1" = "" ; then
16560       # we have headers, but no libs -- bail.
16561       have_gl=no
16562       ac_have_mesa_gl=no
16563       gl_halfassed=yes
16564     else
16565       # linking works -- we can build the GL hacks.
16566       cat >>confdefs.h <<\_ACEOF
16567 #define HAVE_GL 1
16568 _ACEOF
16569
16570       if test "$ac_have_mesa_gl" = yes ; then
16571         cat >>confdefs.h <<\_ACEOF
16572 #define HAVE_MESA_GL 1
16573 _ACEOF
16574
16575       fi
16576     fi
16577   fi
16578
16579
16580   # Now that we know we have GL headers and libs, do some more GL testing.
16581   #
16582
16583   if test "$have_gl" = yes ; then
16584     # If it's MesaGL, we'd like to issue a warning if the version number
16585     # is less than or equal to 2.6, because that version had a security bug.
16586     #
16587     if test "$ac_have_mesa_gl" = yes; then
16588
16589       { echo "$as_me:$LINENO: checking MesaGL version number" >&5
16590 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6; }
16591 if test "${ac_cv_mesagl_version_string+set}" = set; then
16592   echo $ECHO_N "(cached) $ECHO_C" >&6
16593 else
16594   cat > conftest.$ac_ext <<EOF
16595 #line 16599 "configure"
16596 #include "confdefs.h"
16597 #include <GL/gl.h>
16598 #ifndef MESA_MAJOR_VERSION
16599 # include <GL/xmesa.h>
16600 # ifdef XMESA_MAJOR_VERSION
16601    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
16602       we have to check the XMesa version number (the number of the X protocol
16603       support, which seems to be the same as the Mesa version number.)
16604     */
16605 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
16606 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
16607 # else
16608    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
16609       so we have no way of telling what version of Mesa this is at all.
16610       So, we'll guess that the osmesa version (the "offscreen protocol")
16611       is less than or equal to the real mesa version number.  Except that
16612       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
16613       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
16614     */
16615 # include <GL/osmesa.h>
16616 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
16617 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
16618 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
16619 #   undef MESA_MINOR_VERSION
16620 #   define MESA_MINOR_VERSION 4 or newer, probably?
16621 #  endif
16622 # endif
16623 #endif
16624 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
16625 EOF
16626
16627          ac_save_CPPFLAGS="$CPPFLAGS"
16628          if test \! -z "$includedir" ; then
16629            CPPFLAGS="$CPPFLAGS -I$includedir"
16630          fi
16631          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16632
16633          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
16634
16635          # M4 sucks!!
16636
16637           mglv=`echo "$mglv" | sed -n \
16638              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16639
16640
16641          rm -f conftest.$ac_ext
16642
16643          CPPFLAGS="$ac_save_CPPFLAGS"
16644
16645          if test "$mglv" = ""; then
16646            ac_mesagl_version=unknown
16647            ac_mesagl_version_string=unknown
16648          else
16649            ac_mesagl_version_string="$mglv"
16650            # M4 sucks!!
16651
16652            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16653            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16654
16655            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16656            if test -z "$ac_mesagl_version"; then
16657              ac_mesagl_version=unknown
16658              ac_mesagl_version_string=unknown
16659            fi
16660          fi
16661          ac_cv_mesagl_version=$ac_mesagl_version
16662          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16663
16664 fi
16665 { echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16666 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6; }
16667       ac_mesagl_version=$ac_cv_mesagl_version
16668       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16669     fi
16670
16671
16672     # Check for OpenGL 1.1 features.
16673     #
16674
16675   ac_save_CPPFLAGS="$CPPFLAGS"
16676   ac_save_LDFLAGS="$LDFLAGS"
16677 #  ac_save_LIBS="$LIBS"
16678
16679   if test \! -z "$includedir" ; then
16680     CPPFLAGS="$CPPFLAGS -I$includedir"
16681   fi
16682   # note: $X_CFLAGS includes $x_includes
16683   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16684
16685   if test \! -z "$libdir" ; then
16686     LDFLAGS="$LDFLAGS -L$libdir"
16687   fi
16688   # note: $X_LIBS includes $x_libraries
16689   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16690
16691   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16692   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16693   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16694 { echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16695 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6; }
16696 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
16697   echo $ECHO_N "(cached) $ECHO_C" >&6
16698 else
16699   ac_check_lib_save_LIBS=$LIBS
16700 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16701 cat >conftest.$ac_ext <<_ACEOF
16702 /* confdefs.h.  */
16703 _ACEOF
16704 cat confdefs.h >>conftest.$ac_ext
16705 cat >>conftest.$ac_ext <<_ACEOF
16706 /* end confdefs.h.  */
16707
16708 /* Override any GCC internal prototype to avoid an error.
16709    Use char because int might match the return type of a GCC
16710    builtin and then its argument prototype would still apply.  */
16711 #ifdef __cplusplus
16712 extern "C"
16713 #endif
16714 char glBindTexture ();
16715 int
16716 main ()
16717 {
16718 return glBindTexture ();
16719   ;
16720   return 0;
16721 }
16722 _ACEOF
16723 rm -f conftest.$ac_objext conftest$ac_exeext
16724 if { (ac_try="$ac_link"
16725 case "(($ac_try" in
16726   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16727   *) ac_try_echo=$ac_try;;
16728 esac
16729 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16730   (eval "$ac_link") 2>conftest.er1
16731   ac_status=$?
16732   grep -v '^ *+' conftest.er1 >conftest.err
16733   rm -f conftest.er1
16734   cat conftest.err >&5
16735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16736   (exit $ac_status); } && {
16737          test -z "$ac_c_werror_flag" ||
16738          test ! -s conftest.err
16739        } && test -s conftest$ac_exeext &&
16740        $as_test_x conftest$ac_exeext; then
16741   eval "$as_ac_Lib=yes"
16742 else
16743   echo "$as_me: failed program was:" >&5
16744 sed 's/^/| /' conftest.$ac_ext >&5
16745
16746         eval "$as_ac_Lib=no"
16747 fi
16748
16749 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16750       conftest$ac_exeext conftest.$ac_ext
16751 LIBS=$ac_check_lib_save_LIBS
16752 fi
16753 ac_res=`eval echo '${'$as_ac_Lib'}'`
16754                { echo "$as_me:$LINENO: result: $ac_res" >&5
16755 echo "${ECHO_T}$ac_res" >&6; }
16756 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16757   cat >>confdefs.h <<\_ACEOF
16758 #define HAVE_GLBINDTEXTURE 1
16759 _ACEOF
16760
16761 else
16762   true
16763 fi
16764
16765   CPPFLAGS="$ac_save_CPPFLAGS"
16766   LDFLAGS="$ac_save_LDFLAGS"
16767 #  LIBS="$ac_save_LIBS"
16768
16769   fi
16770
16771 elif test "$with_gl" != no; then
16772   echo "error: must be yes or no: --with-gl=$with_gl"
16773   exit 1
16774 fi
16775
16776
16777 ###############################################################################
16778 #
16779 #       Check for -lgle.
16780 #
16781 ###############################################################################
16782
16783 have_gle=no
16784 with_gle_req=unspecified
16785 gle_halfassed=no
16786
16787 # Check whether --with-gle was given.
16788 if test "${with_gle+set}" = set; then
16789   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
16790 else
16791   with_gle=yes
16792 fi
16793
16794
16795
16796    case "$with_gle" in
16797     yes) ;;
16798     no)  ;;
16799
16800     /*)
16801      { echo "$as_me:$LINENO: checking for GLE headers" >&5
16802 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6; }
16803      d=$with_gle/include
16804      if test -d $d; then
16805        X_CFLAGS="-I$d $X_CFLAGS"
16806        { echo "$as_me:$LINENO: result: $d" >&5
16807 echo "${ECHO_T}$d" >&6; }
16808      else
16809        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16810 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16811      fi
16812
16813      { echo "$as_me:$LINENO: checking for GLE libs" >&5
16814 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6; }
16815      d=$with_gle/lib
16816      if test -d $d; then
16817        X_LIBS="-L$d $X_LIBS"
16818        { echo "$as_me:$LINENO: result: $d" >&5
16819 echo "${ECHO_T}$d" >&6; }
16820      else
16821        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16822 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16823      fi
16824
16825      # replace the directory string with "yes".
16826      with_gle_req="yes"
16827      with_gle=$with_gle_req
16828      ;;
16829
16830     *)
16831      echo ""
16832      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
16833      echo "       If it is a directory, then \`DIR/include' will be added to"
16834      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16835      exit 1
16836      ;;
16837    esac
16838
16839
16840 GLE_LIBS=""
16841
16842 if test "$have_gl" = no ; then
16843  true
16844 elif test "$with_gle" = yes; then
16845
16846
16847   ac_save_CPPFLAGS="$CPPFLAGS"
16848   if test \! -z "$includedir" ; then
16849     CPPFLAGS="$CPPFLAGS -I$includedir"
16850   fi
16851   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16852   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16853   { echo "$as_me:$LINENO: checking for GL/gle.h" >&5
16854 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6; }
16855 if test "${ac_cv_header_GL_gle_h+set}" = set; then
16856   echo $ECHO_N "(cached) $ECHO_C" >&6
16857 else
16858   cat >conftest.$ac_ext <<_ACEOF
16859 /* confdefs.h.  */
16860 _ACEOF
16861 cat confdefs.h >>conftest.$ac_ext
16862 cat >>conftest.$ac_ext <<_ACEOF
16863 /* end confdefs.h.  */
16864 #include <GL/gl.h>
16865
16866 #include <GL/gle.h>
16867 _ACEOF
16868 rm -f conftest.$ac_objext
16869 if { (ac_try="$ac_compile"
16870 case "(($ac_try" in
16871   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16872   *) ac_try_echo=$ac_try;;
16873 esac
16874 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16875   (eval "$ac_compile") 2>conftest.er1
16876   ac_status=$?
16877   grep -v '^ *+' conftest.er1 >conftest.err
16878   rm -f conftest.er1
16879   cat conftest.err >&5
16880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16881   (exit $ac_status); } && {
16882          test -z "$ac_c_werror_flag" ||
16883          test ! -s conftest.err
16884        } && test -s conftest.$ac_objext; then
16885   ac_cv_header_GL_gle_h=yes
16886 else
16887   echo "$as_me: failed program was:" >&5
16888 sed 's/^/| /' conftest.$ac_ext >&5
16889
16890         ac_cv_header_GL_gle_h=no
16891 fi
16892
16893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16894 fi
16895 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
16896 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6; }
16897 if test $ac_cv_header_GL_gle_h = yes; then
16898   have_gle3=yes
16899 else
16900   have_gle3=no
16901 fi
16902
16903
16904   CPPFLAGS="$ac_save_CPPFLAGS"
16905   if test "$have_gle3" = yes ; then
16906     have_gle=yes;
16907   else
16908
16909   ac_save_CPPFLAGS="$CPPFLAGS"
16910   if test \! -z "$includedir" ; then
16911     CPPFLAGS="$CPPFLAGS -I$includedir"
16912   fi
16913   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16914   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16915   { echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
16916 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6; }
16917 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
16918   echo $ECHO_N "(cached) $ECHO_C" >&6
16919 else
16920   cat >conftest.$ac_ext <<_ACEOF
16921 /* confdefs.h.  */
16922 _ACEOF
16923 cat confdefs.h >>conftest.$ac_ext
16924 cat >>conftest.$ac_ext <<_ACEOF
16925 /* end confdefs.h.  */
16926 #include <GL/gl.h>
16927
16928 #include <GL/gutil.h>
16929 _ACEOF
16930 rm -f conftest.$ac_objext
16931 if { (ac_try="$ac_compile"
16932 case "(($ac_try" in
16933   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16934   *) ac_try_echo=$ac_try;;
16935 esac
16936 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16937   (eval "$ac_compile") 2>conftest.er1
16938   ac_status=$?
16939   grep -v '^ *+' conftest.er1 >conftest.err
16940   rm -f conftest.er1
16941   cat conftest.err >&5
16942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16943   (exit $ac_status); } && {
16944          test -z "$ac_c_werror_flag" ||
16945          test ! -s conftest.err
16946        } && test -s conftest.$ac_objext; then
16947   ac_cv_header_GL_gutil_h=yes
16948 else
16949   echo "$as_me: failed program was:" >&5
16950 sed 's/^/| /' conftest.$ac_ext >&5
16951
16952         ac_cv_header_GL_gutil_h=no
16953 fi
16954
16955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16956 fi
16957 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
16958 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6; }
16959 if test $ac_cv_header_GL_gutil_h = yes; then
16960   have_gle=yes
16961 else
16962   have_gle=no
16963 fi
16964
16965
16966   CPPFLAGS="$ac_save_CPPFLAGS"
16967     if test "$have_gle" = yes ; then
16968
16969   ac_save_CPPFLAGS="$CPPFLAGS"
16970   if test \! -z "$includedir" ; then
16971     CPPFLAGS="$CPPFLAGS -I$includedir"
16972   fi
16973   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16974   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16975   { echo "$as_me:$LINENO: checking for GL/tube.h" >&5
16976 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6; }
16977 if test "${ac_cv_header_GL_tube_h+set}" = set; then
16978   echo $ECHO_N "(cached) $ECHO_C" >&6
16979 else
16980   cat >conftest.$ac_ext <<_ACEOF
16981 /* confdefs.h.  */
16982 _ACEOF
16983 cat confdefs.h >>conftest.$ac_ext
16984 cat >>conftest.$ac_ext <<_ACEOF
16985 /* end confdefs.h.  */
16986 #include <GL/gl.h>
16987
16988 #include <GL/tube.h>
16989 _ACEOF
16990 rm -f conftest.$ac_objext
16991 if { (ac_try="$ac_compile"
16992 case "(($ac_try" in
16993   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16994   *) ac_try_echo=$ac_try;;
16995 esac
16996 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16997   (eval "$ac_compile") 2>conftest.er1
16998   ac_status=$?
16999   grep -v '^ *+' conftest.er1 >conftest.err
17000   rm -f conftest.er1
17001   cat conftest.err >&5
17002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17003   (exit $ac_status); } && {
17004          test -z "$ac_c_werror_flag" ||
17005          test ! -s conftest.err
17006        } && test -s conftest.$ac_objext; then
17007   ac_cv_header_GL_tube_h=yes
17008 else
17009   echo "$as_me: failed program was:" >&5
17010 sed 's/^/| /' conftest.$ac_ext >&5
17011
17012         ac_cv_header_GL_tube_h=no
17013 fi
17014
17015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17016 fi
17017 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
17018 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6; }
17019 if test $ac_cv_header_GL_tube_h = yes; then
17020   have_gle=yes
17021 else
17022   have_gle=no
17023 fi
17024
17025
17026   CPPFLAGS="$ac_save_CPPFLAGS"
17027     fi
17028   fi
17029
17030   if test "$have_gle" = yes ; then
17031     have_gle=no
17032     gle_halfassed=yes
17033
17034   ac_save_CPPFLAGS="$CPPFLAGS"
17035   ac_save_LDFLAGS="$LDFLAGS"
17036 #  ac_save_LIBS="$LIBS"
17037
17038   if test \! -z "$includedir" ; then
17039     CPPFLAGS="$CPPFLAGS -I$includedir"
17040   fi
17041   # note: $X_CFLAGS includes $x_includes
17042   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17043
17044   if test \! -z "$libdir" ; then
17045     LDFLAGS="$LDFLAGS -L$libdir"
17046   fi
17047   # note: $X_LIBS includes $x_libraries
17048   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17049
17050   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17051   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17052   { echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
17053 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6; }
17054 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
17055   echo $ECHO_N "(cached) $ECHO_C" >&6
17056 else
17057   ac_check_lib_save_LIBS=$LIBS
17058 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17059 cat >conftest.$ac_ext <<_ACEOF
17060 /* confdefs.h.  */
17061 _ACEOF
17062 cat confdefs.h >>conftest.$ac_ext
17063 cat >>conftest.$ac_ext <<_ACEOF
17064 /* end confdefs.h.  */
17065
17066 /* Override any GCC internal prototype to avoid an error.
17067    Use char because int might match the return type of a GCC
17068    builtin and then its argument prototype would still apply.  */
17069 #ifdef __cplusplus
17070 extern "C"
17071 #endif
17072 char gleCreateGC ();
17073 int
17074 main ()
17075 {
17076 return gleCreateGC ();
17077   ;
17078   return 0;
17079 }
17080 _ACEOF
17081 rm -f conftest.$ac_objext conftest$ac_exeext
17082 if { (ac_try="$ac_link"
17083 case "(($ac_try" in
17084   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17085   *) ac_try_echo=$ac_try;;
17086 esac
17087 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17088   (eval "$ac_link") 2>conftest.er1
17089   ac_status=$?
17090   grep -v '^ *+' conftest.er1 >conftest.err
17091   rm -f conftest.er1
17092   cat conftest.err >&5
17093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17094   (exit $ac_status); } && {
17095          test -z "$ac_c_werror_flag" ||
17096          test ! -s conftest.err
17097        } && test -s conftest$ac_exeext &&
17098        $as_test_x conftest$ac_exeext; then
17099   ac_cv_lib_gle_gleCreateGC=yes
17100 else
17101   echo "$as_me: failed program was:" >&5
17102 sed 's/^/| /' conftest.$ac_ext >&5
17103
17104         ac_cv_lib_gle_gleCreateGC=no
17105 fi
17106
17107 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17108       conftest$ac_exeext conftest.$ac_ext
17109 LIBS=$ac_check_lib_save_LIBS
17110 fi
17111 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
17112 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6; }
17113 if test $ac_cv_lib_gle_gleCreateGC = yes; then
17114   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
17115 fi
17116
17117   CPPFLAGS="$ac_save_CPPFLAGS"
17118   LDFLAGS="$ac_save_LDFLAGS"
17119 #  LIBS="$ac_save_LIBS"
17120
17121   fi
17122   if test "$have_gle" = yes ; then
17123     have_gle=no
17124     gle_halfassed=yes
17125
17126     # sometimes the libmatrix stuff is included in libgle.  look there first.
17127 #
17128 # I don't get it.  For some reason, this test passes on SGI, as if
17129 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
17130 # Yet the link is succeeding.  Why???
17131 #
17132 #    AC_CHECK_X_LIB(gle, uview_direction_d,
17133 #                   [have_gle=yes; gle_halfassed=no],
17134 #                   [], $GL_LIBS -lX11 -lXext -lm)
17135
17136     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
17137     # *sigh*
17138     if test "$have_gle3" = yes ; then
17139
17140   ac_save_CPPFLAGS="$CPPFLAGS"
17141   ac_save_LDFLAGS="$LDFLAGS"
17142 #  ac_save_LIBS="$LIBS"
17143
17144   if test \! -z "$includedir" ; then
17145     CPPFLAGS="$CPPFLAGS -I$includedir"
17146   fi
17147   # note: $X_CFLAGS includes $x_includes
17148   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17149
17150   if test \! -z "$libdir" ; then
17151     LDFLAGS="$LDFLAGS -L$libdir"
17152   fi
17153   # note: $X_LIBS includes $x_libraries
17154   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17155
17156   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17157   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17158   { echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
17159 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6; }
17160 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
17161   echo $ECHO_N "(cached) $ECHO_C" >&6
17162 else
17163   ac_check_lib_save_LIBS=$LIBS
17164 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17165 cat >conftest.$ac_ext <<_ACEOF
17166 /* confdefs.h.  */
17167 _ACEOF
17168 cat confdefs.h >>conftest.$ac_ext
17169 cat >>conftest.$ac_ext <<_ACEOF
17170 /* end confdefs.h.  */
17171
17172 /* Override any GCC internal prototype to avoid an error.
17173    Use char because int might match the return type of a GCC
17174    builtin and then its argument prototype would still apply.  */
17175 #ifdef __cplusplus
17176 extern "C"
17177 #endif
17178 char uview_direction ();
17179 int
17180 main ()
17181 {
17182 return uview_direction ();
17183   ;
17184   return 0;
17185 }
17186 _ACEOF
17187 rm -f conftest.$ac_objext conftest$ac_exeext
17188 if { (ac_try="$ac_link"
17189 case "(($ac_try" in
17190   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17191   *) ac_try_echo=$ac_try;;
17192 esac
17193 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17194   (eval "$ac_link") 2>conftest.er1
17195   ac_status=$?
17196   grep -v '^ *+' conftest.er1 >conftest.err
17197   rm -f conftest.er1
17198   cat conftest.err >&5
17199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17200   (exit $ac_status); } && {
17201          test -z "$ac_c_werror_flag" ||
17202          test ! -s conftest.err
17203        } && test -s conftest$ac_exeext &&
17204        $as_test_x conftest$ac_exeext; then
17205   ac_cv_lib_gle_uview_direction=yes
17206 else
17207   echo "$as_me: failed program was:" >&5
17208 sed 's/^/| /' conftest.$ac_ext >&5
17209
17210         ac_cv_lib_gle_uview_direction=no
17211 fi
17212
17213 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17214       conftest$ac_exeext conftest.$ac_ext
17215 LIBS=$ac_check_lib_save_LIBS
17216 fi
17217 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
17218 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6; }
17219 if test $ac_cv_lib_gle_uview_direction = yes; then
17220   have_gle=yes; gle_halfassed=no
17221 fi
17222
17223   CPPFLAGS="$ac_save_CPPFLAGS"
17224   LDFLAGS="$ac_save_LDFLAGS"
17225 #  LIBS="$ac_save_LIBS"
17226
17227     fi
17228     # if it wasn't in libgle, then look in libmatrix.
17229     if test "$have_gle" = no ; then
17230
17231   ac_save_CPPFLAGS="$CPPFLAGS"
17232   ac_save_LDFLAGS="$LDFLAGS"
17233 #  ac_save_LIBS="$LIBS"
17234
17235   if test \! -z "$includedir" ; then
17236     CPPFLAGS="$CPPFLAGS -I$includedir"
17237   fi
17238   # note: $X_CFLAGS includes $x_includes
17239   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17240
17241   if test \! -z "$libdir" ; then
17242     LDFLAGS="$LDFLAGS -L$libdir"
17243   fi
17244   # note: $X_LIBS includes $x_libraries
17245   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17246
17247   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17248   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17249   { echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
17250 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6; }
17251 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
17252   echo $ECHO_N "(cached) $ECHO_C" >&6
17253 else
17254   ac_check_lib_save_LIBS=$LIBS
17255 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
17256 cat >conftest.$ac_ext <<_ACEOF
17257 /* confdefs.h.  */
17258 _ACEOF
17259 cat confdefs.h >>conftest.$ac_ext
17260 cat >>conftest.$ac_ext <<_ACEOF
17261 /* end confdefs.h.  */
17262
17263 /* Override any GCC internal prototype to avoid an error.
17264    Use char because int might match the return type of a GCC
17265    builtin and then its argument prototype would still apply.  */
17266 #ifdef __cplusplus
17267 extern "C"
17268 #endif
17269 char uview_direction_d ();
17270 int
17271 main ()
17272 {
17273 return uview_direction_d ();
17274   ;
17275   return 0;
17276 }
17277 _ACEOF
17278 rm -f conftest.$ac_objext conftest$ac_exeext
17279 if { (ac_try="$ac_link"
17280 case "(($ac_try" in
17281   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17282   *) ac_try_echo=$ac_try;;
17283 esac
17284 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17285   (eval "$ac_link") 2>conftest.er1
17286   ac_status=$?
17287   grep -v '^ *+' conftest.er1 >conftest.err
17288   rm -f conftest.er1
17289   cat conftest.err >&5
17290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17291   (exit $ac_status); } && {
17292          test -z "$ac_c_werror_flag" ||
17293          test ! -s conftest.err
17294        } && test -s conftest$ac_exeext &&
17295        $as_test_x conftest$ac_exeext; then
17296   ac_cv_lib_matrix_uview_direction_d=yes
17297 else
17298   echo "$as_me: failed program was:" >&5
17299 sed 's/^/| /' conftest.$ac_ext >&5
17300
17301         ac_cv_lib_matrix_uview_direction_d=no
17302 fi
17303
17304 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17305       conftest$ac_exeext conftest.$ac_ext
17306 LIBS=$ac_check_lib_save_LIBS
17307 fi
17308 { echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
17309 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6; }
17310 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
17311   have_gle=yes; gle_halfassed=no;
17312                       GLE_LIBS="$GLE_LIBS -lmatrix"
17313 fi
17314
17315   CPPFLAGS="$ac_save_CPPFLAGS"
17316   LDFLAGS="$ac_save_LDFLAGS"
17317 #  LIBS="$ac_save_LIBS"
17318
17319     fi
17320   fi
17321
17322   if test "$have_gle" = yes ; then
17323     cat >>confdefs.h <<\_ACEOF
17324 #define HAVE_GLE 1
17325 _ACEOF
17326
17327     if test "$have_gle3" = yes ; then
17328       cat >>confdefs.h <<\_ACEOF
17329 #define HAVE_GLE3 1
17330 _ACEOF
17331
17332     fi
17333   fi
17334
17335 elif test "$with_gle" != no; then
17336   echo "error: must be yes or no: --with-gle=$with_gle"
17337   exit 1
17338
17339 fi
17340
17341
17342 ###############################################################################
17343 #
17344 #       Check for -lgdk_pixbuf.
17345 #       These tests are for gdk_pixbuf usage of the hacks,
17346 #       not xscreensaver-demo (thus we have to test again to get
17347 #       the libraries right: don't want to pull in all of GTK
17348 #       for the hacks.)
17349 #
17350 ###############################################################################
17351
17352 have_gdk_pixbuf=no
17353 with_gdk_pixbuf_req=unspecified
17354
17355 # Check whether --with-pixbuf was given.
17356 if test "${with_pixbuf+set}" = set; then
17357   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
17358 else
17359   with_gdk_pixbuf=yes
17360 fi
17361
17362
17363 # if --with-pixbuf=/directory/ was specified, remember that directory so that
17364 # we can also look for the `gdk-pixbuf-config' program in that directory.
17365 case "$with_gdk_pixbuf" in
17366   /*)
17367     gdk_pixbuf_dir="$with_gdk_pixbuf"
17368     ;;
17369   *)
17370     gdk_pixbuf_dir=""
17371     ;;
17372 esac
17373
17374
17375    case "$with_gdk_pixbuf" in
17376     yes) ;;
17377     no)  ;;
17378
17379     /*)
17380      { echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
17381 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6; }
17382      d=$with_gdk_pixbuf/include
17383      if test -d $d; then
17384        X_CFLAGS="-I$d $X_CFLAGS"
17385        { echo "$as_me:$LINENO: result: $d" >&5
17386 echo "${ECHO_T}$d" >&6; }
17387      else
17388        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17389 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17390      fi
17391
17392      { echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
17393 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6; }
17394      d=$with_gdk_pixbuf/lib
17395      if test -d $d; then
17396        X_LIBS="-L$d $X_LIBS"
17397        { echo "$as_me:$LINENO: result: $d" >&5
17398 echo "${ECHO_T}$d" >&6; }
17399      else
17400        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17401 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17402      fi
17403
17404      # replace the directory string with "yes".
17405      with_gdk_pixbuf_req="yes"
17406      with_gdk_pixbuf=$with_gdk_pixbuf_req
17407      ;;
17408
17409     *)
17410      echo ""
17411      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17412      echo "       If it is a directory, then \`DIR/include' will be added to"
17413      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17414      exit 1
17415      ;;
17416    esac
17417
17418
17419 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17420   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17421   exit 1
17422 fi
17423
17424 if test "$with_gdk_pixbuf" = yes; then
17425   have_gdk_pixbuf=no
17426
17427   pkgs=''
17428   ok="yes"
17429
17430   pkg_check_version gdk-pixbuf-2.0      2.0.0
17431   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17432   have_gdk_pixbuf="$ok"
17433
17434   if test "$have_gdk_pixbuf" = yes; then
17435     { echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17436 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6; }
17437 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17438   echo $ECHO_N "(cached) $ECHO_C" >&6
17439 else
17440   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17441 fi
17442 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17443 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6; }
17444     { echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17445 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6; }
17446 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17447   echo $ECHO_N "(cached) $ECHO_C" >&6
17448 else
17449   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17450 fi
17451 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17452 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6; }
17453   fi
17454
17455   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17456   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17457
17458
17459   if test "$have_gdk_pixbuf" = yes; then
17460     #
17461     # we appear to have pixbuf; check for headers/libs to be sure.
17462     #
17463     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17464     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17465
17466     have_gdk_pixbuf=no
17467
17468     # check for header A...
17469
17470   ac_save_CPPFLAGS="$CPPFLAGS"
17471   if test \! -z "$includedir" ; then
17472     CPPFLAGS="$CPPFLAGS -I$includedir"
17473   fi
17474   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17475   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17476   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17477   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17478 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17479 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17480   echo $ECHO_N "(cached) $ECHO_C" >&6
17481 fi
17482 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17483 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17484 else
17485   # Is the header compilable?
17486 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17487 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6; }
17488 cat >conftest.$ac_ext <<_ACEOF
17489 /* confdefs.h.  */
17490 _ACEOF
17491 cat confdefs.h >>conftest.$ac_ext
17492 cat >>conftest.$ac_ext <<_ACEOF
17493 /* end confdefs.h.  */
17494 $ac_includes_default
17495 #include <gdk-pixbuf/gdk-pixbuf.h>
17496 _ACEOF
17497 rm -f conftest.$ac_objext
17498 if { (ac_try="$ac_compile"
17499 case "(($ac_try" in
17500   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17501   *) ac_try_echo=$ac_try;;
17502 esac
17503 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17504   (eval "$ac_compile") 2>conftest.er1
17505   ac_status=$?
17506   grep -v '^ *+' conftest.er1 >conftest.err
17507   rm -f conftest.er1
17508   cat conftest.err >&5
17509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17510   (exit $ac_status); } && {
17511          test -z "$ac_c_werror_flag" ||
17512          test ! -s conftest.err
17513        } && test -s conftest.$ac_objext; then
17514   ac_header_compiler=yes
17515 else
17516   echo "$as_me: failed program was:" >&5
17517 sed 's/^/| /' conftest.$ac_ext >&5
17518
17519         ac_header_compiler=no
17520 fi
17521
17522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17523 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17524 echo "${ECHO_T}$ac_header_compiler" >&6; }
17525
17526 # Is the header present?
17527 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17528 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6; }
17529 cat >conftest.$ac_ext <<_ACEOF
17530 /* confdefs.h.  */
17531 _ACEOF
17532 cat confdefs.h >>conftest.$ac_ext
17533 cat >>conftest.$ac_ext <<_ACEOF
17534 /* end confdefs.h.  */
17535 #include <gdk-pixbuf/gdk-pixbuf.h>
17536 _ACEOF
17537 if { (ac_try="$ac_cpp conftest.$ac_ext"
17538 case "(($ac_try" in
17539   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17540   *) ac_try_echo=$ac_try;;
17541 esac
17542 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17543   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17544   ac_status=$?
17545   grep -v '^ *+' conftest.er1 >conftest.err
17546   rm -f conftest.er1
17547   cat conftest.err >&5
17548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17549   (exit $ac_status); } >/dev/null && {
17550          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17551          test ! -s conftest.err
17552        }; then
17553   ac_header_preproc=yes
17554 else
17555   echo "$as_me: failed program was:" >&5
17556 sed 's/^/| /' conftest.$ac_ext >&5
17557
17558   ac_header_preproc=no
17559 fi
17560
17561 rm -f conftest.err conftest.$ac_ext
17562 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17563 echo "${ECHO_T}$ac_header_preproc" >&6; }
17564
17565 # So?  What about this header?
17566 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17567   yes:no: )
17568     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17569 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17570     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
17571 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
17572     ac_header_preproc=yes
17573     ;;
17574   no:yes:* )
17575     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17576 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17577     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
17578 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
17579     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
17580 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
17581     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
17582 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17583     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17584 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17585     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
17586 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
17587
17588     ;;
17589 esac
17590 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17591 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17592 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17593   echo $ECHO_N "(cached) $ECHO_C" >&6
17594 else
17595   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17596 fi
17597 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17598 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17599
17600 fi
17601 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17602   have_gdk_pixbuf=yes
17603 fi
17604
17605
17606   CPPFLAGS="$ac_save_CPPFLAGS"
17607
17608     # if that worked, check for header B...
17609     if test "$have_gdk_pixbuf" = yes; then
17610       have_gdk_pixbuf=no
17611       gdk_pixbuf_halfassed=yes
17612
17613   ac_save_CPPFLAGS="$CPPFLAGS"
17614   if test \! -z "$includedir" ; then
17615     CPPFLAGS="$CPPFLAGS -I$includedir"
17616   fi
17617   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17618   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17619   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17620   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17621 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17622 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17623   echo $ECHO_N "(cached) $ECHO_C" >&6
17624 fi
17625 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17626 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17627 else
17628   # Is the header compilable?
17629 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17630 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17631 cat >conftest.$ac_ext <<_ACEOF
17632 /* confdefs.h.  */
17633 _ACEOF
17634 cat confdefs.h >>conftest.$ac_ext
17635 cat >>conftest.$ac_ext <<_ACEOF
17636 /* end confdefs.h.  */
17637 $ac_includes_default
17638 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17639 _ACEOF
17640 rm -f conftest.$ac_objext
17641 if { (ac_try="$ac_compile"
17642 case "(($ac_try" in
17643   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17644   *) ac_try_echo=$ac_try;;
17645 esac
17646 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17647   (eval "$ac_compile") 2>conftest.er1
17648   ac_status=$?
17649   grep -v '^ *+' conftest.er1 >conftest.err
17650   rm -f conftest.er1
17651   cat conftest.err >&5
17652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17653   (exit $ac_status); } && {
17654          test -z "$ac_c_werror_flag" ||
17655          test ! -s conftest.err
17656        } && test -s conftest.$ac_objext; then
17657   ac_header_compiler=yes
17658 else
17659   echo "$as_me: failed program was:" >&5
17660 sed 's/^/| /' conftest.$ac_ext >&5
17661
17662         ac_header_compiler=no
17663 fi
17664
17665 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17666 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17667 echo "${ECHO_T}$ac_header_compiler" >&6; }
17668
17669 # Is the header present?
17670 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17671 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17672 cat >conftest.$ac_ext <<_ACEOF
17673 /* confdefs.h.  */
17674 _ACEOF
17675 cat confdefs.h >>conftest.$ac_ext
17676 cat >>conftest.$ac_ext <<_ACEOF
17677 /* end confdefs.h.  */
17678 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17679 _ACEOF
17680 if { (ac_try="$ac_cpp conftest.$ac_ext"
17681 case "(($ac_try" in
17682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17683   *) ac_try_echo=$ac_try;;
17684 esac
17685 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17686   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17687   ac_status=$?
17688   grep -v '^ *+' conftest.er1 >conftest.err
17689   rm -f conftest.er1
17690   cat conftest.err >&5
17691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17692   (exit $ac_status); } >/dev/null && {
17693          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17694          test ! -s conftest.err
17695        }; then
17696   ac_header_preproc=yes
17697 else
17698   echo "$as_me: failed program was:" >&5
17699 sed 's/^/| /' conftest.$ac_ext >&5
17700
17701   ac_header_preproc=no
17702 fi
17703
17704 rm -f conftest.err conftest.$ac_ext
17705 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17706 echo "${ECHO_T}$ac_header_preproc" >&6; }
17707
17708 # So?  What about this header?
17709 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17710   yes:no: )
17711     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17712 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17713     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17714 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17715     ac_header_preproc=yes
17716     ;;
17717   no:yes:* )
17718     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17719 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17720     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17721 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17722     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17723 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17724     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17725 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17726     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17727 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17728     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17729 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17730
17731     ;;
17732 esac
17733 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17734 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17735 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17736   echo $ECHO_N "(cached) $ECHO_C" >&6
17737 else
17738   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17739 fi
17740 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17741 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17742
17743 fi
17744 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17745   have_gdk_pixbuf=yes
17746                          gdk_pixbuf_halfassed=no
17747 fi
17748
17749
17750   CPPFLAGS="$ac_save_CPPFLAGS"
17751
17752       # yay, it has a new name in Gtk 2.x...
17753       if test "$have_gdk_pixbuf" = no; then
17754         have_gdk_pixbuf=no
17755         gdk_pixbuf_halfassed=yes
17756
17757   ac_save_CPPFLAGS="$CPPFLAGS"
17758   if test \! -z "$includedir" ; then
17759     CPPFLAGS="$CPPFLAGS -I$includedir"
17760   fi
17761   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17762   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17763   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17764   { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17765 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17766 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17767   echo $ECHO_N "(cached) $ECHO_C" >&6
17768 fi
17769 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17770 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
17771 else
17772   # Is the header compilable?
17773 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17774 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17775 cat >conftest.$ac_ext <<_ACEOF
17776 /* confdefs.h.  */
17777 _ACEOF
17778 cat confdefs.h >>conftest.$ac_ext
17779 cat >>conftest.$ac_ext <<_ACEOF
17780 /* end confdefs.h.  */
17781 $ac_includes_default
17782 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17783 _ACEOF
17784 rm -f conftest.$ac_objext
17785 if { (ac_try="$ac_compile"
17786 case "(($ac_try" in
17787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17788   *) ac_try_echo=$ac_try;;
17789 esac
17790 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17791   (eval "$ac_compile") 2>conftest.er1
17792   ac_status=$?
17793   grep -v '^ *+' conftest.er1 >conftest.err
17794   rm -f conftest.er1
17795   cat conftest.err >&5
17796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17797   (exit $ac_status); } && {
17798          test -z "$ac_c_werror_flag" ||
17799          test ! -s conftest.err
17800        } && test -s conftest.$ac_objext; then
17801   ac_header_compiler=yes
17802 else
17803   echo "$as_me: failed program was:" >&5
17804 sed 's/^/| /' conftest.$ac_ext >&5
17805
17806         ac_header_compiler=no
17807 fi
17808
17809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17810 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17811 echo "${ECHO_T}$ac_header_compiler" >&6; }
17812
17813 # Is the header present?
17814 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
17815 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17816 cat >conftest.$ac_ext <<_ACEOF
17817 /* confdefs.h.  */
17818 _ACEOF
17819 cat confdefs.h >>conftest.$ac_ext
17820 cat >>conftest.$ac_ext <<_ACEOF
17821 /* end confdefs.h.  */
17822 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17823 _ACEOF
17824 if { (ac_try="$ac_cpp conftest.$ac_ext"
17825 case "(($ac_try" in
17826   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17827   *) ac_try_echo=$ac_try;;
17828 esac
17829 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17830   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17831   ac_status=$?
17832   grep -v '^ *+' conftest.er1 >conftest.err
17833   rm -f conftest.er1
17834   cat conftest.err >&5
17835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17836   (exit $ac_status); } >/dev/null && {
17837          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17838          test ! -s conftest.err
17839        }; then
17840   ac_header_preproc=yes
17841 else
17842   echo "$as_me: failed program was:" >&5
17843 sed 's/^/| /' conftest.$ac_ext >&5
17844
17845   ac_header_preproc=no
17846 fi
17847
17848 rm -f conftest.err conftest.$ac_ext
17849 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17850 echo "${ECHO_T}$ac_header_preproc" >&6; }
17851
17852 # So?  What about this header?
17853 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17854   yes:no: )
17855     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17856 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17857     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17858 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17859     ac_header_preproc=yes
17860     ;;
17861   no:yes:* )
17862     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17863 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17864     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17865 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17866     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17867 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17868     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17869 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17870     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17871 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17872     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17873 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17874
17875     ;;
17876 esac
17877 { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17878 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17879 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17880   echo $ECHO_N "(cached) $ECHO_C" >&6
17881 else
17882   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
17883 fi
17884 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17885 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
17886
17887 fi
17888 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
17889   have_gdk_pixbuf=yes
17890                            gdk_pixbuf_halfassed=no
17891 fi
17892
17893
17894   CPPFLAGS="$ac_save_CPPFLAGS"
17895       fi
17896     fi
17897     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
17898   fi
17899
17900   if test "$have_gdk_pixbuf" = yes; then
17901     # we have the headers, now check for the libraries
17902     have_gdk_pixbuf=no
17903     gdk_pixbuf_halfassed=yes
17904
17905     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
17906 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6; }
17907
17908     # library A...
17909
17910   ac_save_CPPFLAGS="$CPPFLAGS"
17911   ac_save_LDFLAGS="$LDFLAGS"
17912 #  ac_save_LIBS="$LIBS"
17913
17914   if test \! -z "$includedir" ; then
17915     CPPFLAGS="$CPPFLAGS -I$includedir"
17916   fi
17917   # note: $X_CFLAGS includes $x_includes
17918   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17919
17920   if test \! -z "$libdir" ; then
17921     LDFLAGS="$LDFLAGS -L$libdir"
17922   fi
17923   # note: $X_LIBS includes $x_libraries
17924   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17925
17926   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17927   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17928   { echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
17929 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6; }
17930 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
17931   echo $ECHO_N "(cached) $ECHO_C" >&6
17932 else
17933   ac_check_lib_save_LIBS=$LIBS
17934 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17935 cat >conftest.$ac_ext <<_ACEOF
17936 /* confdefs.h.  */
17937 _ACEOF
17938 cat confdefs.h >>conftest.$ac_ext
17939 cat >>conftest.$ac_ext <<_ACEOF
17940 /* end confdefs.h.  */
17941
17942 /* Override any GCC internal prototype to avoid an error.
17943    Use char because int might match the return type of a GCC
17944    builtin and then its argument prototype would still apply.  */
17945 #ifdef __cplusplus
17946 extern "C"
17947 #endif
17948 char gdk_pixbuf_new_from_file ();
17949 int
17950 main ()
17951 {
17952 return gdk_pixbuf_new_from_file ();
17953   ;
17954   return 0;
17955 }
17956 _ACEOF
17957 rm -f conftest.$ac_objext conftest$ac_exeext
17958 if { (ac_try="$ac_link"
17959 case "(($ac_try" in
17960   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17961   *) ac_try_echo=$ac_try;;
17962 esac
17963 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17964   (eval "$ac_link") 2>conftest.er1
17965   ac_status=$?
17966   grep -v '^ *+' conftest.er1 >conftest.err
17967   rm -f conftest.er1
17968   cat conftest.err >&5
17969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17970   (exit $ac_status); } && {
17971          test -z "$ac_c_werror_flag" ||
17972          test ! -s conftest.err
17973        } && test -s conftest$ac_exeext &&
17974        $as_test_x conftest$ac_exeext; then
17975   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
17976 else
17977   echo "$as_me: failed program was:" >&5
17978 sed 's/^/| /' conftest.$ac_ext >&5
17979
17980         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
17981 fi
17982
17983 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17984       conftest$ac_exeext conftest.$ac_ext
17985 LIBS=$ac_check_lib_save_LIBS
17986 fi
17987 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
17988 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
17989 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
17990   have_gdk_pixbuf=yes
17991 fi
17992
17993   CPPFLAGS="$ac_save_CPPFLAGS"
17994   LDFLAGS="$ac_save_LDFLAGS"
17995 #  LIBS="$ac_save_LIBS"
17996
17997     # library B...
17998     if test "$have_gdk_pixbuf" = yes; then
17999       have_gdk_pixbuf=no
18000
18001   ac_save_CPPFLAGS="$CPPFLAGS"
18002   ac_save_LDFLAGS="$LDFLAGS"
18003 #  ac_save_LIBS="$LIBS"
18004
18005   if test \! -z "$includedir" ; then
18006     CPPFLAGS="$CPPFLAGS -I$includedir"
18007   fi
18008   # note: $X_CFLAGS includes $x_includes
18009   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18010
18011   if test \! -z "$libdir" ; then
18012     LDFLAGS="$LDFLAGS -L$libdir"
18013   fi
18014   # note: $X_LIBS includes $x_libraries
18015   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18016
18017   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18018   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18019   { echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
18020 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6; }
18021 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
18022   echo $ECHO_N "(cached) $ECHO_C" >&6
18023 else
18024   ac_check_lib_save_LIBS=$LIBS
18025 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18026 cat >conftest.$ac_ext <<_ACEOF
18027 /* confdefs.h.  */
18028 _ACEOF
18029 cat confdefs.h >>conftest.$ac_ext
18030 cat >>conftest.$ac_ext <<_ACEOF
18031 /* end confdefs.h.  */
18032
18033 /* Override any GCC internal prototype to avoid an error.
18034    Use char because int might match the return type of a GCC
18035    builtin and then its argument prototype would still apply.  */
18036 #ifdef __cplusplus
18037 extern "C"
18038 #endif
18039 char gdk_pixbuf_xlib_init ();
18040 int
18041 main ()
18042 {
18043 return gdk_pixbuf_xlib_init ();
18044   ;
18045   return 0;
18046 }
18047 _ACEOF
18048 rm -f conftest.$ac_objext conftest$ac_exeext
18049 if { (ac_try="$ac_link"
18050 case "(($ac_try" in
18051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18052   *) ac_try_echo=$ac_try;;
18053 esac
18054 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18055   (eval "$ac_link") 2>conftest.er1
18056   ac_status=$?
18057   grep -v '^ *+' conftest.er1 >conftest.err
18058   rm -f conftest.er1
18059   cat conftest.err >&5
18060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18061   (exit $ac_status); } && {
18062          test -z "$ac_c_werror_flag" ||
18063          test ! -s conftest.err
18064        } && test -s conftest$ac_exeext &&
18065        $as_test_x conftest$ac_exeext; then
18066   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
18067 else
18068   echo "$as_me: failed program was:" >&5
18069 sed 's/^/| /' conftest.$ac_ext >&5
18070
18071         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
18072 fi
18073
18074 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18075       conftest$ac_exeext conftest.$ac_ext
18076 LIBS=$ac_check_lib_save_LIBS
18077 fi
18078 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
18079 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
18080 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
18081   have_gdk_pixbuf=yes
18082                       gdk_pixbuf_halfassed=no
18083 fi
18084
18085   CPPFLAGS="$ac_save_CPPFLAGS"
18086   LDFLAGS="$ac_save_LDFLAGS"
18087 #  LIBS="$ac_save_LIBS"
18088
18089     fi
18090   fi
18091
18092   if test "$have_gdk_pixbuf" = yes; then
18093     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
18094     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
18095     cat >>confdefs.h <<\_ACEOF
18096 #define HAVE_GDK_PIXBUF 1
18097 _ACEOF
18098
18099   else
18100     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
18101 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6; }
18102   fi
18103 fi
18104
18105
18106 ###############################################################################
18107 #
18108 #       Check for -lXpm.
18109 #
18110 ###############################################################################
18111
18112 have_xpm=no
18113 with_xpm_req=unspecified
18114
18115 # Check whether --with-xpm was given.
18116 if test "${with_xpm+set}" = set; then
18117   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
18118 else
18119   with_xpm=yes
18120 fi
18121
18122
18123
18124    case "$with_xpm" in
18125     yes) ;;
18126     no)  ;;
18127
18128     /*)
18129      { echo "$as_me:$LINENO: checking for XPM headers" >&5
18130 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6; }
18131      d=$with_xpm/include
18132      if test -d $d; then
18133        X_CFLAGS="-I$d $X_CFLAGS"
18134        { echo "$as_me:$LINENO: result: $d" >&5
18135 echo "${ECHO_T}$d" >&6; }
18136      else
18137        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18138 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18139      fi
18140
18141      { echo "$as_me:$LINENO: checking for XPM libs" >&5
18142 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6; }
18143      d=$with_xpm/lib
18144      if test -d $d; then
18145        X_LIBS="-L$d $X_LIBS"
18146        { echo "$as_me:$LINENO: result: $d" >&5
18147 echo "${ECHO_T}$d" >&6; }
18148      else
18149        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18150 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18151      fi
18152
18153      # replace the directory string with "yes".
18154      with_xpm_req="yes"
18155      with_xpm=$with_xpm_req
18156      ;;
18157
18158     *)
18159      echo ""
18160      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
18161      echo "       If it is a directory, then \`DIR/include' will be added to"
18162      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18163      exit 1
18164      ;;
18165    esac
18166
18167
18168 if test "$with_xpm" = yes; then
18169
18170   ac_save_CPPFLAGS="$CPPFLAGS"
18171   if test \! -z "$includedir" ; then
18172     CPPFLAGS="$CPPFLAGS -I$includedir"
18173   fi
18174   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18175   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18176   { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
18177 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
18178 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
18179   echo $ECHO_N "(cached) $ECHO_C" >&6
18180 else
18181   cat >conftest.$ac_ext <<_ACEOF
18182 /* confdefs.h.  */
18183 _ACEOF
18184 cat confdefs.h >>conftest.$ac_ext
18185 cat >>conftest.$ac_ext <<_ACEOF
18186 /* end confdefs.h.  */
18187 #include <X11/Xlib.h>
18188
18189 #include <X11/xpm.h>
18190 _ACEOF
18191 rm -f conftest.$ac_objext
18192 if { (ac_try="$ac_compile"
18193 case "(($ac_try" in
18194   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18195   *) ac_try_echo=$ac_try;;
18196 esac
18197 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18198   (eval "$ac_compile") 2>conftest.er1
18199   ac_status=$?
18200   grep -v '^ *+' conftest.er1 >conftest.err
18201   rm -f conftest.er1
18202   cat conftest.err >&5
18203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18204   (exit $ac_status); } && {
18205          test -z "$ac_c_werror_flag" ||
18206          test ! -s conftest.err
18207        } && test -s conftest.$ac_objext; then
18208   ac_cv_header_X11_xpm_h=yes
18209 else
18210   echo "$as_me: failed program was:" >&5
18211 sed 's/^/| /' conftest.$ac_ext >&5
18212
18213         ac_cv_header_X11_xpm_h=no
18214 fi
18215
18216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18217 fi
18218 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
18219 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
18220 if test $ac_cv_header_X11_xpm_h = yes; then
18221   have_xpm=yes
18222                     cat >>confdefs.h <<\_ACEOF
18223 #define HAVE_XPM 1
18224 _ACEOF
18225
18226                     XPM_LIBS="-lXpm $XPM_LIBS"
18227 fi
18228
18229
18230   CPPFLAGS="$ac_save_CPPFLAGS"
18231 elif test "$with_xpm" != no; then
18232   echo "error: must be yes or no: --with-xpm=$with_xpm"
18233   exit 1
18234 fi
18235
18236 # See comment near $motif_requires_xpm, above.
18237 # Need to do this here, after both Motif and XPM have been checked for.
18238 #
18239 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
18240   if test "$motif_requires_xpm" = yes ; then
18241     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
18242   fi
18243 fi
18244
18245 if test "$XPM_LIBS" = "" ; then
18246   XPM_LIBS=$(MINIXPM)
18247 fi
18248
18249
18250 ###############################################################################
18251 #
18252 #       Check for -ljpeg
18253 #
18254 ###############################################################################
18255
18256 have_jpeg=no
18257 with_jpeg_req=unspecified
18258 jpeg_halfassed=no
18259
18260 # Check whether --with-jpeg was given.
18261 if test "${with_jpeg+set}" = set; then
18262   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
18263 else
18264   with_jpeg=yes
18265 fi
18266
18267
18268
18269    case "$with_jpeg" in
18270     yes) ;;
18271     no)  ;;
18272
18273     /*)
18274      { echo "$as_me:$LINENO: checking for JPEG headers" >&5
18275 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6; }
18276      d=$with_jpeg/include
18277      if test -d $d; then
18278        X_CFLAGS="-I$d $X_CFLAGS"
18279        { echo "$as_me:$LINENO: result: $d" >&5
18280 echo "${ECHO_T}$d" >&6; }
18281      else
18282        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18283 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18284      fi
18285
18286      { echo "$as_me:$LINENO: checking for JPEG libs" >&5
18287 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6; }
18288      d=$with_jpeg/lib
18289      if test -d $d; then
18290        X_LIBS="-L$d $X_LIBS"
18291        { echo "$as_me:$LINENO: result: $d" >&5
18292 echo "${ECHO_T}$d" >&6; }
18293      else
18294        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18295 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18296      fi
18297
18298      # replace the directory string with "yes".
18299      with_jpeg_req="yes"
18300      with_jpeg=$with_jpeg_req
18301      ;;
18302
18303     *)
18304      echo ""
18305      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
18306      echo "       If it is a directory, then \`DIR/include' will be added to"
18307      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18308      exit 1
18309      ;;
18310    esac
18311
18312
18313 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
18314   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
18315   exit 1
18316 fi
18317
18318 if test "$with_jpeg" = yes; then
18319
18320   have_jpeg=no
18321
18322   ac_save_CPPFLAGS="$CPPFLAGS"
18323   if test \! -z "$includedir" ; then
18324     CPPFLAGS="$CPPFLAGS -I$includedir"
18325   fi
18326   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18327   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18328   if test "${ac_cv_header_jpeglib_h+set}" = set; then
18329   { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18330 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18331 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18332   echo $ECHO_N "(cached) $ECHO_C" >&6
18333 fi
18334 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18335 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18336 else
18337   # Is the header compilable?
18338 { echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
18339 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; }
18340 cat >conftest.$ac_ext <<_ACEOF
18341 /* confdefs.h.  */
18342 _ACEOF
18343 cat confdefs.h >>conftest.$ac_ext
18344 cat >>conftest.$ac_ext <<_ACEOF
18345 /* end confdefs.h.  */
18346 $ac_includes_default
18347 #include <jpeglib.h>
18348 _ACEOF
18349 rm -f conftest.$ac_objext
18350 if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
18357   ac_status=$?
18358   grep -v '^ *+' conftest.er1 >conftest.err
18359   rm -f conftest.er1
18360   cat conftest.err >&5
18361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18362   (exit $ac_status); } && {
18363          test -z "$ac_c_werror_flag" ||
18364          test ! -s conftest.err
18365        } && test -s conftest.$ac_objext; then
18366   ac_header_compiler=yes
18367 else
18368   echo "$as_me: failed program was:" >&5
18369 sed 's/^/| /' conftest.$ac_ext >&5
18370
18371         ac_header_compiler=no
18372 fi
18373
18374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18375 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18376 echo "${ECHO_T}$ac_header_compiler" >&6; }
18377
18378 # Is the header present?
18379 { echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
18380 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; }
18381 cat >conftest.$ac_ext <<_ACEOF
18382 /* confdefs.h.  */
18383 _ACEOF
18384 cat confdefs.h >>conftest.$ac_ext
18385 cat >>conftest.$ac_ext <<_ACEOF
18386 /* end confdefs.h.  */
18387 #include <jpeglib.h>
18388 _ACEOF
18389 if { (ac_try="$ac_cpp conftest.$ac_ext"
18390 case "(($ac_try" in
18391   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18392   *) ac_try_echo=$ac_try;;
18393 esac
18394 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18395   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18396   ac_status=$?
18397   grep -v '^ *+' conftest.er1 >conftest.err
18398   rm -f conftest.er1
18399   cat conftest.err >&5
18400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18401   (exit $ac_status); } >/dev/null && {
18402          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18403          test ! -s conftest.err
18404        }; then
18405   ac_header_preproc=yes
18406 else
18407   echo "$as_me: failed program was:" >&5
18408 sed 's/^/| /' conftest.$ac_ext >&5
18409
18410   ac_header_preproc=no
18411 fi
18412
18413 rm -f conftest.err conftest.$ac_ext
18414 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18415 echo "${ECHO_T}$ac_header_preproc" >&6; }
18416
18417 # So?  What about this header?
18418 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18419   yes:no: )
18420     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18421 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18422     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
18423 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
18424     ac_header_preproc=yes
18425     ;;
18426   no:yes:* )
18427     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
18428 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
18429     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
18430 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
18431     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
18432 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
18433     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
18434 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18435     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
18436 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
18437     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
18438 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
18439
18440     ;;
18441 esac
18442 { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18443 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18444 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18445   echo $ECHO_N "(cached) $ECHO_C" >&6
18446 else
18447   ac_cv_header_jpeglib_h=$ac_header_preproc
18448 fi
18449 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18450 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18451
18452 fi
18453 if test $ac_cv_header_jpeglib_h = yes; then
18454   have_jpeg=yes
18455 fi
18456
18457
18458   CPPFLAGS="$ac_save_CPPFLAGS"
18459
18460   if test "$have_jpeg" = yes; then
18461     # we have the header, now check for the library
18462     have_jpeg=no
18463     jpeg_halfassed=yes
18464
18465   ac_save_CPPFLAGS="$CPPFLAGS"
18466   ac_save_LDFLAGS="$LDFLAGS"
18467 #  ac_save_LIBS="$LIBS"
18468
18469   if test \! -z "$includedir" ; then
18470     CPPFLAGS="$CPPFLAGS -I$includedir"
18471   fi
18472   # note: $X_CFLAGS includes $x_includes
18473   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18474
18475   if test \! -z "$libdir" ; then
18476     LDFLAGS="$LDFLAGS -L$libdir"
18477   fi
18478   # note: $X_LIBS includes $x_libraries
18479   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18480
18481   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18482   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18483   { echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
18484 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6; }
18485 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
18486   echo $ECHO_N "(cached) $ECHO_C" >&6
18487 else
18488   ac_check_lib_save_LIBS=$LIBS
18489 LIBS="-ljpeg  $LIBS"
18490 cat >conftest.$ac_ext <<_ACEOF
18491 /* confdefs.h.  */
18492 _ACEOF
18493 cat confdefs.h >>conftest.$ac_ext
18494 cat >>conftest.$ac_ext <<_ACEOF
18495 /* end confdefs.h.  */
18496
18497 /* Override any GCC internal prototype to avoid an error.
18498    Use char because int might match the return type of a GCC
18499    builtin and then its argument prototype would still apply.  */
18500 #ifdef __cplusplus
18501 extern "C"
18502 #endif
18503 char jpeg_start_compress ();
18504 int
18505 main ()
18506 {
18507 return jpeg_start_compress ();
18508   ;
18509   return 0;
18510 }
18511 _ACEOF
18512 rm -f conftest.$ac_objext conftest$ac_exeext
18513 if { (ac_try="$ac_link"
18514 case "(($ac_try" in
18515   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18516   *) ac_try_echo=$ac_try;;
18517 esac
18518 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18519   (eval "$ac_link") 2>conftest.er1
18520   ac_status=$?
18521   grep -v '^ *+' conftest.er1 >conftest.err
18522   rm -f conftest.er1
18523   cat conftest.err >&5
18524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18525   (exit $ac_status); } && {
18526          test -z "$ac_c_werror_flag" ||
18527          test ! -s conftest.err
18528        } && test -s conftest$ac_exeext &&
18529        $as_test_x conftest$ac_exeext; then
18530   ac_cv_lib_jpeg_jpeg_start_compress=yes
18531 else
18532   echo "$as_me: failed program was:" >&5
18533 sed 's/^/| /' conftest.$ac_ext >&5
18534
18535         ac_cv_lib_jpeg_jpeg_start_compress=no
18536 fi
18537
18538 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18539       conftest$ac_exeext conftest.$ac_ext
18540 LIBS=$ac_check_lib_save_LIBS
18541 fi
18542 { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
18543 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
18544 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
18545   have_jpeg=yes
18546                     jpeg_halfassed=no
18547                     JPEG_LIBS="-ljpeg"
18548                     cat >>confdefs.h <<\_ACEOF
18549 #define HAVE_JPEGLIB 1
18550 _ACEOF
18551
18552 fi
18553
18554   CPPFLAGS="$ac_save_CPPFLAGS"
18555   LDFLAGS="$ac_save_LDFLAGS"
18556 #  LIBS="$ac_save_LIBS"
18557
18558   fi
18559 fi
18560
18561
18562 ###############################################################################
18563 #
18564 #       Check for pty support: this allows 'phosphor' and 'apple2'
18565 #       to run curses-based programs, or be used as terminal windows.
18566 #
18567 ###############################################################################
18568
18569 PTY_LIBS=
18570
18571
18572 for ac_header in pty.h util.h
18573 do
18574 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18575 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18576   { echo "$as_me:$LINENO: checking for $ac_header" >&5
18577 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18578 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18579   echo $ECHO_N "(cached) $ECHO_C" >&6
18580 fi
18581 ac_res=`eval echo '${'$as_ac_Header'}'`
18582                { echo "$as_me:$LINENO: result: $ac_res" >&5
18583 echo "${ECHO_T}$ac_res" >&6; }
18584 else
18585   # Is the header compilable?
18586 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
18587 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
18588 cat >conftest.$ac_ext <<_ACEOF
18589 /* confdefs.h.  */
18590 _ACEOF
18591 cat confdefs.h >>conftest.$ac_ext
18592 cat >>conftest.$ac_ext <<_ACEOF
18593 /* end confdefs.h.  */
18594 $ac_includes_default
18595 #include <$ac_header>
18596 _ACEOF
18597 rm -f conftest.$ac_objext
18598 if { (ac_try="$ac_compile"
18599 case "(($ac_try" in
18600   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18601   *) ac_try_echo=$ac_try;;
18602 esac
18603 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18604   (eval "$ac_compile") 2>conftest.er1
18605   ac_status=$?
18606   grep -v '^ *+' conftest.er1 >conftest.err
18607   rm -f conftest.er1
18608   cat conftest.err >&5
18609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18610   (exit $ac_status); } && {
18611          test -z "$ac_c_werror_flag" ||
18612          test ! -s conftest.err
18613        } && test -s conftest.$ac_objext; then
18614   ac_header_compiler=yes
18615 else
18616   echo "$as_me: failed program was:" >&5
18617 sed 's/^/| /' conftest.$ac_ext >&5
18618
18619         ac_header_compiler=no
18620 fi
18621
18622 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18623 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18624 echo "${ECHO_T}$ac_header_compiler" >&6; }
18625
18626 # Is the header present?
18627 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
18628 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
18629 cat >conftest.$ac_ext <<_ACEOF
18630 /* confdefs.h.  */
18631 _ACEOF
18632 cat confdefs.h >>conftest.$ac_ext
18633 cat >>conftest.$ac_ext <<_ACEOF
18634 /* end confdefs.h.  */
18635 #include <$ac_header>
18636 _ACEOF
18637 if { (ac_try="$ac_cpp conftest.$ac_ext"
18638 case "(($ac_try" in
18639   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18640   *) ac_try_echo=$ac_try;;
18641 esac
18642 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18643   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18644   ac_status=$?
18645   grep -v '^ *+' conftest.er1 >conftest.err
18646   rm -f conftest.er1
18647   cat conftest.err >&5
18648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18649   (exit $ac_status); } >/dev/null && {
18650          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18651          test ! -s conftest.err
18652        }; then
18653   ac_header_preproc=yes
18654 else
18655   echo "$as_me: failed program was:" >&5
18656 sed 's/^/| /' conftest.$ac_ext >&5
18657
18658   ac_header_preproc=no
18659 fi
18660
18661 rm -f conftest.err conftest.$ac_ext
18662 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18663 echo "${ECHO_T}$ac_header_preproc" >&6; }
18664
18665 # So?  What about this header?
18666 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18667   yes:no: )
18668     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18669 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18670     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18671 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18672     ac_header_preproc=yes
18673     ;;
18674   no:yes:* )
18675     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18676 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18677     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18678 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18679     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18680 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18681     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18682 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18683     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18684 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18685     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18686 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18687
18688     ;;
18689 esac
18690 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18691 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18692 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18693   echo $ECHO_N "(cached) $ECHO_C" >&6
18694 else
18695   eval "$as_ac_Header=\$ac_header_preproc"
18696 fi
18697 ac_res=`eval echo '${'$as_ac_Header'}'`
18698                { echo "$as_me:$LINENO: result: $ac_res" >&5
18699 echo "${ECHO_T}$ac_res" >&6; }
18700
18701 fi
18702 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18703   cat >>confdefs.h <<_ACEOF
18704 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18705 _ACEOF
18706
18707 fi
18708
18709 done
18710
18711
18712   ac_save_CPPFLAGS="$CPPFLAGS"
18713   ac_save_LDFLAGS="$LDFLAGS"
18714 #  ac_save_LIBS="$LIBS"
18715
18716   if test \! -z "$includedir" ; then
18717     CPPFLAGS="$CPPFLAGS -I$includedir"
18718   fi
18719   # note: $X_CFLAGS includes $x_includes
18720   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18721
18722   if test \! -z "$libdir" ; then
18723     LDFLAGS="$LDFLAGS -L$libdir"
18724   fi
18725   # note: $X_LIBS includes $x_libraries
18726   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18727
18728   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18729   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18730   { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18731 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
18732 if test "${ac_cv_lib_util_forkpty+set}" = set; then
18733   echo $ECHO_N "(cached) $ECHO_C" >&6
18734 else
18735   ac_check_lib_save_LIBS=$LIBS
18736 LIBS="-lutil  $LIBS"
18737 cat >conftest.$ac_ext <<_ACEOF
18738 /* confdefs.h.  */
18739 _ACEOF
18740 cat confdefs.h >>conftest.$ac_ext
18741 cat >>conftest.$ac_ext <<_ACEOF
18742 /* end confdefs.h.  */
18743
18744 /* Override any GCC internal prototype to avoid an error.
18745    Use char because int might match the return type of a GCC
18746    builtin and then its argument prototype would still apply.  */
18747 #ifdef __cplusplus
18748 extern "C"
18749 #endif
18750 char forkpty ();
18751 int
18752 main ()
18753 {
18754 return forkpty ();
18755   ;
18756   return 0;
18757 }
18758 _ACEOF
18759 rm -f conftest.$ac_objext conftest$ac_exeext
18760 if { (ac_try="$ac_link"
18761 case "(($ac_try" in
18762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18763   *) ac_try_echo=$ac_try;;
18764 esac
18765 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18766   (eval "$ac_link") 2>conftest.er1
18767   ac_status=$?
18768   grep -v '^ *+' conftest.er1 >conftest.err
18769   rm -f conftest.er1
18770   cat conftest.err >&5
18771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18772   (exit $ac_status); } && {
18773          test -z "$ac_c_werror_flag" ||
18774          test ! -s conftest.err
18775        } && test -s conftest$ac_exeext &&
18776        $as_test_x conftest$ac_exeext; then
18777   ac_cv_lib_util_forkpty=yes
18778 else
18779   echo "$as_me: failed program was:" >&5
18780 sed 's/^/| /' conftest.$ac_ext >&5
18781
18782         ac_cv_lib_util_forkpty=no
18783 fi
18784
18785 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18786       conftest$ac_exeext conftest.$ac_ext
18787 LIBS=$ac_check_lib_save_LIBS
18788 fi
18789 { echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18790 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18791 if test $ac_cv_lib_util_forkpty = yes; then
18792   PTY_LIBS="-lutil"
18793                 ac_have_forkpty=yes
18794                 cat >>confdefs.h <<\_ACEOF
18795 #define HAVE_FORKPTY 1
18796 _ACEOF
18797
18798 fi
18799
18800   CPPFLAGS="$ac_save_CPPFLAGS"
18801   LDFLAGS="$ac_save_LDFLAGS"
18802 #  LIBS="$ac_save_LIBS"
18803
18804
18805 if test "$ac_have_forkpty" != yes ; then
18806   # we don't need (or have) -lutil on MacOS 10.4.2...
18807
18808   ac_save_CPPFLAGS="$CPPFLAGS"
18809   ac_save_LDFLAGS="$LDFLAGS"
18810 #  ac_save_LIBS="$LIBS"
18811
18812   if test \! -z "$includedir" ; then
18813     CPPFLAGS="$CPPFLAGS -I$includedir"
18814   fi
18815   # note: $X_CFLAGS includes $x_includes
18816   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18817
18818   if test \! -z "$libdir" ; then
18819     LDFLAGS="$LDFLAGS -L$libdir"
18820   fi
18821   # note: $X_LIBS includes $x_libraries
18822   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18823
18824   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18825   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18826   { echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
18827 echo $ECHO_N "checking for forkpty in -lc... $ECHO_C" >&6; }
18828 if test "${ac_cv_lib_c_forkpty+set}" = set; then
18829   echo $ECHO_N "(cached) $ECHO_C" >&6
18830 else
18831   ac_check_lib_save_LIBS=$LIBS
18832 LIBS="-lc  $LIBS"
18833 cat >conftest.$ac_ext <<_ACEOF
18834 /* confdefs.h.  */
18835 _ACEOF
18836 cat confdefs.h >>conftest.$ac_ext
18837 cat >>conftest.$ac_ext <<_ACEOF
18838 /* end confdefs.h.  */
18839
18840 /* Override any GCC internal prototype to avoid an error.
18841    Use char because int might match the return type of a GCC
18842    builtin and then its argument prototype would still apply.  */
18843 #ifdef __cplusplus
18844 extern "C"
18845 #endif
18846 char forkpty ();
18847 int
18848 main ()
18849 {
18850 return forkpty ();
18851   ;
18852   return 0;
18853 }
18854 _ACEOF
18855 rm -f conftest.$ac_objext conftest$ac_exeext
18856 if { (ac_try="$ac_link"
18857 case "(($ac_try" in
18858   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18859   *) ac_try_echo=$ac_try;;
18860 esac
18861 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18862   (eval "$ac_link") 2>conftest.er1
18863   ac_status=$?
18864   grep -v '^ *+' conftest.er1 >conftest.err
18865   rm -f conftest.er1
18866   cat conftest.err >&5
18867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18868   (exit $ac_status); } && {
18869          test -z "$ac_c_werror_flag" ||
18870          test ! -s conftest.err
18871        } && test -s conftest$ac_exeext &&
18872        $as_test_x conftest$ac_exeext; then
18873   ac_cv_lib_c_forkpty=yes
18874 else
18875   echo "$as_me: failed program was:" >&5
18876 sed 's/^/| /' conftest.$ac_ext >&5
18877
18878         ac_cv_lib_c_forkpty=no
18879 fi
18880
18881 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18882       conftest$ac_exeext conftest.$ac_ext
18883 LIBS=$ac_check_lib_save_LIBS
18884 fi
18885 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
18886 echo "${ECHO_T}$ac_cv_lib_c_forkpty" >&6; }
18887 if test $ac_cv_lib_c_forkpty = yes; then
18888   PTY_LIBS=""
18889                   cat >>confdefs.h <<\_ACEOF
18890 #define HAVE_FORKPTY 1
18891 _ACEOF
18892
18893 fi
18894
18895   CPPFLAGS="$ac_save_CPPFLAGS"
18896   LDFLAGS="$ac_save_LDFLAGS"
18897 #  LIBS="$ac_save_LIBS"
18898
18899 fi
18900
18901 ###############################################################################
18902 #
18903 #       Check for the XSHM server extension.
18904 #
18905 ###############################################################################
18906
18907 have_xshm=no
18908 with_xshm_req=unspecified
18909
18910 # Check whether --with-xshm-ext was given.
18911 if test "${with_xshm_ext+set}" = set; then
18912   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
18913 else
18914   with_xshm=yes
18915 fi
18916
18917
18918
18919    case "$with_xshm" in
18920     yes) ;;
18921     no)  ;;
18922
18923     /*)
18924      { echo "$as_me:$LINENO: checking for XSHM headers" >&5
18925 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6; }
18926      d=$with_xshm/include
18927      if test -d $d; then
18928        X_CFLAGS="-I$d $X_CFLAGS"
18929        { echo "$as_me:$LINENO: result: $d" >&5
18930 echo "${ECHO_T}$d" >&6; }
18931      else
18932        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18933 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18934      fi
18935
18936      { echo "$as_me:$LINENO: checking for XSHM libs" >&5
18937 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6; }
18938      d=$with_xshm/lib
18939      if test -d $d; then
18940        X_LIBS="-L$d $X_LIBS"
18941        { echo "$as_me:$LINENO: result: $d" >&5
18942 echo "${ECHO_T}$d" >&6; }
18943      else
18944        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18945 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18946      fi
18947
18948      # replace the directory string with "yes".
18949      with_xshm_req="yes"
18950      with_xshm=$with_xshm_req
18951      ;;
18952
18953     *)
18954      echo ""
18955      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
18956      echo "       If it is a directory, then \`DIR/include' will be added to"
18957      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18958      exit 1
18959      ;;
18960    esac
18961
18962
18963 if test "$with_xshm" = yes; then
18964
18965   # first check for Xshm.h.
18966
18967   ac_save_CPPFLAGS="$CPPFLAGS"
18968   if test \! -z "$includedir" ; then
18969     CPPFLAGS="$CPPFLAGS -I$includedir"
18970   fi
18971   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18972   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18973   { echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
18974 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6; }
18975 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
18976   echo $ECHO_N "(cached) $ECHO_C" >&6
18977 else
18978   cat >conftest.$ac_ext <<_ACEOF
18979 /* confdefs.h.  */
18980 _ACEOF
18981 cat confdefs.h >>conftest.$ac_ext
18982 cat >>conftest.$ac_ext <<_ACEOF
18983 /* end confdefs.h.  */
18984 #include <X11/Xlib.h>
18985
18986 #include <X11/extensions/XShm.h>
18987 _ACEOF
18988 rm -f conftest.$ac_objext
18989 if { (ac_try="$ac_compile"
18990 case "(($ac_try" in
18991   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18992   *) ac_try_echo=$ac_try;;
18993 esac
18994 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18995   (eval "$ac_compile") 2>conftest.er1
18996   ac_status=$?
18997   grep -v '^ *+' conftest.er1 >conftest.err
18998   rm -f conftest.er1
18999   cat conftest.err >&5
19000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19001   (exit $ac_status); } && {
19002          test -z "$ac_c_werror_flag" ||
19003          test ! -s conftest.err
19004        } && test -s conftest.$ac_objext; then
19005   ac_cv_header_X11_extensions_XShm_h=yes
19006 else
19007   echo "$as_me: failed program was:" >&5
19008 sed 's/^/| /' conftest.$ac_ext >&5
19009
19010         ac_cv_header_X11_extensions_XShm_h=no
19011 fi
19012
19013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19014 fi
19015 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
19016 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6; }
19017 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
19018   have_xshm=yes
19019 fi
19020
19021
19022   CPPFLAGS="$ac_save_CPPFLAGS"
19023
19024   # if that succeeded, then check for sys/ipc.h.
19025   if test "$have_xshm" = yes; then
19026     have_xshm=no
19027
19028   ac_save_CPPFLAGS="$CPPFLAGS"
19029   if test \! -z "$includedir" ; then
19030     CPPFLAGS="$CPPFLAGS -I$includedir"
19031   fi
19032   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19033   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19034   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19035   { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19036 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19037 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19038   echo $ECHO_N "(cached) $ECHO_C" >&6
19039 fi
19040 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19041 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19042 else
19043   # Is the header compilable?
19044 { echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
19045 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6; }
19046 cat >conftest.$ac_ext <<_ACEOF
19047 /* confdefs.h.  */
19048 _ACEOF
19049 cat confdefs.h >>conftest.$ac_ext
19050 cat >>conftest.$ac_ext <<_ACEOF
19051 /* end confdefs.h.  */
19052 $ac_includes_default
19053 #include <sys/ipc.h>
19054 _ACEOF
19055 rm -f conftest.$ac_objext
19056 if { (ac_try="$ac_compile"
19057 case "(($ac_try" in
19058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19059   *) ac_try_echo=$ac_try;;
19060 esac
19061 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19062   (eval "$ac_compile") 2>conftest.er1
19063   ac_status=$?
19064   grep -v '^ *+' conftest.er1 >conftest.err
19065   rm -f conftest.er1
19066   cat conftest.err >&5
19067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19068   (exit $ac_status); } && {
19069          test -z "$ac_c_werror_flag" ||
19070          test ! -s conftest.err
19071        } && test -s conftest.$ac_objext; then
19072   ac_header_compiler=yes
19073 else
19074   echo "$as_me: failed program was:" >&5
19075 sed 's/^/| /' conftest.$ac_ext >&5
19076
19077         ac_header_compiler=no
19078 fi
19079
19080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19081 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19082 echo "${ECHO_T}$ac_header_compiler" >&6; }
19083
19084 # Is the header present?
19085 { echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
19086 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6; }
19087 cat >conftest.$ac_ext <<_ACEOF
19088 /* confdefs.h.  */
19089 _ACEOF
19090 cat confdefs.h >>conftest.$ac_ext
19091 cat >>conftest.$ac_ext <<_ACEOF
19092 /* end confdefs.h.  */
19093 #include <sys/ipc.h>
19094 _ACEOF
19095 if { (ac_try="$ac_cpp conftest.$ac_ext"
19096 case "(($ac_try" in
19097   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19098   *) ac_try_echo=$ac_try;;
19099 esac
19100 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19101   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19102   ac_status=$?
19103   grep -v '^ *+' conftest.er1 >conftest.err
19104   rm -f conftest.er1
19105   cat conftest.err >&5
19106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19107   (exit $ac_status); } >/dev/null && {
19108          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19109          test ! -s conftest.err
19110        }; then
19111   ac_header_preproc=yes
19112 else
19113   echo "$as_me: failed program was:" >&5
19114 sed 's/^/| /' conftest.$ac_ext >&5
19115
19116   ac_header_preproc=no
19117 fi
19118
19119 rm -f conftest.err conftest.$ac_ext
19120 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19121 echo "${ECHO_T}$ac_header_preproc" >&6; }
19122
19123 # So?  What about this header?
19124 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19125   yes:no: )
19126     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
19127 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19128     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
19129 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
19130     ac_header_preproc=yes
19131     ;;
19132   no:yes:* )
19133     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
19134 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
19135     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
19136 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
19137     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
19138 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
19139     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
19140 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19141     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
19142 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
19143     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
19144 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
19145
19146     ;;
19147 esac
19148 { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19149 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19150 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19151   echo $ECHO_N "(cached) $ECHO_C" >&6
19152 else
19153   ac_cv_header_sys_ipc_h=$ac_header_preproc
19154 fi
19155 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19156 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19157
19158 fi
19159 if test $ac_cv_header_sys_ipc_h = yes; then
19160   have_xshm=yes
19161 fi
19162
19163
19164   CPPFLAGS="$ac_save_CPPFLAGS"
19165   fi
19166
19167   # if that succeeded, then check for sys/shm.h.
19168   if test "$have_xshm" = yes; then
19169     have_xshm=no
19170
19171   ac_save_CPPFLAGS="$CPPFLAGS"
19172   if test \! -z "$includedir" ; then
19173     CPPFLAGS="$CPPFLAGS -I$includedir"
19174   fi
19175   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19176   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19177   if test "${ac_cv_header_sys_shm_h+set}" = set; then
19178   { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19179 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19180 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19181   echo $ECHO_N "(cached) $ECHO_C" >&6
19182 fi
19183 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19184 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19185 else
19186   # Is the header compilable?
19187 { echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
19188 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6; }
19189 cat >conftest.$ac_ext <<_ACEOF
19190 /* confdefs.h.  */
19191 _ACEOF
19192 cat confdefs.h >>conftest.$ac_ext
19193 cat >>conftest.$ac_ext <<_ACEOF
19194 /* end confdefs.h.  */
19195 $ac_includes_default
19196 #include <sys/shm.h>
19197 _ACEOF
19198 rm -f conftest.$ac_objext
19199 if { (ac_try="$ac_compile"
19200 case "(($ac_try" in
19201   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19202   *) ac_try_echo=$ac_try;;
19203 esac
19204 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19205   (eval "$ac_compile") 2>conftest.er1
19206   ac_status=$?
19207   grep -v '^ *+' conftest.er1 >conftest.err
19208   rm -f conftest.er1
19209   cat conftest.err >&5
19210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19211   (exit $ac_status); } && {
19212          test -z "$ac_c_werror_flag" ||
19213          test ! -s conftest.err
19214        } && test -s conftest.$ac_objext; then
19215   ac_header_compiler=yes
19216 else
19217   echo "$as_me: failed program was:" >&5
19218 sed 's/^/| /' conftest.$ac_ext >&5
19219
19220         ac_header_compiler=no
19221 fi
19222
19223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19224 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19225 echo "${ECHO_T}$ac_header_compiler" >&6; }
19226
19227 # Is the header present?
19228 { echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
19229 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6; }
19230 cat >conftest.$ac_ext <<_ACEOF
19231 /* confdefs.h.  */
19232 _ACEOF
19233 cat confdefs.h >>conftest.$ac_ext
19234 cat >>conftest.$ac_ext <<_ACEOF
19235 /* end confdefs.h.  */
19236 #include <sys/shm.h>
19237 _ACEOF
19238 if { (ac_try="$ac_cpp conftest.$ac_ext"
19239 case "(($ac_try" in
19240   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19241   *) ac_try_echo=$ac_try;;
19242 esac
19243 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19244   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19245   ac_status=$?
19246   grep -v '^ *+' conftest.er1 >conftest.err
19247   rm -f conftest.er1
19248   cat conftest.err >&5
19249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19250   (exit $ac_status); } >/dev/null && {
19251          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19252          test ! -s conftest.err
19253        }; then
19254   ac_header_preproc=yes
19255 else
19256   echo "$as_me: failed program was:" >&5
19257 sed 's/^/| /' conftest.$ac_ext >&5
19258
19259   ac_header_preproc=no
19260 fi
19261
19262 rm -f conftest.err conftest.$ac_ext
19263 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19264 echo "${ECHO_T}$ac_header_preproc" >&6; }
19265
19266 # So?  What about this header?
19267 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19268   yes:no: )
19269     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
19270 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19271     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
19272 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
19273     ac_header_preproc=yes
19274     ;;
19275   no:yes:* )
19276     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
19277 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
19278     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
19279 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
19280     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
19281 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
19282     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
19283 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19284     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
19285 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
19286     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
19287 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
19288
19289     ;;
19290 esac
19291 { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19292 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19293 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19294   echo $ECHO_N "(cached) $ECHO_C" >&6
19295 else
19296   ac_cv_header_sys_shm_h=$ac_header_preproc
19297 fi
19298 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19299 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19300
19301 fi
19302 if test $ac_cv_header_sys_shm_h = yes; then
19303   have_xshm=yes
19304 fi
19305
19306
19307   CPPFLAGS="$ac_save_CPPFLAGS"
19308   fi
19309
19310   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
19311   # to exist, but the library code to not exist.  And even better, the library
19312   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
19313   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
19314   # that's not quite right, but close enough.)
19315   #
19316   case "$host" in
19317     *-aix*)
19318       if  `uname -v` -eq 3 ; then
19319         have_xshm=no
19320
19321   ac_save_CPPFLAGS="$CPPFLAGS"
19322   ac_save_LDFLAGS="$LDFLAGS"
19323 #  ac_save_LIBS="$LIBS"
19324
19325   if test \! -z "$includedir" ; then
19326     CPPFLAGS="$CPPFLAGS -I$includedir"
19327   fi
19328   # note: $X_CFLAGS includes $x_includes
19329   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19330
19331   if test \! -z "$libdir" ; then
19332     LDFLAGS="$LDFLAGS -L$libdir"
19333   fi
19334   # note: $X_LIBS includes $x_libraries
19335   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19336
19337   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19338   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19339   { echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
19340 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6; }
19341 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
19342   echo $ECHO_N "(cached) $ECHO_C" >&6
19343 else
19344   ac_check_lib_save_LIBS=$LIBS
19345 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
19346 cat >conftest.$ac_ext <<_ACEOF
19347 /* confdefs.h.  */
19348 _ACEOF
19349 cat confdefs.h >>conftest.$ac_ext
19350 cat >>conftest.$ac_ext <<_ACEOF
19351 /* end confdefs.h.  */
19352
19353 /* Override any GCC internal prototype to avoid an error.
19354    Use char because int might match the return type of a GCC
19355    builtin and then its argument prototype would still apply.  */
19356 #ifdef __cplusplus
19357 extern "C"
19358 #endif
19359 char XShmQueryExtension ();
19360 int
19361 main ()
19362 {
19363 return XShmQueryExtension ();
19364   ;
19365   return 0;
19366 }
19367 _ACEOF
19368 rm -f conftest.$ac_objext conftest$ac_exeext
19369 if { (ac_try="$ac_link"
19370 case "(($ac_try" in
19371   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19372   *) ac_try_echo=$ac_try;;
19373 esac
19374 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19375   (eval "$ac_link") 2>conftest.er1
19376   ac_status=$?
19377   grep -v '^ *+' conftest.er1 >conftest.err
19378   rm -f conftest.er1
19379   cat conftest.err >&5
19380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19381   (exit $ac_status); } && {
19382          test -z "$ac_c_werror_flag" ||
19383          test ! -s conftest.err
19384        } && test -s conftest$ac_exeext &&
19385        $as_test_x conftest$ac_exeext; then
19386   ac_cv_lib_XextSam_XShmQueryExtension=yes
19387 else
19388   echo "$as_me: failed program was:" >&5
19389 sed 's/^/| /' conftest.$ac_ext >&5
19390
19391         ac_cv_lib_XextSam_XShmQueryExtension=no
19392 fi
19393
19394 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19395       conftest$ac_exeext conftest.$ac_ext
19396 LIBS=$ac_check_lib_save_LIBS
19397 fi
19398 { echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
19399 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
19400 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
19401   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
19402 else
19403   true
19404 fi
19405
19406   CPPFLAGS="$ac_save_CPPFLAGS"
19407   LDFLAGS="$ac_save_LDFLAGS"
19408 #  LIBS="$ac_save_LIBS"
19409
19410       fi
19411     ;;
19412   esac
19413
19414   # if that succeeded, then we've really got it.
19415   if test "$have_xshm" = yes; then
19416     cat >>confdefs.h <<\_ACEOF
19417 #define HAVE_XSHM_EXTENSION 1
19418 _ACEOF
19419
19420   fi
19421
19422 elif test "$with_xshm" != no; then
19423   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
19424   exit 1
19425 fi
19426
19427
19428 ###############################################################################
19429 #
19430 #       Check for the DOUBLE-BUFFER server extension.
19431 #
19432 ###############################################################################
19433
19434 have_xdbe=no
19435 with_xdbe_req=unspecified
19436
19437 # Check whether --with-xdbe-ext was given.
19438 if test "${with_xdbe_ext+set}" = set; then
19439   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
19440 else
19441   with_xdbe=yes
19442 fi
19443
19444
19445
19446    case "$with_xdbe" in
19447     yes) ;;
19448     no)  ;;
19449
19450     /*)
19451      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
19452 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6; }
19453      d=$with_xdbe/include
19454      if test -d $d; then
19455        X_CFLAGS="-I$d $X_CFLAGS"
19456        { echo "$as_me:$LINENO: result: $d" >&5
19457 echo "${ECHO_T}$d" >&6; }
19458      else
19459        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19460 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19461      fi
19462
19463      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
19464 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6; }
19465      d=$with_xdbe/lib
19466      if test -d $d; then
19467        X_LIBS="-L$d $X_LIBS"
19468        { echo "$as_me:$LINENO: result: $d" >&5
19469 echo "${ECHO_T}$d" >&6; }
19470      else
19471        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19472 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19473      fi
19474
19475      # replace the directory string with "yes".
19476      with_xdbe_req="yes"
19477      with_xdbe=$with_xdbe_req
19478      ;;
19479
19480     *)
19481      echo ""
19482      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
19483      echo "       If it is a directory, then \`DIR/include' will be added to"
19484      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19485      exit 1
19486      ;;
19487    esac
19488
19489
19490 if test "$with_xdbe" = yes; then
19491
19492
19493   ac_save_CPPFLAGS="$CPPFLAGS"
19494   if test \! -z "$includedir" ; then
19495     CPPFLAGS="$CPPFLAGS -I$includedir"
19496   fi
19497   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19498   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19499   { echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
19500 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6; }
19501 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19502   echo $ECHO_N "(cached) $ECHO_C" >&6
19503 else
19504   cat >conftest.$ac_ext <<_ACEOF
19505 /* confdefs.h.  */
19506 _ACEOF
19507 cat confdefs.h >>conftest.$ac_ext
19508 cat >>conftest.$ac_ext <<_ACEOF
19509 /* end confdefs.h.  */
19510 #include <X11/Xlib.h>
19511
19512 #include <X11/extensions/Xdbe.h>
19513 _ACEOF
19514 rm -f conftest.$ac_objext
19515 if { (ac_try="$ac_compile"
19516 case "(($ac_try" in
19517   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19518   *) ac_try_echo=$ac_try;;
19519 esac
19520 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19521   (eval "$ac_compile") 2>conftest.er1
19522   ac_status=$?
19523   grep -v '^ *+' conftest.er1 >conftest.err
19524   rm -f conftest.er1
19525   cat conftest.err >&5
19526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19527   (exit $ac_status); } && {
19528          test -z "$ac_c_werror_flag" ||
19529          test ! -s conftest.err
19530        } && test -s conftest.$ac_objext; then
19531   ac_cv_header_X11_extensions_Xdbe_h=yes
19532 else
19533   echo "$as_me: failed program was:" >&5
19534 sed 's/^/| /' conftest.$ac_ext >&5
19535
19536         ac_cv_header_X11_extensions_Xdbe_h=no
19537 fi
19538
19539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19540 fi
19541 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19542 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
19543 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
19544   have_xdbe=yes
19545 fi
19546
19547
19548   CPPFLAGS="$ac_save_CPPFLAGS"
19549   if test "$have_xdbe" = yes; then
19550     cat >>confdefs.h <<\_ACEOF
19551 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
19552 _ACEOF
19553
19554   fi
19555
19556 elif test "$with_xdbe" != no; then
19557   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
19558   exit 1
19559 fi
19560
19561
19562 ###############################################################################
19563 #
19564 #       Check for the SGI XReadDisplay server extension.
19565 #
19566 #       Note: this has to be down here, rather than up with the other server
19567 #       extension tests, so that the output of `configure --help' is in the
19568 #       right order.  Arrgh!
19569 #
19570 ###############################################################################
19571
19572 have_readdisplay=no
19573 with_readdisplay_req=unspecified
19574
19575 # Check whether --with-readdisplay was given.
19576 if test "${with_readdisplay+set}" = set; then
19577   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
19578 else
19579   with_readdisplay=yes
19580 fi
19581
19582
19583
19584    case "$with_readdisplay" in
19585     yes) ;;
19586     no)  ;;
19587
19588     /*)
19589      { echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
19590 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6; }
19591      d=$with_readdisplay/include
19592      if test -d $d; then
19593        X_CFLAGS="-I$d $X_CFLAGS"
19594        { echo "$as_me:$LINENO: result: $d" >&5
19595 echo "${ECHO_T}$d" >&6; }
19596      else
19597        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19598 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19599      fi
19600
19601      { echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
19602 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6; }
19603      d=$with_readdisplay/lib
19604      if test -d $d; then
19605        X_LIBS="-L$d $X_LIBS"
19606        { echo "$as_me:$LINENO: result: $d" >&5
19607 echo "${ECHO_T}$d" >&6; }
19608      else
19609        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19610 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19611      fi
19612
19613      # replace the directory string with "yes".
19614      with_readdisplay_req="yes"
19615      with_readdisplay=$with_readdisplay_req
19616      ;;
19617
19618     *)
19619      echo ""
19620      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
19621      echo "       If it is a directory, then \`DIR/include' will be added to"
19622      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19623      exit 1
19624      ;;
19625    esac
19626
19627
19628 if test "$with_readdisplay" = yes; then
19629
19630   ac_save_CPPFLAGS="$CPPFLAGS"
19631   if test \! -z "$includedir" ; then
19632     CPPFLAGS="$CPPFLAGS -I$includedir"
19633   fi
19634   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19635   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19636   { echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
19637 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6; }
19638 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
19639   echo $ECHO_N "(cached) $ECHO_C" >&6
19640 else
19641   cat >conftest.$ac_ext <<_ACEOF
19642 /* confdefs.h.  */
19643 _ACEOF
19644 cat confdefs.h >>conftest.$ac_ext
19645 cat >>conftest.$ac_ext <<_ACEOF
19646 /* end confdefs.h.  */
19647 #include <X11/Xlib.h>
19648
19649 #include <X11/extensions/readdisplay.h>
19650 _ACEOF
19651 rm -f conftest.$ac_objext
19652 if { (ac_try="$ac_compile"
19653 case "(($ac_try" in
19654   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19655   *) ac_try_echo=$ac_try;;
19656 esac
19657 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19658   (eval "$ac_compile") 2>conftest.er1
19659   ac_status=$?
19660   grep -v '^ *+' conftest.er1 >conftest.err
19661   rm -f conftest.er1
19662   cat conftest.err >&5
19663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19664   (exit $ac_status); } && {
19665          test -z "$ac_c_werror_flag" ||
19666          test ! -s conftest.err
19667        } && test -s conftest.$ac_objext; then
19668   ac_cv_header_X11_extensions_readdisplay_h=yes
19669 else
19670   echo "$as_me: failed program was:" >&5
19671 sed 's/^/| /' conftest.$ac_ext >&5
19672
19673         ac_cv_header_X11_extensions_readdisplay_h=no
19674 fi
19675
19676 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19677 fi
19678 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19679 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
19680 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19681   cat >>confdefs.h <<\_ACEOF
19682 #define HAVE_READ_DISPLAY_EXTENSION 1
19683 _ACEOF
19684
19685 fi
19686
19687
19688   CPPFLAGS="$ac_save_CPPFLAGS"
19689 elif test "$with_readdisplay" != no; then
19690   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
19691   exit 1
19692 fi
19693
19694
19695 ###############################################################################
19696 #
19697 #       Check for a directory full of images to use as the default value
19698 #       of the "imageDirectory" preference.
19699 #
19700 ###############################################################################
19701
19702 have_imagedir=no
19703 with_imagedir_req=unspecified
19704
19705
19706 # Check whether --with-image-directory was given.
19707 if test "${with_image_directory+set}" = set; then
19708   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
19709 else
19710   with_imagedir=yes
19711 fi
19712
19713 # no HANDLE_X_PATH_ARG for this one
19714
19715 case "$with_imagedir" in
19716   /*)
19717     # absolute path
19718     { echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
19719 echo $ECHO_N "checking for image directory $with_imagedir... $ECHO_C" >&6; }
19720     if test -d "$with_imagedir" ; then
19721       { echo "$as_me:$LINENO: result: yes" >&5
19722 echo "${ECHO_T}yes" >&6; }
19723     else
19724       { echo "$as_me:$LINENO: result: no" >&5
19725 echo "${ECHO_T}no" >&6; }
19726       with_imagedir=""
19727     fi
19728   ;;
19729   yes)
19730     with_imagedir=""
19731
19732     #### Could use some more defaults here...
19733     for dd in \
19734       "/usr/share/backgrounds/images/"          \
19735       "/usr/share/wallpapers/"                  \
19736       "/Library/Desktop Pictures/"              \
19737     ; do
19738       if test -z "$with_imagedir"; then
19739         { echo "$as_me:$LINENO: checking for image directory $dd" >&5
19740 echo $ECHO_N "checking for image directory $dd... $ECHO_C" >&6; }
19741         if test -d "$dd" ; then
19742           { echo "$as_me:$LINENO: result: yes" >&5
19743 echo "${ECHO_T}yes" >&6; }
19744           with_imagedir="$dd"
19745         else
19746           { echo "$as_me:$LINENO: result: no" >&5
19747 echo "${ECHO_T}no" >&6; }
19748         fi
19749       fi
19750     done
19751
19752   ;;
19753   no)
19754     with_imagedir=""
19755   ;;
19756
19757   *)
19758     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
19759     exit 1
19760   ;;
19761 esac
19762 ac_cv_imagedir="$with_imagedir"
19763
19764 DEFAULT_IMAGES_P='True'
19765 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
19766
19767 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
19768   DEFAULT_IMAGES_P='False'
19769 fi
19770
19771
19772 ###############################################################################
19773 #
19774 #       Pick a text file to use as the default of the "textFile" preference.
19775 #       Any old file will do, but preferably one that will make interesting
19776 #       shapes when displayed by "starwars" and "fontglide".
19777 #
19778 ###############################################################################
19779
19780 have_textfile=no
19781 with_textfile_req=unspecified
19782
19783
19784 # Check whether --with-text-file was given.
19785 if test "${with_text_file+set}" = set; then
19786   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
19787 else
19788   with_textfile=yes
19789 fi
19790
19791 # no HANDLE_X_PATH_ARG for this one
19792
19793 case "$with_textfile" in
19794   /*)
19795     # absolute path
19796     { echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
19797 echo $ECHO_N "checking for text file $with_textfile... $ECHO_C" >&6; }
19798     if test -f "$with_textfile" ; then
19799       { echo "$as_me:$LINENO: result: yes" >&5
19800 echo "${ECHO_T}yes" >&6; }
19801     else
19802       { echo "$as_me:$LINENO: result: no" >&5
19803 echo "${ECHO_T}no" >&6; }
19804       with_textfile=""
19805     fi
19806   ;;
19807   yes)
19808     with_textfile=""
19809
19810     #### Could use some more defaults here...
19811     for f in \
19812       "/usr/X11R6/lib/X11/doc/README"           \
19813       "/usr/share/doc/xserver-common/copyright" \
19814       "/usr/X11R6/README"                       \
19815     ; do
19816       if test -z "$with_textfile"; then
19817         { echo "$as_me:$LINENO: checking for text file $f" >&5
19818 echo $ECHO_N "checking for text file $f... $ECHO_C" >&6; }
19819         if test -f "$f" ; then
19820           { echo "$as_me:$LINENO: result: yes" >&5
19821 echo "${ECHO_T}yes" >&6; }
19822           with_textfile="$f"
19823         else
19824           { echo "$as_me:$LINENO: result: no" >&5
19825 echo "${ECHO_T}no" >&6; }
19826         fi
19827       fi
19828     done
19829
19830   ;;
19831   no)
19832     with_textfile=""
19833   ;;
19834
19835   *)
19836     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
19837     exit 1
19838   ;;
19839 esac
19840 ac_cv_textfile="$with_textfile"
19841
19842 DEFAULT_TEXT_FILE="$ac_cv_textfile"
19843
19844
19845 ###############################################################################
19846 #
19847 #       Check the browser to see help URL
19848 #
19849 ###############################################################################
19850
19851 have_browser=no
19852 with_browser_req=unspecified
19853
19854
19855 # Check whether --with-browser was given.
19856 if test "${with_browser+set}" = set; then
19857   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
19858 else
19859   with_browser=no
19860 fi
19861
19862 # no HANDLE_X_PATH_ARG for this one
19863
19864 case "$with_browser" in
19865   no )
19866   ;;
19867   * )
19868     WITH_BROWSER=$with_browser
19869     gnome_open_program=$with_browser
19870     { echo "$as_me:$LINENO: checking for browser $with_browser" >&5
19871 echo $ECHO_N "checking for browser $with_browser... $ECHO_C" >&6; }
19872     with_browser_fullpath=`which $with_browser 2>/dev/null`
19873     case $with_browser_fullpath in
19874          /* )
19875                 { echo "$as_me:$LINENO: result: yes" >&5
19876 echo "${ECHO_T}yes" >&6; }
19877                  have_browser=yes
19878                  ;;
19879         * )
19880                { echo "$as_me:$LINENO: result: no" >&5
19881 echo "${ECHO_T}no" >&6; }
19882 # Only warning: we don't want to install all packages for the
19883 # dependency of the browser in building stage...
19884                echo "WARNING: browser not found: --with-browser=$with_browser"
19885                ;;
19886     esac
19887   ;;
19888 esac
19889 ac_cv_browser="$with_browser"
19890
19891 ###############################################################################
19892 #
19893 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
19894 #       This should be safe, but let's give people the option.
19895 #
19896 ###############################################################################
19897
19898 setuid_hacks_default=no
19899 setuid_hacks="$setuid_hacks_default"
19900
19901 # Check whether --with-setuid-hacks was given.
19902 if test "${with_setuid_hacks+set}" = set; then
19903   withval=$with_setuid_hacks; setuid_hacks="$withval"
19904 else
19905   setuid_hacks="$setuid_hacks_default"
19906 fi
19907
19908
19909
19910    case "$setuid_hacks" in
19911     yes) ;;
19912     no)  ;;
19913
19914     /*)
19915      { echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
19916 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6; }
19917      d=$setuid_hacks/include
19918      if test -d $d; then
19919        X_CFLAGS="-I$d $X_CFLAGS"
19920        { echo "$as_me:$LINENO: result: $d" >&5
19921 echo "${ECHO_T}$d" >&6; }
19922      else
19923        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19924 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19925      fi
19926
19927      { echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
19928 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6; }
19929      d=$setuid_hacks/lib
19930      if test -d $d; then
19931        X_LIBS="-L$d $X_LIBS"
19932        { echo "$as_me:$LINENO: result: $d" >&5
19933 echo "${ECHO_T}$d" >&6; }
19934      else
19935        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19936 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19937      fi
19938
19939      # replace the directory string with "yes".
19940      setuid_hacks_req="yes"
19941      setuid_hacks=$setuid_hacks_req
19942      ;;
19943
19944     *)
19945      echo ""
19946      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
19947      echo "       If it is a directory, then \`DIR/include' will be added to"
19948      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19949      exit 1
19950      ;;
19951    esac
19952
19953
19954 if test "$setuid_hacks" = yes; then
19955   true
19956 elif test "$setuid_hacks" != no; then
19957   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
19958   exit 1
19959 fi
19960
19961
19962 ###############################################################################
19963 #
19964 #       Done testing.  Now, set up the various -I and -L variables,
19965 #       and decide which GUI program to build by default.
19966 #
19967 ###############################################################################
19968
19969 DEPEND=makedepend
19970 DEPEND_FLAGS=
19971 DEPEND_DEFINES=
19972
19973
19974 if test \! -z "$includedir" ; then
19975   INCLUDES="$INCLUDES -I$includedir"
19976 fi
19977
19978 if test \! -z "$libdir" ; then
19979   LDFLAGS="$LDFLAGS -L$libdir"
19980 fi
19981
19982
19983 PREFERRED_DEMO_PROGRAM=''
19984 ALL_DEMO_PROGRAMS=
19985 if test "$have_motif" = yes; then
19986   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
19987   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19988 fi
19989 if test "$have_gtk" = yes; then
19990   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
19991   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19992 fi
19993
19994
19995 if test "$have_kerberos" = yes; then
19996   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
19997   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
19998 fi
19999 if test "$have_pam" = yes; then
20000   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
20001   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
20002   INSTALL_PAM="install-pam"
20003 fi
20004 if test "$have_passwd_helper" = yes; then
20005   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
20006   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
20007 fi
20008   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
20009   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
20010
20011
20012 if test "$enable_locking" = yes; then
20013   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
20014   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
20015 else
20016   LOCK_SRCS='$(NOLOCK_SRCS_1)'
20017   LOCK_OBJS='$(NOLOCK_OBJS_1)'
20018 fi
20019
20020 if test "$ac_macosx" = yes; then
20021   EXES_OSX='$(EXES_OSX)'
20022   SCRIPTS_OSX='$(SCRIPTS_OSX)'
20023   MEN_OSX='$(MEN_OSX)'
20024 else
20025   EXES_OSX=
20026   SCRIPTS_OSX=
20027   MEN_OSX=
20028 fi
20029
20030
20031 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
20032
20033 if test "$need_setuid" = yes; then
20034   NEED_SETUID=yes
20035 else
20036   NEED_SETUID=no
20037 fi
20038
20039 if test "$setuid_hacks" = yes; then
20040   SETUID_HACKS=yes
20041 else
20042   SETUID_HACKS=no
20043 fi
20044
20045 tab='   '
20046 if test "$have_gl" = yes; then
20047   GL_EXES='$(GL_EXES)'
20048   GL_UTIL_EXES='$(GL_UTIL_EXES)'
20049   GL_MEN='$(GL_MEN)'
20050   GL_KLUDGE="${tab}  "
20051 else
20052   GL_KLUDGE="-${tab}  "
20053 fi
20054
20055 if test "$have_gle" = yes; then
20056   GLE_EXES='$(GLE_EXES)'
20057   GLE_KLUDGE="${tab}   "
20058 else
20059   GLE_KLUDGE="-${tab}   "
20060 fi
20061
20062 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
20063  JPEG_EXES='$(JPEG_EXES)'
20064 fi
20065
20066
20067 # Another substitution in the XScreenSaver.ad.in file:
20068 #
20069 if test "$gnome_open_program" != ''; then
20070   GNOME24=''
20071   GNOME22='!    '
20072   NOGNOME='!    '
20073 elif test "$gnome_url_show_program" != ''; then
20074   GNOME24='!    '
20075   GNOME22=''
20076   NOGNOME='!    '
20077 else
20078   GNOME24='!    '
20079   GNOME22='!    '
20080   NOGNOME=''
20081 fi
20082
20083
20084 # Set PO_DATADIR to something sensible.
20085 #
20086 { echo "$as_me:$LINENO: checking for locale directory" >&5
20087 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6; }
20088 if test -n "$GTK_DATADIR" ; then
20089   PO_DATADIR="$GTK_DATADIR"
20090 elif test "$have_gtk" = yes; then
20091   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
20092   PO_DATADIR="$PO_DATADIR/share"
20093 fi
20094
20095 if test -z "$PO_DATADIR" ; then
20096   #
20097   # #### Total fucking kludge --
20098   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
20099   # but of course we need to expand all the nested variables to do that...
20100   #
20101   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
20102   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
20103 fi
20104
20105 { echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
20106 echo "${ECHO_T}$PO_DATADIR/locale" >&6; }
20107
20108
20109 # canonicalize slashes.
20110 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
20111
20112 # gcc 3.0 likes to issue this warning for every file:
20113 #
20114 # cc1: warning: changing search order for system directory "/usr/local/include"
20115 # cc1: warning:   as it has already been specified as a non-system directory
20116 #
20117 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
20118 # Which *should* be totally redundant, and thus an ok thing to delete?
20119 #
20120 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
20121
20122
20123 ###############################################################################
20124 #
20125 #       Perform substitutions and write Makefiles.
20126 #
20127 ###############################################################################
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191 APPDEFAULTS=$ac_x_app_defaults
20192
20193
20194
20195
20196
20197
20198
20199 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
20200
20201 cat >confcache <<\_ACEOF
20202 # This file is a shell script that caches the results of configure
20203 # tests run on this system so they can be shared between configure
20204 # scripts and configure runs, see configure's option --config-cache.
20205 # It is not useful on other systems.  If it contains results you don't
20206 # want to keep, you may remove or edit it.
20207 #
20208 # config.status only pays attention to the cache file if you give it
20209 # the --recheck option to rerun configure.
20210 #
20211 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20212 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20213 # following values.
20214
20215 _ACEOF
20216
20217 # The following way of writing the cache mishandles newlines in values,
20218 # but we know of no workaround that is simple, portable, and efficient.
20219 # So, we kill variables containing newlines.
20220 # Ultrix sh set writes to stderr and can't be redirected directly,
20221 # and sets the high bit in the cache file unless we assign to the vars.
20222 (
20223   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20224     eval ac_val=\$$ac_var
20225     case $ac_val in #(
20226     *${as_nl}*)
20227       case $ac_var in #(
20228       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
20229 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
20230       esac
20231       case $ac_var in #(
20232       _ | IFS | as_nl) ;; #(
20233       *) $as_unset $ac_var ;;
20234       esac ;;
20235     esac
20236   done
20237
20238   (set) 2>&1 |
20239     case $as_nl`(ac_space=' '; set) 2>&1` in #(
20240     *${as_nl}ac_space=\ *)
20241       # `set' does not quote correctly, so add quotes (double-quote
20242       # substitution turns \\\\ into \\, and sed turns \\ into \).
20243       sed -n \
20244         "s/'/'\\\\''/g;
20245           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20246       ;; #(
20247     *)
20248       # `set' quotes correctly as required by POSIX, so do not add quotes.
20249       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20250       ;;
20251     esac |
20252     sort
20253 ) |
20254   sed '
20255      /^ac_cv_env_/b end
20256      t clear
20257      :clear
20258      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20259      t end
20260      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20261      :end' >>confcache
20262 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20263   if test -w "$cache_file"; then
20264     test "x$cache_file" != "x/dev/null" &&
20265       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
20266 echo "$as_me: updating cache $cache_file" >&6;}
20267     cat confcache >$cache_file
20268   else
20269     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
20270 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20271   fi
20272 fi
20273 rm -f confcache
20274
20275 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20276 # Let make expand exec_prefix.
20277 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20278
20279 DEFS=-DHAVE_CONFIG_H
20280
20281 ac_libobjs=
20282 ac_ltlibobjs=
20283 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20284   # 1. Remove the extension, and $U if already installed.
20285   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20286   ac_i=`echo "$ac_i" | sed "$ac_script"`
20287   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
20288   #    will be set to the directory where LIBOBJS objects are built.
20289   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20290   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
20291 done
20292 LIBOBJS=$ac_libobjs
20293
20294 LTLIBOBJS=$ac_ltlibobjs
20295
20296
20297
20298
20299         mv -f po/POTFILES po/POTFILES.tmp
20300         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
20301         rm -f po/POTFILES.tmp
20302
20303
20304
20305 : ${CONFIG_STATUS=./config.status}
20306 ac_clean_files_save=$ac_clean_files
20307 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20308 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20309 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20310 cat >$CONFIG_STATUS <<_ACEOF
20311 #! $SHELL
20312 # Generated by $as_me.
20313 # Run this file to recreate the current configuration.
20314 # Compiler output produced by configure, useful for debugging
20315 # configure, is in config.log if it exists.
20316
20317 debug=false
20318 ac_cs_recheck=false
20319 ac_cs_silent=false
20320 SHELL=\${CONFIG_SHELL-$SHELL}
20321 _ACEOF
20322
20323 cat >>$CONFIG_STATUS <<\_ACEOF
20324 ## --------------------- ##
20325 ## M4sh Initialization.  ##
20326 ## --------------------- ##
20327
20328 # Be more Bourne compatible
20329 DUALCASE=1; export DUALCASE # for MKS sh
20330 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20331   emulate sh
20332   NULLCMD=:
20333   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20334   # is contrary to our usage.  Disable this feature.
20335   alias -g '${1+"$@"}'='"$@"'
20336   setopt NO_GLOB_SUBST
20337 else
20338   case `(set -o) 2>/dev/null` in
20339   *posix*) set -o posix ;;
20340 esac
20341
20342 fi
20343
20344
20345
20346
20347 # PATH needs CR
20348 # Avoid depending upon Character Ranges.
20349 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20350 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20351 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20352 as_cr_digits='0123456789'
20353 as_cr_alnum=$as_cr_Letters$as_cr_digits
20354
20355 # The user is always right.
20356 if test "${PATH_SEPARATOR+set}" != set; then
20357   echo "#! /bin/sh" >conf$$.sh
20358   echo  "exit 0"   >>conf$$.sh
20359   chmod +x conf$$.sh
20360   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20361     PATH_SEPARATOR=';'
20362   else
20363     PATH_SEPARATOR=:
20364   fi
20365   rm -f conf$$.sh
20366 fi
20367
20368 # Support unset when possible.
20369 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20370   as_unset=unset
20371 else
20372   as_unset=false
20373 fi
20374
20375
20376 # IFS
20377 # We need space, tab and new line, in precisely that order.  Quoting is
20378 # there to prevent editors from complaining about space-tab.
20379 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20380 # splitting by setting IFS to empty value.)
20381 as_nl='
20382 '
20383 IFS=" ""        $as_nl"
20384
20385 # Find who we are.  Look in the path if we contain no directory separator.
20386 case $0 in
20387   *[\\/]* ) as_myself=$0 ;;
20388   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20389 for as_dir in $PATH
20390 do
20391   IFS=$as_save_IFS
20392   test -z "$as_dir" && as_dir=.
20393   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20394 done
20395 IFS=$as_save_IFS
20396
20397      ;;
20398 esac
20399 # We did not find ourselves, most probably we were run as `sh COMMAND'
20400 # in which case we are not to be found in the path.
20401 if test "x$as_myself" = x; then
20402   as_myself=$0
20403 fi
20404 if test ! -f "$as_myself"; then
20405   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20406   { (exit 1); exit 1; }
20407 fi
20408
20409 # Work around bugs in pre-3.0 UWIN ksh.
20410 for as_var in ENV MAIL MAILPATH
20411 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20412 done
20413 PS1='$ '
20414 PS2='> '
20415 PS4='+ '
20416
20417 # NLS nuisances.
20418 for as_var in \
20419   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20420   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20421   LC_TELEPHONE LC_TIME
20422 do
20423   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20424     eval $as_var=C; export $as_var
20425   else
20426     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20427   fi
20428 done
20429
20430 # Required to use basename.
20431 if expr a : '\(a\)' >/dev/null 2>&1 &&
20432    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20433   as_expr=expr
20434 else
20435   as_expr=false
20436 fi
20437
20438 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20439   as_basename=basename
20440 else
20441   as_basename=false
20442 fi
20443
20444
20445 # Name of the executable.
20446 as_me=`$as_basename -- "$0" ||
20447 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20448          X"$0" : 'X\(//\)$' \| \
20449          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20450 echo X/"$0" |
20451     sed '/^.*\/\([^/][^/]*\)\/*$/{
20452             s//\1/
20453             q
20454           }
20455           /^X\/\(\/\/\)$/{
20456             s//\1/
20457             q
20458           }
20459           /^X\/\(\/\).*/{
20460             s//\1/
20461             q
20462           }
20463           s/.*/./; q'`
20464
20465 # CDPATH.
20466 $as_unset CDPATH
20467
20468
20469
20470   as_lineno_1=$LINENO
20471   as_lineno_2=$LINENO
20472   test "x$as_lineno_1" != "x$as_lineno_2" &&
20473   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
20474
20475   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20476   # uniformly replaced by the line number.  The first 'sed' inserts a
20477   # line-number line after each line using $LINENO; the second 'sed'
20478   # does the real work.  The second script uses 'N' to pair each
20479   # line-number line with the line containing $LINENO, and appends
20480   # trailing '-' during substitution so that $LINENO is not a special
20481   # case at line end.
20482   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20483   # scripts with optimization help from Paolo Bonzini.  Blame Lee
20484   # E. McMahon (1931-1989) for sed's syntax.  :-)
20485   sed -n '
20486     p
20487     /[$]LINENO/=
20488   ' <$as_myself |
20489     sed '
20490       s/[$]LINENO.*/&-/
20491       t lineno
20492       b
20493       :lineno
20494       N
20495       :loop
20496       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
20497       t loop
20498       s/-\n.*//
20499     ' >$as_me.lineno &&
20500   chmod +x "$as_me.lineno" ||
20501     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
20502    { (exit 1); exit 1; }; }
20503
20504   # Don't try to exec as it changes $[0], causing all sort of problems
20505   # (the dirname of $[0] is not the place where we might find the
20506   # original and so on.  Autoconf is especially sensitive to this).
20507   . "./$as_me.lineno"
20508   # Exit status is that of the last command.
20509   exit
20510 }
20511
20512
20513 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20514   as_dirname=dirname
20515 else
20516   as_dirname=false
20517 fi
20518
20519 ECHO_C= ECHO_N= ECHO_T=
20520 case `echo -n x` in
20521 -n*)
20522   case `echo 'x\c'` in
20523   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
20524   *)   ECHO_C='\c';;
20525   esac;;
20526 *)
20527   ECHO_N='-n';;
20528 esac
20529
20530 if expr a : '\(a\)' >/dev/null 2>&1 &&
20531    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20532   as_expr=expr
20533 else
20534   as_expr=false
20535 fi
20536
20537 rm -f conf$$ conf$$.exe conf$$.file
20538 if test -d conf$$.dir; then
20539   rm -f conf$$.dir/conf$$.file
20540 else
20541   rm -f conf$$.dir
20542   mkdir conf$$.dir
20543 fi
20544 echo >conf$$.file
20545 if ln -s conf$$.file conf$$ 2>/dev/null; then
20546   as_ln_s='ln -s'
20547   # ... but there are two gotchas:
20548   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20549   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20550   # In both cases, we have to default to `cp -p'.
20551   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20552     as_ln_s='cp -p'
20553 elif ln conf$$.file conf$$ 2>/dev/null; then
20554   as_ln_s=ln
20555 else
20556   as_ln_s='cp -p'
20557 fi
20558 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20559 rmdir conf$$.dir 2>/dev/null
20560
20561 if mkdir -p . 2>/dev/null; then
20562   as_mkdir_p=:
20563 else
20564   test -d ./-p && rmdir ./-p
20565   as_mkdir_p=false
20566 fi
20567
20568 if test -x / >/dev/null 2>&1; then
20569   as_test_x='test -x'
20570 else
20571   if ls -dL / >/dev/null 2>&1; then
20572     as_ls_L_option=L
20573   else
20574     as_ls_L_option=
20575   fi
20576   as_test_x='
20577     eval sh -c '\''
20578       if test -d "$1"; then
20579         test -d "$1/.";
20580       else
20581         case $1 in
20582         -*)set "./$1";;
20583         esac;
20584         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
20585         ???[sx]*):;;*)false;;esac;fi
20586     '\'' sh
20587   '
20588 fi
20589 as_executable_p=$as_test_x
20590
20591 # Sed expression to map a string onto a valid CPP name.
20592 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20593
20594 # Sed expression to map a string onto a valid variable name.
20595 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20596
20597
20598 exec 6>&1
20599
20600 # Save the log message, to keep $[0] and so on meaningful, and to
20601 # report actual input values of CONFIG_FILES etc. instead of their
20602 # values after options handling.
20603 ac_log="
20604 This file was extended by $as_me, which was
20605 generated by GNU Autoconf 2.61.  Invocation command line was
20606
20607   CONFIG_FILES    = $CONFIG_FILES
20608   CONFIG_HEADERS  = $CONFIG_HEADERS
20609   CONFIG_LINKS    = $CONFIG_LINKS
20610   CONFIG_COMMANDS = $CONFIG_COMMANDS
20611   $ $0 $@
20612
20613 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20614 "
20615
20616 _ACEOF
20617
20618 cat >>$CONFIG_STATUS <<_ACEOF
20619 # Files that config.status was made for.
20620 config_files="$ac_config_files"
20621 config_headers="$ac_config_headers"
20622 config_commands="$ac_config_commands"
20623
20624 _ACEOF
20625
20626 cat >>$CONFIG_STATUS <<\_ACEOF
20627 ac_cs_usage="\
20628 \`$as_me' instantiates files from templates according to the
20629 current configuration.
20630
20631 Usage: $0 [OPTIONS] [FILE]...
20632
20633   -h, --help       print this help, then exit
20634   -V, --version    print version number and configuration settings, then exit
20635   -q, --quiet      do not print progress messages
20636   -d, --debug      don't remove temporary files
20637       --recheck    update $as_me by reconfiguring in the same conditions
20638   --file=FILE[:TEMPLATE]
20639                    instantiate the configuration file FILE
20640   --header=FILE[:TEMPLATE]
20641                    instantiate the configuration header FILE
20642
20643 Configuration files:
20644 $config_files
20645
20646 Configuration headers:
20647 $config_headers
20648
20649 Configuration commands:
20650 $config_commands
20651
20652 Report bugs to <bug-autoconf@gnu.org>."
20653
20654 _ACEOF
20655 cat >>$CONFIG_STATUS <<_ACEOF
20656 ac_cs_version="\\
20657 config.status
20658 configured by $0, generated by GNU Autoconf 2.61,
20659   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
20660
20661 Copyright (C) 2006 Free Software Foundation, Inc.
20662 This config.status script is free software; the Free Software Foundation
20663 gives unlimited permission to copy, distribute and modify it."
20664
20665 ac_pwd='$ac_pwd'
20666 srcdir='$srcdir'
20667 INSTALL='$INSTALL'
20668 _ACEOF
20669
20670 cat >>$CONFIG_STATUS <<\_ACEOF
20671 # If no file are specified by the user, then we need to provide default
20672 # value.  By we need to know if files were specified by the user.
20673 ac_need_defaults=:
20674 while test $# != 0
20675 do
20676   case $1 in
20677   --*=*)
20678     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20679     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20680     ac_shift=:
20681     ;;
20682   *)
20683     ac_option=$1
20684     ac_optarg=$2
20685     ac_shift=shift
20686     ;;
20687   esac
20688
20689   case $ac_option in
20690   # Handling of the options.
20691   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20692     ac_cs_recheck=: ;;
20693   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20694     echo "$ac_cs_version"; exit ;;
20695   --debug | --debu | --deb | --de | --d | -d )
20696     debug=: ;;
20697   --file | --fil | --fi | --f )
20698     $ac_shift
20699     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
20700     ac_need_defaults=false;;
20701   --header | --heade | --head | --hea )
20702     $ac_shift
20703     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
20704     ac_need_defaults=false;;
20705   --he | --h)
20706     # Conflict between --help and --header
20707     { echo "$as_me: error: ambiguous option: $1
20708 Try \`$0 --help' for more information." >&2
20709    { (exit 1); exit 1; }; };;
20710   --help | --hel | -h )
20711     echo "$ac_cs_usage"; exit ;;
20712   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20713   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20714     ac_cs_silent=: ;;
20715
20716   # This is an error.
20717   -*) { echo "$as_me: error: unrecognized option: $1
20718 Try \`$0 --help' for more information." >&2
20719    { (exit 1); exit 1; }; } ;;
20720
20721   *) ac_config_targets="$ac_config_targets $1"
20722      ac_need_defaults=false ;;
20723
20724   esac
20725   shift
20726 done
20727
20728 ac_configure_extra_args=
20729
20730 if $ac_cs_silent; then
20731   exec 6>/dev/null
20732   ac_configure_extra_args="$ac_configure_extra_args --silent"
20733 fi
20734
20735 _ACEOF
20736 cat >>$CONFIG_STATUS <<_ACEOF
20737 if \$ac_cs_recheck; then
20738   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
20739   CONFIG_SHELL=$SHELL
20740   export CONFIG_SHELL
20741   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20742 fi
20743
20744 _ACEOF
20745 cat >>$CONFIG_STATUS <<\_ACEOF
20746 exec 5>>config.log
20747 {
20748   echo
20749   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20750 ## Running $as_me. ##
20751 _ASBOX
20752   echo "$ac_log"
20753 } >&5
20754
20755 _ACEOF
20756 cat >>$CONFIG_STATUS <<_ACEOF
20757 #
20758 # INIT-COMMANDS
20759 #
20760 INTLTOOL_PERL=${INTLTOOL_PERL}
20761
20762
20763 _ACEOF
20764
20765 cat >>$CONFIG_STATUS <<\_ACEOF
20766
20767 # Handling of arguments.
20768 for ac_config_target in $ac_config_targets
20769 do
20770   case $ac_config_target in
20771     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20772     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
20773     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
20774     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20775     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
20776     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
20777     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
20778     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
20779     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
20780     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
20781
20782   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
20783 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20784    { (exit 1); exit 1; }; };;
20785   esac
20786 done
20787
20788
20789 # If the user did not use the arguments to specify the items to instantiate,
20790 # then the envvar interface is used.  Set only those that are not.
20791 # We use the long form for the default assignment because of an extremely
20792 # bizarre bug on SunOS 4.1.3.
20793 if $ac_need_defaults; then
20794   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20795   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20796   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20797 fi
20798
20799 # Have a temporary directory for convenience.  Make it in the build tree
20800 # simply because there is no reason against having it here, and in addition,
20801 # creating and moving files from /tmp can sometimes cause problems.
20802 # Hook for its removal unless debugging.
20803 # Note that there is a small window in which the directory will not be cleaned:
20804 # after its creation but before its name has been assigned to `$tmp'.
20805 $debug ||
20806 {
20807   tmp=
20808   trap 'exit_status=$?
20809   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
20810 ' 0
20811   trap '{ (exit 1); exit 1; }' 1 2 13 15
20812 }
20813 # Create a (secure) tmp directory for tmp files.
20814
20815 {
20816   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20817   test -n "$tmp" && test -d "$tmp"
20818 }  ||
20819 {
20820   tmp=./conf$$-$RANDOM
20821   (umask 077 && mkdir "$tmp")
20822 } ||
20823 {
20824    echo "$me: cannot create a temporary directory in ." >&2
20825    { (exit 1); exit 1; }
20826 }
20827
20828 #
20829 # Set up the sed scripts for CONFIG_FILES section.
20830 #
20831
20832 # No need to generate the scripts if there are no CONFIG_FILES.
20833 # This happens for instance when ./config.status config.h
20834 if test -n "$CONFIG_FILES"; then
20835
20836 _ACEOF
20837
20838
20839
20840 ac_delim='%!_!# '
20841 for ac_last_try in false false false false false :; do
20842   cat >conf$$subs.sed <<_ACEOF
20843 SHELL!$SHELL$ac_delim
20844 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
20845 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
20846 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
20847 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
20848 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
20849 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
20850 exec_prefix!$exec_prefix$ac_delim
20851 prefix!$prefix$ac_delim
20852 program_transform_name!$program_transform_name$ac_delim
20853 bindir!$bindir$ac_delim
20854 sbindir!$sbindir$ac_delim
20855 libexecdir!$libexecdir$ac_delim
20856 datarootdir!$datarootdir$ac_delim
20857 datadir!$datadir$ac_delim
20858 sysconfdir!$sysconfdir$ac_delim
20859 sharedstatedir!$sharedstatedir$ac_delim
20860 localstatedir!$localstatedir$ac_delim
20861 includedir!$includedir$ac_delim
20862 oldincludedir!$oldincludedir$ac_delim
20863 docdir!$docdir$ac_delim
20864 infodir!$infodir$ac_delim
20865 htmldir!$htmldir$ac_delim
20866 dvidir!$dvidir$ac_delim
20867 pdfdir!$pdfdir$ac_delim
20868 psdir!$psdir$ac_delim
20869 libdir!$libdir$ac_delim
20870 localedir!$localedir$ac_delim
20871 mandir!$mandir$ac_delim
20872 DEFS!$DEFS$ac_delim
20873 ECHO_C!$ECHO_C$ac_delim
20874 ECHO_N!$ECHO_N$ac_delim
20875 ECHO_T!$ECHO_T$ac_delim
20876 LIBS!$LIBS$ac_delim
20877 build_alias!$build_alias$ac_delim
20878 host_alias!$host_alias$ac_delim
20879 target_alias!$target_alias$ac_delim
20880 build!$build$ac_delim
20881 build_cpu!$build_cpu$ac_delim
20882 build_vendor!$build_vendor$ac_delim
20883 build_os!$build_os$ac_delim
20884 host!$host$ac_delim
20885 host_cpu!$host_cpu$ac_delim
20886 host_vendor!$host_vendor$ac_delim
20887 host_os!$host_os$ac_delim
20888 CC!$CC$ac_delim
20889 CFLAGS!$CFLAGS$ac_delim
20890 LDFLAGS!$LDFLAGS$ac_delim
20891 CPPFLAGS!$CPPFLAGS$ac_delim
20892 ac_ct_CC!$ac_ct_CC$ac_delim
20893 EXEEXT!$EXEEXT$ac_delim
20894 OBJEXT!$OBJEXT$ac_delim
20895 CPP!$CPP$ac_delim
20896 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
20897 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
20898 INSTALL_DATA!$INSTALL_DATA$ac_delim
20899 SET_MAKE!$SET_MAKE$ac_delim
20900 GREP!$GREP$ac_delim
20901 EGREP!$EGREP$ac_delim
20902 PERL!$PERL$ac_delim
20903 XMKMF!$XMKMF$ac_delim
20904 X_CFLAGS!$X_CFLAGS$ac_delim
20905 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
20906 X_LIBS!$X_LIBS$ac_delim
20907 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
20908 INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
20909 INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
20910 INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
20911 INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
20912 INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
20913 INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
20914 INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
20915 INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
20916 INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
20917 INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
20918 INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
20919 INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
20920 INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
20921 INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
20922 INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
20923 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
20924 RANLIB!$RANLIB$ac_delim
20925 ALLOCA!$ALLOCA$ac_delim
20926 USE_NLS!$USE_NLS$ac_delim
20927 MSGFMT!$MSGFMT$ac_delim
20928 GMSGFMT!$GMSGFMT$ac_delim
20929 XGETTEXT!$XGETTEXT$ac_delim
20930 CATALOGS!$CATALOGS$ac_delim
20931 CATOBJEXT!$CATOBJEXT$ac_delim
20932 DATADIRNAME!$DATADIRNAME$ac_delim
20933 GMOFILES!$GMOFILES$ac_delim
20934 INSTOBJEXT!$INSTOBJEXT$ac_delim
20935 INTLDEPS!$INTLDEPS$ac_delim
20936 INTLLIBS!$INTLLIBS$ac_delim
20937 INTLOBJS!$INTLOBJS$ac_delim
20938 POFILES!$POFILES$ac_delim
20939 POSUB!$POSUB$ac_delim
20940 _ACEOF
20941
20942   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
20943     break
20944   elif $ac_last_try; then
20945     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
20946 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
20947    { (exit 1); exit 1; }; }
20948   else
20949     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20950   fi
20951 done
20952
20953 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
20954 if test -n "$ac_eof"; then
20955   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
20956   ac_eof=`expr $ac_eof + 1`
20957 fi
20958
20959 cat >>$CONFIG_STATUS <<_ACEOF
20960 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
20961 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20962 _ACEOF
20963 sed '
20964 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
20965 s/^/s,@/; s/!/@,|#_!!_#|/
20966 :n
20967 t n
20968 s/'"$ac_delim"'$/,g/; t
20969 s/$/\\/; p
20970 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
20971 ' >>$CONFIG_STATUS <conf$$subs.sed
20972 rm -f conf$$subs.sed
20973 cat >>$CONFIG_STATUS <<_ACEOF
20974 CEOF$ac_eof
20975 _ACEOF
20976
20977
20978 ac_delim='%!_!# '
20979 for ac_last_try in false false false false false :; do
20980   cat >conf$$subs.sed <<_ACEOF
20981 MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
20982 login_manager_tmp!$login_manager_tmp$ac_delim
20983 pkg_config!$pkg_config$ac_delim
20984 gnome_open_program!$gnome_open_program$ac_delim
20985 gnome_url_show_program!$gnome_url_show_program$ac_delim
20986 INCLUDES!$INCLUDES$ac_delim
20987 PREFERRED_DEMO_PROGRAM!$PREFERRED_DEMO_PROGRAM$ac_delim
20988 ALL_DEMO_PROGRAMS!$ALL_DEMO_PROGRAMS$ac_delim
20989 SAVER_LIBS!$SAVER_LIBS$ac_delim
20990 MOTIF_LIBS!$MOTIF_LIBS$ac_delim
20991 GTK_LIBS!$GTK_LIBS$ac_delim
20992 XML_LIBS!$XML_LIBS$ac_delim
20993 JPEG_LIBS!$JPEG_LIBS$ac_delim
20994 HACK_LIBS!$HACK_LIBS$ac_delim
20995 XPM_LIBS!$XPM_LIBS$ac_delim
20996 PTY_LIBS!$PTY_LIBS$ac_delim
20997 GL_LIBS!$GL_LIBS$ac_delim
20998 GLE_LIBS!$GLE_LIBS$ac_delim
20999 XDPMS_LIBS!$XDPMS_LIBS$ac_delim
21000 XINERAMA_LIBS!$XINERAMA_LIBS$ac_delim
21001 PASSWD_LIBS!$PASSWD_LIBS$ac_delim
21002 INSTALL_SETUID!$INSTALL_SETUID$ac_delim
21003 SETUID_HACKS!$SETUID_HACKS$ac_delim
21004 INSTALL_DIRS!$INSTALL_DIRS$ac_delim
21005 NEED_SETUID!$NEED_SETUID$ac_delim
21006 INSTALL_PAM!$INSTALL_PAM$ac_delim
21007 HAVE_PAM_FAIL_DELAY!$HAVE_PAM_FAIL_DELAY$ac_delim
21008 NEW_LOGIN_COMMAND!$NEW_LOGIN_COMMAND$ac_delim
21009 NEW_LOGIN_COMMAND_P!$NEW_LOGIN_COMMAND_P$ac_delim
21010 DEFAULT_IMAGES_P!$DEFAULT_IMAGES_P$ac_delim
21011 DEFAULT_IMAGE_DIRECTORY!$DEFAULT_IMAGE_DIRECTORY$ac_delim
21012 DEFAULT_TEXT_FILE!$DEFAULT_TEXT_FILE$ac_delim
21013 WITH_BROWSER!$WITH_BROWSER$ac_delim
21014 OBJCC!$OBJCC$ac_delim
21015 EXES_OSX!$EXES_OSX$ac_delim
21016 SCRIPTS_OSX!$SCRIPTS_OSX$ac_delim
21017 MEN_OSX!$MEN_OSX$ac_delim
21018 PASSWD_SRCS!$PASSWD_SRCS$ac_delim
21019 PASSWD_OBJS!$PASSWD_OBJS$ac_delim
21020 XMU_SRCS!$XMU_SRCS$ac_delim
21021 XMU_OBJS!$XMU_OBJS$ac_delim
21022 XMU_LIBS!$XMU_LIBS$ac_delim
21023 SAVER_GL_SRCS!$SAVER_GL_SRCS$ac_delim
21024 SAVER_GL_OBJS!$SAVER_GL_OBJS$ac_delim
21025 SAVER_GL_LIBS!$SAVER_GL_LIBS$ac_delim
21026 LOCK_SRCS!$LOCK_SRCS$ac_delim
21027 LOCK_OBJS!$LOCK_OBJS$ac_delim
21028 JPEG_EXES!$JPEG_EXES$ac_delim
21029 GL_EXES!$GL_EXES$ac_delim
21030 GL_UTIL_EXES!$GL_UTIL_EXES$ac_delim
21031 GL_MEN!$GL_MEN$ac_delim
21032 GL_KLUDGE!$GL_KLUDGE$ac_delim
21033 GLE_EXES!$GLE_EXES$ac_delim
21034 GLE_KLUDGE!$GLE_KLUDGE$ac_delim
21035 GNOME24!$GNOME24$ac_delim
21036 GNOME22!$GNOME22$ac_delim
21037 NOGNOME!$NOGNOME$ac_delim
21038 HACKDIR!$HACKDIR$ac_delim
21039 HACKDIR_FULL!$HACKDIR_FULL$ac_delim
21040 GTK_DATADIR!$GTK_DATADIR$ac_delim
21041 PO_DATADIR!$PO_DATADIR$ac_delim
21042 HACK_CONF_DIR!$HACK_CONF_DIR$ac_delim
21043 GTK_EXTRA_OBJS!$GTK_EXTRA_OBJS$ac_delim
21044 APPDEFAULTS!$APPDEFAULTS$ac_delim
21045 DEPEND!$DEPEND$ac_delim
21046 DEPEND_FLAGS!$DEPEND_FLAGS$ac_delim
21047 DEPEND_DEFINES!$DEPEND_DEFINES$ac_delim
21048 LIBOBJS!$LIBOBJS$ac_delim
21049 LTLIBOBJS!$LTLIBOBJS$ac_delim
21050 _ACEOF
21051
21052   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 69; then
21053     break
21054   elif $ac_last_try; then
21055     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21056 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21057    { (exit 1); exit 1; }; }
21058   else
21059     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21060   fi
21061 done
21062
21063 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21064 if test -n "$ac_eof"; then
21065   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21066   ac_eof=`expr $ac_eof + 1`
21067 fi
21068
21069 cat >>$CONFIG_STATUS <<_ACEOF
21070 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
21071 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
21072 _ACEOF
21073 sed '
21074 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21075 s/^/s,@/; s/!/@,|#_!!_#|/
21076 :n
21077 t n
21078 s/'"$ac_delim"'$/,g/; t
21079 s/$/\\/; p
21080 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21081 ' >>$CONFIG_STATUS <conf$$subs.sed
21082 rm -f conf$$subs.sed
21083 cat >>$CONFIG_STATUS <<_ACEOF
21084 :end
21085 s/|#_!!_#|//g
21086 CEOF$ac_eof
21087 _ACEOF
21088
21089
21090 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21091 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21092 # trailing colons and then remove the whole line if VPATH becomes empty
21093 # (actually we leave an empty line to preserve line numbers).
21094 if test "x$srcdir" = x.; then
21095   ac_vpsub='/^[  ]*VPATH[        ]*=/{
21096 s/:*\$(srcdir):*/:/
21097 s/:*\${srcdir}:*/:/
21098 s/:*@srcdir@:*/:/
21099 s/^\([^=]*=[     ]*\):*/\1/
21100 s/:*$//
21101 s/^[^=]*=[       ]*$//
21102 }'
21103 fi
21104
21105 cat >>$CONFIG_STATUS <<\_ACEOF
21106 fi # test -n "$CONFIG_FILES"
21107
21108
21109 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
21110 do
21111   case $ac_tag in
21112   :[FHLC]) ac_mode=$ac_tag; continue;;
21113   esac
21114   case $ac_mode$ac_tag in
21115   :[FHL]*:*);;
21116   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
21117 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
21118    { (exit 1); exit 1; }; };;
21119   :[FH]-) ac_tag=-:-;;
21120   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21121   esac
21122   ac_save_IFS=$IFS
21123   IFS=:
21124   set x $ac_tag
21125   IFS=$ac_save_IFS
21126   shift
21127   ac_file=$1
21128   shift
21129
21130   case $ac_mode in
21131   :L) ac_source=$1;;
21132   :[FH])
21133     ac_file_inputs=
21134     for ac_f
21135     do
21136       case $ac_f in
21137       -) ac_f="$tmp/stdin";;
21138       *) # Look for the file first in the build tree, then in the source tree
21139          # (if the path is not absolute).  The absolute path cannot be DOS-style,
21140          # because $ac_f cannot contain `:'.
21141          test -f "$ac_f" ||
21142            case $ac_f in
21143            [\\/$]*) false;;
21144            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21145            esac ||
21146            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
21147 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
21148    { (exit 1); exit 1; }; };;
21149       esac
21150       ac_file_inputs="$ac_file_inputs $ac_f"
21151     done
21152
21153     # Let's still pretend it is `configure' which instantiates (i.e., don't
21154     # use $as_me), people would be surprised to read:
21155     #    /* config.h.  Generated by config.status.  */
21156     configure_input="Generated from "`IFS=:
21157           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
21158     if test x"$ac_file" != x-; then
21159       configure_input="$ac_file.  $configure_input"
21160       { echo "$as_me:$LINENO: creating $ac_file" >&5
21161 echo "$as_me: creating $ac_file" >&6;}
21162     fi
21163
21164     case $ac_tag in
21165     *:-:* | *:-) cat >"$tmp/stdin";;
21166     esac
21167     ;;
21168   esac
21169
21170   ac_dir=`$as_dirname -- "$ac_file" ||
21171 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21172          X"$ac_file" : 'X\(//\)[^/]' \| \
21173          X"$ac_file" : 'X\(//\)$' \| \
21174          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21175 echo X"$ac_file" |
21176     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21177             s//\1/
21178             q
21179           }
21180           /^X\(\/\/\)[^/].*/{
21181             s//\1/
21182             q
21183           }
21184           /^X\(\/\/\)$/{
21185             s//\1/
21186             q
21187           }
21188           /^X\(\/\).*/{
21189             s//\1/
21190             q
21191           }
21192           s/.*/./; q'`
21193   { as_dir="$ac_dir"
21194   case $as_dir in #(
21195   -*) as_dir=./$as_dir;;
21196   esac
21197   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
21198     as_dirs=
21199     while :; do
21200       case $as_dir in #(
21201       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
21202       *) as_qdir=$as_dir;;
21203       esac
21204       as_dirs="'$as_qdir' $as_dirs"
21205       as_dir=`$as_dirname -- "$as_dir" ||
21206 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21207          X"$as_dir" : 'X\(//\)[^/]' \| \
21208          X"$as_dir" : 'X\(//\)$' \| \
21209          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21210 echo X"$as_dir" |
21211     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21212             s//\1/
21213             q
21214           }
21215           /^X\(\/\/\)[^/].*/{
21216             s//\1/
21217             q
21218           }
21219           /^X\(\/\/\)$/{
21220             s//\1/
21221             q
21222           }
21223           /^X\(\/\).*/{
21224             s//\1/
21225             q
21226           }
21227           s/.*/./; q'`
21228       test -d "$as_dir" && break
21229     done
21230     test -z "$as_dirs" || eval "mkdir $as_dirs"
21231   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
21232 echo "$as_me: error: cannot create directory $as_dir" >&2;}
21233    { (exit 1); exit 1; }; }; }
21234   ac_builddir=.
21235
21236 case "$ac_dir" in
21237 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21238 *)
21239   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21240   # A ".." for each directory in $ac_dir_suffix.
21241   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
21242   case $ac_top_builddir_sub in
21243   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21244   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21245   esac ;;
21246 esac
21247 ac_abs_top_builddir=$ac_pwd
21248 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21249 # for backward compatibility:
21250 ac_top_builddir=$ac_top_build_prefix
21251
21252 case $srcdir in
21253   .)  # We are building in place.
21254     ac_srcdir=.
21255     ac_top_srcdir=$ac_top_builddir_sub
21256     ac_abs_top_srcdir=$ac_pwd ;;
21257   [\\/]* | ?:[\\/]* )  # Absolute name.
21258     ac_srcdir=$srcdir$ac_dir_suffix;
21259     ac_top_srcdir=$srcdir
21260     ac_abs_top_srcdir=$srcdir ;;
21261   *) # Relative name.
21262     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21263     ac_top_srcdir=$ac_top_build_prefix$srcdir
21264     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21265 esac
21266 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21267
21268
21269   case $ac_mode in
21270   :F)
21271   #
21272   # CONFIG_FILE
21273   #
21274
21275   case $INSTALL in
21276   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21277   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21278   esac
21279 _ACEOF
21280
21281 cat >>$CONFIG_STATUS <<\_ACEOF
21282 # If the template does not know about datarootdir, expand it.
21283 # FIXME: This hack should be removed a few years after 2.60.
21284 ac_datarootdir_hack=; ac_datarootdir_seen=
21285
21286 case `sed -n '/datarootdir/ {
21287   p
21288   q
21289 }
21290 /@datadir@/p
21291 /@docdir@/p
21292 /@infodir@/p
21293 /@localedir@/p
21294 /@mandir@/p
21295 ' $ac_file_inputs` in
21296 *datarootdir*) ac_datarootdir_seen=yes;;
21297 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21298   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21299 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21300 _ACEOF
21301 cat >>$CONFIG_STATUS <<_ACEOF
21302   ac_datarootdir_hack='
21303   s&@datadir@&$datadir&g
21304   s&@docdir@&$docdir&g
21305   s&@infodir@&$infodir&g
21306   s&@localedir@&$localedir&g
21307   s&@mandir@&$mandir&g
21308     s&\\\${datarootdir}&$datarootdir&g' ;;
21309 esac
21310 _ACEOF
21311
21312 # Neutralize VPATH when `$srcdir' = `.'.
21313 # Shell code in configure.ac might set extrasub.
21314 # FIXME: do we really want to maintain this feature?
21315 cat >>$CONFIG_STATUS <<_ACEOF
21316   sed "$ac_vpsub
21317 $extrasub
21318 _ACEOF
21319 cat >>$CONFIG_STATUS <<\_ACEOF
21320 :t
21321 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21322 s&@configure_input@&$configure_input&;t t
21323 s&@top_builddir@&$ac_top_builddir_sub&;t t
21324 s&@srcdir@&$ac_srcdir&;t t
21325 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21326 s&@top_srcdir@&$ac_top_srcdir&;t t
21327 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21328 s&@builddir@&$ac_builddir&;t t
21329 s&@abs_builddir@&$ac_abs_builddir&;t t
21330 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21331 s&@INSTALL@&$ac_INSTALL&;t t
21332 $ac_datarootdir_hack
21333 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
21334
21335 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21336   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
21337   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
21338   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21339 which seems to be undefined.  Please make sure it is defined." >&5
21340 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21341 which seems to be undefined.  Please make sure it is defined." >&2;}
21342
21343   rm -f "$tmp/stdin"
21344   case $ac_file in
21345   -) cat "$tmp/out"; rm -f "$tmp/out";;
21346   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
21347   esac
21348  ;;
21349   :H)
21350   #
21351   # CONFIG_HEADER
21352   #
21353 _ACEOF
21354
21355 # Transform confdefs.h into a sed script `conftest.defines', that
21356 # substitutes the proper values into config.h.in to produce config.h.
21357 rm -f conftest.defines conftest.tail
21358 # First, append a space to every undef/define line, to ease matching.
21359 echo 's/$/ /' >conftest.defines
21360 # Then, protect against being on the right side of a sed subst, or in
21361 # an unquoted here document, in config.status.  If some macros were
21362 # called several times there might be several #defines for the same
21363 # symbol, which is useless.  But do not sort them, since the last
21364 # AC_DEFINE must be honored.
21365 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21366 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
21367 # NAME is the cpp macro being defined, VALUE is the value it is being given.
21368 # PARAMS is the parameter list in the macro definition--in most cases, it's
21369 # just an empty string.
21370 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
21371 ac_dB='\\)[      (].*,\\1define\\2'
21372 ac_dC=' '
21373 ac_dD=' ,'
21374
21375 uniq confdefs.h |
21376   sed -n '
21377         t rset
21378         :rset
21379         s/^[     ]*#[    ]*define[       ][      ]*//
21380         t ok
21381         d
21382         :ok
21383         s/[\\&,]/\\&/g
21384         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
21385         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
21386   ' >>conftest.defines
21387
21388 # Remove the space that was appended to ease matching.
21389 # Then replace #undef with comments.  This is necessary, for
21390 # example, in the case of _POSIX_SOURCE, which is predefined and required
21391 # on some systems where configure will not decide to define it.
21392 # (The regexp can be short, since the line contains either #define or #undef.)
21393 echo 's/ $//
21394 s,^[     #]*u.*,/* & */,' >>conftest.defines
21395
21396 # Break up conftest.defines:
21397 ac_max_sed_lines=50
21398
21399 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
21400 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
21401 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
21402 # et cetera.
21403 ac_in='$ac_file_inputs'
21404 ac_out='"$tmp/out1"'
21405 ac_nxt='"$tmp/out2"'
21406
21407 while :
21408 do
21409   # Write a here document:
21410     cat >>$CONFIG_STATUS <<_ACEOF
21411     # First, check the format of the line:
21412     cat >"\$tmp/defines.sed" <<\\CEOF
21413 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
21414 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
21415 b
21416 :def
21417 _ACEOF
21418   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
21419   echo 'CEOF
21420     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
21421   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
21422   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
21423   grep . conftest.tail >/dev/null || break
21424   rm -f conftest.defines
21425   mv conftest.tail conftest.defines
21426 done
21427 rm -f conftest.defines conftest.tail
21428
21429 echo "ac_result=$ac_in" >>$CONFIG_STATUS
21430 cat >>$CONFIG_STATUS <<\_ACEOF
21431   if test x"$ac_file" != x-; then
21432     echo "/* $configure_input  */" >"$tmp/config.h"
21433     cat "$ac_result" >>"$tmp/config.h"
21434     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
21435       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21436 echo "$as_me: $ac_file is unchanged" >&6;}
21437     else
21438       rm -f $ac_file
21439       mv "$tmp/config.h" $ac_file
21440     fi
21441   else
21442     echo "/* $configure_input  */"
21443     cat "$ac_result"
21444   fi
21445   rm -f "$tmp/out12"
21446  ;;
21447
21448   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
21449 echo "$as_me: executing $ac_file commands" >&6;}
21450  ;;
21451   esac
21452
21453
21454   case $ac_file$ac_mode in
21455     "default-1":C)
21456
21457 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
21458 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
21459   rm -f intltool-extract.out
21460 else
21461   mv -f intltool-extract.out intltool-extract
21462 fi
21463 chmod ugo+x intltool-extract
21464 chmod u+w intltool-extract
21465
21466 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
21467 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
21468   rm -f intltool-merge.out
21469 else
21470   mv -f intltool-merge.out intltool-merge
21471 fi
21472 chmod ugo+x intltool-merge
21473 chmod u+w intltool-merge
21474
21475 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
21476 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
21477   rm -f intltool-update.out
21478 else
21479   mv -f intltool-update.out intltool-update
21480 fi
21481 chmod ugo+x intltool-update
21482 chmod u+w intltool-update
21483
21484  ;;
21485     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
21486         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
21487       esac ;;
21488
21489   esac
21490 done # for ac_tag
21491
21492
21493 { (exit 0); exit 0; }
21494 _ACEOF
21495 chmod +x $CONFIG_STATUS
21496 ac_clean_files=$ac_clean_files_save
21497
21498
21499 # configure is writing to config.log, and then calls config.status.
21500 # config.status does its own redirection, appending to config.log.
21501 # Unfortunately, on DOS this fails, as config.log is still kept open
21502 # by configure, so config.status won't be able to write to it; its
21503 # output is simply discarded.  So we exec the FD to /dev/null,
21504 # effectively closing config.log, so it can be properly (re)opened and
21505 # appended to by config.status.  When coming back to configure, we
21506 # need to make the FD available again.
21507 if test "$no_create" != yes; then
21508   ac_cs_success=:
21509   ac_config_status_args=
21510   test "$silent" = yes &&
21511     ac_config_status_args="$ac_config_status_args --quiet"
21512   exec 5>/dev/null
21513   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21514   exec 5>>config.log
21515   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21516   # would make configure fail if this is the last instruction.
21517   $ac_cs_success || { (exit 1); exit 1; }
21518 fi
21519
21520
21521 ###############################################################################
21522 #
21523 #       Print some warnings at the end.
21524 #
21525 ###############################################################################
21526
21527 warn_prefix_1="    Warning:"
21528 warn_prefix_2="       Note:"
21529 warn_prefix="$warn_prefix_1"
21530
21531 warning=no
21532 warnsep='    #################################################################'
21533
21534 warnpre() {
21535   if test "$warning" = no ; then
21536     echo '' ; echo "$warnsep" ; echo ''
21537     warning=yes
21538   fi
21539 }
21540
21541 warn() {
21542   warnpre
21543   if test "$warning" = long ; then echo '' ; fi
21544   warning=yes
21545   rest="$@"
21546   echo "$warn_prefix $rest"
21547 }
21548
21549 warnL() {
21550   was=$warning
21551   warnpre
21552   warning=yes
21553   if test "$was" != no ; then echo '' ; fi
21554   rest="$@"
21555   echo "$warn_prefix $rest"
21556 }
21557
21558 warn2() {
21559   rest="$@"
21560   echo "             $rest"
21561   warning=long
21562 }
21563
21564 note() {
21565   warn_prefix="$warn_prefix_2"
21566   warn $@
21567   warn_prefix="$warn_prefix_1"
21568 }
21569
21570 noteL() {
21571   warn_prefix="$warn_prefix_2"
21572   warnL $@
21573   warn_prefix="$warn_prefix_1"
21574 }
21575
21576
21577 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
21578   warn 'The SGI saver extension was requested, but was not found.'
21579 fi
21580
21581 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
21582   warn 'The XIdle extension was requested, but was not found.'
21583 fi
21584
21585 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
21586   warn 'The XSHM extension was requested, but was not found.'
21587 fi
21588
21589 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
21590   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
21591 fi
21592
21593 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
21594   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
21595 fi
21596
21597 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
21598   warn 'The DPMS extension was requested, but was not found.'
21599 fi
21600
21601 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
21602   warn 'The Xinerama extension was requested, but was not found.'
21603 fi
21604
21605 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
21606   warn 'The XF86VMODE extension was requested, but was not found.'
21607 fi
21608
21609 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
21610   warn 'The RANDR extension was requested, but was not found.'
21611 fi
21612
21613 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
21614   warn "Checking of /proc/interrupts was requested, but it's bogus."
21615 fi
21616
21617 if test "$pkg_config" = false ; then
21618   warnL 'The "pkg-config" program was not found.  Without that,'
21619   warn2 "detection of the various GTK libraries won't work."
21620 else
21621   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
21622   if test "x$pkgerr" != "x" ; then
21623     warnL 'The "pkg-config" program produces errors.  This often causes'
21624     warn2 "detection of the various GTK libraries to malfunction."
21625     warn2 "The errors are:"
21626     echo ''
21627     echo "$pkgerr" | sed 's/^/             > /g'
21628   fi
21629 fi
21630
21631 if test "$gtk_halfassed" != no ; then
21632   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
21633   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
21634   warn2 "Perhaps some of the development packages are not installed?"
21635   if test "$have_gtk" = yes ; then
21636     v="$ac_gtk_version_string"
21637     warn2 "GTK $v is also installed, so it will be used instead."
21638     warn2 "Please read the above output and the \`config.log' file"
21639     warn2 "for more details."
21640   fi
21641 fi
21642
21643 motif_warn2() {
21644   warn2 'Though the Motif front-end to xscreensaver is still'
21645   warn2 'maintained, it is no longer being updated with new'
21646   warn2 'features: all new development on the xscreensaver-demo'
21647   warn2 'program is happening in the GTK version, and not in the'
21648   warn2 'Motif version.  It is recommended that you build against'
21649   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
21650 }
21651
21652 if test "$have_motif" = no -a "$have_gtk" = no; then
21653
21654   if test "$with_motif" = yes; then
21655     warnL "Neither the GTK nor Motif libraries were found; the"
21656     warn2 "\`xscreensaver-demo' program requires one of these."
21657     echo ''
21658     motif_warn2
21659   else
21660     warnL "The GTK libraries do not seem to be available; the"
21661     warn2 "\`xscreensaver-demo' program requires them."
21662 #   echo ''
21663 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
21664 #   warn2 "\`--with-motif' option) but that is NOT recommended."
21665 #   motif_warn2
21666   fi
21667
21668 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21669   warnL "Use of Motif was requested, but it wasn't found;"
21670   warn2 "Gtk will be used instead."
21671
21672 elif test "$jurassic_gtk" = yes ; then
21673
21674   pref_gtk=2.0
21675
21676   v="$ac_gtk_version_string"
21677   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
21678     warnL "Use of Gtk was requested, but its version number is unknown;"
21679   elif test "$with_gtk_req" = yes ; then
21680     warnL "Use of Gtk was requested, but it is version $v;"
21681   else
21682     warnL "Gtk was found on this system, but it is version $v;"
21683   fi
21684
21685   warn2 "Gtk $pref_gtk or newer is required."
21686
21687 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
21688   warnL "Use of Gtk was requested, but it wasn't found."
21689 fi
21690
21691
21692 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
21693   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
21694   warn2 "headers were not found.  That can't be good.  Please"
21695   warn2 "install the GDK-Pixbuf development kit and re-configure."
21696 fi
21697
21698 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
21699
21700   preferred_lesstif=0.92
21701
21702   if test "$lesstif_version" = unknown; then
21703     warnL "Unable to determine the LessTif version number!"
21704     warn2 "Make sure you are using version $preferred_lesstif or newer."
21705     warn2 "See <http://www.lesstif.org/>."
21706
21707   elif test \! $lesstif_version -gt 82; then
21708     warnL "LessTif version $lesstif_version_string is being used."
21709     warn2 "LessTif versions 0.82 and earlier are too buggy to"
21710     warn2 "use with XScreenSaver; it is strongly recommended"
21711     warn2 "that you upgrade to at least version $preferred_lesstif!"
21712     warn2 "See <http://www.lesstif.org/>."
21713   fi
21714 fi
21715
21716
21717 if test "$have_motif" = yes -a "$have_gtk" = no ; then
21718   warn  'Motif is being used, and GTK is not.'
21719   echo  ''
21720   motif_warn2
21721 fi
21722
21723
21724 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
21725   warnL 'Use of XPM was requested, but it was not found.'
21726 fi
21727
21728 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
21729   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
21730 fi
21731
21732 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
21733    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
21734
21735   if test "$with_gdk_pixbuf_req" = yes ; then
21736     true
21737   elif test "$with_gdk_pixbuf_req" = no ; then
21738     warnL 'The GDK-Pixbuf library is not being used.'
21739   else
21740     warnL 'The GDK-Pixbuf library was not found.'
21741   fi
21742
21743   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
21744     true
21745   elif test "$with_xpm_req" = no ; then
21746     warnL 'The XPM library is not being used.'
21747   else
21748     warnL 'The XPM library was not found.'
21749   fi
21750
21751   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
21752     warn2 'The XPM library is being used instead.'
21753   fi
21754
21755   if test "$gdk_pixbuf_halfassed" = yes ; then
21756     echo ''
21757     warn2 'More specifically, we found the headers, but not the'
21758     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
21759     warn2 "system, or something else went wrong.  The \`config.log'"
21760     warn2 'file might contain some clues.'
21761   fi
21762
21763   echo ''
21764   warn2 'Some of the demos will not use images as much as they could.'
21765   warn2 'You should consider installing GDK-Pixbuf and re-running'
21766   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
21767   warn2 'provides support for more image formats.)'
21768 fi
21769
21770
21771 if test "$have_jpeg" = no ; then
21772   if test "$with_jpeg_req" = yes ; then
21773     warnL 'Use of libjpeg was requested, but it was not found.'
21774   elif test "$with_jpeg_req" = no ; then
21775     noteL 'The JPEG library is not being used.'
21776   else
21777     noteL 'The JPEG library was not found.'
21778   fi
21779
21780   if test "$jpeg_halfassed" = yes ; then
21781     echo ''
21782     warn2 'More specifically, we found the headers, but not the'
21783     warn2 'library; so either JPEG is half-installed on this'
21784     warn2 "system, or something else went wrong.  The \`config.log'"
21785     warn2 'file might contain some clues.'
21786     echo ''
21787   fi
21788
21789   if test "$have_gdk_pixbuf" = no ; then
21790     warn2 "This means that it won't be possible for the image-manipulating"
21791     warn2 "display modes to load files from disk; and it also means that"
21792     warn2 "the \`webcollage' program will be much slower."
21793   else
21794     warn2 "This means the \`webcollage' program will be much slower."
21795   fi
21796 fi
21797
21798
21799 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
21800   preferred_mesagl=3.4
21801   mgv="$ac_mesagl_version_string"
21802   pgl="$preferred_mesagl"
21803
21804   if test "$ac_mesagl_version" = unknown; then
21805     warnL "Unable to determine the MesaGL version number!"
21806     warn2 "Make sure you are using version $preferred_mesagl or newer."
21807
21808   elif test \! "$ac_mesagl_version" -gt 2006; then
21809     warnL "MesaGL version number is $mgv --"
21810     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
21811     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
21812
21813   elif test \! "$ac_mesagl_version" -gt 3003; then
21814     warnL "MesaGL version number is $mgv --"
21815     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
21816     warn2 "that you upgrade to $pgl or newer."
21817   fi
21818 fi
21819
21820 if test "$have_gl" = no ; then
21821   if test "$with_gl_req" = yes ; then
21822     warnL 'Use of GL was requested, but it was not found.'
21823   elif test "$with_gl_req" = no ; then
21824     noteL 'The OpenGL 3D library is not being used.'
21825   else
21826     noteL 'The OpenGL 3D library was not found.'
21827   fi
21828
21829   if test "$gl_halfassed" = yes ; then
21830     echo ''
21831     warn2 'More specifically, we found the headers, but not the'
21832     warn2 'libraries; so either GL is half-installed on this'
21833     warn2 "system, or something else went wrong.  The \`config.log'"
21834     warn2 'file might contain some clues.'
21835   fi
21836
21837   echo ''
21838   warn2 'Those demos which use 3D will not be built or installed.'
21839   warn2 'You might want to consider installing OpenGL and'
21840   warn2 "re-running configure.  If your vendor doesn't ship"
21841   warn2 'their own implementation of OpenGL, you can get a free'
21842   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
21843   warn2 'info, see <http://www.opengl.org/>.'
21844
21845 fi
21846
21847
21848 if test "$have_gl" = yes -a "$have_gle" = no ; then
21849
21850  # nobody cares about this; don't print the warning unless it was
21851  # requested and not found, or halfway-found.
21852  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
21853
21854   if test "$with_gle_req" = yes ; then
21855     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
21856     warn2 'it was not found (though the OpenGL library was found, and'
21857     warn2 'is being used.)'
21858   elif test "$with_gle_req" = no ; then
21859     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
21860     warn2 'library is not.'
21861   else
21862     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
21863     warn2 'was not.'
21864   fi
21865
21866   if test "$gle_halfassed" = yes ; then
21867     echo ''
21868     warn2 'More specifically, we found the headers, but not the'
21869     warn2 'libraries; so either GLE is half-installed on this'
21870     warn2 "system, or something else went wrong.  The \`config.log'"
21871     warn2 'file might contain some clues.'
21872   fi
21873
21874   echo ''
21875   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
21876   warn2 'will not be built or installed.  You might want to consider'
21877   warn2 'installing GLE and re-running configure.  You can find the'
21878   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
21879   warn2 'OpenGL info, see <http://www.opengl.org/>.'
21880
21881  fi
21882 fi
21883
21884
21885 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
21886   warn 'Use of XReadDisplay was requested, but it was not found.'
21887 fi
21888
21889 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
21890   warn 'Use of Kerberos was requested, but it was not found.'
21891 fi
21892
21893 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
21894   warn 'Use of PAM was requested, but it was not found.'
21895 fi
21896
21897 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
21898   warn 'Use of shadow passwords was requested, but they were not found.'
21899 fi
21900
21901
21902 # You are in a twisty maze of namespaces and syntaxes, all alike.
21903 # Fuck the skull of Unix.
21904 #
21905 bindir=`eval eval eval eval eval eval eval echo $bindir`
21906 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
21907 HACKDIR_CONF_DIR=`eval eval eval eval eval eval eval echo $HACKDIR_CONF_DIR`
21908
21909 # canonicalize slashes.
21910 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
21911 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
21912 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21913
21914
21915 # Sanity check the hackdir
21916 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
21917   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
21918     echo ""
21919     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21920                    There will be an executable installed with that name, so
21921                    that can't be the name of a directory as well.  Please
21922                    re-configure with a different directory name." >&5
21923 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21924                    There will be an executable installed with that name, so
21925                    that can't be the name of a directory as well.  Please
21926                    re-configure with a different directory name." >&2;}
21927    { (exit 1); exit 1; }; }
21928   fi
21929 done
21930
21931
21932 do_dir_warning=no
21933
21934 # Now let's warn if there's a previous RPM version already installed.
21935 # But don't bother with this test if we are currently *building* an RPM.
21936
21937 if test -z "$RPM_PACKAGE_VERSION" ; then
21938
21939   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
21940
21941   # M4 sucks!!
21942
21943   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
21944         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
21945         head -1`
21946
21947
21948   if test \! -z "$rpmv" ; then
21949     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
21950     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/attraction$@\1@p'`
21951
21952     warning=no
21953     warnL "There is already an installed RPM of xscreensaver $rpmv"
21954     warn2 'on this system.  You might want to remove it ("rpm -ve")'
21955     warn2 'before running "make install" in this directory.'
21956     echo ""
21957     warn2 "Alternately, you could build this version of xscreensaver"
21958     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
21959     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
21960     warn2 "See the RPM documentation for more info."
21961     echo ""
21962
21963     if test "$rpmbdir" = "$rpmhdir" ; then
21964       warn2 "The RPM version was installed in $rpmbdir/."
21965       do_dir_warning=yes
21966     else
21967       warn2 "The RPM version was installed in $rpmbdir/,"
21968       warn2 "with demos in $rpmhdir/."
21969     fi
21970   fi
21971 fi
21972
21973 if test "${bindir}" = "${HACKDIR}" ; then
21974   do_dir_warning=yes
21975 fi
21976
21977 if test "$do_dir_warning" = yes; then
21978   echo ""
21979   echo "$warnsep"
21980   echo ""
21981   echo '      When you run "make install", the "xscreensaver",'
21982   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
21983   echo "      will be installed in ${bindir}/."
21984   echo ""
21985   echo "      The various graphics demos (190+ different executables) will"
21986   echo "      be installed in ${HACKDIR}/."
21987   echo ""
21988   echo "      If you would prefer the demos to be installed elsewhere,"
21989   echo "      you should re-run configure with the --with-hackdir=DIR"
21990   echo "      option.  For more information, run \`./configure --help'."
21991   warning=yes
21992 fi
21993
21994 if test "$warning" != no; then
21995   echo '' ; echo "$warnsep" ; echo ''
21996 fi
21997
21998 if test "$do_dir_warning" = no; then
21999   if test "$warning" = no; then
22000     echo ''
22001   fi
22002   echo "User programs will be installed in ${bindir}/"
22003   echo "Screen savers will be installed in ${HACKDIR}/"
22004   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
22005   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
22006   echo ''
22007 fi